/**
 * Design System - Ruta de la Fe en Chía
 */

:root {
    --color-gold: #C9952A;
    --color-gold-light: #E8C97A;
    --color-parchment: #F5EDD6;
    --color-earth: #8B5E3C;
    --color-stone: #4A3728;
    --color-blue-faith: #2B5FA6;
    --color-green-hill: #5A8A3C;
    --color-cream: #FDF6E3;
    --color-text: #2C1A0E;

    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 8px rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 8px 16px rgba(0, 0, 0, 0.2);

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-pill: 9999px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-tap-highlight-color: transparent;
}

body {
    background-color: var(--color-parchment);
    color: var(--color-text);
    font-family: 'Lato', sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    position: relative;
    /* Parchment texture noise overlay could go here via pseudo-element */
}

/* Typography */
.font-cinzel {
    font-family: 'Cinzel Decorative', cursive;
}

.font-playfair {
    font-family: 'Playfair Display', serif;
}

.font-lato {
    font-family: 'Lato', sans-serif;
}

h1,
h2,
h3 {
    font-weight: 700;
}

.text-center {
    text-align: center;
}

/* Screens & Views */
.screen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100;
    background-color: var(--color-cream);
    overflow: hidden;
}

.screen.hidden,
.app-view.hidden,
.hidden {
    display: none !important;
}

.center-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem;
}

.app-view {
    height: calc(100%);
    /* minus bottom nav */
    padding-bottom: 60px;
    /* safe area */
    overflow-y: auto;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

/* Splash Screen */
#splash-screen {
    background: linear-gradient(to bottom, var(--color-parchment), var(--color-cream));
    z-index: 9999;
}

.splash-logo {
    margin-bottom: 3rem;
    animation: fadeIn 2s ease-in-out;
}

.decorative-title {
    font-size: 2.5rem;
    color: var(--color-stone);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.location-subtitle {
    font-size: 1.75rem;
    color: var(--color-earth);
    margin-bottom: 1rem;
    letter-spacing: 5px;
}

.separator-ornament {
    width: 80px;
    height: 3px;
    background-color: var(--color-gold);
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

.intro-text {
    font-size: 1.1rem;
    color: var(--color-text);
    opacity: 0.8;
}

.branding-footer {
    position: absolute;
    bottom: 2rem;
    width: 100%;
    text-align: center;
    font-size: 0.9rem;
    color: var(--color-stone);
    opacity: 0.8;
}

/* Buttons */
button {
    border: none;
    outline: none;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--color-blue-faith);
    color: white;
    padding: 1rem 2rem;
    border-radius: var(--radius-pill);
    font-size: 1.1rem;
    font-weight: 700;
    box-shadow: 0 4px 0 var(--color-stone);
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary:active {
    transform: translateY(4px);
    box-shadow: 0 0px 0 var(--color-stone);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-stone);
    border: 2px solid var(--color-stone);
    padding: 0.8rem 1.5rem;
    border-radius: var(--radius-pill);
    font-weight: 700;
}

.btn-fab {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--color-stone);
    z-index: 400;
}

.w-full {
    width: 100%;
    margin-bottom: 0.5rem;
}

/* Maps & Markers */
#map {
    width: 100%;
    height: 100vh;
    z-index: 10;
}

#view-map {
    padding-bottom: 0;
}

.map-controls {
    position: absolute;
    right: 15px;
    top: 80px;
    /* Below header */
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 400;
}

.custom-marker {
    background: none;
    border: none;
}

.marker-content {
    background: var(--color-gold);
    color: white;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    box-shadow: var(--shadow-md);
    border: 2px solid white;
    transition: transform 0.2s;
}

.marker-content:hover {
    transform: scale(1.1);
}

.marker-visited {
    background: var(--color-blue-faith);
}

/* Header */
.app-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: linear-gradient(135deg, #2C1A0E 0%, #4A3728 100%);
    z-index: 500;
    display: flex;
    align-items: center;
    padding: 0 20px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.4);
    border-bottom: 2px solid var(--color-gold);
}

