/* Sobreescritura de color primario Bootstrap: #0079A3 */
:root {
    --bs-primary: #0079A3;
    --bs-primary-rgb: 0, 121, 163;
    --bs-body-color: #0079A3;
    --bs-link-color: #0079A3;
    --bs-link-color-rgb: 0, 121, 163;
}

/* Tablas Bootstrap: heredar color primario del sitio */
.table {
    --bs-table-color: var(--bs-primary);
    --bs-table-bg: transparent;
    --bs-table-border-color: rgba(var(--bs-primary-rgb), 0.2);
    --bs-table-striped-color: var(--bs-primary);
    --bs-table-active-color: var(--bs-primary);
    --bs-table-hover-color: var(--bs-primary);
}

/* Encabezado de tabla con fondo primary y texto blanco */
.table > thead.thead-primary {
    --bs-table-color: #fff;
    --bs-table-bg: var(--bs-primary);
    --bs-table-border-color: var(--bs-primary);
}

/* Fuente Typekit aplicada globalmente */
body {
    font-family: "poppins", sans-serif;
    color: var(--bs-primary);
}

/* Tamaño del logo del encabezado */
.navbar-brand img {
    max-height: 50px;
}

/* Imágenes del carrusel llenan correctamente */
.carousel-item img {
    object-fit: cover;
    height: 300px;
}

/* Hero mas alto en pantallas grandes */
@media (min-width: 1200px) {
    #hero .carousel-item img {
        height: 450px;
    }
}

/* Utilidad de texto más pequeño */
.smaller {
    font-size: 0.675em;
}

/* Cajas del temporizador - ancho igual con flex + bisel inferior + sombra exterior */
.countdown-box {
    flex: 1 1 0;
    max-width: 80px;
    box-shadow: inset 0 -1px 2px rgba(255, 255, 255, 0.5),
                0 2px 8px rgba(0, 0, 0, 0.25);
}

/* Sección paquetes - suavizar costuras de repetición vertical */
#packages {
    position: relative;
}

#packages::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        to bottom,
        transparent 0%,
        transparent 40%,
        rgba(var(--bs-primary-rgb), 0.08) 50%,
        transparent 60%,
        transparent 100%
    );
    background-size: 100% 576px; /* coincidir con la altura natural de la imagen */
    pointer-events: none;
    z-index: 0;
}

#packages > * {
    position: relative;
    z-index: 1;
}

/* Tarjetas de paquete - bisel inferior + sombra exterior */
#packages .card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

#packages .card-body {
    box-shadow: inset 2px -2px 4px 4px rgba(255, 255, 255, 1);
}

/* Carrusel de paquetes — controles e indicadores */
.packages-carousel .carousel-control-prev,
.packages-carousel .carousel-control-next {
    width: 40px;
    height: 40px;
    top: 50%;
    bottom: auto;
    transform: translateY(-50%);
    background-color: rgba(var(--bs-primary-rgb), 0.6);
    border-radius: 50%;
    opacity: 1;
}

.packages-carousel .carousel-control-prev { left: -8px; }
.packages-carousel .carousel-control-next { right: -8px; }

.packages-carousel .carousel-control-prev:hover,
.packages-carousel .carousel-control-next:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.85);
}

.packages-carousel .carousel-control-prev-icon,
.packages-carousel .carousel-control-next-icon {
    width: 16px;
    height: 16px;
}

.packages-carousel .carousel-indicators {
    position: relative;
    margin-top: 16px;
    justify-content: center;
}

.packages-carousel .carousel-indicators button {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(var(--bs-primary-rgb), 0.3);
    border: none;
    margin: 0 4px;
}

.packages-carousel .carousel-indicators button.active {
    background-color: var(--bs-primary);
}

/* Imagen de tarjeta de paquete */
.card-img-top {
    object-fit: cover;
    height: 220px;
}

/* Insignia CTA flotante */
.floating-cta {
    position: fixed;
    bottom: 450px;
    right: 0px;
    z-index: 1040;
    width: 200px;
}

/* Texto sobre el letrero rojo del piquero */
.floating-cta-text {
    position: absolute;
    bottom: 90px;
    left: 45%;
    transform: translateX(-50%);
    color: white;
    font-size: 0.45rem;
    font-weight: bold;
    text-transform: uppercase;
    text-align: center;
    line-height: 1.2;
    width: 20%;
}

