/* ===========================
   ESTILOS UNIFICADOS FRONTEND
   Para: index.htm, contenido.htm, acceso.htm, comer.htm, enlaces.htm, historia.htm, biblioteca.htm
   =========================== */

/* ===========================
   ÍNDICE Y FRAMES
   =========================== */

/* Eliminar barras de desplazamiento completamente */
* {
    scrollbar-width: thin; /* Cambiado de none a thin para Firefox */
    scrollbar-color: var(--verde-pirineo) var(--crema-montaña); /* Colores personalizados para Firefox */
    -ms-overflow-style: auto; /* Cambiado de none a auto para Internet Explorer 10+ */
}

/* Barra de scroll personalizada para Webkit (Chrome, Safari, Opera) */
*::-webkit-scrollbar {
    width: 14px; /* Ancho más visible de la barra de scroll */
    height: 14px;
}

*::-webkit-scrollbar-track {
    background: var(--crema-montaña); /* Color del track */
    border-radius: 12px;
    box-shadow: inset 0 0 5px var(--sombra-suave);
    border: 1px solid var(--beige-piedra);
}

*::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--verde-pirineo) 0%, var(--verde-pirineo-claro) 100%);
    border-radius: 12px;
    border: 3px solid var(--crema-montaña);
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px rgba(26, 77, 54, 0.3);
}

*::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--verde-pirineo-oscuro) 0%, var(--verde-pirineo) 100%);
    box-shadow: 0 4px 12px rgba(26, 77, 54, 0.5);
    transform: scale(1.05);
}

*::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, var(--verde-pirineo-oscuro) 0%, var(--verde-sage) 100%);
    box-shadow: 0 2px 8px rgba(26, 77, 54, 0.6);
}

*::-webkit-scrollbar-corner {
    background: var(--crema-montaña);
    border-radius: 12px;
}

/* Body específico para página de inicio */
body.index-body {
    margin: 0;
    padding: 0;
    overflow: hidden;
}

/* Contenedor de frames */
.frame-container {
    display: flex;
    height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

/* Frame del menú */
.menu-frame {
    height: 100%;
    width: 200px;
    min-width: 200px;
    background: var(--crema-montaña);
    border-right: 3px solid var(--verde-sage);
    box-shadow: 2px 0 10px var(--sombra-suave);
    overflow: hidden;
}

/* Frame del contenido */
.content-frame {
    height: 100%;
    flex: 1;
    background: white;
    overflow: hidden;
}

/* Iframes */
iframe {
    width: 100%;
    height: 100%;
    border: none;
    overflow: hidden;
}

/* ===========================
   ESTILOS ESPECÍFICOS DEL MENÚ
   =========================== */

/* Contenedor principal del menú */
  



.menu-container {
    background: linear-gradient(135deg, var(--blanco-nieve) 0%, var(--crema-montaña) 100%);
    color: var(--verde-pirineo-oscuro);
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 15px var(--sombra-suave);
    position: relative;
}

.logo-section {
    text-align: center;
    padding: 30px 20px;
    border-bottom: 3px solid var(--verde-sage);
    background: linear-gradient(135deg, var(--blanco-nieve) 0%, var(--crema-montaña) 100%);
    position: relative;
}

.logo-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--verde-sage), var(--verde-musgo), var(--verde-sage));
}

.logo-section img {
    max-width: 100px;
    height: auto;
    margin: 0 auto 15px;
    display: block;
    border-radius: 10px;
    border: 3px solid var(--verde-sage);
    box-shadow: 0 6px 20px rgba(26, 77, 54, 0.4);
    transition: all 0.3s ease;
}

.logo-section img:hover {
    transform: scale(1.05);
    border-color: var(--verde-pirineo-claro);
    box-shadow: 0 8px 25px rgba(26, 77, 54, 0.6);
}

/* Contenedor para efecto hover del logo */
.logo-container {
    position: relative;
    display: inline-block;
    margin: 0 auto 15px;
}

.logo-main,
.logo-hover {
    max-width: 100px;
    height: auto;
    border-radius: 10px;
    border: 3px solid var(--verde-sage);
    box-shadow: 0 6px 20px rgba(26, 77, 54, 0.4);
    transition: all 0.4s ease;
    display: block;
}

.logo-hover {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: scale(0.9) rotate(-5deg);
}

.logo-container:hover .logo-main {
    opacity: 0;
    transform: scale(0.9) rotate(5deg);
}

.logo-container:hover .logo-hover {
    opacity: 1;
    transform: scale(1.05) rotate(0deg);
    border-color: var(--verde-pirineo-claro);
    box-shadow: 0 8px 25px rgba(26, 77, 54, 0.6);
}

.logo-section h2 {
    color: var(--verde-pirineo-oscuro);
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
    margin: 0;
}

/* Navegación del menú */
.menu-nav {
    padding: 20px 0;
}

.menu-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0 15px;
}

.menu-item {
    display: block;
    color: var(--blanco-nieve);
    text-decoration: none;
    padding: 15px 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    font-weight: 500;
    font-size: 1rem;
    border: 2px solid transparent;
    background: linear-gradient(135deg, var(--verde-pirineo) 0%, var(--verde-sage) 100%);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(26, 77, 54, 0.3);
}

.menu-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.menu-item:hover::before {
    left: 100%;
}

.menu-item:hover {
    background: linear-gradient(135deg, var(--verde-pirineo-oscuro) 0%, var(--verde-pirineo) 100%);
    color: var(--blanco-nieve);
    transform: translateX(5px);
    border-color: var(--verde-pirineo-claro);
    box-shadow: 0 4px 15px rgba(26, 77, 54, 0.4);
}

