/* ============================================
   Notaría Durán Palma - Estilos Principales
   Basado en notariaduran.cl
   Fuentes: Roboto (títulos) + Open Sans (cuerpo) + Poppins (nav)
   Acento: #2898ee (azul)
   Textos: #364D59 (body) / #52565E (títulos)
   ============================================ */

:root {
    --azul: #2898ee;
    --azul-hover: #1a7fd4;
    --azul-light: #e8f4fd;
    --texto-body: #364D59;
    --texto-heading: #52565E;
    --texto-muted: #6c757d;
    --gris-oscuro: #2c3e50;
    --gris-footer: #1a1a2e;
    --bg-light: #f8f9fa;
    --border-light: #e9ecef;
}

/* Reset & Base */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 76px;
}

body {
    font-family: 'Open Sans', system-ui, -apple-system, sans-serif;
    color: var(--texto-body);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Roboto', sans-serif;
    color: var(--texto-heading);
}

.text-accent {
    color: var(--azul) !important;
}

/* ---- Navbar ---- */
#mainNav {
    background: #fff;
    transition: all 0.3s ease;
    padding: 15px 0;
    border-bottom: 1px solid transparent;
}

#mainNav.scrolled {
    padding: 10px 0;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    border-bottom: 1px solid var(--border-light);
}

#mainNav .navbar-brand {
    font-family: 'Roboto', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--texto-heading) !important;
}

#mainNav .navbar-brand i {
    color: var(--azul);
}

#mainNav .nav-link {
    font-family: 'Poppins', sans-serif;
    color: #3c3c3c !important;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 14px !important;
    transition: color 0.3s;
    position: relative;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#mainNav .nav-link:hover,
#mainNav .nav-link.active {
    color: var(--azul) !important;
}

#mainNav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 14px;
    right: 14px;
    height: 2px;
    background: var(--azul);
    transform: scaleX(0);
    transition: transform 0.3s;
}

#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after {
    transform: scaleX(1);
}

.navbar-toggler {
    border-color: var(--azul) !important;
}

.navbar-toggler-icon {
    filter: none;
}

/* ---- Hero ---- */
.hero-section {
    min-height: 100vh;
    background: #060606;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1;
}

.hero-title {
    font-family: 'Roboto', sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    color: #fff;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.8);
    letter-spacing: 1px;
}

.hero-divider {
    width: 80px;
    height: 3px;
    background: var(--azul);
}

.hero-text {
    font-size: 1.05rem;
    font-weight: 400;
    line-height: 1.8;
    max-width: 600px;
    margin: 0 auto;
    color: rgba(255, 255, 255, 0.75);
}

.z-1 {
    z-index: 2;
}

/* ---- Buttons ---- */
.btn-accent {
    background: transparent;
    color: #fff;
    border: 2px solid var(--azul);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    border-radius: 50px;
    padding: 12px 35px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-accent:hover {
    background: var(--azul);
    color: #fff;
    border-color: var(--azul);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 152, 238, 0.35);
}

.btn-accent-solid {
    background: var(--azul);
    color: #fff;
    border: 2px solid var(--azul);
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 14px;
    border-radius: 50px;
    padding: 12px 35px;
    transition: all 0.3s ease;
}

.btn-accent-solid:hover {
    background: var(--azul-hover);
    border-color: var(--azul-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 152, 238, 0.35);
}

.btn-accent-sm {
    background: var(--azul);
    color: #fff;
    border: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 500;
    font-size: 13px;
    border-radius: 50px;
    padding: 8px 22px;
    transition: all 0.3s ease;
}

.btn-accent-sm:hover {
    background: var(--azul-hover);
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(40, 152, 238, 0.3);
}

/* ---- Section Common ---- */
.section-padding {
    padding: 80px 0;
}

.section-title {
    font-family: 'Roboto', sans-serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--texto-heading);
    margin-bottom: 10px;
}

.section-divider {
    width: 50px;
    height: 3px;
    background: var(--azul);
    margin-bottom: 15px;
}

.section-subtitle {
    color: var(--texto-muted);
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

.bg-section-dark {
    background: var(--gris-oscuro);
}

/* Fondo servicios más oscuro para destacar tarjetas blancas */
#servicios.bg-light {
    background: #e6ecf2 !important;
}

/* ---- Service Cards ---- */
.service-card {
    background: #fff;
    border-radius: 0;
    padding: 35px 25px;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid var(--border-light);
    box-shadow: 0 2px 8px rgba(44, 62, 80, 0.04);
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 30px rgba(40, 152, 238, 0.15);
    border-color: var(--azul);
}

.service-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--azul-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s;
}

.service-icon i {
    font-size: 1.6rem;
    color: var(--azul);
}

.service-card:hover .service-icon {
    background: var(--azul);
}

.service-card:hover .service-icon i {
    color: #fff;
}