/* Globo de diálogo del piquero - bisel igual que los divisores de ícono */
.speech-bubble {
    background: white;
    color: var(--bs-primary);
    font-size: 0.75rem;
    font-weight: bold;
    padding: 4px 10px;
    border-radius: 20px;
    text-align: center;
    margin-bottom: 4px;
    position: absolute;
    white-space: nowrap;
    box-shadow: inset 3px 3px 6px rgba(var(--bs-primary-rgb), 0.35),
                inset -2px -2px 4px rgba(255, 255, 255, 0.7);
    animation: blink 2s ease-in-out infinite;
    width: 40%;
    left: 15%;
}

.speech-bubble::after {
    content: "";
    position: absolute;
    bottom: -6px;
    right: 25px;
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: white transparent transparent;
}

@keyframes blink {
    0%, 40% { opacity: 1; }
    50% { opacity: 0; }
    90%, 100% { opacity: 1; }
}

/* Círculo biselado reutilizable */
.bevel-circle {
    border-radius: 50%;
    box-shadow: inset 3px 3px 6px rgba(var(--bs-primary-rgb), 0.35),
                inset -2px -2px 4px rgba(255, 255, 255, 0.7);
    animation: hop 2s ease infinite;
}

@keyframes hop {
    0%, 100% { transform: translateY(0); }
    30% { transform: translateY(-8px); }
    50% { transform: translateY(0); }
    65% { transform: translateY(-4px); }
    80% { transform: translateY(0); }
}

/* Hero de imagen única (misma altura que el carrusel) */
.hero-single {
    object-fit: cover;
    height: 300px;
}

/* Pill de día / etiqueta reutilizable */
.day-pill {
    display: inline-block;
    background-color: rgba(var(--bs-primary-rgb), 0.7);
    color: #fff;
    padding: 0.25rem 1rem;
    border-radius: 50rem;
    font-weight: bold;
}

/* Sección con fondo primary al 70% */
.section-primary-glass {
    background-color: rgba(var(--bs-primary-rgb), 0.7);
}

/* ===== Chat Offcanvas ===== */

/* Burbujas de chat - base */
.chat-bubble {
    display: inline-block;
    padding: 0.65rem 1rem;
    font-size: 0.85rem;
    line-height: 1.4;
    max-width: 80%;
}

/* Burbuja del bot (Archi) - izquierda */
.chat-bubble-bot {
    background-color: rgba(var(--bs-primary-rgb), 0.15);
    color: var(--bs-primary);
    border-radius: 0 1rem 1rem 1rem;
}

/* Burbuja del usuario - derecha */
.chat-bubble-user {
    background-color: rgba(var(--bs-primary-rgb), 0.25);
    color: var(--bs-primary);
    border-radius: 1rem 0 1rem 1rem;
    text-align: left;
}

/* Markdown dentro de burbujas del bot */
.chat-md p,
.chat-md ul,
.chat-md ol,
.chat-md h1,
.chat-md h2,
.chat-md h3,
.chat-md h4,
.chat-md h5,
.chat-md h6 {
    margin: 0 0 0.4rem 0;
}

.chat-md p:last-child,
.chat-md ul:last-child,
.chat-md ol:last-child {
    margin-bottom: 0;
}

.chat-md h1, .chat-md h2, .chat-md h3 {
    font-size: 0.9rem;
    font-weight: bold;
}

.chat-md h4, .chat-md h5, .chat-md h6 {
    font-size: 0.85rem;
    font-weight: bold;
}

.chat-md ul, .chat-md ol {
    padding-left: 1.2rem;
}

.chat-md li {
    margin-bottom: 0.15rem;
}

.chat-md strong {
    font-weight: 600;
}

.chat-md table {
    font-size: 0.8rem;
    width: 100%;
    border-collapse: collapse;
    margin: 0.4rem 0;
}

.chat-md th, .chat-md td {
    border: 1px solid rgba(var(--bs-primary-rgb), 0.3);
    padding: 0.2rem 0.4rem;
}

.chat-md th {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    font-weight: 600;
}

/* Indicador de "escribiendo" — tres dots con rebote */
.typing-dots {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 4px 0;
}

.typing-dots span {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: rgba(var(--bs-primary-rgb), 0.5);
    animation: typing-bounce 1.2s ease-in-out infinite;
}

.typing-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing-bounce {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-6px); }
}