.menu-item:active {
    transform: translateX(5px) scale(0.98);
}

/* Colores específicos para cada item del menú */
.menu-item.inicio:hover {
    background: linear-gradient(135deg, var(--verde-sage) 0%, var(--verde-pirineo) 100%);
    border-color: var(--verde-sage);
}

.menu-item.noticias:hover {
    background: linear-gradient(135deg, var(--verde-pirineo) 0%, var(--verde-pirineo-oscuro) 100%);
    border-color: var(--verde-pirineo);
}

.menu-item.historia:hover {
    background: linear-gradient(135deg, var(--verde-musgo) 0%, var(--verde-pirineo) 100%);
    border-color: var(--verde-musgo);
}

.menu-item.palotiau:hover {
    background: linear-gradient(135deg, var(--verde-pirineo-claro) 0%, var(--verde-sage) 100%);
    border-color: var(--verde-pirineo-claro);
}

.menu-item.acceso:hover {
    background: linear-gradient(135deg, var(--verde-sage) 0%, var(--verde-musgo) 100%);
    border-color: var(--verde-sage);
}

.menu-item.comer:hover {
    background: linear-gradient(135deg, var(--verde-pirineo-claro) 0%, var(--verde-pirineo) 100%);
    border-color: var(--verde-pirineo-claro);
}

.menu-item.enlaces:hover {
    background: linear-gradient(135deg, var(--verde-musgo) 0%, var(--verde-pirineo) 100%);
    border-color: var(--verde-musgo);
}

.menu-item.tiempo:hover {
    background: linear-gradient(135deg, var(--verde-pirineo) 0%, var(--verde-pirineo-oscuro) 100%);
    border-color: var(--verde-pirineo);
}

.menu-item.subir-fotos:hover {
    background: linear-gradient(135deg, var(--verde-sage) 0%, var(--verde-pirineo-claro) 100%);
    border-color: var(--verde-sage);
}

/* ===========================
   PÁGINA PRINCIPAL
   =========================== */

/* Body específico para página principal */
body.main-body {
    font-family: 'Segoe UI', 'Verdana', sans-serif;
    background: linear-gradient(135deg, var(--crema-montaña) 0%, var(--beige-piedra) 100%);
    color: var(--verde-pirineo-oscuro);
    line-height: 1.7;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    padding-bottom: 20px; /* Reducido significativamente ya que no hay barra fija */
}

/* Encabezado principal */
.header {
    background: linear-gradient(135deg, var(--blanco-nieve) 0%, var(--crema-montaña) 50%, var(--beige-piedra) 100%);
    color: var(--verde-pirineo-oscuro);
    padding: 1rem 1.5rem;
    text-align: center;
    position: relative;
    box-shadow: 0 4px 20px var(--sombra-suave);
    border-radius: 15px;
    margin-bottom: 20px;
}

.header::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--verde-pirineo-claro), var(--verde-sage), var(--verde-pirineo-claro));
    border-radius: 0 0 20px 20px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
    max-width: 2200px; /* Aumentado significativamente de 1800px */
    margin: 0 auto;
    width: 100%; /* Asegurar que ocupe todo el ancho disponible */
}

.header-main {
    flex: 3;
    text-align: left;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.header-main h1 {
    font-size: 2.8rem;
    margin: 0;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.1);
    background: linear-gradient(45deg, var(--verde-pirineo-oscuro), var(--verde-pirineo));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease-out;
}

.header-main p {
    margin: 4px 0;
    line-height: 1.6;
    font-size: 1.05rem;
    color: var(--gris-roca);
}

/* Título con fondo animado */
.title-with-bg {
    position: relative;
    display: inline-block;
    padding: 1rem 4rem;
    color: white;
    font-size: 3rem;
    text-align: center;
    z-index: 1;
    overflow: hidden;
    border-radius: 20px;
    border: 3px solid var(--verde-pirineo);
    box-shadow: 0 6px 20px var(--sombra-suave);
}

.title-with-bg::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 200%;
    height: 100%;
    background-image: url('../IMAGENES/nevada.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    animation: move-bg-back-forth 35s ease-in-out infinite;
    z-index: -1;
    opacity: 0.6;
    filter: brightness(0.7);
}

@keyframes move-bg-back-forth {
    0% { transform: translateX(0); }
    50% { transform: translateX(-50%); }
    100% { transform: translateX(0); }
}

/* Widget del clima */
.weather-widget {
    flex: 1;
    background: linear-gradient(135deg, var(--verde-pirineo) 0%, var(--verde-sage) 100%);
    border-radius: 15px;
    padding: 0.05px;
    min-width: 180px;
    max-width: 200px;
    color: var(--blanco-nieve);
    box-shadow: 0 8px 25px var(--sombra-suave);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.weather-widget h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: var(--blanco-nieve);
    text-align: center;
    font-weight: 600;
}

