/* modern-main.css */

/* Variables globales */
:root {
    --primary-color: #2563eb;
    --secondary-color: #050380;
    --accent-color: #60a5fa;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --transition: all 0.3s ease;
}

/* Estilos base */
html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header y Navegación */
.nav-link {
    position: relative;
    padding: 0.5rem;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #3182ce;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: #3182ce;
    transition: all 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
    left: 0;
}

/* Estilos para hero section */
.hero-section {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* Asegurarse de que la capa de opacidad cubra todo el fondo */
.hero-section .absolute {
    z-index: 1; /* Asegura que la capa de opacidad esté por encima del fondo pero debajo del contenido */
}

/* Asegurarse de que el contenido esté por encima de la capa de opacidad */
.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Ajustes para dispositivos móviles */
@media (max-width: 768px) {
    .hero-section {
        background-attachment: scroll;
    }
}

/* Estilos específicos para iOS */
.ios-hero {
    background-attachment: scroll !important; /* Desactivar parallax en iOS */
    background-position: center center;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    transition: var(--transition);
    display: inline-block;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    transform: translateY(-2px);
}

/* Secciones */
.section-title {
    font-size: 2.5rem;
    font-weight: bold;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text-dark);
}

/* Tarjetas de servicios */
.service-card {
    background-color: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.2);
    transition: var(--transition);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
}

/* Estilos base de la galería */
.grid-gallery {
    display: grid;
    gap: 1rem;
    padding: 1rem;
    width: 100%;
}

@media (min-width: 1024px) {
    .nav-link {
        padding: 0.5rem 1rem;
    }
}

@media (min-width: 1280px) {
    .nav-link {
        padding: 0.5rem 1.25rem;
    }
}

/* Diseño responsive */
@media (min-width: 768px) {
    .nav-link {
        padding: 0.5rem 0.75rem;
    }
    .grid-gallery {
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        padding: 1rem;
    }
}

@media (min-width: 640px) and (max-width: 767px) {
    .grid-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }
}

@media (max-width: 639px) {
    .grid-gallery {
        grid-template-columns: 1fr;  /* Una sola columna */
        max-width: 90%;  /* Ancho máximo del 90% del contenedor */
        margin: 0 auto;  /* Centrado horizontal */
        gap: 0.5rem;    /* Espacio entre elementos */
        padding: 0.5rem;
    }

    .grid-gallery-item {
        margin-bottom: 0.5rem;
        width: 100%;    /* Ancho completo */
    }

    .grid-gallery-item img {
        width: 100%;
        height: auto;
        margin: 0 auto; /* Centrar imagen */
    }
}

.grid-gallery-item {
    break-inside: avoid;
    margin-bottom: 0.5rem;
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.grid-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.grid-gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.grid-gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.grid-gallery-item:hover .grid-gallery-caption {
    opacity: 1;
}

/* Estilos para el lightbox */
.pswp__caption__center {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
    font-size: 16px;
    padding: 15px;
    color: white;
}

/* Calendario */
.caja_calendario {
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

.caja_calendario h3 {
    color: var(--text-dark);
    font-size: 24px;
    font-weight: bold;
    text-shadow: none;
    margin-bottom: 15px;
}

.caja_calendario h5 {
    color: var(--text-dark);
    font-size: 16px;
    text-shadow: none;
    margin-bottom: 20px;
}

.swiper-slide:hover {
    transform: translateY(-10px);
}

.swiper-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 1rem;
}

.swiper-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    font-size: 0.9rem;
}

.swiper-button-next,
.swiper-button-prev {
    color: var(--primary-color);
    background: rgba(255, 255, 255, 0.8);
    padding: 30px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.swiper-button-next:hover,
.swiper-button-prev:hover {
    background: white;
    transform: scale(1.1);
}

.swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: var(--primary-color);
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}

@media (max-width: 768px) {
    .swiper {
        height: 400px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        padding: 20px;
    }
}

/* Tarjetas de lugares */
.place-card {
    transition: var(--transition);
}

.place-card:hover {
    transform: translateY(-10px);
}

.place-card img {
    transition: var(--transition);
}

.place-card:hover img {
    transform: scale(1.05);
}

/* Calendario */
.caja_calendario {
    max-width: 1000px;
    margin: 0 auto;
}

/* Footer */
footer a {
    transition: var(--transition);
}

footer a:hover {
    color: var(--accent-color);
}

/* Animaciones */
[data-aos] {
    opacity: 0;
    transition-duration: 1s;
    transition-property: opacity, transform;
}

[data-aos].aos-animate {
    opacity: 1;
}

/* Estilos para el mapa */
.map-container {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;  /* Aumentado el ancho máximo */
    margin: 0 auto;     /* Centrado horizontal */
    padding: 20px;
}

.map-container iframe {
    width: 100%;        /* Ocupa todo el ancho disponible */
    height: 600px;      /* Altura aumentada */
    border: 0;
    border-radius: 20px;
    box-shadow: 0 10px 15px rgba(0, 0, 0, 0.1);
}

