/* Responsive Design for EduPillars Landing Page */

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .section-header h2 {
        font-size: 3rem;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .hero-content {
        gap: 40px;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .section-header h2 {
        font-size: 2.2rem;
    }
    
    .features-grid,
    .why-us-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

/* Tablet Landscape */
@media (max-width: 991px) {
    .section {
        padding: 80px 0;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }
    
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-stats {
        justify-content: center;
        gap: 30px;
    }
    
    .hero-actions {
        justify-content: center;
    }
    
    .benefits-container,
    .contact-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        max-width: 90vw;
        height: auto;
        max-height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        gap: 20px;
        transition: right 0.3s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1001;
        padding: 80px 20px 30px;
        overflow-y: auto;
        box-sizing: border-box;
    }
    
    .nav-menu-actions {
        display: flex;
        flex-direction: column;
        gap: 12px;
        margin-top: 20px;
        padding-top: 20px;
        border-top: 1px solid #e2e8f0;
        width: 100%;
    }
    
    .nav-login-mobile,
    .nav-demo-mobile,
    .nav-start-mobile {
        padding: 12px 20px !important;
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
        color: white !important;
        border-radius: 25px !important;
        text-align: center !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        transition: all 0.3s ease !important;
    }
    
    .nav-login-mobile:hover,
    .nav-demo-mobile:hover,
    .nav-start-mobile:hover {
        transform: translateY(-2px) !important;
        box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4) !important;
    }
    
    .nav-actions {
        display: flex;
        gap: 8px;
    }
    
    .nav-actions .nav-login-btn {
        display: none; /* Hide login text button */
    }
    
    .nav-actions .btn-secondary,
    .nav-actions .btn-primary {
        display: none; /* Hide desktop buttons, they're in mobile menu */
    }
    
    .nav-menu.active {
        right: 0;
    }
    
    .hamburger {
        display: flex;
        z-index: 1002;
    }
    
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
    
    .floating-card {
        display: none;
    }
    
    .floating-metric {
        position: static;
        margin-bottom: 20px;
        animation: none;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    /* Ensure no horizontal overflow */
    html, body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }
    
    /* Container adjustments */
    .container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    /* Navigation responsive fixes */
    .nav-container {
        padding: 0 15px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    
    .navbar {
        width: 100%;
        max-width: 100vw;
        box-sizing: border-box;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .hero-actions .btn-large {
        width: 100%;
        max-width: 280px;
    }
    
    .hero-stats {
        gap: 20px;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .problems-grid,
    .features-grid,
    .why-us-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .pricing-card.popular {
        transform: none;
    }
    
    .pricing-card.popular:hover {
        transform: translateY(-10px);
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
        gap: 25px;
        text-align: center;
    }
    
    .trust-logos {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .trust-logos img {
        height: 25px;
    }
    
    .contact-info h3 {
        font-size: 1.5rem;
    }
    
    .benefit-item {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .benefit-icon {
        align-self: center;
    }
    
    .card-header {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    .why-us-card h3 {
        font-size: 1.2rem;
    }
}

/* Mobile Landscape */
@media (max-width: 576px) {
    .hero-title {
        font-size: 2.2rem;
        line-height: 1.3;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
    
    .stat-item {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    
    .stat-number {
        font-size: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .problem-card,
    .feature-card,
    .why-us-card {
        padding: 25px 20px;
    }
    
    .problem-icon,
    .feature-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 15px;
    }
    
    .problem-icon i,
    .feature-icon i {
        font-size: 28px;
    }
    
    .pricing-card {
        padding: 30px 20px;
    }
    
    .pricing-price .amount {
        font-size: 2.5rem;
    }
    
    .contact-form {
        padding: 30px 25px;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .contact-icon {
        align-self: center;
    }
    
    .modal-content {
        padding: 30px 20px;
        margin: 20px;
    }
    
    .whatsapp-text {
        display: none;
    }
    
    .whatsapp-btn {
        width: 60px;
        height: 60px;
        border-radius: 50%;
        justify-content: center;
        padding: 0;
    }
    
    .nav-actions {
        gap: 10px;
    }
    
    .nav-actions .btn-secondary,
    .nav-actions .btn-primary {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .btn-large {
        padding: 14px 24px;
        font-size: 15px;
    }
}

/* Small Mobile */
@media (max-width: 420px) {
    .nav-menu {
        width: 250px;
        max-width: 85vw;
        padding: 70px 15px 25px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-header h2 {
        font-size: 1.6rem;
    }
    
    .pricing-price .amount {
        font-size: 2.2rem;
    }
    
    .nav-logo {
        font-size: 20px;
    }
    
    .logo-img {
        width: 200px;
        height: 35px;
    }
    
    .nav-actions .btn-secondary {
        display: none;
    }
    
    .hero-badge {
        font-size: 12px;
        padding: 6px 12px;
    }
    
    .contact-form,
    .modal-content {
        padding: 25px 15px;
    }
    
    .section-badge {
        font-size: 12px;
        padding: 6px 16px;
    }
    
    .feature-highlights,
    .form-checkbox {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .highlight {
        font-size: 11px;
        padding: 4px 10px;
    }
}

/* Ultra Small Mobile */
@media (max-width: 360px) {
    .nav-menu {
        width: 220px;
        max-width: 80vw;
        padding: 60px 12px 20px;
    }
    
    .nav-container {
        padding: 0 10px;
    }
    
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .problem-card,
    .feature-card,
    .why-us-card,
    .pricing-card {
        padding: 20px 15px;
    }
    
    .contact-form,
    .modal-content {
        padding: 20px 10px;
    }
    
    .btn-primary,
    .btn-secondary {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .btn-large {
        padding: 12px 20px;
        font-size: 14px;
    }
}

/* High DPI / Retina Displays */
@media (-webkit-min-device-pixel-ratio: 2),
       (min-resolution: 192dpi) {
    .hero-image img,
    .benefits-image img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --light-gray: #1a1a1a;
        --gray-100: #2a2a2a;
        --gray-200: #3a3a3a;
        --white: #1e1e1e;
        --glass-bg: rgba(30, 30, 30, 0.25);
        --glass-border: rgba(255, 255, 255, 0.1);
    }
    
    body {
        background: var(--light-gray);
        color: #e0e0e0;
    }
    
    .navbar.scrolled {
        background: rgba(30, 30, 30, 0.9);
    }
    
    .neumorphism-card {
        background: var(--gray-100);
        box-shadow: 
            10px 10px 20px #151515,
            -10px -10px 20px #2f2f2f;
    }
    
    .contact-form input,
    .contact-form select,
    .contact-form textarea {
        background: var(--gray-200);
        border-color: var(--gray-300);
        color: #e0e0e0;
    }
}

/* Landscape Orientation */
@media screen and (orientation: landscape) and (max-height: 600px) {
    .hero-section {
        min-height: auto;
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .hero-stats {
        margin-bottom: 25px;
    }
    
    .hero-actions {
        margin-bottom: 25px;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .whatsapp-chat,
    .back-to-top,
    .modal,
    .floating-shapes,
    .floating-card,
    .floating-metric {
        display: none !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
    }
    
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }
    
    .container {
        max-width: none !important;
        padding: 0 !important;
    }
    
    .section {
        padding: 20px 0 !important;
        page-break-inside: avoid;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 1px solid black !important;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-shapes,
    .floating-card,
    .floating-metric {
        animation: none !important;
    }
    
    .parallax {
        transform: none !important;
    }
}

/* Hover Capability */
@media (hover: none) {
    .hover-lift:hover,
    .hover-grow:hover,
    .hover-glow:hover,
    .hover-rotate:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    .card-hover-effect:hover,
    .sophisticated-hover:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    .feature-card:hover,
    .problem-card:hover,
    .why-us-card:hover {
        transform: none !important;
    }
}

/* Container Query Support (Future-proofing) */
@container (max-width: 500px) {
    .feature-card,
    .problem-card {
        padding: 20px;
    }
}

/* Focus Accessibility */
@media (prefers-reduced-motion: no-preference) {
    .btn-primary:focus,
    .btn-secondary:focus,
    .nav-link:focus {
        outline: 2px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --secondary-color: #800080;
        --gray-600: #000000;
        --gray-700: #000000;
        --gray-800: #000000;
    }
    
    .btn-primary {
        background: #000080;
        border: 2px solid #000080;
    }
    
    .btn-secondary {
        background: white;
        color: #000080;
        border: 2px solid #000080;
    }
    
    .gradient-text {
        background: #000080;
        -webkit-background-clip: text;
        background-clip: text;
        -webkit-text-fill-color: transparent;
    }
}
