:root {
    --primary-color: #8A1538; /* Burgundy / Guinda */
    --secondary-color: #D4AF37; /* Gold */
    --tertiary-color: #630f28; /* Darker burgundy */
    --text-color: #333333;
    --bg-color: #F8F9FA;
    --white: #ffffff;
}

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

html {
    scroll-behavior: smooth;
    font-family: 'Outfit', sans-serif;
    overflow-x: hidden;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.4;
    animation: float 10s infinite ease-in-out alternate;
}
.shape-1 {
    width: 400px;
    height: 400px;
    background: var(--secondary-color);
    top: -100px;
    right: -100px;
}
.shape-2 {
    width: 300px;
    height: 300px;
    background: var(--primary-color);
    top: 50%;
    left: -150px;
    animation-delay: -5s;
}

/* Scroll Animations */
.hidden-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.5, 0, 0, 1), transform 0.8s cubic-bezier(0.5, 0, 0, 1);
}
.show-scroll {
    opacity: 1;
    transform: translateY(0);
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.menu-toggle {
    display: none;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.highlight-link {
    background: var(--secondary-color);
    color: var(--white) !important;
    padding: 8px 16px;
    border-radius: 20px;
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.4);
    transition: transform 0.3s, box-shadow 0.3s !important;
}
.highlight-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.6);
}

/* Hero */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 100vh;
    padding: 6rem 5% 0;
    background: transparent;
}

.hero-content {
    flex: 1;
    padding-right: 2rem;
}

.hero-content h1 {
    font-size: 4rem;
    line-height: 1.1;
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.05);
}

.hero-content h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.hero-content p {
    font-size: 1.2rem;
    color: #555;
}

.hero-image {
    flex: 1;
    display: flex;
    justify-content: center;
}

.hero-image img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 25px 50px rgba(138, 21, 56, 0.15);
    transition: transform 0.5s ease;
}

.hero-image img:hover {
    transform: translateY(-10px) scale(1.02);
}

/* Banner */
.banner-cercania {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.banner-img {
    width: 100%;
    display: block;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Trayectoria (Timeline) */
.trayectoria-section {
    padding: 6rem 5%;
    background: linear-gradient(180deg, var(--white) 0%, var(--bg-color) 100%);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 0 auto 3rem auto;
    position: relative;
    display: block;
    width: fit-content;
}
.section-title::after {
    content: '';
    position: absolute;
    width: 50%;
    height: 3px;
    background: var(--secondary-color);
    bottom: -10px;
    left: 25%;
    border-radius: 2px;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
}

.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
}

.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background-color: rgba(212, 175, 55, 0.5); /* Gold transparent */
    top: 0;
    bottom: 0;
    left: 50%;
    margin-left: -2px;
    border-radius: 2px;
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: var(--white);
    border: 4px solid var(--primary-color);
    top: 25px;
    border-radius: 50%;
    z-index: 1;
    transition: background 0.3s;
}

.timeline-item:hover::after {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.timeline-item:nth-child(even) {
    left: 50%;
}

.timeline-item:nth-child(odd) {
    left: 0;
}

.timeline-item:nth-child(even)::after {
    left: -10px;
}

.timeline-content {
    padding: 25px 35px;
    background-color: var(--white);
    position: relative;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.3s ease;
    border: 1px solid rgba(0,0,0,0.02);
}

.timeline-content:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(138, 21, 56, 0.1);
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.3rem;
}

/* Corazon Section */
.corazon-section {
    display: flex;
    align-items: center;
    padding: 6rem 5%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--tertiary-color) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.corazon-section::before {
    content: '\f004';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    font-size: 40rem;
    color: rgba(255,255,255,0.03);
    top: -10%;
    right: -10%;
    transform: rotate(-15deg);
}

.corazon-content {
    flex: 1;
    padding-right: 3rem;
    z-index: 1;
}

.corazon-content h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
    text-shadow: 1px 1px 5px rgba(0,0,0,0.2);
}

.corazon-content p {
    font-size: 1.1rem;
    line-height: 1.8;
}

.corazon-image {
    flex: 1;
    z-index: 1;
}

