/* ===== ASESORÍAS LEGIÓN - ESTILOS MEJORADOS ===== */
/* Archivo: css/styles.css */
/* Versión: 2.0 */
/* Descripción: Estilos refinados para mayor profesionalismo y modernidad. */

/* ===== VARIABLES CSS ===== */
:root {
    /* Colores principales */
    --primary-color: #1e3a8a;
    --primary-dark: #1c357a;
    --secondary-color: #0f172a;
    --secondary-light: #1e293b;
    --accent-color: #3b82f6;
    --accent-hover: #2574f5;

    /* Colores de apoyo */
    --white: #ffffff;
    --light-gray: #f8fafc;
    --medium-gray: #e2e8f0;
    --dark-gray: #64748b;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --danger-color: #ef4444;

    /* Fuentes */
    --font-primary: 'Poppins', sans-serif;

    /* Espaciado y Sombras */
    --border-radius: 12px;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 15px 30px -5px rgba(0, 0, 0, 0.15);

    /* Transiciones */
    --transition-fast: all 0.2s ease-out;
    --transition-medium: all 0.3s ease-out;
    --transition-slow: all 0.5s ease;
}

/* ===== ESTILOS GLOBALES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--secondary-color);
    overflow-x: hidden;
    background-color: var(--white);
}

html {
    scroll-behavior: smooth;
}

/* ===== NAVEGACIÓN STICKY ===== */
.custom-navbar {
    background-color: rgba(15, 23, 42, 0.85); /* Fondo más sutil */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* Soporte para Safari */
    box-shadow: var(--shadow-sm);
    transition: var(--transition-medium);
    padding: 0.5rem 0;
    min-height: 70px;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white) !important;
    transition: var(--transition-fast);
}

.navbar-brand:hover {
    color: var(--accent-color) !important;
    transform: scale(1.05);
}

.navbar-nav .nav-link {
    color: var(--white) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
    position: relative;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--white) !important;
    background: rgba(59, 130, 246, 0.15); /* Hover más sutil */
}

/* Efecto underline más refinado */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent-color);
    transition: var(--transition-medium);
    transform: scaleX(0);
    transform-origin: left;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    transform: scaleX(1);
}

/* ===== HERO CAROUSEL ===== */
.hero-carousel {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: var(--secondary-color);
}

.slides {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    z-index: 1;
}

.slide.active {
    opacity: 1;
    z-index: 2;
}

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.95) contrast(1.05) saturate(1.1);
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(30, 58, 138, 0.8) 0%, rgba(15, 23, 42, 0.6) 100%);
    z-index: 3;
}

.hero-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 4;
    padding: 0 2rem;
}

.hero-content {
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-text {
    color: var(--white);
    animation: fadeInUp 1s ease-out 0.3s backwards;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.4rem);
    font-weight: 300;
    margin-bottom: 2.5rem;
    opacity: 0.9;
    line-height: 1.6;
    max-width: 90%;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.hero-buttons .btn {
    padding: 1rem 2rem;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: var(--transition-medium);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    min-width: 180px;
    justify-content: center;
}

.hero-buttons .btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.hero-visual {
    position: relative;
    height: clamp(200px, 30vh, 300px);
    animation: fadeInUp 1s ease-out 0.6s backwards;
}

.floating-element {
    position: absolute;
    background: linear-gradient(135deg, var(--accent-color), var(--primary-color));
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
    opacity: 0.8;
}

.floating-element:nth-child(1) {
    width: clamp(60px, 8vw, 100px);
    height: clamp(60px, 8vw, 100px);
    top: 10%;
    left: 20%;
    animation-delay: 0s;
}

.floating-element:nth-child(2) {
    width: clamp(40px, 5vw, 60px);
    height: clamp(40px, 5vw, 60px);
    top: 60%;
    right: 30%;
    animation-delay: 2s;
}

.floating-element:nth-child(3) {
    width: clamp(50px, 6vw, 80px);
    height: clamp(50px, 6vw, 80px);
    bottom: 20%;
    left: 60%;
    animation-delay: 4s;
}

.hero-nav {
    position: absolute;
    top: 90%;
    transform: translateY(-50%);
    width: clamp(45px, 6vw, 60px);
    height: clamp(45px, 6vw, 60px);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: clamp(1rem, 2.5vw, 1.5rem);
    cursor: pointer;
    transition: var(--transition-medium);
    z-index: 10;
}

.hero-nav:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.hero-nav.prev { left: clamp(1rem, 3vw, 2rem); }
.hero-nav.next { right: clamp(1rem, 3vw, 2rem); }

.slide-indicators {
    position: absolute;
    bottom: clamp(1.5rem, 4vw, 2rem);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: clamp(0.5rem, 1.5vw, 1rem);
    z-index: 10;
}

.indicator {
    width: clamp(10px, 1.5vw, 12px);
    height: clamp(10px, 1.5vw, 12px);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: var(--transition-medium);
}

.indicator.active,
.indicator:hover {
    background: var(--white);
    transform: scale(1.2);
}

.slide-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 4px;
    background: var(--accent-color);
    transition: width 5s linear;
    z-index: 10;
}

