/* ==========================================================================
   CÁMARA DE COMERCIO DE CUMBAYÁ - BASE CSS (Vanilla & Responsive)
   ========================================================================== */

/* === VARIABLES DE DISEÑO (Paleta de tu propuesta) === */
:root {
    --navy-50: #e8ecf2;
    --navy-500: #1b2a4a;
    --navy-800: #0c1226;
    --gold-300: #e5bc66;
    --gold-400: #d4a843;
    --gold-500: #b8922e;
    --andean-400: #2d7d46;
    --cream-50: #fdfcfa;
    --cream-100: #faf6ee;
    --cream-200: #f4ecda;
    --cream-300: #ebe0c5;

    --font-display: "Playfair Display", serif;
    --font-body: "Inter", sans-serif;
    --transition: cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
}

/* === ESTILOS GLOBALES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-body);
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--cream-100);
    color: var(--navy-500);
    line-height: 1.6;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-display);
    font-weight: 700;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

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

/* === DECORACIONES === */
.gold-line::after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-400), var(--gold-300));
    margin-top: 1rem;
    border-radius: 2px;
}

.gold-line-center::after {
    content: "";
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--gold-400), var(--gold-300));
    margin: 1rem auto 0;
    border-radius: 2px;
}

.card {
    background-color: var(--cream-50);
    border: 1px solid rgba(235, 224, 197, 0.5);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(27, 42, 74, 0.1);
}

/* === NAVEGACIÓN === */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    transition: var(--transition);
    background-color: transparent;
}

header.scrolled {
    background-color: rgba(27, 42, 74, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

#main-header {
    background-color: var(--navy-500);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

body.home-page #main-header {
    background-color: transparent;
}

body.home-page #main-header.scrolled {
    background-color: var(--navy-500);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 5rem;
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-badge {
    width: 2.75rem;
    height: 2.75rem;
    background-color: var(--gold-400);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    color: var(--navy-800);
    font-weight: bold;
    font-size: 1.25rem;
}

.logo-text p:first-child {
    color: white;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
    line-height: 1.2;
}

.logo-text p:last-child {
    color: var(--gold-300);
    font-size: 0.75rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.nav-menu {
    display: none;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.875rem;
    font-weight: 500;
}

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

.btn-cta {
    background-color: var(--gold-400);
    color: var(--navy-800);
    padding: 0.6rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
}

.btn-cta:hover {
    background-color: var(--gold-500);
    box-shadow: 0 10px 15px -3px rgba(212, 168, 67, 0.3);
}

/* Botón Hamburguesa */
.ham-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.ham-btn span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: white;
    transition: var(--transition);
}

/* === HERO === */
.hero {
    min-height: 100vh;
    background:
        linear-gradient(
            135deg,
            rgba(27, 42, 74, 0.92) 0%,
            rgba(27, 42, 74, 0.75) 50%,
            rgba(45, 125, 70, 0.7) 100%
        ),
        url("https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?q=80&w=1200")
            center/cover no-repeat fixed;
    display: flex;
    align-items: center;
    color: white;
    padding-top: 5rem;
    text-align: center;
}

.hero-inner {
    max-width: 800px;
    margin: 0 auto;
}

.hero-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background-color: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    color: var(--gold-300);
    font-size: 0.875rem;
    margin-bottom: 2rem;
}

.hero h1 {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--gold-400);
}

.hero p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    justify-content: center;
}

