@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
    /* Nueva Paleta Tecnológico-Legal "Zado" */
    --primary-color: #0f172a; /* Slate 900 */
    --secondary-color: #6366f1; /* Indigo 500 (Acento vibrante) */
    --text-color: #334155; /* Slate 700 */
    --bg-color: #f8fafc; /* Slate 50 */
    --white: #ffffff;
    --card-bg: #ffffff;
    --accent-gradient: linear-gradient(135deg, #5b21b6 0%, #3b82f6 100%); /* Morado a Azul */
    --glass-bg: rgba(248, 250, 252, 0.90);
    --input-bg: #f1f5f9;
    --input-border: #cbd5e1;
    --nav-height: 90px;
}

[data-theme='dark'] {
    --primary-color: #f8fafc !important;
    --secondary-color: #818cf8 !important; /* Indigo 400 */
    --text-color: #cbd5e1 !important; /* Slate 300 */
    --bg-color: #020617 !important; /* Slate 950 */
    --white: #ffffff !important;
    --card-bg: #0f172a !important; /* Slate 900 */
    --accent-gradient: linear-gradient(135deg, #4c1d95 0%, #2563eb 100%) !important;
    --glass-bg: rgba(2, 6, 23, 0.95) !important;
    --input-bg: #1e293b !important;
    --input-border: #334155 !important;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--nav-height);
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color) !important;
    color: var(--text-color) !important;
    margin: 0;
    padding-top: var(--nav-height);
    line-height: 1.8;
    transition: background-color 0.4s ease, color 0.4s ease;
}

/* Tipografía Unificada (Adiós serias) */
h1, h2, h3, h4, h5 {
    font-family: 'Inter', sans-serif;
    color: var(--primary-color) !important;
    font-weight: 700;
    letter-spacing: -0.03em;
}

h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
}

p {
    font-size: 1.1rem;
    color: var(--text-color) !important;
    font-weight: 300;
}

/* Navbar Moderno y Minimalista */
header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: var(--glass-bg) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.05); /* Separador sutil */
    transition: background 0.3s, height 0.3s;
}

[data-theme='dark'] header {
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05);
}

.navbar {
    padding: 0 50px;
    height: var(--nav-height);
    display: flex;
    align-items: center;
}

.navbar-brand {
    padding: 0;
    margin-right: 30px;
}

.navbar-brand img {
    height: 38px !important; /* Altura compacta y proporcionada */
    width: auto;
    display: block;
    transition: filter 0.3s ease;
}

[data-theme='dark'] .navbar-brand img {
    filter: brightness(1.2) contrast(1.2); /* Solo aclarar, el logo permite modo oscuro bien */
}

/* Remover el borde feo del botón hamburger nativo de Bootstrap */
.navbar-toggler {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    padding: 0.25rem 0; /* Sin padding excesivo para alinear mejor */
}

.navbar-toggler:focus {
    outline: none !important;
    box-shadow: none !important;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    margin: 0 15px;
    font-size: 0.95rem; /* Ajustado ligeramente para proporción */
    transition: color 0.3s;
}

[data-theme='dark'] .nav-link {
    color: var(--white) !important;
}

.nav-link:hover {
    color: var(--secondary-color) !important;
}

.btn-consult {
    background: var(--accent-gradient) !important;
    color: var(--white) !important;
    padding: 8px 18px; /* Más compacto */
    border-radius: 50px; 
    font-weight: 600;
    font-size: 0.85rem; /* Letra controlada */
    border: none;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-consult:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
    color: var(--white) !important;
    text-decoration: none;
}

/* Hero Section / Portada (Aireada) */
.jumbotron {
    background: transparent !important;
    padding: 20vh 20px;
    text-align: center;
    margin-bottom: 0;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.jumbotron h1 {
    font-size: 4.5rem;
    max-width: 900px;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--primary-color) !important;
}

.jumbotron p {
    font-size: 1.4rem;
    max-width: 700px;
    margin-bottom: 3rem;
}

/* --- VERTICAL SHOWCASE ROW --- 
   Esto sustituye a la cuadrícula. Cada bloque es enorme y ocupa la pantalla */
