/* --- Global Styles & Variables --- */
:root {
    --primary-color: #4A90E2; /* A friendly blue */
    --secondary-color: #F5A623; /* A warm orange */
    --background-color: #FDFEFE;
    --text-color: #333;
    --light-gray: #f4f4f4;
    --white: #fff;
    --border-radius: 12px;
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 700;
    line-height: 1.3;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; color: var(--primary-color); }
h3 { font-size: 1.5rem; }

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--secondary-color);
}

/* --- Buttons --- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    margin-top: 35px;
    border-radius: 50px;
    font-weight: 700;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #357ABD;
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.4);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: var(--white);
}
.btn-secondary:hover {
    background-color: #d9901e;
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(245, 166, 35, 0.4);
}


.main-header nav a {
    margin: 0 15px;
    font-weight: 500;
}

/* --- Hero Section --- */
.hero {
    padding: 120px 0;
    background: linear-gradient(135deg, #e0f7fa 0%, #fef9c3 100%);
}

.hero-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.hero-text { flex: 1; }

.hero-image-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.hero-image {
    width: 100%;
    max-width: 400px; /* می‌توانید اندازه را تنظیم کنید */
    height: 400px;
    object-fit: cover; /* باعث می‌شود تصویر بدون دفورمه شدن، فضا را پر کند */
    border-radius: 50%; /* تصویر را به یک دایره کامل تبدیل می‌کند */
    box-shadow: 0 15px 40px rgba(74, 144, 226, 0.25); /* یک سایه زیبا و مدرن */
    border: 8px solid var(--white); /* یک حاشیه سفید برای جدا شدن از پس‌زمینه */
    
    /* اعمال همان انیمیشن شناور */
    animation: float 6s ease-in-out infinite;
}

/* برای موبایل، اندازه تصویر را کمی کوچکتر می‌کنیم */
@media (max-width: 768px) {
    .hero-image {
        max-width: 280px;
        height: 280px;
    }
}
/* --- Stats Section --- */
.stats {
    padding: 80px 0;
    background-color: var(--light-gray);
}

.stats .container {
    display: flex;
    justify-content: space-around;
    text-align: center;
    gap: 30px;
}

.stat-item {
    padding: 20px;
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 900;
    color: var(--secondary-color);
}

.stat-item p {
    font-size: 1.1rem;
    color: #555;
    margin-top: 5px;
}

/* --- Courses Section (Pinned Layout) --- */
.courses-section {
    padding: 100px 0;
    display: flex;
    gap: 50px;
    align-items: flex-start;
    max-width: 1200px;
    margin: 0 auto;
}

.courses-title-pinned {
    flex: 1;
    position: sticky;
    top: 120px; /* Adjust based on header height */
    padding: 20px;
}
.courses-title-pinned .info-box {
    margin-top: 20px;
    padding: 15px;
    background: #eef7ff;
    border-right: 4px solid var(--primary-color);
    border-radius: 8px;
}
.courses-title-pinned .info-box p {
    font-size: 0.95rem;
    font-weight: 500;
}

.courses-container {
    flex: 1.5;
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.course-card {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.course-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.course-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.course-card h3, .course-card p, .course-card .features-list {
    padding: 0 25px;
}
.course-card h3 {
    margin-top: 20px;
    color: var(--primary-color);
}
.course-card p {
    margin: 15px 0;
}

.features-list {
    list-style-type: none; /* تیک پیش‌فرض را حذف می‌کنیم تا خودمان اضافه کنیم */
    padding-right: 25px; /* یک پدینگ کلی از سمت راست کارت */
    padding-bottom: 25px;
    margin-top: 20px; /* کمی فاصله از پاراگراف بالا */
}

.features-list li {
    margin-bottom: 12px;
    position: relative;
    padding-right: 30px; /* فضایی برای قرار دادن تیک */
    font-size: 0.95rem;
    line-height: 1.6;
}

.features-list li::before {
    content: '✔️'; /* تیک را با استفاده از شبه‌عنصر اضافه می‌کنیم */
    position: absolute;
    right: 0;
    top: 1px;
    color: var(--primary-color); /* رنگ تیک را با رنگ اصلی ست می‌کنیم */
}

/* --- Gallery Section (Swiper) --- */
.gallery {
    padding: 80px 0;
    background: var(--light-gray);
    text-align: center;
}

.gallery p {
    max-width: 600px;
    margin: 15px auto 40px;
}

.swiper {
    width: 100%;
    height: 500px;
    border-radius: var(--border-radius);
}

.swiper-slide {
    text-align: center;
    font-size: 18px;
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
}

.swiper-slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.swiper-button-next, .swiper-button-prev {
    color: var(--white) !important;
    background: rgba(0,0,0,0.3);
    border-radius: 50%;
    width: 50px !important;
    height: 50px !important;
}
.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 20px !important;
    font-weight: 900;
}
.swiper-pagination-bullet-active {
    background: var(--secondary-color) !important;
}


/* --- Footer --- */
.main-footer {
    background-color: #2c3e50;
    color: var(--white);
    padding: 60px 0 20px;
    text-align: center;
}

.main-footer h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.main-footer p {
    margin-bottom: 15px;
    opacity: 0.8;
}

.main-footer .btn {
    margin-top: 20px;
}
.footer-bottom {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
    opacity: 0.7;
}
.description{
    padding-top: 20px;
}
/* --- Animations --- */
@keyframes float {
	0% { transform: translatey(0px); }
	50% { transform: translatey(-20px); }
	100% { transform: translatey(0px); }
}

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in { transform: scale(0.95); }
.fade-in-up { transform: translateY(40px); }
.slide-in-right { transform: translateX(-50px); }

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: none;
}

/* --- Responsive Media Queries --- */
@media (max-width: 992px) {
    .courses-section {
        flex-direction: column;
    }
    .courses-title-pinned {
        position: static;
        text-align: center;
        margin-bottom: 40px;
    }
    h1 { font-size: 2.4rem; }
    h2 { font-size: 2rem; }
}

@media (max-width: 768px) {
    .main-header .container { flex-direction: column; gap: 10px; }
    .main-header nav { margin-top: 10px; }

    .hero-content {
        flex-direction: column-reverse;
        text-align: center;
    }
    .hero { padding: 40px 0; }
    
    .stats .container {
        flex-direction: column;
    }
    .stat-number { font-size: 3rem; }
    
    .courses-section { padding: 60px 20px; }
    
    .swiper { height: 300px; }
}
/* --- General Section Title --- */
.section-title {
    text-align: center;
    margin-bottom: 50px;
}

/* --- Hero Section Enhancement --- */
.hero-text .brand-name {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 15px;
}

/* --- Why Us Section --- */
.why-us-section {
    padding: 80px 0;
    background-color: var(--background-color);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    background: var(--white);
    padding: 30px;
    text-align: center;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.feature-icon {
    font-size: 3rem;
    line-height: 1;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}

/* --- FAQ Section --- */
.faq-section {
    padding: 80px 0;
    background: var(--light-gray);
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

details {
    background: var(--white);
    border-radius: var(--border-radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

summary {
    padding: 20px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--primary-color);
    cursor: pointer;
    list-style: none; /* Hide default marker */
    position: relative;
    transition: background-color 0.2s ease;
}
summary:hover {
    background-color: #f8f9fa;
}

summary::-webkit-details-marker { display: none; } /* Hide for Chrome */

summary::after {
    content: '▼';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

details[open] summary::after {
    transform: translateY(-50%) rotate(180deg);
}

details p {
    padding: 0 20px 20px;
    color: #555;
    border-top: 1px solid #eee;
    margin-top: 10px;
}

/* --- Call to Action (CTA) Section --- */
.cta-section {
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(135deg, var(--primary-color), #2c73c9);
    color: var(--white);
    margin-bottom: -40px;
}

.cta-section h2 {
    color: var(--white);
    font-size: 2.5rem;
}

.cta-section p {
    font-size: 1.1rem;
    max-width: 700px;
    margin: 15px auto 30px;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    background-color: var(--secondary-color);
    color: var(--white);
    padding: 18px 40px;
    border-radius: 50px;
    font-size: 1.3rem;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(245, 166, 35, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}
.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 163, 15, 0.6);
    background-color: #ffffff;
    color: rgb(255, 102, 0);
    animation: none; /* Stop pulsing on hover */
}

.cta-section .address {
    margin-top: 30px;
    font-size: 1rem;
    opacity: 1;
}

/* --- Animation for CTA Button --- */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}


/* --- Responsive Media Queries (Additions) --- */
@media (max-width: 992px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .section-title, .cta-section h2 {
        font-size: 1.8rem;
    }
    .cta-button {
        padding: 15px 30px;
        font-size: 1.1rem;
        width: 100%; /* Make button full width on small screens */
    }
    .why-us-section, .faq-section, .cta-section {
        padding: 60px 0;
    }
}