.corazon-image img {
    max-width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    border: 5px solid rgba(255,255,255,0.1);
}

.juego-section {
    padding: 6rem 5%;
    background-color: var(--tertiary-color);
    text-align: center;
    color: var(--white);
    position: relative;
}

.juego-desc {
    margin-bottom: 2rem;
    font-size: 1.1rem;
    color: #eee;
}

.juego-stats {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.stat-box {
    background: rgba(255,255,255,0.1);
    padding: 10px 20px;
    border-radius: 10px;
    font-weight: 600;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
}

.tablero {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    max-width: 500px;
    margin: 0 auto;
    perspective: 1000px;
}

.carta {
    width: 100%;
    aspect-ratio: 1;
    background-color: transparent;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0.0, 0.2, 1);
}

.carta.volteada {
    transform: rotateY(180deg);
}

.carta-cara, .carta-dorso {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.carta-dorso {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #b8952a 100%);
    color: var(--primary-color);
    font-size: 2rem;
    border: 2px solid rgba(255,255,255,0.2);
}
.carta-dorso:hover {
    background: linear-gradient(135deg, #e5be3c 0%, #b8952a 100%);
}

.carta-cara {
    background-color: var(--white);
    color: var(--primary-color);
    transform: rotateY(180deg);
    font-size: 3rem;
    border: 2px solid var(--secondary-color);
}

.carta-contenido {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.carta-texto {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.juego-controles {
    margin-top: 3rem;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    padding: 12px 30px;
    font-size: 1.1rem;
    font-family: inherit;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(212, 175, 55, 0.4);
}
.btn-primary:hover {
    background-color: #b8952a;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.6);
}

/* Footer */
footer {
    background-color: #111;
    color: var(--white);
    padding: 4rem 5% 2rem;
    text-align: center;
}

.footer-content h3 {
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.social-links {
    margin-bottom: 3rem;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.05);
    color: var(--white);
    border-radius: 50%;
    margin: 0 10px;
    text-decoration: none;
    font-size: 1.2rem;
    transition: background 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.social-icon:hover {
    background: var(--secondary-color);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(212, 175, 55, 0.3);
}

.developer-credit {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    font-size: 0.9rem;
    color: #888;
}

.developer-credit a {
    color: var(--secondary-color);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s;
}

.developer-credit a:hover {
    color: var(--white);
}

.cta-dev {
    margin-top: 1.5rem;
    font-size: 1rem;
}

.cta-dev a {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #25D366;
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.3);
    transition: all 0.3s ease;
}

.cta-dev a:hover {
    background: #1ebc5a;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0) rotate(0deg); }
    100% { transform: translateY(-30px) rotate(10deg); }
}

/* Responsive */
@media screen and (max-width: 768px) {
    .menu-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        z-index: 1001;
    }
    
    .bar {
        width: 25px;
        height: 3px;
        background-color: var(--primary-color);
        margin: 4px 0;
        transition: 0.4s;
        border-radius: 2px;
    }

    /* Animar hamburguesa a cruz */
    .menu-toggle.active .bar:nth-child(1) {
        transform: rotate(-45deg) translate(-8px, 7px);
    }
    .menu-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .menu-toggle.active .bar:nth-child(3) {
        transform: rotate(45deg) translate(-8px, -8px);
    }

    .nav-links {
        position: absolute;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: rgba(255, 255, 255, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease-in-out;
    }

    .nav-links.active {
        left: 0;
    }

    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 8rem;
    }
    .hero-content {
        padding-right: 0;
        margin-bottom: 2rem;
    }
    .hero-content h1 { font-size: 2.8rem; }
    
    .timeline::after { left: 31px; }
    .timeline-item {
        width: 100%;
        padding-left: 70px;
        padding-right: 25px;
    }
    .timeline-item:nth-child(even) { left: 0%; }
    .timeline-item::after { left: 21px !important; }
    
    .corazon-section {
        flex-direction: column;
        text-align: center;
    }
    .corazon-content {
        padding-right: 0;
        margin-bottom: 2.5rem;
    }
    .tablero {
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }
}
