/* 
 * Responsive Design System for IslamicEdu
 * Mobile-First Approach with Modern Breakpoints
 */

/* ========================================
   RESPONSIVE BREAKPOINTS
   ======================================== */

/* 
Mobile First Breakpoints:
- xs: 0-575px (Mobile Portrait)
- sm: 576-767px (Mobile Landscape) 
- md: 768-991px (Tablet)
- lg: 992-1199px (Desktop)
- xl: 1200px+ (Large Desktop)
*/

/* ========================================
   BASE MOBILE STYLES (0-575px)
   ======================================== */

/* Reset and Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: "Inter", sans-serif;
    line-height: 1.6;
    font-size: 16px;
    background: #e8f8f1;
}

/* Container System */
.container {
    width: 100%;
    padding: 0 15px;
    margin: 0 auto;
}

/* Header Mobile First */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background: white;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: relative;
    z-index: 200;
}

.logo {
    font-size: 18px;
    font-weight: 700;
    color: #007b5d;
}

.logo img {
    width: 28px;
    background-color: #007b5d;
    border-radius: 6px;
    padding: 4px;
    margin: 0 4px;
}

/* Mobile Menu (Default for small screens only) */
.auth-buttons {
    display: none;
}

/* Show auth buttons on tablets and larger by default */
@media (min-width: 768px) {
    .auth-buttons {
        display: flex !important;
    }
}

.menu-icon {
    display: block;
    font-size: 24px;
    cursor: pointer;
    color: #007b5d;
    padding: 8px;
}

/* Hide menu icon on tablets and larger */
@media (min-width: 768px) {
    .menu-icon {
        display: none !important;
    }
}

.mobile-menu {
    display: none;
    flex-direction: column;
    text-align: center;
    background: white;
    padding: 20px 15px;
    gap: 12px;
    border-top: 1px solid rgba(0,0,0,0.05);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu a {
    padding: 12px 16px;
    text-decoration: none;
    color: #007b5d;
    font-weight: 500;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.mobile-menu .signup {
    background: #007b5d;
    color: white;
}

.mobile-menu a:hover {
    background: #f0f9f6;
}

.mobile-menu .signup:hover {
    background: #006b4f;
}

/* ========================================
   NAVBAR MOBILE & TABLET LAYOUT
   ======================================== */

/* Tablet & Mobile: Logo + Site Name on left, Hamburger on right */
@media (max-width: 1024px) {
    /* Force navbar container layout */
    .nav-container {
        padding: 0 20px !important;
        justify-content: space-between !important;
        display: flex !important;
        align-items: center !important;
    }
    
    /* Show only logo and site name */
    .logo {
        display: flex !important;
        align-items: center !important;
        flex-shrink: 0 !important;
        order: 1 !important;
    }
    
    .logo a {
        display: flex !important;
        align-items: center !important;
        gap: 10px !important;
    }
    
    .logo img {
        width: 35px !important;
        height: 35px !important;
    }
    
    .logo span {
        font-size: 18px !important;
        font-weight: 600 !important;
        color: #007b5d !important;
        display: inline-block !important;
    }
    
    /* FORCE HIDE nav links and auth buttons on mobile/tablet */
    .nav-links,
    .auth-buttons {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* FORCE SHOW hamburger menu */
    .hamburger {
        display: flex !important;
        visibility: visible !important;
        flex-direction: column !important;
        gap: 5px !important;
        cursor: pointer !important;
        padding: 10px !important;
        z-index: 1001 !important;
        order: 2 !important;
    }
    
    .hamburger span {
        display: block !important;
        width: 25px !important;
        height: 3px !important;
        background: #007b5d !important;
        border-radius: 3px !important;
        transition: all 0.3s ease !important;
    }
    
    /* Hamburger animation when active */
    .hamburger.active span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px) !important;
    }
    
    .hamburger.active span:nth-child(2) {
        opacity: 0 !important;
    }
    
    .hamburger.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px) !important;
    }
    
    /* Add padding to body for fixed navbar */
    body {
        padding-top: 58px !important;
    }
}

