/* --- General Styling & Variables --- */
:root {
    --primary-blue: #003049;
    --remax-red: #d80000;
    --dark-text: #0b0b26;
    --light-text: #505050;
    --header-bg: #000000;
    --header-text: #ffffff;
    --light-grey-bg: #f8f9fa;
    --font-heading: 'Noto Serif', serif;
    --font-body: 'Noto Sans', sans-serif;
    --header-height: 110px; /* adjusted for proper spacing calculations */
}

/* Touch-friendly base styles */
* {
    -webkit-tap-highlight-color: rgba(0, 48, 73, 0.1);
    -webkit-touch-callout: none;
}

body { 
    font-family: var(--font-body); 
    margin: 0; 
    background-color: #ffffff; 
    color: var(--light-text); 
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden; /* prevent horizontal scroll from animations */
}

body.nav-open {
    overflow: hidden;
}

a { 
    text-decoration: none; 
    color: inherit;
    -webkit-tap-highlight-color: rgba(0, 48, 73, 0.1);
}

/* Touch-friendly minimum sizes for interactive elements */
button, 
.btn,
a.btn,
input[type="submit"],
input[type="button"] {
    min-height: 44px;
    touch-action: manipulation;
}

/* Improve form elements on touch devices */
input,
textarea,
select {
    font-size: 16px; /* Prevents zoom on iOS */
    touch-action: manipulation;
}

/* Smooth scrolling for all browsers */
html {
    scroll-behavior: smooth;
}

/* Image optimization for mobile */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Prevent text size adjustment on orientation change */
html {
    -webkit-text-size-adjust: 100%;
    -moz-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Fluid root font-size: scales all em/rem proportionally with viewport.
   At 1920 px → 16 px (unchanged). Above 1920 px → grows up to 20 px (25 % max).
   Mobile / tablet media queries override individual elements, so they are
   unaffected; this only produces a value > 16 px above ~1920 px viewport. */
@media (min-width: 1201px) {
    html {
        font-size: clamp(16px, 0.8333vw, 20px);
    }
}

/* Smooth transitions during device resize/orientation changes */
body.is-resizing * {
    transition: none !important;
    animation: none !important;
}

/* Better focus states for accessibility and touch */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid var(--primary-blue);
    outline-offset: 2px;
}

/* Remove focus outline on mouse click but keep for keyboard */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible),
input:focus:not(:focus-visible),
textarea:focus:not(:focus-visible),
select:focus:not(:focus-visible) {
    outline: none;
}

/* --- Header & Navigation --- */
header { position: sticky; top: 0; z-index: 1100; background-color: #fff; }
.top-bar { background-color: var(--header-bg); color: var(--header-text); font-size: 0.9em; }
.main-nav-section { background-color: #fff; box-shadow: 0 2px 4px rgba(0,0,0,0.05); }
.header-container { max-width: 87.5rem; margin: auto; padding: 0 2.5rem; }
/* tighter container padding to reduce horizontal gap */
.header-container { padding: 0 clamp(0.75rem, 1.5vw, 1.875rem); }
.top-bar-content { display: flex; justify-content: space-between; padding: 10px 0; }
.main-nav { display: flex; justify-content: space-between; align-items: center; padding: 20px 0; }
.logo { font-size: 3em; font-weight: 800; color: var(--dark-text); font-family: var(--font-heading); }
.nav-links { display: flex; list-style: none; gap: 40px; margin: 0; padding: 0; font-weight: 600; align-items: center; color: var(--dark-text); }
.mobile-menu-toggle { display: none; }

/* --- Animated Nav Link on Hover --- */
.nav-links li a {
    position: relative;
    transition: all 0.3s ease;
    padding-bottom: 2px; /* minimal space for clean visual alignment */
}

.nav-links li a:hover {
    color: var(--primary-blue);
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -2px; /* position line immediately below text baseline */
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-blue);
    transition: width 0.3s ease;
}

.nav-links li a:hover::after,
.nav-links li a.active::after {
    width: 100%;
}

/* --- Reusable Buttons --- */
.btn {
    padding: 14px 30px;
    border-radius: 8px;
    font-weight: 700;
    transition: all 0.3s ease;
    font-size: 0.9em;
    border: none;
    cursor: pointer;
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    line-height: 1.2;
    vertical-align: middle;
}

.btn a {
    text-align: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    width: 100%;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 48, 73, 0.3);
}

.btn-primary {
    background-color: var(--primary-blue);
    color: #fff;
    padding: 16px 36px;
    font-size: 1.05em;
    text-align: center;
    line-height: 1.2;
}

.btn-secondary {
    background-color: var(--primary-blue);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 30px;
    padding: 16px 32px;
    font-size: 1em;
    text-align: center;
    line-height: 1.2;
}

/* Ripple effect on click */
.ripple {
    position: absolute;
    border-radius: 50%;
    transform: scale(0);
    animation: ripple 600ms linear;
    background-color: rgba(255, 255, 255, 0.7);
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* iPad Pro Promotion Strip - Hidden by default */
.ipad-promo-strip {
    display: none;
}

/* --- Page Structure & Typography --- */
h1 { font-family: var(--font-heading); font-size: 5.8em; font-weight: 800; margin: 10px 0; line-height: 1.1; color: var(--dark-text); }

/* Ensure hero h1 is always visible */
.hero-content h1 {
    display: block;
    visibility: visible;
    opacity: 1;
    min-height: 1.2em;
    margin-top: 0;
    margin-bottom: 25px;
}

h2 { font-size: 3.5em; font-weight: 800; margin: 0 0 15px 0; color: var(--dark-text); line-height: 1.2; }
h3 { font-size: 1.8em; font-weight: 700; color: var(--dark-text); }
h4 { font-size: 1.3em; font-weight: 700; color: var(--dark-text); margin: 10px 0; }
.page-container { max-width: 87.5rem; margin: auto; padding: 0.9375rem clamp(0.75rem, 1.5vw, 1.875rem) 1.875rem; } /* rem-based for proportional zoom scaling */
.page-section-grey { background-color: var(--light-grey-bg); padding-top: 20px; } /* add minimal top padding */
.section-header { text-align: center; max-width: 43.75rem; margin: 0 auto 3.125rem auto; }

/* --- O Mne Page Container --- */
.page-container.o-mne {
    padding: 0;
    max-width: 100%;
}

.page-section-grey .o-mne {
    padding-top: 0;
}

.o-mne-section {
    padding-top: 0 !important;
    margin-top: -5px !important;
}

/* --- Home Page --- */
.home-hero-section {
    display: flex;
    align-items: center; /* Center items vertically */
    gap: 3rem;
    max-width: 87.5rem;
    margin: auto;
    padding: 2.1875rem clamp(0.75rem, 1.5vw, 1.875rem) 1.875rem;
    margin-bottom: 0; /* Eliminate gap below hero */
    /* Use viewport height minus header to fill screen */
    min-height: calc(100vh - var(--header-height));
    height: calc(100vh - var(--header-height));
    max-height: calc(100vh - var(--header-height));
    box-sizing: border-box;
    overflow: hidden; /* Prevent content from next section showing */
}

/* Tablet (incl. iPad Pro 13" portrait 1024px): maintain viewport height */
@media (min-width: 768px) and (max-width: 1200px) {
    .home-hero-section {
        padding-bottom: 16px;
        /* Maintain viewport filling on tablets */
        min-height: calc(100vh - var(--header-height));
        height: calc(100vh - var(--header-height));
        max-height: calc(100vh - var(--header-height));
    }

    .image-links-section {
        padding-top: 30px;
    }

    .image-link-container {
        margin-top: 12px;
    }
}

.hero-content {
    flex: 1 1 50%; /* Adjusted flex-basis */
    margin-top: 0px;
    display: flex;
    flex-direction: column;
    justify-content: center; /* Center content vertically */
    gap: 0; /* remove gap, use margins instead */
    position: relative;
    z-index: 10; /* Ensure content is above other elements */
    height: auto; /* Auto height to size naturally */
}

.hero-video-container {
    flex: 0 0 auto; /* Don't grow or shrink, use natural height */
    width: 50%; /* Match the hero-content width */
    margin-top: 0;
    overflow: hidden;
    border-radius: 28px;
    align-self: center; /* Align with text content */
    position: relative;
    height: auto; /* Auto height to match content */
    aspect-ratio: 9/11; /* Taller video for less white space */
    max-height: calc(100vh - var(--header-height) - 4rem);
}

.remax-award {
    margin-top: 0; /* Ensure top alignment */
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    font-size: 1em;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.remax-award.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the container, cropping if necessary */
    display: block;
}

.hero-content .description {
    max-width: 90%; /* Ensures the text doesn't stretch too wide */
    margin-bottom: 30px;
    font-size: 1.25em;
    line-height: 1.7;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero-content .description.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Smaller button on home page */
.hero-content .btn-secondary {
    padding: 16px 36px;
    font-size: 1.1em;
    align-self: flex-start;
    margin-top: 5px;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.hero-content .btn-secondary.visible {
    opacity: 1;
    transform: translateY(0);
}

.hero-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Optimize video for mobile */
@media (max-width: 768px) {
    .hero-video-container video {
        object-fit: cover;
        /* Consider using poster image on mobile for performance */
    }
}

/* --- About Page --- */
.about-me-container {
    display: flex;
    align-items: center;
    gap: 5rem;
    max-width: 87.5rem;
    margin: auto;
    padding: 5rem clamp(0.75rem, 1.5vw, 1.875rem);
    min-height: auto;
    box-sizing: border-box;
}

/* About page: keep header and text comfortably readable */
.page-container.o-mne .section-header {
    margin-bottom: 10px;
}

.page-container.o-mne .about-me-container {
    padding-top: 40px;
    padding-bottom: 20px;
}

.about-me-image {
    flex: 0 0 45%;
    height: 350px;
    object-fit: cover;
    object-position: top center;
    border-radius: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.12);
}

.about-me-image-square {
    height: auto;
    aspect-ratio: 1 / 1;
    width: 100%;
    object-position: center;
    border-radius: 24px;
}

.about-me-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1rem;
    max-width: 720px;
}

.about-me-text h2 {
    font-size: 2.2em;
    margin-bottom: 0.5rem;
    line-height: 1.1;
}

.about-me-text p {
    font-size: 1em;
    line-height: 1.5;
    color: var(--light-text);
    margin: 0;
}

.about-me-text .description {
    font-size: 1.25em;
    font-weight: 500;
    color: var(--dark-text);
    line-height: 1.6;
}

.values-list {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.values-list li {
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
}

.values-list li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 1.2em;
}

.about-me-text .btn {
    margin-top: 20px;
    align-self: flex-start;
}

/* ==========================================================================
   NEW ABOUT PAGE - VIEWPORT FITTED SECTIONS
   Strict design: Each image+text pair fits perfectly in 100vh on desktop
   ========================================================================== */

/* ==========================================================================
   O-MNE PAGE - CLEAN PROFESSIONAL REDESIGN - ADBLOCK SAFE
   Perfect alignment, no glassmorphic effects, works on all devices
   ========================================================================== */

.omne-section {
    padding: 60px 0;
}

.omne-section.omne-alt {
    background-color: var(--light-grey-bg);
}

.omne-row {
    display: flex;
    align-items: center;
    max-width: 75rem;
    margin: 0 auto;
    gap: 3.75rem;
    padding: 0 clamp(0.75rem, 1.5vw, 1.875rem);
}

.omne-row.omne-reverse {
    flex-direction: row-reverse;
}

.omne-row.omne-top {
    align-items: flex-start;
}

.omne-row.omne-top .omne-image {
    display: flex;
    align-items: flex-start;
}

.omne-row.omne-top .omne-image img {
    width: 100%;
    height: auto;
    object-fit: cover;
}

.omne-image {
    flex: 0 0 clamp(280px, 35%, 450px);
    min-width: 0;
    max-width: clamp(280px, 35%, 450px);
}

.omne-image img {
    width: 100%;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    display: block;
    max-width: 100%;
    max-height: 500px;
    object-fit: cover;
}

.omne-image-crop {
    overflow: hidden;
}

.omne-image-crop img {
    clip-path: inset(30px 0 30px 0 round 20px);
    margin-top: -30px;
    margin-bottom: -30px;
    max-width: 100%;
    max-height: 560px;
}

.omne-content {
    flex: 1;
    min-width: 0;
}

.omne-content h2 {
    font-size: 2.5em;
    margin: 0 0 20px 0;
    color: var(--dark-text);
    line-height: 1.2;
}

.omne-content p {
    font-size: 1.05em;
    line-height: 1.7;
    color: var(--light-text);
    margin-bottom: 15px;
}

.omne-content p:last-child {
    margin-bottom: 0;
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .omne-section {
        padding: 50px 0;
    }
    
    .omne-row {
        gap: 40px;
        padding: 0 25px;
    }
    
    .omne-image {
        flex: 0 0 38%;
        max-width: 38%;
    }
    
    .omne-image img {
        max-height: 420px;
    }
    
    .omne-content h2 {
        font-size: 2.2em;
    }
    
    .omne-content p {
        font-size: 1em;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .omne-section {
        padding: 40px 0;
    }
    
    .omne-row {
        flex-direction: column !important;
        gap: 30px;
        padding: 0 20px;
    }
    
    .omne-image {
        flex: 0 0 auto;
        width: 100%;
        max-width: 100%;
    }
    
    .omne-image img {
        border-radius: 15px;
    }
    
    .omne-content h2 {
        font-size: 1.9em;
    }
    
    .omne-content p {
        font-size: 0.95em;
        line-height: 1.6;
    }
}

/* ==========================================================================
   OLD O-MNE STYLES (KEPT FOR COMPATIBILITY)
   ========================================================================== */

/* ==========================================================================
   O-MNE PAGE - MODERN GLASSMORPHISM REDESIGN (STANDARD DESKTOP 16:9, 16:10)
   Fixes alignment issues with modern border-radius and subtle shadows
   ========================================================================== */

/* About Page Viewport Section - Each section fits within viewport on desktop */
.about-viewport-section {
    /* Desktop/large screens: responsive height that doesn't force clipping */
    min-height: calc(100vh - var(--header-height)); /* fallback */
    min-height: calc(100dvh - var(--header-height)); /* iOS Safari */
    max-height: fit-content; /* allow natural content height if needed */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0; /* add vertical padding to prevent clipping */
    box-sizing: border-box;
}

/* First section gets extra top padding to clear header */
.about-viewport-section:first-of-type {
    padding-top: 60px;
}

/* Split Container - 50% Image, 50% Text (desktop) - MODERNIZED */
.about-split-container {
    display: flex;
    width: 100%;
    height: 100%;
    max-width: 87.5rem;
    margin: 0 auto;
    align-items: center; /* Proper vertical alignment fix */
}

/* Image Wrapper - 50% width - MODERNIZED WITH GLASSMORPHISM */
.about-image-wrapper {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 4vw, 4rem); /* rem-based for proportional zoom scaling */
    box-sizing: border-box;
}

/* Uniform Images - Desktop: square frame with MODERN DESIGN */
.about-uniform-image {
    width: min(34.375rem, 100%);
    max-height: calc(100vh - var(--header-height) - 7.5rem);
    aspect-ratio: 1 / 1;
    height: auto;
    object-fit: cover;
    object-position: top center;
    /* MODERN GLASSMORPHISM STYLING */
    border-radius: 28px; /* Increased from 24px for modern look */
    border: none;
    box-shadow: 
        0 8px 32px rgba(0, 48, 73, 0.12),
        0 2px 8px rgba(0, 48, 73, 0.08); /* Layered shadow for depth */
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), 
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Only apply on standard desktop (not exotic displays) */
@media (min-width: 1201px) and (min-aspect-ratio: 15/10) and (max-aspect-ratio: 17/9) {
    .about-uniform-image:hover {
        transform: translateY(-4px) scale(1.01);
        box-shadow: 
            0 12px 48px rgba(0, 48, 73, 0.16),
            0 4px 12px rgba(0, 48, 73, 0.12);
    }
}

/* Text Wrapper - 50% width - IMPROVED CENTERING */
.about-text-wrapper {
    flex: 0 0 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(2rem, 4vw, 4rem);
    box-sizing: border-box;
}

/* Text Content - comfortable reading width with PROFESSIONAL STYLING */
.about-text-content {
    max-width: 42.5rem;
    /* Optional glassmorphic container effect */
    padding: 24px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.about-text-content h2 {
    font-size: 2.5em;
    margin-bottom: 0.75rem;
    line-height: 1.15;
    color: var(--dark-text);
}

.about-text-content p {
    font-size: 1.05em;
    line-height: 1.65;
    color: var(--light-text);
    margin-bottom: 0.65rem;
}

.about-text-content p:last-child {
    margin-bottom: 0;
}

/* Reversed Layout - Image on right, Text on left */
.about-split-reversed {
    flex-direction: row-reverse;
}

/* ==========================================================================
   TABLET (768px - 1200px)
   - Force stacked layout to avoid narrow “skyscraper” text columns
   - Image top ~50% of visible viewport, text bottom ~50%
   - Use min-height + dvh to prevent Safari URL bar cutoffs
   ========================================================================== */

@media (min-width: 768px) and (max-width: 1200px) {
    .about-viewport-section {
        height: auto;
        min-height: calc(100vh - var(--header-height));
        min-height: calc(100dvh - var(--header-height));
        padding: 0;
    }

    .about-split-container,
    .about-split-reversed {
        flex-direction: column;
        height: auto;
        min-height: calc(100vh - var(--header-height));
        min-height: calc(100dvh - var(--header-height));
    }

    .about-image-wrapper {
        width: 100%;
        flex: 0 0 auto;
        min-height: calc((100vh - var(--header-height)) / 2);
        min-height: calc((100dvh - var(--header-height)) / 2);
        padding: 28px 44px 16px;
    }

    /* Tablet: hero banner image fills the top half */
    .about-uniform-image {
        width: 100%;
        height: 100%;
        aspect-ratio: auto;
        border-radius: 24px;
    }

    .about-text-wrapper {
        width: 100%;
        flex: 0 0 auto;
        min-height: calc((100vh - var(--header-height)) / 2);
        min-height: calc((100dvh - var(--header-height)) / 2);
        padding: 28px 64px 44px;
        align-items: flex-start;
    }

    .about-text-content {
        max-width: 900px;
        margin: 0 auto;
        /* Adjust glassmorphic effect for tablet */
        padding: 20px;
        background: rgba(255, 255, 255, 0.85);
    }
}

/* ==========================================================================
   MOBILE (<= 767.98px)
   - Stacked flow without strict vh (prevents clipping)
   ========================================================================== */

@media (max-width: 767.98px) {
    .about-viewport-section {
        height: auto;
        min-height: auto;
        padding: 24px 0;
    }

    .about-split-container,
    .about-split-reversed {
        flex-direction: column;
        height: auto;
        min-height: auto;
    }

    .about-image-wrapper,
    .about-text-wrapper {
        width: 100%;
        padding: 16px;
    }

    .about-uniform-image {
        width: 100%;
        height: auto;
        max-height: 340px;
        aspect-ratio: auto;
        border-radius: 16px;
    }

    .about-text-content {
        max-width: 100%;
        /* Remove glassmorphic effect on mobile for better readability */
        background: transparent;
        backdrop-filter: none;
        box-shadow: none;
        padding: 16px;
    }

    .about-text-content h2 {
        font-size: 1.85em;
        margin-bottom: 1rem;
    }

    .about-text-content p {
        font-size: 0.98em;
        line-height: 1.6;
    }
}

/* --- Contact Page --- */
.contact-section-container {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 2.2rem;
    max-width: 87.5rem;
    margin: auto;
    padding: 1.25rem clamp(0.75rem, 1.5vw, 1.875rem) 1.875rem;
    min-height: calc(100vh - var(--header-height) - 2.5rem);
    box-sizing: border-box;
}

.contact-text {
    margin-top: 0; /* removed margin */
    flex: 1;
}

.contact-image {
    flex: 0.8;
    align-self: center;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 25px;
    overflow: hidden;
    transform: scale(0.92);
    opacity: 0;
    transition: transform 1s cubic-bezier(0.25, 0.46, 0.45, 0.94), opacity 1s ease-out;
}

.contact-image.animate-in {
    transform: scale(1);
    opacity: 1;
}

.contact-details {
    margin: 25px 0;
}

.contact-details p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-icon {
    margin-right: 10px;
    font-size: 1.2em;
}

/* Social Links Section on Contact Page */
.social-links-section {
    margin: 35px 0 25px 0;
}

.social-links-section h3 {
    font-size: 1.2em;
    margin-bottom: 20px;
    color: var(--primary-blue);
    font-weight: 600;
}

.social-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    grid-auto-rows: 1fr;
    gap: 15px;
}

.social-link {
    display: flex;
    align-items: center;
    height: 100%;
    box-sizing: border-box;
    padding: 12px 18px;
    background-color: #fff;
    border: 2px solid #e8e8e8;
    border-radius: 10px;
    text-decoration: none;
    color: var(--primary-blue);
    transition: all 0.3s ease;
    font-weight: 500;
}

.social-link:hover {
    border-color: var(--primary-blue);
    background-color: var(--primary-blue);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 48, 73, 0.15);
}