.btn-secondary {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    font-weight: 600;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* === GRID PRINCIPAL DE CONTENIDO === */
.main-layout {
    padding: 5rem 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.section-title {
    font-size: 2rem;
    color: var(--navy-500);
    margin-bottom: 2rem;
}

/* Bloque de Eventos */
.events-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
}

.event-card h3 {
    color: var(--navy-500);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.event-meta {
    font-size: 0.85rem;
    color: var(--andean-400);
    font-weight: 600;
    margin-bottom: 1rem;
}

/* Bloques de Clima y Pronóstico */
.widgets-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.weather-display {
    display: flex;
    align-items: center;
    gap: 2rem;
    margin-top: 1rem;
}

.weather-icon {
    font-size: 3.5rem;
}

.temp-main {
    font-size: 2.5rem;
    font-weight: 700;
    font-family: var(--font-display);
    color: var(--gold-500);
}

.weather-list {
    margin-top: 1rem;
    list-style: none;
    font-size: 0.9rem;
}

.weather-list li {
    padding: 0.25rem 0;
    border-bottom: 1px solid var(--cream-200);
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: 1rem;
}

.forecast-card {
    background-color: var(--cream-100);
    padding: 1rem;
    border-radius: 0.5rem;
    text-align: center;
    border-top: 3px solid var(--gold-400);
}

.forecast-card h4 {
    font-size: 0.9rem;
    color: var(--navy-500);
}

.forecast-temp {
    font-weight: bold;
    color: var(--andean-400);
    margin-top: 0.5rem;
}

/* Bloque de Afiliados Destacados (Spotlights) */
.spotlights-section {
    padding: 5rem 0;
    background-color: var(--cream-50);
    border-top: 1px solid var(--cream-300);
}

.spotlights-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2.5rem;
}

.spotlight-card {
    border-left: 4px solid var(--gold-400);
}

.badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    margin-bottom: 0.5rem;
}

.badge-gold {
    background-color: #fff3cd;
    color: #856404;
}
.badge-silver {
    background-color: #e2e3e5;
    color: #383d41;
}

/* ==========================================================================
   PÁGINA DE DISCOVERY - ESTILOS ADAPTADOS AL SISTEMA BASE
   ========================================================================== */

/* Layout general de Discovery */
.discover-layout {
    padding: 7rem 0 5rem 0; /* Espacio superior para el header fixed */
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

.discover-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.sidebar-widget h3 {
    color: var(--navy-500);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

/* Título de la sección */
.discover-content .section-title {
    margin-bottom: 2.5rem;
}

/* Contenedor de las tarjetas inyectadas */
.places-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

/* Tarjeta generada dinámicamente (.place-card) */
.place-card {
    background-color: var(--cream-50);
    border: 1px solid rgba(235, 224, 197, 0.6);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
}

.place-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 25px -5px rgba(27, 42, 74, 0.1);
    border-color: var(--gold-300);
}

/* Estructura interna de la tarjeta usando CSS Grid */
.place-card > div {
    display: grid;
    grid-template-areas:
        "photograph"
        "name"
        "location"
        "description";
    gap: 1rem;
}

.place-card h2 {
    grid-area: name;
    font-size: 1.4rem;
    color: var(--navy-500);
}

.place-card img {
    grid-area: photograph;
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: 0.75rem;
    background-color: var(--cream-200);
}

.place-card p {
    grid-area: description;
    font-size: 0.95rem;
    color: var(--navy-500);
    line-height: 1.6;
}

.place-card address {
    grid-area: location;
    font-style: normal;
    font-size: 0.85rem;
    color: var(--andean-400);
    font-weight: 600;
}

/* No results text */
.no-results {
    font-family: var(--font-display);
    font-size: 1.2rem;
    color: var(--navy-500);
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 0;
}

/* ==========================================================================
   PÁGINA DE DIRECTORIO - REJILLA Y VISTAS (GRID / LIST)
   ========================================================================== */

/* Contenedor base de los negocios */
.directory-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    transition: var(--transition);
}

/* Tarjeta de Negocio Base (.business-card) */
.business-card {
    background-color: var(--cream-50);
    border: 1px solid rgba(235, 224, 197, 0.6);
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    transition: var(--transition);
}

.business-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(27, 42, 74, 0.1);
    border-color: var(--gold-300);
}

/* Logo o Iniciales del Negocio */
.business-logo {
    font-family: var(--font-display);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--gold-500);
    background-color: var(--navy-50);
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin-bottom: 0.25rem;
}