/* Extra small mobile adjustments */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 15px !important;
        height: 56px !important;
    }
    
    .logo img {
        width: 30px !important;
        height: 30px !important;
    }
    
    .logo span {
        font-size: 16px !important;
    }
    
    .hamburger span {
        width: 22px !important;
    }
    
    body {
        padding-top: 56px !important;
    }
}

/* Hero Section Mobile */
.hero {
    text-align: center;
    padding: 40px 15px;
}

.hero h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 16px;
}

.hero h1 span {
    color: #007b5d;
}

.hero p {
    font-size: 16px;
    color: #444;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* Search Box Mobile */
.search-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
    width: 100%;
}

.search-box-container {
    display: flex;
    background: white;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
}

.search-box-container input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    font-size: 14px;
    border-radius: 8px;
    outline: none;
}

.search-box-container button {
    background: #007b5d;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.search-box-container button:hover {
    background: #006b4f;
}

/* Categories Mobile */
.categories {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.categories span {
    background: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 12px;
    color: #555;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
    white-space: nowrap;
}

/* Stats Section Mobile */
.stats-section {
    padding: 30px 15px;
    background: white;
}

.stats-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    max-width: 300px;
    margin: 0 auto;
}

.stat-box {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
}

.stat-box .icon {
    width: 50px;
    height: 50px;
    background: #e8f8f1;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 24px;
    color: #007b5d;
}

.stat-box h2 {
    font-size: 24px;
    font-weight: 700;
    color: #007b5d;
    margin-bottom: 4px;
}

.stat-box p {
    font-size: 14px;
    color: #555;
}

/* Teachers Section Mobile */
.top-teachers-intro {
    text-align: center;
    padding: 30px 15px;
    background-color: #f9fafc;
}

