/* ==================== Variables ==================== */
:root {
    /* الألوان من الشعار - راية التميز */
    --dark-green: #1e3a5f;
    --light-green: #d17a5c;
    --golden-yellow: #d17a5c;
    --light-yellow: #fef7f0;
    --white: #ffffff;
    --light-gray: #f5f5f5;
    --gray: #e0e0e0;
    --text-dark: #1e3a5f;
    --text-gray: #666;
    --sky-blue: #e8f4fd;
    --success-green: #27ae60;
    --shadow: rgba(30, 58, 95, 0.1);
    --shadow-hover: rgba(30, 58, 95, 0.2);
}

/* ==================== Reset & Base ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Cairo', sans-serif;
    direction: rtl;
    text-align: right;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--white);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ==================== Container ==================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== Header & Navigation ==================== */
.header {
    background: var(--white);
    box-shadow: 0 2px 8px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    padding: 15px 0;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-green);
    text-decoration: none;
}

.logo-image {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--light-green);
}

.logo-icon {
    font-size: 1.8rem;
}

.nav-menu {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    font-weight: 600;
    transition: color 0.3s;
    padding: 8px 12px;
    border-radius: 6px;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--light-green);
}

.whatsapp-btn {
    background: var(--success-green) !important;
    color: var(--white) !important;
    padding: 8px 20px !important;
    border-radius: 8px;
    font-weight: 600;
}

.whatsapp-btn:hover {
    background: #229954 !important;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    width: 30px;
    height: 25px;
}

.mobile-menu-toggle span {
    display: block;
    width: 100%;
    height: 3px;
    background: var(--dark-green);
    border-radius: 3px;
    transition: 0.3s;
}

/* ==================== Hero Section ==================== */
.hero {
    background: linear-gradient(135deg, #1e3a5f 0%, #5a7ba8 60%, #f4b644 100%);
    color: var(--white);
    padding: 60px 20px;
    text-align: center;
}

.hero-content {
    position: relative;
}

.hero-title {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.4;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 30px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    opacity: 0.95;
}

.hero-image {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 30px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    display: block;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.btn {
    display: inline-block;
    padding: 14px 32px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--golden-yellow);
    color: var(--dark-green);
}

.btn-primary:hover {
    background: #e6a832;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 182, 68, 0.3);
}

.btn-secondary {
    background: var(--white);
    color: var(--light-green);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: transparent;
    color: var(--white);
}

.btn-block {
    width: 100%;
}

.hero-features {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

.feature-icon {
    font-size: 1.3rem;
}

/* ==================== Sections ==================== */
section {
    padding: 60px 20px;
}

.section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--dark-green);
    margin-bottom: 40px;
}

/* ==================== Search Section ==================== */
.search-section {
    background: var(--light-gray);
}

.search-form {
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px;
    border: 2px solid var(--gray);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--light-green);
}

.form-group textarea {
    resize: vertical;
}

/* ==================== Subjects Grid ==================== */
.subjects-section {
    background: var(--white);
}

.subjects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.subject-card {
    background: var(--white);
    border: 2px solid var(--gray);
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.3s;
    cursor: pointer;
}

.subject-card:hover {
    border-color: var(--golden-yellow);
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--shadow);
}

.subject-icon {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.subject-card h3 {
    font-size: 1rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* ==================== Teachers Grid ==================== */
.teachers-section {
    background: var(--light-yellow);
}

.teachers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.teacher-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s;
}

.teacher-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px var(--shadow-hover);
}

.teacher-card-inner {
    display: flex;
    gap: 15px;
    padding: 20px;
}

.teacher-image-wrapper {
    flex-shrink: 0;
    width: 120px;
    height: 120px;
}

.teacher-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    border: 3px solid var(--golden-yellow);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    color: white;
}

.teacher-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.teacher-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--dark-green);
    margin-bottom: 5px;
}

.teacher-badge {
    display: inline-block;
    background: var(--success-green);
    color: var(--white);
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    width: fit-content;
}

.teacher-meta {
    font-size: 0.9rem;
    color: var(--text-gray);
    display: flex;
    align-items: center;
    gap: 5px;
}

.teacher-meta-icon {
    font-size: 1rem;
}