.service-showcase {
    min-height: 80vh;
    padding: 15vh 0; /* MUCHO AIRE VERTICAL (H) */
    display: flex;
    align-items: center;
}

/* Alternancia sutil de fondos para separar secciones sin usar bordes */
.service-showcase:nth-child(even) {
    background-color: var(--card-bg); /* En light es blanco, en dark es slate-900 */
}

.service-text {
    padding: 0 4rem; /* Aire horizontal */
}

.service-text h3 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.service-text p {
    font-size: 1.15rem;
    line-height: 1.8;
}

/* Mejoras en el carrusel para adaptarlo al Showcase */
.carousel {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.08); /* Sombra más sutil y de alta gama */
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.carousel:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 60px rgba(0,0,0,0.12);
}

.carousel-inner img {
    height: 500px; /* Tamaño consistente por defecto */
    object-fit: cover;
}

[data-theme='dark'] .carousel {
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}

/* Captions Minimalistas (sin gradientes pesados negros) */
.carousel-caption {
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(5px);
    bottom: 20px;
    left: 20px;
    right: 20px;
    padding: 20px;
    text-align: left;
    border-radius: 12px;
}

.carousel-caption h5 {
    font-size: 1.25rem;
    color: var(--white) !important;
    margin-bottom: 0px;
}

/* Contact Section (Aireada) */
#contacto {
    padding: 15vh 0; /* Mucho aire antes del footer */
}

.containercontact {
    background: var(--card-bg) !important;
    padding: 80px 60px;
    border-radius: 30px;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.1);
    max-width: 700px;
    margin: 0 auto;
    transition: background-color 0.3s;
}

[data-theme='dark'] .containercontact {
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.5);
}

.containercontact h2 {
    margin-bottom: 50px;
    text-align: center;
}

.form-control {
    border: 1px solid var(--input-border) !important;
    background-color: var(--input-bg) !important;
    color: var(--text-color) !important;
    padding: 18px 24px;
    margin-bottom: 25px;
    border-radius: 12px;
    font-size: 1.05rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
    border-color: var(--secondary-color) !important;
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.1);
    outline: none;
}

.btn-primary {
    background: var(--accent-gradient) !important;
    color: var(--white) !important;
    border: none;
    padding: 18px 40px;
    font-weight: 600;
    border-radius: 50px;
    font-size: 1.1rem;
    width: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

/* Theme Toggle Botón Limpio y Compacto */
.theme-toggle {
    background: var(--input-bg);
    border: none;
    color: var(--text-color);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    margin-left: 20px;
    transition: all 0.3s ease;
}

.theme-toggle:hover {
    background: var(--input-border);
    color: var(--primary-color);
}

/* Footer Simplificado */
footer {
    background: var(--primary-color) !important;
    color: #94a3b8 !important; /* Slate 400 */
    padding: 60px 20px;
    font-size: 0.9rem;
    transition: background 0.3s;
}

/* Utilities */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-in.show {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   NAVMENU DROPDOWN MODERNIZATION
   ========================================= */
.modern-dropdown {
    border: none;
    border-radius: 16px;
    background: var(--card-bg);
    padding: 15px 0;
    min-width: 220px;
}

[data-theme='dark'] .modern-dropdown {
    background: var(--primary-color);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5) !important;
}

.modern-dropdown .dropdown-item {
    padding: 10px 25px;
    font-weight: 500;
    color: var(--text-color);
    transition: all 0.2s ease;
}

.modern-dropdown .dropdown-item:hover {
    background: transparent;
    color: var(--secondary-color);
    padding-left: 30px; /* Slight indent hover effect */
}

/* =========================================
   GLASSMORPHISM HUB (ZEPOL UI)
   ========================================= */
.tiles-summary {
    position: relative;
    z-index: 10;
    margin-top: -50px;
    padding-bottom: 100px;
}

.metro-tile {
    display: block;
    border-radius: 0; /* Base plana para matriz iterativa */
    padding: 0;
    color: white !important;
    text-decoration: none !important;
    height: 100%;
    min-height: 220px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    /* Glassmorphism Core integral */
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    overflow: hidden;
}

.metro-tile:hover {
    transform: translateY(-8px); /* Elevación pura para no empujar bordes vecinales */
    filter: brightness(1.15);
    box-shadow: 0 25px 45px rgba(0,0,0,0.2);
    border-color: rgba(255, 255, 255, 0.3);
    z-index: 10;
    text-decoration: none;
}

/* =========================================
   RESPONSIVE BORDER-RADIUS MATRIX (ZEPOL)
   ========================================= */

/* 1. Mobile First (<768px) */
.tile-civil { border-radius: 25px 25px 0 0; }
.tile-litigios { border-radius: 0 0 25px 25px; }

/* 2. Tablet (768px - 991.98px) */
@media (min-width: 768px) {
    .tile-litigios { border-radius: 0; } /* Resetea el de mobile */
    .tile-corporativo { border-radius: 0 0 0 25px; }
    .tile-litigios { border-radius: 0 0 25px 0; }
}

/* 3. Desktop (>=992px) */
@media (min-width: 992px) {
    .tile-civil { border-radius: 25px 0 0 0; }
    .tile-familia { border-radius: 0 25px 0 0; }
    .tile-penal { border-radius: 0 0 0 25px; }
    .tile-corporativo { border-radius: 0; }
    .tile-litigios { border-radius: 0 0 25px 0; }
}

/* Efecto de luz interna para el cristal */
.metro-tile::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(circle at top left, rgba(255,255,255,0.2), rgba(255,255,255,0));
    opacity: 0;
    transition: opacity 0.4s;
}

