/* ============================================
   RESPONSIVE DESIGN (MOBILE FIRST)
   ============================================ */

/* Large devices (desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }
}

/* Medium devices (tablets, 992px and down) */
@media (max-width: 992px) {
    /* Hero Section */
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 30px;
    }
    
    .hero-content {
        order: 1;
    }
    
    .hero-content .subtitle,
    .hero-badges {
        margin-left: auto;
        margin-right: auto;
    }
    
    /* How It Works */
    .how-it-works-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .how-it-works-grid::before {
        display: none;
    }
    
    .process-step {
        margin-bottom: 30px;
    }
    
    /* Doctor Endorsement */
    .doctor-grid {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 30px;
    }
    
    .doctor-image {
        max-width: 250px;
        margin: 0 auto 30px;
    }
    
    /* Dual Action Section */
    .dual-action-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .dual-benefits {
        flex-direction: column;
    }
}

/* Small devices (landscape phones, 768px and down) */
@media (max-width: 768px) {
    /* Base Styles */
    :root {
        --border-radius: 12px;
    }
    
    section {
        padding: 50px 0;
    }
    
    .section-title {
        margin-bottom: 40px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    /* Navigation */
    .nav-links {
        display: none;
    }
    
    .hamburger {
        display: block;
    }
    
    /* Hero Section */
    .hero {
        padding: 100px 0 40px;
        background: linear-gradient(180deg, var(--c-bg-light) 0%, var(--c-white) 100%);
    }
    
    .hero-content h1 {
        font-size: 2.2rem;
    }
    
    .hero-badges {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .badge {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
    
    /* Problem Cards */
    .problem-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Ingredients Grid - Keep 2 columns on tablet */
    .ingredients-grid {
        gap: 20px;
    }
    
    .ingredient-card {
        padding: 25px 20px;
    }
    
    .ingredient-card img {
        width: 100px;
        height: 100px;
    }
    
    .ingredient-card h3 {
        font-size: 1.1rem;
    }
    
    .ingredient-card p {
        font-size: 0.95rem;
    }
    
    /* Order Grid */
    .order-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Guarantee Section Mobile */
    .guarantee-section {
        padding: 30px 20px;
        margin-bottom: 30px;
    }
    
    .guarantee-badge img {
        width: 100px;
    }
    
    .guarantee-heading {
        font-size: 1.4rem;
    }
    
    .guarantee-text {
        font-size: 0.95rem;
    }
    
    .guarantee-features {
        text-align: left;
        padding: 0 10px;
    }
    
    .guarantee-features li {
        font-size: 0.95rem;
        padding-left: 30px;
        margin-bottom: 10px;
    }
    
    /* Order Form */
    .order-form-wrapper {
        padding: 25px;
    }
    
    .form-buttons {
        flex-direction: column;
    }
    
    .cta-primary, .cta-secondary {
        width: 100%;
        text-align: center;
        padding: 14px 20px;
    }
    
    /* Testimonials */
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
}

/* Extra small devices (portrait phones, 576px and down) */
@media (max-width: 576px) {
    /* Typography */
    .section-title h2 {
        font-size: 1.6rem;
    }
    
    .section-title p {
        font-size: 1rem;
    }
    
    /* Hero Section */
    .hero {
        padding: 80px 0 30px;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-form-container {
        padding: 20px;
    }
    
    /* How It Works */
    .how-it-works-grid {
        grid-template-columns: 1fr;
    }
    
    /* Ingredients Grid - 2 columns on small mobile */
    .ingredients-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .ingredient-card {
        padding: 20px 15px;
    }
    
    .ingredient-card img {
        width: 80px;
        height: 80px;
        margin-bottom: 15px;
    }
    
    .ingredient-card h3 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .ingredient-card p {
        font-size: 0.85rem;
        line-height: 1.5;
    }
    
    /* Guarantee Section Extra Small */
    .guarantee-section {
        padding: 25px 15px;
        border-width: 2px;
    }
    
    .guarantee-badge img {
        width: 293px;
    }
    
    .guarantee-heading {
        font-size: 1.2rem;
        margin-bottom: 12px;
    }
    
    .guarantee-text {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .guarantee-features li {
        font-size: 0.9rem;
        padding-left: 28px;
        margin-bottom: 8px;
    }
    
    .guarantee-features .check-mark {
        font-size: 1.1rem;
    }
    
    .trust-note {
        font-size: 0.9rem;
    }
    
    /* Success Metrics */
    .metrics-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }
    
    .metric-card {
        padding: 20px 10px;
    }
    
    .metric-value {
        font-size: 2rem;
    }
    
    /* Comparison Table */
    .comparison-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* FAQ Section */
    .faq-item {
        padding: 15px;
    }
    
    .faq-question {
        font-size: 1rem;
    }
    
    /* Footer */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
}

/* Small height devices */
@media (max-height: 700px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 60px 0 30px;
    }
    
    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .hero-content h1 {
        font-size: 1.8rem;
    }
    
    .hero-badges {
        margin: 15px 0;
    }
}

/* High DPI devices */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Ensure images are high resolution */
    .hero-image img,
    .doctor-image img,
    .ingredient-card img {
        image-rendering: -webkit-optimize-contrast;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: #000;
        background: #fff;
    }
    
    .container {
        width: 100%;
        padding: 0;
    }
    
    section {
        page-break-inside: avoid;
        padding: 20px 0;
    }
    
    .section-title h2 {
        page-break-after: avoid;
    }
    
    .cta-primary,
    .cta-secondary,
    .hamburger,
    .floating-whatsapp {
        display: none !important;
    }
}

/* ============================================
   RESPONSIVE STYLES FOR NEW SECTIONS
   ============================================ */

/* Hero Image Mobile */
@media (max-width: 992px) {
    .hero-image-wrapper {
        text-align: center;
    }
    
    .hero-main-image {
        max-width: 400px;
        margin: 0 auto 30px;
    }
}

@media (max-width: 768px) {
    .hero-main-image {
        max-width: 100%;
    }
}

/* Infinite Scroll Reviews Mobile */
@media (max-width: 768px) {
    .review-image-card {
        flex: 0 0 250px;
        height: 300px;
    }
    
    .scroll-content {
        animation: infiniteScroll 40s linear infinite;
    }
}

@media (max-width: 576px) {
    .review-image-card {
        flex: 0 0 200px;
        height: 250px;
    }
}

/* 2x2 Testimonial Grid Mobile */
@media (max-width: 992px) {
    .testimonial-grid-2x2 {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 768px) {
    .testimonial-card {
        padding: 25px 20px;
    }
    
    .testimonial-avatar {
        width: 50px;
        height: 50px;
    }
    
    .testimonial-author {
        font-size: 1rem;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
    }
}

/* Video Testimonials Mobile */
@media (max-width: 992px) {
    .video-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .video-testimonials h3 {
        font-size: 1.5rem;
    }
}

@media (max-width: 768px) {
    .video-testimonial-card img {
        height: 200px;
    }
    
    .video-testimonial-card .play-button {
        width: 60px;
        height: 60px;
    }
}

/* Extra Extra Small devices (very small phones, 400px and down) */
@media (max-width: 400px) {
    /* Ingredients Grid - Still 2x2 but more compact */
    .ingredients-grid {
        gap: 12px;
        padding: 0 10px;
    }
    
    .ingredient-card {
        padding: 18px 12px;
    }
    
    .ingredient-card img {
        width: 130px;
        height: 130px;
        margin-bottom: 12px;
        border-width: 3px;
    }
    
    .ingredient-card h3 {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    .ingredient-card p {
        font-size: 0.8rem;
        line-height: 1.4;
    }
    
    .ingredient-card::before {
        height: 3px;
    }
}

/* ============================================
   FOOTER & WHATSAPP RESPONSIVE
   ============================================ */

/* Footer Mobile */
@media (max-width: 992px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-brand {
        max-width: 100%;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }
}

@media (max-width: 768px) {
    .main-footer {
        padding: 40px 0 20px;
        margin-top: 60px;
    }
    
    .footer-logo {
        height: 40px;
    }
    
    .footer-column h4 {
        font-size: 1.1rem;
    }
    
    /* WhatsApp Button Mobile */
    .floating-whatsapp {
        bottom: 20px;
        right: 20px;
        width: 55px;
        height: 55px;
    }
    
    .floating-whatsapp svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 576px) {
    .floating-whatsapp {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }
    
    .floating-whatsapp svg {
        width: 24px;
        height: 24px;
    }
}
