/* --- General Styles & CSS Variables --- */
:root {
    --primary-color: #007BFF;
    --primary-color: #007BFF;
    /* --primary-color: #d4af37; */
    --primary-hover: #0056b3;
    --secondary-color: #6c757d;
    --background-light: #f8f9fa;
    --text-light: #212529;
    --card-bg-light: #ffffff;
    --border-light: #dee2e6;
    --background-dark: #121212;
    --text-dark: #e0e0e0;
    --card-bg-dark: #1e1e1e;
    --border-dark: #333333;
    --font-fa: 'Vazirmatn', sans-serif;
    --font-en: 'Inter', sans-serif;
    --shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    --transition: all 0.3s ease-in-out;
}




[data-theme="light"] {
    --bg-color: var(--background-light);
    --text-color: var(--text-light);
    --card-bg: var(--card-bg-light);
    --border-color: var(--border-light);
}

[data-theme="dark"] {
    --bg-color: var(--background-dark);
    --text-color: var(--text-dark);
    --card-bg: var(--card-bg-dark);
    --border-color: var(--border-dark);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: var(--font-fa);
    line-height: 1.7;
    transition: var(--transition);
}

body[dir="ltr"] {
    font-family: var(--font-en);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 60px;
    font-weight: 700;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--primary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
}

.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Header --- */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 15px 0;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

[data-theme="dark"] .main-header {
    background-color: rgba(18, 18, 18, 0.8);
}


[data-theme="dark"] .hero-logos {
    filter: invert(1);
}

[data-theme="dark"]  #mainlogo {
    filter: invert(1);
    fill: black;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
}

.logo span {
    color: var(--primary-color);
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-nav a {
    font-weight: 500;
    color: var(--text-color);
    padding-bottom: 5px;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s;
}

html[dir="rtl"] .main-nav a::after {
    left: auto;
    right: 0;
}

.main-nav a:hover::after {
    width: 100%;
}

.header-tools {
    display: flex;
    align-items: center;
    gap: 20px;
}

.theme-switcher, .lang-switcher {
    cursor: pointer;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    position: relative;
    width: 24px;
    height: 24px;
}

#theme-icon, #lang-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s, transform 0.3s;
}

#lang-icon {
    font-size: 1rem;
    font-weight: bold;
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    font-size: 2rem;
    background: none;
    border: none;
    color: var(--text-color);
}

/* --- Hero Section --- */
.hero {
    padding-top: 150px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: url('https://placehold.co/1920x1080/eef5ff/333333?text=.') no-repeat center center/cover;
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    background-color:var(--background-light);

}

[data-theme="dark"] .hero {
    /* background: url('https://placehold.co/1920x1080/1a2a44/eeeeee?text=.') no-repeat center center/cover; */
}

[data-theme="dark"] .hero::after {
    background-color: rgba(0, 0, 0, 0.6);
    background-color: var(--background-dark);

    








}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
   font-size: clamp(2.5rem, 8vw, 6rem);
}

.hero h1 span {
    color: var(--primary-color);
}

.hero p {
    font-size: 1.25rem;
    font-size: 2.25rem;
    max-width: 600px;
    margin: 0 auto 30px;
}

/* --- News Section --- */
.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.news-card {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.news-card:hover {
    transform: translateY(-10px);
}

.news-card-img img {
    width: 100%;
    height: 220px;
    object-fit: cover;
}

.news-card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.news-card-content p {
    color: var(--secondary-color);
    flex-grow: 1;
    margin-bottom: 20px;
}

.news-card-meta {
    font-size: 0.9rem;
    color: var(--secondary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* --- Coaches Section --- */
#coaches {
    background-color: var(--card-bg);
}

.coaches-toolbar {
    text-align: center;
    margin-bottom: 40px;
}

.coach-search {
    width: 100%;
    max-width: 500px;
    padding: 15px 20px;
    border: 1px solid var(--border-color);
    border-radius: 50px;
    background: var(--bg-color);
    color: var(--text-color);
}

.coaches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.coach-card {
    text-align: center;
    padding: 30px 20px;
    border-radius: 15px;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.coach-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    margin: 0 auto 20px;
    border: 5px solid var(--primary-color);
    object-fit: cover;
}

.coach-card .specialty {
    color: var(--primary-color);
    font-weight: 500;
    margin-bottom: 15px;
}

/* --- Gallery Section --- */
.gallery-filters {
    text-align: center;
    margin-bottom: 40px;
}

.gallery-filters button {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--text-color);
    padding: 10px 20px;
    margin: 5px;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.gallery-filters button.active, .gallery-filters button:hover {
    background-color: var(--primary-color);
    color: #fff;
    border-color: var(--primary-color);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    box-shadow: var(--shadow);
}

.gallery-item img {
    transition: transform 0.4s;
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    opacity: 0;
    transition: var(--transition);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-caption {
    font-size: 1rem;
    padding: 0 10px;
    text-align: center;
    margin-top: 10px;
}

/* --- Lightbox --- */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.lightbox.show {
    opacity: 1;
    visibility: visible;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    border-radius: 5px;
}

.lightbox-close {
    position: absolute;
    top: -40px;
    right: 0px;
    font-size: 2.5rem;
    color: #fff;
    cursor: pointer;
    background: none;
    border: none;
}

html[dir="rtl"] .lightbox-close {
    right: auto;
    left: 0px;
}

/* --- Contact Section --- */
#contact {
    background-color: var(--card-bg);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.contact-info-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 25px;
}

.contact-info-item .icon {
    font-size: 2rem;
    color: var(--primary-color);
}

.contact-info-item p, .contact-info-item a {
    color: var(--text-color);
}

/* --- Footer --- */
.main-footer {
    background: var(--card-bg-dark);
    color: #ccc;
    padding: 40px 0;
    text-align: center;
}

/* --- Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    opacity: 0;
    visibility: hidden;
}

html[dir="rtl"] #back-to-top {
    right: auto;
    left: 30px;
}

#back-to-top.show {
    opacity: 1;
    visibility: visible;
}



/* --- Responsive --- */
@media (max-width: 768px) {
    .main-nav {
        position: fixed;
        top: 72px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.3s ease-in-out;
    }
    .main-nav.active {
        left: 0;
    }
    html[dir="rtl"] .main-nav {
        left: auto;
        right: -100%;
    }
    html[dir="rtl"] .main-nav.active {
        right: 0;
    }
    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }
    .mobile-menu-toggle {
        display: block;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
}



/* --- Coach Modal Styles --- */
.coach-modal-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.coach-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}

.coach-modal-content {
    background-color: var(--card-bg);
    color: var(--text-color);
    padding: 40px;
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s;
}

.coach-modal-backdrop.show .coach-modal-content {
    transform: scale(1);
}

.coach-modal-close {
    position: absolute;
    top: 20px;
    left: 20px;
    font-size: 2rem;
    color: var(--text-color);
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
}

html[dir="rtl"] .coach-modal-close {
    left: auto;
    right: 20px;
}

.coach-modal-header {
    display: flex;
    gap: 30px;
    align-items: center;
    padding-bottom: 20px;
    margin-bottom: 30px;
    border-bottom: 1px solid var(--border-color);
}

.coach-modal-header img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
}