.weather-info {
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.weather-temp {
    font-size: 2em;
    font-weight: bold;
    margin: 1px 0;
    color: var(--blanco-nieve);
}

.weather-desc {
    font-size: 0.9em;
    margin: 1px 0;
    text-transform: capitalize;
    font-weight: 500;
    color: var(--crema-montaña);
}

.weather-details {
    font-size: 0.8em;
    margin-top: 1px;
    opacity: 0.9;
    line-height: 1.3;
    color: var(--crema-montaña);
}

.weather-details div {
    margin: 3px 0;
}

.weather-icon {
    width: 50px;
    height: 50px;
    margin: 5px auto;
}

.loading {
    color: var(--crema-montaña);
    font-style: italic;
}

/* Grid principal */
.main-grid {
    display: grid;
    grid-template-columns: 1fr; /* Una sola columna que contendrá las filas */
    gap:15px;
    margin-bottom: 30px;
    animation: fadeInUp 0.8s ease-out 0.4s both;
    max-width: 2200px; /* Aumentado significativamente de 1800px */
    margin-left: auto;
    margin-right: auto;
    width: 100%; /* Asegurar que ocupe todo el ancho disponible */
    padding: 0 15px; /* Padding lateral intermedio */
}

/* Contenedor principal con sidebar - ocupa casi todo el ancho */
.contenido-principal-con-sidebar {
    display: grid;
    grid-template-columns: 1fr 320px; /* Contenido principal + sidebar derecha más ancha */
    gap: 25px;
    width: 100%;
    align-items: start;
}

/* Texto principal - ocupa la mayor parte del ancho */
.texto-principal-amplio {
    width: 50%;
    
}

/* Sidebar derecha compacta */
.sidebar-derecha-compacta {
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-width: 300px;
}

/* Últimas noticias - Ancho completo debajo */
.noticias-completo {
    width: 100%;
    margin-top: 10px;
}

/* Tarjetas generales */
.card {
    background: linear-gradient(135deg, var(--blanco-nieve) 0%, var(--crema-montaña) 100%);
    border-radius: 15px;
    padding: 18px;
    box-shadow: 0 8px 25px var(--sombra-suave);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.8s ease-out calc(0.6s + var(--delay, 0s)) both;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--verde-sage), var(--verde-musgo), var(--verde-sage));
    border-radius: 15px 15px 0 0;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px var(--sombra-suave);
}

.card h3 {
    color: var(--verde-pirineo-oscuro);
    font-size: 1.3rem;
    margin-bottom: 12px;
    font-weight: 700;
    text-align: center;
}

.card .btn {
    margin: 8px 4px;
    display: inline-block;
}

.card .btn:first-of-type {
    margin-top: 15px;
}

/* Botones en línea múltiple */
.card .btn + .btn {
    margin-top: 8px;
}

/* Contenido central */
.central-content {
    grid-column: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    position: relative;
}

.gallery-frame {
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 8px 25px var(--sombra-suave);
    background: var(--verde-pirineo-oscuro);
    margin-bottom: 20px; /* Reducido de 25px */
    width: 100%;
    height: 350px; /* Altura corregida para escritorio */
    min-height: 320px; /* Reducido de 480px a 320px */
}

.gallery-frame iframe {
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 15px;
}

.webcam-image {
    border-radius: 8px;
    max-width: 95%;
    height: auto; /* Mantener proporción automática */
    margin: 15px auto;
    max-height: 400px; /* Limitar altura máxima */
    object-fit: contain; /* Mantener proporciones sin distorsión */
}

.webcam-image:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 25px var(--sombra-suave);
}

.interactive-image {
    max-width: 85%; /* Reducido de 100% para mejor proporción */
    height: auto; /* Mantener proporción automática */
    margin: 15px auto;
    max-height: 450px; /* Limitar altura máxima */
    object-fit: contain; /* Mantener proporciones sin distorsión */
}

.interactive-image:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
    box-shadow: 0 12px 35px var(--sombra-suave);
}

/* Sección webcam */
.webcam-section {
    background: linear-gradient(135deg, var(--blanco-nieve) 0%, var(--crema-montaña) 100%);
    color: var(--verde-pirineo-oscuro);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    position: relative;
}

.webcam-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--verde-sage), var(--verde-musgo), var(--verde-sage));
    border-radius: 15px 15px 0 0;
}

.webcam-section h3 {
    margin-bottom: 15px;
    color: var(--verde-pirineo-oscuro);
    font-size: 1.3rem;
}

.webcam-section h4 {
    color: var(--verde-pirineo-oscuro);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.webcam-section .btn {
    margin: 5px 8px;
    display: inline-block;
    padding: 8px 16px;
    font-size: 0.85rem;
}

.webcam-info {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-top: 15px;
    color: var(--verde-pirineo-oscuro);
    opacity: 0.9;
}

/* Sección biblioteca */
.library-section {
    padding: 20px 0;
}

.library-section h3 {
    color: var(--verde-pirineo-oscuro);
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.author-image {
    width: 100%;
    max-width: 150px;
    height: auto;
    border-radius: 10px;
    margin: 10px auto;
    display: block;
    box-shadow: 0 4px 15px var(--sombra-suave);
}

/* ===========================
   ESTILOS ESPECÍFICOS DE BIBLIOTECA
   =========================== */

/* Header específico de biblioteca */
.biblioteca-header {
    background: linear-gradient(135deg, var(--verde-pirineo) 0%, var(--verde-pirineo-claro) 100%);
    color: var(--blanco-nieve);
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px var(--sombra-suave);
    position: relative;
}

.biblioteca-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--verde-sage), var(--verde-musgo), var(--verde-sage));
    border-radius: 15px 15px 0 0;
}

.biblioteca-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.biblioteca-header em {
    font-size: 1.3rem;
    margin-bottom: 15px;
    display: block;
    opacity: 0.9;
}

