/* ==========================================================================
   10. Media Queries & Responsive Design (REVISED & ENHANCED)
   ========================================================================== */

/* --------------------------------------------------------------------------
   Large devices (laptops/desktops, up to 1200px)
   -------------------------------------------------------------------------- */
@media (max-width: 1200px) {
    .container {
        max-width: 960px;
    }
    
    /* Adjust grid layouts for slightly smaller screens */
    .products-container,
    .trust-signals-grid,
    .resources-grid,
    .team-grid,
    .reviews-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
    
    .hero-search-wrapper {
        max-width: 550px;
    }
}

/* Show hero search on desktop, hide mobile search icon */
@media (min-width: 993px) {
    .hero-search-wrapper {
        display: block !important;
    }
    
    .search-icon-toggle {
        display: none !important;
    }
}

.account-icon {
        display: none;
    }

    .search-icon-toggle {
        display: none;
   
    }

/* --------------------------------------------------------------------------
   Medium devices (tablets, up to 992px)
   -------------------------------------------------------------------------- */
@media (max-width: 992px) {
    html {
        font-size: 58%;
    }
    
    .container {
        max-width: 720px;
    }
    
    .hero-search-wrapper {
        display: none !important;
    }

    .header-right {
        gap: 1rem;
    }

     .logo-text {
        font-size: 2.4rem;
    }

    .mobile-nav-toggle {
        display: block;
        order: 3;
        position: relative;
        width: 44px;
        height: 44px;
        padding: 0;
        font-size: 0;
        border: none;
        background-color: transparent;
        cursor: pointer;
        transition: background-color 0.2s ease;
        border-radius: 50%;
        order: 3; 
    }

    .mobile-nav-toggle:hover {
        background-color: rgba(112, 109, 156, 0.1);
    }

    .mobile-nav-toggle span {
        display: block;
        position: absolute;
        width: 24px;
        height: 2px;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        background-color: var(--color-primary-dark);
        border-radius: var(--border-radius-pill);
        transition: background-color 0.1s 0.2s ease;
    }

    .mobile-nav-toggle span::before,
    .mobile-nav-toggle span::after {
        content: '';
        position: absolute;
        width: 100%;
        height: 100%;
        left: 0;
        background-color: var(--color-primary-dark);
        border-radius: var(--border-radius-pill);
        transition: transform 0.2s 0.2s ease, top 0.2s ease, bottom 0.2s ease;
    }

    .mobile-nav-toggle span::before {
        top: -8px;
    }

    .mobile-nav-toggle span::after {
        top: 8px;
    }

    .mobile-nav-toggle.is-active span {
        background-color: transparent;
    }

    .mobile-nav-toggle.is-active span::before,
    .mobile-nav-toggle.is-active span::after {
        top: 0;
        transition: top 0.2s ease, transform 0.2s 0.2s ease;
    }
    
    .mobile-nav-toggle.is-active span::before {
        transform: rotate(45deg);
    }
    
    .mobile-nav-toggle.is-active span::after {
        transform: rotate(-45deg);
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background-color: white;
        box-shadow: var(--shadow-md);
        z-index: 999;
        transform: translateY(-10px);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s 0.3s;
    }

    .main-nav.show {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0s 0s;
    }
    
    .main-nav ul {
        flex-direction: column;
        padding: 1rem 0;
    }

    .main-nav li {
        padding: 1.5rem 2rem;
        border-bottom: 1px solid var(--color-border-light);
        text-align: center;
    }

    .main-nav li:last-child {
        border-bottom: none;
    }
    
    .header-right {
        gap: 1rem;
    }

    .search-icon-toggle {
        display: flex;
        order: 1;
    }

    .account-icon {
        order: 2;
    }

    /* Hide header cart and show floating cart on mobile */
    .header-right .cart-icon-container, .auth-buttons .cart-icon-container {
        display: none;
    }

    body .floating-cart-icon {
        display: flex;
    }

    .hero-slider {
        height: 60vh;
        min-height: 450px;
    }

    .slide-content h1 {
        font-size: 4rem;
    }

    .steps-container {
        flex-direction: column;
        gap: 5rem;
    }
    
    .step-card {
        max-width: 50rem;
        margin: 0 auto;
    }

    .condition-cards,
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 48rem;
        margin: 0 auto;
    }

    .products-showcase {
        padding: 0 2rem;
    }
    
    .journey-orbits {
        display: none;
    }

    .immersive-cta .cta-content::after {
        content: 'Explore our services and start your journey today.';
        display: block;
        margin-top: 3rem;
        font-size: 1.8rem;
        color: rgba(255, 255, 255, 0.6);
        max-width: 40rem;
        margin-left: auto;
        margin-right: auto;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
    }

    .footer-navigation {
        flex-direction: column;
        width: 100%;
        gap: 2rem;
    }
    .footer-column {
        margin-bottom: 1.5rem;
    }

    .contact-column, .brand-column {
        align-items: center;
    }
}