/* Estilos del menú móvil */
.mobile-menu {
    display: none;  /* Oculto por defecto */
    position: fixed;
    top: 70px; /* Alineado con el header */
    left: 0;
    width: 100%; /* Ancho completo en móvil */
    height: auto; /* Altura automática basada en el contenido */
    max-height: 80vh; /* Altura máxima para evitar scroll excesivo */
    background-color: white;
    padding: 0;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 40;
    overflow-y: auto; /* Permite scroll si hay muchos elementos */
}

.mobile-menu.active {
    display: block; /* Simplemente mostramos el menú */
}

.mobile-menu a {
    display: block;
    padding: 15px;
    color: var(--text-dark);
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

.mobile-menu a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

.hamburger-button, 
#menu-toggle {
    padding: 8px;
    border-radius: 4px;
    transition: all 0.3s ease;
    display: none; /* Oculto por defecto, visible en móvil */
    background: transparent;
    border: none;
    cursor: pointer;
}

.hamburger-button:hover,
#menu-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Asegurar que el SVG dentro del botón sea visible */
.hamburger-button svg,
#menu-toggle svg {
    width: 24px;
    height: 24px;
    color: var(--text-dark);
    stroke: currentColor;
}

/* Overlay para cuando el menú está abierto */
.menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 30;
}

.menu-overlay.active {
    display: block;
}

/* Compatibilidad con el ID mobileMenu específico del HTML */
#mobileMenu {
    display: none;
    position: fixed;
    top: 70px;
    left: 0;
    width: 100%;
    background-color: white;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 40;
    padding: 0;
}

#mobileMenu.active {
    display: block;
}

#mobileMenu a {
    display: block;
    padding: 12px 15px;
    color: var(--text-dark);
    border-bottom: 1px solid #eee;
    transition: all 0.3s ease;
}

#mobileMenu a:hover {
    background-color: #f8f9fa;
    color: var(--primary-color);
}

/* Mostrar/ocultar elementos basado en tamaño de pantalla */
@media (min-width: 768px) {
    .mobile-menu, 
    .hamburger-button, 
    .menu-overlay,
    .mobile-menu-btn,
    #menu-toggle,
    #mobileMenu {
        display: none !important; /* Siempre ocultos en pantallas grandes */
    }
}

/* Responsive */
@media (max-width: 768px) {
    /* Header móvil */
    .hamburger-button,
    .mobile-menu-btn {
        display: block !important; /* Visible solo en móvil */
    }

    .mobile-menu {
        width: 100%; /* Ancho completo en móvil */
        font-size: 1rem; /* Tamaño legible */
        background-color: white; /* Asegurar fondo visible */
    }

    .mobile-menu a {
        padding: 0.8rem 1rem;
    }

    .mobile-menu a:last-child {
        border-bottom: none;
    }
    
    .hero-section {
        padding-top: 80px; /* Espacio para el header */
    }

    .section-title {
        font-size: 2rem;
    }

    .swiper {
        height: 300px;
    }

    .nav-link {
        border-bottom: 2px solid transparent;
        color: #6b7280;
        font-weight: 500;
    }
    
    .nav-link:hover {
        color: #4b5563;
        border-color: #9ca3af;
    }
    
    .nav-link.active {
        color: #3b82f6;
        border-color: #3b82f6;
    }
    
    .tab-content > .tab-pane {
        display: none;
    }
    
    .tab-content > .active {
        display: block;
    }
    
    /* Ajuste para el mapa en móvil */
    .map-container iframe {
        height: 400px;
    }
}

/* Estilos de botones modales */
.modal-footer .btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.25rem;
}

.modal-footer .btn-primary {
    color: #fff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.modal-footer .btn-secondary {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.modal-footer .btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.modal-footer .btn-secondary:hover {
    background-color: #5a6268;
    border-color: #545b62;
}

/* Estilos para los enlaces del menú */
.nav-link {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem;
    color: #4a5568;
    transition: color 0.2s;
}

.nav-link:hover {
    color: #2d3748;
}

.nav-link svg {
    width: 1.25rem;
    height: 1.25rem;
    margin-right: 0.5rem;
}

/* CORRECCIONES PARA EL CALENDARIO */
.fc-unthemed th, 
.fc-unthemed td, 
.fc-unthemed thead, 
.fc-unthemed tbody, 
.fc-unthemed .fc-divider, 
.fc-unthemed .fc-row, 
.fc-unthemed .fc-content, 
.fc-unthemed .fc-popover, 
.fc-unthemed .fc-list-view, 
.fc-unthemed .fc-list-heading td {
    border-color: #000000 !important; /* Líneas en negro para máxima visibilidad */
}

.fc-day {
    border: 1px solid #000000 !important; /* Bordes de las celdas en negro */
}

.fc th, .fc td {
    border-style: solid !important;
    border-width: 1px !important;
    border-color: #000000 !important;
}