/* ============================================
   HORIZIA LIMITED - RESPONSIVE STYLES
   Mobile-First Approach - Clean Rebuild
   ============================================ */

/* ===== PRODUCT CARDS RESPONSIVE ===== */
@media (max-width: 767px) {
    .product-card__image {
        height: 200px !important;
    }
    
    .product-card .card__header {
        padding: 1.5rem 1.5rem 1rem !important;
    }
    
    .product-card .card__footer {
        padding: 0 1.5rem 1.5rem !important;
    }
    
    .product-card .card__title {
        font-size: 1.5rem !important;
    }
}

/* ===== FOOTER RESPONSIVE ===== */
/* Tablet (768px - 1023px) */
@media (min-width: 768px) and (max-width: 1023px) {
    .footer {
        padding: var(--spacing-xl) var(--spacing-md) !important;
    }
    
    .footer__container {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: var(--spacing-xl) var(--spacing-xl) !important;
        align-items: start !important;
        justify-items: start !important;
    }
    
    .footer__section {
        margin-bottom: 0 !important;
        width: 100% !important;
    }
    
    .footer__section-title {
        font-size: 1rem !important;
        margin-bottom: var(--spacing-sm) !important;
    }
    
    .footer__item {
        margin-bottom: 0.5rem !important;
    }
    
    .footer__link {
        font-size: 0.9375rem !important;
    }
    
    .footer__bottom {
        margin-top: var(--spacing-lg) !important;
        padding-top: var(--spacing-md) !important;
        font-size: 0.875rem !important;
    }
}

/* Mobile (up to 767px) */
@media (max-width: 767px) {
    .footer {
        padding: var(--spacing-lg) var(--spacing-sm) !important;
    }
    
    .footer__container {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-lg) !important;
        align-items: start !important;
        justify-items: start !important;
    }
    
    .footer__section {
        margin-bottom: 0 !important;
        padding-bottom: var(--spacing-lg) !important;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
        width: 100% !important;
    }
    
    .footer__section:last-of-type {
        border-bottom: none !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }
    
    .footer__section-title {
        font-size: 1.125rem !important;
        margin-bottom: var(--spacing-sm) !important;
        font-weight: 600 !important;
    }
    
    .footer__list {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    
    .footer__item {
        margin-bottom: 0 !important;
    }
    
    .footer__link {
        font-size: 0.9375rem !important;
        padding: 0.5rem 0 !important;
        display: block !important;
        width: 100% !important;
    }
    
    .footer__link:hover,
    .footer__link:focus {
        transform: translateX(8px) !important;
    }
    
    .footer__bottom {
        margin-top: var(--spacing-md) !important;
        padding-top: var(--spacing-md) !important;
        font-size: 0.875rem !important;
        text-align: center !important;
    }
}

