/* 
========================================================================
   AI Tools for Teachers Webinar Registration System - Responsive Layouts
   Author: Senior Full Stack Developer & UI/UX Specialist
========================================================================
*/

/* ========================================================================
   1. LAPTOPS & TABLETS (1024PX AND BELOW)
   ======================================================================== */
@media screen and (max-width: 1024px) {
    html {
        font-size: 15px;
    }
    
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }
    
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .trainer-card {
        padding: 30px;
        gap: 30px;
    }
}

/* ========================================================================
   2. MOBILE & TABLETS (768PX AND BELOW)
   ======================================================================== */
@media screen and (max-width: 768px) {
    html {
        font-size: 14px;
    }
    
    .section-padding {
        padding: 70px 0;
    }
    
    /* Layout structural collapse */
    .grid-2, .grid-3, .grid-4 {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Responsive Header & Hamburger Menu */
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--bg-nav);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        flex-direction: column;
        padding: 40px 24px;
        gap: 25px;
        transition: left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-top: 1px solid var(--border-color);
        box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    /* Hamburger toggle animation active state */
    .menu-toggle.active span:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }
    
    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .menu-toggle.active span:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
    
    /* Hero section alignments */
    .hero {
        padding: 130px 0 80px 0;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-meta {
        justify-content: center;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .countdown-box {
        margin-left: auto;
        margin-right: auto;
    }
    
    /* Benefits Grid collapse */
    .benefits-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    /* Trainer Card Collapse */
    .trainer-card {
        flex-direction: column;
        text-align: center;
        padding: 30px 20px;
    }
    
    .trainer-features {
        justify-content: center;
    }
    
    .trainer-socials {
        justify-content: center;
    }
    
    /* Outcomes Timeline mobile collapse (left-aligned) */
    .timeline::after {
        left: 31px;
    }
    
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 0;
    }
    
    .timeline-item::after {
        left: 22px;
        right: auto;
    }
    
    .left-item, .right-item {
        left: 0;
    }
    
    .right-item::after {
        left: 22px;
    }
    
    .timeline-content {
        padding: 16px 0;
    }
    
    /* FAQ triggers spacing compression */
    .faq-trigger {
        padding: 16px 20px;
    }
    
    /* Final CTA sizing */
    .cta-box {
        padding: 40px 20px;
    }
    
    .cta-title {
        font-size: 2rem;
    }
    
    /* Footer collapse */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    /* Registration Page steps mobile adjustments */
    .form-container {
        padding: 24px;
    }
    
    .progress-container {
        margin-bottom: 30px;
    }
    
    .step-label {
        display: none; /* Hide labels on mobile to avoid overlapping */
    }
}

/* ========================================================================
   3. MOBILE DEVICES (480PX AND BELOW)
   ======================================================================== */
@media screen and (max-width: 480px) {
    html {
        font-size: 13.5px;
    }
    
    /* Responsive Header Nav-bar fix for narrow viewports */
    .logo {
        font-size: 1.15rem;
        white-space: nowrap;
    }
    
    .logo span {
        display: none; /* Hide the word 'Academy' on mobile screens to save horizontal space */
    }
    
    header .btn-secondary {
        padding: 8px 12px; /* Compress padding slightly */
    }
    
    header .btn-secondary span {
        display: none; /* Hide 'Landing Page' text node, leaving just the left arrow icon */
    }
    
    header .btn-primary {
        padding: 8px 12px; /* Compress padding slightly */
    }
    
    header .btn-primary span {
        display: none; /* Hide 'Register Now' text node, leaving just the user-plus icon */
    }
    
    .container {
        padding: 0 16px;
    }
    
    /* Sticky Mobile CTA Active */
    .sticky-mobile-cta {
        display: flex;
    }
    
    /* Push sections up slightly to account for the sticky CTA padding bottom */
    body {
        padding-bottom: 70px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
    }
    
    .about-card {
        padding: 20px;
    }
    
    .benefits-list {
        grid-template-columns: 1fr;
    }
    
    .testimonial-card {
        padding: 24px 15px;
    }
    
    /* Forms radio grids structural collapses */
    .radio-group-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .form-group.half-width {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .referral-grid {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    /* Form Navigation Buttons mobile overrides */
    .form-navigation {
        flex-direction: column-reverse;
        gap: 12px;
        margin-top: 25px;
    }
    
    .form-navigation .btn {
        width: 100%;
        flex: none;
        padding: 12px 16px;
        font-size: 0.95rem;
    }
    
    /* Position floating actions above the sticky bottom CTA footer */
    .floating-actions {
        bottom: 90px;
        right: 20px;
    }
}
