/* =========================================
   VARIABLES Y RESET
   ========================================= */

:root {
    /* Colores principales */
    --color-primary: #0F1E2E;
    --color-secondary: #7B2E2E;
    --color-accent: #C8A951;
    --color-light: #F4F4F4;
    --color-white: #FFFFFF;
    --color-text: #333333;
    --color-text-light: #666666;

    /* Tipografías */
    --font-serif: 'Merriweather', serif;
    --font-sans: 'Open Sans', sans-serif;

    /* Espaciado */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Transiciones */
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-white);
    overflow-x: hidden;
}

body.modal-open {
    overflow: hidden;
}

/* =========================================
   UTILIDADES
   ========================================= */

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

.text-center {
    text-align: center;
}

.text-large {
    font-size: 1.2rem;
}

.text-muted {
    color: var(--color-text-light);
}

.mt-2 {
    margin-top: var(--spacing-md);
}

.mt-3 {
    margin-top: var(--spacing-lg);
}

/* =========================================
   NAVEGACIÓN
   ========================================= */

.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    max-width: 100vw;
    background-color: var(--color-white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: var(--transition);
    overflow-x: hidden;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-brand a {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-decoration: none;
}

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

.brand-text {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-primary);
    transition: var(--transition);
}

.nav-brand a:hover .brand-text {
    color: var(--color-accent);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    margin: 0;
}

.nav-link {
    text-decoration: none;
    color: var(--color-text);
    font-weight: 600;
    padding: 0.5rem 1rem;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--color-accent);
    transition: var(--transition);
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 0.3rem;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--color-primary);
    transition: var(--transition);
}

/* =========================================
   HERO SECTION
   ========================================= */

.hero {
    position: relative;
    height: 100vh;
    background-image: url('../images/hero-background.jpg');
    background-size: cover;
    background-position: center 60%;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 30, 46, 0.85) 0%, rgba(123, 46, 46, 0.75) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: var(--color-white);
    animation: fadeInUp 1s ease;
}

.hero-logo {
    width: auto;
    height: 120px;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: var(--spacing-md);
    animation: fadeIn 1.5s ease;
}

.hero-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: var(--spacing-sm);
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: var(--spacing-lg);
    font-style: italic;
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: var(--color-white);
    font-size: 2rem;
    animation: bounce 2s infinite;
}

/* =========================================
   BOTONES
   ========================================= */

.btn {
    display: inline-block;
    padding: 1rem 2rem;
    font-family: var(--font-sans);
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 4px;
    transition: var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
}

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

.btn-primary:hover {
    background-color: transparent;
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--color-white);
    color: var(--color-white);
}

.btn-secondary:hover {
    background-color: var(--color-white);
    color: var(--color-primary);
}

/* =========================================
   SECCIONES
   ========================================= */

.section {
    padding: var(--spacing-xl) 0;
}

.section-light {
    background-color: var(--color-light);
}

.section-dark {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.section-confession {
    background-color: var(--color-white);
}

.section-header {
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.section-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.title-divider {
    width: 80px;
    height: 4px;
    background-color: var(--color-accent);
    margin: 0 auto;
}

.content-box {
    max-width: 800px;
    margin: 0 auto;
    padding: var(--spacing-md);
}

/* =========================================
   BELIEFS GRID
   ========================================= */

.beliefs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.belief-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: var(--spacing-md);
    border-radius: 8px;
    text-align: center;
    transition: var(--transition);
}

.belief-card:hover {
    background-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-5px);
}

.belief-icon {
    font-size: 3rem;
    color: var(--color-accent);
    margin-bottom: var(--spacing-sm);
}

.belief-card h3 {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    margin-bottom: var(--spacing-sm);
}

/* =========================================
   IGLESIAS
   ========================================= */

.churches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-xl);
}

.church-card {
    background-color: var(--color-white);
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: var(--transition);
}

.church-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-5px);
}

.church-header {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-md);
}

