/* ============================================================
   Colegio de Abogados Chos Malal — IV Circunscripción
   Hoja de estilos global
   ============================================================ */

/* ── Paleta: Azul cielo + blanco limpio ── */
:root {
    --primary:   #1e40af;   /* azul real profundo          */
    --accent:    #93c5fd;   /* azul cielo claro (acento)   */
    --accent2:   #3b82f6;   /* azul vibrante (botones CTA) */
    --accent2h:  #2563eb;   /* hover de accent2            */
    --bg-light:  #eff6ff;   /* fondo celeste muy suave     */
}

/* ── Reset ── */
* {
    box-sizing: border-box;
}

body {
    background: var(--bg-light);
}

/* ── Scrollbar ── */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #a5b4fc;
    border-radius: 9999px;
}

/* ── Mobile menu ── */
#mobile-menu {
    display: none;
}

#mobile-menu.open {
    display: block;
}

/* ── Dropdown (click-based, accesible) ── */
.nav-dropdown {
    display: none;
}

.nav-dropdown.open {
    display: block;
}

/* Focus visible global para navegación por teclado */
:focus-visible {
    outline: 2px solid var(--accent2);
    outline-offset: 3px;
    border-radius: 4px;
}

/* ── Nav active ── */
.nav-active {
    border-bottom: 2px solid var(--accent);
    padding-bottom: 2px;
    color: var(--accent2);
}

/* ── Animations ── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-up {
    animation: fadeUp 0.7s ease both;
}

.delay-1 { animation-delay: 0.15s; }
.delay-2 { animation-delay: 0.30s; }
.delay-3 { animation-delay: 0.45s; }

/* ── Slider ── */
#city-slider {
    position: relative;
    height: 420px;
    overflow: hidden;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 10;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(12, 26, 58, 0.3) 0%, rgba(12, 26, 58, 0.6) 100%);
}

.slide-caption {
    position: absolute;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(12, 26, 58, 0.7);
    backdrop-filter: blur(8px);
    color: #fff;
    padding: 8px 22px;
    border-radius: 9999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.08em;
    white-space: nowrap;
    border: 1px solid rgba(147, 197, 253, 0.45);
}

#slider-dots {
    position: absolute;
    bottom: 14px;
    right: 24px;
    display: flex;
    gap: 6px;
}

.dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    transition: background 0.3s;
}

.dot.active {
    background: var(--accent);
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: background 0.2s;
    backdrop-filter: blur(4px);
}

.slider-arrow:hover {
    background: rgba(0, 0, 0, 0.55);
}

.slider-arrow.left  { left:  14px; }
.slider-arrow.right { right: 14px; }

/* ── Pattern background ── */
.pattern-bg {
    background: var(--bg-light);
    background-image: radial-gradient(circle, rgba(59, 130, 246, 0.07) 1px, transparent 1px);
    background-size: 32px 32px;
}

/* ── Stats card ── */
.stat-card {
    transition: transform 0.25s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
}

/* ── Acceso card ── */
.acceso-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
        height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.acceso-card h3 {
    min-height: 40px;
}

.acceso-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(59, 130, 246, 0.2);
    border-color: rgba(147, 197, 253, 0.5) !important;
}

.acceso-featured {
    border-top: 3px solid var(--accent2) !important;
}

/* ── Service card ── */
.service-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(59, 130, 246, 0.18);
}

/* ── Category label ── */
.cat-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 9999px;
}

/* ── Dark blue background (hero / CTA sections) ── */
.bg-blue-deep {
    background: linear-gradient(135deg, #0c1a3a 0%, #1e3a8a 60%, #1e40af 100%);
}

/* ── Info card (contacto) ── */
.info-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px -12px rgba(19, 91, 236, 0.14);
}

/* ── Map placeholder ── */
.map-placeholder {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    position: relative;
    overflow: hidden;
}

.map-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(19, 91, 236, 0.07) 1px, transparent 1px),
        linear-gradient(90deg, rgba(19, 91, 236, 0.07) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ── Form inputs focus ── */
input:focus,
textarea:focus,
select:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    border-color: var(--accent2) !important;
}

/* ── Form success / error messages ── */
#form-success {
    display: none;
}

#form-success.show {
    display: flex;
}

/* ============================================================
   Estilos de consejo.html e inscripciones.html
   ============================================================ */

/* ── Variable de color secundario (dorado) ── */
:root {
    --secondary: #d4af37;   /* dorado (breadcrumb, acentos) */
}