.business-name {
    font-size: 1.35rem;
    color: var(--navy-500);
    margin-bottom: 0.25rem;
}

.business-category {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background-color: var(--cream-200);
    color: var(--navy-800);
    padding: 0.25rem 0.6rem;
    border-radius: 2rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.business-address,
.business-phone {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.4;
}

.business-phone a {
    color: var(--andean-400);
    text-decoration: none;
    font-weight: 500;
}

.business-website {
    margin-top: auto; /* Empuja el enlace siempre al fondo de la tarjeta */
    padding-top: 0.5rem;
}

.business-website a {
    display: inline-block;
    color: var(--gold-500);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.business-website a:hover {
    color: var(--navy-500);
    transform: translateX(3px);
}

/* Botones para alternar vista */
.view-toggle-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.view-toggle-buttons .btn {
    flex: 1;
    padding: 0.6rem;
    border: 1px solid var(--cream-300);
    background-color: var(--cream-100);
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: var(--transition);
}

.view-toggle-buttons .btn.active,
.view-toggle-buttons .btn:hover {
    background-color: var(--navy-500);
    color: white;
    border-color: var(--navy-500);
}

/* === ESTILOS DINÁMICOS PARA LA VISTA DE LISTA (.list-view) === */
#directory-container.list-view {
    grid-template-columns: 1fr !important; /* Fuerza una sola columna siempre */
    gap: 1rem;
}

#directory-container.list-view .business-card {
    flex-direction: row; /* Alineación horizontal en lista */
    align-items: center;
    padding: 1rem 1.5rem;
}

#directory-container.list-view .business-logo {
    width: 50px;
    height: 50px;
    font-size: 1.4rem;
    margin-bottom: 0;
    flex-shrink: 0;
}

#directory-container.list-view .business-card > div:last-child {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    align-items: center;
    gap: 1rem;
    width: 100%;
}

#directory-container.list-view .business-website {
    margin-top: 0;
    padding-top: 0;
    text-align: right;
}

/* ==========================================================================
   PÁGINA DE AFILIACIÓN (JOIN) - ESTILOS DEL FORMULARIO Y TARJETAS
   ========================================================================== */

/* Stack vertical para las tarjetas informativas */
.membership-info-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.membership-card {
    border-left: 5px solid var(--cream-300); /* Borde por defecto */
    padding: 1.25rem;
    transition: var(--transition);
}

.membership-card h4 {
    color: var(--navy-500);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.membership-card .price {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--andean-400);
    margin-bottom: 0.5rem;
}

.membership-card p {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
}

/* Distinciones de color sutiles por nivel */
.membership-card.NP {
    border-left-color: #888;
}
.membership-card.bronze {
    border-left-color: #cd7f32;
}
.membership-card.silver {
    border-left-color: #ccc;
}
.membership-card.gold {
    border-left-color: var(--gold-400);
}

.membership-card:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(27, 42, 74, 0.08);
}

/* --- DISEÑO DEL FORMULARIO --- */
.registration-form {
    padding: 2.5rem;
    background-color: var(--cream-50);
    border: 1px solid rgba(235, 224, 197, 0.6);
}

.registration-form fieldset {
    border: none;
    margin-bottom: 2rem;
    padding: 0;
}

.registration-form legend {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--navy-500);
    font-weight: 600;
    margin-bottom: 1.25rem;
    width: 100%;
    border-bottom: 1px solid var(--cream-300);
    padding-bottom: 0.5rem;
}

.registration-form label {
    display: block;
    margin-bottom: 1.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--navy-500);
}

/* Inputs, Selects y Textareas */
.registration-form input[type="text"],
.registration-form input[type="email"],
.registration-form input[type="tel"],
.registration-form select,
.registration-form textarea {
    display: block;
    width: 100%;
    padding: 0.85rem 1rem;
    margin-top: 0.4rem;
    border: 1px solid var(--cream-300);
    background-color: white;
    border-radius: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--navy-800);
    transition: var(--transition);
}

