/* ===================================
   ACXA - Associação de Xadrez
   Professional Light Theme (v3)
=================================== */

/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* CSS Variables */
:root {
    /* Colors */
    --color-primary: #01A0E2;
    --color-primary-hover: #0081B8;
    /* Darker shade of #01A0E2 */
    --color-secondary: #1F2937;

    --color-bg-white: #FFFFFF;
    --color-bg-subtle: #F9FAFB;
    /* Gray 50 */
    --color-bg-accent: #FEF3C7;
    /* Amber 50 */

    --color-text-main: #111827;
    /* Gray 900 */
    --color-text-muted: #6B7280;
    /* Gray 500 */
    --color-text-light: #9CA3AF;
    /* Gray 400 */

    --color-border: #E5E7EB;
    /* Gray 200 */
    --color-border-hover: #D1D5DB;
    /* Gray 300 */

    /* Shadows - Ultra Soft */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -2px rgba(0, 0, 0, 0.025);
    --shadow-card: 0 0 0 1px rgba(0, 0, 0, 0.03), 0 2px 8px rgba(0, 0, 0, 0.04);

    /* Typography */
    --font-display: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing */
    --header-height: 80px;
    --container-width: 1200px;
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 24px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-bg-white);
    color: var(--color-text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Typography */
h1,
h2,
h3,
h4,
h5 {
    font-family: var(--font-display);
    color: var(--color-text-main);
    line-height: 1.2;
}

h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

h2 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

h4 {
    font-size: 1.25rem;
    font-weight: 600;
    font-family: var(--font-body);
}

p {
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* Layout */
.container {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 2rem;
}

.section {
    padding: 6rem 0;
}

.section-alt {
    background-color: var(--color-bg-subtle);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 4rem;
}

.section-subtitle {
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 1rem;
    display: block;
}

/* Icons */
.icon {
    width: 24px;
    height: 24px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    display: inline-block;
}

.icon-sm {
    width: 18px;
    height: 18px;
}

.icon-lg {
    width: 48px;
    height: 48px;
    stroke-width: 1.5;
}

.icon-xl {
    width: 64px;
    height: 64px;
    stroke-width: 1;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: height 0.3s ease, background 0.3s ease;
}

.header.scrolled {
    height: 64px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-family: var(--font-display);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-main);
}

.logo-img {
    height: 50px;
    width: auto;
    object-fit: contain;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-text-muted);
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-primary);
}

/* Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    color: var(--color-text-main);
}

/* Page Header (Inner Pages) */
.page-header {
    background: var(--color-bg-subtle);
    padding: calc(var(--header-height) + 4rem) 0 4rem;
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 1.5rem;
}

/* Cards */
.card {
    background: var(--color-bg-white);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-card);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--color-border);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--color-primary);
    color: white;
    box-shadow: 0 4px 6px -1px rgba(139, 90, 43, 0.3);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: white;
    color: var(--color-text-main);
    border: 1px solid var(--color-border);
}

.btn-secondary:hover {
    background-color: var(--color-bg-subtle);
    border-color: var(--color-text-light);
}

/* Slider */
.slider {
    position: relative;
    height: 80vh;
    min-height: 500px;
    max-height: 800px;
    overflow: hidden;
    margin-top: var(--header-height);
}

.slider-track {
    display: flex;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.slide {
    min-width: 100%;
    position: relative;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.3) 100%);
    display: flex;
    align-items: center;
    padding: 0 10%;
}

.slide-content {
    color: white;
    max-width: 600px;
}

.slide-content h1 {
    color: white;
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
}

.slide-content p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.125rem;
    margin-bottom: 2rem;
}

.slider-nav button {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.slider-nav button:hover {
    background: white;
    color: var(--color-primary);
}

.slider-dots {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.75rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    border: none;
    padding: 0;
}

.dot.active {
    background: white;
    transform: scale(1.2);
}

/* Quick Links Grid */
.quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 2rem;
    margin-top: -5rem;
    position: relative;
    z-index: 10;
}