.header-content {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-content h1 {
    font-size: 16px;
    color: var(--color-gold);
}

.progress-badge {
    background: var(--color-blue-faith);
    color: white;
    padding: 4px 10px;
    border-radius: var(--radius-pill);
    font-weight: bold;
    font-size: 0.9rem;
}

/* Bottom Sheet */
.bottom-sheet {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: var(--color-cream);
    border-top-left-radius: var(--radius-lg);
    border-top-right-radius: var(--radius-lg);
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: bottom 0.3s cubic-bezier(0.175, 0.885, 0.32, 1);
    max-height: 85vh;
    display: flex;
    flex-direction: column;
}

.bottom-sheet.open {
    bottom: 60px;
    /* Above nav tab */
}

.sheet-drag-handle {
    width: 40px;
    height: 4px;
    background: #ccc;
    border-radius: 2px;
    margin: 10px auto;
}

.sheet-content {
    overflow-y: auto;
    padding: 0 0 20px 0;
}

.church-hero {
    position: relative;
    width: 100%;
    height: 200px;
    background: #ddd;
}

.church-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.church-badge {
    position: absolute;
    bottom: -15px;
    right: 20px;
    background: var(--color-gold);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cinzel', serif;
    font-weight: bold;
    font-size: 1.2rem;
    border: 3px solid var(--color-cream);
    box-shadow: var(--shadow-sm);
}

.sheet-body {
    padding: 20px;
}

.church-type {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: var(--color-earth);
    letter-spacing: 1px;
}

.church-title {
    font-size: 1.5rem;
    color: var(--color-stone);
    margin-bottom: 5px;
}

.church-location {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.church-history {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.church-hours {
    background: var(--color-parchment);
    padding: 15px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
    border-left: 4px solid var(--color-gold);
}

.church-hours h3 {
    font-size: 1.1rem;
    margin-bottom: 10px;
    color: var(--color-stone);
}

.church-hours ul {
    list-style: none;
    padding-left: 0;
}

.church-hours li {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.sheet-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
    z-index: 2000;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    color: #999;
    flex: 1;
    font-size: 0.75rem;
    gap: 4px;
}

.nav-item.active {
    color: var(--color-blue-faith);
}

.nav-item i {
    font-size: 1.3rem;
    transition: transform 0.2s;
}

.nav-item.active i {
    transform: translateY(-2px);
}

.ar-btn-floating {
    position: relative;
    top: -20px;
}

.ar-icon-wrapper {
    background: var(--color-gold);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    border: 4px solid white;
}

.ar-icon-wrapper i {
    font-size: 1.8rem;
}

/* Gamification / Collection View */
.collection-container {
    padding: 80px 20px 20px;
}

.heading-gold {
    color: var(--color-gold);
    font-size: 2rem;
    margin-bottom: 5px;
}

.coleccion-desc {
    color: var(--color-stone);
    margin-bottom: 20px;
}

.stats-card {
    background: white;
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    justify-content: space-around;
    box-shadow: var(--shadow-sm);
    margin-bottom: 25px;
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat i {
    font-size: 1.5rem;
    color: var(--color-gold);
    margin-bottom: 5px;
}

.stat-val {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-stone);
}

.stat-label {
    font-size: 0.8rem;
    color: #666;
    text-transform: uppercase;
}

.stamps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 15px;
    padding-bottom: 30px;
}

.stamp {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    background: #EAEAEA;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    border: 2px dashed #CCC;
    opacity: 0.6;
    filter: grayscale(1);
}

.stamp.visited {
    background: white;
    border: 2px solid var(--color-gold);
    opacity: 1;
    filter: grayscale(0);
    box-shadow: var(--shadow-md);
}

.stamp-id {
    font-family: 'Cinzel', serif;
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-stone);
}

.stamp.visited .stamp-id {
    color: var(--color-gold);
}

.stamp-name {
    font-size: 0.6rem;
    text-align: center;
    padding: 0 5px;
    margin-top: 5px;
    line-height: 1.2;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseBorder {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(201, 149, 42, 0.7);
    }

    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(201, 149, 42, 0);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(201, 149, 42, 0);
    }
}

/* AR View Overlays */
.ar-overlay-ui {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    pointer-events: none;
    /* Let clicks pass to AR scene if needed */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.ar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.7), transparent);
    color: white;
    pointer-events: auto;
}

