/* --- Variables y Estilos Base --- */
:root {
    --primary-color: #007bff;
    --secondary-color: #6E6A19;


    --primary-color: #00355F;
    --secondary-color: #00355F; /* #6E6A19; */

    --background-color: #ffffff;
    --text-color: #000;
    --heading-color: #212529;
    --border-color: #dee2e6;
    --font-family: 'Poppins', -apple-system, BlinkMacSystemFont,  sans-serif;
    --spacing-unit: 1rem;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    font-weight: 400;
}

p {
    font-weight: 300;
    font-size: 1.1rem;
    line-height: 1.6;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 var(--spacing-unit);
}



img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3 {
    color: var(--heading-color);
    line-height: 1.2;
    margin-bottom: calc(var(--spacing-unit) * 0.75);
    font-weight: 700;
}

h1 { font-size: 3rem; }
h2 { font-size: 2.5rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
    color: #6E6A19;
}

/* --- Encabezado y Navegación --- */
#main-header {
    background-color: var(--background-color);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0px 0px;
    position: sticky;
    top: 0;
    z-index: 1000;
    overflow: hidden;
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    height: 50px;
    width: auto;
}

.logo-mobile {
    display: none;
}

#main-nav ul {
    list-style: none;
    display: flex;
    align-items: center;
}

#main-nav ul li+li {
    margin-left: calc(var(--spacing-unit) * 1.5);
}

.nav-label {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: var(--background-color);
    font-weight: 300;
    cursor: default;
}

#main-nav ul .nav-label+li {
    margin-left: calc(var(--spacing-unit) * 0.5);
}

#main-nav a {
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: var(--background-color);
    font-weight: 300;
    text-decoration: none;
    transition: color 0.2s;
}

#main-nav a:hover {
    color: #6E6A19;
    text-decoration: none;
}
#main-nav a.activo {
    color: var(--secondary-color);
    font-weight: 400;
    text-decoration: none;
}
.header-controls {
    display: flex;
    align-items: center;
    gap: var(--spacing-unit);
}

#hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
    position: relative;
}

#hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-color);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
    border-radius: 2px;
}

/* --- Sección Hero Slider --- */
#hero {
    padding: 0;
    height: 60vh;
    min-height: 450px;
    position: relative;
    overflow: hidden;
}

.slider {
    width: 100%;
    height: 100%;
}

.slides {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.slide {
    flex-shrink: 0;
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    background-color: #000;
}

.slide-bg {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    z-index: 1 !important;
    pointer-events: none !important;
    display: block !important;
    opacity: 1 !important;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0);
    z-index: 2;
    pointer-events: none;
}

.hero-content {
    max-width: 800px;
    padding: 1rem;
    position: relative;
    z-index: 3;
}
}

.hero-content h2 {
    font-size: 3rem;
    color: #ffffff;
    text-shadow: -2px 2px 5px black;
    font-family: 'EB Garamond', serif;
}

.hero-content p {
    font-weight: 300;
}

.button {
    display: inline-block;
    background-color: var(--primary-color);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    border: none;
    cursor: pointer;
    margin-top: var(--spacing-unit);
    transition: background-color 0.2s;
}

.button:hover {
    background-color: #0056b3;
    text-decoration: none;
    color: #fff;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: #fff;
    border: none;
    padding: 1rem;
    cursor: pointer;
    font-size: 1.5rem;
    z-index: 10;
    transition: background-color 0.2s;
}

.slider-btn:hover {
    background-color: rgba(0,0,0,0.8);
}

.slider-btn.prev {
    left: 1rem;
}

.slider-btn.next {
    right: 1rem;
}

.dots-container {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 0.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: background-color 0.2s;
}

.dot.active {
    background-color: #fff;
}

/* --- Sección Juegos Destacados --- */
#featured-games {
    padding-top: calc(var(--spacing-unit) * 3);
    padding-bottom: var(--spacing-unit);
}

.games-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--spacing-unit) * 1.5);
    margin-top: calc(var(--spacing-unit) * 2);
}

