/* Regular */
@font-face {
    font-family: 'OpenRunde';
    src: url('../fonts/OpenRunde-Regular.woff2') format('woff2'),
         url('../fonts/OpenRunde-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
}

/* Medium */
@font-face {
    font-family: 'OpenRunde';
    src: url('../fonts/OpenRunde-Medium.woff2') format('woff2'),
         url('../fonts/OpenRunde-Medium.woff') format('woff');
    font-weight: 500;
    font-style: normal;
}

/* Semibold */
@font-face {
    font-family: 'OpenRunde';
    src: url('../fonts/OpenRunde-Semibold.woff2') format('woff2'),
         url('../fonts/OpenRunde-Semibold.woff') format('woff');
    font-weight: 600;
    font-style: normal;
}

/* Bold */
@font-face {
    font-family: 'OpenRunde';
    src: url('../fonts/OpenRunde-Bold.woff2') format('woff2'),
         url('../fonts/OpenRunde-Bold.woff') format('woff');
    font-weight: 700;
    font-style: normal;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'OpenRunde', sans-serif;
    background-color: rgb(241, 243, 244);
    overflow-x: hidden;
}

.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 10px 20px;
    /* El fondo inicial se puede dejar, será sobrescrito por las clases .header.light y .header.dark */
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    z-index: 1002;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
    transition: background 0.3s ease-in-out, color 0.3s ease-in-out;
}

/* Estilos para .header.light y .header.dark */
.header.light {
    background: rgba(255, 255, 255, 0.8);
}

.header.dark {
    background: rgba(0, 0, 0, 0.8);
}

.header.light .nav-links .dropdown a,
.header.light .logo-container .text,
.header.light .menu-toggle,
.header.light .close-toggle {
    color: black;
}

.header.dark .nav-links .dropdown a,
.header.dark .logo-container .text,
.header.dark .menu-toggle,
.header.dark .close-toggle {
    color: white;
}

/* Control de visibilidad de logos según el tema */
.logo-container .logo-img {
    display: none;
}

.header.light .logo-container .logo-black {
    display: block;
}

.header.dark .logo-container .logo-white {
    display: block;
}

/* Nuevos estilos para dropdown-content según el tema */
.header.light .nav-links .dropdown-content {
    background-color: white; /* Fondo blanco para tema claro */
}

.header.light .nav-links .dropdown-content a {
    color: black; /* Texto negro para tema claro */
}

.header.dark .nav-links .dropdown-content {
    background-color: rgba(0, 0, 0, 0.8); /* Fondo oscuro para tema oscuro */
}

.header.dark .nav-links .dropdown-content a {
    color: white; /* Texto blanco para tema oscuro */
}

/* Ajustes en los media queries para evitar conflictos */
@media (prefers-color-scheme: dark) { /* Corregí 'dxrk' a 'dark' */
    body {
        background-color: rgb(18, 18, 18);
    }
    /* Se eliminan las declaraciones que afectan al header y sus elementos */
}

@media (prefers-color-scheme: light) {
    /* No es necesario agregar estilos aquí para el header */
}

.logo-container {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo-container a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-container img {
    height: 30px;
    margin-right: 10px;
    flex-shrink: 0;
}

.logo-container .text {
    font-size: 20px;
    font-weight: bold;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
}

.menu-toggle,
.close-toggle {
    display: none;
}

.hidden {
    display: none !important;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-left: 20px;
    flex-wrap: wrap;
}

.nav-links .dropdown {
    position: relative;
}

.nav-links .dropdown a {
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
    padding: 10px 0;
}

.nav-links .dropdown-content {
    display: none;
    position: absolute;
    /* Remover el fondo fijo para permitir estilos temáticos */
    /* background-color: rgba(0, 0, 0, 0.8); */
    min-width: 160px;
    z-index: 1;
    padding: 10px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-links .dropdown:hover .dropdown-content {
    display: block;
}

.nav-links .dropdown-content a {
    display: block;
    padding: 5px 0;
    /* color: white; */ /* Mover color a estilos temáticos */
}

.nav-links .dropdown-content a:hover {
    color: #007BFF;
}

@media (max-width: 767px) {
    .nav-links {
        display: none;
    }

    .menu-toggle,
    .close-toggle {
        display: flex;
        align-items: center;
        font-size: 30px;
        cursor: pointer;
        height: 40px;
        width: 40px;
        z-index: 1003;
    }
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
    }

    .menu-toggle,
    .close-toggle {
        display: none;
    }
}

.menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    padding: 40px 20px;
    overflow-y: auto;
}

.menu.active {
    opacity: 1;
    visibility: visible;
}

.menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu .main-menu {
    padding-top: 30px;
}

.menu .main-menu li {
    margin: 20px 0;
}

.menu .main-menu > li > span,
.menu .main-menu > li > a {
    font-size: 24px;
    font-weight: bold;
    color: rgb(0, 0, 0);
    position: relative;
    display: block;
    margin-bottom: 10px;
}

.menu .submenu {
    margin: 20px 0;
    padding-left: 20px;
}

.menu .submenu li {
    margin: 15px 0;
}

.menu .submenu a {
    font-size: 20px;
    color: rgb(0, 0, 0);
    text-decoration: none;
}

.menu .submenu a:hover {
    color: #007BFF;
}
