/* ==========================================
   1. REGISTRAMOS LA FUENTE LOCAL
   ========================================== */
@font-face {
    font-family: 'MiFuentePersonalizada';
    src: url('media/edosz.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* ==========================================
   VARIABLES DE CONFIGURACIÓN (Control Total)
   ========================================== */
:root {
    --background-color: #0b0b0b;
    /* --background-image: url('media/fondo.jpg'); */
    --background-size: 300px;
    --background-repeat: repeat;
    --background-position: top left;
}

/* ==========================================
   RESETEO Y BASE REUTILIZABLE
   ========================================== */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: Arial, sans-serif;
    color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-x: hidden;
    overflow-y: auto;
    background-color: var(--background-color);
    background-image: var(--background-image, none);
    background-size: var(--background-size);
    background-repeat: var(--background-repeat);
    background-position: var(--background-position);
    position: relative;
}

body.con-blur::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(11, 11, 11, 0.15);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    z-index: -1;
    pointer-events: none;
}

/* ==========================================
   COMPONENTES FIJOS (Menú y Título)
   ========================================== */
.navbar {
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 999;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background-color: rgba(255, 255, 255, 0.75); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1); 
}

.nav-logo {
    color: #000;
    font-weight: bold;
    font-size: 18px;
    letter-spacing: 0.5px;
}

.nav-links {
    display: flex;
    gap: 20px;
    list-style: none;
}

.nav-links a {
    color: #555;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.nav-links a:hover, .nav-links a.active {
    color: #ff4757;
}

.menu-toggle {
    display: none; /* Se oculta en PC por defecto */
    background: none;
    border: none;
    color: #000;
    font-size: 24px;
    cursor: pointer;
}

.top-container {
    width: 100%;
    text-align: center;
    padding-top: 90px;
}

h1 {
    font-family: 'MiFuentePersonalizada', Arial, sans-serif;
    font-size: 50px;
    font-weight: 700;
    color: #fff;
    text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 0px 4px 10px rgba(0, 0, 0, 0.8);
}

/* ==========================================
   VISTAS Y CONTENIDOS (Estructura Modular)
   ========================================== */
.main-container {
    width: 100%;
    max-width: 600px;
    flex-grow: 1; 
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    padding: 30px 30px 60px 30px;
}

.main-container.centrado-total {
    justify-content: center;
}

p {
    font-size: 15px;
    line-height: 1.5;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0px 2px 5px rgba(0, 0, 0, 0.9);
}

.enter-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: #ff4757;
    color: white;
    text-decoration: none;
    padding: 16px 36px;
    font-size: 16px;
    font-weight: bold;
    border-radius: 30px;
    box-shadow: 0 6px 20px rgba(255, 71, 87, 0.4);
    transition: all 0.2s ease;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000;
}

.logoPrincipal {
    display: block;
    margin: 0 auto 20px auto;
    width: 100%;
    max-width: 600px;
    height: auto;
}

.foto-perfil {
    width: 100%;
    max-width: 100%;
    display: flex;
    justify-content: center;
}

.bio-photo {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6);
    object-fit: contain;
}

/* ==========================================
   📱 ADAPTACIÓN EXCLUSIVA PARA MÓVILES
   ========================================== */
@media (max-width: 768px) {
    .navbar {
        padding: 8px 20px;
    }

    .menu-toggle {
        display: block; /* 🟢 AQUÍ: Fuerza a que aparezcan las 3 barras en móvil */
    }

    .nav-links {
        display: none; 
        flex-direction: column;
        position: absolute;
        top: 100%; 
        left: 0;
        width: 100%;
        background-color: rgba(255, 255, 255, 0.95); 
        backdrop-filter: blur(15px);
        padding: 20px;
        gap: 15px;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    }

    .nav-links.open {
        display: flex;
    }
    
    .nav-links a {
        font-size: 16px; 
        display: block;
        padding: 10px 0;
    }

    .logoPrincipal {
        max-width: 280px;
    }

    .top-container {
    padding-top: 75px; /* 🟢 Ajustado (antes 90px) para que el logo suba en consonancia con la barra más estrecha */
    }
}

/* ==========================================
   🖥️ CONFIGURACIÓN EXCLUSIVA PARA PC (VERSIÓN FLEXIBLE CORREGIDA)
   ========================================== */