.registration-form input:focus,
.registration-form select:focus,
.registration-form textarea:focus {
    outline: none;
    border-color: var(--gold-400);
    box-shadow: 0 0 0 3px rgba(212, 168, 67, 0.15);
}

/* Botón de Envió */
.submit-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    background-color: var(--navy-500);
    color: white;
    border: none;
    border-radius: 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.submit-btn:hover {
    background-color: var(--gold-500);
    box-shadow: 0 4px 15px rgba(184, 146, 46, 0.3);
}

/* ==========================================================================
   PÁGINA DE AGRADECIMIENTO (THANKYOU) - RESUMEN DINÁMICO
   ========================================================================== */

/* Tarjeta contenedora generada por JS */
.submission-details {
    background-color: var(--cream-50);
    border: 1px solid rgba(235, 224, 197, 0.6);
    border-radius: 1rem;
    padding: 2.5rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

/* Títulos internos del resumen (Información Personal, Datos de la Empresa) */
.submission-details h2 {
    font-family: var(--font-display);
    font-size: 1.35rem;
    color: var(--navy-500);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 2px solid var(--cream-200);
}

.submission-details h2:first-of-type {
    margin-top: 0; /* Quita el margen superior al primer título */
}

/* Líneas de datos */
.submission-details p {
    font-size: 0.95rem;
    color: var(--navy-800);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.submission-details p strong {
    color: var(--navy-500);
    font-weight: 600;
    display: inline-block;
    min-width: 140px; /* Alinea las etiquetas para que se vea ordenado */
}

/* Párrafo final de agradecimiento o fecha */
.submission-details p:last-of-type {
    margin-top: 2rem;
    font-family: var(--font-display);
    font-size: 1.15rem;
    color: var(--andean-400);
    font-weight: 700;
    text-align: center;
}

/* Botón personalizado de retorno en la barra lateral */
.btn-back-home {
    display: inline-block;
    text-align: center;
    background-color: var(--navy-500);
    color: white;
    padding: 0.85rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.btn-back-home:hover {
    background-color: var(--gold-400);
    color: var(--navy-800);
    box-shadow: 0 4px 12px rgba(212, 168, 67, 0.2);
}

/* === FOOTER === */
footer {
    background-color: var(--navy-800);
    color: rgba(255, 255, 255, 0.6);
    padding: 4rem 0 2rem;
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    color: white;
    margin-bottom: 1rem;
}

.footer-brand span {
    color: var(--gold-400);
}

.footer-links h4 {
    color: white;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.footer-links ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.6);
}

.footer-links a:hover {
    color: var(--gold-400);
}

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
    font-size: 0.8rem;
}

/* === MENÚ MÓVIL OVERLAY === */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background-color: rgba(12, 18, 38, 0.98);
    z-index: 150;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    transform: translateX(100%);
    transition: var(--transition);
}

.mobile-overlay.active {
    transform: translateX(0);
}

.close-menu {
    align-self: flex-end;
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 3rem;
}

.mobile-nav-links a {
    color: white;
    font-size: 1.5rem;
    font-family: var(--font-display);
}

/* === VISITOR TOAST NOTIFICATION (NUEVO) === */
.visitor-bubble {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: var(--cream-50);
    padding: 1rem 1.25rem;
    border-radius: 1rem;
    box-shadow: 0 10px 25px -5px rgba(12, 18, 38, 0.15);
    border: 1px solid var(--cream-300);
    transition:
        opacity 0.4s ease,
        transform 0.4s ease;
}

.visitor-bubble.hidden {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
}

.bubble-avatar {
    font-size: 1.5rem;
    background-color: var(--navy-50);
    padding: 0.5rem;
    border-radius: 50%;
    line-height: 1;
}

.bubble-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--navy-500);
    font-weight: 500;
}

.bubble-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--navy-500);
    cursor: pointer;
    line-height: 1;
    align-self: flex-start;
}

.bubble-close-btn:hover {
    color: var(--gold-500);
}
