/* =================================
   CUSTOM STYLES - Consultores Juridicos y Aseguradores
   ================================= */

/* === ROOT VARIABLES - PALETA PROFESIONAL === */
:root {
    /* Colores Principales */
    --primary-color: #003366;
    /* Azul Profundo - Corporativo */
    --accent-color: #CC5500;
    /* Naranja Cobre - CTAs/Acción */
    --text-color: #212529;
    /* Gris Oscuro - Texto principal (Antes #333333) */
    --bg-primary: #FFFFFF;
    /* Blanco Puro - Fondo principal */
    --bg-secondary: #F5F7FA;
    /* Gris Claro Frío - Fondos alternos */

    /* Colores Complementarios */
    --success-color: #198754;
    /* Verde - Badges éxito */
    --danger-color: #dc3545;
    /* Rojo - Alertas */
    --info-color: #0dcaf0;
    /* Azul - Info */

    /* Colores Secundarios (Legacy) */
    --secondary-color: #003366;
    /* Igual a primary para consistencia */
    --text-light: #343a40;
    /* Texto secundario - más oscuro para mejor contraste (Antes #495057) */
    --bg-light: #F5F7FA;
    /* Igual a bg-secondary */
    --white: #FFFFFF;
    --dark: #003366;
    /* Igual a primary */

    /* Efectos y Transiciones */
    --transition: all 0.3s ease;
    --shadow-sm: 0 2px 8px rgba(0, 51, 102, 0.08);
    --shadow-md: 0 5px 15px rgba(0, 51, 102, 0.12);
    --shadow-lg: 0 10px 30px rgba(0, 51, 102, 0.15);
}

/* === GLOBAL STYLES === */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* === ACCESSIBILITY === */
/* Skip to main content link */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px 16px;
    text-decoration: none;
    z-index: 100;
    font-weight: bold;
    border-radius: 0 0 4px 0;
}

.skip-to-content:focus {
    top: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* === TYPOGRAPHY === */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #003366;
}

p,
li {
    color: #333333;
}

.lead {
    color: #333333;
    font-size: 1.15rem;
}

a {
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    opacity: 0.8;
}

/* === NAVIGATION === */
.navbar {
    box-shadow: var(--shadow-sm);
    padding: 0.75rem 0;
    transition: var(--transition);
}

.navbar-brand img {
    transition: var(--transition);
    max-height: 50px;
}

.navbar-brand:hover img {
    transform: scale(1.05);
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: var(--text-color) !important;
    position: relative;
    transition: var(--transition);
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link.active {
    color: var(--primary-color) !important;
}

/* === BUTTONS === */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--white);
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: #00254d;
    border-color: #00254d;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Botones CTA - Naranja Cobre para máxima conversión */
.btn-warning {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
    color: var(--white);
    font-weight: 600;
    transition: var(--transition);
}

.btn-warning:hover {
    background-color: #b34700;
    border-color: #b34700;
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(204, 85, 0, 0.3);
}

/* === HERO SECTION === */
.hero-section-home {
    position: relative;
    background-image: url('../images/hero-home-desktop.webp');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    min-height: 85vh;
    display: flex;
    align-items: center;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8), 0 0 15px rgba(0, 0, 0, 0.5);
    animation: fadeInUp 0.8s ease 0.2s both;
    font-weight: 400;
}

.hero-content .lead {
    animation: fadeInUp 0.8s ease 0.3s both;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.8), 0 0 10px rgba(0, 0, 0, 0.5);
}

.hero-content .btn {
    animation: fadeInUp 0.8s ease 0.5s both;
}

.trust-badges {
    animation: fadeInUp 0.8s ease 0.6s both;
}

.trust-badges i {
    color: #FFC107;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

.trust-badges small {
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8);
}

/* Mejorar contraste de texto muted */
.text-muted {
    color: #495057 !important;
}

/* Mejorar contraste en fondos claros */
.bg-light .text-muted {
    color: #343a40 !important;
}

/* Mejorar contraste de badges */
.badge.bg-primary {
    background-color: #003366 !important;
    color: #ffffff !important;
    font-weight: 600;
}

.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(255, 193, 7, 0.4) !important;
}

.min-vh-75 {
    min-height: 75vh;
}

