/* ==========================================================================
   CONFIGURACIÓN BASE Y VARIABLES
   ========================================================================== */
:root {
    --primary-blue: #0056b3;
    --secondary-blue: #007bff;
    --dark-blue: #0a192f;
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-dark: #212529;
    --text-gray: #6c757d;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   BARRA DE NAVEGACIÓN (LOGO A LA IZQUIERDA, MENÚ A LA DERECHA)
   ========================================================================== */
header {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between; /* El truco que empuja el logo a la izquierda */
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

/* Control del tamaño del logo en la esquina */
.logo a {
    display: block;
}

.logo a img {
    height: 50px; /* Modifica este número si quieres el logo más grande o pequeño */
    width: auto;  /* Evita que la imagen se distorsione */
    display: block;
    transition: transform 0.3s;
}

.logo a img:hover {
    transform: scale(1.03);
}

nav ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 20px;
}

nav ul li a {
    font-weight: 500;
    color: var(--text-dark);
    padding: 5px 10px;
    transition: color 0.3s;
}

nav ul li a:hover, nav ul li a.activo {
    color: var(--secondary-blue);
}

.btn-nav {
    background-color: var(--secondary-blue);
    color: var(--white) !important;
    padding: 8px 20px !important;
    border-radius: 20px;
    font-weight: 600;
    transition: background 0.3s !important;
}

.btn-nav:hover {
    background-color: var(--primary-blue);
}

/* ==========================================================================
   BANNER PRINCIPAL OSCURO (HERO)
   ========================================================================== */
.hero {
    background: linear-gradient(rgba(10, 25, 47, 0.88), rgba(10, 25, 47, 0.88)), 
                url('https://images.unsplash.com/photo-1486406146926-c627a92ad1ab?ixlib=rb-4.0.3&auto=format&fit=crop&w=1200&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    color: var(--white);
    text-align: center;
    padding: 120px 20px 160px 20px;
}

.hero h1 {
    font-size: clamp(2.2rem, 5vw, 3.8rem);
    font-weight: 700;
    max-width: 850px;
    margin: 0 auto 20px auto;
    letter-spacing: -0.5px;
}

.hero p {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    max-width: 750px;
    margin: 0 auto 35px auto;
    opacity: 0.85;
}

.btn-hero {
    display: inline-block;
    background-color: var(--secondary-blue);
    color: var(--white);
    padding: 14px 35px;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s, transform 0.2s;
}

.btn-hero:hover {
    background-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* ==========================================================================
   TARJETAS BLANCAS FLOTANTES
   ========================================================================== */
.hero-cards-container {
    margin-top: -85px;
    position: relative;
    z-index: 10;
    padding-bottom: 60px;
}

.grid-home-cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.home-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    border-bottom: 4px solid transparent;
}

.home-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
    border-bottom: 4px solid var(--secondary-blue);
}

.home-card i {
    color: var(--secondary-blue);
    margin-bottom: 20px;
}

.home-card h3 {
    color: var(--dark-blue);
    margin-bottom: 12px;
    font-size: 1.4rem;
    font-weight: 600;
}

.home-card p {
    color: var(--text-gray);
    font-size: 0.98rem;
}

/* ==========================================================================
   PIE DE PÁGINA (FOOTER)
   ========================================================================== */
footer {
    background-color: var(--dark-blue);
    color: var(--white);
    text-align: center;
    padding: 25px 0;
    font-size: 0.9rem;
    border-top: 1px solid rgba(255,255,255,0.05);
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media(max-width: 767px) {
    header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    nav ul {
        flex-direction: column;
        width: 100%;
        gap: 8px;
    }
    nav ul li {
        width: 100%;
    }
    nav ul li a {
        display: block;
        padding: 10px;
        background-color: var(--light-bg);
        border-radius: 5px;
    }
    nav ul li a.btn-nav {
        margin-top: 5px;
    }
}

@media(min-width: 768px) {
    .grid-home-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}