/* ── Barra de período de mandato ── */
.mandate-bar {
    background: linear-gradient(90deg, var(--primary) 0%, var(--accent2) 100%);
}

/* ── Tarjetas de miembros del Consejo ── */
.member-card {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.member-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px -10px rgba(30, 64, 175, 0.18);
}

/* Borde superior según rol */
.card-presidente {
    border-top: 4px solid var(--accent2) !important;
}

.card-role {
    border-top: 3px solid #e2e8f0 !important;
}

.card-vocal {
    border-top: 3px solid var(--secondary) !important;
}

/* ── Placeholder de foto (cuando no hay imagen) ── */
.photo-placeholder {
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    position: relative;
    overflow: hidden;
}

.photo-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, rgba(30, 64, 175, 0.05) 1px, transparent 1px);
    background-size: 20px 20px;
}
/* ============================================================
   Calculadora de Indemnizaciones (calc_indem.html)
   ============================================================ */

/* ── Colores de texto (reemplaza inline style="color:var(--xxx)") ── */
.color-accent  { color: var(--accent);  }
.color-accent2 { color: var(--accent2); }
.color-primary { color: var(--primary); }

/* ── Fondos de color ── */
.bg-primary    { background: var(--primary); }

/* ── Encabezado de cards (fondo celeste suave) ── */
.card-header-bg { background: rgba(239, 246, 255, 0.6); }

/* ── Hero de la calculadora ── */
.hero-calc {
    background: linear-gradient(120deg, #0c1a3a 40%, #1e3a8a 100%);
    min-height: 22vh;
}

.hero-calc-dots {
    background-image: radial-gradient(circle, rgba(147, 197, 253, 0.4) 1px, transparent 1px);
    background-size: 28px 28px;
}

.hero-icon-box {
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(147, 197, 253, 0.3);
}

/* ── Barra del selector de régimen ── */
.regimen-tab {
    transition: all 0.2s ease;
    cursor: pointer;
}

.regimen-tab.active {
    background: rgba(255, 255, 255, 0.18);
    border-color: rgba(255, 255, 255, 0.6) !important;
    color: white;
    box-shadow: 0 4px 14px -4px rgba(30, 64, 175, 0.4);
}

/* ── Botones tipo toggle (jubilación, tipo trabajador, tasa) ── */
.tipo-btn {
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tipo-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* ── Botón primario (fondo azul) ── */
.btn-primary {
    background: var(--primary);
    color: white;
    transition: opacity 0.2s, transform 0.15s;
}

.btn-primary:hover  { opacity: 0.9; }
.btn-primary:active { transform: scale(0.98); }

/* Estilo para el círculo del slider en Chrome/Safari */
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    background: #4f46e5; /* El color indigo-600 de tu paleta */
    border-radius: 50%;
    cursor: pointer;
}

/* Estilo para el círculo en Firefox */
input[type="range"]::-moz-range-thumb {
    width: 18px;
    height: 18px;
    background: #4f46e5;
    border-radius: 50%;
    cursor: pointer;
    border: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(30, 64, 175, 0.35);
    border: 2px solid white;
}

input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: 2px solid white;
}

input[type="range"]:focus {
    box-shadow: none;
    border-color: transparent !important;
}

/* ── Card de resultado ── */
.result-card-border {
    border-top: 4px solid var(--accent2) !important;
}

.vacio-icon-bg {
    background: rgba(59, 130, 246, 0.08);
}

/* ── Card hover lift ── */
.hover-lift {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 32px -8px rgba(59, 130, 246, 0.15);
}

/* ── Paso de fórmula ── */
.formula-paso {
    background: rgba(239, 246, 255, 0.7);
    border-left: 3px solid var(--accent2);
}

/* ── Animación de resultado ── */
@keyframes slideUp {
    from { opacity: 0; transform: translateY(14px); }
    to   { opacity: 1; transform: translateY(0); }
}

.result-in {
    animation: slideUp 0.4s ease both;
}

/* ── Número grande del resultado ── */
.result-number {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    line-height: 1;
    color: var(--primary);
    letter-spacing: -0.02em;
}

/* ── Estados del panel de resultado ── */
#estado-vacio     { display: flex;  }
#estado-resultado { display: none;  }

/* ── Tooltip de ayuda ── */
.tooltip-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: rgba(59, 130, 246, 0.12);
    color: var(--accent2);
    font-size: 9px;
    font-weight: 900;
    cursor: help;
    vertical-align: middle;
    margin-left: 4px;
}

