/* =========================================
   VARIABLES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
    --primary: #0c2340;
    --secondary: #003366; /* Azul Marino Institucional */
    --accent: #c5a059; /* Dorado Institucional */
    --bg-light: #f4f7f6;
    --text: #333;
    --white: #ffffff;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 110px; 
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    /* Elimina el parpadeo azul nativo al tocar en celulares */
    -webkit-tap-highlight-color: transparent; 
}

body { 
    font-family: 'Inter', sans-serif; 
    color: var(--text); 
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3 { font-family: 'Playfair Display', serif; }

.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.section-padding { padding: 80px 0; }
.bg-light { background-color: var(--bg-light); }
.text-white { color: var(--white); }
.mt-2 { margin-top: 2rem; }

/* =========================================
   CLASES PARA ANIMACIÓN AL HACER SCROLL
   ========================================= */
.fade-in-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, visibility;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: none;
}

/* =========================================
   MENÚ DE NAVEGACIÓN (TRANSICIONES SUAVES)
   ========================================= */
.main-header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    padding: 10px 20px; 
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-wrapper { max-width: 1200px; margin: 0 auto; width: 100%; display: flex; justify-content: center; }

.navbar {
    width: 100%; padding: 15px 30px; background: rgba(255, 255, 255, 0.85); 
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.6); border-radius: 8px;
    display: flex; align-items: center; justify-content: space-between;
    gap: 30px; 
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* =========================================
   LOGO: EFECTOS Y TEXTO ADICIONAL
   ========================================= */
.logo {
    position: relative; height: 30px; width: max-content; min-width: 90px; 
    padding-right: 15px; display: flex; align-items: center; text-decoration: none; 
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-img-wrapper {
    position: absolute; top: 50%; left: 0; width: 80px; height: 80px; 
    margin-top: -40px; overflow: hidden; border-radius: 0; 
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-img {
    width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0px 8px 16px rgba(0, 0, 0, 0.25));        
    transform-origin: center center; 
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-glow-effect { animation: timbreNotariaReducido 0.7s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards, logoInitialGlowFade 2s ease-out 0.8s; }

.logo-img-wrapper::after {
    content: ''; position: absolute; top: 0; left: -150%; width: 100%; height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 30%, rgba(255,255,255,0.4) 50%, rgba(255,255,255,0) 70%);
    transition: all 0.6s ease; z-index: 2;
}

.logo:hover .logo-img-wrapper::after { left: 150%; }
.logo:hover .logo-img { transform: scale(0.96) !important; filter: brightness(0) drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.4)) !important; cursor: pointer; }

/* Texto del Logo en Dorado */
.logo-text-header {
    margin-left: 95px; font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1rem;
    color: var(--accent); line-height: 1.1; border-left: 2px solid var(--accent); padding-left: 12px;
    opacity: 0; clip-path: inset(0 100% 0 0); animation: revelarEscritura 1.5s cubic-bezier(0.25, 1, 0.5, 1) forwards; animation-delay: 0.6s; 
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ESTADO SCROLLED */
.main-header.scrolled { padding: 20px 20px; }
.main-header.scrolled .navbar {
    width: max-content; border-radius: 60px; background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15); padding: 10px 35px; gap: 20px; 
}

.main-header.scrolled .logo { min-width: 60px; }
.main-header.scrolled .logo-img-wrapper { height: 55px; width: 55px; margin-top: -27.5px; border-radius: 0; animation: none; }
.main-header.scrolled .logo-img { filter: brightness(0) drop-shadow(0px 2px 4px rgba(0, 0, 0, 0.3)) !important; }
.main-header.scrolled .logo-text-header { margin-left: 70px; font-size: 0.85rem; padding-left: 10px; animation: none; clip-path: inset(0 0 0 0); opacity: 1; }
.main-header.scrolled .menu-toggle { font-size: 1.5rem; margin-right: -10px; }