.biblioteca-header a {
    color: var(--crema-montaña);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 25px;
    border: 2px solid var(--crema-montaña);
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 10px;
}

.biblioteca-header a:hover {
    background: var(--crema-montaña);
    color: var(--verde-pirineo-oscuro);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--sombra-suave);
}

/* Main de biblioteca */
.biblioteca-main {
    max-width: 1800px; /* Aumentado de 1200px */
    margin: 0 auto;
    padding: 0 20px;
}

/* Galería de biblioteca */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 30px 0;
    justify-items: center;
}

.gallery img {
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--sombra-suave);
    transition: all 0.3s ease;
    cursor: pointer;
}

.gallery img:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 35px var(--sombra-suave);
}

/* Título de sección de biblioteca */
.section-title {
    text-align: center;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--verde-pirineo-oscuro);
    margin: 40px 0 20px 0;
    padding: 15px;
    background: linear-gradient(135deg, var(--verde-sage) 0%, var(--verde-musgo) 100%);
    color: var(--blanco-nieve);
    border-radius: 10px;
    box-shadow: 0 4px 15px var(--sombra-suave);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Enlaces de descarga */
.downloads {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0 40px 0;
    flex-wrap: wrap;
}

.downloads a {
    background: linear-gradient(135deg, var(--verde-pirineo-claro) 0%, var(--verde-sage) 100%);
    color: var(--blanco-nieve);
    padding: 12px 25px;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px var(--sombra-suave);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.downloads a:hover {
    background: linear-gradient(135deg, var(--verde-pirineo-oscuro) 0%, var(--verde-pirineo) 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--sombra-suave);
}

/* Contenido de biblioteca */
.content {
    background: linear-gradient(135deg, var(--blanco-nieve) 0%, var(--crema-montaña) 100%);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 25px var(--sombra-suave);
    margin: 30px 0;
    line-height: 1.8;
    position: relative;
}

.content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--verde-sage), var(--verde-musgo), var(--verde-sage));
    border-radius: 15px 15px 0 0;
}

.content p {
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.content strong {
    color: var(--verde-pirineo-oscuro);
    font-weight: 700;
}

.content em {
    color: var(--gris-roca);
    font-style: italic;
}

.content a {
    color: var(--verde-pirineo);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.content a:hover {
    color: var(--verde-pirineo-oscuro);
    text-decoration: underline;
}

/* Footer de biblioteca */
footer {
    background: linear-gradient(135deg, var(--verde-pirineo-oscuro) 0%, var(--verde-pirineo) 100%);
    color: var(--blanco-nieve);
    text-align: center;
    padding: 20px;
    margin-top: 40px;
    border-radius: 10px;
    font-weight: 600;
}

/* Grid de artículos */
.article-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

.article-grid .card {
    animation-delay: calc(0.8s + var(--index, 0) * 0.1s);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--verde-pirineo-oscuro) 0%, var(--verde-pirineo) 100%);
    color: var(--blanco-nieve);
    text-align: center;
    padding: 15px; /* Reducido de 25px */
    margin-top: 40px;
    margin-bottom: 75px; /* Aumentado de 45px para la barra más grande */
    border-radius: 15px;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--verde-sage), var(--verde-musgo), var(--verde-sage));
    border-radius: 15px 15px 0 0;
}

.footer a {
    color: var(--crema-montaña);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    font-size: 0.9rem; /* Reducido el tamaño de fuente */
}

.footer a:hover {
    color: var(--blanco-nieve);
    text-decoration: underline;
}

.contact-info {
    margin: 10px 0; /* Reducido de 15px */
    line-height: 1.6; /* Reducido de 1.8 */
    font-size: 0.9rem; /* Agregado tamaño más pequeño */
}

.creation-date {
    font-size: 0.8rem; /* Reducido de 0.9rem */
    margin-top: 10px; /* Reducido de 15px */
    opacity: 0.8;
    font-style: italic;
}

/* ===========================
   PÁGINAS DE CONTENIDO
   =========================== */

/* Body específico para páginas de contenido */
body.contenido-body {
    font-family: 'Segoe UI', 'Verdana', sans-serif;
    background: linear-gradient(135deg, var(--crema-montaña) 0%, var(--beige-piedra) 100%);
    color: var(--verde-pirineo-oscuro);
    line-height: 1.7;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

/* Container para páginas de contenido */
.container {
    position: relative;
    max-width: 2200px;
    margin: 0 auto;
    padding: 20px;
    background: linear-gradient(135deg, var(--crema-montaña) 0%, var(--beige-piedra) 100%);
    border-radius: 15px;
    margin-bottom: 20px;
}

/* Content wrapper */
.content {
    padding: 2rem;
    position: relative;
}

/* Secciones de contenido */
.section {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, var(--blanco-nieve) 0%, var(--crema-montaña) 100%);
    border-radius: 15px;
    box-shadow: 0 8px 25px var(--sombra-suave);
    border-left: 5px solid var(--verde-pirineo);
    position: relative;
    animation: fadeInUp 0.8s ease-out calc(0.6s + var(--delay, 0s)) both;
}

.section h3 {
    color: var(--verde-pirineo-oscuro);
    font-size: 1.6rem;
    margin-bottom: 20px;
    font-weight: 700;
    border-bottom: 2px solid var(--verde-sage);
    padding-bottom: 10px;
}