.social-icon {
    width: 24px;
    height: 24px;
    margin-right: 12px;
    flex-shrink: 0;
}

.social-link span {
    font-size: 0.95em;
}

/* Specific brand color hover effects */
.instagram-link:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    border-color: #e6683c;
}

.facebook-link:hover {
    background-color: #1877f2;
    border-color: #1877f2;
}

.remax-link:hover {
    background-color: #e11b22;
    border-color: #e11b22;
}

.google-link:hover {
    background-color: #4285f4;
    border-color: #4285f4;
}

.business-link:hover {
    background-color: #ff6b00;
    border-color: #ff6b00;
}

.sell-form-link:hover {
    background-color: #003049;
    border-color: #003049;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .social-links {
        grid-template-columns: 1fr;
    }
    
    .social-link {
        padding: 14px 16px;
    }
}

/* --- BLOG PAGE --- */
/* Hide blog subtitle */
/* --- BLOG PAGE STYLES --- */
/* Blog styles moved to template files (blog.html and blog_detail.html) for better modularity */
/* Keep only legacy class compatibility if needed */
.blog-page-subtitle {
    display: none;
}

.featured-post { 
    display: flex; 
    align-items: stretch; 
    gap: 40px; 
    background-color: #fff; 
    padding: 40px; 
    border-radius: 15px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); 
    margin-bottom: 60px; 
}

.featured-post-image { 
    flex-basis: 50%; 
    align-self: stretch;
}

.featured-post-image img { 
    width: 100%; 
    height: 100%;
    border-radius: 10px; 
    object-fit: cover;
    display: block; 
    transition: transform 0.4s ease; 
}

.featured-post:hover .featured-post-image img { 
    transform: scale(1.03); 
}

.featured-post-content { 
    flex-basis: 50%; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.featured-post-content .post-meta {
    font-size: 0.9em;
    color: var(--light-text);
    margin-bottom: 15px;
}

.featured-post-content h3 {
    margin-bottom: 20px;
    line-height: 1.4;
}

.featured-post-content > p:not(.post-meta) {
    line-height: 1.7;
    margin-bottom: 25px;
}

.featured-post-content .btn {
    margin-top: auto;
    align-self: flex-start;
}

.recent-posts-title { 
    text-align: center; 
    margin-bottom: 40px; 
}

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

.post-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.post-card { 
    background-color: #fff; 
    border-radius: 15px; 
    box-shadow: 0 4px 15px rgba(0,0,0,0.08); 
    overflow: hidden; 
    transition: all 0.3s ease; 
}

.post-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 12px 25px rgba(0,0,0,0.1); 
}

.post-card-image img { 
    width: 100%; 
    height: 220px; 
    object-fit: cover; 
    display: block; 
    transition: transform 0.4s ease; 
}

.post-card-link:hover .post-card-image img { 
    transform: scale(1.05); 
}

.post-card-image-link img { 
    width: 100%; 
    height: 220px; 
    object-fit: cover; 
    display: block; 
    transition: transform 0.4s ease; 
}

.post-card-image-link:hover img { 
    transform: scale(1.05); 
}

.post-card-content { 
    padding: 25px; 
}

.post-card-content .post-meta { 
    font-size: 0.9em; 
    color: var(--light-text); 
    margin-bottom: 10px; 
}

.post-card-content h4 {
    margin-bottom: 12px;
    line-height: 1.4;
}

.post-card-content > p:not(.post-meta) {
    line-height: 1.6;
    margin-bottom: 15px;
}

.read-more { 
    font-weight: 700; 
    color: var(--primary-blue); 
    display: inline-block; 
    margin-top: 15px; 
    transition: color 0.3s ease;
}

.post-card-link:hover .read-more {
    color: var(--secondary-color);
}

/* --- PROPERTIES PAGE --- */
/* Hide properties header text */
.properties-page-header {
    text-align: center;
    margin-top: 5px;
    margin-bottom: 40px;
}

.properties-page-header h2 {
    font-size: 3em; /* bigger text size */
    font-weight: 800;
    margin: 0;
    color: var(--dark-text);
}

.property-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.property-card { background-color: #fff; border-radius: 15px; overflow: hidden; box-shadow: 0 4px 15px rgba(0,0,0,0.08); transition: all 0.3s ease; }
.property-card:hover { transform: translateY(-5px); box-shadow: 0 12px 25px rgba(0,0,0,0.1); }
.property-card-link { display: block; text-decoration: none; color: inherit; }
.property-card img { width: 100%; height: 250px; object-fit: cover; display: block; transition: transform 0.4s ease; }
.property-card:hover img { transform: scale(1.05); }
.property-text { padding: 25px; }

/* Properties page - remove filter */
.sub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.btn-filter {
    display: none;
}

/* --- SERVICES PAGE --- */
/* Adjust services container */
.sluzby-container {
    padding-top: 25px !important; /* reduced from 35px for tighter layout */
}

/* === Service Detail Subpages (prodej, pronajem, konzultace, odhad) === */
/* Single-viewport layout using dvh units for dynamic height scaling.
   Scales with browser zoom and viewport size. Desktop/tablet: fits one screen.
   Mobile: stacks and allows natural scroll. */

.service-page-section {
    height: calc(100vh - var(--header-height));
    height: calc(100dvh - var(--header-height));
    display: flex;
    flex-direction: column;
    padding: 0 !important;
    box-sizing: border-box;
    overflow: hidden;
    background: var(--light-grey-bg);
}

.service-page-section .page-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 87.5rem;
    margin: 0 auto;
    padding: clamp(1rem, 2.5dvh, 2.5rem) clamp(1.25rem, 3vw, 2.5rem) clamp(0.75rem, 2dvh, 1.5rem);
    box-sizing: border-box;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}

/* --- Heading --- */
.service-page-section .section-header {
    text-align: center;
    max-width: none;
    flex-shrink: 0;
    margin: clamp(0.25rem, 1dvh, 1.25rem) 0 clamp(0.75rem, 2dvh, 2.5rem) 0;
}

.service-page-section .section-header h2 {
    font-size: clamp(1.3rem, 2.5dvh + 0.5vw, 3rem);
    margin: 0;
    line-height: 1.15;
    color: var(--dark-text);
    text-decoration: underline;
    text-decoration-color: var(--primary-blue);
    text-decoration-thickness: 3px;
    text-underline-offset: 0.3em;
}

/* --- Two-column layout --- */
.service-detail-content {
    display: grid;
    grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
    gap: clamp(1.25rem, 2.5vw, 3rem);
    flex: 1;
    min-height: 0;
    align-items: stretch;
    overflow: hidden;
}

/* --- Image column --- */
.service-detail-image {
    min-height: 0;
    max-height: 100%;
    overflow: hidden;
    border-radius: 1rem;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    line-height: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.service-detail-image img {
    width: 100%;
    height: 100%;
    max-height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 1rem;
    transition: transform 0.5s ease;
}

.service-detail-image:hover img {
    transform: scale(1.03);
}

/* --- Text column --- */
.service-detail-text {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 0;
    gap: clamp(0.35rem, 1dvh, 1.25rem);
    overflow: hidden;
    padding-top: 0;
    height: 100%;
}

.service-detail-text .description-text p {
    margin: 0 0 clamp(0.15rem, 0.5dvh, 0.65rem) 0;
    font-size: clamp(1.02rem, 1.8dvh + 0.3vw, 1.35rem);
    line-height: 1.55;
    color: var(--light-text);
}

.service-detail-text h3 {
    margin: clamp(0.15rem, 0.6dvh, 0.9rem) 0 clamp(0.1rem, 0.4dvh, 0.45rem) 0 !important;
    font-size: clamp(1.1rem, 1.9dvh + 0.35vw, 1.55rem);
    font-weight: 700;
    color: var(--dark-text);
    letter-spacing: -0.01em;
}

/* --- Checklist --- */
.service-detail-text ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: clamp(0.05rem, 0.3dvh, 0.55rem);
}