/* ANIMACIONES */
@keyframes timbreNotariaReducido {
    0% { opacity: 0; transform: scale(1.6) rotate(-10deg); }
    50% { opacity: 1; transform: scale(0.95) rotate(3deg); }
    75% { transform: scale(1.02) rotate(-1deg); }
    100% { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes logoInitialGlowFade {
    0% { filter: drop-shadow(0px 8px 16px rgba(0, 0, 0, 0.25)) drop-shadow(0px 0px 5px rgba(197, 160, 89, 0)); }
    30% { filter: drop-shadow(0px 8px 16px rgba(0, 0, 0, 0.25)) drop-shadow(0px 0px 15px rgba(197, 160, 89, 1)); }
    100% { filter: drop-shadow(0px 8px 16px rgba(0, 0, 0, 0.25)) drop-shadow(0px 0px 5px rgba(197, 160, 89, 0)); }
}

@keyframes revelarEscritura {
    0% { clip-path: inset(0 100% 0 0); opacity: 0; }
    20% { opacity: 1; }
    100% { clip-path: inset(0 0 0 0); opacity: 1; }
}

/* =========================================
   MENÚ HAMBURGUESA Y ENLACES
   ========================================= */
.nav-links { display: flex; list-style: none; gap: 20px; align-items: center; }
.nav-links li { white-space: nowrap; }
.mobile-only { display: none; } 

.nav-links a { 
    color: var(--primary); font-weight: 700; text-decoration: none; font-size: 0.85rem;
    text-transform: uppercase; letter-spacing: 1.2px; text-shadow: 0px 1px 2px rgba(255, 255, 255, 1); 
    position: relative; padding-bottom: 5px; transition: all 0.3s ease; 
}

.nav-links a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 50%;
    background-color: var(--accent); transition: all 0.3s ease; transform: translateX(-50%);
}

.nav-links a:hover { color: var(--accent); }
.nav-links a:hover::after { width: 100%; }
.nav-links a:active { transform: scale(0.95); color: var(--accent); }

.menu-toggle { 
    display: none; font-size: 1.8rem; color: var(--primary); cursor: pointer; 
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); 
}
.menu-toggle:hover { color: var(--accent); transform: scale(1.15) rotate(5deg); }
.menu-toggle:active { transform: scale(0.85); color: var(--accent); opacity: 0.8; }

/* =========================================
   ESTILOS DE BOTONES
   ========================================= */
.btn-primary, .btn-secondary, .btn-outline, .btn-outline-dark, .btn-dark, .btn-gold {
    text-shadow: none !important;
}

.btn-primary { 
    background: var(--secondary); color: var(--white); padding: 12px 25px; border-radius: 50px; 
    text-decoration: none; font-weight: 700; transition: all 0.3s ease; border: 2px solid transparent; 
}
.btn-primary:hover { 
    background: var(--primary); border-color: var(--accent); box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}
.btn-primary:active { transform: scale(0.95); }

.nav-links a.btn-primary { color: var(--white) !important; }
.nav-links a.btn-primary:hover { color: var(--accent) !important; }
.nav-links a.btn-primary::after { display: none; }