.btn-back {
    background: none;
    color: white;
    font-size: 1rem;
    margin-right: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.ar-title {
    font-size: 1.2rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.ar-scan-box {
    margin: auto;
    width: 250px;
    height: 250px;
    position: relative;
    pointer-events: auto;
}

.scan-corn-tl,
.scan-corn-tr,
.scan-corn-bl,
.scan-corn-br {
    position: absolute;
    width: 30px;
    height: 30px;
    border-color: var(--color-gold);
    border-style: solid;
}

.scan-corn-tl {
    top: 0;
    left: 0;
    border-width: 4px 0 0 4px;
}

.scan-corn-tr {
    top: 0;
    right: 0;
    border-width: 4px 4px 0 0;
}

.scan-corn-bl {
    bottom: 0;
    left: 0;
    border-width: 0 0 4px 4px;
}

.scan-corn-br {
    bottom: 0;
    right: 0;
    border-width: 0 4px 4px 0;
}

.ar-helper-text {
    text-align: center;
    color: white;
    padding: 20px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    pointer-events: auto;
}

/* Institutional Logos Layout - Footer Global */
.institutional-footer-global {
    background: #1A0F08;
    padding: 16px 24px;
    margin-top: 40px;
    border-radius: var(--radius-md);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.logos-footer-global {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.logo-inst-foot {
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.logo-dot {
    color: var(--color-gold);
    opacity: 0.5;
    font-size: 1.5rem;
}

.legal-text-box {
    text-align: center;
    border-top: 1px solid rgba(201, 149, 42, 0.2);
    padding-top: 12px;
}

.legal-line-1 {
    font-family: "Source Serif 4", "Playfair Display", serif;
    font-size: 11px;
    color: rgba(201, 149, 42, 0.5);
    margin-bottom: 4px;
}

.legal-line-2 {
    font-family: "Lato", sans-serif;
    font-size: 10px;
    color: rgba(245, 237, 214, 0.38);
}

@media (max-width: 400px) {
    .logos-footer-global {
        display: grid;
        grid-template-columns: 1fr 1fr;
        justify-items: center;
    }

    .logo-dot {
        display: none;
    }
}

/* =============== BRAND GUIDELINES CSS =============== */

/* Contenedor logo Alcaldía — principal */
.logo-alcaldia {
    height: 36px;
    width: auto;
    filter: drop-shadow(0 1px 3px rgba(0, 0, 0, 0.5));
    transition: transform 0.2s ease;
    cursor: pointer;
}

/* Footer logos — secundarios */
.logos-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    padding: 12px 0;
    flex-wrap: wrap;
}

.logo-institucional {
    width: auto;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.4));
}

.logo-institucional:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* Separador dorado entre logos */
.logo-divider {
    width: 1px;
    height: 28px;
    background: linear-gradient(to bottom, transparent, rgba(201, 149, 42, 0.5), transparent);
}

/* Splash screen — logo hero */
.logo-hero {
    width: 180px;
    height: auto;
    animation: fadeInDown 0.8s ease 0.3s both;
    filter: drop-shadow(0 4px 12px rgba(201, 149, 42, 0.4));
    margin: 0 auto 10px;
    display: block;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================= */
/* MAPA INTERACTIVO - VERSI�N 2.0 (LIENZO) */
/* ========================================= */

.map-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    filter: blur(8px) sepia(0.6);
    transition: filter 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.map-wrapper.map-revealed {
    filter: blur(0px) sepia(0);
}

.map-overlay-texture {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 400;
    background:
        radial-gradient(ellipse at 50% 0%, rgba(201, 149, 42, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 50% 100%, rgba(44, 26, 14, 0.25) 0%, transparent 50%);
    mix-blend-mode: multiply;
}

/* MARCADORES CUSTOM (ILUSTRACIONES RECORTADAS) */

.church-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

.church-marker {
    position: relative;
    width: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    filter: drop-shadow(0 4px 8px rgba(44, 26, 14, 0.6));
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    transform-origin: bottom center;
}

.church-marker:hover {
    transform: scale(1.15) translateY(-4px);
    z-index: 1000 !important;
}

.church-marker.is-selected {
    transform: scale(1.25) translateY(-8px);
    z-index: 1001 !important;
}

.church-marker__frame {
    width: 68px;
    height: 72px;
    background: linear-gradient(145deg, #F5EDD6, #E8D5A0);
    border: 2px solid #C9952A;
    border-radius: 50% 50% 8px 8px / 40% 40% 8px 8px;
    overflow: hidden;
    position: relative;
    box-shadow:
        0 2px 0 #8B5E3C,
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 1px 2px rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.church-marker__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
}

.church-marker__badge {
    position: absolute;
    bottom: 22px;
    right: 0px;
    width: 20px;
    height: 20px;
    background: #2B5FA6;
    border: 1.5px solid #C9952A;
    border-radius: 50%;
    color: #F5EDD6;
    font-family: 'Cinzel', serif;
    font-size: 9px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

.church-marker__nameplate {
    background: linear-gradient(135deg, rgba(44, 26, 14, 0.92), rgba(74, 55, 40, 0.88));
    color: #E8C97A;
    font-family: 'Cinzel', serif;
    font-size: 8px;
    font-weight: 600;
    text-align: center;
    padding: 3px 6px;
    border-radius: 3px;
    border: 1px solid rgba(201, 149, 42, 0.6);
    margin-top: 3px;
    width: 78px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    letter-spacing: 0.3px;
    backdrop-filter: blur(4px);
}

.church-marker__glow {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background: radial-gradient(circle, rgba(201, 149, 42, 0.4) 0%, transparent 70%);
    pointer-events: none;
    animation: glow-pulse 3s ease-in-out infinite;
}

.church-marker__pulse {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 2px solid #C9952A;
    opacity: 0;
    pointer-events: none;
}

.church-marker.is-nearby .church-marker__pulse {
    animation: proximity-pulse 1.5s ease-out infinite;
}

.church-marker.is-visited .church-marker__frame {
    border-color: #5A8A3C;
    box-shadow:
        0 2px 0 #3A5A2C,
        0 4px 8px rgba(0, 0, 0, 0.4),
        inset 0 0 12px rgba(90, 138, 60, 0.3);
}

.church-marker.is-visited::after {
    content: '✓';
    position: absolute;
    top: -8px;
    right: -4px;
    width: 18px;
    height: 18px;
    background: #5A8A3C;
    border: 1.5px solid #C9952A;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
}

@keyframes glow-pulse {

    0%,
    100% {
        opacity: 0.3;
        transform: translateX(-50%) scale(1);
    }

    50% {
        opacity: 0.7;
        transform: translateX(-50%) scale(1.3);
    }
}

@keyframes proximity-pulse {
    0% {
        transform: translateX(-50%) scale(0.5);
        opacity: 0.8;
    }

    100% {
        transform: translateX(-50%) scale(2);
        opacity: 0;
    }
}

@keyframes markerReveal {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.5);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* RUTA DORADA ANIMACI�N */
.ruta-dorada-line path {
    stroke-dasharray: 4000;
    stroke-dashoffset: 4000;
    animation: drawPath 4s ease-out forwards 0.5s;
}

@keyframes drawPath {
    to {
        stroke-dashoffset: 0;
    }
}

/* BOTTOM SHEET - MANUSCRITO COLONIAL */
#bottom-sheet {
    background: var(--color-parchment) url('../assets/textures/parchment.png');
    background-blend-mode: multiply;
}

.sheet-header-top {
    position: relative;
}

.church-hero {
    position: relative;
    width: 100%;
    height: 220px;
    background: var(--color-stone);
    border-bottom: 2px solid var(--color-gold);
}

.church-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    background: linear-gradient(to top, var(--color-parchment), transparent);
}

.ornate-divider {
    text-align: center;
    margin: 15px 0;
    color: var(--color-gold);
}

.ornate-divider::before {
    content: ' & ';
    letter-spacing: 2px;
}

/* PANEL LATERAL DE LISTA */
#view-list {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    bottom: 60px;
    background: rgba(44, 26, 14, 0.95);
    backdrop-filter: blur(10px);
    z-index: 450;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: none;
    flex-direction: column;
}

#view-list.open {
    transform: translateX(0);
    display: flex;
}

.list-header {
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid rgba(201, 149, 42, 0.3);
    color: var(--color-parchment);
}

.list-title {
    color: var(--color-gold);
    font-size: 1.2rem;
    letter-spacing: 1px;
    margin-bottom: 10px;
}

.list-filters {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.filter-chip {
    background: rgba(245, 237, 214, 0.1);
    border: 1px solid rgba(201, 149, 42, 0.5);
    color: var(--color-parchment);
    padding: 4px 12px;
    border-radius: 16px;
    font-size: 0.8rem;
}

.filter-chip.active {
    background: var(--color-gold);
    color: var(--color-stone);
    font-weight: bold;
}

.church-list-container {
    flex: 1;
    overflow-y: auto;
    padding: 10px 20px;
}

.church-list-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(201, 149, 42, 0.2);
    color: var(--color-parchment);
    cursor: pointer;
}

.church-list-item:hover {
    background: rgba(201, 149, 42, 0.1);
}

.church-list-item img {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 50%;
    border: 2px solid var(--color-gold);
    margin-right: 15px;
}

.ch-list-name {
    font-size: 1rem;
    color: var(--color-gold-light);
    margin-bottom: 4px;
}

.ch-list-meta {
    font-size: 0.8rem;
    opacity: 0.8;
}

.ch-list-icon {
    margin-left: auto;
    color: var(--color-gold);
}

/* CUSTOM CONTROLS OVERRIDES */
.custom-map-controls {
    position: absolute;
    left: 15px;
    top: 80px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 400;
}

.control-panel {
    background: rgba(245, 237, 214, 0.9);
    border: 1px solid var(--color-gold);
    border-radius: 8px;
    padding: 5px;
    box-shadow: var(--shadow-md);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.control-btn {
    width: 36px;
    height: 36px;
    background: transparent;
    color: var(--color-stone);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    border-radius: 4px;
}

.control-btn:hover {
    background: rgba(201, 149, 42, 0.2);
}

.control-divider {
    height: 1px;
    background: var(--color-gold);
    opacity: 0.5;
    margin: 2px 0;
}

/* CONTADOR SUPERIOR */
.top-counter-overlay {
    position: absolute;
    top: 75px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-parchment);
    border: 1px solid var(--color-gold);
    border-radius: 20px;
    padding: 5px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    z-index: 400;
    box-shadow: var(--shadow-md);
}

.counter-text {
    font-size: 0.75rem;
    letter-spacing: 1px;
    color: var(--color-stone);
    font-weight: bold;
    margin-bottom: 4px;
}

.counter-bar-wrapper {
    width: 120px;
    height: 4px;
    background: rgba(44, 26, 14, 0.2);
    border-radius: 2px;
    overflow: hidden;
}

.counter-bar-fill {
    height: 100%;
    background: var(--color-gold);
    transition: width 0.4s ease;
}


.scan-corn-br {
    bottom: 0;
    right: 0;
    border-width: 0 4px 4px 0;
}

.scan-corn-tl,
.scan-corn-tr,
.scan-corn-bl,
.scan-corn-br {
    transition: all 0.3s ease;
}

.ar-scan-box::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--color-gold);
    box-shadow: 0 0 10px var(--color-gold);
    animation: scanLine 2.5s infinite linear;
}

