/* ============================================
   PARKOUR - SPAIN FLOWS THE MOVEMENT
   ============================================ */

:root {
    --primary: #000000;
    --secondary: #FFD700;
    --accent: #FF8C00;
    --text: #FFFFFF;
    --gray: #1A1A1A;
    --transition: all 0.3s ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--primary);
    color: var(--text);
    overflow-x: hidden;
    line-height: 1.6;
}

h1, h2, h3, h4, h5 { font-family: 'Montserrat', sans-serif; font-weight: 700; }

/* ============================================
   BRANDING
============================================ */
#auto-branding { display: flex; align-items: center; }

.efdmb-branding { display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.efdmb-branding a { display: flex; align-items: center; gap: 8px; text-decoration: none; }
.efdmb-branding img { height: 35px; width: auto; }
.efdmb-branding .efdmb-main-title { font-size: 0.9rem; font-weight: 800; margin: 0; color: #FFFFFF; }
.efdmb-branding .efdmb-country { color: #FFD700; }
.efdmb-branding .efdmb-slogan { font-size: 0.65rem; color: #aaaaaa; margin: 0; }
.efdmb-branding[data-size="small"] img { height: 30px; }
.efdmb-branding[data-size="small"] .efdmb-main-title { font-size: 0.75rem; }
.efdmb-branding[data-size="little"] img { height: 25px; }
.efdmb-branding[data-size="little"] .efdmb-main-title { font-size: 0.7rem; }

/* ============================================
   PRELOADER
============================================ */
#preloader {
    position: fixed; inset: 0; background-color: var(--primary);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999; transition: opacity 0.5s ease;
}
#preloader.hidden { opacity: 0; pointer-events: none; }

.preloader-spinner {
    width: 60px; height: 60px;
    border: 4px solid rgba(255, 215, 0, 0.2);
    border-top-color: var(--secondary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   HEADER
============================================ */
header {
    position: fixed; top: 0; left: 0; width: 100%;
    padding: 1rem 2rem;
    display: flex; justify-content: space-between; align-items: center;
    z-index: 1000; transition: var(--transition);
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(10px);
}
header.scrolled { background: rgba(0, 0, 0, 0.95); box-shadow: 0 5px 15px rgba(255, 215, 0, 0.2); }

.nav-links { display: flex; list-style: none; }
.nav-links li { margin-left: 2rem; }
.nav-links a {
    color: var(--text); text-decoration: none; font-weight: 500;
    transition: var(--transition); position: relative;
}
.nav-links a:hover { color: var(--secondary); }
.nav-links a::after {
    content: ''; position: absolute; bottom: -5px; left: 0;
    width: 0; height: 2px; background: var(--secondary); transition: var(--transition);
}
.nav-links a:hover::after { width: 100%; }

.hamburger {
    display: none; cursor: pointer; flex-direction: column;
    justify-content: space-between; width: 30px; height: 21px;
}
.hamburger span {
    display: block; height: 3px; width: 100%;
    background-color: var(--text); border-radius: 10px; transition: var(--transition);
}

/* ============================================
   HERO
============================================ */
.hero {
    height: 100vh; display: flex; align-items: center; justify-content: center;
    position: relative; overflow: hidden; margin-top: 70px;
}
.hero-bg {
    position: absolute; inset: 0;
    background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), url('https://images.unsplash.com/photo-1591134108346-40e0a6eaaae6?w=1920');
    background-size: cover; background-position: center; z-index: -1;
}
.hero-content { text-align: center; max-width: 800px; padding: 0 2rem; z-index: 1; }
.hero h1 {
    font-size: 3.5rem; margin-bottom: 1rem; text-transform: uppercase;
    letter-spacing: 2px; text-shadow: 0 0 10px rgba(255, 215, 0, 0.5);
}
.hero h1 span { color: var(--secondary); }
.hero p { font-size: 1.3rem; margin-bottom: 2rem; font-weight: 300; }
.hero-buttons { display: flex; justify-content: center; gap: 1rem; margin-bottom: 3rem; }

.btn {
    padding: 0.8rem 2rem; border: none; border-radius: 30px;
    font-weight: 600; text-transform: uppercase; letter-spacing: 1px;
    cursor: pointer; transition: var(--transition); font-family: 'Montserrat', sans-serif;
}
.btn-primary { background: var(--secondary); color: var(--primary); }
.btn-primary:hover { background: var(--accent); transform: translateY(-3px); box-shadow: 0 10px 20px rgba(255, 215, 0, 0.3); }
.btn-secondary { background: transparent; color: var(--text); border: 2px solid var(--secondary); }
.btn-secondary:hover { background: var(--secondary); color: var(--primary); transform: translateY(-3px); }

.countdown { display: flex; justify-content: center; gap: 1rem; margin-top: 2rem; }
.countdown-item {
    background: rgba(255, 255, 255, 0.1); padding: 1rem;
    border-radius: 10px; min-width: 90px; backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 215, 0, 0.3);
}
.countdown-number { font-size: 2rem; font-weight: 700; color: var(--secondary); }
.countdown-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; }

/* ============================================
   SECTIONS
============================================ */
section { padding: 5rem 2rem; }
.section-title { text-align: center; margin-bottom: 3rem; position: relative; }
.section-title h2 {
    font-size: 2.5rem; display: inline-block; text-transform: uppercase; letter-spacing: 2px;
}
.section-title h2::after {
    content: ''; position: absolute; bottom: -10px; left: 50%;
    transform: translateX(-50%); width: 100px; height: 3px; background: var(--secondary);
}

/* ============================================
   ABOUT
============================================ */
.about {
    background: var(--gray); border-top: 3px solid var(--secondary);
    border-bottom: 3px solid var(--secondary);
}
.about-content {
    max-width: 1200px; margin: 0 auto; display: grid;
    grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center;
}
.about-text h3 { font-size: 2rem; margin-bottom: 1.5rem; color: var(--secondary); }
.about-text p { margin-bottom: 1.5rem; }
.categories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.category {
    background: rgba(255, 255, 255, 0.05); padding: 1.5rem;
    border-radius: 10px; text-align: center; transition: var(--transition);
    border: 1px solid rgba(255, 215, 0, 0.2);
}
.category:hover { transform: translateY(-5px); border-color: var(--secondary); }
.category-icon { font-size: 2.5rem; margin-bottom: 1rem; color: var(--secondary); }

/* ============================================
   STATS
============================================ */
.stats {
    background: var(--gray); border-top: 3px solid var(--secondary);
    border-bottom: 3px solid var(--secondary);
}
.stats-container {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem; max-width: 1200px; margin: 0 auto;
}
.stat-card {
    text-align: center; padding: 2rem; background: rgba(255, 255, 255, 0.05);
    border-radius: 10px; border: 1px solid rgba(255, 215, 0, 0.2); transition: var(--transition);
}
.stat-card:hover { transform: translateY(-5px); border-color: var(--secondary); }
.stat-number { font-size: 3rem; font-weight: 700; color: var(--secondary); margin-bottom: 0.5rem; }
.stat-label { font-size: 1.1rem; font-weight: 500; }

/* ============================================
   TIMELINE
============================================ */
.timeline { position: relative; max-width: 1200px; margin: 0 auto; }
.timeline::after {
    content: ''; position: absolute; width: 4px; background: var(--secondary);
    top: 0; bottom: 0; left: 50%; transform: translateX(-50%); border-radius: 10px;
}
.timeline-item {
    padding: 10px 40px; position: relative; width: 50%;
    opacity: 0; transform: translateY(50px); transition: all 0.5s ease;
}
.timeline-item.visible { opacity: 1; transform: translateY(0); }
.timeline-item:nth-child(odd) { left: 0; }
.timeline-item:nth-child(even) { left: 50%; }
.timeline-content {
    padding: 20px 30px; background: var(--gray); position: relative;
    border-radius: 10px; border: 1px solid rgba(255, 215, 0, 0.3);
}
.timeline-content::after {
    content: ''; position: absolute; width: 20px; height: 20px;
    background: var(--secondary); top: 50%; transform: translateY(-50%) rotate(45deg); border-radius: 3px;
}
.timeline-item:nth-child(odd) .timeline-content::after { right: -10px; }
.timeline-item:nth-child(even) .timeline-content::after { left: -10px; right: auto; }
.timeline-number {
    position: absolute; width: 40px; height: 40px; background: var(--secondary);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-weight: 700; color: var(--primary); z-index: 1; top: 50%;
    transform: translateY(-50%); right: -20px;
}
.timeline-item:nth-child(even) .timeline-number { left: -20px; right: auto; }

/* ============================================
   CRITERIA
============================================ */
.criteria {
    background: var(--gray); border-top: 3px solid var(--secondary);
    border-bottom: 3px solid var(--secondary);
}
.criteria-container { max-width: 800px; margin: 0 auto; }
.criteria-item { margin-bottom: 2rem; }
.criteria-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; }
.criteria-bar { height: 10px; background: rgba(255, 255, 255, 0.1); border-radius: 5px; overflow: hidden; }
.criteria-progress { height: 100%; background: var(--secondary); border-radius: 5px; width: 0; transition: width 1.5s ease; }

/* ============================================
   GALLERY
============================================ */
.gallery-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1rem; margin-bottom: 2rem;
}
.gallery-item {
    position: relative; overflow: hidden; border-radius: 10px; height: 250px; cursor: pointer;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: var(--transition); }
