/* ==========================================================================
   MC BUILDINGS PREMIUM STYLE SHEET
   Design System: Navy Blue & Corporate Sleek
   ========================================================================== */

/* 1. CSS VARIABLES & RESET */
:root {
    /* Color Palette */
    --color-navy-dark: #7487d0; /* Brand brand slate-blue periwinkle color */
    --color-navy-medium: #5a6cb7; /* Rich dark periwinkle hover */
    --color-navy-light: #8e9ee8; /* Slate-blue highlight */
    --color-blue-accent: #7487d0;
    --color-blue-light: #7487d0; /* Slate-blue periwinkle accent */
    --color-blue-glow: rgba(116, 135, 208, 0.15);
    
    --color-text-main: #2b3a4a;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;
    
    --color-bg-light: #f8fafc;
    --color-bg-white: #ffffff;
    --color-bg-card-glass: rgba(255, 255, 255, 0.90);
    
    --color-border-light: rgba(15, 34, 61, 0.08);
    --color-border-glass: rgba(255, 255, 255, 0.5);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px -1px rgba(11, 31, 59, 0.05);
    --shadow-md: 0 10px 25px -5px rgba(11, 31, 59, 0.07), 0 8px 16px -6px rgba(11, 31, 59, 0.05);
    --shadow-lg: 0 20px 40px -15px rgba(11, 31, 59, 0.12), 0 15px 25px -10px rgba(11, 31, 59, 0.06);
    --shadow-glass: 0 8px 32px 0 rgba(11, 31, 59, 0.08);
    
    /* Typography */
    
    /* Animation Speeds */
    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.7s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Layout */
    --border-radius-lg: 0px;
    --border-radius-md: 0px;
    --border-radius-sm: 0px;
}

.about-section *,
.timeline-section *,
.reviews-section *,
.video-gallery-section *,
.modal-overlay * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.about-section,
.timeline-section,
.reviews-section,
.video-gallery-section,
.modal-overlay {
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Base Headings & Links */
.about-section h1, .about-section h2, .about-section h3, .about-section h4, .about-section h5, .about-section h6,
.timeline-section h1, .timeline-section h2, .timeline-section h3, .timeline-section h4, .timeline-section h5, .timeline-section h6,
.reviews-section h1, .reviews-section h2, .reviews-section h3, .reviews-section h4, .reviews-section h5, .reviews-section h6,
.video-gallery-section h1, .video-gallery-section h2, .video-gallery-section h3, .video-gallery-section h4, .video-gallery-section h5, .video-gallery-section h6,
.modal-overlay h1, .modal-overlay h2, .modal-overlay h3, .modal-overlay h4, .modal-overlay h5, .modal-overlay h6 {
    color: var(--color-navy-dark);
    font-weight: 700;
}

.about-section a,
.timeline-section a,
.reviews-section a,
.video-gallery-section a,
.modal-overlay a {
    text-decoration: none;
    color: inherit;
    transition: all var(--transition-fast);
}

.about-section button,
.timeline-section button,
.reviews-section button,
.video-gallery-section button,
.modal-overlay button {
    border: none;
    background: none;
    cursor: pointer;
}

.about-section ul,
.timeline-section ul,
.reviews-section ul,
.video-gallery-section ul,
.modal-overlay ul {
    list-style: none;
}

.msb-container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

/* ==========================================================================
   3. THE MAIN "ABOUT & HERO GALLERY" BLOCK
   ========================================================================== */
.about-section {
    padding: 140px 0 80px 0; /* Clear header space */
    position: relative;
    overflow: hidden;
    background-image: url('img/about-bg-fon.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Backdrop Grid */
.section-bg-grid {
    display: none;
}

.section-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(243, 245, 248, 0.75); /* Semi-transparent layout to reveal the high-end grid */
    pointer-events: none;
    z-index: 1;
}

.about-section .msb-container {
    position: relative;
    z-index: 2;
}

/* Big Heading */
.main-heading {
    font-size: 2.6rem;
    line-height: 1.25;
    margin-bottom: 50px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.section-title-center {
    text-align: center;
    margin-bottom: 12px;
    font-size: 2.4rem;
}

.highlight-navy {
    color: var(--color-navy-medium); /* Dark periwinkle slate */
}

.highlight-blue {
    color: var(--color-blue-light); /* Accent slate-blue #7487d0 */
}

/* Row 2: Gallery Viewer and Glassmorphic Info Card */
.hero-gallery-row {
    display: grid;
    grid-template-columns: 1.25fr 0.75fr;
    gap: 0px;
    margin-bottom: 30px;
    align-items: center;
}

/* Gallery Viewer */
.gallery-viewer {
    background-color: #0f172a; /* Dark slate background to eliminate white color bleeding/flashing during cross-fade transitions */
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 10; /* Taller golden-ratio crop to match the wider container */
    box-shadow: var(--shadow-md);
    z-index: 1;
    border: 1px solid rgba(116, 135, 208, 0.2);
}

.viewer-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.viewer-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.02); /* Clean 2D scale without dynamic GPU composite promotion layer flashing */
    transition: opacity var(--transition-slow), transform var(--transition-slow);
    z-index: 1;
}

.viewer-img.active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.viewer-overlay-label {
    position: absolute;
    bottom: 24px;
    left: 24px;
    z-index: 5;
    background: rgba(11, 31, 59, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 10px 20px;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-bg-white);
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    pointer-events: none;
    transition: all var(--transition-normal);
}

.label-dot {
    width: 8px;
    height: 8px;
    background-color: #22c55e;
    border-radius: 0;
    display: inline-block;
    position: relative;
    z-index: 2;
}

.label-dot::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #22c55e;
    border-radius: 0;
    animation: pulse-ring 1.8s cubic-bezier(0.215, 0.610, 0.355, 1) infinite;
    z-index: -1;
    will-change: transform, opacity;
    transform: translateZ(0);
}

@keyframes pulse-ring {
    0% { transform: scale(0.95); opacity: 0.85; }
    100% { transform: scale(2.8); opacity: 0; }
}

/* Glassmorphism Information Card */
.info-glass-card {
    background: rgba(255, 255, 255, 0.65); /* More translucent for high-end look */
    backdrop-filter: blur(16px) saturate(180%);
    border: 1.5px solid rgba(116, 135, 208, 0.3);
    border-radius: var(--border-radius-lg);
    padding: 35px;
    box-shadow: 0 15px 45px -15px rgba(11, 31, 59, 0.25); /* Deep shadow to separate overlapping elements */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    z-index: 2;
    margin-left: -90px; /* Pull left to overlap the main viewer */
    transform: translateZ(0); /* Hardware accelerate scroll translations */
    will-change: transform;
}