/* Sección introductoria */
.intro-section {
    background: linear-gradient(135deg, var(--verde-pirineo) 0%, var(--verde-pirineo-claro) 100%);
    color: var(--blanco-nieve);
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 8px 25px var(--sombra-suave);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.intro-section h2 {
    font-size: 2rem;
    margin-bottom: 15px;
    color: var(--blanco-nieve);
}

.intro-section p {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Cards grid para contenido */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.cards-grid .card {
    background: linear-gradient(135deg, var(--blanco-nieve) 0%, var(--crema-montaña) 100%);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 6px 20px var(--sombra-suave);
    transition: all 0.3s ease;
    border-left: 4px solid var(--verde-sage);
    animation: fadeInUp 0.6s ease-out calc(0.8s + var(--index, 0) * 0.1s) both;
}

.cards-grid .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px var(--sombra-suave);
    border-left-color: var(--verde-pirineo);
}

.cards-grid .card h4 {
    color: var(--verde-pirineo-oscuro);
    font-size: 1.2rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.cards-grid .card.highlight {
    background: linear-gradient(135deg, var(--verde-sage) 0%, var(--verde-musgo) 100%);
    color: var(--verde-pirineo-oscuro);
    border-left-color: var(--verde-pirineo-oscuro);
}

/* Info boxes */
.info-box {
    background: linear-gradient(135deg, var(--verde-musgo) 0%, var(--beige-piedra) 100%);
    padding: 25px;
    border-radius: 12px;
    margin: 25px 0;
    border-left: 5px solid var(--verde-pirineo);
    box-shadow: 0 6px 20px var(--sombra-suave);
}

.info-box.special {
    background: linear-gradient(135deg, var(--verde-pirineo-claro) 0%, var(--verde-sage) 100%);
    color: var(--blanco-nieve);
    border-left-color: var(--verde-pirineo-oscuro);
}

.info-box h4 {
    color: var(--verde-pirineo-oscuro);
    margin-bottom: 15px;
    font-size: 1.3rem;
    font-weight: 600;
}

.info-box.special h4 {
    color: var(--blanco-nieve);
}

.info-box ul {
    margin-left: 20px;
    line-height: 1.8;
}

.info-box ul li {
    margin-bottom: 8px;
}

/* CTA Section */
.cta-section {
    background: linear-gradient(135deg, var(--verde-pirineo-oscuro) 0%, var(--verde-pirineo) 100%);
    color: var(--blanco-nieve);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    margin: 40px 0;
    box-shadow: 0 12px 40px var(--sombra-suave);
    animation: fadeInUp 0.8s ease-out 1s both;
}

.cta-section h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--blanco-nieve);
    border-bottom: none;
}

.info-contact {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-top: 25px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.info-contact p {
    margin: 8px 0;
    font-weight: 500;
}

/* ===========================
   BIBLIOTECA
   =========================== */

/* Body específico para biblioteca */
body.biblioteca-body {
    font-family: 'Segoe UI', 'Verdana', sans-serif;
    background: linear-gradient(135deg, var(--crema-montaña) 0%, var(--beige-piedra) 100%);
    color: var(--verde-pirineo-oscuro);
    line-height: 1.7;
    min-height: 100vh;
    margin: 0;
    padding: 20px;
}

/* Sección de autor */
.author-section {
    display: flex;
    gap: 30px;
    margin-bottom: 40px;
    background: linear-gradient(135deg, var(--blanco-nieve) 0%, var(--crema-montaña) 100%);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 8px 25px var(--sombra-suave);
    animation: fadeInUp 0.8s ease-out 0.2s both;
}

.author-info {
    flex: 2;
}

.author-image-container {
    flex: 1;
    text-align: center;
}

.author-image {
    max-width: 200px;
    border-radius: 15px;
    box-shadow: 0 8px 25px var(--sombra-suave);
}

.author-bio {
    line-height: 1.8;
    font-size: 1.05rem;
    margin-bottom: 20px;
}

.author-highlight {
    background: linear-gradient(135deg, var(--verde-sage) 0%, var(--verde-musgo) 100%);
    padding: 20px;
    border-radius: 10px;
    color: var(--verde-pirineo-oscuro);
    font-style: italic;
    border-left: 4px solid var(--verde-pirineo);
}

/* Libro destacado */
.featured-book {
    background: linear-gradient(135deg, var(--verde-pirineo) 0%, var(--verde-pirineo-claro) 100%);
    color: var(--blanco-nieve);
    padding: 40px;
    border-radius: 15px;
    text-align: center;
    margin: 40px 0;
    box-shadow: 0 12px 40px var(--sombra-suave);
    animation: fadeInUp 0.8s ease-out 0.6s both;
}

.featured-book h3 {
    font-size: 2rem;
    margin-bottom: 20px;
    color: var(--blanco-nieve);
}

.book-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 25px;
}

.book-details {
    background: rgba(255, 255, 255, 0.1);
    padding: 20px;
    border-radius: 10px;
    margin-top: 25px;
    text-align: left;
}

.book-details h4 {
    color: var(--crema-montaña);
    margin-bottom: 15px;
    font-size: 1.2rem;
}

.book-details p {
    margin: 8px 0;
    font-weight: 500;
}

/* ===========================
   UTILIDADES GENERALES
   =========================== */

/* Botones generales */
.btn-back {
    display: inline-block;
    color: var(--verde-pirineo);
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    background: var(--crema-montaña);
    border-radius: 8px;
    border: 2px solid var(--verde-sage);
    transition: all 0.3s ease;
    margin-bottom: 20px;
}

.btn-back:hover {
    background: var(--verde-sage);
    color: var(--blanco-nieve);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px var(--sombra-suave);
}