.church-name {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.church-location {
    font-size: 0.9rem;
    opacity: 0.9;
}

.church-body {
    padding: var(--spacing-md);
}

.church-section {
    margin-bottom: var(--spacing-sm);
}

.church-section-title {
    font-weight: 700;
    color: var(--color-accent);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.pastor-info, .deacon-info {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
}

.schedule {
    list-style: none;
}

.schedule li {
    padding: 0.3rem 0;
}

.social-links {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.social-btn {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.85rem;
    transition: var(--transition);
}

.social-btn:hover {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

/* =========================================
   PESTAÑAS DE IGLESIAS
   ========================================= */

.churches-tabs {
    margin-bottom: var(--spacing-lg);
}

.tabs-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    background-color: var(--color-light);
    padding: 0.75rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.tab-button {
    flex: 1 1 calc(33.333% - 0.3rem);
    min-width: 250px;
    padding: 0.65rem 1rem;
    background-color: var(--color-white);
    border: 2px solid transparent;
    border-radius: 6px;
    font-family: var(--font-sans);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    line-height: 1.3;
}

.tab-button:hover {
    background-color: var(--color-light);
    border-color: var(--color-accent);
    transform: translateY(-2px);
}

.tab-button.active {
    background-color: var(--color-primary);
    color: var(--color-white);
    border-color: var(--color-primary);
}

.tab-button i {
    font-size: 1rem;
    color: var(--color-accent);
    flex-shrink: 0;
}

.tab-button.active i {
    color: var(--color-white);
}

.tab-button span {
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* =========================================
   DETALLE DE IGLESIA
   ========================================= */

.church-detail-wrapper {
    margin-top: 1rem;
}

.church-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.church-detail-left,
.church-detail-right {
    background-color: var(--color-white);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.church-detail-map-section {
    background-color: var(--color-white);
    border-radius: 8px;
    padding: 1.25rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.church-detail-map-section h4 {
    font-family: var(--font-serif);
    font-size: 1.2rem;
    color: var(--color-secondary);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.church-detail-map-section h4 i {
    color: var(--color-accent);
    font-size: 1.1rem;
}

.select-church-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    min-height: 500px;
    color: var(--color-text-light);
    text-align: center;
}

.select-church-message i {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: var(--color-accent);
    opacity: 0.3;
}

.select-church-message p {
    font-size: 1.1rem;
}

/* Estilos para la información de la iglesia */
.church-detail-header {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--color-accent);
}

.church-detail-name {
    font-family: var(--font-serif);
    font-size: 1.6rem;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.church-detail-location {
    font-size: 0.95rem;
    color: var(--color-text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.church-detail-location i {
    color: var(--color-accent);
}

/* Fotografía de la iglesia */
.church-photo {
    margin: 0.75rem 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

.church-photo img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    max-height: 250px;
}

.church-detail-section {
    margin-bottom: 1rem;
}

.church-detail-section h4 {
    font-family: var(--font-serif);
    font-size: 1.1rem;
    color: var(--color-secondary);
    margin-bottom: 0.65rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.church-detail-section h4 i {
    color: var(--color-accent);
    font-size: 1rem;
}

.church-detail-section ul {
    list-style: none;
    padding: 0;
}

.church-detail-section ul li {
    padding: 0.35rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.church-detail-section ul li i {
    color: var(--color-accent);
    width: 20px;
}

.church-detail-section .person-info {
    margin-bottom: 0.65rem;
    padding: 0.65rem;
    background-color: var(--color-light);
    border-radius: 6px;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.church-detail-section .person-info p {
    margin: 0;
    color: var(--color-text);
    line-height: 1.5;
    font-size: 0.9rem;
}

.church-detail-section .person-info strong {
    color: var(--color-primary);
    display: block;
    margin-bottom: 0.2rem;
}

.person-photo {
    flex-shrink: 0;
    width: 55px;
    height: 55px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.person-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.person-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.person-text {
    flex: 1;
}

.church-detail-section .person-info small {
    color: var(--color-text-light);
    display: block;
    line-height: 1.4;
}

.church-detail-social {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.church-detail-social a {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background-color: var(--color-primary);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.church-detail-social a:hover {
    background-color: var(--color-accent);
    color: var(--color-primary);
}

/* =========================================
   MAPA
   ========================================= */

.map-container {
    border-radius: 8px;
    overflow: hidden;
    height: 450px;
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* =========================================
   CONFESIÓN
   ========================================= */

.confession-container {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: var(--spacing-md);
    margin-top: var(--spacing-lg);
}

.confession-sidebar {
    background-color: var(--color-light);
    padding: var(--spacing-sm);
    border-radius: 8px;
    height: fit-content;
    position: sticky;
    top: 100px;
}

.sidebar-title {
    font-family: var(--font-serif);
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.chapter-list {
    list-style: none;
}

.chapter-item {
    padding: 0.5rem 0.65rem;
    margin-bottom: 0.25rem;
    cursor: pointer;
    border-radius: 4px;
    transition: var(--transition);
    font-size: 0.9rem;
    line-height: 1.3;
}

.chapter-item:hover {
    background-color: rgba(15, 30, 46, 0.1);
}

.chapter-item.active {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.confession-content {
    background-color: var(--color-white);
    padding: var(--spacing-md);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.confession-text {
    font-family: var(--font-serif);
    line-height: 1.8;
}

.confession-text .chapter-title {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: var(--spacing-md);
    padding-bottom: var(--spacing-sm);
    border-bottom: 2px solid var(--color-accent);
}

.confession-text h3 {
    color: var(--color-primary);
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.confession-text p {
    margin-bottom: var(--spacing-sm);
    text-align: justify;
}

.confession-text p.references {
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-style: italic;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* =========================================
   FOOTER
   ========================================= */

.footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-lg) 0;
}

.footer-content {
    text-align: center;
}

.footer-social {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing-sm);
}

.social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--color-white);
    font-size: 1.2rem;
    transition: var(--transition);
}

.social-link:hover {
    background-color: var(--color-accent);
    color: var(--color-primary);
    transform: translateY(-3px);
}

.footer-text {
    margin-top: var(--spacing-sm);
    opacity: 0.9;
}

.scroll-top {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    background-color: var(--color-accent);
    color: var(--color-primary);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    margin-top: var(--spacing-sm);
    transition: var(--transition);
}

.scroll-top:hover {
    transform: translateY(-5px);
}

/* =========================================
   ANIMACIONES
   ========================================= */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}

/* =========================================
   MODAL DE FOTOGRAFÍA
   ========================================= */

.photo-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    animation: fadeIn 0.3s ease;
}

.photo-modal-content {
    max-width: 90%;
    max-height: 90%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.photo-modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 992px) {
    .confession-container {
        grid-template-columns: 1fr;
    }

    .confession-sidebar {
        position: static;
    }

    .confession-content {
        padding: var(--spacing-sm);
    }

    .church-detail-grid {
        grid-template-columns: 1fr;
    }

    .tab-button {
        min-width: 150px;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        right: -100%;
        width: 250px;
        height: calc(100vh - 70px);
        flex-direction: column;
        background-color: var(--color-white);
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
        padding: var(--spacing-md);
        transition: var(--transition);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translateY(10px);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translateY(-10px);
    }

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

    .hero-subtitle {
        font-size: 1.2rem;
    }

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

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

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

    .tabs-nav {
        flex-direction: column;
    }

    .tab-button {
        width: 100%;
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-logo {
        width: auto;
        height: 80px;
        max-width: 90%;
        object-fit: contain;
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .brand-text {
        font-size: 1.2rem;
    }

    .confession-content {
        padding: var(--spacing-xs) var(--spacing-sm);
    }

    .confession-sidebar {
        padding: var(--spacing-xs) var(--spacing-sm);
    }
}

/* =========================================
   PAGE HEADER (para páginas secundarias)
   ========================================= */

.page-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    color: var(--color-white);
    padding: 8rem 0 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><rect width="100" height="100" fill="%23ffffff" opacity="0.02"/></svg>');
    opacity: 0.05;
}

.page-title {
    font-family: var(--font-serif);
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.page-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

/* =========================================
   CONFESSION INTRO BOX
   ========================================= */

.confession-intro {
    padding: 2rem 0;
}

.intro-box {
    background: var(--color-white);
    border-left: 4px solid var(--color-accent);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.intro-box h2 {
    font-family: var(--font-serif);
    color: var(--color-primary);
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.intro-box p {
    margin-bottom: 1rem;
    line-height: 1.8;
    color: var(--color-text);
}

.intro-box p:last-child {
    margin-bottom: 0;
}

.intro-box .text-muted {
    color: var(--color-text-light);
    font-style: italic;
}

/* Responsive para page header */
@media (max-width: 768px) {
    .page-header {
        padding: 6rem 0 3rem 0;
    }

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

    .page-subtitle {
        font-size: 1rem;
    }
}

/* =========================================
   GALERÍA
   ========================================= */

.section-subtitle {
    text-align: center;
    color: var(--color-text-light);
    font-size: 1.1rem;
    margin-top: var(--spacing-sm);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.section-dark .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

/* Filtros de galería */
.gallery-filters {
    display: none;
}

.filter-btn {
    display: none;
}

/* Carrusel de galería */
.gallery-grid {
    position: relative;
    margin-top: 0;
    padding: var(--spacing-sm) 0;
}

.gallery-empty {
    text-align: center;
    padding: var(--spacing-xl) 0;
    color: rgba(255, 255, 255, 0.6);
}

.gallery-empty i {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    opacity: 0.5;
}

.gallery-empty p {
    font-size: 1.2rem;
}

/* Contenedor del carrusel */
.gallery-carousel {
    position: relative;
    width: 100%;
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1500px;
}

/* Track del carrusel */
.gallery-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
}

/* Items del carrusel */
.gallery-item {
    position: absolute;
    width: 500px;
    height: 280px;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

/* Imagen central (activa) */
.gallery-item.active {
    z-index: 3;
    transform: translateX(0) scale(1);
    opacity: 1;
    filter: brightness(1);
}

/* Imagen a la izquierda */
.gallery-item.prev {
    z-index: 2;
    transform: translateX(-70%) scale(0.8);
    opacity: 0.6;
    filter: brightness(0.7);
}

/* Imagen a la derecha */
.gallery-item.next {
    z-index: 2;
    transform: translateX(70%) scale(0.8);
    opacity: 0.6;
    filter: brightness(0.7);
}

/* Imágenes ocultas */
.gallery-item.hidden {
    z-index: 1;
    transform: translateX(0) scale(0.5);
    opacity: 0;
    pointer-events: none;
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* Overlay con información */
.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.6) 50%, transparent 100%);
    padding: var(--spacing-md);
    transform: translateY(0);
    transition: var(--transition);
}

.gallery-item:not(.active) .gallery-item-overlay {
    opacity: 0;
}

.gallery-item-title {
    display: none;
}

.gallery-item-description {
    display: none;
}

.gallery-item-category {
    position: absolute;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    background-color: var(--color-accent);
    color: var(--color-primary);
    padding: 0.25rem 0.6rem;
    border-radius: 15px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

/* Controles del carrusel */
.gallery-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 var(--spacing-md);
    pointer-events: none;
    z-index: 10;
}

.gallery-control {
    pointer-events: all;
    background-color: rgba(255, 255, 255, 0.2);
    color: var(--color-white);
    border: 2px solid rgba(255, 255, 255, 0.5);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.5rem;
    backdrop-filter: blur(10px);
}

.gallery-control:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-primary);
    transform: scale(1.1);
}

/* Indicadores */
.gallery-indicators {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: var(--spacing-sm);
}

.gallery-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
}

.gallery-indicator.active {
    background-color: var(--color-accent);
    transform: scale(1.3);
    border-color: var(--color-accent);
}

.gallery-indicator:hover {
    background-color: rgba(255, 255, 255, 0.6);
}

/* Modal de galería */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.gallery-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.modal-content {
    position: relative;
    width: 100%;
    height: 100%;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 80px;
}

.modal-image {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: var(--color-white);
    font-size: 3rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    transition: var(--transition);
}

.modal-close:hover {
    color: var(--color-accent);
    transform: rotate(90deg);
}

.modal-caption {
    display: none;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border: 2px solid var(--color-white);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.5rem;
}

.modal-nav:hover {
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    color: var(--color-primary);
}

.modal-prev {
    left: 20px;
}

.modal-next {
    right: 20px;
}

/* Responsive - Galería */
@media (max-width: 768px) {
    .gallery-carousel {
        height: 400px;
    }

    .gallery-item {
        width: 450px;
        height: 300px;
    }

    .gallery-control {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }

    .modal-close {
        font-size: 2rem;
        top: 10px;
        right: 20px;
    }

    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .modal-prev {
        left: 10px;
    }

    .modal-next {
        right: 10px;
    }

    .modal-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
        overflow: hidden;
    }

    .modal-image {
        max-width: 90vw;
        max-height: 80vh;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}

@media (max-width: 480px) {
    .gallery-carousel {
        height: 350px;
    }

    .gallery-item {
        width: 320px;
        height: 240px;
    }

    .gallery-item.prev,
    .gallery-item.next {
        transform: translateX(-80%) scale(0.7);
    }

    .gallery-item.next {
        transform: translateX(80%) scale(0.7);
    }

    .gallery-control {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }

    .gallery-filters {
        gap: 0.5rem;
    }

    .gallery-item-title {
        font-size: 1.1rem;
    }

    .modal-caption {
        font-size: 0.9rem;
        padding: 0.5rem 1rem;
    }

    .modal-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        padding: 0;
        margin: 0;
        box-sizing: border-box;
        overflow: hidden;
    }

    .modal-image {
        max-width: 95vw;
        max-height: 85vh;
        width: auto;
        height: auto;
        object-fit: contain;
    }

    .modal-close {
        font-size: 1.5rem;
        top: 5px;
        right: 10px;
    }

    .modal-nav {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .modal-prev {
        left: 5px;
    }

    .modal-next {
        right: 5px;
    }
}
