/* ========================================
   Responsive Styles
   ======================================== */

/* Tablet */
@media (max-width: 1024px) {
    :root {
        --section-padding: 4rem;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-3xl);
    }
    
    .hero-content {
        max-width: 100%;
    }
    
    .hero-cta {
        justify-content: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-visual {
        order: -1;
    }
    
    .hero-image-wrapper {
        max-width: 350px;
    }
    
    .floating-elements {
        display: none;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }
    
    .about-image {
        display: flex;
        justify-content: center;
    }
    
    .about-image-wrapper {
        max-width: 400px;
    }
    
    .about-content {
        max-width: 100%;
        text-align: center;
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3xl);
    }
    
    .contact-info {
        max-width: 100%;
        text-align: center;
    }
    
    .contact-methods {
        align-items: center;
    }
    
    .contact-method {
        max-width: 400px;
        width: 100%;
    }
}

/* Mobile */
@media (max-width: 768px) {
    :root {
        --navbar-height: 70px;
        --section-padding: 3rem;
    }
    
    .nav-menu {
        position: fixed;
        top: var(--navbar-height);
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-bg-primary);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--space-xl);
        opacity: 0;
        visibility: hidden;
        transition: all var(--transition-base);
    }
    
    .nav-menu.active {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        font-size: var(--text-xl);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-title {
        font-size: clamp(2rem, 8vw, 3rem);
    }
    
    .hero-description {
        font-size: var(--text-base);
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .stat-item {
        text-align: center;
    }
    
    .section-title {
        font-size: clamp(1.75rem, 6vw, 2.5rem);
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-filters {
        gap: var(--space-xs);
    }
    
    .filter-btn {
        padding: var(--space-xs) var(--space-md);
        font-size: var(--text-xs);
    }
    
    .skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .pricing-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        padding: var(--space-lg);
        margin: 0;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--space-md);
    }
    
    .btn-lg {
        padding: var(--space-md) var(--space-xl);
        font-size: var(--text-base);
    }
    
    .lightbox-prev,
    .lightbox-next {
        width: 40px;
        height: 40px;
    }
    
    .lightbox-prev {
        left: var(--space-md);
    }
    
    .lightbox-next {
        right: var(--space-md);
    }
    
    .notification {
        left: var(--space-md);
        right: var(--space-md);
        bottom: var(--space-md);
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-md);
    }
    
    .hero-badge {
        font-size: var(--text-xs);
        padding: var(--space-xs) var(--space-md);
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
    
    .hero-image-wrapper {
        max-width: 280px;
    }
    
    .service-card {
        padding: var(--space-lg);
    }
    
    .skills-grid {
        grid-template-columns: 1fr;
    }
    
    .pricing-card {
        padding: var(--space-lg);
    }
    
    .contact-form-wrapper {
        padding: var(--space-lg);
    }
    
    .faq-question {
        font-size: var(--text-base);
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: calc(var(--navbar-height) + var(--space-xl)) 0 var(--space-xl);
    }
    
    .scroll-indicator {
        display: none;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-grid {
        background-size: 30px 30px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .cursor-glow,
    .cursor-trail {
        display: none;
    }
    
    .reveal-fade,
    .reveal-up,
    .reveal-scale {
        opacity: 1;
        transform: none;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .cursor-glow,
    .cursor-trail,
    .particles-container,
    .scroll-indicator,
    .lightbox,
    .notification {
        display: none !important;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .section {
        page-break-inside: avoid;
    }
    
    a[href]::after {
        content: " (" attr(href) ")";
    }
}

/* ========================================
   Academy Platform Responsive
   ======================================== */

/* Tablet - Academy */
@media (max-width: 1024px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .grid--3 {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    .course-detail {
        flex-direction: column;
    }
    .course-detail__sidebar {
        position: static;
        width: 100%;
    }
    .lesson-sidebar {
        width: 280px;
        min-width: 280px;
    }
    .lesson-content {
        padding: 32px 24px;
    }
}

/* Mobile - Academy */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    .category-card {
        padding: 20px 12px;
    }
    .category-card__icon {
        font-size: 2rem;
    }
    .grid--3 {
        grid-template-columns: 1fr !important;
    }
    .grid--2 {
        grid-template-columns: 1fr !important;
    }
    .hero__title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
    }
    .hero__stats {
        flex-wrap: wrap;
        gap: 16px;
    }
    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }
    .hero__actions .btn {
        width: 100%;
    }
    .filters {
        flex-wrap: wrap;
    }
    .profile__header {
        flex-direction: column;
        text-align: center;
    }
    .profile__actions {
        justify-content: center;
    }
    .profile__stats {
        justify-content: center;
    }

    /* Lesson viewer mobile */
    .lesson-viewer {
        flex-direction: column;
        margin: -12px -8px;
    }
    .lesson-sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        z-index: 999;
        width: 85vw;
        max-width: 340px;
        min-width: auto;
        max-height: 100vh;
        top: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        box-shadow: 4px 0 20px rgba(0,0,0,0.3);
    }
    .lesson-sidebar.open {
        transform: translateX(0);
    }
    .lesson-sidebar__close {
        display: block;
    }
    .lesson-topbar {
        display: flex;
    }
    .lesson-content {
        padding: 20px 16px;
    }
    .lesson-content__title {
        font-size: 1.3rem;
    }
    .lesson-content__body h2 {
        font-size: 1.15rem;
    }
    .lesson-content__body h3 {
        font-size: 1rem;
    }
    .lesson-nav {
        padding: 16px;
        flex-direction: column;
    }
    .lesson-nav__btn {
        max-width: 100%;
    }
    .lesson-actions {
        padding: 16px;
    }

    /* Dashboard mobile */
    .dash {
        flex-direction: column;
    }
    .dash__sidebar {
        position: fixed;
        top: 0; left: 0; bottom: 0;
        z-index: 998;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    .dash__sidebar.open {
        transform: translateX(0);
    }
    .dash__content {
        padding: 16px;
    }

    /* Course detail mobile */
    .course-detail__main {
        padding: 0;
    }
    .course-detail__hero {
        padding: 20px 16px;
    }
    .course-detail__card-price {
        font-size: 1.5rem;
    }
    .modules {
        padding: 0 8px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .categories-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .category-card {
        padding: 16px 8px;
    }
    .category-card__icon {
        font-size: 1.5rem;
        margin-bottom: 8px;
    }
    .category-card__title {
        font-size: 0.85rem;
    }
    .category-card__desc {
        font-size: 0.7rem;
    }
    .lesson-content__title {
        font-size: 1.15rem;
    }
    .lesson-callout {
        padding: 12px;
        gap: 8px;
    }
    .lesson-prompt {
        padding: 12px;
    }
    .lesson-prompt code {
        font-size: 0.75rem;
    }
    .course-card__body {
        padding: 12px;
    }
}