.company-intro {
    font-size: 0.95rem;
    color: var(--color-text-main);
    line-height: 1.6;
    margin-bottom: 25px;
    font-weight: 500;
    border-bottom: 1.5px solid var(--color-border-light);
    padding-bottom: 20px;
}

.benefits-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.benefit-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: var(--border-radius-sm);
    background-color: var(--color-bg-white);
    border: 1px solid rgba(116, 135, 208, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-navy-light);
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.benefit-svg {
    width: 24px;
    height: 24px;
}

.benefit-text {
    display: flex;
    flex-direction: column;
}

.benefit-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--color-navy-dark);
}

.benefit-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Hover benefit item interaction */
.benefit-item:hover .benefit-icon-wrapper {
    background-color: var(--color-navy-dark);
    color: var(--color-bg-white);
    transform: scale(1.08) translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   4. 4-CARD CATEGORY NAVIGATION GRID
   ========================================================================== */
.category-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 35px;
}

.category-card {
    background-color: var(--color-bg-white);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all var(--transition-normal);
    will-change: transform, box-shadow;
    transform: translateZ(0);
    backface-visibility: hidden;
    border: 1px solid rgba(116, 135, 208, 0.2);
}

.card-image-box {
    width: 100%;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    position: relative;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(11, 31, 59, 0) 40%, rgba(11, 31, 59, 0.4) 100%);
    opacity: 0.8;
    transition: opacity var(--transition-normal);
}

.card-footer-bar {
    background-color: rgba(11, 31, 59, 0.88);
    backdrop-filter: blur(10px);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--color-bg-white);
    min-height: 70px;
    transition: background-color var(--transition-normal);
}

.card-title {
    font-size: 0.85rem;
    font-weight: 700;
    line-height: 1.3;
    max-width: 80%;
}

.card-arrow-icon {
    width: 28px;
    height: 28px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.arrow-svg {
    width: 14px;
    height: 14px;
}

/* Category card hover actions */
.category-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(116, 135, 208, 0.4);
}

.category-card:hover .card-img {
    transform: scale(1.1);
}

.category-card:hover .card-overlay {
    opacity: 1;
}

.category-card:hover .card-footer-bar {
    background-color: var(--color-navy-medium);
}

.category-card:hover .card-arrow-icon {
    background-color: var(--color-blue-light);
    transform: translateX(4px);
}

/* Active Category Card State (When clicked and displaying in the main viewer) */
.category-card.active {
    box-shadow: 0 0 0 3px var(--color-navy-dark), var(--shadow-lg);
    transform: translateY(-4px);
}

.category-card.active .card-footer-bar {
    background-color: var(--color-navy-dark);
}

.category-card.active .card-arrow-icon {
    background-color: var(--color-navy-medium);
    transform: rotate(-90deg); /* points up/inwards active */
}

/* ==========================================================================
   5. 4 BIG NUMBERS GRID (STATS)
   ========================================================================== */
.stats-row {
    background-color: var(--color-bg-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    margin-bottom: 25px;
    border: 1px solid rgba(116, 135, 208, 0.25);
    display: flex;
    flex-direction: column;
}

.stats-grid-top {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    width: 100%;
}

.stat-col {
    padding: 30px 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

/* Verticle separators */
.stat-col:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background-color: var(--color-border-light);
}

.stat-content {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--color-navy-dark);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

.stat-sublabel {
    font-size: 0.8rem;
    color: var(--color-blue-light);
    font-weight: 600;
    margin-top: 5px;
    line-height: 1.4;
    transition: color var(--transition-fast);
}

.stat-icon-box {
    width: 48px;
    height: 48px;
    border-radius: 0;
    background-color: var(--color-bg-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-navy-light);
    transition: all var(--transition-normal);
    will-change: transform, background-color, color;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.stat-svg {
    width: 22px;
    height: 22px;
}

/* Stats Hover Effect */
.stat-col:hover {
    background-color: rgba(15, 76, 129, 0.02);
}

.stat-col:hover .stat-icon-box {
    background-color: var(--color-navy-dark);
    color: var(--color-bg-white);
    transform: rotate(360deg) scale(1.05);
}

.stat-col:hover .stat-number {
    color: var(--color-blue-light);
}

.stat-col:hover .stat-sublabel {
    color: var(--color-navy-dark);
}

/* ==========================================================================
   6. SMALL BENEFITS GRID (STRIP - 2 ROWS, NO ICONS)
   ========================================================================== */
.small-benefits-strip {
    display: flex;
    flex-direction: column;
    gap: 32px;
    background: none;
    border: none;
    border-top: 1.5px solid rgba(116, 135, 208, 0.25);
    border-radius: 0px;
    margin-top: 75px;
    padding: 50px 0 0 0; /* Align perfectly with other container items by removing lateral padding */
    position: relative;
    overflow: hidden;
}

.strip-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
    position: relative;
    z-index: 2;
}

.strip-item {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 6px 0;
    transition: all var(--transition-fast);
}

.strip-text {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1.4;
    transition: color var(--transition-fast);
}

.strip-icon-wrapper {
    width: 60px;
    height: 60px;
    border-radius: 0px; /* Completely square, no border-radius */
    background-color: #ffffff; /* Just plain white */
    border: 1.5px solid rgba(116, 135, 208, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-navy-dark);
    margin-right: 24px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast);
}

.strip-svg {
    width: 28px;
    height: 28px;
}

/* Hover effects */
.strip-item:hover .strip-text {
    color: var(--color-blue-light);
}