.btn-gold {
    background: var(--accent); color: var(--white); padding: 15px 30px; border-radius: 5px; 
    text-decoration: none; font-weight: 700; display: inline-block; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(197, 160, 89, 0.3);
}
.btn-gold:hover { background: #b08d4b; color: var(--white) !important; transform: translateY(-2px); box-shadow: 0 6px 15px rgba(197, 160, 89, 0.5); }
.btn-gold:active { transform: scale(0.95); }
.nav-links a.btn-gold::after { display: none; }

.btn-secondary { background: var(--white); color: var(--primary); padding: 15px 30px; border-radius: 5px; text-decoration: none; font-weight: 700; transition: 0.3s;}
.btn-secondary:hover { background: var(--bg-light); }
.btn-secondary:active { transform: scale(0.95); }

.btn-outline { border: 2px solid var(--white); color: var(--white); padding: 13px 30px; border-radius: 5px; text-decoration: none; font-weight: 700; transition: 0.3s;}
.btn-outline:hover { background: var(--white); color: var(--primary); }
.btn-outline:active { transform: scale(0.95); }

.btn-outline-dark { 
    border: 2px solid var(--secondary); color: var(--secondary); padding: 13px 30px; border-radius: 5px; 
    text-decoration: none; font-weight: 700; transition: all 0.3s ease; display: inline-block;
}
.btn-outline-dark:hover { 
    background: var(--secondary); color: var(--white) !important; border-color: var(--secondary); 
    transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
}
.btn-outline-dark:active { transform: scale(0.95); }

.btn-dark { 
    background: var(--primary); color: var(--white); display: block; padding: 15px; border-radius: 5px; 
    text-decoration: none; text-align: center; margin-top: 20px; transition: all 0.3s ease; 
    border: 2px solid transparent; font-weight: 600;
}
.btn-dark:hover { 
    background: var(--secondary); border-color: var(--accent); color: var(--accent) !important; 
    transform: translateY(-3px); box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
}
.btn-dark:active { transform: scale(0.95); }

/* =========================================
   HERO SECTION 
   ========================================= */
.hero { position: sticky; top: 0; z-index: 1; min-height: 100vh; display: flex; align-items: center; justify-content: center; text-align: center; color: var(--white); overflow: hidden; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(12, 35, 64, 0.7); z-index: 1; pointer-events: none; }
.hero-slider { position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero-content { position: relative; z-index: 50; pointer-events: auto; max-width: 900px; padding: 0 20px; display: flex; flex-direction: column; align-items: center; gap: 25px; margin-top: 80px; }

.hero-badges-wrapper { display: flex; flex-direction: column; gap: 15px; margin-top: 30px; width: 100%; }
.hero-badges-row { display: flex; gap: 15px; flex-wrap: wrap; justify-content: center; }
.hero-schedule-badge {
    background: rgba(0, 51, 102, 0.85); border: 1px solid var(--accent); padding: 8px 20px; border-radius: 50px;
    font-size: 0.95rem; font-weight: 600; color: var(--white); backdrop-filter: blur(5px); display: inline-flex; align-items: center; transition: all 0.2s ease-in-out;
}
.hero-schedule-badge i { color: var(--accent); margin-right: 8px; font-size: 1.1rem; }
.hero-schedule-badge:hover { background: var(--white); border-color: #000000; color: #000000; box-shadow: inset 0 0 0 1px #000000, 0px 4px 10px rgba(0, 0, 0, 0.4); transform: scale(0.96); cursor: pointer; }
.hero-schedule-badge:hover i { color: #000000; }
.hero-schedule-badge:active { transform: scale(0.92); }

.hero-content h2 { font-size: 3.5rem; text-shadow: 0px 2px 5px rgba(0,0,0,0.5); }
.hero-content p { font-size: 1.2rem; font-weight: 300; }
.hero-actions { display: flex; gap: 15px; margin-top: 10px; }

.slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: cover; background-position: center; opacity: 0; animation: fadeSlider 20s infinite; }
.slide:nth-child(1) { animation-delay: 0s; }
.slide:nth-child(2) { animation-delay: 5s; }
.slide:nth-child(3) { animation-delay: 10s; }
.slide:nth-child(4) { animation-delay: 15s; }
@keyframes fadeSlider { 0% { opacity: 0; } 10% { opacity: 1; } 25% { opacity: 1; } 35% { opacity: 0; } 100% { opacity: 0; } }

/* =========================================
   CONTENIDO DESLIZABLE Y TÍTULOS 
   ========================================= */
.content-wrapper { position: relative; z-index: 10; background-color: var(--white); box-shadow: 0 -10px 30px rgba(0,0,0,0.2); }

#servicios { padding-top: 30px !important; padding-bottom: 30px !important; }

.section-title { 
    text-align: center; font-size: 2.2rem; color: var(--primary); position: relative;
    padding-bottom: 10px; margin-bottom: 5px; 
}
.section-title::after {
    content: ''; position: absolute; width: 60px; height: 3px; background: var(--accent);
    bottom: 0; left: 50%; transform: translateX(-50%); border-radius: 3px; transition: width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.section-title:hover::after { width: 150px; }

.section-subtitle { text-align: center; margin-bottom: 30px; color: #666; font-size: 1.05rem; transition: color 0.3s ease; }
.section-subtitle:hover { color: var(--primary); }

/* =========================================
   DISEÑO DE EQUIPO Y TABLAS 
   ========================================= */
.grid-staff { 
    display: grid; 
    grid-template-columns: repeat(4, 1fr); 
    gap: 20px; 
    perspective: 1000px; 
}

.staff-card { 
    background: var(--bg-light); padding: 20px; border-radius: 10px; 
    border-left: 5px solid var(--secondary); border-right: 5px solid var(--accent); 
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}
.staff-card:hover {
    transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0, 51, 102, 0.15); 
    background: var(--white); border-left-color: var(--accent); border-right-color: var(--secondary);
}

.staff-header { 
    background: var(--primary); color: var(--white); padding: 8px 10px; 
    margin-bottom: 12px; border-radius: 3px; font-weight: 700; display: flex; align-items: center;
}
.staff-header i { margin-right: 10px; color: var(--accent); font-size: 1.1rem; transition: transform 0.4s ease, color 0.3s ease; }
.staff-card:hover .staff-header i { transform: rotate(15deg) scale(1.2); color: var(--white); }

.staff-card ul { list-style: none; }
.staff-card li { 
    margin-bottom: 8px; font-size: 0.9rem; border-bottom: 1px solid #ddd; 
    padding-bottom: 8px; transition: all 0.3s ease;
}
.staff-card li:hover {
    padding-left: 10px; border-bottom-color: var(--accent); 
    background: linear-gradient(90deg, rgba(197, 160, 89, 0.08) 0%, rgba(255,255,255,0) 80%); border-radius: 4px;
}

.staff-card a { color: var(--secondary); text-decoration: none; font-size: 0.95rem; margin-left: 5px; transition: all 0.3s; display: inline-block;}
.staff-card a:hover { color: var(--accent); transform: scale(1.2); }
.staff-card a:active { transform: scale(0.9); }
.staff-details { display: flex; flex-direction: column; }
.staff-role { font-size: 0.75rem; color: #666; margin-top: -3px; margin-bottom: 0px; transition: color 0.3s;}
.staff-card li:hover .staff-role { color: var(--primary); }
.email-area { font-size: 0.85rem; color: #555; margin-bottom: 10px; font-style: italic; display: flex; align-items: center; gap: 8px;}
.email-area a { font-size: 0.95rem; color: var(--secondary); }

/* TABLAS CLASES GLOBALES (INCLUYENDO STICKY HEADER REPARADO) */
.table-premium { 
    width: 100%; 
    border-collapse: separate; 
    border-spacing: 0; 
    font-size: 0.9rem; 
    background: var(--white); 
}
.table-premium th { 
    position: sticky; 
    top: 0; 
    z-index: 10; 
    background: #eef2f5; 
    color: var(--primary); 
    font-weight: 700; 
    text-transform: uppercase; 
    font-size: 0.75rem; 
    letter-spacing: 1px; 
    padding: 15px; 
    text-align: left; 
    border-bottom: 2px solid var(--accent); 
}
.table-premium td {
    padding: 12px 15px; 
    border-bottom: 1px solid #eee; 
    transition: all 0.3s ease;
    white-space: nowrap; 
}
.table-premium tr:hover td { background-color: rgba(197, 160, 89, 0.05); color: var(--primary); }

.table-responsive { 
    max-height: 450px; 
    overflow-y: auto; 
    overflow-x: auto; 
    margin-top: 20px; 
    border-radius: 8px; 
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    background: var(--white);
}
.table-responsive::-webkit-scrollbar { width: 6px; height: 6px; }
.table-responsive::-webkit-scrollbar-track { background: transparent; }
.table-responsive::-webkit-scrollbar-thumb { background: var(--accent); border-radius: 10px; }

/* =========================================
   VALIDACIÓN FOJAS
   ========================================= */
.validacion-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    align-items: stretch;
}

.fojas-clean-container {
    width: 100%;
    height: 65vh; 
    min-height: 450px; 
    overflow-y: auto; 
    overflow-x: hidden; 
    border-radius: 8px;
    background: var(--white);
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid #eaeaea;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.fojas-clean-container::-webkit-scrollbar {
    display: none; 
}

.fojas-inner-wrapper {
    margin-top: -150px; 
    height: 1200px; 
    width: calc(100% + 25px); 
}

.fojas-inner-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
    pointer-events: auto;
}

/* =========================================
   ESTILOS DEL FAQ ACORDEÓN
   ========================================= */
.faq-container {
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: var(--white);
    border: 1px solid #eaeaea;
    border-radius: 8px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(197, 160, 89, 0.5);
}

.faq-item.active {
    border-color: var(--accent);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 20px 25px;
    background: transparent;
    border: none;
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--accent);
}

.faq-question i {
    color: var(--accent);
    font-size: 1.1rem;
    transition: transform 0.4s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding: 0 25px;
}

.faq-item.active .faq-answer {
    padding-bottom: 25px;
}

.faq-answer p {
    font-size: 0.95rem;
    color: #555;
    margin: 0;
    border-top: 1px dashed #eaeaea;
    padding-top: 15px;
    line-height: 1.6;
}

/* =========================================
   ENLACES EXTERNOS 
   ========================================= */
.grid-links { display: grid; gap: 20px; grid-template-columns: repeat(3, 1fr); }

.link-card {
    background: var(--primary); color: var(--white); padding: 30px 20px; border-radius: 12px;
    text-align: center; text-decoration: none; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 15px; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.1); box-shadow: 0 5px 15px rgba(0,0,0,0.1); position: relative; overflow: hidden;
}

.link-card i { font-size: 2.5rem; color: var(--accent); transition: transform 0.4s ease, color 0.3s ease; }
.link-card span { font-weight: 600; font-size: 1.05rem; letter-spacing: 0.5px; position: relative; z-index: 2; }
.link-card::before {
    content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.1) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg); transition: left 0.7s ease; z-index: 1;
}

