/* Base Styles */
:root {
    --primary-color: #e63946;
    --secondary-color: #1d3557;
    --accent-color: #a8dadc;
    --light-color: #f1faee;
    --dark-color: #457b9d;
    --text-color: #333;
    --text-light: #777;
    --white: #fff;
    --black: #000;
    --font-main: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    direction: ltr;
}

body[lang="fa"], body[lang="ps"] {
    direction: rtl;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

a {
    text-decoration: none;
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

.btn {
    display: inline-block;
    background: var(--primary-color);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 5px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn:hover {
    background: var(--secondary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
    font-size: 2.5rem;
    color: var(--secondary-color);
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -15px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--primary-color);
}

/* Language Switcher Dropdown */
.language-switcher {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 1000;
}


.language-switcher select {
    padding: 8px 15px;
    border: 1px solid var(--secondary-color);
    border-radius: 5px;
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--secondary-color);
    font-family: var(--font-main);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.language-switcher select:hover {
    background: var(--secondary-color);
    color: var(--white);
}

/* RTL languages dropdown alignment */
body[lang="fa"] .language-switcher,
body[lang="ps"] .language-switcher {
    right: auto;
    left: 20px;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    transition: all 0.3s ease;
}

.header.scrolled {
    padding: 15px 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
}

.logo img {
    height: 50px;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.navbar {
    margin-right: 120px; /* Space for language dropdown */
}

.navbar ul {
    display: flex;
    gap: 30px;
}

.navbar ul li a {
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.navbar ul li a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.navbar ul li a:hover::after {
    width: 100%;
}

.navbar ul li a:hover {
    color: var(--primary-color);
}

.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}
/* Mobile responsiveness */
@media (max-width: 768px) {
    .language-switcher {
        top: 15px;
        right: 15px;
    }
    
    .navbar {
        margin-right: 0;
    }
    
    body[lang="fa"] .language-switcher,
    body[lang="ps"] .language-switcher {
        left: 15px;
    }
}

/* Hero Section */
.hero {
    height: 100vh;
    background: url('images/hero-bg.jpg') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--white);
    margin-top: 90px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    padding: 0 20px;
}

.hero h2 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    animation: fadeInUp 1s ease 0.3s forwards;
    opacity: 0;
}

.hero .btn {
    animation: fadeInUp 1s ease 0.6s forwards;
    opacity: 0;
}

/* About Section */
.about-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text {
    flex: 1;
}

.about-text p {
    margin-bottom: 20px;
    color: var(--text-light);
}

.about-image {
    flex: 1;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Events Section */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.event-card {
    background: var(--white);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.event-date {
    background: var(--primary-color);
    color: var(--white);
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.event-card h3 {
    margin-bottom: 15px;
    color: var(--secondary-color);
}

/* Athletes Section */
.athletes-slider {
    display: flex;
    gap: 30px;
    overflow-x: auto;
    padding: 20px 0;
    scroll-snap-type: x mandatory;
}

.athlete-card {
    min-width: 300px;
    background: var(--white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    scroll-snap-align: start;
    transition: transform 0.3s ease;
}

.athlete-card:hover {
    transform: scale(1.05);
}

.athlete-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.athlete-card h3 {
    padding: 15px;
    color: var(--secondary-color);
    text-align: center;
}

.athlete-card p {
    padding: 0 15px 15px;
    color: var(--text-light);
    text-align: center;
}

/* Gallery Section */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-overlay h3 {
    color: var(--white);
    font-size: 1.5rem;
    text-align: center;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Contact Section */
.contact-content {
    display: flex;
    gap: 50px;
}

.contact-info {
    flex: 1;
}

.contact-info h3 {
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-info i {
    color: var(--primary-color);
    font-size: 1.2rem;
}

.contact-form {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-form input,
.contact-form textarea {
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: var(--font-main);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 60px 0 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.footer-logo img {
    height: 50px;
}

.footer-logo h3 {
    font-size: 1.2rem;
}

.footer-links h4,
.footer-social h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
}

.footer-links h4::after,
.footer-social h4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links ul li a {
    color: var(--white);
    transition: color 0.3s ease;
}

.footer-links ul li a:hover {
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--white);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background: var(--primary-color);
    transform: translateY(-5px);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animated-text {
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
}

/* Responsive Styles */
@media (max-width: 992px) {
    .about-content,
    .contact-content {
        flex-direction: column;
    }
    
    .about-image {
        order: -1;
    }
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }
    
    .navbar {
        position: fixed;
        top: 90px;
        left: -100%;
        width: 80%;
        height: calc(100vh - 90px);
        background: var(--white);
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
        z-index: 998;
    }
    
    .navbar.active {
        left: 0;
    }
    
    .navbar ul {
        flex-direction: column;
        padding: 30px;
    }
    
    .hero h2 {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .hero h2 {
        font-size: 2rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .language-switcher {
        top: 10px;
        right: 10px;
    }
    
    .language-switcher button {
        padding: 3px 8px;
        font-size: 0.8rem;
    }
}

/* RTL Styles */
body[lang="fa"] .navbar ul li a::after,
body[lang="ps"] .navbar ul li a::after {
    left: auto;
    right: 0;
}

body[lang="fa"] .footer-links h4::after,
body[lang="fa"] .footer-social h4::after,
body[lang="ps"] .footer-links h4::after,
body[lang="ps"] .footer-social h4::after {
    left: auto;
    right: 0;
}