:root {
    --primary: #2e7d32;
    --primary-dark: #256428;
    --accent: #f5f5f5;
    --text: #333;
    --muted: #666;
    --light-gray: #e0e0e0;
    --surface: #ffffff;
    --border: #ececec;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
    --radius: 10px;
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-logo: 'Righteous', sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    color: var(--text);
    margin: 0;
    line-height: 1.4;
    background: #fafafa;
    padding-bottom: 40px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
}

button, input, textarea, select {
    font-family: var(--font-main);
}

button {
    font: inherit;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 15px;
}

/* =========================
   HEADER
========================= */

header {
    padding: 8px 0 0;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding-bottom: 8px;
}

.brand-group {
    display: flex;
    align-items: baseline;
    gap: 10px;
    flex-wrap: wrap;
}

.logo, h1.logo {
    font-family: var(--font-logo);
    color: var(--primary);
    font-size: 1.8rem;
    letter-spacing: 0.2px;
    line-height: 1;
    margin: 0;
}

.credits {
    font-size: 0.75rem;
    color: #888;
    text-transform: lowercase;
}

.credits a {
    color: #555;
    text-decoration: none;
    font-weight: 600;
    transition: 0.2s ease;
}

.credits a:hover {
    color: #000;
    text-decoration: underline;
}

.user-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

#auth-status-container {
    display: flex;
    align-items: center;
}

.btn-nav,
.btn-icon,
.btn-primary,
.btn-secondary {
    border: 0;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    white-space: nowrap;
}

.btn-nav {
    background: var(--primary);
    color: white;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.18);
}

.btn-nav:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.btn-icon {
    background: transparent;
    color: var(--text);
    padding: 6px 10px;
    border-radius: 8px;
}

.btn-icon:hover {
    background: rgba(46, 125, 50, 0.08);
}

/* =========================
   TABS
========================= */

.tabs-container {
    width: 100%;
    border-top: 1px solid rgba(0, 0, 0, 0.03);
    border-bottom: 1px solid #eee;
    background: linear-gradient(to bottom, #fff, #fafafa);
}

.tabs-scroll {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px 0;
}

.tab-link {
    border: 1px solid transparent;
    background: transparent;
    color: #444;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
}

.tab-link:hover {
    background: rgba(46, 125, 50, 0.08);
}

.tab-link.active {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.18);
}

.tab-content {
    display: none;
    padding: 15px 0 30px;
}

.tab-content.active {
    display: block;
}

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

.hero-section {
    position: relative;
    padding: 20px 0 15px;
    text-align: left;
    overflow: hidden;
}

.hero-intro {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    flex-wrap: wrap;
}

.mascot-group-container {
    flex: 0 0 300px;
    max-width: 300px;
    line-height: 0;
    margin: -4px auto 0;
    z-index: 2;
}

.mascot-group-container img {
    width: 100%;
    height: auto;
    display: block;
    transform: translateY(-10px);
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.06));
}

.hero-text {
    flex: 1;
    min-width: 300px;
    padding-top: 0;
}

.hero-text .highlight-title {
    font-size: 1.25rem;
    color: var(--primary);
    margin: 0 0 8px;
    line-height: 1.2;
}

.hero-text p {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--text);
    margin: 0;
}

/* =========================
   LAYOUT PRINCIPAL
========================= */

.main-layout {
    display: grid;
    grid-template-columns: 190px 1fr;
    gap: 16px;
    align-items: start;
    margin-top: 8px;
}

.sidebar {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
    position: sticky;
    top: 70px;
    height: fit-content;
}

.sidebar h2,
.section-block h2 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: var(--primary);
}