.gallery-item:hover img { transform: scale(1.1); filter: blur(2px) brightness(0.7); }
.gallery-overlay {
    position: absolute; inset: 0; background: rgba(0, 0, 0, 0.7);
    display: flex; justify-content: center; align-items: center;
    opacity: 0; transition: var(--transition);
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-btn { text-align: center; }

/* ============================================
   REGISTRATION
============================================ */
.registration {
    background: var(--gray); border-top: 3px solid var(--secondary);
    border-bottom: 3px solid var(--secondary);
}
.form-container {
    max-width: 800px; margin: 0 auto; background: rgba(255, 255, 255, 0.05);
    padding: 2rem; border-radius: 10px; border: 1px solid rgba(255, 215, 0, 0.3);
    text-align: center;
}

/* ============================================
   AWARDS
============================================ */
.awards-container {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem; max-width: 1200px; margin: 0 auto;
}
.award-card {
    background: var(--gray); padding: 2rem; border-radius: 10px; text-align: center;
    transition: var(--transition); border: 1px solid rgba(255, 215, 0, 0.2);
}
.award-card:hover { transform: translateY(-10px); border-color: var(--secondary); }
.award-icon { font-size: 3rem; margin-bottom: 1rem; display: inline-block; }

/* ============================================
   FOOTER
============================================ */
footer {
    background: #0a0a0a; padding: 4rem 2rem 2rem;
    position: relative; overflow: hidden;
}
.footer-bg {
    position: absolute; inset: 0;
    background: url('https://images.unsplash.com/photo-1542601906990-b4d3fb778b09?w=1920');
    background-size: cover; background-position: center; opacity: 0.1; z-index: 0;
}
.footer-content {
    max-width: 1200px; margin: 0 auto; display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem; position: relative; z-index: 1;
}
.footer-column h3 { color: var(--secondary); margin-bottom: 1.5rem; font-size: 1.3rem; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: var(--text); text-decoration: none; transition: var(--transition); }
.footer-links a:hover { color: var(--secondary); padding-left: 5px; }
.social-links { display: flex; gap: 1rem; margin-top: 1rem; flex-wrap: wrap; }
.social-link {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; background: rgba(255, 255, 255, 0.1);
    border-radius: 50%; transition: var(--transition); color: white; text-decoration: none;
}
.social-link:hover { background: var(--secondary); color: var(--primary); transform: translateY(-3px); }
.footer-bottom {
    text-align: center; margin-top: 3rem; padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1); position: relative; z-index: 1;
}
.back-link { display: inline-block; margin-top: 1rem; color: var(--secondary); text-decoration: none; font-weight: 500; }
.back-link:hover { text-decoration: underline; }

