/* ============================================
   RESET & BASE
   ============================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   PALETA — NUEVA
   Fondo:    #F5F0E8  crema cálida
   Superficie: #EDE7D9  crema oscura
   Texto:    #1A1612  tinta
   Muted:    #7A6F63  arena oscura
   Acento:   #2D3561  índigo profundo
   Dorado:   #C49A2B  ámbar profesional
   Coral:    #B85C38  terracota
   Borde:    #D6CCBC  travertino
   Card bg:  #FFFDF9  blanco cálido
   ============================================ */

:root {
    --bg:        #F5F0E8;
    --bg-deep:   #EDE7D9;
    --fg:        #1A1612;
    --muted:     #7A6F63;
    --accent:    #2D3561;
    --gold:      #C49A2B;
    --coral:     #B85C38;
    --border:    #D6CCBC;
    --card:      #FFFDF9;
    --surface:   #EDE7D9;
    --accent-light: #E8EBF8;
    --gold-light:   #FBF3DC;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
}

body {
    font-family: 'DM Sans', sans-serif;
    background: var(--bg);
    min-height: 100vh;
    color: var(--fg);
    overflow-x: hidden;
}

/* ============================================
   BACKGROUND TEXTURE
   ============================================ */
.bg-pattern {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    pointer-events: none;
    z-index: 0;
    background-image:
        radial-gradient(ellipse at 15% 15%, rgba(45,53,97,0.07) 0%, transparent 55%),
        radial-gradient(ellipse at 85% 80%, rgba(196,154,43,0.08) 0%, transparent 50%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%232D3561' fill-opacity='0.025'%3E%3Cpath d='M40 40m-1 0a1 1 0 1 0 2 0a1 1 0 1 0-2 0M0 0m-1 0a1 1 0 1 0 2 0a1 1 0 1 0-2 0M80 0m-1 0a1 1 0 1 0 2 0a1 1 0 1 0-2 0M0 80m-1 0a1 1 0 1 0 2 0a1 1 0 1 0-2 0M80 80m-1 0a1 1 0 1 0 2 0a1 1 0 1 0-2 0'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

/* ============================================
   HEADER
   ============================================ */
.header {
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    background: rgba(245, 240, 232, 0.92);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 1px 0 rgba(26,22,18,0.04);
}

.nav-link {
    position: relative;
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: 0.01em;
    color: var(--muted);
    transition: color 0.25s ease;
    text-decoration: none;
}

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

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px; left: 0;
    width: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    border-radius: 1px;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link:focus::after { width: 100%; }

/* ============================================
   MOBILE MENU
   ============================================ */
.mobile-menu {
    background: var(--card);
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid var(--border);
}

.mobile-menu.open { transform: translateX(0); }

.menu-overlay {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.menu-overlay.open { opacity: 1; visibility: visible; }

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 40px rgba(26,22,18,0.10), 0 0 0 1px rgba(45,53,97,0.08);
    border-color: rgba(45,53,97,0.25);
}

/* ============================================
   CAROUSEL
   ============================================ */
.carousel-container {
    position: relative;
    overflow: hidden;
}

.carousel-track {
    display: flex;
    transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.carousel-slide {
    min-width: 100%;
    flex-shrink: 0;
}

.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255,253,249,0.85);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(214,204,188,0.6);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: opacity 0.3s ease, background 0.2s ease, box-shadow 0.2s ease;
    padding: 0;
}

.carousel-container:hover .carousel-arrow { opacity: 1; }
.carousel-arrow:hover {
    background: rgba(255,253,249,0.98);
    box-shadow: 0 4px 16px rgba(26,22,18,0.12);
}

.carousel-arrow:focus-visible {
    opacity: 1;
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.carousel-arrow--left  { left: 12px; }
.carousel-arrow--right { right: 12px; }

.carousel-dots-wrapper {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 20px 16px 14px;
    display: flex;
    justify-content: center;
    gap: 8px;
    background: linear-gradient(to top, rgba(26,22,18,0.45), transparent);
    z-index: 10;
}

.carousel-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
    flex-shrink: 0;
}

.carousel-dot.active {
    background: #fff;
    width: 22px;
    border-radius: 4px;
}

.carousel-dot:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
}

@media (max-width: 767px) { .carousel-arrow { display: none; } }

/* ============================================
   RADIO PLAYER — nuevo diseño
   ============================================ */
.radio-player {
    background: var(--card);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 24px rgba(26,22,18,0.06);
}

/* Logo estático en el player — SIN rotación */
.player-logo-static {
    width: 44px; height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: var(--surface);
    border: 2px solid var(--border);
    flex-shrink: 0;
}

.player-logo-static img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.logo-spin {
    animation: logoSpin 20s linear infinite;
}

.logo-spin.paused {
    animation-play-state: paused;
}