.sidebar ul {
    display: block;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Base de los items del menú lateral */
.sidebar ul li {
    padding: 6px 8px;
    border-radius: 8px;
    color: #444;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover suave para categorías */
.sidebar ul li:hover {
    background: #f1f8e9;
    color: var(--primary);
}

/* Filtro de categoría activo con Verde Reuuz */
.sidebar ul li.active {
    background-color: #e8f5e9;
    color: var(--primary);
    font-weight: bold;
    border-radius: 6px;
    padding-left: 10px;
    border-left: 4px solid var(--primary);
}

.content-area {
    min-width: 0;
}

.section-block {
    margin-bottom: 20px;
}

.section-block p {
    margin: 0;
    color: var(--text);
}

/* =========================
   CARDS / FEED
========================= */

.grid-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.card {
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    background: white;
    font-size: 0.9rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
}

.card-body {
    padding: 10px;
}

.card-body h3 {
    margin: 4px 0;
    font-size: 0.95rem;
    line-height: 1.2;
}

.card-location {
    font-size: 0.78rem;
    color: var(--muted);
    margin-bottom: 6px;
}

.card .btn-secondary {
    width: 100%;
    padding: 6px 8px;
    font-size: 0.85rem;
    background: #f3f3f3;
    color: #333;
    border-radius: 8px;
}

.card .btn-secondary:hover {
    background: #eaeaea;
}

/* =========================
   DETAIL PAGE
========================= */

.detail-container {
    margin: 20px 0;
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.detail-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.detail-info h2 {
    font-size: 1.6rem;
    margin: 5px 0;
}

.item-location {
    color: var(--muted);
    font-weight: 500;
}

.separator {
    border: 0;
    border-top: 1px solid var(--light-gray);
    margin: 15px 0;
}

.safety-box {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 10px;
    margin: 15px 0;
    border: 1px dashed #ccc;
}

.safety-box h4 {
    margin-top: 0;
    color: #444;
}

.safety-box ul {
    display: block;
    padding-left: 20px;
    font-size: 0.88rem;
    color: #555;
    margin: 8px 0 0;
}

.safety-box li {
    margin-bottom: 6px;
}

.btn-large {
    width: 100%;
    padding: 10px;
    font-size: 1rem;
    border-radius: 8px;
}

/* =========================
   MODALES
========================= */

.modal-container {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3000;
    background-color: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-container.is-visible,
.modal-container.active-modal {
    display: flex;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    position: relative;
    animation: fadeIn 0.28s ease-out;
}

.close-modal {
    position: absolute;
    top: 12px;
    right: 14px;
    font-size: 1.4rem;
    cursor: pointer;
    color: #999;
    line-height: 1;
}

.close-modal:hover {
    color: #333;
}

.modal-content h2 {
    color: #c62828;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 1.4rem;
}

.modal-body {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.modal-body ul {
    list-style-type: disc;
    padding-left: 20px;
    margin: 8px 0;
    display: block;
}

.modal-body ul li {
    margin-bottom: 4px;
}

.aviso-serio {
    font-weight: bold;
    color: var(--text);
    background-color: #fff9c4;
    padding: 8px 10px;
    border-left: 4px solid #fbc02d;
    border-radius: 6px;
}

#btn-final-confirmar,
#btn-cerrar-verificacion,
#btn-entendido-anuncio {
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
    background: var(--primary);
    color: white;
    font-size: 0.95rem;
}

#btn-final-confirmar:hover,
#btn-cerrar-verificacion:hover,
#btn-entendido-anuncio:hover {
    background: var(--primary-dark);
}

/* Modal de anuncio */
.anuncio-content {
    width: 90%;
    max-width: 600px;
    padding: 0;
    overflow: hidden;
    border-radius: 12px;
    position: relative;
    box-shadow: var(--shadow-lg);
    animation: modalScale 0.3s ease-out;
    background: #fff;
}

.anuncio-body {
    display: block;
}

.img-anuncio {
    width: 100%;
    height: auto;
    max-height: 50vh;
    object-fit: cover;
    display: block;
}

.anuncio-texto {
    padding: 20px;
    text-align: center;
}

.anuncio-texto h2 {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 1.5rem;
}

.anuncio-texto p {
    color: #666;
    line-height: 1.4;
    margin: 0 0 15px;
    font-size: 0.95rem;
}

@keyframes modalScale {
    from {
        transform: scale(0.95);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Modal de verificación */
.modal-wait .modal-content-centered {
    text-align: center;
}

.modal-icon {
    font-size: 2rem;
    margin-bottom: 5px;
}

.modal-title-v {
    margin-top: 0;
    margin-bottom: 8px;
    color: var(--primary);
}

.modal-text-v {
    color: #555;
    margin-bottom: 15px;
    line-height: 1.4;
    font-size: 0.9rem;
}

.btn-full {
    width: 100%;
}

/* =========================
   CHAT (Ajustado a la paleta Reuuz)
========================= */

#modal-chat {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 3100;
    background: rgba(0, 0, 0, 0.35);
    justify-content: center;
    align-items: center;
    padding: 20px;
}

#modal-chat.is-visible {
    display: flex;
}

.modal-content-chat {
    width: min(100%, 480px);
    max-height: 80vh;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
}

.chat-header {
    padding: 10px 15px;
    background: var(--primary);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.chat-header h3 {
    margin: 0;
    font-size: 1rem;
}

#btn-cerrar-chat {
    background: transparent;
    color: white;
    border: 0;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}

#chat-mensajes-lista {
    padding: 10px;
    overflow-y: auto;
    flex: 1;
    background: #fafafa;
}

.chat-form {
    padding: 10px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 8px;
    background: white;
}

.chat-form input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 20px;
    border: 1px solid #ddd;
    outline: none;
    font-size: 0.9rem;
}

.chat-form input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.08);
}

