/* SmartClasses247 - Responsive Design */

/* Mobile First Approach */
@media (max-width: 480px) {
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    /* Container */
    .container {
        padding: 0 1rem;
    }
    
    /* Navigation */
    .nav-container {
        padding: 1rem;
    }
    
    .nav-logo .brand-name {
        font-size: 1.25rem;
    }
    
    /* Hero Section */
    .hero {
        min-height: 100vh;
        padding: 2rem 0;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .hero-cta {
        flex-direction: column;
        gap: 1rem;
    }
    
    .btn-large {
        width: 100%;
        padding: 1rem;
        font-size: 1rem;
    }
    
    /* Sections */
    .section-padding {
        padding: 60px 0;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-text {
        padding-right: 0;
    }
    
    .features-grid {
        gap: 1.5rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
    }
    
    .feature-icon svg {
        width: 24px;
        height: 24px;
    }
    
    /* Subjects Section */
    .subjects-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .subject-card {
        padding: 1.5rem;
    }
    
    .subject-icon {
        font-size: 2.5rem;
    }
    
    .subject-levels {
        justify-content: center;
    }
    
    /* Timeline */
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        padding-left: 60px;
    }
    
    .timeline-item:nth-child(even) {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        text-align: left;
        margin-right: 0;
        margin-left: 0;
    }
    
    .timeline-icon {
        position: absolute;
        left: 0;
        width: 60px;
        height: 60px;
    }
    
    .timeline-content {
        margin-left: 0;
        padding: 1.5rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 2rem;
    }
    
    .testimonial-text {
        font-size: 1.125rem;
    }
    
    .testimonial-author {
        flex-direction: column;
        gap: 1rem;
    }
    
    /* Contact Section */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form-card {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px; /* Prevent zoom on iOS */
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-logo {
        justify-content: center;
    }
    
    /* Modal */
    .modal-content {
        margin: 1rem;
        padding: 2rem;
    }
    
    /* Hide floating elements on mobile */
    .floating-subjects {
        display: none;
    }
    
    /* Custom cursor hidden on mobile */
    .custom-cursor,
    .cursor-follower {
        display: none !important;
    }
    
    body {
        cursor: auto !important;
    }
}

/* Small Mobile */
@media (max-width: 360px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .btn-large {
        padding: 0.875rem;
        font-size: 0.875rem;
    }
    
    .subject-card {
        padding: 1rem;
    }
    
    .testimonial-card {
        padding: 1.5rem;
    }
}

/* Tablet Portrait */
@media (min-width: 481px) and (max-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-cta {
        flex-direction: row;
        justify-content: center;
    }
    
    .btn-large {
        flex: 1;
        max-width: 200px;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Tablet Landscape */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .subjects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .contact-content {
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Desktop */
@media (min-width: 1025px) {
    .container {
        padding: 0 2rem;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .subjects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }
}

/* Large Desktop */
@media (min-width: 1440px) {
    .container {
        max-width: 1400px;
    }
    
    .hero-title {
        font-size: 5rem;
    }
    
    .section-padding {
        padding: 150px 0;
    }
}

/* Navigation Responsive */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: var(--shadow-lg);
        transform: translateY(-100%);
        transition: var(--transition);
        z-index: 999;
    }
    
    .nav-menu.active {
        transform: translateY(0);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }
}

/* Print Styles */
@media print {
    .navbar,
    .hero-background,
    .floating-subjects,
    .carousel-controls,
    .modal {
        display: none !important;
    }
    
    .hero {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .section-padding {
        padding: 2rem 0;
    }
    
    .btn {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-icon svg,
    .feature-icon svg,
    .timeline-icon svg {
        transform: scale(1.1);
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
    
    .floating-subjects,
    .particles-container,
    .three-container {
        display: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --border-color: #404040;
    }
    
    .navbar {
        background: rgba(26, 26, 26, 0.95);
    }
    
    .subject-card,
    .testimonial-card,
    .form-card {
        background: rgba(45, 45, 45, 0.9);
        border-color: #404040;
    }
}

/* Accessibility Improvements */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0066cc;
        --text-primary: #000000;
        --text-secondary: #333333;
        --border-color: #000000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
    
    .subject-card,
    .testimonial-card {
        border: 2px solid var(--border-color);
    }
}

/* Focus Styles for Keyboard Navigation */
@media (prefers-reduced-motion: no-preference) {
    .nav-link:focus,
    .btn:focus,
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: 3px solid var(--primary-color);
        outline-offset: 2px;
    }
}

/* Landscape Orientation */
@media (orientation: landscape) and (max-height: 500px) {
    .hero {
        min-height: 100vh;
        padding: 1rem 0;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-padding {
        padding: 40px 0;
    }
}