/* ===========================
   CSS Variables & Root Styles
   =========================== */

:root {
    --primary-color: #1a472a;
    --secondary-color: #d4a574;
    --accent-color: #f37021;
    --text-dark: #333333;
    --text-light: #666666;
    --bg-light: #f8f8f8;
    --bg-white: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 20px rgba(0, 0, 0, 0.15);
    
    --transition: all 0.3s ease;
    --font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* ===========================
   General Styles
   =========================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-dark);
    background-color: var(--bg-white);
    line-height: 1.6;
}

/* ===========================
   Typography
   =========================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    color: var(--primary-color);
}

h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
}

/* ===========================
   Container
   =========================== */

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

/* ===========================
   Navigation Bar
   =========================== */

.navbar {
    background-color: var(--primary-color);
    color: var(--bg-white);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow);
}

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

.logo h1 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin: 0;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    color: var(--bg-white);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--secondary-color);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--secondary-color);
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background-color: var(--bg-white);
    margin: 5px 0;
    transition: var(--transition);
}

/* ===========================
   Hero Section
   =========================== */

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a5c3f 100%);
    color: var(--bg-white);
    padding: 200px 20px 100px;
    text-align: center;
    margin-top: 60px;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-content {
    animation: fadeInUp 0.8s ease-out;
}

.hero-title {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    color: var(--bg-light);
}

/* ===========================
   Buttons
   =========================== */

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 5px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--accent-color);
    color: var(--bg-white);
}

.btn-primary:hover {
    background-color: #e85d0e;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===========================
   Sections
   =========================== */

.section {
    padding: 80px 20px;
}

.section-alt {
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-header h2 {
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* ===========================
   About Section
   =========================== */

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.about-card {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out;
}

.about-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.about-card h3 {
    margin-bottom: 1rem;
}

/* ===========================
   Mission Section
   =========================== */

.mission-content {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease-out;
    border-left: 5px solid var(--accent-color);
}

.mission-text h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.mission-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
}

.mission-objectives {
    margin-top: 2rem;
}

.mission-objectives h4 {
    color: var(--accent-color);
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.mission-objectives ul {
    list-style: none;
}

.mission-objectives li {
    padding: 0.5rem 0;
    color: var(--text-light);
    font-size: 1rem;
}

.mission-objectives li:before {
    content: '→ ';
    color: var(--accent-color);
    font-weight: bold;
    margin-right: 0.5rem;
}

/* ===========================
   Programs Section
   =========================== */

.programs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.program-card {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out;
    border-top: 4px solid var(--accent-color);
}

.program-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.program-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.program-card h3 {
    margin-bottom: 1rem;
}

.program-card p {
    margin-bottom: 1.5rem;
}

.program-details {
    background-color: var(--bg-light);
    padding: 15px;
    border-radius: 5px;
    margin-top: 1rem;
}

.program-details p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

/* ===========================
   Tournaments Section
   =========================== */

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

.tournament-card {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out;
}

.tournament-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

.tournament-card h3 {
    color: var(--accent-color);
    margin-bottom: 1rem;
}

.tournament-card p {
    margin-bottom: 1rem;
}

.tournament-info {
    background-color: var(--bg-light);
    padding: 15px;
    border-radius: 5px;
    margin-top: 1rem;
}

.tournament-info p {
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.tournament-benefits {
    background-color: var(--bg-white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.tournament-benefits h3 {
    text-align: center;
    margin-bottom: 2rem;
}

.benefits-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.benefit {
    padding: 15px;
    background-color: var(--bg-light);
    border-radius: 5px;
    border-left: 4px solid var(--accent-color);
}

/* ===========================
   Why Chess Section
   =========================== */

.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.benefit-card {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    animation: fadeInUp 0.6s ease-out;
}

.benefit-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--bg-white) 0%, #f5f5f5 100%);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.benefit-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* ===========================
   Contact Section
   =========================== */

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.info-card {
    background-color: var(--bg-white);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease-out;
}

.info-card h3 {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.info-card p {
    margin: 0;
}

.info-card a {
    font-weight: 500;
}

.contact-form {
    background-color: var(--bg-white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    animation: fadeInUp 0.6s ease-out;
}

.contact-form h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: var(--font-family);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(243, 112, 33, 0.3);
}

.form-note {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
}

/* ===========================
   Footer
   =========================== */

.footer {
    background-color: var(--primary-color);
    color: var(--bg-white);
    text-align: center;
    padding: 30px 20px;
    margin-top: 50px;
}

.footer-content p {
    margin-bottom: 0.5rem;
    color: var(--bg-white);
}

.footer-content p:last-child {
    margin-bottom: 0;
}

/* ===========================
   Animations
   =========================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* ===========================
   Responsive Design
   =========================== */

/* Tablets (768px and below) */
@media (max-width: 768px) {
    .nav-links {
        gap: 1rem;
        font-size: 0.9rem;
    }

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

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

    h1 {
        font-size: 1.8rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.2rem;
    }

    .section {
        padding: 60px 20px;
    }

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

    .about-grid,
    .programs-grid,
    .benefits-grid {
        grid-template-columns: 1fr;
    }

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

/* Mobile (480px and below) */
@media (max-width: 480px) {
    .navbar {
        padding: 0.75rem 0;
    }

    .nav-content {
        flex-wrap: wrap;
    }

    .logo h1 {
        font-size: 1.3rem;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        background-color: var(--primary-color);
        padding: 1rem;
        gap: 0.5rem;
        position: absolute;
        top: 100%;
        left: 0;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: flex;
        order: 3;
    }

    .hero {
        padding: 150px 20px 60px;
        margin-top: 60px;
    }

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

    .hero-subtitle {
        font-size: 0.9rem;
    }

    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.2rem;
    }

    h3 {
        font-size: 1rem;
    }

    .section {
        padding: 40px 15px;
    }

    .card-icon,
    .program-icon,
    .benefit-icon {
        font-size: 2rem;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }

    .contact-form,
    .about-card,
    .program-card,
    .benefit-card,
    .tournament-card,
    .info-card {
        padding: 20px;
    }

    .mission-content {
        padding: 20px;
    }

    .form-group input,
    .form-group textarea {
        padding: 10px;
        font-size: 16px;
    }
}

/* Small Mobile (under 360px) */
@media (max-width: 360px) {
    h1 {
        font-size: 1.3rem;
    }

    h2 {
        font-size: 1.1rem;
    }

    h3 {
        font-size: 0.95rem;
    }

    .btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }

    .logo h1 {
        font-size: 1.1rem;
    }
}