@keyframes logoSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

/* ----  VISUALIZADOR MEJORADO  ---- */
.player-visualizer {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 30px;
    padding: 2px 0;
}

.visualizer-bar {
    width: 4px;
    border-radius: 2px 2px 1px 1px;
    background: var(--accent);
    opacity: 0.25;
    height: 6px;
    transition: height 0.08s ease, opacity 0.3s ease;
    transform-origin: bottom;
}

/* Cuando está activo, cada barra anima con delay distinto */
.visualizer-bar.active {
    opacity: 1;
    animation: vBar 0.7s ease-in-out infinite alternate;
}

.visualizer-bar:nth-child(1)  { animation-delay: 0.00s; --bar-max: 14px; }
.visualizer-bar:nth-child(2)  { animation-delay: 0.12s; --bar-max: 26px; }
.visualizer-bar:nth-child(3)  { animation-delay: 0.05s; --bar-max: 20px; }
.visualizer-bar:nth-child(4)  { animation-delay: 0.18s; --bar-max: 28px; }
.visualizer-bar:nth-child(5)  { animation-delay: 0.09s; --bar-max: 16px; }
.visualizer-bar:nth-child(6)  { animation-delay: 0.22s; --bar-max: 24px; }
.visualizer-bar:nth-child(7)  { animation-delay: 0.03s; --bar-max: 18px; }

@keyframes vBar {
    from { height: 4px; }
    to   { height: var(--bar-max, 20px); }
}

/* Gradiente ámbar → índigo en las barras activas */
.visualizer-bar.active {
    background: linear-gradient(to top, var(--gold), var(--accent));
}

.play-btn {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    border: none;
    outline: none;
    flex-shrink: 0;
}

.play-btn:hover {
    transform: scale(1.06);
    background: #222849;
    box-shadow: 0 4px 18px rgba(45,53,97,0.35);
}

.play-btn:active  { transform: scale(0.97); }

.play-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(45,53,97,0.3);
}

/* Volume Slider */
.volume-slider {
    -webkit-appearance: none;
    appearance: none;
    width: 80px; height: 3px;
    border-radius: 2px;
    background: var(--border);
    outline: none;
    cursor: pointer;
}

.volume-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 13px; height: 13px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    transition: transform 0.2s ease;
}

.volume-slider::-webkit-slider-thumb:hover { transform: scale(1.25); }

.volume-slider::-moz-range-thumb {
    width: 13px; height: 13px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
}

/* ============================================
   WHATSAPP
   ============================================ */
.whatsapp-btn {
    position: fixed;
    bottom: 88px; right: 20px;
    width: 52px; height: 52px;
    border-radius: 50%;
    background: #25D366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(37,211,102,0.38);
    z-index: 999;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-btn:hover {
    transform: scale(1.08);
    box-shadow: 0 6px 28px rgba(37,211,102,0.48);
}

.whatsapp-btn:focus-visible {
    outline: 3px solid rgba(37,211,102,0.5);
    outline-offset: 3px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    background: var(--accent);
    color: #fff;
    padding: 12px 26px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.01em;
    transition: all 0.25s ease;
    border: none;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn-primary:hover {
    background: #222849;
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(45,53,97,0.28);
}

.btn-primary:focus-visible {
    outline: 3px solid rgba(45,53,97,0.4);
    outline-offset: 2px;
}

.btn-outline {
    background: transparent;
    color: var(--accent);
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 0.875rem;
    border: 1.5px solid rgba(45,53,97,0.3);
    transition: all 0.25s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-outline:hover {
    background: var(--accent-light);
    border-color: var(--accent);
}

/* ============================================
   REVEAL ANIMATION
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   PDF BADGE
   ============================================ */
.pdf-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    background: var(--gold-light);
    border: 1px solid rgba(196,154,43,0.35);
    border-radius: 20px;
    font-size: 11px;
    color: #8A6D1A;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* ============================================
   LIVE DOT
   ============================================ */
.live-dot {
    width: 7px; height: 7px;
    background: #D64040;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
    animation: livePulse 2.2s ease-in-out infinite;
}

@keyframes livePulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50%       { opacity: 0.45; transform: scale(1.25); }
}

/* ============================================
   SECTION DIVIDER LINE
   ============================================ */
.section-rule {
    width: 48px; height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--gold));
    border-radius: 2px;
    margin: 16px auto 0;
}

/* ============================================
   LAYOUT
   ============================================ */
.main-content { padding-bottom: 90px; }

@media (min-width: 768px) { .main-content { padding-bottom: 80px; } }

/* ============================================
   FOCUS
   ============================================ */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============================================
   ICON BADGE (contact cards)
   ============================================ */
.icon-wrap {
    width: 54px; height: 54px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    transition: background 0.25s ease;
}