@keyframes scanLine {
    0% {
        top: 0;
        opacity: 0;
    }

    10% {
        opacity: 1;
    }

    90% {
        opacity: 1;
    }

    100% {
        top: 100%;
        opacity: 0;
    }
}

/* =========================================
   MAP & CHURCH MARKERS STYLES
   ========================================= */

.map-wrapper {
    position: relative;
    width: 100%;
    height: 100vh;
    overflow: hidden;
    opacity: 0;
}

.map-revealed {
    animation: fadeInMap 1s ease-out forwards;
}

@keyframes fadeInMap {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.map-overlay-texture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 400;
    /* Optional parchment overlay texture if desired */
    /* background: url('../assets/texture.png'); */
    opacity: 0.15;
    mix-blend-mode: multiply;
}

.church-marker-wrapper {
    background: transparent;
    border: none;
}

.church-marker {
    position: relative;
    width: 80px;
    height: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.church-marker__glow {
    position: absolute;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0) 70%);
    z-index: 0;
    opacity: 0;
    transition: opacity 0.3s ease;
    bottom: 0px;
}

.church-marker:hover .church-marker__glow,
.church-marker.is-selected .church-marker__glow {
    opacity: 1;
}

.church-marker__frame {
    width: 65px;
    height: 65px;
    border-radius: 50%;
    background: var(--color-parchment);
    border: 3px solid var(--color-gold);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), border-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.church-marker__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.3s;
}

