/* =========================
   RESET + BASE
========================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Rubik', sans-serif;
    color: #ffffff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;

    background-color: #0b0b0b; 
    
    background-image: url('../img/fondo.png'); 

    background-size: cover;
    background-position: center;
    background-attachment: fixed; 
}

/* =========================
   VARIABLES
========================= */
:root {
    --black: #0b0b0b;
    --white: #ffffff;
    --gray: #ffffff;

    --autobot-red: #e10600;
    --decepticon-purple: #6a00ff;
    --terrorcon-orange: #ff6a00;
    --predacon-blue: #0080ff;
    --maximal-green: #00b36b;
    --mercenary-white: #f5f5f5;
    
    --transition-fast: 0.3s ease;
}

/* =========================
   HEADER
========================= */

/* =========================
   TÍTULO "MORE THAN MEETS THE EYE"
========================= */
.intro__title {
    font-size: 2.5rem; 
    font-weight: 800;  
    text-transform: uppercase; 
    letter-spacing: 4px; 
    margin-bottom: 1.5rem; 
    
    
    color: var(--gray); 
    
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.3);
    
    animation: fadeInUp 1s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .intro__title {
        font-size: 1.5rem;
        letter-spacing: 2px;
    }
}


.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: #000;
    padding: 1rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #222;
}






.header__icon { width: 50px; }
.header__title {
    height: 60px;
    cursor: pointer; 
    
    transition: transform 0.3s ease, filter 0.3s ease;
}

.header__title:hover {
    transform: scale(1.15); 
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.5)); 
}

/* =========================
   INTRO
========================= */
.intro {
    padding: 2rem;
    text-align: center;
}

.intro__text {
    max-width: 900px;
    margin: auto;
    font-size: 1rem;
    color: var(--gray);
    line-height: 1.6;
}

input[type="radio"] {
    display: none;
}

/* =========================================
   FONDO DE LA SECCIÓN DE INTRODUCCIÓN
========================================= */
.intro {
    position: relative; 
    
    background-image: url('../img/indexfondo.png'); 
    
    background-size: cover;      
    background-position: center; 
    background-repeat: no-repeat;
    
    padding: 4rem 2rem;          
    text-align: center;
    color: #ffffff;            
    
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    
    border-bottom: 2px solid #333;
}

.intro::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6); 
    z-index: 0; 
}

.intro__img, 
.intro__text,
.intro__title {
    position: relative;
    z-index: 1; 
}


/* =========================
   FACTIONS BAR (MENÚ DE SELECCIÓN)
========================= */
.factions {
    background-color: #000;
    padding: 1.5rem 3rem;
    border-top: 1px solid #1a1a1a;
    border-bottom: 1px solid #1a1a1a;
}

.factions__list {
    display: flex;
    justify-content: center; 
    align-items: center;
    gap: 3rem;
}

.faction {
    display: flex;
    flex-direction: column;   
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    color: #fff;
    text-align: center;
    transition: transform var(--transition-fast), filter var(--transition-fast);
}

.faction img {
    width: 80px;      
    height: 80px;    
    object-fit: contain; 
    margin-bottom: 0.5rem;
    transition: filter 0.3s ease, transform 0.3s ease;
}

.faction span {
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    font-weight: 600;
}

.faction:hover {
    transform: scale(1.1);
}

/* =========================
   ESTADOS ACTIVOS DEL MENÚ (LOGO + TEXTO)
========================= */

/* AUTOBOTS */
#autobots:checked ~ .factions .faction--autobots img {
    filter: drop-shadow(0 0 15px var(--autobot-red));
    transform: scale(1.2); 
}
#autobots:checked ~ .factions .faction--autobots span {
    color: var(--autobot-red);
    font-weight: 800; 
    text-shadow: 0 0 10px rgba(225, 6, 0, 0.6);
}

/* DECEPTICONS */
#decepticons:checked ~ .factions .faction--decepticons img {
    filter: drop-shadow(0 0 15px var(--decepticon-purple));
    transform: scale(1.2);
}
#decepticons:checked ~ .factions .faction--decepticons span {
    color: var(--decepticon-purple);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(106, 0, 255, 0.6);
}

/* MAXIMALS */
#maximals:checked ~ .factions .faction--maximals img {
    filter: drop-shadow(0 0 15px var(--maximal-green));
    transform: scale(1.2);
}
#maximals:checked ~ .factions .faction--maximals span {
    color: var(--maximal-green);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(0, 179, 107, 0.6);
}

/* PREDACONS */
#predacons:checked ~ .factions .faction--predacons img {
    filter: drop-shadow(0 0 15px var(--predacon-blue));
    transform: scale(1.2);
}
#predacons:checked ~ .factions .faction--predacons span {
    color: var(--predacon-blue);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(0, 128, 255, 0.6);
}