.strip-item:hover .strip-icon-wrapper {
    background-color: #ffffff;
    color: var(--color-navy-medium);
    transform: scale(1.08) translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   7. PARAMETERS CALCULATOR CTA BAR
   ========================================================================== */
.cta-banner-wrapper {
    position: relative;
    overflow: hidden;
    margin-top: 60px;
    border: 1.5px solid rgba(116, 135, 208, 0.25);
    border-radius: var(--border-radius-lg);
    box-shadow: 
        var(--shadow-sm),
        0 15px 35px -10px rgba(15, 76, 129, 0.05);
}

.cta-banner-blurred-bg {
    position: absolute;
    top: -6px;
    left: -6px;
    right: -6px;
    bottom: -6px;
    background-image: url('img/light_hangar_bg.jpg');
    background-size: cover;
    background-position: center;
    filter: blur(4px) brightness(0.96) contrast(1.01); /* Soft premium blur (4px) to separate the clean dark text while keeping the hangar structures recognizable */
    opacity: 0.95;
    z-index: 0;
    pointer-events: none;
    transform: scale(1.03); /* Prevent blurry borders */
}

.cta-banner-bar {
    background-color: rgba(235, 237, 242, 0.15); /* Maximum translucent glass layer */
    background-image: 
        linear-gradient(135deg, rgba(235, 237, 242, 0.15) 0%, rgba(243, 245, 248, 0.2) 100%),
        linear-gradient(rgba(116, 135, 208, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(116, 135, 208, 0.04) 1px, transparent 1px);
    background-size: cover, 20px 20px, 20px 20px;
    backdrop-filter: none; /* Let the sharp background details show completely crisp */
    padding: 35px 50px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Subtle Technical SVG Hangar Watermark */
.cta-watermark-svg {
    position: absolute;
    right: 280px;
    bottom: -15px;
    width: 260px;
    height: 130px;
    color: var(--color-navy-light);
    opacity: 0.12;
    pointer-events: none;
    z-index: 1;
}

.cta-left-content {
    display: flex;
    align-items: center;
    gap: 25px;
    z-index: 2;
    max-width: 65%;
}

.cta-text-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cta-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #000000 !important; /* Deep dark navy blue for ultimate readability directly on the light image */
    line-height: 1.3;
    letter-spacing: -0.2px;
}

.cta-subtitle {
    font-size: 0.88rem;
    color: #000000 !important; /* Crisp dark steel gray for legibility */
    font-weight: 600; /* Robust weight to make it perfectly readable */
}

/* Badges wrapper to fill empty horizontal space */
.cta-badges-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 2;
    flex-shrink: 0;
}

.cta-badge-pill {
    background-color: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(116, 135, 208, 0.22);
    color: var(--color-navy-dark);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 6px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: var(--shadow-sm);
    white-space: nowrap;
}

.badge-icon {
    width: 14px;
    height: 14px;
    color: var(--color-navy-medium);
}

.cta-button-box {
    z-index: 2;
    flex-shrink: 0;
}

.cta-navy-button {
    background-color: #7487d0 !important; /* Original brand color */
    color: var(--color-bg-white) !important;
    padding: 16px 36px;
    border-radius: var(--border-radius-sm);
    display: flex;
    align-items: center;
    gap: 15px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.2px;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-normal);
}

.btn-arrow {
    width: 16px;
    height: 16px;
    transition: transform var(--transition-fast);
}

/* Button & Banner hovers */
.cta-banner-bar:hover .cta-icon-box {
    transform: scale(1.05) rotate(-3deg);
    box-shadow: var(--shadow-md);
}

.cta-navy-button:hover {
    background-color: #5a6cb7 !important; /* Darker blue on hover */
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.cta-navy-button:hover .btn-arrow {
    transform: translateX(6px);
}

.cta-navy-button:active {
    transform: translateY(0);
}

/* ==========================================================================
   7.5 PREMIUM RESPONSIVE VIDEO PLAYER (MOCKUP WINDOW - LIGHT THEME)
   ========================================================================== */
.video-window-frame {
    width: 100%;
    background: #edeef0; /* Optimized solid background to eliminate severe scroll lag */
    border: 1.5px solid rgba(116, 135, 208, 0.25);
    box-shadow: 
        var(--shadow-sm),
        0 10px 30px -10px rgba(15, 76, 129, 0.05); /* Soft premium shadow */
    border-radius: 0px; /* Sharp corporate corners */
    overflow: hidden;
    position: relative;
    transition: transform var(--transition-normal), box-shadow var(--transition-normal), border-color var(--transition-normal);
    transform: translateZ(0); /* Hardware accelerate scroll translations */
    will-change: transform;
}

.video-window-frame:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 
        var(--shadow-md),
        0 15px 35px -5px rgba(116, 135, 208, 0.15); /* Soft brand focus shadow on hover */
    border-color: rgba(116, 135, 208, 0.45);
}

/* Window Header Bar (Light Theme) */
.video-window-header {
    height: 44px;
    background: #ebedf2; /* Optimized solid background to eliminate severe scroll lag */
    border-bottom: 1.5px solid rgba(116, 135, 208, 0.2);
    display: flex;
    align-items: center;
    justify-content: center; /* Center header content */
    padding: 0 24px;
    user-select: none;
}

.window-title {
    font-size: 0.82rem;
    font-weight: 800;
    color: var(--color-navy-dark);
    letter-spacing: 1.2px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin: 0 auto; /* Perfect centering */
}

/* The actual player stays responsive inside the frame */
.video-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background-color: #edeef0;
}

.video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Luxury Video Cover Overlay */
.video-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 5;
    cursor: pointer;
    overflow: hidden;
    background-color: #000;
}

.video-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.95;
    transition: transform var(--transition-slow), opacity var(--transition-normal);
}

.video-cover:hover .video-cover-img {
    transform: scale(1.03);
    opacity: 0.85;
}

/* Premium Pulsing Play Button */
.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background-color: rgba(116, 135, 208, 0.9);
    border: 2px solid #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(15, 76, 129, 0.35);
    z-index: 6;
    transition: all var(--transition-normal);
}

.play-icon {
    width: 32px;
    height: 32px;
    color: #ffffff;
    fill: #ffffff;
    margin-left: 4px; /* Center triangular play symbol offset */
    transition: transform var(--transition-normal);
}

.video-cover:hover .video-play-btn {
    background-color: var(--color-navy-dark);
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 15px 45px rgba(116, 135, 208, 0.55);
}

.video-cover:hover .play-icon {
    transform: scale(1.1);
}

.video-showcase-container {
    margin-top: 0 !important;
    background-color: #edeef0 !important;
    padding: 40px 0;
}

@media (max-width: 992px) {
    .video-showcase-container {
        margin-top: 0 !important;
        padding: 0 10px;
    }
    .window-title {
        font-size: 0.72rem;
        letter-spacing: 0.8px;
    }
}