.church-marker__img.loading {
    opacity: 0;
}

.church-marker__nameplate {
    background: var(--color-stone);
    color: white;
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    margin-top: -5px;
    z-index: 3;
    box-shadow: var(--shadow-sm);
    font-family: var(--font-lato), sans-serif;
    pointer-events: none;
    opacity: 0;
    transform: translateY(5px);
    transition: all 0.3s;
    font-weight: 700;
}

.church-marker:hover .church-marker__nameplate,
.church-marker.is-selected .church-marker__nameplate {
    opacity: 1;
    transform: translateY(0);
}

.church-marker.is-visited .church-marker__frame {
    border-color: var(--color-blue-faith);
}

.church-marker.is-nearby .church-marker__frame {
    box-shadow: 0 0 15px var(--color-green-hill);
}

.church-marker.is-selected {
    z-index: 9999 !important;
    /* Bring to very front */
}

.church-marker.is-selected .church-marker__frame {
    transform: scale(1.2);
    border-color: var(--color-earth);
    box-shadow: var(--shadow-lg);
}

.church-marker__pulse {
    position: absolute;
    bottom: -5px;
    width: 30px;
    height: 10px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 50%;
    z-index: 1;
    filter: blur(2px);
    transition: all 0.3s;
}

.church-marker.is-selected .church-marker__pulse {
    width: 40px;
    background: rgba(0, 0, 0, 0.3);
}