/* ===== MOBILE (up to 767px) - COMPLETE FIX ===== */
@media (max-width: 767px) {
    /* ===== HEADER - FIXED LAYOUT ===== */
    .header {
        position: sticky !important;
        top: 0 !important;
        z-index: 1 !important; /* Low z-index - menu will be above */
        background-color: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        padding: 12px 20px !important;
        min-height: 70px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .header__container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    /* Logo - Left side */
    .header__logo {
        flex: 0 0 auto !important;
        display: flex !important;
        align-items: center !important;
        order: 1 !important;
        z-index: 2 !important;
    }
    
    .header__logo-image {
        height: 72px !important; /* Increased for better visibility on mobile */
        width: auto !important;
        max-width: 200px !important;
    }
    
    /* Hide Admin Panel link on mobile - only show Admin Login */
    #nav-admin-panel {
        display: none !important;
    }
    
    /* Ensure Admin Login is visible on mobile */
    #nav-admin-login {
        display: block !important;
    }
    
    /* Hamburger - Right side, always clickable */
    .nav__toggle {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 48px !important;
        height: 48px !important;
        background: #1a237e !important;
        border: 3px solid #ffffff !important;
        border-radius: 10px !important;
        box-shadow: 0 4px 12px rgba(26, 35, 126, 0.3) !important;
        cursor: pointer !important;
        z-index: 999999 !important; /* Highest z-index - always clickable */
        position: relative !important;
        order: 2 !important;
        flex: 0 0 auto !important;
    }
    
    .nav__toggle-icon {
        display: flex !important;
        flex-direction: column !important;
        justify-content: space-between !important;
        width: 24px !important;
        height: 18px !important;
    }
    
    .nav__toggle-icon span {
        background-color: #ffffff !important;
        height: 3px !important;
        width: 100% !important;
        border-radius: 2px !important;
        display: block !important;
    }
    
    /* ===== MOBILE MENU - FULL SCREEN OVERLAY ===== */
    /* CRITICAL: Menu must be hidden by default */
    .nav {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: #ffffff !important;
        z-index: 99999 !important; /* Higher than hero image and header */
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        flex-direction: column !important;
        padding: 50px 0.5rem 0.5rem !important; /* Compact padding - consistent across all pages */
        padding-top: 50px !important;
        margin: 0 !important;
        visibility: hidden !important;
        opacity: 0 !important;
        pointer-events: none !important;
    }
    
    /* Only show menu when explicitly opened */
    .nav.nav--open {
        display: block !important; /* Changed from flex to block for consistency */
        visibility: visible !important;
        opacity: 1 !important;
        pointer-events: auto !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }
    
    .nav__list {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        padding-top: 0 !important;
        list-style: none !important;
        width: 100% !important;
    }
    
    .nav__item {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
        margin: 0 !important;
        padding: 0 !important;
        width: 100% !important;
    }
    
    .nav__item:last-child {
        border-bottom: none !important;
    }
    
    /* Menu links - fully visible and clickable - CONSISTENT COMPACT SIZE */
    .nav__link {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        color: #000000 !important;
        font-size: 0.875rem !important; /* Consistent compact size across all pages */
        padding: 0.5rem 0.5rem !important; /* Consistent compact padding */
        font-weight: 600 !important;
        text-decoration: none !important;
        width: 100% !important;
        z-index: 999999 !important;
        position: relative !important;
        background-color: transparent !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        line-height: 1.3 !important;
        min-height: auto !important;
    }
    
    /* Make dropdown icon clickable on mobile */
    .nav__link-icon {
        cursor: pointer !important;
        pointer-events: auto !important;
        margin-left: 0.5rem !important;
        font-size: 0.875rem !important;
        user-select: none !important;
        flex-shrink: 0 !important;
    }
    
    /* Remove active link pink background on mobile */
    .nav__link--active {
        background-color: transparent !important;
        color: var(--color-primary) !important;
        box-shadow: none !important;
    }
    
    .nav__link:hover,
    .nav__link:focus {
        background-color: rgba(26, 35, 126, 0.05) !important;
    }
    
    .nav__dropdown {
        max-height: 0 !important;
        overflow: hidden !important;
        transition: max-height 0.3s ease !important;
        background-color: rgba(26, 35, 126, 0.03) !important;
        position: static !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: none !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0.2rem 0 0.2rem 1rem !important; /* Consistent compact padding */
        width: 100% !important;
        list-style: none !important;
    }
    
    .nav__dropdown--open {
        max-height: 350px !important; /* Consistent max-height */
        padding: 0.2rem 0 0.2rem 1rem !important; /* Consistent compact padding */
    }
    
    .nav__dropdown-link {
        display: block !important;
        padding: 0.4rem 0.5rem !important; /* Consistent compact padding */
        font-size: 0.8rem !important; /* Consistent compact size */
        line-height: 1.3 !important;
        min-height: auto !important;
        color: var(--color-text-light) !important;
        text-decoration: none !important;
        width: 100% !important;
        z-index: 999999 !important;
        position: relative !important;
    }
    
    .nav__dropdown-link:hover,
    .nav__dropdown-link:focus {
        background-color: rgba(26, 35, 126, 0.05) !important;
        color: var(--color-primary) !important;
    }
    
    /* ===== HERO SECTION - NATURAL SCROLL ===== */
    /* Remove ALL fixed positioning and height locks */
    .hero,
    .hero-carousel {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
        padding-bottom: 2rem !important; /* Bottom padding for spacing */
        margin-bottom: 0 !important;
        z-index: 1 !important; /* Normal z-index - no stacking context issues */
    }
    
    /* Ensure all hero carousels behave identically - no special first-of-type rules */
    main > .hero-carousel,
    main > .hero-carousel:first-of-type {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        margin: 0 !important;
        padding: 0 !important;
        padding-bottom: 0 !important; /* No padding - spacing handled by margin-bottom */
        margin-bottom: 3rem !important; /* Consistent bottom margin */
        z-index: 1 !important;
    }
    
    .hero-carousel__slides {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
        overflow: visible !important;
    }
    
    .hero-carousel__slide {
        display: none !important;
        position: relative !important;
        height: auto !important;
        min-height: fit-content !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .hero-carousel__slide--active {
        display: block !important;
        position: relative !important;
        height: auto !important;
        min-height: fit-content !important;
        margin-bottom: 0 !important;
        padding-bottom: 0 !important; /* No padding on slide - spacing handled by content and carousel */
        /* Ensure smooth scrolling - hardware acceleration */
        transform: translateZ(0) !important;
        will-change: opacity, visibility !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
    }
    
    /* REMOVED: No special rules for first slide - all slides identical */
    
    .hero-carousel__content {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        padding: 1.5rem 1rem 3rem 1rem !important; /* Increased bottom padding */
        margin: 0 !important;
        position: relative !important;
        z-index: 1 !important;
        /* Prevent layout shifts during scroll - hardware acceleration */
        transform: translateZ(0) !important;
        will-change: transform !important;
        backface-visibility: hidden !important;
        -webkit-backface-visibility: hidden !important;
    }
    
    /* REMOVED: No special rules for first slide - all slides identical */
    
    .hero__visual {
        order: 1 !important;
        width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
        position: relative !important;
    }
    
    .hero__visual .hero__icon {
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .hero__visual .hero__icon img {
        width: 100% !important;
        height: auto !important;
        object-fit: contain !important;
        display: block !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    .hero__content {
        order: 2 !important;
        padding: 0 !important;
        margin: 0 !important;
        position: relative !important;
    }
    
    /* ===== TYPOGRAPHY - MOBILE OPTIMIZATION ===== */
    h1, .section__title {
        font-size: clamp(1.5rem, 4vw, 2rem) !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    h2 {
        font-size: clamp(1.25rem, 3.5vw, 1.75rem) !important;
        line-height: 1.3 !important;
        margin-bottom: 0.875rem !important;
    }
    
    h3, .card__title {
        font-size: clamp(1.125rem, 3vw, 1.5rem) !important;
        line-height: 1.4 !important;
        margin-bottom: 0.75rem !important;
    }
    
    body {
        font-size: 0.9375rem !important; /* 15px base */
        line-height: 1.6 !important;
    }
    
    p {
        font-size: 0.9375rem !important;
        line-height: 1.6 !important;
        margin-bottom: 1rem !important;
    }
    
    .hero__heading {
        font-size: clamp(1.5rem, 4vw, 2rem) !important;
        margin-bottom: 1rem !important;
        margin-top: 0 !important;
        line-height: 1.3 !important;
        padding: 0 !important;
    }
    
    .hero__description {
        font-size: 0.9375rem !important;
        margin-bottom: 1.5rem !important;
        margin-top: 0 !important;
        line-height: 1.6 !important;
        padding: 0 !important;
    }
    
    .hero__cta {
        margin-top: 0 !important;
        margin-bottom: 2rem !important; /* Increased bottom margin for spacing */
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* REMOVED: No special rules for first slide CTA - all slides identical */
    
    /* ===== SPACING ===== */
    main {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* Ensure all hero carousels have consistent spacing - treat first same as others */
    main > .hero-carousel,
    main > .hero-carousel:first-of-type {
        margin-top: 0 !important;
        padding-top: 0 !important;
        margin-bottom: 2rem !important; /* Reduced from 3rem for less bottom space */
        padding-bottom: 0 !important;
    }
    
    .hero-carousel + .section {
        margin-top: 0 !important;
        padding-top: 4rem !important; /* Adequate top padding to prevent overlap */
        position: relative !important;
        z-index: 1 !important; /* Lower than hero */
        /* Ensure section doesn't overlap hero when scrolling up */
        transform: translateZ(0) !important;
        will-change: transform !important;
    }
    
    /* Ensure section container also has proper spacing */
    .hero-carousel + .section .section__container {
        padding-top: 0 !important; /* Remove extra padding from container */
    }
    
    /* Ensure section header has proper spacing */
    .hero-carousel + .section .section__header {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    /* ===== ENSURE ALL SLIDES BEHAVE IDENTICALLY ===== */
    /* NO special rules for first slide - all slides are identical */
    
    /* Ensure active slide content has proper positioning */
    .hero-carousel__slide--active .hero__content {
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* Ensure CTA button has proper positioning */
    .hero-carousel__slide--active .hero__cta {
        position: relative !important;
        z-index: 1 !important;
    }
    
    /* Prevent next section from overlapping hero - consistent for all */
    .hero-carousel + .section,
    .hero-carousel + section {
        position: relative !important;
        z-index: 1 !important;
        margin-top: 0 !important; /* No top margin - padding handles spacing */
        /* Ensure section doesn't overlap hero when scrolling up */
        transform: translateZ(0) !important;
        will-change: transform !important;
    }
    
    /* ===== ENSURE LAYERS ARE BELOW MENU ===== */
    header,
    nav:not(.nav--open),
    .hero,
    .hero svg,
    .hero-carousel,
    .hero-carousel__slide {
        z-index: 1 !important;
    }
    
    /* ===== COOKIE CONSENT - MOBILE FIX ===== */
    .cookie-manager {
        padding: 1rem !important;
        max-width: 100% !important;
    }
    
    .cookie-manager__container {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
    }
    
    .cookie-manager__content {
        text-align: center !important;
    }
    
    .cookie-manager__title {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }
    
    .cookie-manager__text {
        font-size: 0.875rem !important;
        margin-bottom: 1rem !important;
    }
    
    .cookie-manager__actions {
        flex-direction: column !important;
        width: 100% !important;
        gap: 0.75rem !important;
    }
    
    .cookie-manager__settings,
    .cookie-manager__accept {
        width: 100% !important;
        padding: 0.875rem 1rem !important;
        font-size: 0.9375rem !important;
    }
    
    /* ===== BLOG POSTS - MOBILE FIX ===== */
    #blog-posts-container {
        display: flex !important;
        flex-direction: row !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-snap-type: x mandatory !important;
        gap: 1.5rem !important;
        margin-top: 2rem !important;
        padding-bottom: 1rem !important;
        scrollbar-width: thin !important;
        scrollbar-color: var(--color-primary) rgba(26, 35, 126, 0.1) !important;
    }
    
    #blog-posts-container::-webkit-scrollbar {
        height: 8px !important;
    }
    
    #blog-posts-container::-webkit-scrollbar-track {
        background: rgba(26, 35, 126, 0.05) !important;
        border-radius: 4px !important;
    }
    
    #blog-posts-container::-webkit-scrollbar-thumb {
        background: var(--color-primary) !important;
        border-radius: 4px !important;
    }
    
    #blog-posts-container::-webkit-scrollbar-thumb:hover {
        background: var(--color-primary-dark) !important;
    }
    
    #blog-posts-container .card {
        flex: 0 0 calc(100% - 2rem) !important;
        max-width: calc(100% - 2rem) !important;
        scroll-snap-align: start !important;
        margin-right: 0 !important;
    }
    
    /* Show 2 cards side by side if screen is wide enough */
    @media (min-width: 480px) and (max-width: 767px) {
        #blog-posts-container .card {
            flex: 0 0 calc(50% - 0.75rem) !important;
            max-width: calc(50% - 0.75rem) !important;
        }
    }
    
    .blog-post-card {
        display: flex !important;
        flex-direction: column !important;
    }
    
    .blog-post-card img {
        width: 100% !important;
        height: auto !important;
        max-height: 250px !important;
        object-fit: cover !important;
        border-radius: 12px 12px 0 0 !important;
    }
    
    .blog-post-card .card__body {
        padding: 1.5rem !important;
    }
    
    .blog-post-card .card__title {
        font-size: 1.125rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.75rem !important;
    }
    
    .blog-post-card .card__text {
        font-size: 0.9375rem !important;
        line-height: 1.6 !important;
    }
    
    /* Blog post detail page */
    .blog-post-detail img {
        width: 100% !important;
        height: auto !important;
        max-height: 300px !important;
        object-fit: cover !important;
        border-radius: 12px !important;
        margin: 1rem 0 !important;
    }
    
    .blog-post-detail h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
        margin-bottom: 1rem !important;
    }
    
    .blog-post-detail p {
        font-size: 0.9375rem !important;
        line-height: 1.7 !important;
        margin-bottom: 1rem !important;
    }
    
    /* ===== ANALYTICS PAGE - MOBILE FIX ===== */
    .analytics-container {
        padding: 1rem !important;
    }
    
    .analytics-header {
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 1rem !important;
        padding: 1.5rem !important;
    }
    
    .analytics-header h1 {
        font-size: 1.5rem !important;
        margin-bottom: 1rem !important;
    }
    
    .period-selector {
        flex-wrap: wrap !important;
        justify-content: center !important;
    }
    
    .period-btn {
        flex: 1 1 auto !important;
        min-width: 80px !important;
        font-size: 0.875rem !important;
        padding: 0.5rem 0.75rem !important;
    }
    
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .stat-card {
        padding: 1.5rem !important;
    }
    
    .stat-card .value {
        font-size: 2rem !important;
    }
    
    .charts-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .chart-card {
        padding: 1.5rem !important;
    }
    
    .chart-card h2 {
        font-size: 1.125rem !important;
        margin-bottom: 1rem !important;
    }
    
    .table-card {
        padding: 1rem !important;
        overflow-x: auto !important;
    }
    
    .table-card table {
        font-size: 0.875rem !important;
        min-width: 500px !important;
    }
    
    .table-card th,
    .table-card td {
        padding: 0.75rem 0.5rem !important;
    }
    
    .nav-links {
        flex-direction: column !important;
        gap: 0.75rem !important;
        margin-top: 1rem !important;
    }
    
    .nav-links a {
        width: 100% !important;
        text-align: center !important;
    }
    
    /* ===== BLOG POST DETAIL - MOBILE FIX ===== */
    .blog-post-container {
        padding: 1rem !important;
        max-width: 100% !important;
    }
    
    .blog-post-header {
        margin-bottom: 1.5rem !important;
    }
    
    .blog-post-title {
        font-size: 1.5rem !important;
        line-height: 1.35 !important;
        margin-bottom: 0.875rem !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
        hyphens: auto !important;
        -webkit-hyphens: auto !important;
        -ms-hyphens: auto !important;
        letter-spacing: -0.01em !important;
    }
    
    .blog-post-meta {
        font-size: 0.875rem !important;
        flex-wrap: wrap !important;
        gap: 0.5rem !important;
        margin-bottom: 1.25rem !important;
        line-height: 1.5 !important;
    }
    
    .blog-post-meta span {
        display: inline-block !important;
    }
    
    .blog-post-featured-image {
        height: 220px !important;
        margin-bottom: 1.5rem !important;
        border-radius: 12px !important;
    }
    
    .blog-post-content {
        font-size: 0.9375rem !important;
        line-height: 1.75 !important;
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }
    
    .blog-post-content p {
        font-size: 0.9375rem !important;
        line-height: 1.75 !important;
        margin-bottom: 1.25rem !important;
        color: var(--color-text) !important;
    }
    
    .blog-post-content h1 {
        font-size: 1.375rem !important;
        line-height: 1.4 !important;
        margin-top: 2rem !important;
        margin-bottom: 1rem !important;
        color: var(--color-primary) !important;
        font-weight: 700 !important;
    }
    
    .blog-post-content h2 {
        font-size: 1.25rem !important;
        line-height: 1.4 !important;
        margin-top: 1.75rem !important;
        margin-bottom: 0.875rem !important;
        color: var(--color-primary) !important;
        font-weight: 700 !important;
    }
    
    .blog-post-content h3 {
        font-size: 1.125rem !important;
        line-height: 1.4 !important;
        margin-top: 1.5rem !important;
        margin-bottom: 0.75rem !important;
        color: var(--color-primary) !important;
        font-weight: 600 !important;
    }
    
    .blog-post-content h4 {
        font-size: 1rem !important;
        line-height: 1.4 !important;
        margin-top: 1.25rem !important;
        margin-bottom: 0.75rem !important;
        color: var(--color-text) !important;
        font-weight: 600 !important;
    }
    
    .blog-post-content ul,
    .blog-post-content ol {
        margin-bottom: 1.25rem !important;
        padding-left: 1.5rem !important;
        font-size: 0.9375rem !important;
        line-height: 1.75 !important;
    }
    
    .blog-post-content li {
        margin-bottom: 0.5rem !important;
        font-size: 0.9375rem !important;
        line-height: 1.75 !important;
    }
    
    .blog-post-content strong,
    .blog-post-content b {
        font-weight: 600 !important;
        color: var(--color-text) !important;
    }
    
    .blog-post-content a {
        color: var(--color-primary) !important;
        text-decoration: underline !important;
        word-break: break-word !important;
    }
    
    .blog-post-content img {
        max-width: 100% !important;
        height: auto !important;
        border-radius: 8px !important;
        margin: 1.5rem 0 !important;
    }
    
    .blog-post-content blockquote {
        border-left: 4px solid var(--color-primary) !important;
        padding-left: 1rem !important;
        margin: 1.5rem 0 !important;
        font-style: italic !important;
        color: var(--color-text-light) !important;
        font-size: 0.9375rem !important;
        line-height: 1.75 !important;
    }
    
    .blog-post-back-button {
        width: 100% !important;
        justify-content: center !important;
        margin-bottom: 1.5rem !important;
        font-size: 0.9375rem !important;
        padding: 0.875rem 1.25rem !important;
    }
    
    .blog-post-tags {
        margin-top: 1.5rem !important;
        padding-top: 1.5rem !important;
        gap: 0.5rem !important;
    }
    
    .blog-post-tag {
        font-size: 0.8125rem !important;
        padding: 0.5rem 0.875rem !important;
    }
    
    /* ===== NEWSLETTER SECTION - MOBILE COMPACT ===== */
    .section--cta {
        margin-top: 2rem !important;
        padding: 1.5rem 1rem !important;
        border-radius: 12px !important;
    }
    
    .section--cta .section__title {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
        line-height: 1.3 !important;
    }
    
    .section--cta .section__subtitle {
        font-size: 0.875rem !important;
        margin-bottom: 1.25rem !important;
        line-height: 1.5 !important;
        padding: 0 0.5rem !important;
    }
    
    .newsletter-form {
        max-width: 100% !important;
        margin: 0 auto !important;
    }
    
    .newsletter-form > div:first-child {
        flex-direction: column !important;
        gap: 0.75rem !important;
        margin-bottom: 0.75rem !important;
    }
    
    .newsletter-form > div:first-child > div:first-child {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .newsletter-form input[type="email"] {
        width: 100% !important;
        padding: 0.875rem 1rem !important;
        font-size: 0.9375rem !important;
        border-radius: 8px !important;
    }
    
    .newsletter-form button[type="submit"] {
        width: 100% !important;
        padding: 0.875rem 1rem !important;
        font-size: 0.9375rem !important;
        white-space: normal !important;
    }
    
    .newsletter-error {
        font-size: 0.8125rem !important;
        padding: 0.625rem !important;
        margin-top: 0.5rem !important;
    }
    
    .newsletter-form .cf-turnstile {
        margin-bottom: 0.75rem !important;
        transform: scale(0.9) !important;
        transform-origin: center !important;
    }
    
    .newsletter-form > p {
        font-size: 0.75rem !important;
        line-height: 1.4 !important;
        margin-top: 0.5rem !important;
        padding: 0 0.5rem !important;
    }
    
    .newsletter-form > p a {
        font-size: 0.75rem !important;
    }
}