#btn-enviar-chat {
    background: var(--primary);
    color: white;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

#btn-enviar-chat:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

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

.main-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 6px 0;
    background-color: #f9f9f9;
    border-top: 1px solid #eee;
    color: #888;
    text-align: center;
}

.footer-content p {
    margin: 0;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
}

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

@media (max-width: 768px) {
    .header-nav {
        flex-wrap: wrap;
        justify-content: center;
    }

    .hero-section {
        padding: 20px 0 15px;
        text-align: center;
    }

    .hero-intro {
        justify-content: center;
        text-align: center;
        gap: 15px;
    }

    .mascot-group-container {
        flex: 0 0 100%;
        max-width: 240px;
        margin: -4px auto 0;
    }

    .mascot-group-container img {
        transform: translateY(-10px);
    }

    .hero-text {
        min-width: 100%;
        padding-top: 0;
    }

    .main-layout {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
        order: 2;
    }

    .detail-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .anuncio-content {
        width: 95%;
    }
}

@media (max-width: 480px) {
    .logo {
        font-size: 1.5rem;
    }

    .brand-group {
        gap: 6px;
    }

    .credits {
        font-size: 0.65rem;
    }

    .tabs-scroll {
        gap: 8px;
    }

    .tab-link {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .grid-feed {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
        gap: 8px;
    }

    .modal-content,
    .modal-content-chat {
        border-radius: 12px;
    }

    .modal-content {
        padding: 15px;
    }

    .anuncio-texto {
        padding: 15px;
    }

    .anuncio-texto h2 {
        font-size: 1.3rem;
    }

    .anuncio-texto p {
        font-size: 0.85rem;
    }
}









/* =========================
   SECCIÓN DE PASOS (HOME/EXPLORAR)
========================= */

.steps-section {
    margin: 40px 0;
    padding: 20px 0;
    border-bottom: 1px solid var(--border);
}

.steps-header {
    text-align: center;
    margin-bottom: 30px;
}

.steps-header h2 {
    color: var(--primary);
    font-size: 1.4rem;
    margin: 0 0 6px;
}

.steps-header p {
    color: var(--muted);
    font-size: 0.9rem;
    margin: 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.step-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 16px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.step-icon {
    font-size: 2.2rem;
    margin-bottom: 12px;
}

.step-card h3 {
    margin: 0 0 8px;
    font-size: 1.05rem;
    color: var(--text);
}

.step-card p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
}

/* Ajuste responsive para los pasos */
@media (max-width: 768px) {
    .steps-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .step-card {
        padding: 16px;
    }
}



.steps-header-minimal {
    margin-top: 10px;
}
.steps-header-minimal p {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}



/* Animación de desaparición suave para la intro */
.steps-section {
    max-height: 1200px;
    opacity: 1;
    overflow: hidden;
    transition: max-height 0.4s ease-out, opacity 0.3s ease-out, margin 0.4s ease-out, padding 0.4s ease-out;
}

.steps-section.hidden {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
    border: none;
}


/* Clase utilitaria global para ocultar elementos */
.hidden {
    display: none !important;
}


/* Transición de salida para los pasos explicativos */
.steps-section {
    transition: opacity 0.3s ease, transform 0.3s ease;
    opacity: 1;
    transform: translateY(0);
}

.steps-section.fade-out {
    opacity: 0;
    transform: translateY(-15px); /* Se desliza ligeramente hacia arriba al desvanecerse */
}

/* Transición de entrada para el catálogo y el buscador */
.main-layout.fade-in {
    animation: smoothFadeIn 0.4s ease forwards;
}

@keyframes smoothFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px); /* Viene desde abajo sutilmente */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}




/* --- COMPONENTE DE COBERTURA DE CIUDADES --- */
.location-availability {
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-start;
}

.location-availability > span {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
}

.city-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge-city {
    background-color: #f1f8e9; /* Tono verde muy suave de fondo */
    color: var(--primary); /* Tu verde #2e7d32 */
    font-size: 0.8rem;
    font-weight: 500;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(46, 125, 50, 0.15);
}