.coach-modal-title h2 {
    font-size: 2.5rem;
    margin-bottom: 5px;
}

.coach-modal-title p {
    font-size: 1.2rem;
    color: var(--primary-color);
    font-weight: 500;
}

.coach-modal-body {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

.coach-modal-section h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.coach-modal-section .honors-list {
    list-style: none;
    padding: 0;
}

.coach-modal-section .honors-list li {
    padding-right: 20px;
    position: relative;
    margin-bottom: 10px;
}

.coach-modal-section .honors-list li::before {
    content: '🏆';
    position: absolute;
    right: -5px;
    top: 0;
    color: #f1c40f;
}

html[dir="ltr"] .coach-modal-section .honors-list li {
    padding-right: 0;
    padding-left: 25px;
}
html[dir="ltr"] .coach-modal-section .honors-list li::before {
    right: auto;
    left: 0;
}

.coach-modal-images {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

.coach-modal-images img {
    width: 48%;
    max-width: 300px;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.coach-modal-social a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background-color: #e83e8c;
    color: #fff;
    padding: 10px 20px;
    border-radius: 50px;
    font-weight: 500;
    transition: var(--transition);
}

.coach-modal-social a:hover {
    opacity: 0.8;
}

@media (max-width: 768px) {
    .coach-modal-header {
        flex-direction: column;
        text-align: center;
    }
    .coach-modal-images img {
        width: 100%;
    }
}




/* --- Hero Background Video Styles --- */
.hero-video-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translate(-50%, -50%);
    z-index: 0;
}

/* Ensure content stays above the video and its overlay */
.hero-content {
    position: relative;
    z-index: 2;
}

/* Adjust the overlay to work with the video */
.hero::after {
    z-index: 1;
}

/* --- Contact Us Navigation Links --- */
.navigation-links {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-top: 20px;
    justify-content: flex-start;
}
html[dir="ltr"] .navigation-links {
    justify-content: flex-end;
}

.nav-link-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    border-radius: 50px;
    text-decoration: none;
    color: #fff;
    font-weight: 500;
    transition: all 0.3s;
}
.nav-link-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.nav-link-btn.google-maps { background-color: #4285F4; }
.nav-link-btn.neshan { background-color: #1D8348; }
.nav-link-btn.balad { background-color: #FF7F00; }

.nav-link-btn svg {
    width: 24px;
    height: 24px;
    fill: currentColor;
}




/* --- About Us Section Styles --- */
 #about {
    background-color: var(--card-bg);

}

[data-theme="dark"] #about {
    background-color: var(--background-dark);

}

.about-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.about-content > p {
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--secondary-color);
    margin-bottom: 50px;
}

[data-theme="dark"] .about-content > p {
    color: #ccc;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-item {
    padding: 20px;
}

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-item h3 {
    font-size: 1.4rem;
    margin-bottom: 10px;
    color: var(--text-color);
}

.feature-item p {
    font-size: 1rem;
    color: var(--secondary-color);
}




.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* کاهش حداقل عرض برای سازگاری بهتر */
    gap: 30px;
}


/* --- Responsive Fixes --- */
@media (max-width: 768px) {
    .main-nav {
        display: flex; /* این خط برای چیدمان عمودی ضروری است */
        position: fixed;
        top: 72px; /* ارتفاع تقریبی هدر */
        left: -100%;
        width: 100%;
        height: calc(100vh - 72px);
        background: var(--bg-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: left 0.3s ease-in-out;
    }

    /* این کد برای زبان فارسی، منو را از سمت راست باز می‌کند */
    html[dir="rtl"] .main-nav {
        left: auto;
        right: -100%;
        transition: right 0.3s ease-in-out;
    }

    .main-nav.active {
        left: 0;
    }

    html[dir="rtl"] .main-nav.active {
        right: 0;
    }

    .main-nav ul {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .main-nav a {
        font-size: 1.5rem;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
}