.service-detail-text ul li {
    display: flex;
    align-items: baseline;
    gap: 0.5rem;
    font-size: clamp(0.95rem, 1.6dvh + 0.25vw, 1.2rem);
    line-height: 1.45;
    color: var(--dark-text);
    padding: 0;
    margin: 0;
}

.service-detail-text ul li .step-icon {
    flex-shrink: 0;
    width: 1.1em;
    color: var(--primary-blue);
    font-weight: 700;
    font-size: 1.1em;
    text-align: center;
}

/* --- CTA Button --- */
.service-detail-text .btn {
    margin-top: auto;
    align-self: flex-start;
    flex-shrink: 0;
    font-size: clamp(0.85rem, 1dvh + 0.25vw, 1.1rem);
    padding: clamp(0.55rem, 1dvh, 1rem) clamp(1.25rem, 2.5vw, 2.5rem);
    border-radius: 0.5rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    transition: all 0.25s ease;
    box-shadow: 0 4px 14px rgba(0, 48, 73, 0.2);
}

.service-detail-text .btn.pronajem-cta,
.service-detail-text .btn.odhad-cta,
.service-detail-text .btn.konzultace-cta {
    /* Hardcoded offsets removed because margin-top: auto anchors to bottom perfectly */
}

@media (min-width: 769px) {
    .service-detail-text.odhad-text {
        /* Removed hardcoded negative margin */
    }
    .service-detail-text.konzultace-text {
        /* Removed hardcoded negative margin */
    }
}

.service-detail-text .btn:hover {
    box-shadow: 0 6px 20px rgba(0, 48, 73, 0.35);
    transform: translateY(-2px);
}

/* ---- Responsive: Large desktops (> 1440) ---- */
@media (min-width: 1441px) {
    .service-detail-content {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
}

/* ---- Responsive: Tablet landscape / small laptop (769–992) ---- */
@media (max-width: 992px) and (min-width: 769px) {
    .service-page-section .section-header h2 {
        font-size: clamp(1.3rem, 2dvh + 0.4vw, 2.2rem);
    }
    .service-detail-content {
        grid-template-columns: minmax(0, 3fr) minmax(0, 5fr);
        gap: clamp(0.75rem, 1.5vw, 1.5rem);
    }
}

/* ---- Responsive: Mobile (≤ 768) — stacked, natural scroll ---- */
@media (max-width: 768px) {
    .service-page-section {
        height: auto;
        min-height: auto;
        overflow: visible;
        display: block;
    }

    .service-page-section .page-container {
        display: flex;
        flex-direction: column;
        padding: 1.75rem 1.25rem 2.5rem;
        gap: 0;
    }

    .service-page-section .section-header {
        text-align: center;
        margin-bottom: 1.25rem;
    }

    .service-page-section .section-header h2 {
        font-size: 1.6rem;
    }

    .service-detail-content {
        display: flex;
        flex-direction: column;
        gap: 1.5rem;
    }

    .service-detail-image {
        width: 100%;
        border-radius: 0.875rem;
        aspect-ratio: 16 / 10;
    }

    .service-detail-image img {
        height: 100%;
        width: 100%;
        aspect-ratio: 16 / 10;
        object-fit: cover;
        border-radius: 0.875rem;
    }

    .service-detail-text {
        gap: 0.5rem;
        justify-content: flex-start;
        overflow: visible;
        align-items: stretch;
    }

    .service-detail-text .description-text p {
        font-size: 0.95rem;
        margin-bottom: 0.5rem;
        line-height: 1.65;
    }

    .service-detail-text h3 {
        margin: 0.75rem 0 0.5rem 0 !important;
        font-size: 1.1rem;
    }

    .service-detail-text ul {
        gap: 0.5rem;
    }

    .service-detail-text ul li {
        font-size: 0.93rem;
        line-height: 1.5;
    }

    .service-detail-text .btn {
        margin-top: 1.25rem;
        width: 100%;
        max-width: 100%;
        justify-content: center;
        align-self: stretch;
        padding: 0.9rem 1.5rem;
        font-size: 1rem;
        box-sizing: border-box;
    }

    .service-detail-text .btn.pronajem-cta,
    .service-detail-text .btn.odhad-cta,
    .service-detail-text .btn.konzultace-cta {
        margin-top: 1.25rem;
    }
}

/* ---- Responsive: Small mobile (≤ 480) ---- */
@media (max-width: 480px) {
    .service-page-section .page-container {
        padding: 1.25rem 1rem 2rem;
    }

    .service-page-section .section-header h2 {
        font-size: 1.35rem;
    }

    .service-detail-image {
        aspect-ratio: 16 / 9;
    }

    .service-detail-image img {
        aspect-ratio: 16 / 9;
        object-fit: cover;
    }

    .service-detail-text .description-text p {
        font-size: 0.9rem;
    }

    .service-detail-text ul li {
        font-size: 0.88rem;
    }
}

/* Protect from tablet-range generic padding overrides */
@media screen and (min-width: 769px) and (max-width: 1366px) {
    .service-page-section {
        padding: 0 !important;
    }
    .service-page-section .page-container {
        padding: clamp(0.75rem, 2dvh, 2rem) clamp(1.25rem, 3vw, 2.5rem) clamp(0.5rem, 1.5dvh, 1.5rem) !important;
    }
}
/* === End Service Detail Subpages === */

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

.service-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    justify-items: center;
}

.service-card-interactive {
    background-color: #fff;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
    padding-bottom: 20px;
    width: 100%;
    max-width: 280px;
}

.service-card-interactive:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.service-card-interactive img {
    width: 100%;
    height: 160px; /* slightly smaller images */
    object-fit: cover;
    display: block;
    margin-bottom: 15px;
    transition: transform 0.4s ease;
}

.service-card-interactive:hover img {
    transform: scale(1.05);
}

.service-card-interactive h4 {
    margin: 0 15px 10px;
    color: var(--dark-text);
}

.service-card-interactive p {
    font-size: 0.9em;
    padding: 0 15px;
    color: var(--light-text);
}

/* --- FAQ Page Styling --- */
.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    max-width: 56.25rem;
    margin: 0 auto;
}

.faq-item {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.06);
    transition: all 0.3s ease;
    border: 1px solid #f0f0f0;
}

.faq-item:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    cursor: pointer;
    font-weight: 700;
    color: var(--dark-text);
    font-size: 1.1em;
    background-color: #fff;
    transition: background-color 0.3s ease;
}

.faq-question:hover {
    background-color: #f9f9f9;
}

.faq-toggle {
    font-size: 1.5em;
    line-height: 1;
    color: var(--primary-blue);
    font-weight: 300;
    transition: transform 0.3s ease;
    min-width: 20px;
    text-align: center;
}

.faq-answer-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.4s ease-out;
}

.faq-answer-wrapper.active {
    grid-template-rows: 1fr;
}

.faq-answer {
    overflow: hidden;
    background-color: #fff;
    color: var(--light-text);
    line-height: 1.6;
}

.faq-answer p {
    padding: 0 25px 25px;
    margin-bottom: 0;
    font-size: 0.95em;
}

/* --- Testimonial Grid --- */
#home-references-preview {
    padding-top: 50px;
    padding-bottom: 0;
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background-color: #fff;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.1);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: 700;
    color: var(--dark-text);
}

/* --- E-books Section --- */
.ebooks-section {
    padding: 60px 0;
    background-color: #ffffff;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.ebooks-section .section-header {
    text-align: center;
    margin-bottom: 40px;
}

.ebooks-section .section-header h2 {
    font-size: 2em;
    color: var(--dark-text);
    margin-bottom: 10px;
    line-height: 1.2;
}

.ebooks-section .section-header p {
    font-size: 1em;
    color: var(--light-text);
}

.ebooks-grid {
    display: flex;
    flex-direction: column;
    gap: 3.125rem;
    max-width: 56.25rem;
    margin: 0 auto;
}

.ebook-card {
    background-color: transparent;
    border-radius: 0;
    overflow: visible;
    box-shadow: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: row;
    gap: 50px;
    align-items: center;
    height: auto;
    border: none;
}

.ebook-card:hover {
    transform: translateX(5px);
}

.ebook-image {
    width: 350px;
    min-width: 350px;
    max-height: 100%;
    overflow: visible;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    background: transparent;
    padding: 0;
    padding-top: 10px;
    flex-shrink: 0;
}

.ebook-image img {
    width: 100%;
    height: auto;
    max-width: 350px;
    max-height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 15px 35px rgba(0,0,0,0.25));
    transition: all 0.3s ease;
}

.ebook-card:hover .ebook-image img {
    filter: drop-shadow(0 20px 45px rgba(0,0,0,0.35));
    transform: scale(1.02);
}

.ebook-content {
    padding: 0;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ebook-content h3 {
    font-size: 1.5em;
    color: var(--dark-text);
    margin-bottom: 6px;
    font-family: var(--font-heading);
    line-height: 1.2;
}

.ebook-subtitle {
    font-size: 0.9em;
    color: var(--light-text);
    margin-bottom: 8px;
    line-height: 1.4;
}

.ebook-subtitle strong {
    color: var(--primary-blue);
    font-weight: 700;
}

.ebook-description {
    font-size: 0.85em;
    color: var(--light-text);
    margin-bottom: 8px;
    line-height: 1.5;
}

.ebook-benefits {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 10px;
    border-left: none;
    flex: 1;
}

.ebook-benefits p {
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 8px;
    font-size: 0.9em;
}

.ebook-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ebook-benefits ul li {
    padding: 5px 0 5px 28px;
    position: relative;
    color: var(--light-text);
    font-size: 0.85em;
    line-height: 1.5;
}

.ebook-benefits ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 1.2em;
}

.ebook-cta-text {
    font-size: 0.85em;
    color: var(--dark-text);
    font-weight: 600;
    margin-bottom: 10px;
    line-height: 1.4;
}

.ebook-btn {
    margin-top: 0;
    width: auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 12px 30px;
    font-size: 0.95em;
    font-weight: 700;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 3px 12px rgba(0, 48, 73, 0.2);
    text-decoration: none;
    line-height: 1;
    vertical-align: middle;
}

.ebook-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 48, 73, 0.3);
    text-decoration: none;
}

.ebook-card--pronajem {
    align-items: flex-end;
}

.ebook-card--pronajem .ebook-image {
    width: 350px;
    min-width: 350px;
    align-items: flex-end;
    padding-top: 0;
}

.ebook-card--pronajem .ebook-image img {
    width: 100%;
    max-width: 350px;
    height: auto;
    object-fit: contain;
}

/* --- E-book Landing Pages --- */
.ebook-landing-section {
    min-height: 100vh;
    padding: 40px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    display: flex;
    align-items: center;
}

.ebook-landing-container {
    max-width: 87.5rem;
    margin: 0 auto;
    width: 100%;
}

.ebook-landing-header {
    text-align: center;
    margin-bottom: 35px;
}

.ebook-landing-header h1 {
    font-size: 1.8em;
    color: var(--dark-text);
    margin-bottom: 10px;
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 700;
}

.landing-subtitle {
    font-size: 1.1em;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 10px;
}

.landing-description {
    font-size: 0.95em;
    color: var(--light-text);
    line-height: 1.5;
    max-width: 900px;
    margin: 0 auto;
}

.ebook-landing-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 40px;
    background-color: #ffffff;
    padding: 35px 40px;
    border-radius: 15px;
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
    align-items: start;
}

/* Left Side: E-book Image */
.ebook-preview-image {
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    padding: 0;
    border-radius: 0;
    height: auto;
}

.ebook-preview-image img {
    width: 100%;
    max-width: 260px;
    height: auto;
    filter: drop-shadow(0 15px 35px rgba(0,0,0,0.25));
    transition: all 0.3s ease;
}

.ebook-preview-image img:hover {
    transform: scale(1.02);
    filter: drop-shadow(0 20px 45px rgba(0,0,0,0.3));
}

/* Right Side: Form Wrapper */
.ebook-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.ebook-preview-benefits {
    background-color: transparent;
    padding: 0;
    border-radius: 0;
    margin-bottom: 0;
}

.ebook-preview-benefits h3 {
    font-size: 1em;
    color: var(--dark-text);
    margin-bottom: 10px;
    font-family: var(--font-heading);
    font-weight: 700;
}

.ebook-preview-benefits ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ebook-preview-benefits ul li {
    padding: 0;
    padding-left: 28px;
    position: relative;
    color: var(--light-text);
    font-size: 0.85em;
    line-height: 1.4;
    margin-bottom: 0;
}

.ebook-preview-benefits ul li:before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 0;
    color: #ffffff;
    background-color: #28a745;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.7em;
}

.ebook-preview-benefits ul li strong {
    color: var(--primary-blue);
    font-weight: 700;
}

/* Right Side: Form */
.ebook-form-wrapper {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 100%;
}

.ebook-landing-form {
    flex: 1;
    background-color: transparent;
    border: none;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
}

.ebook-landing-form .form-group {
    margin-bottom: 12px;
}

.ebook-landing-form label {
    display: block;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 5px;
    font-size: 0.85em;
}

.ebook-landing-form input {
    width: 100%;
    padding: 10px 12px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.9em;
    font-family: var(--font-body);
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: #ffffff;
}

.ebook-landing-form input:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.08);
}

.ebook-landing-form small {
    display: block;
    margin-top: 4px;
    color: var(--light-text);
    font-size: 0.8em;
    font-style: italic;
}

.ebook-submit-btn {
    width: 100%;
    padding: 12px 20px;
    font-size: 0.95em;
    font-weight: 700;
    margin-top: 5px;
    border-radius: 8px;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary-blue) 0%, #00497a 100%);
    color: white;
}

.ebook-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 48, 73, 0.3);
}

.ebook-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ebook-landing-footer {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #e0e0e0;
    text-align: center;
}

.privacy-note {
    font-size: 0.75em;
    color: var(--light-text);
    font-style: italic;
    margin-bottom: 8px;
    line-height: 1.4;
}

.professional-signature {
    font-size: 0.85em;
    color: var(--dark-text);
    font-weight: 600;
    text-align: center;
}

.professional-signature .remax-brand {
    color: var(--remax-red);
    font-weight: 700;
}

.professional-signature .remax-slash {
    color: var(--primary-blue);
}

/* --- Minimalistic Form Styling --- */
#sell-form-section, #estimate-form-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

.form-container {
    background-color: #fff;
    padding: 30px; /* reduced form padding */
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.08);
    max-width: 500px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Estimate form - wider container to fit all fields in viewport */
.estimate-form-container {
    max-width: 750px;
    padding: 25px 35px;
}

/* Estimate form specific styling */
#estimate-form-section {
    padding: 30px 20px;
}

.estimate-form-container .section-header h2 {
    font-size: 2.5em;
    margin-bottom: 8px;
}