/* Efectos especiales */
.img-relieve {
    border-radius: 15px;
    box-shadow: 
        0 10px 30px rgba(0, 0, 0, 0.3),
        inset 2px 2px 5px rgba(255, 255, 255, 0.3),
        inset -2px -2px 5px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    cursor: pointer;
}

.img-relieve:hover {
    transform: scale(1.05) rotateY(5deg);
    box-shadow: 
        0 20px 50px rgba(0, 0, 0, 0.4),
        inset 3px 3px 8px rgba(255, 255, 255, 0.4),
        inset -3px -3px 8px rgba(0, 0, 0, 0.2);
}

/* Carrusel */
.carousel-container {
    position: relative;
    margin: 30px 0;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 12px 40px var(--sombra-suave);
}

.carousel-wrapper {
    width: 100%;
    height: 300px;
    overflow: hidden;
    position: relative;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.9);
    transition: filter 0.3s ease;
}

/* Estados especiales */
.highlight {
    background: linear-gradient(135deg, var(--verde-sage) 0%, var(--verde-musgo) 100%);
    color: var(--verde-pirineo-oscuro);
    padding: 20px;
    border-radius: 10px;
    margin: 20px 0;
    border-left: 5px solid var(--verde-pirineo);
    box-shadow: 0 6px 20px var(--sombra-suave);
    font-weight: 600;
    position: relative;
}

/* ===========================
   ANIMACIONES
   =========================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Delays para animaciones escalonadas */
.card:nth-child(1), .section:nth-child(1) { --delay: 0.1s; --index: 1; }
.card:nth-child(2), .section:nth-child(2) { --delay: 0.2s; --index: 2; }
.card:nth-child(3), .section:nth-child(3) { --delay: 0.3s; --index: 3; }
.card:nth-child(4), .section:nth-child(4) { --delay: 0.4s; --index: 4; }
.card:nth-child(5), .section:nth-child(5) { --delay: 0.5s; --index: 5; }
.card:nth-child(6), .section:nth-child(6) { --delay: 0.6s; --index: 6; }

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    /* Frame container */
    .frame-container {
        flex-direction: column;
    }

    .menu-frame {
        height: 200px;
        order: 1;
    }

    .content-frame {
        order: 2;
        height: calc(100vh - 200px);
    }

    /* Main grid responsive */
    .main-grid {
        grid-template-columns: 1fr; /* Una sola columna en móvil */
        gap: 20px;
        margin: 0 10px 20px;
        max-width: none;
    }

    /* Nuevo layout responsive */
    .contenido-principal-con-sidebar {
        grid-template-columns: 1fr; /* Una sola columna en móvil */
        gap: 20px;
    }


    
    .sidebar-derecha-compacta {
        min-width: auto;
        order: 2; /* Sidebar después del contenido principal */
    }
    

   .contenido-principal {
        order: 1; /* Contenido principal (texto + noticias) primero */
    }

    .texto-principal-amplio {
        order: 1; /* Contenido principal primero */
    }

    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .header-main h1 {
        font-size: 1.8rem;
    }

    .title-with-bg {
        font-size: 1.8rem;
        padding: 15px 20px;
    }

    .weather-widget {
        text-align: center;
    }

    .gallery-frame {
        height: 250px; /* Reducido de 280px para móvil */
    }

    .webcam-image {
        max-width: 95%;
    }

    .carousel-wrapper {
        height: 200px; /* Reducido de 250px para móvil */
    }

    /* Menu items en móvil */
    .menu-item {
        padding: 12px 15px;
        font-size: 0.9rem;
    }

    .logo-section {
        padding: 20px 15px;
    }

    .logo-section img {
        max-width: 80px;
    }

    .logo-section h2 {
        font-size: 1.1rem;
    }

    /* Cards en móvil */
    .card {
        padding: 20px;
    }

    .card h3 {
        font-size: 1.2rem;
    }

    /* Body con espacio ajustado para la barra más grande */
    body.main-body {
        padding-bottom: 20px; /* Reducido significativamente ya que no hay barra fija */
    }
}

/* Botones de navegación para carruseles */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 16px;
    font-weight: normal;
    cursor: pointer;
    z-index: 10;
    transition: all 0.4s ease;
    backdrop-filter: blur(8px);
    opacity: 0.6;
}

.carousel-btn:hover {
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 0.95);
    transform: translateY(-50%) scale(1.05);
    opacity: 1;
}

.carousel-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.carousel-btn.btn-prev {
    left: 20px;
}

.carousel-btn.btn-next {
    right: 20px;
}

/* Indicadores para carruseles */
.carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 10;
}

.carousel-indicators .indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.carousel-indicators .indicator.active {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.3);
}

.carousel-indicators .indicator:hover {
    background: rgba(255, 255, 255, 0.6);
}

/* Contador de fotos para carruseles */
.photo-counter {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.2);
    color: rgba(255, 255, 255, 0.8);
    padding: 6px 10px;
    border-radius: 15px;
    font-size: 12px;
    backdrop-filter: blur(8px);
    opacity: 0.7;
    transition: opacity 0.3s ease;
    z-index: 10;
}

.photo-counter:hover {
    opacity: 1;
}

/* Carrusel de galería específico */
.carousel-wrapper-galeria {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
}

.carousel-slide-galeria {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-slide-galeria img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    filter: grayscale(80%) contrast(110%) brightness(90%);
    transition: filter 0.8s ease, transform 0.3s ease;
}