.link-card:hover {
    transform: translateY(-8px); background: var(--secondary); border-color: var(--accent);
    box-shadow: 0 15px 30px rgba(12, 35, 64, 0.25); color: var(--white); 
}
.link-card:hover::before { left: 200%; }
.link-card:hover i { transform: scale(1.2) translateY(-5px); color: var(--white); }
.link-card:active { transform: scale(0.95); }

/* =========================================
   ÍNDICES
   ========================================= */
.grid-archivos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

.file-card {
    background: var(--white); padding: 20px 25px; border-radius: 8px; text-decoration: none; display: flex;
    align-items: center; justify-content: center; gap: 15px; border: 1px solid #eaeaea; box-shadow: 0 4px 10px rgba(0,0,0,0.03);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); color: var(--primary);
}

.file-card i { font-size: 2rem; color: var(--accent); transition: transform 0.3s ease; }
.file-card span { font-weight: 700; font-size: 1.1rem; }
.file-card:hover {
    transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 10px 25px rgba(197, 160, 89, 0.15); color: var(--secondary);
}
.file-card:hover i { transform: scale(1.1) rotate(-5deg); }
.file-card:active { transform: scale(0.95); }

/* =========================================
   DISEÑO DE TURNOS
   ========================================= */
.grid-turnos { display: grid; grid-template-columns: 1.5fr 1fr; gap: 30px; }
.card { background: var(--white); padding: 30px; border-radius: 10px; box-shadow: 0 5px 15px rgba(0,0,0,0.05); }

