/* ========================================
   PORTFOLIO SINGLE PAGE - MATCH PROPERTY WIDTH
   Updated: Same container widths as Property single
======================================== */

:root {
    --color-primary: #5A4F42;
    --color-700: #766C61;
    --color-800: #483F35;
    --color-400: #CCC8C0;
    --color-dropdown-bg: #E8E5DF;
    --color-white: #FFFFFF;
    --color-background: #FAF9F7;
}

/* ========================================
   HERO SECTION - MATCH PROPERTY WIDTH
======================================== */
.portfolio-hero-section {
    padding: 160px 30px 60px; /* ✅ Match Property: 30px padding */
    background: var(--color-background);
    max-width: 1440px; /* ✅ Match Property: 1440px max */
    margin: 0 auto;
    width: 100%;
}

.portfolio-hero-container {
    max-width: 100%; /* ✅ Full width inside section */
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 80px;
}

.portfolio-hero-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.portfolio-title {
    color: var(--color-primary);
    font-size: 36px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    margin: 0;
    line-height: 1.2;
}

.portfolio-hero-badges {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.portfolio-badge {
    padding: 5px 10px;
    background: var(--color-dropdown-bg);
    color: var(--color-primary);
    font-size: 12px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    border-radius: 4px;
}

/* VIEW HOME LINK - ALIGNED WITH BADGES */
.portfolio-view-home-link {
    flex-shrink: 0;
    align-self: flex-end;
}

.view-home-btn {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    color: var(--color-primary);
    font-family: 'Roboto', sans-serif;
    font-size: 18px;
    font-weight: 300;
    text-transform: capitalize;
    transition: all 0.3s ease;
}

.view-home-btn:hover {
    color: var(--color-800);
    transform: translateX(3px);
}

.view-home-text {
    display: block;
}

.view-home-icon {
    font-size: 20px !important;
    display: block !important;
}

/* ========================================
   YOUTUBE VIDEO SECTION - FULL WIDTH
======================================== */
.portfolio-video-section-hero {
    width: 100%;
    max-width: 1440px; /* ✅ Match Property: 1440px max */
    margin: 0 auto;
    padding: 0;
    background: var(--color-white);
}

.portfolio-video-hero-wrapper {
    width: 100%;
    height: 641px;
    position: relative;
    overflow: hidden;
}

/* YouTube Thumbnail Overlay */
.youtube-thumbnail-overlay {
    width: 100%;
    height: 100%;
    position: relative;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.youtube-feature-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* YouTube Play Button */
.youtube-play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 68px;
    height: 48px;
    transition: all 0.3s ease;
    z-index: 10;
}

.youtube-thumbnail-overlay:hover .youtube-play-button {
    transform: translate(-50%, -50%) scale(1.2);
}

/* YouTube Iframe Container */
.youtube-iframe-container {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.youtube-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ========================================
   MAIN CONTENT WRAPPER - MATCH PROPERTY
======================================== */
.portfolio-content-wrapper {
    width: 100%;
    max-width: 1440px; /* ✅ Match Property: 1440px */
    margin: 0 auto;
    padding: 0 101px; /* ✅ Match Property: 101px padding */
}

/* ========================================
   SPECIFICATIONS SECTION - MATCH PROPERTY
======================================== */
.portfolio-specifications-section {
    padding: 80px 0; /* ✅ Top/bottom only */
    background: var(--color-background);
    margin: 0 -101px; /* ✅ Extends to full width like Property */
    padding-left: 101px; /* ✅ Match Property: 101px */
    padding-right: 101px; /* ✅ Match Property: 101px */
    border-bottom: 1px solid var(--color-dropdown-bg);
}

.portfolio-specs-container {
    max-width: 100%; /* ✅ Full width inside padding */
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.portfolio-specs-title {
    color: var(--color-primary);
    font-size: 36px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    margin: 0;
}

.portfolio-specs-table {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 40px;
}

.portfolio-specs-labels,
.portfolio-specs-values {
    display: flex;
    flex-direction: column;
}

.portfolio-spec-label,
.portfolio-spec-value {
    padding: 15px 0;
    color: var(--color-primary);
    font-size: 18px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    line-height: 1.4;
    min-height: 54px;
    display: flex;
    align-items: center;
}

.portfolio-spec-label {
    font-weight: 500;
}

.portfolio-spec-value {
    color: var(--color-700);
}

.portfolio-spec-divider {
    height: 0.5px;
    border: none;
    background: var(--color-primary);
    margin: 0;
}

.portfolio-spec-divider-light {
    height: 0.5px;
    border: none;
    background: var(--color-dropdown-bg);
    margin: 0;
}

/* ========================================
   PHOTO GALLERY SECTION - SMART AUTO-LAYOUT
======================================== */
.portfolio-gallery-section {
    padding: 80px 0 120px;
}

.portfolio-gallery-container {
    max-width: 100%; /* ✅ Full width inside padding */
    margin: 0 auto;
}

.portfolio-gallery-title {
    color: var(--color-primary);
    font-size: 36px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    margin: 0 0 30px 0;
}

.portfolio-gallery-grid {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.portfolio-gallery-image-full {
    width: 100%;
    height: 550px;
    object-fit: cover;
    border-radius: 8px;
}

.portfolio-gallery-row {
    display: flex;
    gap: 30px;
}

.portfolio-gallery-image-half {
    flex: 1;
    width: calc(50% - 15px); /* ✅ Proper half width */
    height: 550px;
    object-fit: cover;
    border-radius: 8px;
}

/* ========================================
   PORTFOLIO GRID CARDS (For catalog page)
======================================== */
.portfolio-project-card {
    background: #FFF;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.portfolio-project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(90, 79, 66, 0.15);
}

.portfolio-project-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

/* Portfolio Image Container */
.portfolio-project-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.portfolio-project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Zoom effect on hover */
.portfolio-project-card:hover .portfolio-project-image img {
    transform: scale(1.1);
}

/* Portfolio Content */
.portfolio-project-content {
    padding: 20px;
}

.portfolio-project-title {
    font-size: 20px;
    font-weight: 500;
    color: #5A4F42;
    margin: 0 0 10px 0;
    font-family: 'Roboto', sans-serif;
}

.portfolio-project-type {
    font-size: 14px;
    color: #766C61;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
}

/* ========================================
   RESPONSIVE
======================================== */
@media (max-width: 1024px) {
    .portfolio-hero-section {
        padding: 100px 40px 60px; /* ✅ Match Property tablet */
    }
    
    .portfolio-hero-container {
        flex-direction: column;
        gap: 30px;
    }
    
    .portfolio-view-home-link {
        align-self: flex-start;
    }
    
    .portfolio-content-wrapper {
        padding: 0 40px; /* ✅ Match Property tablet */
    }
    
    .portfolio-specifications-section {
        margin: 0 -40px;
        padding-left: 40px;
        padding-right: 40px;
    }
    
    .portfolio-specs-table {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .portfolio-gallery-section {
        padding: 60px 0 100px;
    }
    
    .portfolio-gallery-row {
        flex-direction: column;
    }
    
    .portfolio-gallery-image-full,
    .portfolio-gallery-image-half {
        height: 400px;
        width: 100%;
    }
    
    .portfolio-video-hero-wrapper {
        height: 500px;
    }
}

@media (max-width: 768px) {
    .portfolio-hero-section {
        padding: 80px 20px 40px; /* ✅ Match Property mobile */
    }
    
    .portfolio-title,
    .portfolio-specs-title,
    .portfolio-gallery-title {
        font-size: 28px;
    }
    
    .portfolio-content-wrapper {
        padding: 0 20px; /* ✅ Match Property mobile */
    }
    
    .portfolio-specifications-section {
        margin: 0 -20px;
        padding: 60px 20px;
    }
    
    .portfolio-spec-label,
    .portfolio-spec-value {
        font-size: 16px;
        min-height: auto;
    }
    
    .portfolio-gallery-section {
        padding: 60px 0 80px;
    }
    
    .portfolio-gallery-image-full,
    .portfolio-gallery-image-half {
        height: 300px;
    }
    
    .portfolio-video-hero-wrapper {
        height: 400px;
    }
    
    .view-home-btn {
        font-size: 16px;
    }
}



/* ========================================
   FORCE 1440PX MAX-WIDTH - MEDIA QUERY
   Applied only on screens 1200px and above
======================================== */

@media (min-width: 1200px) {
    /* Page Header */
    .page-header .entry-title {
        max-width: 1440px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Site Footer Inner */
    .site-footer .footer-inner {
        max-width: 1440px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Site Header Inner */
    .site-header .header-inner {
        max-width: 1440px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Main Content (NON-Elementor pages only) */
    body:not([class*="elementor-page-"]) .site-main {
        max-width: 1440px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Portfolio Single Page - Force 1440px */
    body.single-portfolio .site-main {
        max-width: 1440px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Portfolio Sections - Force 1440px */
    .portfolio-single,
    .portfolio-hero-section,
    .portfolio-video-section-hero,
    .portfolio-content-wrapper {
        max-width: 1440px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Portfolio Specifications - Full width with padding */
    .portfolio-specifications-section {
        max-width: none !important; /* Allow full width for background */
    }
    
    /* Portfolio Specs Container - Force 1440px content */
    .portfolio-specs-container {
        max-width: 1440px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Portfolio Gallery Container - Force 1440px */
    .portfolio-gallery-container {
        max-width: 1440px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Safe Exclusion: Allow Elementor pages to be full-width */
    body[class*="elementor-page-"] .site-main {
        max-width: none !important;
    }
    
    /* Safe Exclusion: Allow Elementor containers to be full-width */
    .elementor-container,
    .elementor-section,
    .elementor-column {
        max-width: none !important;
    }
}

/* ========================================
   ULTRA-WIDE SCREENS (1920px+)
   Extra enforcement for very wide displays
======================================== */

@media (min-width: 1920px) {
    /* Reinforce 1440px on ultra-wide */
    body.single-portfolio .site-main,
    .portfolio-single,
    .portfolio-hero-section,
    .portfolio-video-section-hero,
    .portfolio-content-wrapper,
    .portfolio-specs-container,
    .portfolio-gallery-container {
        max-width: 1440px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
    
    /* Page structure */
    .page-header .entry-title,
    .site-footer .footer-inner,
    .site-header .header-inner,
    body:not([class*="elementor-page-"]) .site-main {
        max-width: 1440px !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }
}