.link-card {
    background: white;
    padding: 2.5rem 1.5rem;
    border-radius: var(--radius-md);
    text-align: center;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.link-card:hover {
    transform: translateY(-8px);
    border-color: var(--color-primary);
}

.link-icon {
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    display: flex;
    justify-content: center;
}

.link-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

/* Calendar Grid */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.event-card {
    display: flex;
    flex-direction: column;
}

.event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.event-date {
    background: var(--color-bg-subtle);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    padding: 0.5rem 1rem;
    text-align: center;
    min-width: 70px;
}

.date-day {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text-main);
    line-height: 1;
}

.date-month {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--color-text-muted);
    font-weight: 600;
}

.event-details {
    flex: 1;
}

.event-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-bottom: 0.5rem;
}

/* Team Grid */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.team-card {
    text-align: center;
}

.team-avatar {
    width: 140px;
    height: 140px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    background: var(--color-bg-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary);
}

.team-role {
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* Timeline */
.timeline {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--color-border);
}

.timeline-item {
    padding-left: 5rem;
    position: relative;
    margin-bottom: 3rem;
}

.timeline-marker {
    position: absolute;
    left: 0.85rem;
    top: 0;
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--color-primary);
    z-index: 1;
}

/* Regulations Grid */
.reg-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.reg-card {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
}

.reg-icon {
    background: var(--color-bg-accent);
    color: var(--color-primary);
    padding: 1rem;
    border-radius: var(--radius-sm);
    display: flex;
}

.reg-content {
    flex: 1;
}

.reg-content h4 {
    margin-bottom: 0.25rem;
    font-size: 1.1rem;
}

.reg-content p {
    margin-bottom: 0;
    font-size: 0.9rem;
}

/* Contact */
.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 3rem;
    align-items: start;
}

.contact-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    transition: all 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(139, 90, 43, 0.1);
}

/* Footer */
.footer {
    background: var(--color-secondary);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer h4 {
    color: white;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer p {
    color: rgba(255, 255, 255, 0.6);
}

.footer a {
    color: rgba(255, 255, 255, 0.6);
}

.footer a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
}

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 768px) {
    .header .nav {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .header .nav.active {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: white;
        padding: 2rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    .contact-layout,
    .footer-grid,
    .timeline::before {
        grid-template-columns: 1fr;
    }

    .timeline::before {
        left: 1.25rem;
    }

    .timeline-item {
        padding-left: 3.5rem;
    }

    .quick-links {
        margin-top: 2rem;
    }
}

/* Calendar Navigation */
.calendar-layout {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 4rem;
    align-items: start;
}

.nav-sticky {
    position: sticky;
    top: 120px;
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--color-border);
}

.nav-sticky h4 {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: var(--color-primary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.nav-sticky nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cal-link {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s;
}

.cal-link:hover,
.cal-link.active {
    color: var(--color-primary);
    background: var(--color-bg-subtle);
    font-weight: 500;
}

@media (max-width: 1024px) {
    .calendar-layout {
        gap: 2rem;
        grid-template-columns: 160px 1fr;
    }
}

@media (max-width: 768px) {
    .calendar-layout {
        display: block;
    }

    .calendar-nav {
        margin-bottom: 2rem;
        background: white;
        position: sticky;
        top: 60px;
        /* Adjust for header height */
        z-index: 90;
        padding: 1rem 0;
        margin: 0 -1rem 2rem;
        width: calc(100% + 2rem);
    }

    .nav-sticky {
        position: static;
        box-shadow: none;
        border: none;
        padding: 0 2rem;
        /* Restore container padding */
        display: flex;
        align-items: center;
        gap: 1rem;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        background: white;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-sticky h4 {
        margin: 0;
        border: none;
        padding: 0;
        white-space: nowrap;
        margin-right: 0.5rem;
    }

    .nav-sticky nav {
        flex-direction: row;
        gap: 1rem;
    }

    .cal-link {
        white-space: nowrap;
        padding: 0.5rem 0.75rem;
        background: var(--color-bg-subtle);
        border: 1px solid var(--color-border);
    }

    .cal-link.active {
        background: var(--color-primary);
        color: white;
        border-color: var(--color-primary);
    }
}