.card-destacada { background: var(--primary); color: var(--white); border-top: 4px solid var(--accent); }
.card-destacada h3 { color: var(--accent); margin-bottom: 10px; border-bottom: 1px solid rgba(255, 255, 255, 0.3); padding-bottom: 15px;}

.grid-fechas-turnos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 15px; margin-top: 25px; }

.fecha-turno {
    background: rgba(255, 255, 255, 0.05); 
    border: 1px solid rgba(255, 255, 255, 0.15); 
    padding: 15px 10px;
    border-radius: 8px; font-weight: 600; text-align: center; display: flex; align-items: center; justify-content: center;
    color: var(--white); transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); line-height: 1.3;
    cursor: pointer; 
}

.fecha-turno:hover { 
    background: rgba(255, 255, 255, 0.1); transform: translateY(-5px); 
    border-color: var(--accent); color: var(--accent); box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}
.fecha-turno:active { transform: scale(0.95); }

.fecha-turno.proximo-turno {
    background: var(--accent); color: var(--primary); border: 2px solid var(--white); position: relative;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); transform: scale(1.05); z-index: 2;
}
.fecha-turno.proximo-turno:hover { 
    transform: scale(1.05) translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    color: var(--primary); border-color: var(--white);
}

.fecha-turno.proximo-turno::before {
    content: 'PRÓXIMO TURNO'; position: absolute; top: -12px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: var(--white); font-size: 0.6rem; font-weight: 700; padding: 4px 10px;
    border-radius: 20px; letter-spacing: 1px; white-space: nowrap; border: 1px solid var(--accent);
}