.game-card {
    display: block;
    overflow: hidden;
}

.game-card-image-link {
    display: block;
}

.game-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.4s ease-out;
}

.game-card:hover .game-card-image-link img {
    transform: scale(1.05) translateY(-5px);
}

.game-card .platform-icon {
    transition: none !important;
}

.game-card:hover .platform-icon {
    transform: none !important;
    scale: none !important;
}

.game-card-info {
    padding: var(--spacing-unit) 0px;
    background-color: #ffffff;
}

.game-card-info h3 {
    margin-bottom: calc(var(--spacing-unit) * 0.0);
    font-size: 1.25rem;
}

.game-card-info h3 a {
    color: inherit;
    text-decoration: none;
}

.game-card-info h3 a:hover {
    text-decoration: underline;
}

.game-platforms {
    display: flex;
    align-items: center;
    gap: calc(var(--spacing-unit) * 0.5);
}

.game-platforms a {
    display: inline-block;
    transition: opacity 0.2s ease;
    transform: none !important;
}

.game-platforms a:hover {
    opacity: 1;
    transform: none !important;
    scale: 1 !important;
}

.game-platforms a:hover .platform-icon {
    transform: none !important;
    scale: 1 !important;
}

.platform-icon {
    width: 20px !important;
    height: 20px !important;
    max-width: 20px;
    max-height: 20px;
    color: var(--secondary-color);
    opacity: 0.8;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

.coming-soon {
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: #00355F;
    font-weight: 300;
    font-style: italic;
    opacity: 0.8;
    line-height: 1.8rem;
}

/* --- Contenido principal --- */
main section#about {
    padding-top: var(--spacing-unit);
    padding-bottom: calc(var(--spacing-unit) * 3);
}

main section#about h2,
main section#featured-games h2 {
    color: var(--secondary-color);
    font-weight: 300;
    font-family: 'EB Garamond', serif;
}

/* --- Footer --- */
footer {
    background-color: var(--heading-color);
    color: var(--background-color);
    text-align: center;
    padding: calc(var(--spacing-unit) * 1.5);
    margin-top: calc(var(--spacing-unit) * 2);
}

.footer-links {
    margin-top: 1rem;
    font-size: 0.9rem;
}

.footer-links a {
    color: var(--background-color);
    text-decoration: none;
    margin: 0 0.25rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: #D4AF37;
    text-decoration: underline;
}

.slide {
    align-items: center;
    padding-bottom: 0px;
}


/* Mobile: ensure menu is hidden by default and styled when active */
@media (max-width: 980px) {
    /* Ensure menu is hidden by default - respect original behavior */
    #main-nav {
        /* display: none !important; */
        padding: 0px ;
    }

    #featured-games{
        padding-top: calc(var(--spacing-unit) * 1);
        padding-bottom: calc(var(--spacing-unit) * 0);
        line-height: 2rem;
    }
    
    #main-header{
        overflow: visible;
        margin-top: 2px;
    }
    .logos {
        padding: 10px;
    }
    /* Only show when hamburger is active */
    #main-header.nav-active #main-nav {
        display: block !important;
        background-color: var(--heading-color);
        width: 100%;
        margin-left: 0;
        padding: 0;
    }

    /* #main-header .container {
        padding: 0.5rem var(--spacing-unit) 10px;
    } */
}

@media (max-width: 880px) {
    .slide {
        align-items: flex-end;
        padding-bottom: 5rem;
    }
    #main-header .container {
        padding: 0.5rem var(--spacing-unit) 10px;
    }
}

/* --- Media Queries para Responsividad --- */

