/* ==========================================================================
   SugarPeer - Responsive Stylesheet
   ========================================================================== */

/* Tablet (1024px and below) */
@media (max-width: 1024px) {
    .container {
        padding: 0 20px;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-image {
        order: -1;
    }
    
    .hero-text h1 {
        font-size: 2.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .plans-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .reviews-carousel {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px;
    }
    
    .dropdown-content {
        grid-template-columns: 1fr;
    }
    
    .dropdown-image {
        display: none;
    }
}

/* Mobile (768px and below) */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    /* Header */
    .header-top {
        display: none;
    }
    
    .header-main {
        padding: 12px 0;
    }
    
    .navbar-toggler {
        display: flex;
    }
    
    .navbar-toggler.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .navbar-toggler.active span:nth-child(2) {
        opacity: 0;
    }
    
    .navbar-toggler.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .navbar-menu {
        position: fixed;
        top: 68px;
        left: 0;
        width: 100%;
        height: calc(100vh - 68px);
        background-color: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        gap: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateX(-100%);
        transition: var(--transition-normal);
        overflow-y: auto;
        box-shadow: var(--shadow-xl);
    }
    
    .navbar-menu.active {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }
    
    .navbar-nav {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-item {
        width: 100%;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .nav-link {
        padding: 16px 0;
        justify-content: space-between;
    }
    
    .dropdown-menu {
        position: static;
        transform: none;
        box-shadow: none;
        background-color: var(--gray-100);
        margin-top: 0;
        padding: 16px;
        min-width: auto;
        display: none;
    }
    
    .nav-item.active .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
    }
    
    .dropdown-content {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .navbar-cta {
        width: 100%;
        margin-top: 20px;
    }
    
    .navbar-cta .btn {
        width: 100%;
    }
    
    /* Hero Section */
    .hero-section {
        padding: 60px 0 40px;
    }
    
    .hero-text h1 {
        font-size: 2rem;
    }
    
    .price-current {
        font-size: 2rem;
    }
    
    .price-current sub {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .trust-badges {
        flex-direction: column;
        gap: 16px;
    }
    
    /* Services Section */
    .services-section {
        padding: 60px 0;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    /* Pricing Section */
    .pricing-section {
        padding: 60px 0;
    }
    
    .plan-toggle {
        flex-direction: column;
        gap: 12px;
    }
    
    .toggle-btn {
        width: 100%;
    }
    
    .plans-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    /* Features Section */
    .features-section {
        padding: 60px 0;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    /* Reviews Section */
    .reviews-section {
        padding: 60px 0;
    }
    
    .reviews-carousel {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    /* FAQ Section */
    .faq-section {
        padding: 60px 0;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }
    
    /* CTA Section */
    .cta-section {
        padding: 60px 0;
    }
    
    .cta-content h2 {
        font-size: 1.75rem;
    }
    
    .cta-buttons {
        flex-direction: column;
    }
    
    .cta-buttons .btn {
        width: 100%;
    }
    
    /* Footer */
    .footer-top {
        padding: 60px 0 30px;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    /* Back to Top & Chat */
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    .live-chat-widget {
        bottom: 80px;
        right: 20px;
    }
    
    .chat-toggle {
        width: 50px;
        height: 50px;
    }
    
    .chat-window {
        width: calc(100vw - 40px);
        height: calc(100vh - 200px);
        bottom: 70px;
        right: -20px;
    }
}

/* Small Mobile (480px and below) */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }
    
    .hero-text h1 {
        font-size: 1.75rem;
    }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .service-card,
    .plan-card {
        padding: 24px;
    }
    
    .payment-methods {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .payment-icons {
        flex-wrap: wrap;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form .btn {
        width: 100%;
    }
}

/* Landscape Mobile */
@media (max-width: 812px) and (orientation: landscape) {
    .hero-section {
        padding: 40px 0;
    }
    
    .section-header {
        margin-bottom: 40px;
    }
    
    .services-section,
    .pricing-section,
    .features-section,
    .reviews-section,
    .faq-section,
    .cta-section {
        padding: 40px 0;
    }
}

/* Print Styles */
@media print {
    .main-header,
    .navbar,
    .hero-buttons,
    .cta-buttons,
    .back-to-top,
    .live-chat-widget,
    .footer-social,
    .footer-newsletter {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
        color: black;
    }
    
    h1 {
        font-size: 24pt;
    }
    
    h2 {
        font-size: 20pt;
    }
    
    h3 {
        font-size: 16pt;
    }
    
    a {
        color: black;
        text-decoration: underline;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Optimize images for retina displays */
    .logo-light,
    .logo-dark {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark Mode (Optional - for future implementation) */
@media (prefers-color-scheme: dark) {
    /* 
    :root {
        --white: #1A202C;
        --black: #FFFFFF;
        --dark-color: #F7FAFC;
        --light-color: #2D3748;
    }
    */
}