/* --------------------------------------------------------------------------
   Small devices (landscape phones, up to 768px)
   -------------------------------------------------------------------------- */
@media (max-width: 768px) {
    .container {
        max-width: 540px;
        padding: 0 1.5rem;
    }

    h1 { font-size: 3.6rem; }
    h2, .section-title { font-size: 3.2rem; }

    section {
        padding: 6rem 0;
    }

    .logo-text {
        font-size: 2.2rem;
    }

    .logo img {
        max-height: 4.2rem;
    }

    .hero-slider {
        height: 70vh;
        min-height: 400px;
    }

     .slide-bg {
        background-size: cover;
    }
    
    .slide-content {
        padding: 8rem 3rem;
        text-align: center;
        max-width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: 100%;
    }
    
    .slider-arrow {
        width: 4rem;
        height: 4rem;
    }
    .prev-arrow { left: 1rem; }
    .next-arrow { right: 1rem; }

    .brands-container {
        justify-content: center;
    }

    .products-container,
    .trust-signals-grid,
    .resources-grid,
    .reviews-grid,
    .video-grid {
        grid-template-columns: 1fr;
    }

    .products-container {
        gap: 2rem;
    }

    .products-showcase {
        padding: 0 4.5rem;
    }

    .review-slides {
        gap: 1.5rem;
    }

    .team-intro, .team-philosophy {
        flex-direction: column;
    }

    .footer-legal-links {
        flex-direction: column;
        gap: 1rem;
    }
}

/* --------------------------------------------------------------------------
   Extra small devices (phones, up to 576px)
   -------------------------------------------------------------------------- */
@media (max-width: 576px) {
    html {
        font-size: 55%;
    }

    .logo-text {
        font-size: 2rem;
    }

    .logo img {
        max-height: 4rem;
    }

    .auth-buttons {
        display: none;
    }

    

    .account-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border-radius: 50%;
        transition: background-color 0.2s ease;
    }

    .account-icon:hover {
        background-color: rgba(112, 109, 156, 0.1);
    }

    .search-input-field {
        font-size: 2rem;
    }
    
    .search-close-btn {
        top: 2rem;
        right: 2rem;
    }

    .slider-dots {
        bottom: 1.5rem;
    }

    .slide-content {
        padding: 6rem 2rem;
    }

    .slide-content h1 {
        font-size: 3.2rem;
        line-height: 1.2;
    }

    .slide-content p {
        font-size: 1.6rem;
        max-width: 32ch;
    }
    
    .slide-content .btn-large {
        padding: 1.4rem 2.8rem;
        font-size: 1.6rem;
    }
    
    .brand-logo {
        width: 10rem;
        height: 5rem;
    }

    .product-card {
        padding: 2rem;
        text-align: center;
    }

    .product-title {
        font-size: 1.7rem;
    }

    .product-rating {
        justify-content: center;
    }

    .price-current {
        font-size: 2.4rem;
    }

    .price-savings {
        font-size: 1.3rem;
    }

    .buy-now-btn {
        width: 100%;
        padding: 1.4rem;
    }

    .cta-headline {
        font-size: 3rem;
    }
    .trust-indicators {
        flex-direction: column;
        gap: 3rem;
    }
    .final-cta-button {
        width: 90%;
        justify-content: center;
        text-align: center;
        padding: 1.5rem 2rem;
    }

    .featured-reviews-carousel {
        overflow: visible;
        padding-bottom: 0;
    }
    .review-slides {
        flex-direction: column;
        transform: none !important; 
    }
    .featured-reviews-carousel .carousel-arrow,
    .featured-reviews-carousel .carousel-indicators {
        display: none;
    }
    
    /* ===== START: NEW RULES FOR REVIEWS SECTION ===== */
    .trust-platforms {
        gap: 1.5rem; 
        justify-content: center;
        flex-wrap: nowrap; /* Prevent wrapping if there's space pressure */
    }

    .platform-badge {
        flex-direction: row; 
        padding: 1rem 1.5rem; 
        width: auto; 
        max-width: none;
    }

    .platform-logo {
        width: 8rem; 
        margin-bottom: 0; 
    }
    
    .platform-rating {
        align-items: flex-start; 
    }

    .rating-text {
        font-size: 1.2rem;
    }
    /* ===== END: NEW RULES FOR REVIEWS SECTION ===== */

    .featured-resource {
        flex-direction: column;
    }
    .featured-resource-image {
        height: 25rem;
    }
    .resource-newsletter {
        flex-direction: column;
        text-align: center;
        gap: 2rem;
        padding: 3rem 2rem;
    }
    .subscribe-form {
        flex-direction: column;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .auth-buttons {
        display: flex !important; /* Force show */
        position: fixed;
        top: 70px;
        right: 10px;
        background: white;
        padding: 5px;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        z-index: 1000;
    }
    
    .account-icon {
        display: none !important; /* Hide the link */
    }
}

/* ==========================================================================
   11. Animations (from original file)
   ========================================================================== */

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

@keyframes slideUp {
    from { transform: translateY(30px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}