@media (min-width: 670px) {
    #main-header .container {
        flex-direction: column;
        align-items: flex-start;
        padding: 0.5rem var(--spacing-unit) 0px;
    }

    .logo-link {
        margin-bottom: 0;
    }

    #main-nav {
        width: auto;
        margin-top: 0.5rem;
        position: relative;
    }
    
    /* Full-width background behind the menu */
    #main-nav::before {
        content: '';
        position: absolute;
        top: 0;
        left: calc(-50vw);
        width: 200vw;
        height: 100%;
        background-color: var(--heading-color);
        z-index: -1;
    }

    #main-nav ul {
        justify-content: flex-start;
        position: relative;
        z-index: 1;
        padding: calc(var(--spacing-unit) * 0.5) 0;
    }

    /* White text color for menu items on dark background */
    #main-nav a {
        color: var(--background-color);
    }

    #main-nav a:hover {
        color: #6E6A19;
    }

    .nav-label {
        color: var(--background-color);
        font-weight: 500;
        font-size: 15px;
    }

    .header-controls {
        display: none;
    }
    
/*
    .slide {
        align-items: flex-end;
        padding-bottom: 5rem;
    }
*/
}
@media (max-width: 669px) {
    .logo-desktop {
        display: none;
    }
    
    .logo-mobile {
        display: block;
    }
    #main-header .container {
        padding: 0.5rem var(--spacing-unit) 10px;
        padding-right: 8px;
    }
    #main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--background-color);
        border-top: 1px solid var(--border-color);
    }
    
    #main-header.nav-active #main-nav {
        background-color: var(--heading-color);
        display: block;
    }

    #main-nav ul {
        flex-direction: column;
        padding: var(--spacing-unit);
        align-items: flex-start;
    }

    #main-nav ul li+li {
        margin-left: 0;
        margin-top: var(--spacing-unit);
    }

    #main-nav ul .nav-label+li {
        margin-top: calc(var(--spacing-unit) * 0.5);
        margin-left: 0;
    }

    #hamburger-menu {
        display: block;
    }

    #main-header.nav-active #hamburger-menu span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }
    #main-header.nav-active #hamburger-menu span:nth-child(2) {
        opacity: 0;
    }
    #main-header.nav-active #hamburger-menu span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .hero-content h2 {
        font-size: 2rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }
}

/* --- Dark Mode Toggle Button --- */
#dark-mode-toggle-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    padding: 1rem 0;
    background-color: var(--background-color);
    max-width: 1100px;
    margin: 0 auto;
    padding-left: var(--spacing-unit);
    padding-right: var(--spacing-unit);
}

#dark-mode-toggle {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: transform 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

#dark-mode-toggle:hover {
    transform: scale(1.1);
}

#dark-mode-toggle:active {
    transform: scale(0.95);
}

#dark-mode-icon {
    width: 32px;
    height: 32px;
    display: block;
    transition: filter 0.3s ease;
    pointer-events: none;
}

/* Dark Mode Toggle - Mobile Responsive */
@media (max-width: 669px) {
    #dark-mode-toggle-container {
        position: relative;
        z-index: 999;
        touch-action: manipulation;
    }
    
    /* #dark-mode-toggle {
        padding: 0px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    } */
    
    #dark-mode-icon {
        width: 28px;
        height: 28px;
    }
}

/* --- Filtros para Modo Oscuro --- */
body.dark-theme .logo,
body.dark-theme .logo-desktop,
body.dark-theme .logo-mobile,
body.dark-theme .social-logo {
    filter: invert(1) brightness(2);
}

/* --- Legal Pages Styles --- */
#legal-notice,
#privacy-policy,
#cookies-policy,
#ayuda-cdti {
    max-width: 1100px;
    margin: 0 auto;
    padding: 3rem var(--spacing-unit);
    line-height: 1.8;
}

#legal-notice h1,
#privacy-policy h1,
#cookies-policy h1,
#ayuda-cdti h1 {
    font-family: 'EB Garamond', serif;
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    color: var(--secondary-color);
    text-align: left;
}

#legal-notice h2,
#privacy-policy h2,
#cookies-policy h2,
#ayuda-cdti h2 {
    font-family: 'EB Garamond', serif;
    font-size: 1.5rem;
    font-weight: 300;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

#ayuda-cdti h3 {
    font-family: 'EB Garamond', serif;
    font-size: 1.3rem;
    font-weight: 300;
    margin-top: 1.5rem;
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
}