.service-card h5 {
    font-family: 'Roboto', sans-serif;
    color: var(--texto-heading);
    font-weight: 600;
    margin-bottom: 12px;
}

.service-card p {
    color: var(--texto-muted);
    font-size: 0.92rem;
    line-height: 1.7;
    margin-bottom: 0;
}

/* ---- Index Cards ---- */
.index-card {
    background: linear-gradient(180deg, #f4f8fc 0%, #ffffff 100%);
    border-radius: 0;
    padding: 35px 25px;
    transition: all 0.3s ease;
    border: 1px solid #d9e2ec;
    cursor: default;
    position: relative;
    box-shadow: 0 3px 12px rgba(44, 62, 80, 0.06);
}

.index-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--azul);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.index-card:hover {
    border-color: var(--azul);
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(40, 152, 238, 0.18);
}

.index-card:hover::before {
    opacity: 1;
}

.index-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--azul-light);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.index-icon i {
    font-size: 2rem;
    color: var(--azul);
}

.index-card h5 {
    font-family: 'Roboto', sans-serif;
    color: var(--texto-heading);
    font-weight: 600;
}

.index-card p {
    color: var(--texto-muted);
    font-size: 0.9rem;
}

/* ---- About / Stats ---- */
.about-content h3 {
    color: var(--azul) !important;
}

.about-content p {
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.about-stat {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(40, 152, 238, 0.2);
    border-radius: 0;
    padding: 30px 15px;
    transition: all 0.3s;
}

.about-stat:hover {
    background: rgba(40, 152, 238, 0.08);
    border-color: var(--azul);
    transform: translateY(-3px);
}

.stat-number {
    font-family: 'Roboto', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--azul);
    line-height: 1;
    margin-bottom: 10px;
}

.stat-label {
    font-family: 'Poppins', sans-serif;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* ---- FAQ Accordion ---- */
.accordion-item {
    border: 1px solid #e0e0e0;
    margin-bottom: 10px;
    border-radius: 0 !important;
    overflow: hidden;
}

.accordion-button {
    font-family: 'Open Sans', sans-serif;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--texto-heading);
    padding: 18px 20px;
    background: #fff;
}

.accordion-button:not(.collapsed) {
    background: var(--azul-light);
    color: var(--texto-heading);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: 0 0 0 0.2rem rgba(40, 152, 238, 0.2);
    border-color: var(--azul);
}

.accordion-button::after {
    filter: none;
}

.accordion-body {
    font-size: 0.93rem;
    line-height: 1.7;
    color: var(--texto-muted);
}

/* ---- Info Cards ---- */
.info-card {
    background: linear-gradient(180deg, #f4f8fc 0%, #ffffff 100%);
    border-radius: 0;
    padding: 30px 20px;
    border: 1px solid #d9e2ec;
    transition: all 0.3s;
    position: relative;
    box-shadow: 0 3px 12px rgba(44, 62, 80, 0.06);
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--azul);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 28px rgba(40, 152, 238, 0.18);
    border-color: var(--azul);
}

.info-card:hover::before {
    opacity: 1;
}

.info-icon {
    font-size: 2rem;
    color: var(--azul);
    margin-bottom: 15px;
}

.info-card h6 {
    font-family: 'Roboto', sans-serif;
    color: var(--texto-heading);
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 10px;
}

.info-card p {
    font-size: 0.88rem;
    color: var(--texto-muted);
}

.info-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    height: 100%;
}

.info-card-link:hover {
    text-decoration: none;
    color: inherit;
}

.btn-aranceles {
    background: transparent !important;
    color: #1a7fd4 !important;
    border: 2px solid #1a7fd4 !important;
    font-family: 'Poppins', sans-serif !important;
    font-weight: 600 !important;
    font-size: 13px !important;
    border-radius: 50px !important;
    padding: 8px 22px !important;
    transition: all 0.3s !important;
    text-decoration: none !important;
}

.btn-aranceles:hover,
.info-card-link:hover .btn-aranceles {
    background: #1a7fd4 !important;
    border-color: #1a7fd4 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(40, 152, 238, 0.35) !important;
}

.map-container {
    border: 2px solid var(--border-light);
}

/* ---- Link Cards (Links de interés) ---- */
.link-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: linear-gradient(180deg, #f4f8fc 0%, #ffffff 100%);
    border: 1px solid #d9e2ec;
    padding: 16px 18px;
    text-decoration: none;
    color: var(--texto-heading);
    transition: all 0.3s ease;
    position: relative;
    height: 100%;
    box-shadow: 0 3px 10px rgba(44, 62, 80, 0.05);
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 3px;
    background: var(--azul);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.link-card:hover {
    transform: translateY(-3px);
    border-color: var(--azul);
    box-shadow: 0 10px 24px rgba(40, 152, 238, 0.18);
    color: var(--texto-heading);
}

.link-card:hover::before {
    opacity: 1;
}

.link-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.link-icon img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.link-body {
    flex: 1;
    min-width: 0;
}

.link-body h6 {
    font-family: 'Roboto', sans-serif;
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--texto-heading);
    margin: 0 0 3px 0;
    line-height: 1.3;
}