/* ============================================
   FLOATING BUTTON
============================================ */
.floating-btn {
    position: fixed; bottom: 2rem; right: 2rem; width: 50px; height: 50px;
    background: var(--secondary); border-radius: 50%;
    display: flex; justify-content: center; align-items: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); cursor: pointer;
    z-index: 999; transition: var(--transition);
}
.floating-btn:hover { transform: scale(1.1); }
.floating-btn span { font-size: 1.5rem; font-weight: bold; color: var(--primary); }

/* ============================================
   CURSOR TRAIL
============================================ */
.cursor-trail {
    position: fixed; width: 10px; height: 10px; border-radius: 50%;
    background: var(--secondary); pointer-events: none; z-index: 9999;
    opacity: 0; transform: translate(-50%, -50%); transition: opacity 0.3s;
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 992px) {
    .about-content { grid-template-columns: 1fr; }
    .timeline::after { left: 31px; }
    .timeline-item { width: 100%; padding-left: 70px; padding-right: 25px; }
    .timeline-item:nth-child(even) { left: 0; }
    .timeline-item:nth-child(odd) .timeline-content::after,
    .timeline-item:nth-child(even) .timeline-content::after { left: -10px; right: auto; }
    .timeline-number { left: 10px; right: auto; }
    .timeline-item:nth-child(even) .timeline-number { left: 10px; }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed; top: 0; right: -100%; height: 100vh; width: 70%;
        background: rgba(0, 0, 0, 0.95); backdrop-filter: blur(10px);
        flex-direction: column; justify-content: center; align-items: center;
        transition: var(--transition); z-index: 999;
    }
    .nav-links.active { right: 0; }
    .nav-links li { margin: 1.5rem 0; }
    .hamburger { display: flex; z-index: 1000; }
    .hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(7px, -6px); }
    .hero h1 { font-size: 2.2rem; }
    .hero p { font-size: 1rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .countdown { flex-wrap: wrap; }
    .countdown-item { min-width: 70px; padding: 0.5rem; }
    .countdown-number { font-size: 1.5rem; }
    .categories { grid-template-columns: 1fr; }
    .section-title h2 { font-size: 1.8rem; }
}

@media (max-width: 576px) {
    section { padding: 3rem 1rem; }
    .stat-number { font-size: 2rem; }
    .gallery-grid { grid-template-columns: 1fr; }
}