/* CSS Variables */
:root {
    --primary-color: #2563eb;
    --primary-dark: #1e40af;
    --secondary-color: #10b981;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --bg-light: #f9fafb;
    --bg-white: #ffffff;
    --border-color: #e5e7eb;
    --error-color: #ef4444;
    --success-color: #10b981;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-white);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-color);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-dark);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(45deg, #7c8ef0 0%, #8a5fb8 25%, #f5a5fc 50%, #6bb5ff 75%, #1affff 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
    color: white;
    padding: 6rem 0;
    text-align: center;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero-paragraph {
    animation: fadeInUp 0.8s ease 0.2s both;
}

.hero-paragraph:nth-of-type(3) {
    animation: fadeInUp 0.8s ease 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.4s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
    display: block;
}

.btn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.4s ease;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(16, 185, 129, 0.3);
}

.btn-submit:hover::before {
    left: 100%;
}

.btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-submit:disabled::before {
    display: none;
}

/* Sections */
section {
    padding: 4rem 0;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--text-dark);
}

/* About Section */
.about {
    background: var(--bg-light);
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text p {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: var(--text-light);
}

/* Olympiad Section */
.olympiad-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.olympiad-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
}

.olympiad-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.icon-wrapper {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
}

.olympiad-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.olympiad-card p {
    color: var(--text-light);
    line-height: 1.6;
}

/* Gallery Section */
.gallery {
    background: var(--bg-light);
}

.gallery-swiper {
    padding: 2rem 0 4rem;
}

.gallery-card {
    height: 100%;
    background: var(--bg-white);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.gallery-card:hover {
    box-shadow: var(--shadow-lg);
}

.gallery-image {
    width: 100%;
    height: 300px;
    overflow: hidden;
    background: var(--border-color);
}

.gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: right 30%;
    transition: var(--transition);
}

.gallery-card:hover .gallery-image img {
    transform: scale(1.05);
}

.gallery-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.gallery-content h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.gallery-content p {
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.btn-gallery {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    margin-top: auto;
    text-align: center;
    width: 100%;
}

.btn-gallery::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.4s ease;
}

.btn-gallery:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 20px rgba(16, 185, 129, 0.3);
}

.btn-gallery:hover::before {
    left: 100%;
}

/* Swiper Customization */
.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-color);
}

.swiper-pagination-bullet-active {
    background: var(--primary-color);
}

.gallery-swiper .swiper-slide {
    height: auto;
    display: flex;
}

/* Contact Form Section */
.contact-form-section {
    background: var(--bg-light);
}

.form-description {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3rem;
    align-items: start;
}

.contact-info {
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 100px;
}

.contact-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    width: 24px;
    text-align: center;
}

.contact-item span {
    color: var(--text-dark);
}

.contact-item a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

.contact-item a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.contact-form {
    max-width: 100%;
    background: var(--bg-white);
    padding: 2.5rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-md);
}

.form-row {
    display: block;
    margin-bottom: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.required {
    color: var(--error-color);
}

.form-group input,
.form-group textarea {
    padding: 0.875rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    transition: var(--transition);
    width: 100%;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.form-group input.error,
.form-group textarea.error {
    border-color: var(--error-color);
}

.error-message {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: none;
}

.error-message.show {
    display: block;
}

.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.form-group-set {
    padding: 1.5rem 1.75rem;
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    margin-bottom: 1.75rem;
    background-color: #fefefe;
}

.form-group-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--text-dark);
}

.form-group-hint {
    margin-bottom: 1rem;
    font-size: 0.95rem;
    color: var(--text-light);
}

.contact-form textarea {
    resize: none;
}

.btn-submit {
    margin-top: 0.5rem;
}

/* Footer */
.footer {
    background: var(--text-dark);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

.footer-content p {
    margin-bottom: 0.5rem;
}

.footer-content a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-content a:hover {
    text-decoration: underline;
}

.footer-links {
    margin-top: 1rem;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.7);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.footer-separator {
    margin: 0 0.5rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--bg-white);
        flex-direction: column;
        padding: 1rem;
        box-shadow: var(--shadow-md);
        gap: 1rem;
    }

    .nav.active {
        display: flex;
    }

    .mobile-menu-toggle {
        display: flex;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.25rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .olympiad-content {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-info {
        position: static;
    }

    .contact-form {
        padding: 1.5rem;
    }

    section {
        padding: 3rem 0;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 4rem 0;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .contact-form {
        padding: 1rem;
    }
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.fa-spinner {
    animation: spin 1s linear infinite;
}

