/* Custom Styles for 3mcephe Pergola Site */

/* Language Selector */
.language-selector {
    position: absolute;
    top: 30px;
    right: 120px;
    z-index: 100;
    display: flex;
    gap: 10px;
}

.language-selector a {
    color: #fff;
    text-decoration: none;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.language-selector a:hover,
.language-selector a.active {
    background: #fff;
    color: #000;
}

@media (max-width: 768px) {
    .language-selector {
        top: 15px;
        right: 70px;
    }

    .language-selector a {
        padding: 3px 6px;
        font-size: 10px;
    }
}

/* Breadcrumb */
.breadcrumb-wrap {
    margin-top: 20px;
}

.breadcrumb {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
    padding: 0;
    justify-content: center;
}

.breadcrumb li {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.7);
}

.breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 10px;
    color: rgba(255, 255, 255, 0.5);
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.breadcrumb a:hover {
    color: #fff;
}

/* Section Title */
.section-title {
    text-align: center;
    padding: 100px 0;
}

.section-title h2 {
    font-size: 48px;
    color: #fff;
    margin-bottom: 20px;
}

.section-title p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    max-width: 600px;
    margin: 0 auto;
}

/* Product Specs Table */
.pr-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.pr-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
}

.pr-list li span {
    font-weight: 600;
    min-width: 180px;
    color: #333;
}

/* CTA Buttons */
.btn.float-btn.flat-btn {
    margin-right: 10px;
    margin-bottom: 10px;
}

/* Category Cards for subcategories */
.category-intro {
    padding: 60px 0;
    text-align: center;
}

.category-intro h2 {
    font-size: 36px;
    margin-bottom: 20px;
}

.category-intro p {
    font-size: 16px;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

/* ========================================
   PRODUCT DETAIL PAGE FIXES
   ======================================== */

/* Fix footer positioning - footer stays BELOW content, content scrolls over it */
.content-footer {
    z-index: 1 !important;
}

.content-footer .footer-inner {
    position: relative;
    z-index: 1;
}

/* Content sections must be ABOVE footer */
.content-holder .content {
    position: relative;
    z-index: 5 !important;
    background: #fff;
}

.content-holder .content.full-height {
    z-index: 5 !important;
}

/* Parallax sections must also be above footer */
.content-holder section.parallax-section {
    position: relative;
    z-index: 5 !important;
}

/* Ensure height-emulator properly reserves space for footer */
.height-emulator {
    position: relative;
    z-index: 4;
    background: transparent;
    pointer-events: none;
}

/* Yan Kapama Section - Equal Height Cards */
.side-options-section {
    padding: 60px 0;
    background: #fff;
}

.side-options-section .section-header {
    margin-bottom: 40px;
}

.side-options-section .section-header h3 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #333;
}

.side-options-section .section-header p {
    font-size: 16px;
    color: #666;
    max-width: 500px;
}

.side-options-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px;
}

.side-options-row .option-card {
    flex: 0 0 33.333%;
    max-width: 33.333%;
    padding: 0 15px;
    margin-bottom: 30px;
}

@media (max-width: 991px) {
    .side-options-row .option-card {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media (max-width: 575px) {
    .side-options-row .option-card {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.option-card-inner {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.option-card-inner:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.option-card-img {
    position: relative;
    height: 220px;
    overflow: hidden;
}

.option-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.option-card-inner:hover .option-card-img img {
    transform: scale(1.05);
}

.option-card-img .overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 50%, rgba(0, 0, 0, 0.7) 100%);
}

.option-card-content {
    padding: 20px;
    background: #fff;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.option-card-content h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 5px;
}

.option-card-content h4 a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.option-card-content h4 a:hover {
    color: #666;
}

.option-card-content span {
    font-size: 14px;
    color: #888;
}

/* Featured Projects Section */
.featured-projects-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.featured-projects-section .section-header {
    text-align: center;
    margin-bottom: 50px;
}

.featured-projects-section .section-header h3 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 15px;
    color: #333;
}

.featured-projects-section .section-header p {
    font-size: 16px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 991px) {
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .projects-grid {
        grid-template-columns: 1fr;
    }
}

.project-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.project-card-img {
    position: relative;
    height: 280px;
    overflow: hidden;
}

.project-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.project-card:hover .project-card-img img {
    transform: scale(1.1);
}

.project-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 40%, rgba(0, 0, 0, 0.8) 100%);
    opacity: 0.9;
    transition: opacity 0.3s;
}

.project-card:hover .project-card-overlay {
    opacity: 1;
}

.project-card-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 25px;
    color: #fff;
    transform: translateY(10px);
    transition: transform 0.3s;
}

.project-card:hover .project-card-content {
    transform: translateY(0);
}

.project-card-content h4 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.project-card-content h4 a {
    color: #fff;
    text-decoration: none;
}

.project-card-content span {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.8);
}

.project-card-zoom {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s;
    z-index: 10;
}

.project-card-zoom i {
    color: #333;
    font-size: 18px;
}

.project-card:hover .project-card-zoom {
    transform: translate(-50%, -50%) scale(1);
}

.view-all-btn {
    text-align: center;
    margin-top: 40px;
}

/* CTA Section Improvements */
.cta-section {
    padding: 100px 0;
}

.cta-section .intro-text {
    text-align: center;
}

.cta-section .intro-text h2 {
    font-size: 36px;
    color: #fff;
    margin-bottom: 20px;
}