/* ── Footer oscuro (páginas interiores) ── */
.footer-dark {
    background: #0c1a3a;
    border-top: 4px solid var(--accent2);
}

/* ============================================================
   Clases utilitarias — reemplazan inline styles en index.html
   ============================================================ */

/* Colores de texto */
.text-accent   { color: var(--accent);  }
.text-accent2  { color: var(--accent2); }
.text-primary  { color: var(--primary); }
.text-cyan     { color: #0891b2; }
.text-violet   { color: #7c3aed; }

/* Fondos sólidos */
.bg-accent2         { background: var(--accent2); }
.bg-primary-solid   { background: var(--primary); }
.bg-footer          { background: #0c1a3a; border-top: 4px solid var(--accent2); }

/* Fondos semitransparentes */
.bg-primary-soft   { background: rgba(30,  64,  175, 0.08); }
.bg-accent2-soft   { background: rgba(59,  130, 246, 0.08); }
.bg-indigo-soft    { background: rgba(79,  70,  229, 0.1);  }
.bg-sky-soft       { background: rgba(147, 197, 253, 0.2);  }
.bg-cyan-soft      { background: rgba(8,   145, 178, 0.1);  }
.bg-violet-soft    { background: rgba(124, 58,  237, 0.1);  }

/* Badges de sección */
.badge-accent2          { background: rgba(79, 70, 229, 0.1);    color: var(--accent2); }
.badge-primary          { background: rgba(129, 140, 248, 0.15); color: var(--primary); }
.badge-primary-outline  {
    background: rgba(129, 140, 248, 0.12);
    color: var(--primary);
    border: 1px solid rgba(129, 140, 248, 0.3);
}

/* Separador inferior del footer */
.footer-divider-border { border-color: rgba(147, 197, 253, 0.12); }

/* Posición de botones de slider */
.nav-btn-left  { left:  20px; }
.nav-btn-right { right: 20px; }

.footer-divider {
    border-color: rgba(147, 197, 253, 0.12);
}

/* ── Impresión ── */
@media print {
    nav,
    #btn-imprimir,
    .aviso-legal {
        display: none !important;
    }
    body { background: white; }
    .result-in { animation: none; }
}

/* ============================================================
   Hero Slider (index.html)
   ============================================================ */

#hero-slider {
    position: relative;
    min-height: 60vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

/* ── Slides / imágenes de fondo ── */
#hero-slider .slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 1.3s ease-in-out;
    z-index: 0;
}

#hero-slider .slide.active {
    opacity: 1;
    z-index: 10;
}

#hero-slider .slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Ajustes específicos para cada imagen según el encuadre que pasaste */

/* Imagen 1 (Edificio): Queremos que se vea la parte de arriba del edificio y las torres */
#hero-slider .slide:nth-child(1) img {
    object-position: top center;
}

/* Imagen 2 (Costanera): Queremos que se vean los faroles y la montaña al fondo */
#hero-slider .slide:nth-child(2) img {
    object-position: center left; /* Ajusta esto si los faroles quedan cortados */
}

/* Imagen 3 (Torreón): Queremos que se vea la torre completa sobre la roca */
#hero-slider .slide:nth-child(3) img {
    object-position: top center;
}

/* Imagen 4 (Río): Queremos que se vea el río serpenteando */
#hero-slider .slide:nth-child(4) img {
    object-position: center center;
}

/* ── Overlay oscuro uniforme ── */
.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 20;
    background: rgba(10, 18, 38, 0.52);
}

/* ── Panel flotante de texto ── */
.hero-panel {
    position: relative;
    z-index: 30;
    background: rgba(10, 18, 38, 0.72);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-left: 3px solid #3b82f6;
    border-radius: 0 12px 12px 0;
    padding: 40px 44px 40px 40px;
    max-width: 520px;
    box-shadow: 0 8px 48px rgba(0, 0, 0, 0.35),
                inset 0 0 0 0.5px rgba(255, 255, 255, 0.07);
}

/* ── Línea decorativa vertical izquierda ── */
.hero-deco-line {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(
        180deg,
        transparent 0%,
        #3b82f6 30%,
        #3b82f6 70%,
        transparent 100%
    );
    z-index: 25;
}

/* ── Dots de navegación ── */
.slider-dots {
    position: absolute;
    bottom: 28px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 40;
    display: flex;
    gap: 8px;
    align-items: center;
}