.teacher-subjects {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.subject-tag {
    background: var(--sky-blue);
    color: var(--text-dark);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.teacher-price {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--golden-yellow);
    margin-top: auto;
}

.teacher-card-footer {
    padding: 0 20px 20px;
}

.btn-request {
    width: 100%;
    background: var(--light-green);
    color: var(--white);
    padding: 12px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s;
    text-decoration: none;
    display: block;
    text-align: center;
    border: none;
    cursor: pointer;
    font-family: 'Cairo', sans-serif;
}

.btn-request:hover {
    background: var(--dark-green);
    color: var(--white);
}
}

/* ==================== CTA Section ==================== */
.cta-section {
    background: linear-gradient(135deg, #1e3a5f 0%, #5a7ba8 60%, #f4b644 100%);
    text-align: center;
    color: var(--white);
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 15px;
}

.cta-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.cta-section .btn-primary {
    background: var(--dark-green);
    color: var(--white);
}

.cta-section .btn-primary:hover {
    background: var(--light-green);
}

/* ==================== FAQ Section ==================== */
.faq-section {
    background: var(--white);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.faq-item {
    background: var(--light-gray);
    border-radius: 8px;
    overflow: hidden;
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-align: right;
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark-green);
    transition: background 0.3s;
}

.faq-question:hover {
    background: var(--gray);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 400;
    transition: transform 0.3s;
}

.faq-item.active .faq-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
}

.faq-answer p {
    padding: 0 20px 20px;
    color: var(--text-gray);
    line-height: 1.8;
}

/* ==================== Modal ==================== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 2000;
    overflow-y: auto;
    padding: 20px;
}

.modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-close {
    position: absolute;
    top: 15px;
    left: 15px;
    font-size: 2rem;
    color: var(--text-gray);
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: var(--light-gray);
    color: var(--dark-green);
}

.modal-content h2 {
    color: var(--dark-green);
    margin-bottom: 25px;
    text-align: center;
}

.request-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* ==================== Success Message ==================== */
.success-message {
    text-align: center;
    padding: 30px;
}

.success-icon {
    width: 80px;
    height: 80px;
    background: var(--success-green);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    margin: 0 auto 20px;
}

.success-message h3 {
    color: var(--success-green);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.success-message p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 25px;
}

/* ==================== Contact Section ==================== */
.contact-section {
    background: var(--light-gray);
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.contact-item {
    text-align: center;
    padding: 30px;
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
}

.contact-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.contact-item h3 {
    color: var(--dark-green);
    margin-bottom: 10px;
    font-size: 1.2rem;
}

.contact-item p {
    color: var(--text-gray);
    font-size: 1rem;
}

/* ==================== Footer ==================== */
.footer {
    background: var(--dark-green);
    color: var(--white);
    padding: 40px 20px 20px;
    text-align: center;
}

.footer-content {
    max-width: 800px;
    margin: 0 auto;
}

.footer-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 15px;
}

.footer-content > p {
    margin-bottom: 25px;
    opacity: 0.9;
    line-height: 1.8;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 25px;
    flex-wrap: wrap;
    margin-bottom: 25px;
}

.footer-links a {
    color: var(--white);
    opacity: 0.9;
    transition: opacity 0.3s;
}

.footer-links a:hover {
    opacity: 1;
}

.copyright {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    opacity: 0.8;
    font-size: 0.9rem;
}

/* ==================== Floating WhatsApp Button ==================== */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    left: 25px;
    background: var(--success-green);
    color: var(--white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(39, 174, 96, 0.4);
    z-index: 1500;
    transition: all 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
}

/* ==================== Page Header ==================== */
.page-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #5a7ba8 60%, #f4b644 100%);
    color: var(--white);
    padding: 50px 20px;
    text-align: center;
}

.page-header h1 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.page-header p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ==================== Filter Section ==================== */
.filter-section {
    background: var(--light-gray);
    padding: 30px 20px;
}

.filter-form {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    align-items: end;
}

.filter-form .btn {
    padding: 12px 20px;
    height: fit-content;
}

/* ==================== Teachers List Section ==================== */
.teachers-list-section {
    padding: 50px 20px;
    background: var(--white);
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
}