/* ==========================================================================
   8. ESTIMATION MODAL DIALOG (POPUP)
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 31, 59, 0.45);
    backdrop-filter: blur(6px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-normal);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-box {
    background-color: var(--color-bg-white);
    width: 100%;
    max-width: 500px;
    border-radius: var(--border-radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    position: relative;
    transform: translateY(30px) scale(0.95);
    transition: all var(--transition-normal);
    border: 1px solid rgba(116, 135, 208, 0.3);
}

.modal-overlay.active .modal-box {
    transform: translateY(0) scale(1);
}

.modal-close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 2rem;
    color: var(--color-text-muted);
    line-height: 1;
    padding: 5px;
}

.modal-close-btn:hover {
    color: var(--color-navy-dark);
}

.modal-title {
    font-size: 1.35rem;
    font-weight: 800;
    margin-bottom: 10px;
}

.modal-desc {
    font-size: 0.88rem;
    color: var(--color-text-muted);
    margin-bottom: 25px;
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-navy-dark);
}

.form-group input,
.form-group select {
    padding: 12px 16px;
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-sm);
    font-family: inherit;
    font-size: 0.9rem;
    background-color: var(--color-bg-light);
    outline: none;
    transition: all var(--transition-fast);
}

.form-group input:focus,
.form-group select:focus {
    border-color: var(--color-blue-light);
    background-color: var(--color-bg-white);
    box-shadow: 0 0 0 3px var(--color-blue-glow);
}

.flex-row {
    display: flex;
    gap: 15px;
}

.modal-submit-btn {
    background-color: var(--color-navy-dark);
    color: var(--color-bg-white);
    font-weight: 700;
    font-size: 0.95rem;
    padding: 14px;
    border-radius: var(--border-radius-sm);
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    margin-top: 10px;
}

.modal-submit-btn:hover {
    background-color: var(--color-blue-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   9. RESPONSIVE MEDIA QUERIES
   ========================================================================== */

