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

/* Mobile Responsive Fixes Only */
@media (max-width: 992px) {

    html,
    body {
        overflow-x: hidden !important;
        max-width: 100% !important;
        width: 100% !important;
    }

    section,
    .container,
    .hero,
    .hero-content,
    main {
        max-width: 100% !important;
        overflow-x: hidden !important;
    }

    /* Hide only floating cards and hero visual on mobile */
    .floating-cards,
    .hero-visual {
        display: none !important;
    }

    .hero {
        overflow: hidden !important;
    }
}

/* Large Screens (1200px and below) */
@media (max-width: 1200px) {
    .container {
        max-width: 100%;
        padding: 0 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 2rem;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
    }

    .hero-text {
        max-width: 100%;
        margin-bottom: 3rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }
}

/* Medium Screens (992px and below) */
@media (max-width: 992px) {
    .nav-menu {
        display: none;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .header-inner {
        padding: 0 1rem;
    }

    .logo img,
    .logo-img {
        height: 22px !important;
        width: auto !important;
        filter: brightness(0) invert(1);
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-content {
        min-height: auto !important;
    }

    .floating-cards {
        display: none;
    }

    .hero-visual {
        display: none;
    }

    .section {
        padding: 3rem 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .calendar-day {
        min-height: 80px;
    }
}

/* Small Screens (768px and below) */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    .container {
        padding: 0 1rem;
    }

    .hero {
        min-height: auto;
        padding: 6rem 0 3rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }

    .hero-stat {
        flex: 0 0 calc(50% - 0.75rem);
    }

    .section {
        padding: 2.5rem 0;
    }

    .section-header {
        margin-bottom: 2rem;
    }

    .courses-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* ======= FOOTER MOBILE REDESIGN ======= */
    .footer {
        padding: 0;
        overflow: hidden;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 0;
    }

    /* -- Hide all footer columns on mobile -- */
    .footer-column {
        display: none !important;
    }

    /* -- Brand Area Only -- */
    .footer-brand {
        max-width: 100%;
        text-align: center;
        padding: 2.5rem 1.5rem 2rem;
        border-bottom: none;
    }

    .footer-logo {
        justify-content: center;
        margin-bottom: 1rem;
    }

    .footer-logo img {
        height: 36px;
    }

    .footer-description {
        font-size: 0.88rem;
        line-height: 1.75;
        color: rgba(255, 255, 255, 0.55);
        max-width: 320px;
        margin: 0 auto 1.5rem;
    }

    .footer-social {
        justify-content: center;
        gap: 0.6rem;
    }

    .footer-social a {
        width: 42px;
        height: 42px;
        background: rgba(255, 255, 255, 0.08);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: 12px;
        font-size: 1rem;
        transition: all 0.3s ease;
    }

    .footer-social a:hover {
        background: var(--primary-color);
        border-color: var(--primary-color);
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
    }

    /* -- Footer Bottom Bar -- */
    .footer-bottom {
        flex-direction: column;
        gap: 0.75rem;
        text-align: center;
        padding: 1.25rem 1.5rem;
        margin-top: 0;
        background: rgba(0, 0, 0, 0.2);
        border-top: 1px solid rgba(255, 255, 255, 0.06);
        font-size: 0.8rem;
    }

    .footer-bottom p {
        color: rgba(255, 255, 255, 0.4);
        margin: 0;
        font-size: 0.78rem;
    }

    .footer-legal {
        justify-content: center;
        flex-wrap: wrap;
        gap: 0.4rem 1.25rem;
    }

    .footer-legal a {
        font-size: 0.78rem;
        color: rgba(255, 255, 255, 0.45);
        transition: color 0.2s ease;
    }

    .footer-legal a:hover {
        color: var(--primary-color);
    }

    /* -- Chatbot on left side -- */
    .coderz-chatbot {
        left: 16px !important;
        right: auto !important;
    }

    /* ======= Non-Footer 768px Rules ======= */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .stat-value {
        font-size: 2rem;
    }

    .calendar-header {
        flex-direction: column;
        gap: 1rem;
    }

    .calendar-weekday {
        padding: 0.5rem;
        font-size: 0.75rem;
    }

    .calendar-day {
        min-height: 60px;
        padding: 0.25rem;
    }

    .calendar-day-number {
        font-size: 0.75rem;
    }

    .calendar-event {
        font-size: 0.625rem;
        padding: 0.125rem 0.25rem;
    }

    .whatsapp-btn {
        bottom: 1rem;
        inset-inline-start: 1rem;
        width: 48px;
        height: 48px;
    }

    .scroll-top-btn {
        bottom: 1rem;
        inset-inline-end: 1rem;
        width: 40px;
        height: 40px;
    }
}

/* Extra Small Screens (480px and below) */
@media (max-width: 480px) {

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.375rem 0.75rem;
    }

    .hero-stats {
        gap: 1rem;
    }

    .hero-stat-value {
        font-size: 1.5rem;
    }

    .hero-stat-label {
        font-size: 0.75rem;
    }

    .categories-grid {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }

    .category-card {
        padding: 1rem;
    }

    .category-icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }

    .category-name {
        font-size: 0.875rem;
    }

    .course-card {
        border-radius: 12px;
    }

    .course-image {
        height: 150px;
    }

    .course-content {
        padding: 1rem;
    }

    .course-title {
        font-size: 1rem;
    }

    .countdown-timer {
        gap: 0.25rem;
    }

    .countdown-value {
        font-size: 1rem;
    }

    .countdown-unit {
        font-size: 0.625rem;
    }

    .service-card {
        padding: 1.5rem;
    }

    .service-icon {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }

    .testimonial-card {
        padding: 1.5rem;
    }

    .testimonial-text {
        font-size: 1rem;
    }

    .contact-form {
        padding: 1.5rem;
    }

    .form-input {
        padding: 0.75rem;
    }
}