/* ===== TABLET (768px to 1023px) ===== */
@media (min-width: 768px) and (max-width: 1023px) {
    /* ===== HEADER ===== */
    .header {
        position: sticky !important;
        top: 0 !important;
        z-index: 1 !important;
        padding: 12px 20px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .header__container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    .header__logo {
        order: 1 !important;
        flex: 0 0 auto !important;
    }
    
    .header__logo-image {
        height: 64px !important; /* Increased for better visibility on tablet */
        max-width: 190px !important;
    }
    
    /* Hide Admin Panel link on tablet - only show Admin Login */
    #nav-admin-panel {
        display: none !important;
    }
    
    /* Ensure Admin Login is visible on tablet */
    #nav-admin-login {
        display: block !important;
    }
    
    /* ===== CHAT BUBBLE - TABLET ===== */
    .chat-bubble__toggle {
        width: 60px !important;
        height: 60px !important;
        bottom: 1.5rem !important;
        right: 1.5rem !important;
        font-size: 1.625rem !important;
        box-shadow: 0 8px 24px rgba(26, 35, 126, 0.35), 0 0 0 0 rgba(26, 35, 126, 0.1) !important;
    }
    
    .chat-bubble__toggle:hover,
    .chat-bubble__toggle:focus {
        transform: scale(1.1) translateY(-2px) !important;
        box-shadow: 0 12px 32px rgba(26, 35, 126, 0.45), 0 0 0 4px rgba(26, 35, 126, 0.15) !important;
    }
    
    .chat-bubble__badge {
        width: 20px !important;
        height: 20px !important;
        font-size: 0.75rem !important;
    }
    
    .chat-bubble__widget {
        position: fixed !important;
        bottom: 90px !important;
        right: 1.5rem !important;
        left: auto !important;
        top: auto !important;
        width: 400px !important;
        max-width: calc(100vw - 3rem) !important;
        max-height: calc(100vh - 120px) !important;
        height: auto !important;
        min-height: 500px !important;
        border-radius: 20px !important;
        box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15), 0 0 0 1px rgba(0, 0, 0, 0.08) !important;
        z-index: 9999 !important;
    }
    
    .chat-bubble__header {
        padding: 1.25rem 1.5rem !important;
        border-radius: 20px 20px 0 0 !important;
    }
    
    .chat-bubble__title {
        font-size: 1.125rem !important;
    }
    
    .chat-bubble__close {
        width: 34px !important;
        height: 34px !important;
        font-size: 1.625rem !important;
    }
    
    .chat-bubble__messages {
        padding: 1.25rem 1.25rem !important;
        max-height: 400px !important;
        min-height: 300px !important;
    }
    
    .chat-bubble__message {
        margin-bottom: 0.875rem !important;
        padding: 0.875rem 1rem !important;
        font-size: 0.9375rem !important;
        line-height: 1.6 !important;
        border-radius: 12px !important;
    }
    
    .chat-bubble__message--bot {
        max-width: 88% !important;
    }
    
    .chat-bubble__message--user {
        max-width: 85% !important;
    }
    
    .chat-bubble__input-area {
        padding: 1rem 1.25rem !important;
        gap: 0.75rem !important;
    }
    
    .chat-bubble__input {
        padding: 0.875rem 1rem !important;
        font-size: 0.9375rem !important;
        border-radius: 12px !important;
        min-height: 44px !important;
    }
    
    .chat-bubble__send {
        padding: 0.875rem 1.5rem !important;
        font-size: 0.9375rem !important;
        border-radius: 12px !important;
        min-height: 44px !important;
        min-width: 75px !important;
    }
    
    .chat-bubble__form-area {
        padding: 1.5rem 1.25rem !important;
    }
    
    .chat-bubble__name-input,
    .chat-bubble__email-input {
        padding: 0.875rem 1rem !important;
        font-size: 0.9375rem !important;
        border-radius: 12px !important;
        min-height: 44px !important;
    }
    
    .chat-bubble__submit-info {
        padding: 0.875rem 1.5rem !important;
        font-size: 0.9375rem !important;
        border-radius: 12px !important;
        min-height: 44px !important;
    }
    
    /* Hamburger - Right side */
    .nav__toggle {
        display: flex !important;
        width: 52px !important;
        height: 52px !important;
        z-index: 999999 !important;
        order: 2 !important;
        flex: 0 0 auto !important;
    }
    
    /* ===== CHAT BUBBLE - MOBILE ===== */
    .chat-bubble__toggle {
        width: 56px !important;
        height: 56px !important;
        bottom: 1.25rem !important;
        right: 1.25rem !important;
        font-size: 1.5rem !important;
        box-shadow: 0 6px 20px rgba(26, 35, 126, 0.35), 0 0 0 0 rgba(26, 35, 126, 0.1) !important;
        z-index: 9998 !important;
    }
    
    .chat-bubble__toggle:hover,
    .chat-bubble__toggle:focus {
        transform: scale(1.08) translateY(-2px) !important;
        box-shadow: 0 10px 28px rgba(26, 35, 126, 0.45), 0 0 0 4px rgba(26, 35, 126, 0.15) !important;
    }
    
    .chat-bubble__badge {
        width: 18px !important;
        height: 18px !important;
        font-size: 0.6875rem !important;
        top: -2px !important;
        right: -2px !important;
    }
    
    .chat-bubble__widget {
        position: fixed !important;
        bottom: 0 !important;
        right: 0 !important;
        left: 0 !important;
        top: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        max-height: 100vh !important;
        height: 100vh !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        z-index: 9999 !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    .chat-bubble__widget.chat-bubble--visible {
        display: flex !important;
    }
    
    .chat-bubble__header {
        padding: 1rem 1.25rem !important;
        border-radius: 0 !important;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1) !important;
        flex-shrink: 0 !important;
    }
    
    .chat-bubble__title {
        font-size: 1rem !important;
        font-weight: 600 !important;
    }
    
    .chat-bubble__close {
        width: 36px !important;
        height: 36px !important;
        font-size: 1.75rem !important;
        padding: 0 !important;
        border-radius: 10px !important;
    }
    
    .chat-bubble__messages {
        padding: 1rem 1rem !important;
        max-height: none !important;
        flex: 1 !important;
        overflow-y: auto !important;
        -webkit-overflow-scrolling: touch !important;
        min-height: 0 !important;
        background: #f8f9fa !important;
    }
    
    .chat-bubble__message {
        margin-bottom: 1rem !important;
        padding: 0.875rem 1rem !important;
        font-size: 0.9375rem !important;
        line-height: 1.6 !important;
        border-radius: 12px !important;
        max-width: 85% !important;
    }
    
    .chat-bubble__message--bot {
        max-width: 90% !important;
        border-left-width: 4px !important;
        background: #ffffff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05) !important;
    }
    
    .chat-bubble__message--user {
        max-width: 85% !important;
        border-radius: 12px !important;
        box-shadow: 0 2px 8px rgba(26, 35, 126, 0.15) !important;
    }
    
    .chat-bubble__input-area {
        padding: 1rem !important;
        border-top: 1px solid #e5e7eb !important;
        background: #ffffff !important;
        flex-shrink: 0 !important;
        gap: 0.75rem !important;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05) !important;
    }
    
    .chat-bubble__input {
        padding: 0.875rem 1rem !important;
        font-size: 0.9375rem !important;
        border-radius: 12px !important;
        border-width: 1.5px !important;
        min-height: 44px !important; /* Better touch target */
    }
    
    .chat-bubble__send {
        padding: 0.875rem 1.5rem !important;
        font-size: 0.9375rem !important;
        border-radius: 12px !important;
        min-height: 44px !important; /* Better touch target */
        min-width: 70px !important;
    }
    
    .chat-bubble__form-area {
        padding: 1.25rem 1rem !important;
        border-top: 1px solid #e8e8e8 !important;
        background: #ffffff !important;
        flex-shrink: 0 !important;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.05) !important;
    }
    
    .chat-bubble__name-input,
    .chat-bubble__email-input {
        padding: 0.875rem 1rem !important;
        font-size: 0.9375rem !important;
        border-radius: 12px !important;
        border-width: 1.5px !important;
        margin-bottom: 1rem !important;
        min-height: 44px !important; /* Better touch target */
    }
    
    .chat-bubble__submit-info {
        padding: 0.875rem 1.5rem !important;
        font-size: 0.9375rem !important;
        border-radius: 12px !important;
        min-height: 44px !important; /* Better touch target */
        width: 100% !important;
    }
    
    /* ===== MOBILE MENU OVERLAY ===== */
    .nav {
        display: none !important;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        height: 100vh !important;
        background: #ffffff !important;
        z-index: 99999 !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        -webkit-overflow-scrolling: touch !important;
        display: flex !important;
        flex-direction: column !important;
        padding: 100px 2rem 2rem !important;
    }
    
    .nav--open {
        display: flex !important;
    }
    
    .nav__list {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
        list-style: none !important;
        width: 100% !important;
    }
    
    .nav__link {
        display: block !important;
        color: #000000 !important;
        font-size: 1.2rem !important;
        padding: 12px 0 !important;
        z-index: 999999 !important;
        background-color: transparent !important;
    }
    
    .nav__link--active {
        background-color: transparent !important;
        color: var(--color-primary) !important;
    }
    
    /* ===== HERO SECTION - NATURAL SCROLL ===== */
    .hero,
    .hero-carousel {
        position: relative !important;
        height: auto !important;
        min-height: auto !important;
        overflow: visible !important;
        z-index: 1 !important;
    }
    
    .hero-carousel__slide {
        height: auto !important;
        min-height: fit-content !important;
    }
    
    /* ===== ENSURE LAYERS ARE BELOW MENU ===== */
    header,
    nav:not(.nav--open),
    .hero,
    .hero svg,
    .hero-carousel {
        z-index: 1 !important;
    }
}
