* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Clase para contenido visualmente oculto pero accesible para lectores de pantalla */
.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Skip link para accesibilidad - WCAG 2.1 AA */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: #2c5f8d;
    color: white;
    padding: 12px 20px;
    text-decoration: none;
    font-weight: 600;
    z-index: 10000;
    border-radius: 0 0 5px 0;
}

.skip-link:focus {
    top: 0;
    outline: 3px solid #4a89c3;
    outline-offset: 2px;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background: linear-gradient(135deg, #2c5f8d 0%, #4a89c3 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;
}

.header-logo-title {
    display: flex;
    align-items: center;
    gap: 20px;
}

header .logo {
    height: 60px;
    width: auto;
    filter: brightness(0) invert(1);
}

header h1 {
    font-size: 1.8em;
    font-weight: 600;
}

.main-nav {
    display: flex;
    gap: 25px;
    align-items: center;
}

.main-nav a {
    color: white;
    text-decoration: none;
    font-size: 1em;
    font-weight: 500;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background 0.3s ease, transform 0.2s ease;
    white-space: nowrap;
}

.main-nav a:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.main-nav a:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.hero-image {
    position: relative;
    width: 100%;
    height: 500px;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 20px;
}

.hero-overlay h2 {
    font-size: 3em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-overlay p {
    font-size: 1.5em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Info Principal */
.info-principal {
    padding: 60px 0;
    background: #f8f9fa;
}

.info-principal .container {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    align-items: start;
}

.descripcion h2 {
    color: #2c5f8d;
    font-size: 2.2em;
    margin-bottom: 20px;
}

.descripcion p {
    font-size: 1.1em;
    margin-bottom: 15px;
    line-height: 1.8;
}

.contacto-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contacto-card h3 {
    color: #2c5f8d;
    font-size: 1.5em;
    margin-bottom: 20px;
    text-align: center;
}

.contacto-item {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    align-items: start;
}

.contacto-item .icon {
    font-size: 1.8em;
}

.contacto-item strong {
    color: #2c5f8d;
    display: block;
    margin-bottom: 5px;
}

.contacto-item p {
    margin: 0;
    color: #555;
}

/* Horarios */
.horarios {
    padding: 60px 0;
    background: white;
}

.horarios h2 {
    color: #2c5f8d;
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 40px;
}

.horarios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.horario-card {
    background: linear-gradient(135deg, #4a89c3 0%, #2c5f8d 100%);
    color: white;
    padding: 40px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.horario-card h3 {
    font-size: 1.5em;
    margin-bottom: 20px;
}

.horario-tiempo {
    font-size: 1.2em;
    font-weight: 600;
    margin: 10px 0;
}

/* Servicios */
.servicios {
    padding: 60px 0;
    background: #f8f9fa;
}

.servicios h2 {
    color: #2c5f8d;
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 50px;
}

.servicios-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.servicio-card {
    background: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.servicio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.servicio-icon {
    font-size: 3em;
    display: block;
    margin-bottom: 15px;
}

.servicio-card h3 {
    color: #2c5f8d;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.servicio-card p {
    color: #666;
}

/* Actividades */
.actividades {
    padding: 60px 0;
    background: white;
}

.actividades h2 {
    color: #2c5f8d;
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 30px;
}

.actividades-intro {
    text-align: center;
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 40px;
    color: #555;
}

.recursos-list {
    max-width: 800px;
    margin: 0 auto;
}

.recurso-item {
    display: flex;
    gap: 15px;
    align-items: center;
    background: #f8f9fa;
    padding: 20px;
    margin-bottom: 15px;
    border-radius: 8px;
    border-left: 4px solid #4a89c3;
}

.recurso-item span {
    color: #4a89c3;
    font-size: 1.5em;
    font-weight: bold;
}

.recurso-item p {
    margin: 0;
    font-size: 1.1em;
    color: #333;
}

/* Contacto Section */
.contacto-section {
    padding: 60px 0;
    background: white;
}

.contacto-section h2 {
    color: #2c5f8d;
    font-size: 2.2em;
    text-align: center;
    margin-bottom: 50px;
}

.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.contacto-info-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contacto-item-main {
    display: flex;
    gap: 20px;
    align-items: start;
    background: #f8f9fa;
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid #4a89c3;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.icon-main {
    font-size: 2.5em;
    flex-shrink: 0;
}

.contacto-item-main h3 {
    color: #2c5f8d;
    font-size: 1.3em;
    margin-bottom: 10px;
}

.contacto-item-main p {
    margin: 0;
    color: #555;
    font-size: 1.1em;
    line-height: 1.6;
}

.mapa {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.ubicacion-destaca {
    background: linear-gradient(135deg, #4a89c3 0%, #2c5f8d 100%);
    color: white;
    padding: 30px;
    border-radius: 10px;
    text-align: center;
}

.ubicacion-destaca h3 {
    font-size: 1.5em;
    margin-bottom: 15px;
}

.ubicacion-destaca p {
    font-size: 1.1em;
    line-height: 1.8;
    margin: 0;
}

/* Footer */
footer {
    background: #2c5f8d;
    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 30px;
    align-items: center;
}

.footer-logo {
    text-align: center;
}

.footer-logo img {
    height: 60px;
    margin-bottom: 10px;
    filter: brightness(0) invert(1);
}

.footer-logo p {
    font-size: 1.1em;
    font-weight: 600;
}

.footer-contacto {
    text-align: center;
}

.footer-contacto p {
    margin: 5px 0;
    font-size: 1.05em;
}

.footer-gobierno {
    grid-column: 1 / -1;
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.2);
    margin-top: 20px;
}

.footer-gobierno img {
    height: auto;
    width: auto;
    max-width: 450px;
    max-height: 150px;
    object-fit: contain;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 20px;
    text-align: center;
}

.footer-links {
    margin-top: 10px;
    font-size: 0.95em;
}

.footer-links a {
    color: white;
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.footer-links a:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
    text-decoration: underline;
}

.footer-links a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

.footer-credits {
    margin-top: 15px;
    font-size: 0.95em;
    opacity: 0.9;
}

.footer-credits a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    transition: opacity 0.3s ease;
}

.footer-credits a:focus {
    outline: 3px solid #fff;
    outline-offset: 2px;
    text-decoration: underline;
}

.footer-credits a:hover {
    opacity: 0.8;
    text-decoration: underline;
}

/* Legal Pages Styles */
.legal-content {
    padding: 60px 0;
    background: #f8f9fa;
}

.legal-content .container {
    max-width: 900px;
}

.legal-content h1 {
    color: #2c5f8d;
    font-size: 2.5em;
    margin-bottom: 30px;
    text-align: center;
}

.legal-content h2 {
    color: #2c5f8d;
    font-size: 1.8em;
    margin-top: 40px;
    margin-bottom: 20px;
}

.legal-content h3 {
    color: #4a89c3;
    font-size: 1.3em;
    margin-top: 25px;
    margin-bottom: 15px;
}

.legal-content p {
    margin-bottom: 15px;
    line-height: 1.8;
    color: #333;
    font-size: 1.05em;
}

.legal-content ul {
    margin-bottom: 20px;
    padding-left: 30px;
}

.legal-content li {
    margin-bottom: 10px;
    line-height: 1.7;
    color: #555;
}

.legal-content strong {
    color: #2c5f8d;
}

.back-link {
    margin-top: 50px;
    text-align: center;
}

.back-link a {
    display: inline-block;
    padding: 12px 30px;
    background: #2c5f8d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
    font-weight: 600;
}

.back-link a:focus {
    outline: 3px solid #4a89c3;
    outline-offset: 2px;
}

.back-link a:hover {
    background: #4a89c3;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
    }

    .header-logo-title {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }

    header h1 {
        font-size: 1.3em;
    }

    header .logo {
        height: 50px;
    }

    .main-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .main-nav a {
        font-size: 0.9em;
        padding: 6px 12px;
    }

    .hero-overlay h2 {
        font-size: 2em;
    }

    .hero-overlay p {
        font-size: 1.2em;
    }

    .info-principal .container {
        grid-template-columns: 1fr;
    }

    .contacto-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-gobierno {
        padding-top: 15px;
        margin-top: 15px;
    }

    .footer-gobierno img {
        max-width: 300px;
        max-height: 120px;
    }

    .servicios-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

html {
    scroll-behavior: smooth;
}

/* Selector de Idioma - Sticky en parte inferior izquierda */
.language-selector {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    background: #ffffff;
    border: 2px solid #2c5f8d;
    border-radius: 10px;
    padding: 12px 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.language-selector:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.language-selector-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Estilos para el widget de Google Translate con accesibilidad mejorada */
#google_translate_element {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#google_translate_element select {
    background-color: #2c5f8d;
    color: #ffffff;
    border: 2px solid #2c5f8d;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    min-height: 44px;
    min-width: 44px;
}

#google_translate_element select:hover {
    background-color: #4a89c3;
    border-color: #4a89c3;
}

#google_translate_element select:focus {
    outline: 3px solid #4a89c3;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(74, 137, 195, 0.3);
}

/* Ocultar elementos innecesarios del widget de Google Translate */
.goog-te-banner-frame,
.goog-te-balloon-frame {
    display: none !important;
}

.goog-logo-link {
    display: none !important;
}

.goog-te-gadget {
    color: transparent !important;
    font-size: 0 !important;
}

.goog-te-gadget span {
    display: none !important;
}

.goog-te-combo {
    margin: 0 !important;
}

/* Prevenir que la barra de Google Translate mueva el body */
body {
    top: 0 !important;
    position: static !important;
}

/* Responsive para selector de idioma */
@media (max-width: 768px) {
    .language-selector {
        bottom: 15px;
        left: 15px;
        padding: 10px 12px;
    }

    #google_translate_element select {
        font-size: 13px;
        padding: 6px 10px;
    }
}