@media (min-width: 768px) {
    h1 { 
        font-size: 110px; 
        letter-spacing: 2px; 
    }
    
    p { 
        font-size: 19px; 
        line-height: 1.6;
    }
    
    .main-container { 
        max-width: 950px; 
    }
    
    .foto-perfil { 
        max-width: 500px; 
    }

    /* 📰 AJUSTES FLEXIBLES PARA LAS TARJETAS EN ORDENADOR */
    .news-card {
        flex-direction: row; 
        align-items: stretch; /* 🟢 CAMBIADO: Hace que la foto y el texto midan lo mismo en vertical de forma elástica */
        max-height: none;     /* 🟢 CORREGIDO: Eliminado el límite para que la tarjeta pueda crecer si el texto es largo */
        width: 100%;
        overflow: hidden;
    }
    
    .news-img {
        width: 320px;        /* 🟢 Mantiene el ancho fijo de la columna de la foto */
        min-width: 320px;    /* 🟢 Evita que el texto empuje y encoja la imagen hacia los lados */
        height: auto;        /* 🟢 CORREGIDO: Altura automática basada en el contenedor */
        object-fit: cover;   /* Encaja la foto perfectamente cubriendo el espacio sin deformar */
        border-bottom: none;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
    }
    
    .news-body {
        flex-grow: 1;        /* 🟢 Ocupa de forma inteligente todo el espacio restante de la pantalla */
        padding: 35px;
        display: flex;
        flex-direction: column;
        justify-content: center; /* Centra el texto verticalmente al lado de la foto */
        min-width: 0;        /* Evita bugs raros de desborde de texto en cajas flex */
    }
    
    .news-title {
        font-size: 26px;
        margin-bottom: 12px;
    }
}

/* ==========================================
   🎛️ BLOQUE DE PLATAFORMAS (LÍNEAS BLANCAS)
   ========================================== */
.social-grid {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap; /* Si hay muchos en móvil, bajan a la siguiente línea de forma limpia */
    gap: 30px; /* Separación horizontal entre iconos */
    margin-top: 15px; /* Espacio con el botón superior */
    width: 100%;
}

.social-grid a {
    color: #fff; /* ⚪ Fuerza a que sean monocolor blanco */
    font-size: 32px; /* 📐 Tamaño de los iconos */
    text-decoration: none;
    transition: transform 0.2s ease, color 0.2s ease;
    display: inline-flex;
    justify-content: center;
    align-items: center;
}

/* Efecto sutil al pasar el dedo o el ratón por encima */
@media (hover: hover) {
    .social-grid a:hover {
        transform: scale(1.15); /* Crece un poquito */
        color: #ff4757; /* Cambia temporalmente al rojo corporativo de tu web */
    }
}

/* Ajuste móvil para que queden bien espaciados */
@media (max-width: 768px) {
    .social-grid {
        gap: 24px;
    }
    .social-grid a {
        font-size: 28px; /* Un pelín más pequeños en pantallas de móvil */
    }
}

/* ==========================================
   📰 FEED DE NOTICIAS (ESTILO MAESTRO)
   ========================================== */
.news-feed {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 25px; /* Distancia entre tarjetas de noticias */
    margin-top: 30px; /* Distancia respecto a los botones sociales */
}

/* Tarjeta individual de noticia */
.news-card {
    width: 100%;
    background: rgba(255, 255, 255, 0.05); /* Capa translúcida muy fina */
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column; /* Apilado vertical por defecto */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

/* Imagen de la noticia */
.news-img {
    width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: cover; /* Recorta la imagen estéticamente sin deformarla */
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

/* Contenedor del texto interno */
.news-body {
    padding: 20px;
    text-align: left; /* Alineado a la izquierda para máxima legibilidad de lectura */
}

.news-title {
    font-size: 22px;
    color: #ff4757; /* Tu rojo corporativo para resaltar los titulares */
    margin-bottom: 10px;
    font-weight: bold;
    text-shadow: none; /* Quitamos bordes gruesos de texto aquí para que se vea moderno */
}

.news-text {
    font-size: 15px;
    color: #ddd; /* Blanco grisáceo para que no fatigue la vista */
    line-height: 1.6;
    margin-bottom: 12px;
    text-shadow: none;
}

.news-date {
    font-size: 12px;
    color: #777; /* Gris apagado para la fecha */
    display: block;
    text-transform: capitalize;
}

.no-news {
    color: #666;
    font-style: italic;
    text-align: center;
}