.metro-tile:hover::before {
    opacity: 1;
}

.tile-icon {
    margin-bottom: 15px; /* Separación del texto */
    opacity: 0.95;
    z-index: 2;
}

.metro-tile .tile-label {
    text-align: center;
    z-index: 2;
}

.metro-tile h4 {
    color: white !important;
    font-size: 1.5rem;
    font-weight: 600; 
    margin-bottom: 5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.metro-tile p {
    color: rgba(255,255,255,0.85) !important;
    font-size: 0.95rem;
}

/* Degradados Translúcidos de Marca (Zepol Palette) */
.tile-primary {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.85) 0%, rgba(37, 99, 235, 1.0) 100%);
}

.tile-secondary {
    background: linear-gradient(135deg, rgba(79, 70, 229, 0.85) 0%, rgba(67, 56, 202, 1.0) 100%);
}

.tile-accent {
    background: linear-gradient(135deg, rgba(91, 33, 182, 0.85) 0%, rgba(76, 29, 149, 1.0) 100%);
}

.tile-dark {
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.85) 0%, rgba(15, 23, 42, 1.0) 100%);
}

.tile-light {
    background: linear-gradient(135deg, rgba(71, 85, 105, 0.85) 0%, rgba(51, 65, 85, 1.0) 100%);
}

/* =========================================
   LEGAL INSIGHTS (BLOG TYPOGRAPHY)
   ========================================= */
.blog-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-color);
}

[data-theme='dark'] .blog-content {
    color: rgba(255, 255, 255, 0.9);
}

.blog-content h1 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
    color: var(--primary-color);
}

[data-theme='dark'] .blog-content h1 {
    color: white;
}

.blog-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-top: 50px;
    margin-bottom: 25px;
    color: var(--secondary-color);
}

.blog-content p {
    margin-bottom: 25px;
}

.blog-content strong {
    font-weight: 600;
    color: var(--primary-color);
}

[data-theme='dark'] .blog-content strong {
    color: white;
}

.blog-content ul {
    margin-bottom: 30px;
    padding-left: 20px;
}

.blog-content li {
    margin-bottom: 12px;
}

.blog-content blockquote {
    font-size: 1.25rem;
    font-style: italic;
    color: var(--secondary-color);
    border-left: 4px solid var(--accent-gradient);
    padding: 20px 30px;
    margin: 40px 0;
    background-color: var(--card-bg);
    border-radius: 0 15px 15px 0;
}

[data-theme='dark'] .blog-content blockquote {
    color: rgba(255, 255, 255, 0.8);
    border-left: 4px solid var(--secondary-color);
}