.slider-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.35);
    cursor: pointer;
    border: none;
    padding: 0;
    transition: all 0.35s ease;
}

.slider-dot.active {
    background: #3b82f6;
    width: 22px;
    border-radius: 4px;
}

.slider-dot:hover:not(.active) {
    background: rgba(255, 255, 255, 0.60);
}

/* ── Botones prev / next ── */
.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    width: 46px;
    height: 46px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, border-color 0.2s;
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.20);
    border-color: rgba(255, 255, 255, 0.35);
}


/* ── Contador de slides ── */
.slide-counter {
    position: absolute;
    bottom: 28px;
    right: 36px;
    z-index: 40;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.40);
    font-family: 'Public Sans', sans-serif;
}

.slide-counter span {
    color: rgba(255, 255, 255, 0.85);
}

.acceso-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

/* Fondo con patrón sutil para la sección */


/* Efecto de elevación para las tarjetas de información */
.info-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.info-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 20px -5px rgba(0, 0, 0, 0.05);
    border-color: var(--accent);
}

/* Animación para el icono del formulario */
.hero-icon-box {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
}

/* ── Tab buttons — sistema de colores del sitio ── */
.tab-btn {
    padding: 7px 18px;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.09em;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    background: transparent;
    color: #64748b;
    transition: all 0.15s;
}

.tab-btn.active {
    background: var(--primary);
    color: #fff;
}

.tab-btn:hover:not(.active) {
    background: var(--bg-light);
    color: var(--primary);
}

.tab-panel { display: none; }
.tab-panel.active { display: block; }

/* ── Panel lateral sticky ── */
.side-panel {
    position: sticky;
    top: 92px;
}

/* ── Cards de descarga ── */
.download-card {
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.download-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px -4px rgba(59, 130, 246, 0.15);
    border-color: #bfdbfe !important;
}

/* ── Aviso importante ── */
.aviso-card {
    border-left: 4px solid #f59e0b;
    background: #fffbeb;
}

/* ── Acordeón de requisitos (usa <details>/<summary>) ── */
.req-accordion summary::-webkit-details-marker { display: none; }
.req-accordion summary { list-style: none; }

.req-accordion-summary {
    background: transparent;
    transition: background 0.15s;
}

.req-accordion-summary:hover {
    background: var(--bg-light);
}

.req-accordion[open] .req-chevron {
    transform: rotate(180deg);
}

.req-chevron {
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

/* ── Opciones de juramento (informativas, no son un formulario) ── */
.juramento-opcion {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid #dbeafe;
    background: var(--bg-light);
}

.juramento-letra {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 26px;
    border-radius: 6px;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    flex-shrink: 0;
    letter-spacing: 0;
}

/* ── Badge numerado para pasos de requisitos ── */
.req-step-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 11px;
    font-weight: 900;
    flex-shrink: 0;
    letter-spacing: 0;
}

/* ── Ítem de documento principal ── */
.req-doc-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.875rem;  /* text-sm */
    color: #475569;       /* text-slate-600 */
    padding: 10px 0;
    border-bottom: 1px solid #eff6ff;
    line-height: 1.5;
}

.req-doc-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

/* ── Sub-ítem de nota (nivel 2) ── */
.req-sub-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.75rem;   /* text-xs */
    color: #475569;
    line-height: 1.5;
    padding: 4px 0;
}

/* ── Paso de proceso ── */
.step-card {
    transition: box-shadow 0.2s ease;
}

.step-card:hover {
    box-shadow: 0 8px 28px -8px rgba(30, 64, 175, 0.12);
}

/* ── Header de card lateral consistente ── */
.card-header-inner {
    background: var(--bg-light);
    border-bottom: 1px solid #dbeafe;
}

.nav-group:focus-within .nav-dropdown {
    display: block;
}

/* En style.css, al final */
@media (max-width: 768px) {
    .hero-panel {
        padding: 24px 20px !important;
        max-width: 90% !important;
        margin: 0 auto !important;
        border-radius: 12px !important;
    }
    .hero-panel h1 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }
    .hero-panel p {
        font-size: 0.85rem !important;
    }
    .slide-counter {
        bottom: 12px;
        right: 16px;
        font-size: 9px;
    }
    .nav-btn {
        width: 36px;
        height: 36px;
    }
}

@media (max-width: 480px) {
    .acceso-card h3 {
        font-size: 0.75rem !important;
    }
    .acceso-card p {
        font-size: 0.65rem !important;
    }
}