/* ============================================
   public-responsive.css
   Responsive styles for index.php and aboutus.php
   ============================================ */

/* ===== MOBILE (≤900px) ===== */
@media screen and (max-width: 900px) {
    
    /* ===== 1. HERO SECTION ===== */
    .hero-container {
        flex-direction: column !important;
        text-align: center !important;
        gap: 40px !important;
    }

    .hero-content {
        width: 100% !important;
        padding: 0 20px !important;
    }

    .hero-content h1 {
        font-size: 2rem !important;
        line-height: 1.3 !important;
        margin-bottom: 20px !important;
    }

    .hero-content p {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        max-width: 500px !important;
    }

    .hero-buttons {
        justify-content: center !important;
        display: flex !important;
        gap: 15px !important;
    }

    .hero-image {
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
    }

    .hero-graphic {
        width: 400px !important;
        height: 250px !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }

    /* ===== 2. NAVBAR MOBILE MENU ===== */
    .navbar {
        position: relative !important;
    }

    .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px 20px !important;
    }

    /* Hide original navigation on mobile */
    .nav-links {
        display: none !important;
    }

    /* Mobile menu button */
    .mobile-menu-btn {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 44px !important;
        height: 44px !important;
        cursor: pointer !important;
        z-index: 1001 !important;
        color: white !important;
        font-size: 24px !important;
    }

    /* Mobile menu panel */
    .mobile-menu-panel {
        position: fixed !important;
        top: 70px !important;
        left: -100% !important;
        width: 85% !important;
        max-width: 320px !important;
        height: calc(100vh - 70px) !important;
        background-color: #0A0F1C !important;
        transition: left 0.3s ease !important;
        z-index: 1000 !important;
        padding: 30px 20px !important;
        box-shadow: 2px 0 10px rgba(0,0,0,0.3) !important;
        overflow-y: auto !important;
    }

    .mobile-menu-panel.active {
        left: 0 !important;
    }

    .mobile-menu-panel ul {
        list-style: none !important;
        padding: 0 !important;
        margin: 0 0 30px 0 !important;
    }

    .mobile-menu-panel li {
        margin-bottom: 15px !important;
    }

    .mobile-menu-panel a {
        display: block !important;
        padding: 12px 16px !important;
        color: #9ca3af !important;
        text-decoration: none !important;
        font-size: 16px !important;
        border-radius: 8px !important;
    }

    .mobile-menu-panel a:hover {
        background-color: #1A2035 !important;
        color: white !important;
    }

    .mobile-menu-panel a.active {
        color: #4B69FF !important;
        background-color: #1A2035 !important;
    }

    /* Mobile action buttons */
    .mobile-actions {
        margin-top: 20px !important;
        padding-top: 20px !important;
        border-top: 1px solid #333 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 10px !important;
    }

    .mobile-actions .login-btn {
        display: block !important;
        padding: 12px 16px !important;
        color: white !important;
        text-decoration: none !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        border: 1px solid #455CE9 !important;
        text-align: center !important;
        background: transparent !important;
        cursor: pointer !important;
    }

    .mobile-actions .btn-primary {
        display: block !important;
        padding: 12px 16px !important;
        background-color: #455CE9 !important;
        color: white !important;
        text-decoration: none !important;
        font-size: 16px !important;
        border-radius: 8px !important;
        text-align: center !important;
        border: none !important;
        cursor: pointer !important;
    }

    /* Overlay */
    .mobile-menu-overlay {
        display: none !important;
        position: fixed !important;
        top: 70px !important;
        left: 0 !important;
        width: 100% !important;
        height: calc(100vh - 70px) !important;
        background: rgba(0,0,0,0.5) !important;
        z-index: 999 !important;
    }

    .mobile-menu-overlay.active {
        display: block !important;
    }

    /* ===== 3. FEATURES SECTION ===== */
    .features {
        padding: 40px 0 !important;
    }

    .section-title {
        font-size: 1.8rem !important;
        margin-bottom: 30px !important;
    }

    .features-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .feature-card {
        width: 100% !important;
        margin: 0 !important;
    }

    .center-card {
        grid-column: auto !important;
    }

    /* ===== 4. COURSES SECTION ===== */
    .courses {
        padding: 40px 0 !important;
    }

    .courses-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
    }

    .courses-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }

    .course-card {
        width: 100% !important;
    }

    .course-img {
        height: 160px !important;
    }

    /* ===== 5. CATEGORIES SECTION ===== */
    .categories {
        padding: 40px 0 !important;
    }

    .cat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 15px !important;
    }

    .cat-card {
        padding: 20px !important;
    }

    .cat-card h3 {
        font-size: 2rem !important;
    }

    /* ===== 6. TESTIMONIALS SECTION ===== */
    .testimonials {
        padding: 40px 0 !important;
    }

    .test-container {
        flex-direction: column !important;
        gap: 30px !important;
    }

    .test-text {
        text-align: center !important;
    }

    .test-text h2 {
        font-size: 1.8rem !important;
    }

    .test-card {
        padding: 30px !important;
        width: 100% !important;
    }

    .quote {
        font-size: 1rem !important;
    }

    /* ===== 7. FOOTER ===== */
    .footer-container {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
        text-align: center !important;
    }

    .footer-col {
        width: 100% !important;
    }

    .footer-col .logo {
        justify-content: center !important;
    }

    /* ===== 8. ABOUT PAGE SPECIFIC ===== */
    .history-card {
        flex-direction: column !important;
        padding: 30px 20px !important;
    }

    .history-image img {
        width: 100% !important;
        margin-top: 20px !important;
    }

    .values-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ===== TABLET (481px - 900px) ===== */