.link-meta {
    font-family: 'Open Sans', sans-serif;
    font-size: 0.78rem;
    color: var(--texto-muted);
    word-break: break-all;
}

.link-arrow {
    flex-shrink: 0;
    color: var(--azul);
    font-size: 0.95rem;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.link-card:hover .link-arrow {
    opacity: 1;
}

/* ---- Contact Form ---- */
#contacto .form-label {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 6px;
}

#contacto .form-control,
#contacto .form-select {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    border-radius: 0;
    padding: 12px 15px;
}

#contacto .form-control:focus,
#contacto .form-select:focus {
    background: rgba(255, 255, 255, 0.12);
    border-color: var(--azul);
    box-shadow: 0 0 0 0.2rem rgba(40, 152, 238, 0.2);
    color: #fff;
}

#contacto .form-control::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

/* Evitar que Chrome autofill pinte los inputs de blanco/beige */
#contacto .form-control:-webkit-autofill,
#contacto .form-control:-webkit-autofill:hover,
#contacto .form-control:-webkit-autofill:focus,
#contacto .form-control:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px var(--gris-oscuro) inset !important;
    -webkit-text-fill-color: #fff !important;
    caret-color: #fff !important;
    transition: background-color 9999s ease-in-out 0s;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

#contacto .form-select option {
    background: var(--gris-oscuro);
    color: #fff;
}

/* Validación visual sobre fondo oscuro */
#contacto .form-control.is-valid,
#contacto .form-select.is-valid {
    border-color: #4ade80;
    background-image: none;
    padding-right: 15px;
}

#contacto .form-control.is-invalid,
#contacto .form-select.is-invalid {
    border-color: #f87171;
    background-image: none;
    padding-right: 15px;
}

#contacto .form-control.is-valid:focus {
    box-shadow: 0 0 0 0.2rem rgba(74, 222, 128, 0.2);
}

#contacto .form-control.is-invalid:focus {
    box-shadow: 0 0 0 0.2rem rgba(248, 113, 113, 0.2);
}

/* Asterisco campos obligatorios */
#contacto .req {
    color: #f87171;
    font-weight: 700;
    margin-left: 2px;
}

#contacto .form-required-note {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 1rem !important;
}

/* Mensajes de error inline (override Bootstrap para fondo oscuro) */
#contacto .invalid-feedback {
    color: #fca5a5;
    font-size: 0.82rem;
    margin-top: 6px;
    font-weight: 500;
}

#contacto .invalid-feedback::before {
    content: "\F33A"; /* bi-exclamation-circle-fill */
    font-family: "bootstrap-icons";
    margin-right: 6px;
}

/* ---- Footer ---- */
.footer-section {
    background: var(--gris-footer);
    color: rgba(255, 255, 255, 0.45);
    font-size: 0.85rem;
}

.footer-link {
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: #2898ee;
    text-decoration: underline;
}

/* ---- Back to Top Button ---- */
.btn-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 42px;
    height: 42px;
    border-radius: 0;
    background: var(--azul);
    color: #fff;
    border: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-top.visible {
    opacity: 1;
    visibility: visible;
}

.btn-top:hover {
    background: var(--azul-hover);
    transform: translateY(-3px);
}

/* ---- Animations ---- */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease-out;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---- Responsive ---- */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-padding {
        padding: 60px 0;
    }

    .section-title {
        font-size: 1.8rem;
    }

    #navbarNav {
        background: #fff;
        border-radius: 0;
        padding: 15px;
        margin-top: 10px;
        border-top: 1px solid var(--border-light);
    }
}

@media (max-width: 575px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .section-padding {
        padding: 50px 0;
    }

    .stat-number {
        font-size: 2rem;
    }
}

/* Turnos */
.turno-card {
    background: linear-gradient(145deg, #ffffff 0%, #f0f7fc 100%);
    border: 1px solid #d9e2ec;
    border-radius: 8px;
    padding: 22px 10px 18px;
    box-shadow: 0 2px 10px rgba(44, 62, 80, 0.06);
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
    position: relative;
    overflow: hidden;
}
.turno-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, #2898ee, #1a7fd4);
}
.turno-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 18px rgba(40, 152, 238, 0.18);
    border-color: #2898ee;
}
.turno-card .turno-day {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 2.4rem;
    color: #2898ee;
    line-height: 1;
    margin-bottom: 4px;
}
.turno-card .turno-month {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    color: #2c3e50;
    text-transform: uppercase;
    letter-spacing: 1px;
}
.turno-card .turno-year {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 2px;
}