/* === CARDS === */
.card {
    border: none;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card h3,
.card h4,
.card h5 {
    color: #003366;
}

.card p {
    color: #343a40;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.hover-card {
    transition: var(--transition);
}

.hover-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-card:hover {
    border: 2px solid var(--primary-color) !important;
}

.blog-card {
    transition: var(--transition);
}

.blog-card:hover {
    transform: translateY(-5px);
}

.card-img-top {
    transition: var(--transition);
}

.card:hover .card-img-top {
    transform: scale(1.05);
}

/* === BUTTONS === */
.btn {
    padding: 10px 25px;
    border-radius: 8px;
    font-weight: 500;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: #234578;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.4);
}

.btn-warning {
    background-color: var(--accent-color);
    color: var(--dark);
}

.btn-warning:hover {
    background-color: #e0a800;
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-lg {
    padding: 14px 32px;
    font-size: 1.1rem;
}

.btn-sm {
    padding: 6px 16px;
    font-size: 0.9rem;
}

/* === BREADCRUMB === */
.breadcrumb {
    background-color: transparent;
}

.breadcrumb-item a {
    color: var(--secondary-color);
}

.breadcrumb-item.active {
    color: var(--text-light);
}

/* === FORMS === */
.form-control,
.form-select {
    border-radius: 5px;
    border: 1px solid #ddd;
    padding: 10px 15px;
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(52, 152, 219, 0.25);
}

.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.invalid-feedback {
    display: block;
    margin-top: 0.25rem;
}

/* === FOOTER === */
footer {
    margin-top: auto;
    background-color: var(--primary-color) !important;
}

footer h5 {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    color: var(--white);
}

footer a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

footer ul {
    padding: 0;
}

footer ul li {
    margin-bottom: 0.5rem;
}

/* === ANIMATIONS === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* === UTILITIES === */
.text-muted {
    color: var(--text-light) !important;
}

section {
    scroll-margin-top: 80px;
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .hero-section {
        padding: 50px 0;
        text-align: center;
    }

    .hero-section h1 {
        font-size: 2rem;
    }

    /* Hero images for mobile */
    .hero-section-home {
        background-image: url('../images/hero-home-mobile.webp');
        background-attachment: scroll;
    }

    .hero-section-services {
        background-image: url('../images/hero-servicios-mobile.webp');
    }

    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }

    .nav-link::after {
        display: none;
    }
}

/* === ACCESSIBILITY === */
.skip-to-content {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--secondary-color);
    color: var(--white);
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-to-content:focus {
    top: 0;
}

/* === PRINT STYLES === */
@media print {

    .navbar,
    footer,
    .btn,
    .breadcrumb {
        display: none;
    }
}

/* === ADDITIONAL HOME STYLES === */

/* Icon Boxes */
.icon-box {
    display: inline-block;
    width: 80px;
    height: 80px;
    line-height: 80px;
    text-align: center;
    border-radius: 50%;
    background: rgba(44, 90, 160, 0.1);
    transition: var(--transition);
}

.hover-card:hover .icon-box {
    background: var(--primary-color);
}

.hover-card:hover .icon-box i {
    color: var(--white) !important;
}

/* Service Icons */
.service-icon {
    display: inline-block;
    width: 70px;
    height: 70px;
    line-height: 70px;
    background: rgba(44, 90, 160, 0.08);
    border-radius: 12px;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    background: var(--primary-color);
    transform: scale(1.1);
}

.service-card:hover .service-icon i {
    color: var(--white) !important;
}

/* Testimonial Section */
.testimonial-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.testimonial-section .card {
    border-radius: 20px;
}

.testimonial-section blockquote {
    position: relative;
    font-style: italic;
}

/* Stats Boxes */
.stats-box {
    padding: 2rem;
    transition: var(--transition);
}

.stats-box:hover {
    transform: translateY(-5px);
}

.stats-box h3 {
    font-size: 3.5rem;
}

/* CTA Final Section */
.cta-final {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a5f 100%);
    position: relative;
    overflow: hidden;
}

.cta-final h2,
.cta-final h3,
.cta-final p {
    color: #ffffff !important;
}

.cta-final::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* Floating CTA Button */
.btn-floating {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    padding: 15px 25px;
    border-radius: 50px;
    font-weight: 700;
    background-color: var(--accent-color);
    color: var(--dark);
    border: none;
    box-shadow: var(--shadow-lg);
    animation: pulse 2s infinite;
    transition: var(--transition);
}