/* Tablet Screens (under 1200px) */
@media (max-width: 1200px) {
    .msb-container {
        padding: 0 30px;
    }
    
    .main-heading {
        font-size: 2.2rem;
    }
    
    .hero-gallery-row {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 0px;
    }
    
    .info-glass-card {
        padding: 25px;
        margin-left: -50px; /* Reduce overlap slightly for medium screens */
    }
    
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .stats-grid-top {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .stat-col:nth-child(2)::after {
        display: none; /* Hide second border */
    }
    
    .small-benefits-strip {
        padding: 24px 30px;
    }

    .strip-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
}

/* Low-res Tablet / High-res Mobile (under 992px) */
@media (max-width: 992px) {
    .section-title-center {
        font-size: 1.8rem !important;
    }
    
    .nav-menu {
        display: none; /* In production: add mobile sliding drawer */
    }
    
    .mobile-toggle {
        display: flex;
    }
    
    .hero-gallery-row {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .gallery-viewer {
        aspect-ratio: 16 / 9.5;
    }

    .info-glass-card {
        margin-left: 0px;
    }
    
    .cta-banner-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 25px;
        padding: 30px;
    }
    
    .cta-button-box {
        width: 100%;
    }
    
    .cta-navy-button {
        width: 100%;
        justify-content: center;
    }
}

/* Mobile Screens (under 640px) */
@media (max-width: 640px) {
    .section-title-center {
        font-size: 1.35rem !important;
        line-height: 1.35 !important;
        padding: 0 15px !important;
    }
    
    .msb-container {
        padding: 0 20px;
    }
    
    .main-header {
        height: 70px;
    }
    
    .header-container {
        height: 70px;
        padding: 0 20px;
    }
    
    .cta-header-btn {
        display: none; /* Simplify header for mobile screen space */
    }
    
    .logo {
        font-size: 1.15rem;
    }
    
    .about-section {
        padding: 100px 0 60px 0;
    }
    
    .main-heading {
        font-size: 1.6rem;
        margin-bottom: 30px;
    }
    
    .gallery-viewer {
        aspect-ratio: 4 / 3; /* Taller on mobile for better viewing */
    }
    
    .viewer-overlay-label {
        bottom: 16px;
        left: 16px;
        padding: 6px 14px;
        font-size: 0.75rem;
    }
    
    .category-grid {
        grid-template-columns: 1fr; /* Single column category cards */
        gap: 15px;
    }
    
    .stats-grid-top {
        grid-template-columns: 1fr; /* Single column stats */
    }
    
    .stat-col:not(:last-child)::after {
        display: none;
    }
    
    .stat-col {
        padding: 20px;
        border-bottom: 1px solid var(--color-border-light);
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .small-benefits-strip {
        padding: 20px;
    }

    .strip-row {
        grid-template-columns: 1fr; /* Single column benefits list */
        gap: 10px;
    }
    
    .strip-item {
        padding: 6px 0;
    }
    
    .cta-left-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .cta-title {
        font-size: 1rem;
    }
    
    .cta-subtitle {
        font-size: 0.8rem;
    }
    
    .modal-box {
        padding: 25px 20px;
    }
}


/* ==========================================================================
   10. TIMELINE / REAL CASE STUDY BLOCK
   ========================================================================== */
.timeline-section {
    padding: 80px 0;
    position: relative;
    overflow: hidden;
    background-image: url('img/timeline-bg-fon.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.timeline-bg-wrapper {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    pointer-events: none;
    z-index: 1;
}

/* Very subtle blueprint grid */
.timeline-blueprint-grid {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(rgba(15, 76, 129, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 76, 129, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

.timeline-blueprint-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(243, 245, 248, 0.75); /* Soft, consistent geometric grid overlay */
}

.timeline-section .msb-container {
    position: relative;
    z-index: 2;
    max-width: 1600px; /* Force wide container for 1-in-1 design */
    width: 100%;
    margin: 0 auto;
    padding: 0 40px; /* Matched to page standard container padding for perfect alignment */
}

/* Header */
.timeline-header {
    text-align: center;
    margin-bottom: 60px;
}

.timeline-main-heading {
    font-size: 2.2rem;
    line-height: 1.25;
    margin-bottom: 12px;
    font-weight: 800;
    color: var(--color-navy-dark);
}

.timeline-subheading {
    font-size: 1.05rem;
    color: #64748b;
    font-weight: 500;
}

/* Timeline Grid Layout */
.timeline-grid {
    display: grid;
    /* 7 columns of exactly equal width */
    grid-template-columns: repeat(7, 1fr);
    grid-template-rows: auto 45px 1px 45px auto;
    gap: 0 24px; /* Increased horizontal gap for maximum whitespace ("воздух") */
    position: relative;
    width: 100%;
}

/* Individual Cards */
.timeline-card {
    background: #fff;
    border: 1.5px solid rgba(116, 135, 208, 0.25); /* Subtle border */
    border-radius: 0; /* Sharp corners */
    padding: 15px 15px 0 15px; /* Compact padding to scale down */
    width: 100%;
    height: 280px; /* Scaled down height (from 320px) */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    gap: 8px; /* Tighter gap */
    box-shadow: 0 8px 24px rgba(15, 76, 129, 0.04);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s ease;
    z-index: 3;
}

.timeline-card.visible:hover {
    transform: translateY(calc(var(--col-offset, 0px) - 12px)) scale(1.025);
    border-color: var(--color-navy-light);
    box-shadow: 0 20px 40px rgba(15, 76, 129, 0.14);
    z-index: 15; /* Keep hovered card stacked above surrounding visual elements */
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

.card-text-only {
    height: auto;
    min-height: 120px; /* Scaled down from 140px */
    padding-bottom: 15px;
    align-self: end; /* Aligns card to the bottom of the row so it touches the connector line! */
}

.card-icon-only {
    height: auto;
    min-height: 120px; /* Scaled down from 140px */
    padding-bottom: 15px;
    align-self: end; /* Aligns card to the bottom of the row so it touches the connector line! */
}

.card-icon-flat {
    margin-top: auto; /* Push to bottom of the card content */
    padding-top: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Typography in cards */
.card-number {
    font-size: 0.72rem;
    font-weight: 800;
    color: #fff;
    background-color: var(--color-navy-medium);
    width: 24px; /* Scaled down from 28px */
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0; /* Square badge */
    margin-bottom: 1px;
    flex-shrink: 0;
}

.card-date {
    font-size: 0.88rem; /* Scaled down from 0.95rem */
    font-weight: 800;
    color: var(--color-navy-dark);
    line-height: 1.2;
}

.card-desc {
    font-size: 0.75rem; /* Scaled down from 0.8rem */
    color: #4a5568;
    font-weight: 500;
    line-height: 1.35;
}

/* Image Wrappers */
.card-img-wrapper {
    margin: auto -15px 0 -15px; /* Pull to bottom edges */
    width: calc(100% + 30px);
    height: 110px; /* Scaled down from 140px */
    overflow: hidden;
    position: relative;
    border-top: 1px solid rgba(15, 76, 129, 0.1);
}

/* Premium white fade fog gradient overlay ("дымка") for smooth picture-to-text transitions */
.card-img-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 55px; /* Increased from 35px for a much softer transition */
    background: linear-gradient(to bottom, #ffffff 0%, rgba(255, 255, 255, 0.8) 30%, rgba(255, 255, 255, 0) 100%);
    z-index: 2;
    pointer-events: none;
}

.card-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Soft Slate-Blue monochrome filter (much less acidic, muted, and premium) */
    filter: grayscale(1) sepia(1) hue-rotate(190deg) saturate(1.5) brightness(0.9) contrast(1.0);
}

/* Icon Box */
.card-icon-wrapper {
    margin: auto -15px 0 -15px;
    width: calc(100% + 30px);
    height: 55px; /* Scaled down from 90px */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f8fafc;
    border-top: 1px solid rgba(15, 76, 129, 0.1);
}

.card-icon-wrapper img {
    width: 24px; /* Scaled down from 32px */
    height: 24px;
    object-fit: contain;
    filter: invert(24%) sepia(51%) saturate(2338%) hue-rotate(193deg) brightness(97%) contrast(98%);
}

/* Tall Final Card (10) - Taller, wider and visually prominent! */
.card-tall {
    height: 320px; /* Taller than standard 280px photo cards! */
    width: calc(100% + 24px); /* Wider than other cards to overflow columns slightly */
    margin-left: -12px; /* Center horizontally in its column */
    z-index: 10; /* Make it stack above neighboring items */
    padding: 0; /* Full bleed */
    border: 2px solid var(--color-navy-medium);
    gap: 0; /* Remove flex gap to keep photo and footer perfectly flush! */
    box-shadow: 0 12px 36px rgba(15, 76, 129, 0.12);
    --col-offset: -40px !important; /* Shift Card 10 slightly higher on the wave! */
}

.tall-header {
    padding: 15px 15px 0 15px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.card-tall .card-img-wrapper {
    margin: auto 0 0 0; /* Add top-auto margin to push it flush to the footer! */
    width: 100%;
    height: 140px; /* Scaled up height (from 110px) to match the larger card! */
    border-top: 1px solid rgba(15, 76, 129, 0.1);
    border-bottom: none;
}

.tall-footer {
    background-color: var(--color-navy-medium);
    color: #fff;
    padding: 10px 15px; /* Scaled down padding */
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.78rem; /* Scaled down from 0.85rem */
    font-weight: 600;
    margin-top: 0; /* Remove margin-top: auto to keep it flush with the photo! */
}

.cup-svg {
    width: 16px; /* Scaled down from 20px */
    height: 16px;
    flex-shrink: 0;
}

/* --- CONNECTORS AND AXIS --- */
.axis-line {
    width: 100%;
    height: 40px; /* Moderate wave height */
    align-self: center; /* Center vertically inside row 3 */
    overflow: visible;
    z-index: 1;
}

.connector-cell {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
}

.top-connector {
    justify-content: flex-end; /* Line comes down, dot at bottom */
}

.bottom-connector {
    justify-content: flex-start; /* Dot at top, line goes down */
}

.dashed-line {
    width: 1px;
    height: 100%;
    background-image: linear-gradient(to bottom, var(--color-navy-medium) 50%, transparent 50%);
    background-size: 1px 8px;
    opacity: 0.5;
}

.dot {
    width: 10px;
    height: 10px;
    background: #fff;
    border: 2px solid var(--color-navy-medium);
    border-radius: 0; /* Square dot */
    flex-shrink: 0;
    position: absolute;
    /* Negative margin to sit exactly on the axis */
}

.top-connector .dot {
    bottom: -5px; 
}

.bottom-connector .dot {
    top: -5px;
}

/* Disclaimer */
.timeline-disclaimer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 50px;
    color: #64748b;
    font-size: 0.8rem;
    font-weight: 500;
}

.clock-svg {
    width: 16px;
    height: 16px;
    color: var(--color-navy-light);
}

/* Responsive Scaling for Desktop to fit all cards without wrapping */
@media (max-width: 1300px) {
    .timeline-section .msb-container { padding: 0 10px; }
    .timeline-card { padding: 15px 15px 0 15px; height: 300px; }
    .card-img-wrapper { margin: auto -15px 0 -15px; width: calc(100% + 30px); }
    .card-icon-wrapper { margin: auto -15px 0 -15px; width: calc(100% + 30px); }
    .tall-header { padding: 15px; }
    .tall-footer { padding: 12px 15px; }
    .card-number { width: 24px; height: 24px; font-size: 0.75rem; }
    .card-date { font-size: 0.85rem; }
    .card-desc { font-size: 0.75rem; }
}

@media (max-width: 992px) {
    /* Fallback to vertical stack on tablets and mobile */
    .timeline-grid {
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    .timeline-grid > div {
        grid-column: auto !important;
        grid-row: auto !important;
        transform: none !important;
        align-self: stretch !important;
    }

    .axis-line, .connector-cell {
        display: none !important;
    }

    .timeline-card {
        height: auto !important;
        min-height: unset !important;
        padding: 20px !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }
    
    .card-text-only {
        min-height: unset !important;
        padding-bottom: 20px !important;
    }

    .card-icon-only {
        min-height: unset !important;
        padding-bottom: 20px !important;
    }

    .timeline-card .card-img-wrapper {
        position: relative !important;
        margin: 10px -20px -20px -20px !important;
        width: calc(100% + 40px) !important;
        height: 180px !important;
    }

    .card-tall {
        padding: 0 !important;
        margin-left: 0 !important;
        width: 100% !important;
        gap: 0 !important; /* Eliminate flex gap which renders as a white horizontal bar */
    }

    .card-tall .tall-header {
        padding: 20px 20px 10px 20px !important;
        gap: 8px !important;
    }

    .card-tall .card-img-wrapper {
        margin: 10px 0 0 0 !important;
        width: 100% !important;
        height: 180px !important;
    }

    .card-tall .tall-footer {
        margin-top: 0 !important;
        padding: 15px 20px !important;
    }

    /* Chronological order on mobile */
    .timeline-card[style*="grid-column: 1"][style*="grid-row: 1"] { order: 1; }
    .timeline-card[style*="grid-column: 2"][style*="grid-row: 1"] { order: 2; }
    .timeline-card[style*="grid-column: 3"][style*="grid-row: 1"] { order: 3; }
    .timeline-card[style*="grid-column: 4"][style*="grid-row: 1"] { order: 4; }
    .timeline-card[style*="grid-column: 5"][style*="grid-row: 1"] { order: 5; }
    .timeline-card[style*="grid-column: 6"][style*="grid-row: 1"] { order: 6; }
    .timeline-card[style*="grid-column: 1"][style*="grid-row: 5"] { order: 7; }
    .timeline-card[style*="grid-column: 2"][style*="grid-row: 5"] { order: 8; }
    .timeline-card[style*="grid-column: 3"][style*="grid-row: 5"] { order: 9; }
    .timeline-card[style*="grid-column: 7"] { order: 10; }

    .timeline-disclaimer {
        padding: 0 15px !important;
        text-align: center !important;
        flex-direction: column !important;
        gap: 8px !important;
        line-height: 1.4 !important;
        margin-top: 30px !important;
    }
    .clock-svg {
        width: 20px !important;
        height: 20px !important;
        margin-bottom: 2px !important;
    }
}

/* --- SCROLL ENTRANCE ANIMATIONS & WAVE COLUMN OFFSETS --- */
.timeline-grid > .timeline-card[style*="grid-column: 1"],
.timeline-grid > .connector-cell[style*="grid-column: 1"],
.timeline-grid > .timeline-card[style*="grid-column: 3"],
.timeline-grid > .connector-cell[style*="grid-column: 3"],
.timeline-grid > .timeline-card[style*="grid-column: 5"],
.timeline-grid > .connector-cell[style*="grid-column: 5"],
.timeline-grid > .timeline-card[style*="grid-column: 7"],
.timeline-grid > .connector-cell[style*="grid-column: 7"] {
    --col-offset: -15px; /* Physical wave upward shift for odd columns */
}

.timeline-grid > .timeline-card[style*="grid-column: 2"],
.timeline-grid > .connector-cell[style*="grid-column: 2"],
.timeline-grid > .timeline-card[style*="grid-column: 4"],
.timeline-grid > .connector-cell[style*="grid-column: 4"],
.timeline-grid > .timeline-card[style*="grid-column: 6"],
.timeline-grid > .connector-cell[style*="grid-column: 6"] {
    --col-offset: 15px; /* Physical wave downward shift for even columns */
}

.timeline-card, .connector-cell {
    opacity: 0;
    transform: translateY(calc(30px + var(--col-offset, 0px))) translateZ(0);
    backface-visibility: hidden;
    will-change: transform, opacity;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-card.visible, .connector-cell.visible {
    opacity: 1;
    transform: translateY(var(--col-offset, 0px)) translateZ(0);
}

.axis-line {
    opacity: 0;
    transform: scaleX(0);
    transform-origin: left;
    transition: opacity 1.2s ease, transform 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.axis-line.visible {
    opacity: 0.5;
    transform: scaleX(1);
}

/* --- PREMIUM FINISH CARD HOVER EFFECTS --- */
.card-tall {
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.5s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.5s ease;
}

.card-tall.visible:hover {
    transform: translateY(calc(var(--col-offset, 0px) - 14px)) scale(1.03);
    border-color: var(--color-navy-light);
    box-shadow: 0 25px 50px -12px rgba(15, 76, 129, 0.25), 0 0 0 3px rgba(142, 158, 232, 0.3);
    z-index: 20;
    transition: transform 0.25s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.25s ease, border-color 0.25s ease;
}

/* ==========================================================================
   11. REVIEWS / TESTIMONIALS SECTION (PREMIUM OVERLAPPING GRID LAYOUT)
   ========================================================================== */
.reviews-section {
    padding: 70px 0;
    position: relative;
    overflow: hidden;
    background-image: url('img/review-fon.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border-top: 1px solid var(--color-border-light);
}

.reviews-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255, 255, 255, 0.05); /* Soft white veil to ensure blueprint clarity */
    pointer-events: none;
    z-index: 1;
}

.reviews-section .msb-container {
    position: relative;
    z-index: 2;
    max-width: 1600px;
    width: 100%;
}

.reviews-header {
    text-align: center;
    margin-bottom: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.reviews-badge-top {
    display: inline-block;
    padding: 6px 16px;
    background-color: rgba(116, 135, 208, 0.15);
    color: var(--color-navy-medium);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    border-radius: 0;
    margin-bottom: 20px;
}

.reviews-subheading {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    font-weight: 500;
    max-width: 700px;
    margin: 12px auto 0 auto;
}

/* Staggered Overlapping Cards Grid */
.reviews-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px 50px; /* Vertical and horizontal gap between cards */
    width: 100%;
    margin-bottom: 60px;
}

.reviews-grid > .review-card:last-child {
    grid-column: 1 / -1;
}

.review-card {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    opacity: 0;
    transform: translateY(30px) translateZ(0);
    backface-visibility: hidden;
    will-change: transform, opacity;
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.review-card.visible {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

/* Portrait Image Wrapper */
.review-photo-wrapper {
    width: 200px; /* Scaled up from 180px */
    height: 270px; /* Scaled up from 240px */
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(15, 76, 129, 0.08);
    flex-shrink: 0;
    z-index: 2;
    position: relative;
    border: 1.5px solid rgba(116, 135, 208, 0.25);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Card 2 smaller photo override */
.review-card.small-photo .review-photo-wrapper {
    width: 185px; /* Wider and more balanced aspect ratio */
    height: 235px;
}

.review-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Text Bubble Box */
.review-bubble-box {
    background: #ffffff;
    border-radius: 0;
    box-shadow: 0 12px 35px rgba(15, 76, 129, 0.04);
    padding: 35px 35px 30px 35px;
    z-index: 1;
    flex-grow: 1;
    position: relative;
    min-height: 210px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border: 1.5px solid rgba(116, 135, 208, 0.25);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s ease;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Layout Offsets & Overlaps */
.review-card.photo-left .review-bubble-box {
    margin-left: -40px;
    padding-left: 65px; /* Creates clearance for the left photo */
}

.review-card.photo-right {
    flex-direction: row-reverse;
}

.review-card.photo-right .review-bubble-box {
    margin-right: -40px;
    padding-right: 65px; /* Creates clearance for the right photo */
}

/* Double Quote Symbol */
.review-quote-wrapper {
    margin-bottom: 12px;
}

.review-quote-svg {
    width: 28px;
    height: 20px;
}

/* Testimonial Text */
.review-body-text {
    font-size: 0.86rem;
    color: #4a5568;
    line-height: 1.6;
    font-weight: 500;
    margin-bottom: 20px;
}

/* Testimonial Meta/Signature */
.review-signature {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: auto; /* Push signature to bottom */
}

.review-client-name {
    font-size: 0.95rem;
    font-weight: 800;
    color: var(--color-navy-dark);
}

.review-client-title {
    font-size: 0.76rem;
    color: var(--color-text-muted);
    font-weight: 600;
}

/* Footer MSB Logo */
.reviews-logo-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
}

.msb-logo-svg {
    width: 240px;
    height: auto;
    opacity: 0.95;
    transition: transform 0.4s ease;
}

.msb-logo-svg:hover {
    transform: scale(1.03);
}

/* High Fidelity Hover Interactions */
.review-card:hover .review-photo-wrapper {
    transform: scale(1.02) translateY(-4px);
    box-shadow: 0 15px 35px rgba(15, 76, 129, 0.15);
    border-color: rgba(116, 135, 208, 0.5);
}

.review-card:hover .review-photo {
    transform: scale(1.05);
}

.review-card:hover .review-bubble-box {
    transform: translateY(-2px);
    box-shadow: 0 15px 40px rgba(15, 76, 129, 0.08);
    border-color: rgba(116, 135, 208, 0.5);
}

/* Custom Review Card Aspect Ratios */
.review-card.tall-card .review-photo-wrapper {
    height: 360px; /* Portrait stretch - scaled up from 320px */
}

.review-card.alabuga-card .review-photo-wrapper {
    width: 270px; /* Scaled up from 240px */
    height: 180px; /* Landscape aspect ratio - scaled up from 160px */
    background-color: #ffffff; /* Solid white background behind transparent logo */
    padding: 15px; /* Frame padding around the logo */
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(15, 76, 129, 0.08);
    align-self: center;
    margin-bottom: 10px;
}

.review-card.alabuga-card .review-photo {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Contain the transparent logo nicely */
}

.review-card.alabuga-card {
    align-items: stretch;
    min-height: 260px;
}

.review-card.alabuga-card.photo-left .review-bubble-box {
    margin-left: -50px;
    padding-left: 75px;
    min-height: 260px;
    justify-content: flex-start;
    padding-top: 35px;
}

/* Adaptive Responsiveness */
@media (max-width: 992px) {
    .reviews-grid {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        margin-top: 20px !important;
    }
    
    .reviews-grid > .review-card:last-child {
        grid-column: auto !important;
    }
    
    .review-card, .review-card.photo-right {
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 0 !important; /* Full bleed photo at top */
        background: #ffffff !important;
        border: 1.5px solid rgba(116, 135, 208, 0.2) !important;
        box-shadow: var(--shadow-sm) !important;
        margin-top: 0 !important;
        gap: 0 !important;
    }
    
    .review-photo-wrapper,
    .review-card.photo-right .review-photo-wrapper {
        position: static !important;
        width: 100% !important;
        height: 280px !important;
        margin: 0 !important;
        box-shadow: none !important;
        border: none !important;
        border-bottom: 1.5px solid rgba(116, 135, 208, 0.18) !important;
        overflow: hidden !important;
    }
    
    .review-photo {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center top !important; /* Focuses on head/face instead of torso */
    }
    
    /* Alabuga card landscape logo layout on mobile */
    .review-card.alabuga-card .review-photo-wrapper {
        height: 140px !important;
        background-color: #ffffff !important;
        padding: 24px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .review-card.alabuga-card .review-photo {
        object-fit: contain !important;
        max-width: 100% !important;
        max-height: 100% !important;
    }
    
    .review-bubble-box,
    .review-card.photo-left .review-bubble-box,
    .review-card.photo-right .review-bubble-box,
    .review-card.alabuga-card.photo-left .review-bubble-box {
        display: flex !important;
        flex-direction: column !important;
        padding: 24px !important;
        margin: 0 !important; /* Reset all margins from desktop! */
        background: none !important;
        border: none !important;
        box-shadow: none !important;
        gap: 12px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
    
    /* Restore signature periwinkle quotes on mobile, flowing between title and body */
    .review-quote-wrapper {
        display: block !important;
        margin: 4px 0 !important;
        order: 2 !important; /* Between signature and quote body text */
        opacity: 0.85 !important;
    }
    
    .review-body-text {
        font-size: 0.88rem !important;
        line-height: 1.55 !important;
        color: var(--color-text-main) !important;
        margin: 0 !important; /* Reset text margins */
        padding: 0 !important;
        order: 3 !important; /* Under signature and quote wrapper */
    }
    
    .review-signature {
        display: flex !important;
        flex-direction: column !important;
        gap: 4px !important;
        margin: 0 !important; /* Reset signature margins */
        padding: 0 !important;
        align-self: flex-start !important;
        order: 1 !important; /* Above review body */
    }
    
    .review-client-name {
        font-size: 0.98rem !important;
        font-weight: 800 !important;
        color: var(--color-navy-dark) !important;
    }
    
    .review-client-title {
        font-size: 0.78rem !important;
        color: var(--color-text-muted) !important;
        font-weight: 600 !important;
        line-height: 1.4 !important;
    }
}

/* ==========================================================================
   12. NEW VIDEO GALLERY SECTION
   ========================================================================== */
.video-gallery-section {
    padding: 100px 0;
    position: relative;
    overflow: hidden;
    background-color: #f8fafc;
    border-top: 1.5px solid rgba(116, 135, 208, 0.25);
}

/* Background blueprint styling */
.video-gallery-bg-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

.video-gallery-blueprint-grid {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(rgba(116, 135, 208, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(116, 135, 208, 0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

.video-gallery-blueprint-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 50% 50%, rgba(248, 250, 252, 0.3) 0%, #f8fafc 100%);
}

.video-gallery-section .msb-container {
    position: relative;
    z-index: 2;
}

.video-gallery-header {
    margin-bottom: 50px;
    text-align: center;
}

.video-gallery-subheading {
    font-size: 1.05rem;
    color: var(--color-text-muted);
    max-width: 700px;
    margin: 12px auto 0 auto;
    font-weight: 500;
}

/* 4-column Grid */
.video-gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
}

.video-gallery-card {
    background: #ffffff; /* Crisp high-contrast background to replace expensive backdrop-filter scroll lag */
    border: 1.5px solid rgba(116, 135, 208, 0.2);
    border-radius: 0px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal);
    transform: translateZ(0); /* Hardware accelerate scroll translations */
    backface-visibility: hidden;
    will-change: transform, box-shadow;
}

.video-gallery-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg), 0 10px 30px rgba(15, 76, 129, 0.06);
    border-color: rgba(116, 135, 208, 0.45);
    background: rgba(255, 255, 255, 0.85);
}

/* Premium Light Video Window Frame inside card */
.gallery-video-frame {
    background-color: #ffffff;
    border-bottom: 1.5px solid rgba(116, 135, 208, 0.15);
    position: relative;
    width: 100%;
}

.gallery-video-header {
    height: 38px;
    background-color: #f8fafc;
    border-bottom: 1px solid rgba(15, 34, 61, 0.06);
    display: flex;
    align-items: center;
    padding: 0 16px;
    gap: 8px;
}

.gallery-video-dot {
    width: 8px;
    height: 8px;
    background-color: var(--color-navy-light);
    border-radius: 0px;
}

.gallery-video-title {
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--color-navy-dark);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Video Player Wrapper */
.gallery-video-player-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background-color: #000000;
}

.gallery-video-player-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Cover Overlay */
.gallery-video-cover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--transition-normal);
}

.gallery-video-cover-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* Play Button */
.gallery-video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 52px;
    height: 52px;
    border-radius: 0px; /* Sharp engineering corners */
    background: rgba(11, 31, 59, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-normal);
    z-index: 3;
}

.gallery-play-icon {
    width: 20px;
    height: 20px;
    fill: currentColor;
    margin-left: 2px;
    transition: transform var(--transition-fast);
}

/* Card Hover Triggers */
.video-gallery-card:hover .gallery-video-cover-img {
    transform: scale(1.06);
}

.video-gallery-card:hover .gallery-video-play-btn {
    background: var(--color-navy-dark);
    color: #ffffff;
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 6px 20px rgba(116, 135, 208, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
}

.gallery-video-cover:hover .gallery-video-play-btn {
    background: var(--color-navy-dark);
    transform: translate(-50%, -50%) scale(1.15);
}

/* Card Info Styling */
.gallery-card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    justify-content: space-between;
    gap: 15px;
}

.gallery-card-desc {
    font-size: 0.85rem;
    color: var(--color-text-main);
    line-height: 1.5;
    font-weight: 500;
}

.gallery-card-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.meta-tag {
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--color-navy-dark);
    background-color: rgba(116, 135, 208, 0.08);
    padding: 4px 10px;
    border-radius: 0px;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    border: 1px solid rgba(116, 135, 208, 0.15);
}

/* Responsive breakdowns */
@media (max-width: 1200px) {
    .video-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .video-gallery-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .video-gallery-section {
        padding: 60px 0;
    }
    .video-showcase-container {
        padding: 30px 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        margin-top: 0 !important;
        background-color: #edeef0 !important;
    }
    .video-window-frame {
        border: 1.5px solid rgba(116, 135, 208, 0.25) !important;
        border-radius: 0 !important;
        box-shadow: var(--shadow-sm) !important;
    }
    .video-window-header {
        padding: 0 16px !important;
        height: 38px !important;
    }
    .window-title {
        font-size: 0.65rem !important;
        letter-spacing: 0.5px !important;
    }
}

/* ==========================================================================
   13. PREMIUM LOAD & ENTRANCE ANIMATIONS (WOW EFFECTS)
   ========================================================================== */

/* 13.1. Pure CSS Hero Load Transitions removed to prevent any interaction conflict with hover scaling and image switching */

/* 13.2. Video Gallery Scroll Cascade Entrance Styling */
.video-gallery-header {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.video-gallery-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.video-gallery-card {
    opacity: 0;
    transform: translateY(40px) translateZ(0);
    will-change: transform, opacity;
    transition: 
        opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1), 
        border-color 0.4s ease, 
        box-shadow 0.4s ease, 
        background 0.4s ease;
}

.video-gallery-card.visible {
    opacity: 1;
    transform: translateY(0) translateZ(0);
}

/* 13.3. Button Hover Glow and Shimmer Effects */
.cta-navy-button, .modal-submit-btn, .cta-header-btn {
    position: relative;
    overflow: hidden;
}

.cta-navy-button::after, .modal-submit-btn::after, .cta-header-btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.25) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: skewX(-25deg);
    transition: none;
}

.cta-navy-button:hover::after, .modal-submit-btn:hover::after, .cta-header-btn:hover::after {
    animation: shineEffect 1.2s cubic-bezier(0.16, 1, 0.3, 1) infinite;
}

@keyframes shineEffect {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* Subtle premium interactive background shift on card hover */
.video-gallery-card:hover {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(243, 245, 248, 0.85) 100%) !important;
}

.category-card:hover .card-footer-bar {
    background: linear-gradient(135deg, var(--color-navy-medium) 0%, var(--color-navy-dark) 100%);
}