.carousel-slide-galeria:hover img {
    filter: grayscale(0%) saturate(120%) contrast(120%) brightness(110%);
    transform: scale(1.02);
}

/* Carrusel de paisajes específico */
.carousel-wrapper-paisajes {
    display: flex;
    transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    height: 100%;
}

.carousel-slide-paisajes {
    min-width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.carousel-slide-paisajes img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 15px;
    filter: grayscale(80%) contrast(110%) brightness(90%);
    transition: filter 0.8s ease, transform 0.3s ease;
}

.carousel-slide-paisajes:hover img {
    filter: grayscale(0%) saturate(120%) contrast(120%) brightness(110%);
    transform: scale(1.02);
}

/* ===== ESTADOS DE CARGA Y ERROR PARA CARRUSELES ===== */

/* Animación de spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos para estado de carga */
.loading-state-galeria,
.loading-state-paisajes {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    background: linear-gradient(135deg, rgba(74, 103, 65, 0.8) 0%, rgba(93, 109, 126, 0.8) 100%);
    color: white;
    text-align: center;
    padding: 20px;
    border-radius: 15px;
    backdrop-filter: blur(10px);
}

.loading-state-galeria div,
.loading-state-paisajes div {
    max-width: 300px;
}

.loading-state-galeria h4,
.loading-state-paisajes h4 {
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 600;
}

.loading-state-galeria p,
.loading-state-paisajes p {
    margin: 0;
    opacity: 0.9;
}

/* Spinner personalizado */
.loading-state-galeria .spinner,
.loading-state-paisajes .spinner {
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    border-top: 2px solid rgba(255, 255, 255, 0.8);
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    margin: 0 auto 12px;
}

/* Grid de webcams */
.webcam-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 20px 0;
}

.webcam-item {
    text-align: center;
}

.webcam-item h4 {
    color: var(--verde-pirineo-oscuro);
    margin-bottom: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

.webcam-item p {
    font-size: 0.9rem;
    color: var(--gris-roca);
    margin-top: 8px;
    font-style: italic;
}

/* Responsive para webcams */
@media (max-width: 768px) {
    .webcam-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .webcam-item h4 {
        font-size: 1rem;
    }
    
    .webcam-image {
        max-width: 100%;
    }
}

/* Grid de webcams que ocupa todo el ancho */
.webcam-grid-full {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin: 25px 0;
    width: 100%;
    padding: 0;
}

/* Webcams de ancho completo - rompe los límites del contenedor */
.webcam-full-width {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 35px; /* Aumentado de 30px a 35px */
    margin: 40px auto;
    width: 85%; /* Aumentado de 75% a 85% */
    max-width: 1400px; /* Aumentado de 1200px a 1400px */
    position: relative;
    background: linear-gradient(135deg, var(--verde-pirineo) 0%, var(--verde-sage) 100%);
    padding: 35px; /* Aumentado de 30px a 35px */
    border-radius: 20px;
    box-shadow: 0 12px 40px var(--sombra-suave);
}

.webcam-full-width .webcam-item {
    text-align: center;
    padding: 0 10px; /* Aumentado de 8px a 10px */
}

.webcam-full-width .webcam-item h4 {
    color: var(--blanco-nieve);
    margin-bottom: 18px; /* Aumentado de 15px a 18px */
    font-size: 1.4rem; /* Aumentado de 1.3rem a 1.4rem */
    font-weight: 600;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
}

.webcam-image-full {
    width: 100%;
    height: auto;
    max-height: 400px; /* Aumentado de 350px a 400px */
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 8px 25px var(--sombra-suave);
    transition: all 0.3s ease;
    border: 3px solid var(--verde-sage);
    background: var(--blanco-nieve);
}

.webcam-image-full:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 35px var(--sombra-suave);
    border-color: var(--verde-pirineo-claro);
}

/* Responsive para webcams de ancho completo */
@media (max-width: 768px) {
    .webcam-grid-full {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 20px 0;
    }
    
    .webcam-full-width {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 0;
    }
    
    .webcam-image-full {
        max-height: 250px;
    }
}



/* ===========================
   RESPONSIVE DESIGN MEJORADO
   =========================== */



/* Orientación landscape en móviles */
@media (max-width: 767px) and (orientation: landscape) {
    .frame-container {
        flex-direction: row;
        height: 100vh;
    }

    .menu-frame {
        width: 250px;
        height: 100vh;
        position: static;
        order: 1;
    }

    .content-frame {
        order: 2;
        height: 100vh;
        overflow-y: auto;
    }

    .menu-container {
        height: 100vh;
        overflow-y: auto;
    }

    .logo-section {
        padding: 10px;
        flex-direction: column;
    }

    .menu-section {
        display: flex;
        flex-direction: column;
        gap: 5px;
        padding: 0 10px;
    }

    .menu-item {
        padding: 8px 10px;
        font-size: 0.8rem;
    }

    .main-grid {
        padding: 10px;
    }

    .header-main h1 {
        font-size: 1.5rem;
    }
}


/* Mejoras para pantallas de alta densidad */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo-section img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }

    .webcam-image img,
    .interactive-image img,
    .gallery-frame img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}



/* Reduced motion para usuarios que prefieren menos animaciones */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .carousel-wrapper {
        scroll-behavior: auto;
    }
}

/* ===========================
   MEJORAS ESPECÍFICAS DE ACCESIBILIDAD
   =========================== */