/* ===== SECCIONES PRINCIPALES ===== */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-align: center;
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.2rem;
    color: var(--dark-gray);
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== SERVICIOS DESTACADOS ===== */
.services-highlight {
    background-color: var(--light-gray);
    position: relative;
}

.service-card {
    border: 1px solid var(--medium-gray);
    border-radius: var(--border-radius);
    transition: var(--transition-medium);
    overflow: hidden;
    height: 100%;
    background: var(--white);
    box-shadow: var(--shadow-sm);
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-color);
}

.service-card .card-header {
    border: none;
    padding: 2rem 1.5rem;
    background: transparent;
    text-align: center;
}

.service-card .card-header i {
    font-size: 2rem;
    color: var(--primary-color);
    background: linear-gradient(135deg, var(--light-gray), #fff);
    box-shadow: var(--shadow-sm);
    padding: 1.2rem;
    border-radius: 50%;
    margin-bottom: 1rem;
    display: inline-block;
    transition: var(--transition-medium);
}

.service-card:hover .card-header i {
    transform: scale(1.1) rotate(-10deg);
    color: var(--accent-hover);
}

.service-card .card-body {
    padding: 0 1.5rem 1.5rem;
    background: transparent;
}

.service-card .card-body ul li {
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--medium-gray);
    font-size: 0.95rem;
}

.service-card .card-body ul li:last-child {
    border-bottom: none;
}

.service-card .card-footer {
    background: transparent;
    border: none;
    padding: 0 1.5rem 1.5rem;
}

/* ===== SECCIÓN QUIÉNES SOMOS ===== */
.about-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--secondary-light) 100%);
    color: var(--white);
    position: relative;
    overflow: hidden;
}

.about-section::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background-image: radial-gradient(circle at 70% 30%, rgba(59, 130, 246, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.about-section .section-title {
    color: var(--white);
    text-align: left;
}

.about-section .section-title::after {
    left: 0;
    transform: none;
}

.stat-item {
    text-align: center;
    margin-bottom: 2rem;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.8);
    margin: 0;
}

/* ===== SECCIÓN CONTACTO ===== */
.contact-section {
    background: linear-gradient(135deg, var(--light-gray) 0%, var(--white) 100%);
}

.contact-info {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    height: fit-content;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    transition: var(--transition-fast);
}

.contact-item:hover {
    background: rgba(59, 130, 246, 0.05);
    transform: translateX(10px);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 1rem;
    margin-top: 0.2rem;
    width: 30px;
}

.contact-item h5 {
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.contact-item p {
    color: var(--dark-gray);
    margin: 0;
    line-height: 1.5;
}

/* ===== FOOTER ===== */
.footer {
    background: linear-gradient(135deg, var(--secondary-color) 0%, var(--primary-color) 100%);
    color: var(--white);
}

.social-links a {
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition-fast);
    text-decoration: none;
}

.social-links a:hover {
    color: var(--accent-color);
    transform: translateY(-3px);
}

/* ===== ANIMACIONES ===== */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ===== RESPONSIVE DESIGN (Se mantiene sin cambios) ===== */
@media (max-width: 1200px) {
    .hero-content {
        gap: 2rem;
        max-width: 95%;
    }
    .hero-title { font-size: clamp(2.2rem, 4.5vw, 3.2rem); }
    .hero-subtitle { font-size: clamp(1rem, 2.2vw, 1.2rem); }
}

@media (max-width: 992px) {
    .hero-carousel {
        height: 85vh;
        min-height: 550px;
    }
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
        padding: 2rem 0;
    }
    .hero-title {
        font-size: clamp(2rem, 4vw, 2.8rem);
        margin-bottom: 1rem;
    }
    .hero-subtitle {
        font-size: clamp(0.95rem, 2vw, 1.1rem);
        margin-bottom: 2rem;
        max-width: 100%;
    }
    .hero-visual {
        height: clamp(150px, 25vh, 200px);
        order: -1;
    }
    .hero-buttons {
        justify-content: center;
        gap: 0.8rem;
    }
    .hero-buttons .btn {
        min-width: 160px;
        padding: 0.8rem 1.5rem;
        font-size: clamp(0.9rem, 1.8vw, 1rem);
    }
}