.btn-floating:hover {
    background-color: #e0a800;
    color: var(--dark);
    transform: scale(1.05);
    animation: none;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }

    70% {
        box-shadow: 0 0 0 15px rgba(255, 193, 7, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* Feature Icons */
.feature-icon {
    display: inline-block;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

/* Blog Badges */
.badge {
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
}

/* Social Links */
.social-links a {
    transition: var(--transition);
}

.social-links a:hover {
    color: var(--accent-color) !important;
    transform: translateY(-3px);
}

/* Section Spacing */
section {
    scroll-margin-top: 80px;
}

/* === BACKGROUND COLORS === */
.bg-light {
    background-color: var(--bg-secondary) !important;
}

.bg-light h1,
.bg-light h2,
.bg-light h3,
.bg-light h4,
.bg-light h5,
.bg-light h6 {
    color: #003366 !important;
}

.bg-light p,
.bg-light li {
    color: #212529 !important;
}

/* === TEXT COLORS === */
.text-primary {
    color: var(--primary-color) !important;
}

.text-accent {
    color: var(--accent-color) !important;
}

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
}

/* Loading Spinner for Buttons */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
    border-width: 0.15em;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #234578;
}

/* Selection Color */
::selection {
    background-color: var(--accent-color);
    color: var(--dark);
}

::-moz-selection {
    background-color: var(--accent-color);
    color: var(--dark);
}

/* === SERVICES PAGE SPECIFIC STYLES === */

/* Hero Section Services */
.hero-section-services {
    position: relative;
    background-image: url('../images/hero-servicios-desktop.webp');
    background-size: cover;
    background-position: center;
    min-height: 50vh;
    display: flex;
    align-items: center;
    color: var(--white);
}

.hero-section-services .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-section-services .container {
    position: relative;
    z-index: 2;
    padding: 80px 0;
}

/* Service Detail Cards */
.service-detail-card {
    transition: var(--transition);
    height: 100%;
}

.service-detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Service Numbers */
.service-number {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a5f 100%);
    color: var(--white);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    flex-shrink: 0;
}

.service-number-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a5f 100%);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 700;
    margin: 0 auto;
}

/* Process Cards */
.process-card {
    padding: 2rem 1.5rem;
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    height: 100%;
}

.process-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
}

.process-number {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    color: var(--dark);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
    border: 4px solid var(--white);
    box-shadow: 0 4px 15px rgba(255, 193, 7, 0.3);
}

.process-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Timeline Line (decorativo) */
.timeline-line {
    height: 4px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--primary-color) 25%,
            var(--primary-color) 75%,
            transparent 100%);
    position: relative;
    margin-top: -80px;
}

/* Testimonial Card Services */
.testimonial-card-services {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.testimonial-rating i {
    font-size: 1.5rem;
}

/* CTA Services */
.cta-services {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a5f 100%);
    position: relative;
    overflow: hidden;
}

.cta-services::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.cta-services::after {
    content: '';
    position: absolute;
    bottom: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

/* === PALETA PROFESIONAL - ESTILOS ADICIONALES === */

/* Alerts con nueva paleta */
.alert-primary.bg-primary {
    background-color: rgba(0, 51, 102, 0.1) !important;
    border-left: 4px solid var(--primary-color);
}

.alert-info {
    background-color: rgba(245, 247, 250, 1) !important;
    border-left: 4px solid var(--info-color);
}

/* Enlaces con acento naranja */
a.text-decoration-none:hover {
    color: var(--accent-color) !important;
}

/* Cards con hover effect naranja */
.card:hover {
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(204, 85, 0, 0.15);
}

/* Badges personalizados */
.badge.bg-primary {
    background-color: var(--primary-color) !important;
}

.badge.bg-warning {
    background-color: var(--accent-color) !important;
    color: var(--white) !important;
}

/* Iconos con color de acento */
.bi-telephone-fill,
.bi-whatsapp,
.bi-envelope-fill {
    color: var(--accent-color);
}

/* Títulos principales con azul profundo */
h1,
h2.fw-bold {
    color: var(--primary-color);
}

/* Navbar con fondo blanco y sombra sutil */
.navbar {
    background-color: var(--bg-primary) !important;
    box-shadow: var(--shadow-sm);
}

.navbar-brand {
    color: var(--primary-color) !important;
}

.nav-link {
    color: var(--text-color) !important;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent-color) !important;
}

/* Botones de acción con Naranja Cobre */
.btn-primary,
.cta-button {
    background-color: var(--accent-color) !important;
    border-color: var(--accent-color) !important;
    color: var(--white) !important;
}

.btn-primary:hover,
.cta-button:hover {
    background-color: #b34700 !important;
    border-color: #b34700 !important;
    box-shadow: 0 4px 12px rgba(204, 85, 0, 0.3);
}

/* Secciones con fondo gris claro frío */
.bg-light,
.hero-section-contact,
section:nth-child(even) {
    background-color: var(--bg-secondary) !important;
}

/* Mejorar legibilidad del texto */
body,
p,
li {
    color: var(--text-color);
}

/* Responsive Adjustments for Services */
@media (max-width: 768px) {
    .service-number {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }

    .process-number {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .hero-section-services {
        min-height: 40vh;
    }

    .hero-section-services .container {
        padding: 60px 0;
    }
}