/* ==========================================================
   1. RESET Y ESTILOS GLOBALES
   ========================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: #f4f4f4;
    color: #333;
}

/* ==========================================================
   2. HEADER, NAVEGACIÓN Y MENÚ PRINCIPAL
   ========================================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: #8c52ff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    padding: 15px 20px;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo en el header */
.logo {
    display: flex;
    align-items: center;
    gap: 10px;
}
.logo img {
    height: 60px;
    transition: height 0.3s ease;
}

/* Menú principal */
.menu {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 20px;
    position: relative;
}
.nav-links li { position: relative; }

.nav-links li a {
    padding: 8px 15px;
    text-decoration: none;
    color: #fff;
    font-weight: bold;
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.nav-links li a:hover {
    background-color: #fff;
    color: #8c52ff;
}

/* ==========================================================
   3. DROPDOWN Y SUBMENÚS
   ========================================================== */
.dropdown-menu,
.dropdown-submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #ffffff;
    border-radius: 5px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    list-style: none;
    padding: 5px 0;
    z-index: 10;
}

.dropdown:hover > .dropdown-menu {
    display: block;
}
.dropdown-menu li:hover > .dropdown-submenu {
    display: block;
}
.dropdown-menu li {
    padding: 5px 20px;
}
.dropdown-submenu {
    top: 0;
    left: 100%;
}
.dropdown-menu li a {
    text-decoration: none;
    color: #333;
}
.dropdown-menu li a:hover {
    background-color: #8c52ff;
    color: white;
}

/* ==========================================================
   4. BUSCADOR GENERAL
   ========================================================== */
.search-bar {
    position: relative;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    width: 200px;
}
.search-bar input {
    display: block;
    width: 100%;
    height: 40px;
    padding: 8px;
    border: 2px solid #ccc;
    outline: none;
    text-align: left;
}
.search-bar input:focus {
    border-color: #8c52ff;
}

/* Sugerencias del buscador */
.suggestions {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    max-height: 120px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}
.suggestion-item {
    padding: 4px 8px;
    cursor: pointer;
    color: #333;
    transition: background-color 0.2s ease;
}
.suggestion-item:hover {
    background-color: #8c52ff;
    color: #fff;
}

/* ==========================================================
   5. MENÚ HAMBURGUESA (MOBILE)
   ========================================================== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}
.hamburger .bar {
    width: 25px;
    height: 4px;
    background-color: #fff;
}

/* ==========================================================
   6. MENÚ CON LOGOS (iconos de plataformas)
   ========================================================== */
.menu-logo {
    height: 40px;
    width: auto;
    margin: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 5px;
}
.submenu-logo {
    height: 30px;
    width: auto;
    margin: 5px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 5px;
}
.menu-logo:hover,
.submenu-logo:hover {
    transform: scale(1.05);
    box-shadow: 0 0 8px #8c52ff;
}
.dropdown-menu li a.logo-item:hover,
.nav-links li a.logo-item:hover {
    background-color: transparent;
}
.dropdown-menu img,
.dropdown-submenu img {
    margin: 5px auto;
    display: block;
}

/* ==========================================================
   7. SELECTOR DE IDIOMA
   ========================================================== */
.language-selector {
    position: relative;
    display: inline-block;
}
#lang-btn {
    border: none;
    background: none;
    font-weight: bold;
    font-size: 14px;
    color: #fff;
    cursor: pointer;
    padding: 5px;
    transition: color 0.2s ease;
}
#lang-btn:hover {
    color: #8c52ff;
}

/* Menú desplegable de idiomas */
.lang-menu {
    display: none;
    position: absolute;
    right: 50%;
    transform: translateX(50%);
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    border-radius: 5px;
    padding: 5px;
}
.lang-menu li {
    list-style: none;
    padding: 5px;
}
.lang-menu li a {
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    color: #333;
    padding: 5px;
    display: block;
    transition: color 0.2s ease;
}
.lang-menu li a:hover {
    color: #8c52ff;
}
.language-selector:hover .lang-menu {
    display: block;
}

/* ==========================================================
   8. LOGO ANIMADO (ROTACIÓN)
   ========================================================== */