.results-header p {
    font-size: 1.1rem;
    color: var(--text-gray);
    font-weight: 600;
}

/* ==================== Join Form ==================== */
.join-section {
    background: var(--white);
    padding: 60px 20px;
}

.join-container {
    max-width: 700px;
    margin: 0 auto;
    background: var(--light-gray);
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
}

.join-intro {
    text-align: center;
    margin-bottom: 35px;
}

.join-intro h2 {
    color: var(--dark-green);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.join-intro p {
    color: var(--text-gray);
    line-height: 1.8;
}

.join-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

.checkbox-group label {
    cursor: pointer;
    margin: 0;
}

.file-input-wrapper {
    position: relative;
}

.file-input-wrapper input[type="file"] {
    opacity: 0;
    position: absolute;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: block;
    padding: 12px;
    border: 2px dashed var(--gray);
    border-radius: 8px;
    text-align: center;
    color: var(--text-gray);
    cursor: pointer;
    transition: all 0.3s;
}

.file-input-label:hover {
    border-color: var(--light-green);
    background: var(--white);
}

.file-name {
    display: block;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--text-dark);
    font-weight: 600;
}

/* ==================== Teacher Profile Page ==================== */
.teacher-profile-section {
    padding: 60px 20px;
    background: var(--light-gray);
}

.profile-container {
    max-width: 900px;
    margin: 0 auto;
}

.profile-header {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 30px;
}

.profile-header-content {
    display: flex;
    gap: 30px;
    align-items: start;
}

.profile-image-wrapper {
    flex-shrink: 0;
}

.profile-image {
    width: 180px;
    height: 180px;
    object-fit: cover;
    border-radius: 12px;
    border: 4px solid var(--golden-yellow);
    background: var(--light-yellow);
}

.profile-info {
    flex: 1;
}

.profile-name {
    font-size: 2rem;
    font-weight: 700;
    color: var(--dark-green);
    margin-bottom: 10px;
}

.profile-badge {
    display: inline-block;
    background: var(--success-green);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.profile-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 20px;
}

.profile-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--text-gray);
}

.profile-meta-icon {
    font-size: 1.2rem;
}

.profile-details {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow);
    margin-bottom: 30px;
}

.profile-details h3 {
    color: var(--dark-green);
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.profile-details p {
    color: var(--text-gray);
    line-height: 1.8;
    margin-bottom: 20px;
}

.detail-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.detail-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.detail-label {
    font-weight: 600;
    color: var(--dark-green);
    font-size: 0.95rem;
}

.detail-value {
    color: var(--text-gray);
}

.profile-actions {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.profile-actions .btn {
    flex: 1;
    min-width: 200px;
}

/* ==================== Utilities ==================== */
.text-center {
    text-align: center;
}

/* ==================== Responsive Design ==================== */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        gap: 0;
        box-shadow: 0 8px 16px var(--shadow);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s;
    }

    .nav-menu.active {
        max-height: 400px;
        padding: 15px 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-menu a {
        display: block;
        padding: 12px 20px;
    }

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

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

    .hero-buttons {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .hero-features {
        flex-direction: column;
        gap: 15px;
    }

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

    .search-form {
        grid-template-columns: 1fr;
    }

    .subjects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

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

    .teacher-card-inner {
        flex-direction: column;
        text-align: center;
    }

    .teacher-image-wrapper {
        width: 150px;
        height: 150px;
        margin: 0 auto;
    }

    .teacher-info {
        align-items: center;
    }

    .teacher-meta {
        justify-content: center;
    }

    .teacher-badge {
        margin: 0 auto;
    }

    .cta-content h2 {
        font-size: 1.5rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    .contact-info {
        grid-template-columns: 1fr;
    }

    .modal-content {
        padding: 25px 20px;
    }

    .whatsapp-float {
        bottom: 20px;
        left: 20px;
        width: 55px;
        height: 55px;
    }

    .whatsapp-float svg {
        width: 28px;
        height: 28px;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    section {
        padding: 40px 15px;
    }

    .hero {
        padding: 40px 15px;
    }

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

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

    .subject-card {
        padding: 20px;
    }
}