@media (max-width: 768px) {
    .hero-carousel {
        height: 75vh;
        min-height: 500px;
    }
    .hero-container { padding: 0 1.5rem; }
    .hero-title {
        font-size: clamp(1.8rem, 3.5vw, 2.2rem);
        line-height: 1.3;
    }
    .hero-subtitle {
        font-size: clamp(0.9rem, 1.8vw, 1rem);
        margin-bottom: 1.5rem;
    }
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        margin-bottom: 0.5rem;
    }
    .hero-nav {
        width: clamp(40px, 5vw, 50px);
        height: clamp(40px, 5vw, 50px);
        font-size: clamp(0.9rem, 2vw, 1.2rem);
    }
    .hero-nav.prev { left: 1rem; }
    .hero-nav.next { right: 1rem; }
    .slide-indicators { bottom: 1.5rem; gap: 0.8rem; }
}

@media (max-width: 576px) {
    .hero-carousel {
        height: 70vh;
        min-height: 450px;
    }
    .hero-container { padding: 0 1rem; }
    .hero-content { gap: 1.5rem; padding: 1rem 0; }
    .hero-title {
        font-size: clamp(1.6rem, 3vw, 1.9rem);
        margin-bottom: 0.8rem;
    }
    .hero-subtitle {
        font-size: clamp(0.85rem, 1.5vw, 0.95rem);
        margin-bottom: 1.2rem;
        line-height: 1.5;
    }
    .hero-buttons .btn {
        width: 100%;
        max-width: 100%;
        padding: 0.75rem 1.2rem;
        font-size: 0.9rem;
    }
    .hero-visual { height: 120px; margin-bottom: 1rem; }
    .floating-element { opacity: 0.6; }
    .hero-nav { width: 35px; height: 35px; font-size: 0.8rem; }
    .hero-nav.prev { left: 0.5rem; }
    .hero-nav.next { right: 0.5rem; }
    .slide-indicators { bottom: 1rem; gap: 0.6rem; }
    .indicator { width: 8px; height: 8px; }
}

/* ===== UTILIDADES Y BOTONES PERSONALIZADOS ===== */
.btn-primary-custom {
    background: var(--accent-color);
    border: none;
    color: var(--white);
    transition: var(--transition-medium);
    box-shadow: var(--shadow-md);
    font-weight: 600;
}

.btn-primary-custom:hover {
    background: var(--accent-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Estado de foco para accesibilidad (teclado) */
.btn:focus-visible,
.nav-link:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 2px solid var(--accent-color);
    outline-offset: 3px;
    box-shadow: none; /* Evita que se sumen sombras */
}

/* Scroll personalizado */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: var(--light-gray); }
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary-color));
}

/* ===== LOGO OPTIMIZADO ===== */
.navbar-brand {
    position: relative !important;
    width: 180px;
    height: 60px;
    overflow: visible;
}

.navbar-brand img {
    height: 120px !important;
    object-fit: contain;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    z-index: 1000;
    transition: var(--transition-medium);
    filter: brightness(0) invert(1) drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}

.navbar-brand:hover img {
    transform: translateY(-50%) scale(1.05);
    filter: brightness(0) invert(1) drop-shadow(0 6px 12px rgba(0, 0, 0, 0.3));
}

/* Responsive del logo */
@media (max-width: 768px) {
    .navbar-brand { width: 140px; }
    .navbar-brand img { height: 120px !important; }
}

@media (max-width: 576px) {
    .navbar-brand { width: 120px; }
    .navbar-brand img { height: 100px !important; }
}