.logo img {
    transition: transform 0.6s ease;
    transform-style: preserve-3d;
}
.logo img:hover {
    transform: rotateY(360deg);
}

/* ==========================================================
   9. SECCIÓN DE CONTENIDO Y TARJETAS INDEX
   ========================================================== */
.content-section {
    margin: 30px 20px;
    padding: 40px;
    background-color: #ffffff;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
}
h2 {
    margin-bottom: 20px;
    font-size: 24px;
    font-weight: bold;
}
.review-card {
    background-color: #f9f9f9;
    padding: 20px;
    margin: 15px 0;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ==========================================================
   10. FOOTER
   ========================================================== */
footer {
    background-color: #8c52ff;
    color: white;
    padding: 40px 20px;
    text-align: center;
    font-family: 'Arial', sans-serif;
    box-shadow: 0 -5px 10px rgba(0, 0, 0, 0.2);
}
footer a {
    color: #f4f4f9;
    text-decoration: dotted;
}
.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.footer-logo img {
    height: 60px;
    margin-bottom: 15px;
    opacity: 0.9;
}
.footer-socials {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 25px;
}
.footer-socials img {
    width: 30px;
    transition: transform 0.1s ease, opacity 0.3s ease;
}
.footer-socials a:hover img {
    transform: scale(1.2);
    opacity: 0.7;
}
.footer-bottom {
    font-size: 14px;
    opacity: 0.8;
}

/* ==========================================================
   11. INPUTS Y BOTONES GENERALES
   ========================================================== */
input[type="text"] {
    padding: 10px;
    width: 250px;
    border-radius: 5px;
    border: 1px solid #ddd;
}
button {
    padding: 10px 20px;
    border: none;
    background-color: #8c52ff;
    color: white;
    border-radius: 5px;
    cursor: pointer;
}
button:hover {
    background-color: #7e4ccd;
}

/* ==========================================================
   12. NOTICIAS (LAYOUT PRINCIPAL)
   ========================================================== */
main {
    width: 100%;
    padding-top: 100px;
    
}
@media (min-width: 1600px) {
    main {
        max-width: 1450px;
        margin-left: auto;
        margin-right: auto;
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Contenedor de todas las noticias */
.news-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}
.news-container a {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Contenedor de imágenes con overlay */
.image-container {
    position: relative;
    width: 100%;
    overflow: hidden;
}
.news-main .image-container { height: 600px; }
.news-box .image-container { height: 300px; }
.image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Overlay */
.overlay {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    z-index: 1;
    padding: 5px;
}
.overlay h2,
.overlay h3 {
    margin: 0;
    font-size: 32px;
    line-height: 1.2;
    font-weight: bold;
    color: #fff;
}
.overlay p {
    margin: 5px 0 0;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
}

/* Etiqueta (tag) sobre imagen */
.tag {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #28a745;
    color: white;
    padding: 5px 10px;
    font-size: 14px;
    border-radius: 5px;
    z-index: 2;
}

/* Distribución de grupo de 2 */
.news-group {
    display: flex;
    gap: 10px;
}
.news-box.big { flex: 2; }
.news-box.small { flex: 1; }

/* Grid de 4 noticias */
.news-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.news-grid .news-box {
    flex: 1;
    min-width: 200px;
}

/* Adaptación móvil */
@media (max-width: 768px) {
    .news-grid,
    .news-group {
        flex-direction: column;
    }
    .news-box .image-container,
    .news-main .image-container {
        height: auto;
        aspect-ratio: 16 / 9;
    }

    .nav-links li a {
    color: #000; /* Texto negro en móvil */
    background-color: transparent; /* Opcional */
  }
}

/* ==========================================================
   13. MÁS NOTICIAS (SECCIÓN LATERAL)
   ========================================================== */
.more-news-section {
    margin-top: 40px;
    padding: 20px;
}
.more-news-section h2 {
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 20px;
}
.more-news-container {
    display: flex;
    gap: 20px;
}

/* Columna izquierda */
.more-news-list {
    flex: 0 0 60%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.news-item {
    display: flex;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}
.news-item a {
    display: flex;
    gap: 20px;
    width: 100%;
    text-decoration: none;
    color: inherit;
}
.news-item-left { flex-shrink: 0; }
.news-image {
    width: 150px;
    height: 150px;
    position: relative;
    overflow: hidden;
}
.news-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.news-category {
    position: absolute;
    top: 5px;
    left: 5px;
    background: #28a745;
    color: #fff;
    padding: 3px 6px;
    font-size: 12px;
    border-radius: 3px;
}
.news-item-right {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.news-item-right h3 {
    font-size: 20px;
    font-weight: bold;
    margin: 0;
}
.news-item-right p {
    margin: 10px 0;
    font-size: 16px;
    line-height: 1.4;
    color: #333;
}
.news-author {
    align-self: flex-end;
    font-size: 14px;
    color: #666;
}
.hidden { display: none; }

/* Columna derecha (sticky) */
.fixed-news-wrapper {
    flex: 0 0 40%;
    position: sticky;
    top: 100px;
    align-self: flex-start;
    z-index: 10;
}
.fixed-news-section-header {
    padding: 10px 0;
}
.fixed-news-header {
    font-size: 28px;
    font-weight: bold;
    margin: 0;
    color: #333;
}
.fixed-news-boxes {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.fixed-news-box {
    width: 100%;
    height: 250px;
    position: relative;
    overflow: hidden;
}
.fixed-news-box a {
    display: block;
    text-decoration: none;
    color: inherit;
}
.fixed-news-box img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}
.fixed-news-title {
    position: absolute;
    top: 5px;
    left: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 16px;
    padding: 3px 8px;
    border-radius: 3px;
    z-index: 3;
}
.fixed-news-info {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.6);
    color: #fff;
    font-size: 12px;
    padding: 3px 5px;
    border-radius: 3px;
    z-index: 2;
}

/* Botón "Ver más" */
.load-more-btn {
    display: block;
    margin: 30px auto;
    padding: 10px 20px;
    font-size: 16px;
    color: #fff;
    background-color: #333;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* ==========================================================
   14. RESPONSIVE GENERAL (MAX 768PX)
   ========================================================== */
@media (max-width: 768px) {
    /* Menú hamburguesa */
    .menu {
        display: none;
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
        width: 100%;
        background-color: #ffffff;
        position: absolute;
        top: 70px;
        left: 0;
        padding: 20px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    .menu.active { display: flex; }
    .hamburger { display: flex; }

    .nav-links {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }
    .nav-links li { width: 100%; }
    .nav-links li a {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 10px;
        text-align: left;
        width: 100%;
        color: #333;
        background-color: #fff;
        border-radius: 5px;
        margin-bottom: 5px;
    }
    .nav-links li a:hover {
        background-color: #8c52ff;
        color: #fff;
    }

    /* Submenús en móvil */
    .dropdown-menu,
    .dropdown-submenu {
        display: none;
        position: static;
        background-color: #f9f9f9;
        margin-left: 20px;
        padding: 0;
    }
    .dropdown-menu li:hover > .dropdown-submenu,
    .dropdown:hover > .dropdown-menu {
        display: block;
    }
    .dropdown-menu li,
    .dropdown-submenu li {
        padding: 8px 10px;
    }
    .dropdown-menu li a,
    .dropdown-submenu li a {
        padding: 8px;
        text-align: left;
        color: #333;
    }
    .dropdown-menu li a:hover,
    .dropdown-submenu li a:hover {
        background-color: #8c52ff;
        color: white;
    }
    .nav-links li .dropdown-menu {
        margin-left: 15px;
        background-color: #f0f0f0;
    }
    .dropdown-submenu {
        margin-left: 30px;
        background-color: #d0d0d0;
    }

    /* Ajuste logos menú */
    .menu-logo,
    .submenu-logo {
        height: 25px;
    }

    /* Más noticias en móvil */
    .more-news-container { flex-direction: column; }
    .fixed-news-wrapper { display: none; }

    /* Idioma en móvil */
    #lang-btn { color: #000; }
}

/* ==========================================================
   15. UTILIDADES / CLASES DE APOYO
   ========================================================== */
.oculto {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}