/* Mobile Menu Styles */
.mobile-menu {
    position: fixed;
    top: 0;
    inset-inline-end: -100%;
    width: 100%;
    max-width: 320px;
    height: 100vh;
    background: linear-gradient(180deg, #0a1628 0%, #0d1e36 100%);
    box-shadow: var(--shadow-xl);
    z-index: 1001;
    transition: inset-inline-end 0.3s ease;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.mobile-menu.active {
    inset-inline-end: 0;
}

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-fast);
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-header .logo-text {
    background: linear-gradient(135deg, #60a5fa 0%, #3b82f6 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: 2px;
}

.mobile-menu-close {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
    background: rgba(255, 255, 255, 0.05);
}

.mobile-menu-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Mobile User Info */
.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.mobile-user-info .user-avatar {
    width: 48px;
    height: 48px;
    font-size: 1.1rem;
}

.mobile-user-details {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.mobile-user-name {
    font-size: 1rem;
    font-weight: 600;
    color: #fff;
}

.mobile-lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: var(--transition-fast);
}

.mobile-lang-switcher:hover {
    color: #60a5fa;
}

.mobile-lang-switcher i {
    font-size: 0.75rem;
}

/* Mobile Navigation */
.mobile-menu-nav {
    padding: 1rem 0;
    flex: 1;
}

.mobile-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
    transition: var(--transition-fast);
    position: relative;
}

.mobile-nav-link i:first-child {
    width: 20px;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.5);
}

.mobile-nav-link:hover {
    background: rgba(255, 255, 255, 0.05);
    color: #60a5fa;
}

.mobile-nav-link:hover i:first-child {
    color: #60a5fa;
}

.mobile-nav-link.active {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.2) 0%, transparent 100%);
    color: #60a5fa;
    border-right: 3px solid #3b82f6;
}

.mobile-nav-link.active i:first-child {
    color: #3b82f6;
}

.mobile-nav-arrow {
    margin-right: auto;
    font-size: 0.7rem !important;
    transition: var(--transition-fast);
}

.mobile-nav-link[data-submenu]:hover .mobile-nav-arrow,
.mobile-nav-link[data-submenu].expanded .mobile-nav-arrow {
    transform: rotate(180deg);
}

/* Mobile CTA */
.mobile-nav-cta {
    margin: 0.5rem 1rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: var(--radius-lg);
    justify-content: center;
    color: #fff !important;
    padding: 0.875rem 1.5rem;
}

.mobile-nav-cta i:first-child {
    color: rgba(255, 255, 255, 0.9);
}

.mobile-nav-cta:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

/* Mobile Submenu */
.mobile-submenu {
    display: none;
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 0;
}

.mobile-submenu.active {
    display: block;
}

.mobile-submenu-link {
    display: block;
    padding: 0.65rem 3rem;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-fast);
}

.mobile-submenu-link:hover {
    color: #60a5fa;
    background: rgba(59, 130, 246, 0.1);
}

/* Mobile Menu Footer */
.mobile-menu-footer {
    padding: 1.25rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu-btn {
    display: block;
    width: 100%;
    padding: 0.875rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    font-weight: 600;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition-fast);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.mobile-menu-btn:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

/* Print Styles */
@media print {

    .header,
    .footer,
    .whatsapp-btn,
    .scroll-top-btn,
    .mobile-menu,
    .mobile-menu-overlay {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .hero {
        background: #fff;
        color: #000;
        min-height: auto;
        padding: 2rem 0;
    }

    .hero-title,
    .hero-subtitle {
        color: #000;
    }

    .section {
        padding: 1.5rem 0;
    }

    a {
        text-decoration: underline;
    }
}