.cta-section .intro-text p {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ========================================
   CATEGORY PAGE STYLES
   ======================================== */

.category-section {
    padding: 80px 0;
    background: #fff;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

@media (max-width: 991px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 575px) {
    .category-grid {
        grid-template-columns: 1fr;
    }
}

.category-card {
    position: relative;
}

.category-card a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.category-card-inner {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    background: #fff;
}

.category-card-inner:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
}

.category-card-img {
    position: relative;
    height: 300px;
    overflow: hidden;
}

.category-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.category-card-inner:hover .category-card-img img {
    transform: scale(1.1);
}

.category-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 30%, rgba(0, 0, 0, 0.6) 100%);
    transition: opacity 0.3s;
}

.category-card-content {
    padding: 30px;
    background: #fff;
}

.category-tag {
    display: inline-block;
    background: #f0f0f0;
    color: #666;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 5px 12px;
    border-radius: 20px;
    margin-bottom: 15px;
}

.category-card-content h3 {
    font-size: 24px;
    font-weight: 700;
    color: #222;
    margin-bottom: 12px;
    transition: color 0.3s;
}

.category-card-inner:hover .category-card-content h3 {
    color: #555;
}

.category-card-content p {
    font-size: 15px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
}

.category-link i {
    transition: transform 0.3s;
}

.category-card-inner:hover .category-link {
    color: #000;
}

.category-card-inner:hover .category-link i {
    transform: translateX(5px);
}

/* Page Header Section */
section.parallax-section.header-section {
    padding: 120px 0 80px;
}

section.parallax-section.header-section .section-title {
    text-align: center;
}

section.parallax-section.header-section .section-title h2 {
    font-size: 42px;
    margin-bottom: 15px;
}

section.parallax-section.header-section .section-title p {
    font-size: 16px;
    margin-bottom: 0;
}

section.parallax-section.header-section .breadcrumb-wrap {
    margin-bottom: 20px;
}

section.parallax-section.header-section .breadcrumb {
    justify-content: center;
}

/* Minimalist Gallery Grid */
.gallery-items.grid-no-pad {
    gap: 30px;
    display: flex;
    justify-content: center;
}

.gallery-items.grid-no-pad .gallery-item {
    flex: 0 0 30%;
    max-width: 30%;
    margin: 0;
}

@media (max-width: 991px) {
    .gallery-items.grid-no-pad .gallery-item {
        flex: 0 0 45%;
        max-width: 45%;
    }
}

@media (max-width: 575px) {
    .gallery-items.grid-no-pad {
        flex-direction: column;
        padding: 20px;
    }

    .gallery-items.grid-no-pad .gallery-item {
        flex: 0 0 100%;
        max-width: 100%;
        margin-bottom: 20px;
    }
}

/* ========================================
   IMAGE GRID & ASPECT RATIO FIXES
   ======================================== */

/* Blog Grid Image Fix */
.blog-media {
    width: 100%;
    aspect-ratio: 3 / 2 !important;
    overflow: hidden;
    background: #f5f5f5 url('/images/logo.png') no-repeat center center;
    background-size: 40px auto;
    position: relative;
    display: block;
}

.blog-media img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.blog-media img[src] {
    opacity: 1;
}

/* Gallery (Products/Projects) Image Fix */
.box-item {
    width: 100%;
    aspect-ratio: 3 / 2 !important;
    overflow: hidden;
    background: #f5f5f5 url('/images/logo.png') no-repeat center center;
    background-size: 40px auto;
    position: relative;
}

.box-item img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.box-item img[src] {
    opacity: 1;
}

/* Category Page Image Fix */
.category-card-img {
    width: 100%;
    aspect-ratio: 3 / 2 !important;
    overflow: hidden;
    background: #f5f5f5 url('/images/logo.png') no-repeat center center;
    background-size: 40px auto;
    position: relative;
}

.category-card-img img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.category-card-img img[src] {
    opacity: 1;
}

/* Ensure masonry items don't jump due to image loading */
.gallery-item {
    min-height: 200px;
}

/* Fixed height for blog titles to prevent text alignment issues */
.blog-text h3 {
    min-height: 48px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 15px;
    line-height: 1.4 !important;
}

.blog-text p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 72px;
    line-height: 1.6 !important;
    margin-bottom: 20px;
}

/* Force equal height for blog posts in grid */
.blog-grid .gallery-item .grid-item-holder {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.blog-grid .post {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.blog-grid .blog-text {
    flex: 1;
}

/* RTL Support */
[dir="rtl"] {
    text-align: right;
}

[dir="rtl"] .text-left {
    text-align: right !important;
}

[dir="rtl"] .hero-item {
    text-align: right !important;
}

[dir="rtl"] .float-btn {
    float: right !important;
    margin-right: 0 !important;
    margin-left: 10px !important;
}

[dir="rtl"] .main-header .logo-holder {
    float: right;
}

[dir="rtl"] .nav-holder {
    float: left;
}

[dir="rtl"] .nav-holder nav li {
    float: right;
}

[dir="rtl"] .nav-holder nav li ul {
    right: 0;
    left: auto;
}

[dir="rtl"] .footer-social {
    float: left;
}

[dir="rtl"] .main-footer .fixed-title {
    left: auto;
    right: 80px;
}

[dir="rtl"] .to-top {
    left: 50px;
    right: auto;
}

[dir="rtl"] .footer-header span {
    float: right;
    margin-right: 0;
    margin-left: 15px;
}

[dir="rtl"] .policy-box p {
    text-align: right;
}

[dir="rtl"] .section-title h2,
[dir="rtl"] .section-title p {
    text-align: center;
}

[dir="rtl"] .breadcrumb li:not(:last-child)::after {
    margin-left: 0;
    margin-right: 10px;
}