@media screen and (min-width: 481px) and (max-width: 900px) {
    .cat-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .courses-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ===== DESKTOP (901px+) ===== */
@media screen and (min-width: 901px) {
    .mobile-menu-btn {
        display: none !important;
    }
    
    .mobile-menu-panel {
        display: none !important;
    }
    
    .mobile-menu-overlay {
        display: none !important;
    }
}

/* ===== MOBILE-SPECIFIC MODAL - DARK THEME ===== */
@media screen and (max-width: 900px) {
    
    /* Mobile Modal Overlay */
    .mobile-modal-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.8);
        z-index: 9999;
        align-items: center;
        justify-content: center;
        backdrop-filter: blur(2px);
    }
    
    .mobile-modal-overlay.active {
        display: flex;
    }
    
    /* Mobile Modal Container - Dark Theme */
    .mobile-modal {
        background: #0B0F19;
        width: 90%;
        max-width: 400px;
        border-radius: 16px;
        padding: 30px 25px;
        position: relative;
        max-height: 80vh;
        overflow-y: auto;
        animation: modalSlideUp 0.3s ease;
        border: 1px solid #1f2937;
        box-shadow: 0 20px 50px rgba(0,0,0,0.8);
    }
    
    @keyframes modalSlideUp {
        from {
            opacity: 0;
            transform: translateY(30px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }
    
    /* Modal Close Button */
    .mobile-modal-close {
        position: absolute;
        top: 15px;
        right: 20px;
        font-size: 28px;
        color: #9ca3af;
        cursor: pointer;
        background: none;
        border: none;
        width: 40px;
        height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .mobile-modal-close:hover {
        color: white;
    }
    
    /* Modal Logo */
    .mobile-modal-logo {
        text-align: center;
        margin-bottom: 20px;
    }
    
    .mobile-modal-logo img {
        height: 50px;
        width: auto;
    }
    
    .mobile-modal-logo span {
        display: block;
        font-size: 24px;
        font-weight: 700;
        color: #455CE9;
        margin-top: 10px;
    }
    
    /* Modal Title */
    .mobile-modal-title {
        font-size: 20px;
        font-weight: 700;
        color: white;
        text-align: center;
        margin-bottom: 25px;
    }
    
    /* Role Selection Buttons */
    .mobile-role-buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .mobile-role-btn {
        width: 100%;
        padding: 16px;
        border: 1px solid white;
        background: transparent;
        color: white;
        font-size: 16px;
        font-weight: 600;
        border-radius: 10px;
        cursor: pointer;
        transition: all 0.3s;
    }
    
    .mobile-role-btn:hover,
    .mobile-role-btn:active {
        background: #455CE9;
        border-color: #455CE9;
    }
    
    /* Modal Forms */
    .mobile-form {
        display: none;
    }
    
    .mobile-form.active {
        display: block;
    }
    
    .mobile-form-group {
        margin-bottom: 20px;
    }
    
    .mobile-form-group label {
        display: block;
        font-size: 14px;
        font-weight: 600;
        color: #ccc;
        margin-bottom: 8px;
    }
    
    .mobile-form-group input,
    .mobile-form-group select {
        width: 100%;
        padding: 14px 16px;
        border: 1px solid #374151;
        border-radius: 4px;
        font-size: 16px;
        background: #121826;
        color: white;
        transition: all 0.3s;
        box-sizing: border-box;
    }
    
    .mobile-form-group input:focus,
    .mobile-form-group select:focus {
        outline: none;
        border-color: #455CE9;
    }
    
    .mobile-form-group input::placeholder {
        color: #6b7280;
    }
    
    .mobile-form-row {
        display: flex;
        gap: 15px;
        margin-bottom: 20px;
    }
    
    .mobile-form-row .mobile-form-group {
        flex: 1;
        margin-bottom: 0;
    }
    
    /* Password field with toggle */
    .mobile-password-field {
        position: relative;
    }
    
    .mobile-password-field input {
        padding-right: 50px;
    }
    
    .mobile-password-toggle {
        position: absolute;
        right: 16px;
        top: 50%;
        transform: translateY(-50%);
        cursor: pointer;
        color: #9ca3af;
        font-size: 18px;
    }
    
    .mobile-password-toggle:hover {
        color: white;
    }
    
    /* Submit Button */
    .mobile-submit-btn {
        width: 100%;
        padding: 16px;
        background: #455CE9;
        color: white;
        border: none;
        border-radius: 8px;
        font-size: 16px;
        font-weight: 600;
        cursor: pointer;
        margin: 25px 0 15px;
        transition: background 0.3s;
    }
    
    .mobile-submit-btn:hover,
    .mobile-submit-btn:active {
        background: #3b4ec7;
    }
    
    /* Modal Footer Links */
    .mobile-modal-footer {
        text-align: center;
        color: #9ca3af;
        font-size: 14px;
    }
    
    .mobile-modal-footer a {
        color: #455CE9;
        font-weight: 600;
        text-decoration: none;
        margin-left: 5px;
    }
    
    .mobile-modal-footer a:hover {
        text-decoration: underline;
    }
    
    /* Back button in forms */
    .mobile-back-btn {
        background: none;
        border: none;
        color: #9ca3af;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        margin-bottom: 20px;
        display: inline-flex;
        align-items: center;
        gap: 5px;
    }
    
    .mobile-back-btn i {
        font-size: 16px;
    }
    
    .mobile-back-btn:hover {
        color: white;
    }
    
    /* Error/Success messages */
    .mobile-message {
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 20px;
        font-size: 14px;
        display: none;
    }
    
    .mobile-message.error {
        background: #fee2e2;
        color: #dc2626;
        border: 1px solid #fecaca;
        display: block;
    }
    
    .mobile-message.success {
        background: #dcfce7;
        color: #16a34a;
        border: 1px solid #bbf7d0;
        display: block;
    }
    
    /* Terms checkbox */
    .mobile-terms {
        display: flex;
        align-items: center;
        gap: 10px;
        margin: 20px 0;
        font-size: 13px;
        color: #b3b3b3;
    }
    
    .mobile-terms input[type="checkbox"] {
        width: 18px;
        height: 18px;
        accent-color: #455CE9;
    }
    
    .mobile-terms a {
        color: #455CE9;
        font-weight: 600;
        text-decoration: none;
    }
}

/* ===== TERMS MODAL ===== */
.mobile-terms-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.mobile-terms-modal.active {
    display: flex;
}

.mobile-terms-content {
    background: #03070f;
    width: 90%;
    max-width: 500px;
    border-radius: 12px;
    padding: 25px;
    position: relative;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid #333;
    color: #b3b3b3;
    font-size: 13px;
    line-height: 1.6;
    animation: modalSlideUp 0.3s ease;
}

.mobile-terms-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.mobile-terms-close:hover {
    color: white;
}

.mobile-terms-title {
    color: white;
    font-size: 16px;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 20px;
    border-bottom: 1px solid #444;
    padding-bottom: 10px;
}

.mobile-terms-section {
    margin-bottom: 25px;
}

.mobile-terms-section strong {
    color: white;
    display: block;
    margin-bottom: 8px;
}

.mobile-terms-section p {
    margin: 0 0 15px 0;
}

.mobile-terms-agree {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 25px 0 15px;
    padding-top: 15px;
    border-top: 1px solid #1e293b;
}

.mobile-terms-agree input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #455CE9;
}

.mobile-terms-agree label {
    color: white;
    font-size: 13px;
}

.mobile-terms-agree button {
    background: #455CE9;
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    width: 100%;
    transition: background 0.3s;
}

.mobile-terms-agree button:hover {
    background: #3b4ec7;
}

.mobile-terms-agree button:disabled {
    background: #1e293b;
    color: #64748b;
    cursor: not-allowed;
}

/* ===== UTILITY CLASSES ===== */
.hide-on-mobile {
    display: block;
}

.show-on-mobile {
    display: none;
}

@media screen and (max-width: 900px) {
    .hide-on-mobile {
        display: none !important;
    }
    
    .show-on-mobile {
        display: block !important;
    }
}

/* Touch-friendly tap targets */
@media (hover: none) and (pointer: coarse) {
    button, a, .clickable, [role="button"],
    input, select, .btn, .nav-links a {
        min-height: 44px;
        min-width: 44px;
    }
    
    input, select, textarea {
        font-size: 16px !important;
    }
}

/* Safe area insets for modern devices */
@supports (padding: max(0px)) {
    .container {
        padding-left: max(16px, env(safe-area-inset-left));
        padding-right: max(16px, env(safe-area-inset-right));
    }
}