/* Focus mejorado para navegación por teclado */
.menu-item:focus,
.btn:focus,
.carousel-btn:focus {
    outline: 3px solid var(--verde-pirineo-claro);
    outline-offset: 2px;
}

/* Texto más legible en pantallas pequeñas */
@media (max-width: 480px) {
    body {
        line-height: 1.7;
    }
    
    p, li {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Mejor contraste para enlaces */
a {
    color: var(--verde-pirineo);
    text-decoration: underline;
}

a:hover, a:focus {
    color: var(--verde-pirineo-oscuro);
    text-decoration: none;
}

/* Mejoras para el carousel en móviles */
@media (max-width: 767px) {
    .carousel-wrapper {
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }
    
    .carousel-slide {
        scroll-snap-align: start;
    }
}

/* Contenedor responsive para iframes */
.iframe-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    overflow: hidden;
}

.iframe-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Fix para imágenes en Safari iOS */
@supports (-webkit-appearance: none) {
    .webcam-image img,
    .interactive-image img {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
    }
}

/* ===========================
   RESPONSIVE TYPOGRAPHY
   =========================== */

/* Escalado de tipografía fluido */
@media (min-width: 320px) and (max-width: 1200px) {
    .header-main h1 {
        font-size: calc(1.2rem + 2vw);
    }
    
    .title-with-bg {
        font-size: calc(1rem + 1.5vw);
    }
    
    .card h3 {
        font-size: calc(0.9rem + 0.5vw);
    }
}

/* ===========================
   UTILIDADES MÓVILES ADICIONALES
   =========================== */

/* Ocultadores para diferentes tamaños */
.hidden-xs { display: block !important; }
.hidden-sm { display: block !important; }
.hidden-md { display: block !important; }
.hidden-lg { display: block !important; }

@media (max-width: 575px) {
    .hidden-xs { display: none !important; }
}

@media (max-width: 767px) {
    .hidden-sm { display: none !important; }
}

@media (max-width: 991px) {
    .hidden-md { display: none !important; }
}

@media (max-width: 1199px) {
    .hidden-lg { display: none !important; }
}

/* Mostradores para diferentes tamaños */
.visible-xs { display: none !important; }
.visible-sm { display: none !important; }
.visible-md { display: none !important; }
.visible-lg { display: none !important; }

@media (max-width: 575px) {
    .visible-xs { display: block !important; }
}

@media (max-width: 767px) {
    .visible-sm { display: block !important; }
}

@media (max-width: 991px) {
    .visible-md { display: block !important; }
}

@media (max-width: 1199px) {
    .visible-lg { display: block !important; }
}

/* Espaciado responsive */
@media (max-width: 767px) {
    .mb-xs-2 { margin-bottom: 0.5rem !important; }
    .mb-xs-3 { margin-bottom: 1rem !important; }
    .mt-xs-2 { margin-top: 0.5rem !important; }
    .mt-xs-3 { margin-top: 1rem !important; }
    .p-xs-2 { padding: 0.5rem !important; }
    .p-xs-3 { padding: 1rem !important; }
} 

/* Contenido principal que contiene texto + noticias */
.contenido-principal {
    display: flex;
    flex-direction: column;
    gap: 5px;
    width: 100%;
   
}

/* Texto principal - ocupa la mayor parte del ancho */
.texto-principal-amplio {
    width: 100%;
    height: 10%;
    
}

/* Noticias debajo del texto con el mismo ancho */
.noticias-debajo-texto {
    width: 100%;
    margin-top: 5px;
}

/* Modificar el footer para que se ajuste correctamente */
.footer {
  background: linear-gradient(135deg, var(--verde-pirineo-oscuro) 0%, var(--verde-pirineo) 100%);
  color: var(--blanco-nieve);
  text-align: center;
  padding: 15px;
  margin-top: 40px;
  margin-bottom: 0; /* Eliminado el margin-bottom de 75px */
  border-radius: 15px;
  position: relative;
}

/* Ajustar el body para que no tenga padding-bottom innecesario */
body.main-body {
  font-family: "Segoe UI", "Verdana", sans-serif;
  background: linear-gradient(135deg, var(--crema-montaña) 0%, var(--beige-piedra) 100%);
  color: var(--verde-pirineo-oscuro);
  line-height: 1.7;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  padding-bottom: 0; /* Eliminado el padding-bottom */
  display: flex;
  flex-direction: column;
}

/* Hacer que el contenedor principal ocupe todo el espacio disponible */
.container {
  position: relative;
  max-width: 2200px;
  margin: 0 auto;
  padding: 20px;
  background: linear-gradient(135deg, var(--crema-montaña) 0%, var(--beige-piedra) 100%);
  border-radius: 15px;
  margin-bottom: 0; /* Eliminado el margin-bottom */
  flex: 1; /* Hacer que el contenedor ocupe todo el espacio disponible */
  display: flex;
  flex-direction: column;
}

/* Asegurar que el contenido principal ocupe el espacio disponible */
.main-grid {
  flex: 1;
}

/* Ajustar el iframe para evitar scroll innecesario */
iframe {
  width: 100%;
  height: 100%;
  border: none;
  overflow: auto; /* Cambiado de hidden a auto para permitir scroll solo cuando sea necesario */
}

/* Ajustar el frame-container para dispositivos móviles */
@media (max-width: 768px) {
  .frame-container {
    height: auto !important;
    min-height: 100vh !important;
  }

  .content-frame {
    height: auto !important;
    min-height: 70vh !important;
  }

  .footer {
    margin-bottom: 0;
  }
}





