.estimate-form-container .section-header p {
    font-size: 1em;
    margin-bottom: 0;
}

.estimate-form .form-row {
    display: flex;
    gap: 20px;
}

.estimate-form .form-row .form-group {
    flex: 1;
}

.estimate-form select {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: #fafafa;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 40px;
}

.estimate-form select:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

.error-message {
    display: block;
    color: #dc3545;
    font-size: 0.85em;
    margin-top: 5px;
    min-height: 18px;
}

/* Compact form groups for estimate form */
.estimate-form .form-group {
    margin-bottom: 18px;
}

.estimate-form .form-group label {
    margin-bottom: 6px;
    font-size: 0.9em;
}

.estimate-form .form-submit-btn {
    margin-top: 8px;
    padding: 14px;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
}

.form-header h2 {
    font-size: 2.2em;
    margin-bottom: 10px;
    color: var(--dark-text);
}

.form-header p {
    color: var(--light-text);
    font-size: 1.1em;
    margin: 0;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 0;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 25px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark-text);
    font-size: 0.95em;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 1em;
    transition: all 0.3s ease;
    box-sizing: border-box;
    background-color: #fafafa;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-blue);
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(0, 48, 73, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-submit-btn {
    width: 100%;
    padding: 16px;
    font-size: 1.1em;
    font-weight: 700;
    border-radius: 10px;
    margin-top: 10px;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1.2;
}

.form-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 48, 73, 0.3);
}

.form-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 30px;
    border-top: 1px solid #f0f0f0;
}

.form-footer p {
    margin-bottom: 10px;
    color: var(--light-text);
    font-size: 0.95em;
}

.phone-link {
    font-size: 1.3em;
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
    transition: color 0.3s ease;
}

.phone-link:hover {
    color: var(--dark-text);
}

.remax-brand {
    color: var(--remax-red);
    font-weight: 900;
}

.remax-slash {
    color: #003DA5;
}

/* ======================================== */
/* --- IMPROVED ANIMATIONS --- */
/* ======================================== */

/* Animation keyframes */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    0% {
        opacity: 0;
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(0, 48, 73, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(0, 48, 73, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(0, 48, 73, 0);
    }
}

/* Typed.js cursor and text styling */
#typed-text {
    display: inline-block;
    min-height: 1.2em;
    color: var(--dark-text);
    font-family: var(--font-heading);
    font-size: inherit;
    font-weight: inherit;
    line-height: inherit;
}

.typed-cursor {
    display: inline-block;
    margin-left: 6px;
    color: var(--primary-blue);
    animation: typedBlink 1s step-end infinite;
    font-weight: 700;
}