/* Animations */
@keyframes markerReveal {
    0% {
        transform: scale(0.5) translateY(50px);
        opacity: 0;
    }

    100% {
        transform: scale(1) translateY(0);
        opacity: 1;
    }
}

.ruta-dorada-line {
    filter: drop-shadow(0 0 4px rgba(201, 149, 42, 0.6));
    animation: pulseLine 2s infinite alternate;
}

@keyframes pulseLine {
    from {
        opacity: 0.6;
        filter: drop-shadow(0 0 2px rgba(201, 149, 42, 0.4));
    }

    to {
        opacity: 1;
        filter: drop-shadow(0 0 6px rgba(201, 149, 42, 0.8));
    }
}

@media (max-width: 600px) {
    .logo-institucional {
        width: 100px;
        height: auto;
    }
}

/* Map Type Filters */
.map-type-filters {
    position: absolute;
    right: 15px;
    top: 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 400;
}

.type-filter-btn {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: white;
    box-shadow: var(--shadow-md);
    border: 2px solid var(--color-stone);
    color: var(--color-stone);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.2s ease;
    opacity: 0.5;
    filter: grayscale(1);
}

.type-filter-btn.active {
    opacity: 1;
    filter: grayscale(0);
    border-color: var(--color-gold);
    color: var(--color-gold);
    background: var(--color-parchment);
}

.branding-footer{
    width:100%;
    padding:20px 10px;
    display:flex;
    justify-content:center;
    align-items:center;
}

.logos-footer{
    display:flex;
    align-items:center;
    justify-content:center;
    gap:25px;
    flex-wrap:wrap;
}

/* logos */
.logo-institucional{
    max-height:60px;
    width:auto;
    filter: contrast(1.2) brightness(0.9);
    opacity:0.95;
}

/* línea separadora */
.logo-divider{
    width:1px;
    height:40px;
    background:#cccccc;
}

/* responsive */


.logos-footer{
    display:flex;
    justify-content:center;
    align-items:center;
    gap:20px;
    flex-wrap:wrap; /* permite que bajen si no caben */
}

.logos-footer img{
    height:42px;
    max-width:100%;
}

.logo-divider{
    width:1px;
    height:30px;
    background:#cfcfcf;
}

/* RESPONSIVE */
@media (max-width:768px){

    .logos-footer img{
        height:34px;
    }

    .logo-divider{
        display:none; /* quita las rayitas en celular */
    }

}

#splash-screen{
    overflow-y:auto;
}

#splash-screen .branding-footer{
    position:relative;
    bottom:auto;
    margin-top:30px;
}

.btn-primary{
    justify-content:center;
}