#legal-notice p,
#privacy-policy p,
#cookies-policy p,
#ayuda-cdti p {
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 1.2rem;
    color: var(--text-color);
    line-height: 1.6;
    text-align: justify;
}

#legal-notice ul,
#privacy-policy ul,
#cookies-policy ul,
#ayuda-cdti ul {
    margin: 1.5rem 0 1.5rem 2rem;
    list-style-type: disc;
}

#legal-notice li,
#privacy-policy li,
#cookies-policy li,
#ayuda-cdti li {
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 300;
    margin-bottom: 0.8rem;
    color: var(--text-color);
    line-height: 1.6;
}

#legal-notice a,
#privacy-policy a,
#cookies-policy a,
#ayuda-cdti a {
    color: #4A90E2;
    text-decoration: none;
    transition: color 0.3s ease;
}

#legal-notice a:hover,
#privacy-policy a:hover,
#cookies-policy a:hover,
#ayuda-cdti a:hover {
    color: #D4AF37;
    text-decoration: underline;
}

#legal-notice strong,
#privacy-policy strong,
#cookies-policy strong,
#ayuda-cdti strong {
    font-weight: 600;
    color: #2c2c2c;
}

/* Legal Pages - Responsive */
@media (max-width: 768px) {
    #legal-notice,
    #privacy-policy,
    #cookies-policy,
    #ayuda-cdti {
        padding: 2rem 1.5rem;
    }

    #legal-notice h1,
    #privacy-policy h1,
    #cookies-policy h1,
    #ayuda-cdti h1 {
        font-size: 2rem;
    }

    #legal-notice h2,
    #privacy-policy h2,
    #cookies-policy h2,
    #ayuda-cdti h2 {
        font-size: 1.3rem;
    }

    #legal-notice p,
    #privacy-policy p,
    #cookies-policy p,
    #ayuda-cdti p,
    #legal-notice li,
    #privacy-policy li,
    #cookies-policy li,
    #ayuda-cdti li {
        font-size: 0.95rem;
        text-align: left;
    }

    #legal-notice ul,
    #privacy-policy ul,
    #cookies-policy ul,
    #ayuda-cdti ul {
        margin-left: 1.2rem;
    }
}

/* --- Cookie Policy Details/Summary Styles --- */
.cookie-service,
.consent-category {
    margin: 1.5rem 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 0;
    background-color: #f9f9f9;
}

.cookie-service summary,
.consent-category summary {
    padding: 1rem 1.5rem;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 1.1rem;
    font-weight: 400;
    color: var(--secondary-color);
    list-style: none;
    user-select: none;
    transition: background-color 0.3s ease;
}

.cookie-service summary::-webkit-details-marker,
.consent-category summary::-webkit-details-marker {
    display: none;
}

.cookie-service summary::before,
.consent-category summary::before {
    content: "▶";
    display: inline-block;
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.cookie-service[open] summary::before,
.consent-category[open] summary::before {
    transform: rotate(90deg);
}

.cookie-service summary:hover,
.consent-category summary:hover {
    background-color: #f0f0f0;
}

.cookie-details,
.consent-category > p,
.consent-category > ul {
    padding: 1rem 1.5rem;
    border-top: 1px solid #ddd;
}

.cookie-details p,
.consent-category p {
    margin-bottom: 0.8rem;
}

.cookie-details ul {
    margin-top: 0.5rem;
    margin-left: 1.5rem;
}

.cookie-details li {
    margin-bottom: 0.5rem;
}

#cookies-policy h3 {
    font-family: 'EB Garamond', serif;
    font-size: 1.3rem;
    font-weight: 300;
    margin-top: 2rem;
    margin-bottom: 0.8rem;
    color: var(--secondary-color);
}

.consent-categories {
    margin: 2rem 0;
}

/* --- CDTI Logo Styles --- */
.cdti-logo {
    margin-top: 3rem;
    text-align: center;
}

.cdti-logo img {
    max-width: 100%;
    height: auto;
    max-height: 200px;
}