/* =========================================
   FORMULARIO DE CONTACTO Y MAPA
   ========================================= */
#turnos { padding-bottom: 40px !important; }

.contacto { margin-top: 0 !important; padding-top: 30px !important; padding-bottom: 30px !important; min-height: calc(100vh - 60px); display: flex; align-items: center; position: relative; z-index: 2; }
.contacto .container { max-width: 1300px; width: 100%; }
.contacto .section-title { margin-bottom: 5px; }
.contacto .section-subtitle { margin-bottom: 25px; }
.grid-contacto { display: grid; grid-template-columns: 1fr 1fr; gap: 25px; }

.form-container, .map-container { 
    padding: 25px 35px; background: var(--white); border-radius: 8px; 
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
}
.map-container { padding: 10px; display: flex; }
.map-container iframe { width: 100%; min-height: 100%; height: 100%; flex-grow: 1; }

.form-container:hover, .map-container:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0, 51, 102, 0.15);
}

.contact-form .form-group { margin-bottom: 12px; }
.contact-form label { display: block; margin-bottom: 5px; font-weight: 600; color: var(--primary); font-size: 0.9rem; }
.contact-form input, .contact-form select, .contact-form textarea { 
    width: 100%; padding: 10px 15px; border: 1px solid #dcdcdc; border-radius: 5px; 
    font-family: 'Inter', sans-serif; font-size: 0.95rem; color: var(--text); 
    background-color: #fafafa; transition: border-color 0.3s ease, box-shadow 0.3s ease; 
}
.contact-form textarea { height: 90px; resize: none; }

.contact-form input:hover, .contact-form select:hover, .contact-form textarea:hover {
    border-color: rgba(197, 160, 89, 0.5); 
}
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { 
    outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.2); background-color: var(--white); 
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; }

.btn-submit { 
    width: 100%; border: none; cursor: pointer; font-size: 1.1rem; margin-top: 5px; padding: 12px; 
    transition: all 0.3s ease;
}
.btn-submit:hover {
    background: var(--accent);
    color: var(--white) !important;
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(197, 160, 89, 0.4);
}
.btn-submit:active { transform: scale(0.98); }

/* =========================================
   FOOTER SECTION
   ========================================= */