.top-teachers-intro h2 {
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.top-teachers-intro p {
    font-size: 16px;
    color: #6b7280;
    line-height: 1.5;
}

.teachers-section {
    padding: 20px 15px;
    background: #f8f9fa;
}

.teachers-section .row {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.teacher-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    overflow: hidden;
    width: 100%;
    max-width: 350px;
}

.teacher-card .image-container {
    position: relative;
    width: 100%;
    height: 200px;
}

.teacher-card .image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-card .rate {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #007b5d;
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
}

.teacher-details {
    padding: 20px;
}

.teacher-details h3 {
    font-size: 18px;
    font-weight: 700;
    color: #222;
    margin-bottom: 8px;
}

.teacher-details p {
    font-size: 14px;
    color: #6c757d;
    margin: 4px 0;
}

.rating {
    display: flex;
    align-items: center;
    margin: 8px 0;
    font-weight: 600;
    color: #222;
}

.tags {
    display: flex;
    gap: 6px;
    margin: 12px 0;
    flex-wrap: wrap;
}

.tags span {
    background: #e9eef5;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    color: #495057;
    font-weight: 500;
}

.description {
    font-size: 13px;
    color: #495057;
    margin-bottom: 16px;
    line-height: 1.4;
}

.buttons {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.btn {
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    text-decoration: none;
    display: inline-block;
}

.btn-primary {
    background: #007b5d;
    color: white;
}

.btn-primary:hover {
    background: #006b4f;
}

.btn-secondary {
    background: white;
    color: #222;
    border: 1px solid #ddd;
}

.btn-secondary:hover {
    background: #f8f9fa;
}

/* How It Works Mobile */
.how-it-works {
    background: white;
    padding: 40px 15px;
}

.works-how h3 {
    text-align: center;
    font-size: 24px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 12px;
}

.works-how p {
    text-align: center;
    font-size: 16px;
    color: #4b5563;
    margin-bottom: 30px;
}

.steps-container {
    display: flex;
    flex-direction: column;
    gap: 30px;
    text-align: center;
}

.step {
    padding: 0 20px;
}

.step .icon {
    background: #d4f0e7;
    color: #21a176;
    font-size: 28px;
    width: 60px;
    height: 60px;
    margin: 0 auto 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.step h3 {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}

.step p {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.5;
}

/* Footer Mobile */
.site-footer {
    background: #111827;
    color: #cbd5e1;
    padding: 30px 15px 20px;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
    text-align: center;
}

.footer-column h4 {
    color: #f9fafb;
    font-weight: 700;
    margin-bottom: 12px;
    font-size: 18px;
}

.footer-column p {
    font-size: 14px;
    line-height: 1.5;
    color: #94a3b8;
}

.footer-column ul {
    list-style: none;
    padding: 0;
}

.footer-column ul li {
    margin-bottom: 8px;
}

.footer-column ul li a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-column ul li a:hover {
    color: #10b981;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #374151;
    padding-top: 15px;
    margin-top: 20px;
    font-size: 14px;
    color: #6b7280;
}

/* ========================================
   SMALL MOBILE (576px+)
   ======================================== */

@media (min-width: 576px) {
    .container {
        padding: 0 20px;
    }
    
    header {
        padding: 15px 20px;
    }
    
    .logo {
        font-size: 20px;
    }
    
    .logo img {
        width: 30px;
    }
    
    .hero {
        padding: 50px 20px;
    }
    
    .hero h1 {
        font-size: 32px;
    }
    
    .hero p {
        font-size: 17px;
    }
    
    .search-box-container {
        max-width: 500px;
    }
    
    .stats-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        max-width: 600px;
        gap: 16px;
    }
    
    .stat-box {
        flex: 1;
        min-width: 140px;
        max-width: 180px;
    }
    
    .teachers-section .row {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .teacher-card {
        max-width: 280px;
    }
    
    .buttons {
        flex-direction: row;
    }
    
    .btn-secondary {
        flex: 1;
    }
    
    .steps-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: 20px;
    }
    
    .step {
        flex: 1;
        min-width: 200px;
        max-width: 250px;
    }
    
    .footer-content {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        text-align: left;
    }
    
    .footer-column {
        flex: 1;
        min-width: 200px;
        max-width: 250px;
    }
}

/* ========================================
   TABLET (768px+)
   ======================================== */

@media (min-width: 768px) {
    .container {
        max-width: 750px;
        padding: 0 30px;
    }
    
    header {
        padding: 18px 30px;
    }
    
    .logo {
        font-size: 22px;
    }
    
    .logo img {
        width: 32px;
    }
    
    .menu-icon {
        display: none;
    }
    
    .auth-buttons {
        display: flex;
        gap: 12px;
    }
    
    .auth-buttons a {
        padding: 10px 18px;
        text-decoration: none;
        font-size: 15px;
        border-radius: 8px;
        font-weight: 600;
        transition: all 0.3s ease;
    }
    
    .auth-buttons .signin {
        color: #007b5d;
    }
    
    .auth-buttons .signin:hover {
        background: #f0f9f6;
    }
    
    .auth-buttons .signup {
        background: #007b5d;
        color: white;
    }
    
    .auth-buttons .signup:hover {
        background: #006b4f;
    }
    
    .mobile-menu {
        display: none !important;
    }
    
    .hero {
        padding: 60px 30px;
    }
    
    .hero h1 {
        font-size: 40px;
    }
    
    .hero p {
        font-size: 18px;
        max-width: 600px;
        margin: 0 auto 24px;
    }
    
    .search-box-container {
        max-width: 600px;
    }
    
    .search-box-container input {
        font-size: 15px;
        padding: 14px 18px;
    }
    
    .search-box-container button {
        font-size: 15px;
        padding: 14px 24px;
    }
    
    .categories span {
        font-size: 13px;
        padding: 10px 16px;
    }
    
    .stats-container {
        flex-direction: row;
        max-width: 800px;
        gap: 20px;
    }
    
    .stat-box {
        flex: 1;
        max-width: none;
    }
    
    .stat-box .icon {
        width: 60px;
        height: 60px;
        font-size: 28px;
    }
    
    .stat-box h2 {
        font-size: 28px;
    }
    
    .stat-box p {
        font-size: 15px;
    }
    
    .top-teachers-intro {
        padding: 40px 30px;
    }
    
    .top-teachers-intro h2 {
        font-size: 28px;
    }
    
    .top-teachers-intro p {
        font-size: 18px;
    }
    
    .teachers-section {
        padding: 30px;
    }
    
    .teacher-card {
        max-width: 320px;
    }
    
    .teacher-details h3 {
        font-size: 19px;
    }
    
    .teacher-details p {
        font-size: 14px;
    }
    
    .description {
        font-size: 14px;
    }
    
    .how-it-works {
        padding: 50px 30px;
    }
    
    .works-how h3 {
        font-size: 28px;
    }
    
    .works-how p {
        font-size: 18px;
        margin-bottom: 40px;
    }
    
    .steps-container {
        flex-direction: row;
        gap: 30px;
        max-width: 900px;
        margin: 0 auto;
    }
    
    .step {
        flex: 1;
        max-width: none;
    }
    
    .step .icon {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }
    
    .step h3 {
        font-size: 20px;
    }
    
    .step p {
        font-size: 15px;
    }
    
    .site-footer {
        padding: 40px 30px 20px;
    }
    
    .footer-content {
        max-width: 900px;
        margin: 0 auto;
        justify-content: space-between;
    }
    
    .footer-column {
        flex: 1;
        max-width: 200px;
    }
    
    .footer-column h4 {
        font-size: 19px;
    }
    
    .footer-column p {
        font-size: 15px;
    }
    
    .footer-column ul li a {
        font-size: 14px;
    }
    
    .footer-bottom {
        font-size: 15px;
    }
}

/* ========================================
   DESKTOP (992px+)
   ======================================== */

@media (min-width: 992px) {
    .container {
        max-width: 970px;
        padding: 0 40px;
    }
    
    header {
        padding: 20px 40px;
    }
    
    .logo {
        font-size: 24px;
    }
    
    .logo img {
        width: 35px;
    }
    
    .hero {
        padding: 80px 40px;
    }
    
    .hero h1 {
        font-size: 48px;
    }
    
    .hero p {
        font-size: 19px;
        max-width: 700px;
    }
    
    .search-box-container {
        max-width: 700px;
    }
    
    .search-box-container input {
        font-size: 16px;
        padding: 16px 20px;
    }
    
    .search-box-container button {
        font-size: 16px;
        padding: 16px 28px;
    }
    
    .categories span {
        font-size: 14px;
        padding: 12px 18px;
    }
    
    .stats-section {
        padding: 40px;
    }
    
    .stats-container {
        max-width: 1000px;
        gap: 30px;
    }
    
    .stat-box {
        padding: 30px 20px;
    }
    
    .stat-box .icon {
        width: 70px;
        height: 70px;
        font-size: 32px;
    }
    
    .stat-box h2 {
        font-size: 32px;
    }
    
    .stat-box p {
        font-size: 16px;
    }
    
    .top-teachers-intro {
        padding: 50px 40px;
    }
    
    .top-teachers-intro h2 {
        font-size: 32px;
    }
    
    .top-teachers-intro p {
        font-size: 19px;
    }
    
    .teachers-section {
        padding: 40px;
    }
    
    .teachers-section .row {
        max-width: 1100px;
        margin: 0 auto;
    }
    
    .teacher-card {
        max-width: 350px;
    }
    
    .teacher-card .image-container {
        height: 220px;
    }
    
    .teacher-details {
        padding: 24px;
    }
    
    .teacher-details h3 {
        font-size: 20px;
    }
    
    .teacher-details p {
        font-size: 15px;
    }
    
    .description {
        font-size: 15px;
    }
    
    .btn {
        font-size: 15px;
        padding: 12px 20px;
    }
    
    .how-it-works {
        padding: 60px 40px;
    }
    
    .works-how h3 {
        font-size: 32px;
    }
    
    .works-how p {
        font-size: 19px;
        margin-bottom: 50px;
    }
    
    .steps-container {
        gap: 40px;
        max-width: 1100px;
    }
    
    .step .icon {
        width: 80px;
        height: 80px;
        font-size: 36px;
    }
    
    .step h3 {
        font-size: 22px;
    }
    
    .step p {
        font-size: 16px;
    }
    
    .site-footer {
        padding: 50px 40px 25px;
    }
    
    .footer-content {
        max-width: 1100px;
    }
    
    .footer-column {
        max-width: 250px;
    }
    
    .footer-column h4 {
        font-size: 20px;
    }
    
    .footer-column p {
        font-size: 16px;
    }
    
    .footer-column ul li a {
        font-size: 15px;
    }
    
    .footer-bottom {
        font-size: 16px;
    }
}

/* ========================================
   LARGE DESKTOP (1200px+)
   ======================================== */

@media (min-width: 1200px) {
    .container {
        max-width: 1170px;
        padding: 0 50px;
    }
    
    header {
        padding: 22px 50px;
    }
    
    .hero {
        padding: 100px 50px;
    }
    
    .hero h1 {
        font-size: 52px;
    }
    
    .hero p {
        font-size: 20px;
        max-width: 750px;
    }
    
    .search-box-container {
        max-width: 750px;
    }
    
    .stats-section {
        padding: 50px;
    }
    
    .stats-container {
        max-width: 1200px;
        gap: 40px;
    }
    
    .top-teachers-intro {
        padding: 60px 50px;
    }
    
    .teachers-section {
        padding: 50px;
    }
    
    .teachers-section .row {
        max-width: 1300px;
    }
    
    .how-it-works {
        padding: 80px 50px;
    }
    
    .steps-container {
        gap: 60px;
        max-width: 1300px;
    }
    
    .site-footer {
        padding: 60px 50px 30px;
    }
    
    .footer-content {
        max-width: 1300px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */

/* Visibility Classes */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }

@media (max-width: 575px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
}

@media (min-width: 576px) {
    .d-sm-none { display: none !important; }
    .d-sm-block { display: block !important; }
}

@media (min-width: 768px) {
    .d-md-none { display: none !important; }
    .d-md-block { display: block !important; }
}

@media (min-width: 992px) {
    .d-lg-none { display: none !important; }
    .d-lg-block { display: block !important; }
}

/* Text Alignment */
.text-center { text-align: center !important; }
.text-left { text-align: left !important; }
.text-right { text-align: right !important; }

@media (max-width: 767px) {
    .text-center-mobile { text-align: center !important; }
}

/* Spacing */
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.mb-4 { margin-bottom: 32px !important; }

.mt-0 { margin-top: 0 !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mt-4 { margin-top: 32px !important; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 8px !important; }
.p-2 { padding: 16px !important; }
.p-3 { padding: 24px !important; }
.p-4 { padding: 32px !important; }

/* Width Classes */
.w-100 { width: 100% !important; }
.w-75 { width: 75% !important; }
.w-50 { width: 50% !important; }
.w-25 { width: 25% !important; }

/* Flexbox Utilities */
.justify-content-center { justify-content: center !important; }
.justify-content-between { justify-content: space-between !important; }
.align-items-center { align-items: center !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-column { flex-direction: column !important; }

@media (max-width: 767px) {
    .flex-column-mobile { flex-direction: column !important; }
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background: white !important;
        color: black !important;
        font-size: 12pt;
    }
    
    .hero {
        padding: 20px 0;
    }
    
    .hero h1 {
        font-size: 24pt;
    }
    
    .search-box-container,
    .mobile-menu,
    .menu-icon,
    .auth-buttons {
        display: none !important;
    }
}