@keyframes typedBlink {
    50% { opacity: 0; }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.initial-hidden {
    opacity: 0;
    transform: translateY(20px);
}

.hero-animate {
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

@keyframes fadeInFromTop {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.initial-hidden-top {
    opacity: 0;
}

.fade-in-from-top-animation {
    animation: fadeInFromTop 0.5s ease-out forwards;
}

.visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Enhanced hover transitions for all interactive elements */
.testimonial-grid .card,
.property-card,
.post-card,
.service-card-interactive {
    transition: all 0.3s ease !important;
}

/* Enhanced button animations */
.btn {
    transition: all 0.3s ease !important;
    position: relative;
    overflow: hidden;
}

/* Enhanced navigation animations */
.nav-links li a {
    transition: all 0.3s ease !important;
}

/* Enhanced form animations */
.form-group input,
.form-group textarea {
    transition: all 0.3s ease !important;
}

/* Staggered animation for lists */
.values-list li {
    opacity: 0;
    transform: translateX(-20px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.values-list li:nth-child(1) { animation-delay: 0.1s; }
.values-list li:nth-child(2) { animation-delay: 0.2s; }
.values-list li:nth-child(3) { animation-delay: 0.3s; }
.values-list li:nth-child(4) { animation-delay: 0.4s; }
.values-list li:nth-child(5) { animation-delay: 0.5s; }
.values-list li:nth-child(6) { animation-delay: 0.6s; }

/* Pulse animation for call-to-action buttons */
.btn-secondary {
    animation: pulse 2s infinite;
}

/* New Image Links Section */
.image-links-section {
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 30px;
    padding-bottom: 60px;
}

.image-links-section .page-container {
    padding-top: 0;
    padding-bottom: 0;
}

.image-link-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 20px;
}

.image-link-card {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: all 0.4s ease;
}

/* Scroll animation initial states */
.scroll-animate {
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.scroll-animate[data-animation="slide-left"] {
    transform: translateX(-100px);
}

.scroll-animate[data-animation="slide-right"] {
    transform: translateX(100px);
}

.scroll-animate.animate-in {
    opacity: 1;
    transform: translateX(0);
}

.image-link-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.image-link-card img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.image-link-card:hover img {
    transform: scale(1.05);
}

.image-link-text {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    color: #fff;
    padding: 40px 25px 25px;
    text-align: left;
}

.image-link-text h3 {
    color: #fff;
    font-size: 2em;
    margin: 0;
    font-weight: 800;
}

/* --- Expert Sales Section (Full Viewport) --- */
.expert-sales-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin-top: 0;
    background-color: #ffffff;
    position: relative;
}

.expert-sales-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.875rem;
    max-width: 87.5rem;
    width: 100%;
    padding: 3.75rem clamp(0.75rem, 1.5vw, 2.5rem) 3.75rem clamp(0.75rem, 1.5vw, 1.875rem);
    align-items: stretch;
    box-sizing: border-box;
}

.expert-sales-image {
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: flex;
    align-items: stretch;
}

.expert-sales-image img {
    width: 100%;
    height: 100%;
    min-height: 100%;
    object-fit: cover;
    object-position: top center;
    border-radius: 25px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    transition: transform 0.4s ease;
    flex: 1;
}

.expert-sales-image img:hover {
    transform: scale(1.02);
}

.expert-sales-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 4px;
}

.expert-sales-content h1 {
    font-family: var(--font-heading);
    color: var(--dark-text);
    font-size: 2.5em;
    line-height: 1.2;
    margin: 0 0 10px 0;
    font-weight: 700;
}

.expert-sales-text {
    color: var(--light-text);
    line-height: 1.6;
}

.expert-sales-text p {
    margin-bottom: 4px;
}

.expert-sales-text p:first-of-type {
    margin-top: 0;
}

.expert-sales-text ul {
    list-style: none;
    padding: 0;
    margin: 2px 0;
}

.expert-sales-text ul li {
    padding-left: 0;
    margin-bottom: 3px;
    position: relative;
}

.expert-sales-text ul li::before {
    content: "•";
    color: var(--primary-blue);
    font-weight: bold;
    font-size: 1.5em;
    margin-right: 10px;
}

.expert-closing-line {
    display: flex;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 5px;
}

.expert-sales-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 50px;
    font-size: 0.95em;
    font-weight: 700;
    animation: pulse 2s infinite;
    margin-left: 0;
    text-align: center;
    white-space: nowrap;
    line-height: 1.2;
    vertical-align: middle;
}

/* Enhanced image hover effects */
.about-me-image,
.contact-image,
.featured-post-image img,
.property-card img,
.service-card-interactive img,
.post-card-image-link img,
.post-card-image img {
    transition: all 0.4s ease !important;
}

.about-me-image:hover,
.contact-image:hover {
    transform: scale(1.02);
}

/* Loading animation for page transitions */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

.content-animate {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 0.8s ease-out forwards;
}

/* --- Modern fade-in animation for body text (o_mne & kontakt) --- */
.rise-text {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease-out, transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    will-change: transform, opacity;
    display: block;
}
.rise-text.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Ensure contact-intro paragraphs spacing */
.contact-intro p { margin-bottom: 0.75rem; }
/* ======================================== */
/* --- RESPONSIVE DESIGN FOR MOBILE & TABLET --- */
/* ======================================== */

/* --- Mobile Menu Hamburger Icon --- */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    width: 28px;
    height: 3px;
    background-color: var(--dark-text);
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.is-active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.mobile-menu-toggle.is-active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.is-active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Hide mobile CTA button on desktop */
.mobile-cta-link {
    display: none;
}

/* ==========================================================================
   CRITICAL TABLET RANGE (768px - 1200px)
   Forces stacked layouts to prevent iPad explosion and narrow column issues
   ========================================================================== */
@media (min-width: 768px) and (max-width: 1200px) {
    :root {
        --header-height: 90px;
    }
    
    .header-container {
        padding: 0 25px;
    }
    
    .page-container {
        padding: 30px 25px;
    }
    
    /* Typography adjustments */
    h1 {
        font-size: 4em;
    }
    
    h2 {
        font-size: 2.8em;
    }
    
    h3 {
        font-size: 1.6em;
    }
    
    /* === FORCE STACKED LAYOUTS === */
    /* This is the critical fix for iPad and tablet issues */
    
    /* Home Hero - Stack vertically and fill viewport */
    .home-hero-section {
        flex-direction: column;
        /* Fill viewport to prevent next section from showing */
        min-height: calc(100vh - var(--header-height)) !important;
        height: auto !important;
        max-height: none !important;
        padding: 40px 30px 50px;
        gap: 2rem;
        align-items: center;
        text-align: center;
        overflow: hidden; /* Prevent overflow */
    }
    
    .hero-content {
        width: 100%;
        max-width: 800px;
        align-items: center;
        height: auto;
        justify-content: center;
    }
    
    .hero-content .description {
        max-width: 100%;
    }
    
    .hero-content .btn-secondary {
        align-self: center;
    }
    
    .hero-video-container {
        width: 100%;
        max-width: 650px;
        height: auto;
        aspect-ratio: 4/3;
    }
    
    /* Ensure image-links section starts after hero */
    .image-links-section {
        padding-top: 50px;
    }
    
    /* About Me Page - Force stacked layout */
    .about-me-container {
        flex-direction: column;
        height: auto !important;
        min-height: auto;
        padding: 40px 30px;
        gap: 2.5rem;
        align-items: center;
    }
    
    .about-me-container-reversed {
        flex-direction: column;
    }
    
    .about-me-image {
        width: 100%;
        max-width: 600px;
        height: auto;
        aspect-ratio: 4/3;
        flex: none;
    }
    
    .about-me-text {
        width: 100%;
        max-width: 800px;
        flex: none;
    }
    
    /* Contact Page - Keep side-by-side layout for tablets */
    .contact-section-container {
        flex-direction: row;
        align-items: flex-start;
        padding: 40px 30px;
        gap: 2rem;
    }
    
    .contact-text {
        flex: 1;
    }
    
    .contact-image {
        flex: 0.9;
    }

    /* Grid layouts for tablet - 2 columns max */
    .property-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .service-cards-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    /* Image links section */
    .image-link-container {
        gap: 20px;
    }
    
    .image-link-card img {
        height: 350px;
    }
    
    /* Featured post on tablet */
    .featured-post {
        flex-direction: column;
        padding: 0;
        gap: 0;
    }
    
    .featured-post-image {
        flex-basis: 100%;
        width: 100%;
    }
    
    .featured-post-image img {
        width: 100%;
        height: 280px;
        object-fit: cover;
        border-radius: 15px 15px 0 0;
    }
    
    .featured-post-content {
        flex-basis: 100%;
        width: 100%;
        padding: 30px 25px;
    }
    
    .featured-post-content h3 {
        font-size: 1.8em;
    }
    
    /* Blog post cards on tablet */
    .post-card-content h4 {
        font-size: 1.2em;
    }
    
    /* Expert Sales Section - Keep 2-column layout for laptops */
    .expert-sales-container {
        grid-template-columns: 1fr 1fr;
        gap: 35px;
        padding: 50px 30px;
        align-items: stretch;
    }
    
    .expert-sales-content h1 {
        font-size: 2.2em;
    }
    
    /* Forms tablet */
    .form-container {
        padding: 35px 30px;
    }
    
    .estimate-form-container {
        max-width: 650px;
        padding: 30px;
    }
}

/* ==========================================================================
   LARGE DESKTOP (> 1200px)
   Split screen layouts - 50/50 image and text side-by-side
   ========================================================================== */
@media (min-width: 1201px) {
    /* Home Hero - Side by side */
    .home-hero-section {
        flex-direction: row;
        align-items: center;
        text-align: left;
        min-height: calc(100vh - var(--header-height));
        height: calc(100vh - var(--header-height));
        max-height: calc(100vh - var(--header-height));
    }
    
    .hero-content {
        flex: 1 1 50%;
        align-items: flex-start;
        height: auto;
    }
    
    .hero-content .btn-secondary {
        align-self: flex-start;
    }
    
    .hero-video-container {
        flex: 0 0 auto;
        width: 50%;
        height: auto;
        aspect-ratio: 16/10;
    }
    
    /* About Me - Side by side */
    .about-me-container {
        flex-direction: row;
        align-items: center;
    }
    
    .about-me-container-reversed {
        flex-direction: row-reverse;
    }
    
    .about-me-image {
        flex: 0 0 45%;
    }
    
    .about-me-text {
        flex: 1;
    }
    
    /* Contact Page - Side by side */
    .contact-section-container {
        flex-direction: row;
        align-items: flex-start;
    }
    
    .contact-text {
        flex: 1;
    }
    
    /* Expert Sales - Force 2-column layout for large desktop */
    .expert-sales-container {
        grid-template-columns: 1fr 1fr !important;
        align-items: stretch;
        gap: 40px;
    }
    
    .contact-image {
        flex: 0.8;
    }

    /* Grid layouts for large desktop - 3-4 columns */
    .blog-grid,
    .property-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .service-cards-row {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ==========================================================================
   DESKTOP VIEWPORT-FILL (≥ 1201px)
   Containers stretch to ~97 % of viewport instead of the fixed 87.5rem
   (1400px) cap, reducing side whitespace at various browser zoom levels.
   Only affects desktop; mobile / tablet rules are untouched.
   Placed BEFORE exotic-display handlers so they can still override.
   ========================================================================== */
@media (min-width: 1201px) {
    .header-container,
    .page-container,
    .home-hero-section,
    .about-me-container,
    .contact-section-container,
    .expert-sales-container,
    .ebook-landing-container,
    .about-split-container,
    .footer-wrap {
        max-width: clamp(87.5rem, 97vw, 150rem);
        padding-left: clamp(0.75rem, 1.5vw, 2.5rem);
        padding-right: clamp(0.75rem, 1.5vw, 2.5rem);
    }

    .omne-row {
        max-width: clamp(75rem, 94vw, 140rem);
        padding-left: clamp(0.75rem, 1.5vw, 2.5rem);
        padding-right: clamp(0.75rem, 1.5vw, 2.5rem);
    }

    .section-header {
        max-width: clamp(43.75rem, 50vw, 60rem);
    }

    .about-text-content {
        max-width: clamp(42.5rem, 42vw, 60rem);
    }

    .about-me-text {
        max-width: clamp(720px, 42vw, 960px);
    }

    .service-page-section .page-container {
        max-width: clamp(87.5rem, 97vw, 150rem);
    }

    /* Hero: push content larger when viewport is wide */
    .home-hero-section {
        gap: clamp(2rem, 3vw, 5rem);
        padding-top: clamp(1rem, 2vh, 3rem);
        padding-bottom: clamp(1rem, 2vh, 3rem);
    }

    .hero-content h1 {
        font-size: clamp(6em, 5.5vw, 8em);
    }

    .hero-content .description {
        font-size: clamp(1.25em, 1.3vw, 1.6em);
        max-width: 95%;
    }

    .hero-video-container {
        width: 52%;
    }

    .hero-content {
        flex: 1 1 48%;
    }

    /* Expert sales: fill wider */
    .expert-sales-container {
        gap: clamp(1.5rem, 2.5vw, 4rem);
    }

    /* Contact: fill wider */
    .contact-section-container {
        gap: clamp(1.5rem, 2.5vw, 4rem);
    }
    
    .contact-text h2 {
        font-size: clamp(3.5em, 4vw, 5em);
    }
    
    .contact-text .description {
        font-size: clamp(1.1em, 1.2vw, 1.5em);
    }
    
    .contact-details p {
        font-size: clamp(1.1em, 1.2vw, 1.4em);
    }
    
    .social-links-section h3 {
        font-size: clamp(1.2em, 1.3vw, 1.6em);
    }
    
    .social-link {
        font-size: clamp(1em, 1.1vw, 1.3em);
        padding: clamp(12px, 1vw, 18px) clamp(18px, 1.5vw, 24px);
    }
    
    .social-icon {
        width: clamp(24px, 1.5vw, 32px);
        height: clamp(24px, 1.5vw, 32px);
    }

    /* Image links: bigger cards */
    .image-link-card img {
        height: clamp(400px, 28vw, 600px);
    }
}

/* --- Medium desktop with limited height --- */
@media (min-width: 1024px) and (max-width: 1200px) and (max-height: 700px) {
    .home-hero-section {
        min-height: calc(100vh - var(--header-height)) !important;
        height: calc(100vh - var(--header-height)) !important;
        max-height: calc(100vh - var(--header-height)) !important;
        padding: 20px 30px;
        overflow: hidden;
    }
    
    .hero-content {
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 3.5em;
        margin-bottom: 15px;
    }
    
    .hero-content .description {
        margin-bottom: 20px;
        font-size: 1em;
    }
}

/* --- Mobile Breakpoint (Max-width: 768px) --- */
@media (max-width: 768px) {
    :root {
        --header-height: 70px;
    }
    
    /* Reset and Base Styles for Mobile Header */
    .main-nav-section {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: var(--header-height);
        background-color: #fff;
        box-shadow: 0 2px 10px rgba(0,0,0,0.05);
        z-index: 1100;
    }

    .header-container {
        width: 100%;
        height: 100%;
        padding: 0 20px;
        margin: 0;
        max-width: none; /* Override desktop max-width */
        display: flex;
        align-items: center;
        justify-content: space-between;
        box-sizing: border-box;
    }

    .main-nav {
        width: 100%;
        height: 100%;
        padding: 0;
        margin: 0;
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    /* Logo Styling */
    .logo {
        font-size: 1.8em;
        z-index: 1200;
        position: relative;
        line-height: 1;
        margin: 0;
    }

    /* Hide Desktop Elements */
    .desktop-sell-btn,
    .top-bar {
        display: none !important;
    }

    /* Hamburger Menu Button */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 44px; /* Minimum touch target */
        height: 44px; /* Minimum touch target */
        background: transparent;
        border: none;
        padding: 0;
        margin: 0 -10px 0 0; /* Negative margin to align with edge visually */
        cursor: pointer;
        z-index: 1200;
        position: relative;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-menu-toggle span {
        display: block;
        width: 24px;
        height: 2px;
        background-color: var(--dark-text);
        margin: 2.5px 0;
        border-radius: 2px;
        transition: all 0.3s ease;
        transform-origin: center;
    }

    /* Hamburger Animation State */
    .mobile-menu-toggle.is-active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-toggle.is-active span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-toggle.is-active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* Mobile Navigation Drawer */
    .nav-links {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        width: 75%; /* Slightly narrower */
        max-width: 260px; /* Reduced max-width */
        height: 100vh;
        height: 100dvh; /* Dynamic viewport height for iOS */
        background-color: #fff;
        padding: calc(var(--header-height) + 30px) 20px 30px;
        margin: 0;
        display: flex;
        flex-direction: column;
        gap: 5px;
        box-shadow: -5px 0 30px rgba(0,0,0,0.15);
        transform: translateX(100%); /* Hidden by default */
        transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
        z-index: 1150;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        visibility: visible; /* Ensure it's visible for transition */
        box-sizing: border-box; /* Ensure padding is included in width */
    }

    .nav-links.nav-active {
        transform: translateX(0);
    }

    /* Overlay */
    .mobile-nav-overlay {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        backdrop-filter: blur(2px);
        z-index: 1050; /* Lower than header (1100) so menu sits on top */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    body.nav-open .mobile-nav-overlay {
        opacity: 1;
        visibility: visible;
    }

    /* Nav Items */
    .nav-links li {
        width: 100%;
        border-bottom: 1px solid rgba(0,0,0,0.05); /* Small divider */
        opacity: 0; /* For stagger animation */
        transform: translateX(20px);
        transition: opacity 0.3s ease, transform 0.3s ease;
    }
    
    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links.nav-active li {
        opacity: 1;
        transform: translateX(0);
    }

    /* Stagger Delays */
    .nav-links.nav-active li:nth-child(1) { transition-delay: 0.1s; }
    .nav-links.nav-active li:nth-child(2) { transition-delay: 0.15s; }
    .nav-links.nav-active li:nth-child(3) { transition-delay: 0.2s; }
    .nav-links.nav-active li:nth-child(4) { transition-delay: 0.25s; }
    .nav-links.nav-active li:nth-child(5) { transition-delay: 0.3s; }
    .nav-links.nav-active li:nth-child(6) { transition-delay: 0.35s; }
    .nav-links.nav-active li:nth-child(7) { transition-delay: 0.4s; }
    .nav-links.nav-active li:nth-child(8) { transition-delay: 0.45s; }

    .nav-links li a {
        display: block;
        padding: 12px 15px; /* Slightly tighter padding */
        font-size: 1.1em; /* Slightly smaller font */
        color: var(--dark-text);
        font-weight: 600;
        border-radius: 8px;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

    .nav-links li a:active,
    .nav-links li a:hover {
        background-color: var(--light-grey-bg);
        color: var(--primary-blue);
    }

    .nav-links li a::after {
        display: none;
    }

    /* Mobile CTA Button */
    .mobile-cta-link {
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        margin-top: 25px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding: 0 !important;
        border: none !important;
        width: 100%;
        box-sizing: border-box;
    }

    .mobile-cta-link a {
        display: inline-flex;
        justify-content: center;
        align-items: center;
        width: 100% !important;
        max-width: 100%;
        box-sizing: border-box;
        background: linear-gradient(135deg, var(--primary-blue) 0%, #004e75 100%);
        color: #fff !important;
        padding: 40px 20px !important; /* Increased vertical padding */
        border-radius: 20px !important; /* Adjusted radius for 2-line look */
        box-shadow: 0 12px 25px rgba(0, 48, 73, 0.25);
        text-transform: uppercase;
        letter-spacing: 1px;
        font-size: 1.1em !important; /* Larger font size */
        font-weight: 900; /* Extra bold */
        text-align: center;
        white-space: normal;
        line-height: 1.3; /* Better line spacing */
    }
    
    .mobile-cta-link a:active {
        transform: scale(0.98);
        box-shadow: 0 4px 8px rgba(0, 48, 73, 0.15);
    }

    /* Body Padding for Fixed Header */
    body {
        padding-top: calc(var(--header-height) + env(safe-area-inset-top));
    }

    /* Page Container Adjustments */
    .page-container {
        padding: 30px 20px;
    }

    /* Home Hero Adjustments */
    .home-hero-section {
        flex-direction: column;
        padding: 30px 20px 50px;
        height: auto;
        min-height: auto;
        text-align: center;
        justify-content: center;
    }

    .hero-content {
        width: 100%;
        margin-top: 0;
        align-items: center;
    }
    
    .hero-content .remax-award {
        margin-bottom: 10px;
        /* Ensure remax-award is always visible on mobile */
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-content h1 {
        font-size: 3em; /* Larger for better mobile visibility */
        margin-bottom: 20px;
    }

    .hero-content .description {
        max-width: 100%;
        margin-bottom: 25px;
        font-size: 1.05em;
        line-height: 1.6;
        /* Ensure description is always visible on mobile */
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-content .btn-secondary {
        margin: 0 auto;
        padding: 14px 32px;
        /* Ensure button is always visible on mobile */
        opacity: 1 !important;
        transform: none !important;
    }

    .hero-video-container {
        display: none !important;
    }

    /* General Mobile Adjustments */
    .image-link-container {
        grid-template-columns: 1fr;
    }

    .testimonial-grid,
    .property-grid,
    .service-cards-row {
        grid-template-columns: 1fr;
    }
    
    /* Featured Blog Post Mobile */
    .featured-post {
        flex-direction: column;
        padding: 0;
        gap: 0;
        margin-bottom: 40px;
    }
    
    .featured-post-image {
        flex-basis: 100%;
        width: 100%;
    }
    
    .featured-post-image img {
        width: 100%;
        height: 220px;
        object-fit: cover;
        border-radius: 15px 15px 0 0;
    }
    
    .featured-post-content {
        flex-basis: 100%;
        width: 100%;
        padding: 25px 20px;
        text-align: center;
    }
    
    .featured-post-content h3 {
        font-size: 1.5em;
        line-height: 1.3;
        margin-bottom: 15px;
    }
    
    .featured-post-content > p:not(.post-meta) {
        font-size: 0.95em;
        line-height: 1.5;
        margin-bottom: 20px;
    }
    
    .featured-post-content .btn {
        font-size: 1em;
        padding: 14px 28px;
        display: inline-block;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        width: auto;
        max-width: 90%;
        text-align: center;
        white-space: normal;
        word-wrap: break-word;
        box-sizing: border-box;
    }
    
    /* Blog post cards mobile - Horizontal Scroll */
    .blog-grid {
        display: flex;
        flex-direction: row;
        overflow-x: auto;
        overflow-y: hidden;
        gap: 20px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 10px;
        padding-left: 20px;
        padding-right: 60px;
        margin-left: -20px;
        margin-right: -20px;
    }
    
    .blog-grid::-webkit-scrollbar {
        display: none;
    }
    
    .post-card {
        display: flex;
        flex-direction: column;
        height: auto;
        flex: 0 0 280px;
        width: 280px;
        scroll-snap-align: start;
    }
    
    .post-card-image-link img,
    .post-card-image img {
        height: 200px;
        object-fit: cover;
    }
    
    .post-card-content {
        padding: 18px;
        flex: 0 0 auto;
        display: flex;
        flex-direction: column;
    }
    
    .post-card-content h4 {
        font-size: 1.1em;
        margin-bottom: 10px;
        line-height: 1.3;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .post-card-content > p:not(.post-meta) {
        font-size: 0.88em;
        line-height: 1.5;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        margin-bottom: 10px;
    }
    
    /* Old blog styles removed - now in blog.html and blog_detail.html templates */

    .contact-section-container {
        flex-direction: column-reverse;
        height: auto;
        padding: 30px 20px 40px;
        gap: 30px;
    }

    .about-me-container {
        flex-direction: column;
        height: auto;
        padding: 0 20px 20px;
        gap: 20px;
    }

    .about-me-container-reversed {
        flex-direction: column;
    }

    .about-me-image {
        width: 100%;
        height: 300px;
        flex: none;
    }
    
    .contact-image {
        width: 100%;
        height: auto;
        flex: none;
    }

    .about-me-text {
        height: auto;
    }

    .about-me-text h2 {
        font-size: 1.8em;
    }

    /* Form Adjustments */
    .form-container,
    .estimate-form-container {
        padding: 25px 20px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    /* Expert Sales Section - Mobile */
    .expert-sales-section {
        min-height: 100vh;
        padding: 0;
    }
    
    .expert-sales-container {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 40px 20px;
    }
    
    .expert-sales-image {
        order: 1;
        height: 100%;
        min-height: 100%;
        align-items: stretch;
    }
    
    .expert-sales-content {
        order: 2;
        gap: 8px;
    }
    
    .expert-sales-content h1 {
        font-size: 1.8em;
        line-height: 1.3;
    }
    
    .expert-sales-text {
        font-size: 0.95em;
    }
    
    .expert-sales-image img {
        width: 100%;
        height: 100%;
        min-height: 100%;
        object-fit: cover;
        object-position: top center;
        border-radius: 20px;
    }
    
    .expert-closing-line {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .expert-sales-cta {
        width: auto;
        text-align: center;
        padding: 12px 35px;
        margin-left: 0;
    }
}

/* --- Small Mobile Breakpoint (Max-width: 480px) --- */
@media (max-width: 480px) {
    :root {
        --header-height: 65px;
    }
    
    .logo {
        font-size: 2em;
    }
    
    .page-container {
        padding: 25px 15px;
    }
    
    /* Typography small mobile */
    h1 {
        font-size: 2.8em; /* Larger for small mobile screens */
    }
    
    h2 {
        font-size: 1.8em;
    }
    
    h3 {
        font-size: 1.3em;
    }
    
    /* Home hero small mobile */
    .home-hero-section {
        padding: 20px 15px 40px;
    }
    
    .hero-video-container {
        display: none;
    }
    
    .hero-video-container video {
        display: none;
    }
    
    /* Image links small mobile */
    .image-link-card img {
        height: 240px;
    }
    
    .image-link-text {
        padding: 30px 20px 20px;
    }
    
    .image-link-text h3 {
        font-size: 1.4em;
    }
    
    /* About & Contact small mobile */
    .about-me-container,
    .contact-section-container {
        margin: 20px auto 30px;
        padding: 0 15px;
        gap: 25px;
    }
    
    /* E-books Section - Small Mobile View */
    .ebooks-section {
        padding: 35px 0;
    }
    
    .ebooks-section .section-header {
        padding: 0 15px;
        margin-bottom: 25px;
    }
    
    .ebooks-section .section-header h2 {
        font-size: 1.3em;
    }
    
    .ebooks-section .section-header p {
        font-size: 0.85em;
    }
    
    .ebooks-grid {
        gap: 25px;
        padding: 0 15px;
    }
    
    .ebook-image {
        height: 160px;
        padding: 15px;
    }
    
    .ebook-image img {
        max-width: 130px;
    }
    
    .ebook-card--pronajem {
        align-items: center;
    }
    
    .ebook-card--pronajem .ebook-image {
        width: auto;
        min-width: unset;
        align-items: center;
    }
    
    .ebook-content {
        padding: 20px 18px;
    }
    
    .ebook-content h3 {
        font-size: 1.15em;
    }
    
    .ebook-subtitle {
        font-size: 0.82em;
    }
    
    .ebook-description {
        font-size: 0.78em;
    }
    
    .ebook-benefits {
        padding: 14px;
    }
    
    .ebook-benefits p {
        font-size: 0.78em;
    }
    
    .ebook-benefits ul li {
        font-size: 0.75em;
    }
    
    .ebook-cta-text {
        font-size: 0.82em;
    }
    
    .ebook-btn {
        font-size: 0.88em;
        padding: 12px 20px;
    }
    
    /* E-book Landing Pages - Small Mobile */
    .ebook-landing-section {
        padding: 20px 12px;
    }
    
    .ebook-landing-header h1 {
        font-size: 1.2em;
    }
    
    .landing-subtitle {
        font-size: 0.85em;
    }
    
    .ebook-landing-content {
        padding: 20px 16px;
        gap: 18px;
    }
    
    .ebook-preview-image {
        padding: 15px;
        min-height: 220px;
    }
    
    .ebook-preview-image img {
        max-width: 170px;
    }
    
    .ebook-preview-benefits {
        padding: 14px 16px;
    }
    
    .ebook-preview-benefits h3 {
        font-size: 0.95em;
    }
    
    .ebook-preview-benefits ul li {
        font-size: 0.8em;
        padding: 4px 0 4px 22px;
    }
    
    .ebook-landing-form input {
        font-size: 0.88em;
        padding: 10px 12px;
    }
    
    .ebook-submit-btn {
        font-size: 0.9em;
        padding: 12px 20px;
    }

    .about-me-image {
        height: 280px;
    }
    
    /* Contact image - smaller square format for mobile */
    .contact-image {
        max-width: 250px !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 auto;
        border-radius: 20px;
        flex: none !important;
    }

    .about-me-text h2 {
        font-size: 1.6em;
    }

    .about-me-text p {
        font-size: 0.95em;
    }

    .estimate-form-container .section-header p {
        font-size: 0.9em;
    }
    
    .estimate-form-container .section-header h2 {
        font-size: 1.7em;
    }
    
    .phone-link {
        font-size: 1.1em;
    }
    
    /* Old blog styles removed - now in blog.html and blog_detail.html templates */
    
    .recent-posts-title {
        font-size: 1.6em;
        margin-bottom: 25px;
        text-align: left;
    }
    
    .recent-posts-title::after {
        content: " →";
        color: var(--primary-blue);
        font-size: 0.9em;
        margin-left: 8px;
    }
    
    /* Featured blog post - very small mobile */
    .featured-post {
        margin-bottom: 30px;
    }
    
    .featured-post-image img {
        height: 180px;
    }
    
    .featured-post-content {
        padding: 20px 15px;
        text-align: center;
    }
    
    .featured-post-content h3 {
        font-size: 1.3em;
        line-height: 1.3;
        margin-bottom: 12px;
    }
    
    .featured-post-content > p:not(.post-meta) {
        font-size: 0.9em;
        line-height: 1.4;
        margin-bottom: 18px;
    }
    
    .featured-post-content .btn {
        font-size: 0.9em;
        padding: 12px 24px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        margin: 0 auto;
        width: 90%;
        max-width: 380px;
        text-align: center;
        line-height: 1.2;
    }
    
    /* Blog post cards - very small mobile */
    .post-card-image-link img,
    .post-card-image img {
        height: 180px;
    }
    
    .post-card-content {
        padding: 18px 15px;
    }
    
    .post-card-content h4 {
        font-size: 1.1em;
        line-height: 1.3;
        margin-bottom: 10px;
    }
    
    .post-card-content > p:not(.post-meta) {
        font-size: 0.85em;
        line-height: 1.4;
        margin-bottom: 12px;
    }
    
    .post-card-content .read-more {
        font-size: 0.85em;
    }

    /* Testimonials small mobile */
    .card {
        padding: 20px;
    }
    
    .testimonial-text {
        font-size: 0.95em;
    }
    
    /* Property cards small mobile */
    .property-text {
        padding: 20px;
    }
    
    .property-card img {
        height: 200px;
    }
    
    /* Old blog post card styles removed - now in templates */
    
    /* Service cards small mobile */
    .service-card-interactive img {
        height: 140px;
    }
    
    .service-card-interactive h4 {
        font-size: 1.1em;
    }
    
    .service-card-interactive p {
        font-size: 0.85em;
    }
    
    /* FAQ small mobile */
    .faq-question {
        padding: 14px 16px;
        font-size: 0.95em;
    }
    
    .faq-answer p {
        padding: 0 16px 18px;
        font-size: 0.85em;
    }
    
    /* Expert Sales Section - Small Mobile */
    .expert-sales-container {
        padding: 30px 15px;
        gap: 20px;
    }
    
    .expert-sales-content h1 {
        font-size: 1.6em;
    }
    
    .expert-sales-text {
        font-size: 0.9em;
    }
    
    .expert-sales-text ul li {
        margin-bottom: 5px;
        font-size: 0.95em;
    }
}

/* --- Limited height desktop viewports (e.g., 1280x631) --- */
@media (min-width: 1201px) and (max-height: 700px) {
    .home-hero-section {
        /* Ensure hero fills viewport even on short heights */
        min-height: calc(100vh - var(--header-height));
        height: calc(100vh - var(--header-height));
        max-height: calc(100vh - var(--header-height));
        padding: 20px 30px;
        overflow: hidden;
    }
    
    .hero-content {
        justify-content: center;
    }
    
    .hero-content h1 {
        font-size: 4em;
        margin-bottom: 15px;
    }
    
    .hero-content .description {
        margin-bottom: 20px;
        font-size: 1em;
    }
    
    .hero-content .btn-secondary {
        margin-top: 0;
    }
    
    .image-links-section {
        padding-top: 50px;
    }
}

/* --- Landscape orientation adjustments for mobile --- */
@media (max-width: 768px) and (orientation: landscape) {
    .home-hero-section {
        height: auto;
        min-height: auto;
    }
    
    .hero-video-container {
        display: none;
    }
    
    .hero-video-container video {
        display: none;
    }
    
.about-me-image {
        height: 250px;
    }
    
    /* Adjust navigation for landscape */
    .nav-links {
        max-height: 70vh;
    }
}

/* --- iPad and tablet-specific optimizations --- */
@media (min-width: 769px) and (max-width: 1024px) {
    /* Enhanced touch targets for tablets */
    .nav-links li a {
        padding: 8px 0;
    }
    
    /* Better card layouts for tablet */
    .property-card,
    .post-card,
    .service-card-interactive {
        transition: all 0.3s ease;
    }
    
    /* Tablet-optimized grids */
    .testimonial-grid {
        gap: 30px;
    }
    
    /* Expert Sales Section - Tablet */
    .expert-sales-container {
        gap: 40px;
        padding: 60px 40px;
    }
    
    .expert-sales-content h1 {
        font-size: 2.2em;
    }
}

/* --- Large phone landscape (e.g., iPhone Pro Max landscape) --- */
@media (min-width: 481px) and (max-width: 768px) and (orientation: landscape) {
    .hero-video-container {
        height: 280px;
    }
    
.about-me-image {
        height: 300px;
    }
    
    .image-link-card img {
        height: 260px;
    }
}

/* --- Prevent zoom on double-tap for iOS --- */
@media (max-width: 768px) {
    button,
    a {
        touch-action: manipulation;
    }
}

.consent-group {
    display: flex !important;
    align-items: center !important;
    gap: 8px;
    margin-top: 10px;
}

.consent-group input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    vertical-align: middle;
}

.consent-group label {
    margin: 0;
    font-weight: normal;
    line-height: 1.4;
}

.consent-group a {
    text-decoration: underline;
    color: var(--primary-blue);
}
/* About Me Reversed Container */
.about-me-container-reversed {
    flex-direction: row-reverse;
}

/* Mobile adjustments for reversed container */
@media (max-width: 992px) {
    .about-me-container-reversed {
        flex-direction: column;
    }
    
    /* E-books Section - Tablet View */
    .ebooks-section {
        padding: 50px 0;
        min-height: auto;
    }
    
    .ebooks-grid {
        gap: 40px;
        padding: 0 20px;
    }
    
    .ebook-card {
        flex-direction: column;
        gap: 25px;
        align-items: center;
    }
    
    .ebooks-section .section-header h2 {
        font-size: 1.8em;
    }
    
    .ebooks-section .section-header {
        margin-bottom: 30px;
    }
    
    .ebook-image {
        width: 240px;
        min-width: 240px;
    }
    
    .ebook-image img {
        max-width: 240px;
    }
    
    .ebook-card--pronajem {
        align-items: center;
    }
    
    .ebook-card--pronajem .ebook-image {
        width: 240px;
        min-width: 240px;
        align-items: center;
    }
    
    .ebook-content {
        justify-content: flex-start;
    }
    
    .ebook-content h3 {
        font-size: 1.5em;
    }
    
    /* E-book Landing Pages - Tablet */
    .ebook-landing-section {
        padding: 30px 20px;
        max-height: none;
    }
    
    .ebook-landing-header h1 {
        font-size: 1.6em;
    }
    
    .landing-subtitle {
        font-size: 1em;
    }
    
    .ebook-landing-content {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    
    .ebook-preview-image {
        padding: 0;
        min-height: auto;
    }
    
    .ebook-preview-image img {
        max-width: 300px;
    }
    
    .ebook-preview-benefits h3 {
        font-size: 1.3em;
        margin-bottom: 20px;
    }
    
    .ebook-preview-benefits ul {\n        gap: 15px;
    }
    
    .ebook-preview-benefits ul li {\n        font-size: 0.95em;
        padding: 16px 18px;
    }
    
    .ebook-preview-benefits ul li strong {
        font-size: 1.05em;
    }
}

/* Slight enlargement used by nemovitosti; reused for reviews */
.is-enlarged {
    transform: scale(1.06);
    box-shadow: 0 12px 24px rgba(0,0,0,0.18);
    z-index: 30;
    transition: transform 180ms ease, box-shadow 180ms ease;
    cursor: pointer;
}

/* Ensure smooth transitions for clickable items */
.reviews .review,
.property-image,
.gallery-item {
    transition: transform 180ms ease, box-shadow 180ms ease;
    transform-origin: center center;
    display: inline-block; /* reduce layout shift */
    will-change: transform;
}

/* Mobile CTA alignment fix: ensure text is vertically centered in the mobile menu button */
.mobile-cta-link a {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    height: 44px; /* touch-friendly minimum */
    line-height: 1 !important;
    vertical-align: middle !important;
    padding: 10px 20px !important;
    border-radius: 8px;
}

/* Small bounce animation used when user clicks Reference again on desktop */
@keyframes smallBounce {
    0% { transform: translateY(0); }
    30% { transform: translateY(-10px); }
    60% { transform: translateY(0); }
    100% { transform: translateY(0); }
}
.nav-bounce {
    animation: smallBounce 520ms cubic-bezier(0.22, 1, 0.36, 1);
}

/* ==========================================================================
   LEGACY SUPPORT & TABLET OPTIMIZATION (iPad/Tablet Specifics)
   Comprehensive responsive design for tablets and iPads in all orientations
   ========================================================================== */

/* === iPad Pro 13" PORTRAIT MODE (1024x1366 viewport) === */
@media screen and (min-width: 1024px) and (max-width: 1024px) and (min-height: 1300px) and (max-height: 1400px) and (orientation: portrait) {
    .home-hero-section {
        min-height: auto;
        height: auto !important;
        padding: 40px 40px 30px;
        display: flex;
        flex-direction: column;
        gap: 2rem;
    }

    .hero-content {
        width: 100%;
        margin-top: 0;
    }

    .hero-content h1 {
        font-size: 4em;
        margin-bottom: 20px;
    }

    .hero-video-container {
        width: 100%;
        height: 550px;
        margin-top: 0;
    }

    .image-links-section {
        margin-top: 0 !important;
        padding-top: 40px !important;
        padding-bottom: 60px;
    }

    .image-link-container {
        gap: 30px;
    }

    .image-link-card img {
        height: 450px;
    }

    .expert-sales-section {
        padding: 60px 40px;
        min-height: auto;
    }

    .expert-sales-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .expert-sales-image img {
        max-width: 700px;
        margin: 0 auto;
    }
}

/* === TABLET PORTRAIT MODE (768px - 1024px) === */
/* Handles iPad Portrait, Android tablets portrait, and small laptops */
@media screen and (min-width: 769px) and (max-width: 1024px) and (orientation: portrait) {
    /* Navigation - Fix "O mně" squishing issue */
    .header-container {
        padding: 0 20px;
        max-width: 100%;
    }

    .logo {
        font-size: 2em;
        margin-right: 15px;
    }

    .nav-links {
        gap: 15px;
        font-size: 0.85em;
    }

    /* Hide desktop CTA button, show compact version in nav */
    .desktop-sell-btn {
        display: none !important;
    }

    .mobile-cta-link {
        display: block !important;
    }

    .mobile-cta-link a.btn {
        padding: 10px 16px !important;
        font-size: 0.9em !important;
        white-space: nowrap;
        margin-top: 0 !important;
    }

    /* Hero Section - Remove fixed heights, prevent white borders */
    .home-hero-section {
        height: auto !important;
        min-height: 70vh;
        padding: 50px 30px 40px;
        gap: 2.5rem;
        align-items: center;
        margin-bottom: 0;
    }

    .hero-content {
        flex: 1;
        margin-top: 0;
    }

    .hero-content h1 {
        font-size: 3.5em;
        line-height: 1.1;
    }

    .hero-content .description {
        font-size: 1.05em;
        max-width: 100%;
    }

    .image-links-section {
        margin-top: 0 !important;
        padding-top: 30px !important;
    }

    .image-link-container {
        gap: 25px;
    }

    .hero-video-container {
        flex: 1;
        width: 48%;
        height: auto;
        max-height: 500px;
        aspect-ratio: 4/3;
        align-self: center;
    }

    /* About Me Page - Flexible layout */
    .about-me-container {
        height: auto !important;
        padding: 0 30px 30px;
        gap: 2.5rem;
    }

    .about-me-image {
        flex: 0 0 45%;
        height: 550px;
    }

    .about-me-text {
        flex: 0 0 50%;
        height: auto;
    }

    /* Contact Page - Flexible layout */
    .contact-section-container {
        height: auto !important;
        min-height: auto;
        padding: 30px;
        gap: 2rem;
    }

    /* Grid Layouts - 2 columns for better spacing */
    .property-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }

    .service-cards-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    /* Page containers */
    .page-container {
        padding: 30px 25px;
    }
}

/* === TABLET LANDSCAPE MODE (1024px - 1366px) === */
/* Handles iPad Landscape, Android tablets landscape */
@media screen and (min-width: 1025px) and (max-width: 1366px) and (orientation: landscape) {
    /* Navigation adjustments */
    .header-container {
        padding: 0 25px;
    }

    .logo {
        font-size: 2.5em;
    }

    .nav-links {
        gap: 20px;
        font-size: 0.9em;
    }

    /* Hero Section - Optimized for landscape */
    .home-hero-section {
        height: auto !important;
        min-height: 75vh;
        max-height: none;
        padding: 40px 30px 35px;
        align-items: center;
        margin-bottom: 0;
    }

    .image-links-section {
        margin-top: 0 !important;
        padding-top: 35px !important;
    }

    .hero-content h1 {
        font-size: 4.5em;
    }

    .hero-video-container {
        height: auto;
        max-height: 600px;
        aspect-ratio: 16/10;
    }

    /* About Me & Contact - Better proportions for landscape */
    .about-me-container,
    .contact-section-container {
        height: auto !important;
        padding: 40px 30px;
    }

.about-me-image {
        height: 500px;
    }

    .about-me-text {
        height: auto;
    }

    /* Grids remain at 3 columns on landscape tablets */
    .property-grid,
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

/* === UNIVERSAL iPad Pro FIX (All models and orientations) === */
@media only screen 
  and (min-device-width: 1024px) 
  and (max-device-width: 1366px)
  and (-webkit-min-device-pixel-ratio: 2) {
    
    .home-hero-section {
        margin-bottom: 0 !important;
        padding-bottom: 30px !important;
    }
    
    .image-links-section {
        margin-top: 0 !important;
        padding-top: 35px !important;
    }
    
    .expert-sales-section {
        margin-top: 0 !important;
        padding-top: 50px !important;
    }
}

/* === iPad Pro 13\" SPECIFIC (1376x880px viewport) === */
/* Targets iPad Pro 13\" with 2064x2752 pixels, 4:3 ratio, landscape orientation */
@media screen and (min-width: 1024px) and (max-width: 1376px) and (min-height: 880px) and (max-height: 1032px) and (orientation: landscape) {
    /* Promotion Strip - Scrolling Banner */
    .ipad-promo-strip {
        display: block !important;
        width: 100%;
        background: linear-gradient(135deg, #0077b6 0%, #023e8a 100%);
        overflow: hidden;
        position: relative;
        height: 80px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .promo-content {
        display: flex;
        align-items: center;
        gap: 40px;
        animation: scroll-promo 20s linear infinite;
        white-space: nowrap;
        height: 100%;
        padding: 0 20px;
    }

    @keyframes scroll-promo {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }

    .promo-banner {
        height: 60px;
        width: auto;
        object-fit: contain;
        flex-shrink: 0;
    }

    .promo-text {
        font-size: 1.8em;
        font-weight: 700;
        color: #ffffff;
        text-transform: uppercase;
        letter-spacing: 2px;
        flex-shrink: 0;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    }

    /* Hero Section - Optimized for iPad Pro 13" with gap for promo strip */
    .home-hero-section {
        display: flex;
        align-items: flex-start;
        gap: 2.5rem;
        max-width: 1376px;
        margin: auto;
        padding: 35px 30px 10px; /* Minimal bottom padding */
        margin-top: 25px; /* Gap between promo strip and hero section */
        min-height: auto;
        box-sizing: border-box;
    }

    /* Minimal margin below hero */
    .image-links-section {
        margin-top: 0 !important;
        padding-top: 30px !important;
        padding-bottom: 50px;
    }

    /* Hero Content (Text on left) - Adjusted for 980px video */
    .hero-content {
        flex: 0 1 auto;
        width: calc(100% - 980px - 2.5rem); /* Remaining space after video and gap */
        height: 540px; /* Match video height */
        margin-top: 0;
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* Distribute content with button at bottom */
        gap: 0;
        position: relative;
        z-index: 10;
    }

    .hero-content h1 {
        font-size: 3.8em;
        margin-bottom: 20px;
        line-height: 1.1;
    }

    .hero-content .remax-award {
        font-size: 0.85em;
        margin-bottom: 12px;
    }

    .hero-content .description {
        max-width: 100%;
        margin-bottom: 25px;
        font-size: 1em;
        line-height: 1.6;
    }

    .hero-content .btn-secondary {
        padding: 14px 28px;
        font-size: 0.95em;
        margin-top: 0; /* Remove top margin */
        align-self: flex-start; /* Align button to left */
    }

    /* Video Container - Fixed at 980px x 540px */
    .hero-video-container {
        flex: 0 0 auto;
        width: 980px !important;
        height: 540px !important;
        margin-top: 0;
        overflow: hidden;
        border-radius: 28px;
        align-self: flex-start;
        position: relative;
    }

    .hero-video-container video {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
    }
}

/* === NARROW TABLETS & SMALL SCREENS (769px - 900px) === */
/* Smaller iPads, Surface Go, and narrow tablet screens */
@media screen and (min-width: 769px) and (max-width: 900px) {
    .header-container {
        padding: 0 15px;
    }

    .logo {
        font-size: 1.9em;
    }

    .nav-links {
        gap: 12px;
        font-size: 0.8em;
    }

    .desktop-sell-btn {
        display: none !important;
    }

    .mobile-cta-link {
        display: block !important;
    }

    .mobile-cta-link a.btn {
        padding: 8px 14px !important;
        font-size: 0.85em !important;
    }

    .home-hero-section {
        gap: 1.5rem;
        padding: 35px 25px 50px;
    }

    .hero-content h1 {
        font-size: 3em;
    }

    .hero-content .description {
        font-size: 1em;
    }

    /* Stack layout if needed */
    .service-cards-row {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === MEDIUM TABLETS (901px - 1100px) === */
/* Standard iPad sizes, most Android tablets */
@media screen and (min-width: 901px) and (max-width: 1100px) {
    .nav-links {
        gap: 18px;
        font-size: 0.87em;
    }

    .hero-content h1 {
        font-size: 4em;
    }

    .property-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === LARGER TABLETS & SMALL LAPTOPS (1101px - 1366px) === */
@media screen and (min-width: 1101px) and (max-width: 1366px) {
    .nav-links {
        gap: 25px;
        font-size: 0.92em;
    }

    .hero-content h1 {
        font-size: 4.8em;
    }

    /* Keep 3 colu,
    .blog-gridmn layouts */
    .property-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 22px;
    }

    .service-cards-row {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px;
    }
}

/* === ORIENTATION CHANGE HANDLING === */
/* Smooth transitions when rotating devices */
@media screen and (min-width: 769px) and (max-width: 1366px) {
    .home-hero-section,
    .about-me-container,
    .contact-section-container {
        transition: all 0.3s ease;
    }

    /* Prevent layout shift during rotation */
    .hero-video-container,
    .about-me-image,
    .contact-image {
        transition: all 0.3s ease;
    }
}

/* === FIX FOR ALL TABLETS - PREVENT WHITE BORDERS === */
@media screen and (min-width: 769px) and (max-width: 1366px) {
    /* Ensure sections fill properly without gaps */
    .page-section-grey {
        padding: 50px 0;
    }

    .page-section-grey.o-mne-section {
        padding-top: 0;
    }

    .page-container {
        max-width: 100%;
        padding: 30px;
    }

    .about-me-container {
        margin: 0 auto 40px;
    }

    /* Image containers should be flexible */
    .hero-video-container {
        max-width: 100%;
    }

    /* Maintain aspect ratios */
    .property-card img,
    .post-card-image-link img,
    .post-card-image img {
        height: auto;
        min-height: 220px;
        max-height: 280px;
        object-fit: cover;
    }Remove all fixed viewport heights that cause gaps */
    .home-hero-section,
    .about-me-container,
    .contact-section-container {
        height: auto !important;
    }

    /* Ensure sections fill properly without gaps */
    .page-section-grey {
        padding: 50px 0;
    }

    .page-container {
        max-width: 100%;
        padding: 30px
    }

    .property-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* iPad Pro 11" & iPad Air (820px - 834px width) */
@media screen and (min-width: 820px) and (max-width: 834px) {
    .nav-links {
        gap: 14px;
        font-size: 0.82em;
    }

    .hero-content h1 {
        font-size: 3.3em;
    }

    .property-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* === ENSURE READABILITY ON ALL TABLET SIZES === */
@media screen and (min-width: 769px) and (max-width: 1366px) {
    /* Adjust typography for optimal reading */
    body {
        font-size: 16px;
        line-height: 1.65;
    }

    h2 {
        font-size: 2.8em;
    }

    h3 {
        font-size: 1.6em;
    }

    /* Button sizing */
    .btn {
        padding: 12px 28px;
        font-size: 0.95em;
    }

    .btn-primary {
        padding: 14px 32px;
        font-size: 1em;
    }

    /* Touch targets */
    .nav-links li a {
        padding: 10px 5px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }
}


/* Ensure square image stays square on mobile */
@media (max-width: 992px) {
    .about-me-image.about-me-image-square {
        height: auto;
        aspect-ratio: 1 / 1;
    }
}

/* ==========================================================================
   COMPACT MINIMALISTIC FOOTER - ADBLOCK SAFE
   ========================================================================== */

.site-footer {
    background: #001d3d;
    color: #fff;
    padding: 30px 0 15px;
    margin-top: 60px;
    border-top: 2px solid var(--primary-blue);
}

.footer-wrap {
    max-width: 87.5rem;
    margin: 0 auto;
    padding: 0 clamp(0.75rem, 1.5vw, 1.875rem);
}

.footer-columns {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 30px;
    margin-bottom: 20px;
}

.footer-col {
    flex: 1;
    min-width: 200px;
}

.footer-col h4 {
    font-size: 1.1em;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: #fff;
}

.footer-col p {
    font-size: 0.9em;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.85);
    margin: 5px 0;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-col a:hover {
    color: #fff;
}

/* Footer Social Icons */
.footer-social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.footer-social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: rgba(255, 255, 255, 0.85);
    transition: all 0.3s ease;
    text-decoration: none;
}

.footer-social-icon:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-3px);
}

.footer-social-icon svg {
    width: 20px;
    height: 20px;
}

.footer-copy {
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 15px;
    text-align: center;
}

.footer-copy p {
    margin: 0;
    font-size: 0.85em;
    color: rgba(255, 255, 255, 0.7);
}

@media (max-width: 768px) {
    .site-footer {
        padding: 25px 0 15px;
        margin-top: 40px;
    }
    
    .footer-wrap {
        padding: 0 20px;
    }
    
    .footer-columns {
        flex-direction: column;
        gap: 20px;
        margin-bottom: 15px;
    }
    
    .footer-col {
        min-width: 100%;
    }
    
    .footer-col h4 {
        font-size: 1em;
    }
    
    .footer-col p {
        font-size: 0.85em;
    }
    
    /* E-books Section - Mobile View */
    .ebooks-section {
        padding: 40px 0;
        min-height: auto;
    }
    
    .ebooks-section .section-header {
        padding: 0 20px;
        margin-bottom: 30px;
    }
    
    .ebooks-section .section-header h2 {
        font-size: 1.5em;
        line-height: 1.2;
    }
    
    .ebooks-section .section-header p {
        font-size: 0.95em;
    }
    
    .ebooks-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        padding: 0 15px;
    }
    
    .ebook-card {
        border-radius: 12px;
        flex-direction: column;
    }
    
    .ebook-image {
        width: 100%;
        min-width: auto;
        height: 180px;
        padding: 20px;
    }
    
    .ebook-image img {
        max-width: 150px;
    }
    
    .ebook-content {
        padding: 25px 20px;
    }
    
    .ebook-content h3 {
        font-size: 1.25em;
        margin-bottom: 10px;
    }
    
    .ebook-subtitle {
        font-size: 0.88em;
        margin-bottom: 14px;
    }
    
    .ebook-description {
        font-size: 0.85em;
        margin-bottom: 16px;
    }
    
    .ebook-benefits {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .ebook-benefits p {
        font-size: 0.85em;
        margin-bottom: 10px;
    }
    
    .ebook-card {
        flex-direction: column;
        gap: 20px;
    }
    
    .ebook-image {
        width: 220px;
        min-width: 220px;
        align-self: center;
    }
    
    .ebook-image img {
        max-width: 220px;
    }
    
    .ebook-content {
        justify-content: flex-start;
    }
    
    .ebook-content h3 {
        font-size: 1.5em;
    }
    
    .ebook-benefits ul li {
        font-size: 0.9em;
        padding: 7px 0 7px 28px;
    }
    
    .ebook-benefits ul li:before {
        font-size: 1.3em;
    }
    
    .ebook-cta-text {
        font-size: 0.95em;
    }
    
    .ebook-btn {
        padding: 15px 30px;
        font-size: 1em;
    }
    
    /* E-book Landing Pages - Mobile */
    .ebook-landing-section {
        padding: 25px 15px;
        max-height: none;
    }
    
    .ebook-landing-header {
        margin-bottom: 25px;
    }
    
    .ebook-landing-header h1 {
        font-size: 1.5em;
    }
    
    .landing-subtitle {
        font-size: 1em;
    }
    
    .ebook-landing-content {
        gap: 30px;
    }
    
    .ebook-preview-image {
        padding: 0;
        min-height: auto;
    }
    
    .ebook-preview-image img {
        max-width: 250px;
    }
    
    .ebook-preview-benefits h3 {
        font-size: 1.3em;
        margin-bottom: 18px;
    }
    
    .ebook-preview-benefits ul {
        gap: 15px;
    }
    
    .ebook-preview-benefits ul li {
        font-size: 0.92em;
        padding: 15px;
    }
    
    .ebook-preview-benefits ul li strong {
        font-size: 1.05em;
    }
    
    .ebook-landing-form .form-group {
        margin-bottom: 16px;
    }
    
    .ebook-landing-form input {
        padding: 11px 13px;
        font-size: 0.9em;
    }
    
    .ebook-submit-btn {
        padding: 13px 24px;
        font-size: 0.95em;
    }
    
    .ebook-landing-footer {
        margin-top: 16px;
        padding-top: 14px;
    }
}

/* --- Cookie Consent Toast (Floating Design) --- */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 380px; /* Wider for better look */
    max-width: 90vw;
    background-color: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    padding: 14px 20px; /* Less vertical padding */
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
    border-left: 4px solid var(--primary-blue);
    box-sizing: border-box;
    font-size: 13px;
    display: flex; /* Flex layout to make it compact */
    flex-direction: column;
    justify-content: center;
}

.cookie-banner.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 8px; /* Tighter gap */
}

.cookie-text {
    font-size: 1em;
    color: var(--dark-text);
    line-height: 1.4;
}

.cookie-text strong {
    font-size: 1.1em;
    display: inline-block; /* Inline with text potentially? No, block is fine but margin reduced */
    margin-bottom: 2px;
    color: var(--primary-blue);
}

.cookie-text p {
    margin: 0;
}

.cookie-text a {
    color: var(--light-text);
    text-decoration: underline;
    font-size: 0.9em;
}

.cookie-buttons {
    display: flex;
    flex-direction: row-reverse; /* Put Primary (Accept) first visually but right-aligned */
    gap: 8px;
    margin-top: 4px;
}

.btn-cookie {
    border-radius: 4px;
    font-weight: 600;
    font-size: 0.95em;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    padding: 8px 12px;
}

/* Primary Button (Accept) - High Visibility */
.btn-cookie-accept {
    flex: 2; /* Takes more space */
    background-color: var(--primary-blue);
    color: white;
    border: none;
    box-shadow: 0 2px 5px rgba(0,48,73,0.2);
}

.btn-cookie-accept:hover {
    background-color: #0b2336; /* Darker blue */
    transform: translateY(-1px);
}

/* Secondary Button (Reject) - Minimalist/Less Likeable */
.btn-cookie-reject {
    flex: 1;
    background-color: transparent;
    color: #999; /* Grey text */
    border: 1px solid transparent; /* No visible border initially */
    font-weight: 500;
    font-size: 0.85em; /* Smaller text */
}

.btn-cookie-reject:hover {
    color: var(--dark-text);
    text-decoration: underline;
}

/* Mobile Responsiveness */
@media (max-width: 576px) {
    .cookie-banner {
        width: auto; /* Allow full width scaling */
        left: 10px;  /* Small margin left */
        right: 10px; /* Small margin right */
        bottom: 20px; /* Floating slightly above bottom */
        max-width: none; /* Remove desktop constraints */
        padding: 16px; /* Slightly more padding for touch */
        border-radius: 12px; /* Softer corners on mobile */
        box-shadow: 0 4px 15px rgba(0,0,0,0.2); /* Deep shadow for layering */
    }

    .cookie-content {
        gap: 12px; /* More space between text and buttons */
    }

    .cookie-text {
        font-size: 14px; /* Readable text size */
    }

    .cookie-buttons {
        gap: 10px;
        margin-top: 5px;
    }

    .btn-cookie {
        padding: 12px 10px; /* Larger touch target height */
        font-size: 14px; 
    }
}

/* Ultrawide safety: cap media so it never feels oversized */
@media (min-width: 1600px) {
    .hero-video-container {
        max-height: 620px;
    }
}

/* ==========================================================================
   EXOTIC DISPLAY ASPECT RATIOS - CRITICAL REFACTOR
   Handles 21:9 Ultrawide, 4:3 Boxy, and 1:1 Square displays
   Home Page: Fullscreen video + text, then natural scroll
   O-mne Page: Adaptive grid layouts
   ========================================================================== */

/* === ULTRAWIDE DISPLAYS (21:9 and wider) === */
@media (min-aspect-ratio: 21/9) and (min-width: 1201px) {
    /* HOME PAGE - STRICT FULLSCREEN HERO */
    .home-hero-section {
        height: 100vh;
        min-height: 100vh;
        max-height: 100vh;
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        padding: 60px 80px;
        gap: 5rem;
    }
    
    .hero-content {
        flex: 1 1 45%;
        max-width: 650px;
    }
    
    .hero-video-container {
        flex: 1 1 55%;
        height: 85vh;
        max-height: 85vh;
        width: auto;
        border-radius: 32px;
    }
    
    .hero-content h1 {
        font-size: 6.5em;
    }
    
    .hero-content .description {
        font-size: 1.3em;
    }
    
    /* Image Links Section - 3 COLUMN GRID for ultrawide */
    .image-links-section {
        padding: 80px 0;
    }
    
    .image-link-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
        max-width: 1800px;
        margin: 0 auto;
    }
    
    /* Testimonials - 3 columns to utilize width */
    .testimonial-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 40px;
    }
    
    /* O-MNE PAGE - Ultrawide Adaptive Layout */
    .about-split-container {
        max-width: 1800px;
        gap: 80px;
    }
    
    .about-image-wrapper {
        flex: 0 0 45%;
    }
    
    .about-text-wrapper {
        flex: 0 0 55%;
    }
    
    .about-text-content {
        max-width: 800px;
        padding: 32px;
    }
    
    /* Services - 4-5 columns */
    .service-cards-row {
        grid-template-columns: repeat(5, 1fr);
        gap: 30px;
    }
}

/* === BOXY DISPLAYS (4:3, 5:4, and 1:1 Square) === */
@media (max-aspect-ratio: 4/3) and (min-width: 1201px) {
    /* HOME PAGE - FULLSCREEN STACKED LAYOUT */
    .home-hero-section {
        height: 100vh;
        min-height: 100vh;
        max-height: 100vh;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 80px 60px;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-content {
        flex: 0 0 auto;
        width: 100%;
        max-width: 700px;
        align-items: center;
    }
    
    .hero-content .btn-secondary {
        align-self: center;
    }
    
    .hero-video-container {
        flex: 1 1 auto;
        width: 90%;
        max-width: 800px;
        height: auto;
        max-height: 45vh;
        border-radius: 28px;
    }
    
    .hero-content h1 {
        font-size: 4.5em;
    }
    
    /* Image Links - Stack vertically with generous padding */
    .image-links-section {
        padding: 60px 40px 80px;
    }
    
    .image-link-container {
        grid-template-columns: 1fr;
        gap: 40px;
        max-width: 900px;
        margin: 0 auto;
    }
    
    .image-link-card img {
        height: 500px;
    }
    
    /* Testimonials - Stack vertically to avoid cramping */
    .testimonial-grid {
        grid-template-columns: 1fr;
        gap: 30px;
        max-width: 800px;
        margin: 0 auto;
    }
    
    /* Expert Sales Section - iPad Pro 13" */
    .expert-sales-container {
        grid-template-columns: 1fr;
        gap: 50px;
        padding: 60px 50px;
        max-width: 900px;
        margin: 0 auto;
    }
    
    .expert-sales-image {
        order: 1;
    }
    
    .expert-sales-content {
        order: 2;
    }
    
    .expert-sales-content h1 {
        font-size: 2.8em;
    }
    
    .expert-sales-image img {
        max-width: 700px;
        margin: 0 auto;
    }
    
    /* O-MNE PAGE - Boxy Display Stack Layout */
    .about-viewport-section {
        padding: 60px 0;
    }
    
    .about-split-container,
    .about-split-reversed {
        flex-direction: column;
        max-width: 900px;
        gap: 40px;
    }
    
    .about-image-wrapper,
    .about-text-wrapper {
        flex: 0 0 auto;
        width: 100%;
        padding: 0 60px;
    }
    
    .about-uniform-image {
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
    }
    
    .about-text-content {
        max-width: 100%;
        padding: 28px;
    }
    
    /* Services - 2 columns to prevent cramping */
    .service-cards-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    /* Blog/Properties - Single column */
    .property-grid {
        grid-template-columns: 1fr;
        max-width: 800px;
        margin: 0 auto;
    }
}

/* === SQUARE DISPLAYS (1:1 aspect ratio) - Extra handling === */
@media (aspect-ratio: 1/1) and (min-width: 1201px) {
    .home-hero-section {
        padding: 100px 80px;
    }
    
    .hero-content h1 {
        font-size: 4em;
    }
    
    .about-text-content {
        padding: 32px;
        font-size: 1.1em;
    }
}

/* ==========================================================================
   LARGE SCREEN SCALING (≥2048px) — QHD / 2K / 27" HiDPI
   ─────────────────────────────────────────────────────────────────────────
   Threshold = 2048px so standard FHD (1920px CSS) is NOT affected.
   Containers use 92 % viewport fill for a balanced edge-to-edge look.

   Targets:
     • Apple iMac 27" / Studio Display 5K  @ DPR 2  → 2560 CSS px
     • Dell / LG 27" QHD 2560×1440        @ DPR 1  → 2560 CSS px
     • MacBook Pro 14" external 5K         @ DPR 2  → 2560 CSS px

   Aspect-ratio guards:
     min-aspect-ratio: 4/3   → excludes boxy/portrait displays
                                (they have their own handler above)
     max-aspect-ratio: 21/9  → excludes ultrawide displays
                                (they have their own handler above)
   ========================================================================== */
@media (min-width: 2048px) and (min-aspect-ratio: 4/3) and (max-aspect-ratio: 21/9) {
    /* --- Navigation & Header --- */
    .header-container {
        max-width: min(2200px, 97vw);
        padding: 0 clamp(20px, 1.5vw, 50px);
    }

    /* --- General page containers --- */
    .page-container {
        max-width: min(2200px, 97vw);
        padding: 20px clamp(20px, 1.5vw, 50px) 50px;
    }

    .section-header {
        max-width: 900px;
    }

    /* --- Home hero --- */
    .home-hero-section {
        max-width: min(2200px, 97vw);
        padding: 50px clamp(20px, 1.5vw, 50px);
        gap: 4rem;
    }

    .hero-content h1 {
        font-size: 6.5em;
    }

    .hero-content .description {
        font-size: 1.2em;
    }

    /* Lift the hard 620px cap set at the 1600px breakpoint */
    .hero-video-container {
        max-height: 72vh;
    }

    /* --- About page containers --- */
    .about-me-container {
        max-width: min(2200px, 97vw);
        padding: 100px clamp(20px, 1.5vw, 50px);
    }

    .about-split-container {
        max-width: min(2200px, 97vw);
    }

    /* --- O-mne rows --- */
    .omne-row {
        max-width: min(1900px, 94vw);
        padding: 0 clamp(20px, 1.5vw, 50px);
    }

    /* --- Contact page --- */
    .contact-section-container {
        max-width: min(2200px, 97vw);
        padding: 30px clamp(20px, 1.5vw, 50px) 50px;
    }
    
    .contact-text h2 { font-size: 5em; }
    .contact-text .description { font-size: 1.5em; }
    .contact-details p { font-size: 1.4em; }
    .social-links-section h3 { font-size: 1.6em; }
    .social-link { font-size: 1.3em; padding: 18px 24px; }
    .social-icon { width: 32px; height: 32px; }

    /* --- Expert sales / services section --- */
    .expert-sales-container {
        max-width: min(2200px, 97vw);
        padding: 80px clamp(20px, 1.5vw, 50px);
    }

    /* --- Ebook landing --- */
    .ebook-landing-container {
        max-width: min(2200px, 97vw);
    }

    /* --- Footer --- */
    .footer-wrap {
        max-width: min(2200px, 97vw);
        padding: 0 clamp(20px, 1.5vw, 50px);
    }

    /* --- Global typography scale-up --- */
    h1 {
        font-size: 6.5em;
    }

    h2 {
        font-size: 4.2em;
    }

    h3 {
        font-size: 2.1em;
    }
}

/* ==========================================================================
   EXTRA-LARGE SCREEN SCALING (≥2700px) — 4K / 5K at DPR 1
   ─────────────────────────────────────────────────────────────────────────
   Targets:
     • 4K UHD monitors 3840×2160            @ DPR 1  → 3840 CSS px
     • Windows 4K monitors                  @ DPR 1.25 → 3072 CSS px
     • Apple Studio Display 5K              @ DPR 1  → 5120 CSS px (rare)

   Same aspect-ratio guards as the 2048px tier above.
   ========================================================================== */
@media (min-width: 2700px) and (min-aspect-ratio: 4/3) and (max-aspect-ratio: 21/9) {
    /* --- Navigation & Header --- */
    .header-container {
        max-width: min(3000px, 97vw);
        padding: 0 clamp(30px, 2vw, 80px);
    }

    /* --- General page containers --- */
    .page-container {
        max-width: min(3000px, 97vw);
        padding: 30px clamp(30px, 2vw, 80px) 60px;
    }

    .section-header {
        max-width: 1200px;
    }

    /* --- Home hero --- */
    .home-hero-section {
        max-width: min(3000px, 97vw);
        padding: 60px clamp(30px, 2vw, 80px);
        gap: 6rem;
    }

    .hero-content h1 {
        font-size: 8em;
    }

    .hero-content .description {
        font-size: 1.35em;
    }

    .hero-video-container {
        max-height: 70vh;
    }

    /* --- About page containers --- */
    .about-me-container {
        max-width: min(3000px, 97vw);
        padding: 120px clamp(30px, 2vw, 80px);
    }

    .about-split-container {
        max-width: min(3000px, 97vw);
    }

    /* --- O-mne rows --- */
    .omne-row {
        max-width: min(2500px, 94vw);
        padding: 0 clamp(30px, 2vw, 80px);
    }

    /* --- Contact page --- */
    .contact-section-container {
        max-width: min(3000px, 97vw);
        padding: 40px clamp(30px, 2vw, 80px) 60px;
    }
    
    .contact-text h2 { font-size: 6.5em; }
    .contact-text .description { font-size: 1.8em; }
    .contact-details p { font-size: 1.6em; }
    .social-links-section h3 { font-size: 2em; }
    .social-link { font-size: 1.5em; padding: 24px 32px; gap: 15px; }
    .social-icon { width: 42px; height: 42px; }

    /* --- Expert sales / services section --- */
    .expert-sales-container {
        max-width: min(3000px, 97vw);
        padding: 100px clamp(30px, 2vw, 80px);
    }

    /* --- Ebook landing --- */
    .ebook-landing-container {
        max-width: min(3000px, 97vw);
    }

    /* --- Footer --- */
    .footer-wrap {
        max-width: min(3000px, 97vw);
        padding: 0 clamp(30px, 2vw, 80px);
    }

    /* --- Global typography scale-up --- */
    h1 {
        font-size: 8em;
    }

    h2 {
        font-size: 5.5em;
    }

    h3 {
        font-size: 2.5em;
    }

    h4 {
        font-size: 1.7em;
    }
}