.main-footer { background: var(--primary); color: var(--white); padding: 60px 0 20px; position: relative; z-index: 1;}
.grid-footer { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; }
.footer-icon { color: var(--accent); width: 25px; text-align: left; }
.footer-copyright { border-top: 1px solid rgba(255,255,255,0.1); margin-top: 40px; padding-top: 20px; text-align: center; font-size: 0.8rem; }
.footer-copyright a { color: var(--accent); text-decoration: none; }

/* =========================================
   ESTILOS PARA POPUPS (MODALES)
   ========================================= */
.modal-overlay { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(12, 35, 64, 0.8); backdrop-filter: blur(5px); align-items: center; justify-content: center; opacity: 0; transition: opacity 0.3s ease; }
.modal-overlay.show { display: flex; opacity: 1; }
.modal-content { background-color: var(--white); padding: 30px; border-radius: 12px; max-width: 500px; width: 90%; position: relative; box-shadow: 0 10px 40px rgba(0,0,0,0.4); transform: translateY(-30px); transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1); }
.modal-overlay.show .modal-content { transform: translateY(0); }
.close-modal { position: absolute; top: 15px; right: 20px; font-size: 2rem; font-weight: 300; cursor: pointer; color: #999; line-height: 1; transition: color 0.2s; }
.close-modal:hover { color: var(--secondary); }
.text-center { text-align: center; }

/* =========================================
   RESPONSIVE DESIGN Y MENÚ MÓVIL
   ========================================= */
@media (max-width: 992px) {
    .main-header.scrolled .navbar { width: 100%; }
    .logo { width: 270px; }
    
    .grid-staff { grid-template-columns: repeat(2, 1fr); }
    .grid-links { grid-template-columns: repeat(2, 1fr); }
    .grid-archivos { grid-template-columns: repeat(2, 1fr); }
    .grid-fechas-turnos { grid-template-columns: repeat(2, 1fr); }
    
    .validacion-grid { grid-template-columns: 1fr; gap: 20px; } 
}

@media (max-width: 768px) {
    .desktop-only { display: none !important; }
    .mobile-only { display: block; }
    .menu-toggle { display: block; }
    
    /* CAMBIO APLICADO: Mostrar "4ta Notaría" en móviles, ajustando tamaños */
    .logo-text-header { 
        display: block; 
        font-size: 0.85rem; 
        margin-left: 75px; 
    } 
    .logo-img-wrapper {
        width: 65px;
        height: 65px;
        margin-top: -32.5px;
    }
    .main-header.scrolled .logo-text-header {
        margin-left: 60px;
        font-size: 0.8rem;
    }
    .main-header.scrolled .logo-img-wrapper {
        width: 50px;
        height: 50px;
        margin-top: -25px;
    }

    .nav-links {
        position: absolute; top: 100%; left: 0; width: 100%;
        background: rgba(255, 255, 255, 0.98); backdrop-filter: blur(10px);
        flex-direction: column; padding: 20px 0; gap: 15px;
        box-shadow: 0 10px 15px rgba(0,0,0,0.1); border-radius: 0 0 15px 15px;
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); transition: clip-path 0.4s ease-in-out;
    }
    .nav-links.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }

    .hero-actions { flex-direction: column; }
    .grid-turnos, .grid-footer, .grid-contacto, .form-grid { grid-template-columns: 1fr; }
    .hero-content h2 { font-size: 2.2rem; }
    
    .contacto { min-height: auto; padding-top: 80px !important; }
    .map-container iframe { min-height: 300px; }
    
    .grid-staff { grid-template-columns: 1fr; }
    .grid-links { grid-template-columns: 1fr; }
    .grid-archivos { grid-template-columns: 1fr; }
    .grid-fechas-turnos { grid-template-columns: 1fr; }
    
    .fojas-clean-container { height: 70vh; min-height: 500px; }
    .fojas-inner-wrapper { margin-top: -130px; height: 1100px; }
}