/* 
   Gallop Français - Main Stylesheet 
   Palette: Burgundy (#8B0000), Navy (#000080), Cream (#FFFDD0), Gold (#D4AF37)
*/

:root {
    --burgundy: #8B0000;
    --navy: #000080;
    --cream: #FFFDD0;
    --gold: #D4AF37;
    --gold-light: #f3cf55;
    --dark-brown: #5D4037;
    --white: #ffffff;
    --grey-light: #f5f5f5;
    --text-main: #333333;
    --text-light: #666666;
    --shadow-card: 0 4px 6px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--cream);
    color: var(--text-main);
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    color: var(--burgundy);
    margin-bottom: 1rem;
}

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

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.section {
    padding: 4rem 0;
}

.text-center { text-align: center; }
.mb-2 { margin-bottom: 2rem; }
.mt-2 { margin-top: 2rem; }

/* Grid System */
.grid {
    display: grid;
    gap: 2rem;
}

.grid-2 { grid-template-columns: 1fr; }
.grid-3 { grid-template-columns: 1fr; }
.grid-4 { grid-template-columns: 1fr; }

@media (min-width: 768px) {
    .grid-2 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

/* Header & Nav */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-top {
    background-color: var(--navy);
    color: var(--white);
    padding: 0.5rem 0;
    font-size: 0.9rem;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--burgundy);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

.nav-links a {
    color: var(--navy);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    padding: 0.5rem 0;
    border-bottom: 2px solid transparent;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--burgundy);
    border-bottom-color: var(--gold);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--navy);
    cursor: pointer;
}

/* Hero Section */
.hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('https://images.unsplash.com/photo-1536511130669-e58f2d59392e?q=80&w=1920&auto=format&fit=crop');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    color: var(--gold);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.5rem;
    font-family: 'Playfair Display', serif;
    font-style: italic;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

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

.btn-primary:hover {
    background-color: var(--dark-brown);
}

.btn-gold {
    background-color: var(--gold);
    color: var(--navy);
}

.btn-gold:hover {
    background-color: var(--gold-light);
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-card);
    border: 1px solid rgba(212, 175, 55, 0.2); /* Gold trace */
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.15);
}

.card-img {
    height: 200px;
    overflow: hidden;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card:hover .card-img img {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.card-meta {
    font-size: 0.85rem;
    color: var(--gold);
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: var(--navy);
}

/* Countdown Widget */
.countdown-box {
    background-color: var(--navy);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.timer {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 2rem;
}

.time-unit span {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--gold);
    font-family: 'Playfair Display', serif;
}

.time-unit label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Tables */
.table-container {
    overflow-x: auto;
    background: var(--white);
    border-radius: 8px;
    box-shadow: var(--shadow-card);
}

.race-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.race-table th, .race-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.race-table th {
    background-color: var(--burgundy);
    color: var(--white);
    font-family: 'Playfair Display', serif;
}

.race-table tr:hover {
    background-color: #f9f9f9;
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--navy);
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.2);
}

/* Footer */
footer {
    background-color: var(--dark-brown);
    color: var(--white);
    padding-top: 4rem;
}

.footer-content {
    display: grid;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-col h4 {
    color: var(--gold);
    margin-bottom: 1.5rem;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a:hover {
    color: var(--gold);
    padding-left: 5px;
}

.copyright {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 1.5rem 0;
    text-align: center;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.6);
}

/* Newsletter */
.newsletter-form {
    display: flex;
    gap: 10px;
}

.newsletter-form input {
    flex: 1;
    padding: 10px;
    border: none;
    border-radius: 4px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background-color: var(--white);
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 10px rgba(0,0,0,0.1);
        transform: translateY(-150%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .nav-links.active {
        transform: translateY(0);
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }

    .timer {
        gap: 1rem;
    }
    
    .time-unit span {
        font-size: 1.8rem;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
}