/* TERRORCONS */
#terrorcons:checked ~ .factions .faction--terrorcons img {
    filter: drop-shadow(0 0 15px var(--terrorcon-orange));
    transform: scale(1.2);
}
#terrorcons:checked ~ .factions .faction--terrorcons span {
    color: var(--terrorcon-orange);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(255, 106, 0, 0.6);
}

/* MERCENARIOS */
#mercenaries:checked ~ .factions .faction--mercenaries img {
    filter: drop-shadow(0 0 15px var(--mercenary-white));
    transform: scale(1.2);
}
#mercenaries:checked ~ .factions .faction--mercenaries span {
    color: var(--mercenary-white);
    font-weight: 800;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
}
/* =========================
   CONTENEDOR PRINCIPAL DE FICHAS
========================= */
.faction-content {
    position: relative;
   
    height: 600px; 
    width: 100%;
    max-width: 1200px;
    margin: 2rem auto;
    overflow: hidden; 
}

.content {
    position: absolute;
    inset: 0;
    padding: 2rem 4rem;

    display: grid;
    grid-template-columns: 45% 55%; 
    align-items: center;
    gap: 4rem;

    opacity: 0;
    pointer-events: none;
    transform: translateY(30px) scale(0.98);
    filter: blur(8px);
    z-index: 1;

    transition: 
        opacity 0.5s ease-out,
        transform 0.5s ease-out,
        filter 0.5s ease-out;
}

.leader {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.leader img {
    max-width: 100%;
    max-height: 500px; 
    object-fit: contain;
    filter: drop-shadow(0 15px 30px rgba(0,0,0,0.6));
}

.content article h2 {
    font-size: 3.5rem;
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    font-weight: 800;
    line-height: 1;
}

.content article p {
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--gray);
    text-align: justify;
}

/* =========================
   LÓGICA DE ACTIVACIÓN 
   ======================== */

#autobots:checked ~ .faction-content .content--autobots,
#decepticons:checked ~ .faction-content .content--decepticons,
#maximals:checked ~ .faction-content .content--maximals,
#predacons:checked ~ .faction-content .content--predacons,
#terrorcons:checked ~ .faction-content .content--terrorcons,
#mercenaries:checked ~ .faction-content .content--mercenaries {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0) scale(1);
    filter: blur(0);
    z-index: 10;
}

/* =========================
   COLORES DE TÍTULOS
========================= */
.content--autobots h2 { color: var(--autobot-red); text-shadow: 0 0 25px rgba(225, 6, 0, 0.4); }
.content--decepticons h2 { color: var(--decepticon-purple); text-shadow: 0 0 25px rgba(106, 0, 255, 0.4); }
.content--maximals h2 { color: var(--maximal-green); text-shadow: 0 0 25px rgba(0, 179, 107, 0.4); }
.content--predacons h2 { color: var(--predacon-blue); text-shadow: 0 0 25px rgba(0, 128, 255, 0.4); }
.content--terrorcons h2 { color: var(--terrorcon-orange); text-shadow: 0 0 25px rgba(255, 106, 0, 0.4); }
.content--mercenaries h2 { color: var(--mercenary-white); text-shadow: 0 0 25px rgba(245, 245, 245, 0.4); }

/* =========================
   FOOTER
========================= */
.footer {
    background-color: #000;
    padding: 3rem 0;
    margin-top: auto; 
    border-top: 1px solid #222;
}

.footer__links {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.footer__link {
    text-decoration: none;
    color: var(--white);
    text-align: center;
    transition: transform var(--transition-fast);
}

.footer__link img {
    width: 50px;
    margin-bottom: 0.8rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.footer__link:hover {
    transform: translateY(-5px);
}

.footer__link:hover img {
    opacity: 1;
}


/* =========================
   REPRODUCTOR DE AUDIO
========================= */
.audio-player {
    position: fixed; 
    bottom: 20px;    
    right: 20px;     
    z-index: 1000;   
    
    width: 300px;
    height: 40px;
    
    opacity: 0.6; 
    filter: invert(1) hue-rotate(180deg); 
    border-radius: 20px;
    transition: opacity 0.3s ease;
}

.audio-player:hover {
    opacity: 1;
    box-shadow: 0 0 15px rgba(0, 128, 255, 0.5); 
}


/* =========================
   BOTÓN DERECHO 
========================= */

.header__link {
    display: flex;
    flex-direction: column; 
    align-items: center;
    text-decoration: none;
    color: var(--white);
    margin-right: 0; 
    transition: transform 0.3s ease;
}

.header__link img {
    width: 35px; 
    height: auto;
    margin-bottom: 2px;
    opacity: 0.9;
    transition: opacity 0.3s;
}

.header__link p {
    font-size: 0.75rem; 
    text-transform: uppercase;
    font-weight: 600;
    margin: 0;
}

.header__link:hover {
    transform: scale(1.1); 
    cursor: pointer;
}

.header__link:hover img {
    opacity: 1;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
}