/* ============================================
   ESTILOS PERSONALIZADOS - SITIO CORPORATIVO
   ============================================ */

/* Variables CSS - Paleta de Colores */
:root {
    --color-primary-dark: #1e3a5f;
    --color-primary: #4a90e2;
    --color-secondary: #38b2ac; /* Color secundario */
    --color-whatsapp: #128c7e; /* Tono de WhatsApp más corporativo */
    --color-gray: #f2f2f2;
    --color-light-gray: #f9f9f9; /* Gris claro para fondos */
    --color-white: #ffffff;
    --color-text: #333333; /* Color de texto principal */
    --font-primary: 'Inter', 'Roboto', sans-serif;
}

/* ============================================
   CONFIGURACIÓN GENERAL
   ============================================ */

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

body {
    font-family: var(--font-primary);
    color: var(--color-text);
    line-height: 1.6;
    padding-top: 76px; /* Espacio para navbar fijo */
}

/* ============================================
   NAVBAR PERSONALIZADO
   ============================================ */

.navbar {
    background-color: var(--color-primary-dark) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08); /* Sombra más suave */
    transition: all 0.3s ease;
    padding-top: 1rem; /* Aumentamos el espaciado superior */
    padding-bottom: 1rem; /* Aumentamos el espaciado inferior */
}

.navbar-brand {
    font-size: 1.25rem;
    font-weight: 600;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
    font-size: 1.1rem; /* Aumentamos el tamaño de la fuente */
    position: relative; /* Necesario para el efecto de la línea inferior */
}

/* Creamos la línea inferior, inicialmente oculta */
.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--color-primary);
    transition: width 0.3s ease-out;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--color-primary) !important;
}

/* Mostramos la línea al pasar el ratón o si el enlace está activo */
.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 60%;
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
    min-height: 100vh; /* Ocupar toda la altura de la pantalla */
    display: flex;
    align-items: center;
    padding: 6rem 0;
    color: var(--color-white);
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-image-placeholder {
    background-color: rgba(255, 255, 255, 0.1); /* Fondo semitransparente */
    border-radius: 30px; /* Bordes más redondeados */
    min-height: 400px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2); /* Sombra más pronunciada */
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px); /* Efecto de desenfoque */

    /* Imagen de fondo para el placeholder */
    background-image: url('../img/backgroundinicial.jpg');
    background-size: cover;
    background-position: center;
}

.hero-text h1, .hero-text .lead {
    color: var(--color-white);
}

.hero-section .lead {
    font-size: 1.5rem; /* Aumentamos el tamaño del subtítulo */
    font-weight: 300; /* Un poco más ligero para contraste */
}

.hero-text {
    max-width: 750px;
}

/* ============================================
   PAGE HEADER
   ============================================ */

.page-header {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%); /* Nuevo gradiente */
    color: var(--color-white);
    margin-bottom: 3rem;
}

.page-header h1 {
    color: var(--color-white);
}

.page-header .text-muted {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* ============================================
   CARDS Y SERVICIOS
   ============================================ */

.card {
    border-radius: 12px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.12) !important; /* Sombra mejorada */
}

.service-card {
    border-left: 4px solid var(--color-secondary); /* Usar color secundario */
}

.service-icon {
    display: inline-block;
    padding: 1rem;
    background-color: var(--color-gray);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.service-icon-large {
    text-align: center;
}

/* ============================================
   BOTONES
   ============================================ */

.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    transform: translateY(-3px); /* Mayor elevación */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); /* Sombra más pronunciada */
}

.btn-outline-primary {
    color: var(--color-primary);
    border-color: var(--color-primary);
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
    transform: translateY(-3px); /* Mayor elevación */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.1); /* Sombra sutil */
}

.btn-secondary {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-white);
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-secondary:hover {
    background-color: #2c8b87; /* Un poco más oscuro */
    border-color: #2c8b87;
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

.btn-success {
    background-color: var(--color-whatsapp);
    border-color: var(--color-whatsapp);
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-success:hover {
    background-color: #128c7e;
    border-color: #128c7e;
    transform: translateY(-3px); /* Mayor elevación */
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15); /* Sombra más pronunciada */
}

.btn-whatsapp {
    background-color: var(--color-whatsapp);
    border-color: var(--color-whatsapp);
    color: var(--color-white);
    font-weight: 500;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-whatsapp:hover {
    background-color: #075e54; /* Tono más oscuro para hover */
    border-color: #075e54;
    color: var(--color-white);
    transform: translateY(-3px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.15);
}

/* ============================================
   SECCIONES
   ============================================ */

section {
    padding: 4rem 0;
}

.bg-light {
    background-color: var(--color-light-gray) !important; /* Usar el nuevo gris claro */
}

.bg-primary {
    background-color: var(--color-primary-dark) !important;
}

.bg-primary p,
.bg-primary .lead {
    color: rgba(255, 255, 255, 0.9); /* Blanco semitransparente para suavidad */
}

.bg-primary h1,
.bg-primary h2,
.bg-primary h3 {
    color: var(--color-white);
}

.bg-whatsapp {
    background-color: var(--color-whatsapp) !important;
}

.bg-gradient-primary-secondary {
    background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
}

/* ============================================
   PERFIL PROFESIONAL
   ============================================ */

.profile-image-placeholder {
    background-color: var(--color-gray);
    border-radius: 50%;
    width: 250px;
    height: 250px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    border: 5px solid var(--color-primary);
}

/* ============================================
   EXPERIENCIA
   ============================================ */

.experience-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-gray);
    border-radius: 10px;
}

/* ============================================
   HABILIDADES
   ============================================ */

.skill-item {
    margin-bottom: 1.5rem;
}

.progress {
    border-radius: 10px;
    background-color: var(--color-gray);
}

.progress-bar {
    border-radius: 10px;
    background-color: var(--color-secondary); /* Usar color secundario */
}

.skills-badges .badge {
    transition: transform 0.3s ease;
}

.skills-badges .badge:hover {
    transform: scale(1.05);
}

/* ============================================
   FORMULARIO DE CONTACTO
   ============================================ */

.form-control {
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(74, 144, 226, 0.25);
}

.form-label {
    color: #333;
    margin-bottom: 0.5rem;
}

.contact-info-item {
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--color-gray);
}

.contact-info-item:last-child {
    border-bottom: none;
}

.contact-icon {
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-gray);
    border-radius: 10px;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background-color: var(--color-gray) !important; /* Fondo más claro */
    margin-top: 4rem;
    padding-top: 3rem;
    padding-bottom: 3rem;
    border-top: 1px solid #e0e0e0; /* Borde superior sutil */
}

.footer a {
    color: var(--color-text); /* Color de texto estándar */
    transition: color 0.3s ease;
}

.footer a:hover {
    color: var(--color-primary) !important;
}

.footer .text-muted {
    color: #888888 !important; /* Gris más oscuro para mejor contraste */
}

hr {
    border-top: 1px solid #e0e0e0; /* Borde superior sutil */
}

/* ============================================
   ESPACIADO Y TIPOGRAFÍA
   ============================================ */

/* Espaciado generoso (mucho espacio en blanco) */
.container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700; /* Mayor peso para títulos */
    line-height: 1.3;
    margin-bottom: 1.5rem; /* Mayor margen inferior */
    color: var(--color-primary-dark); /* Color oscuro para títulos */
}

.display-1, .display-2, .display-3, .display-4, .display-5 {
    font-weight: 700;
}

.lead {
    font-size: 1.25rem;
    font-weight: 400;
    line-height: 1.7; /* Mayor interlineado */
    color: #555555; /* Gris oscuro para el texto lead */
}

p {
    margin-bottom: 1.5rem; /* Espaciado entre párrafos */
}

/* ============================================
   ESTILOS DEL LOGO
   ============================================ */

.navbar-brand,
.footer h5.fw-bold {
    display: flex;
    align-items: center;
}

.brand-logo {
    height: 48px; /* Aumentamos el tamaño del logo */
    width: auto;
}

/* Clase para forzar el logo a blanco puro en fondos oscuros */
.logo-on-dark {
    filter: brightness(0) invert(1);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Tablets */
@media (max-width: 992px) {
    .hero-section {
        min-height: auto;
        padding: 3rem 0;
    }
    
    .hero-image-placeholder {
        min-height: 300px;
        margin-top: 2rem;
    }
    
    section {
        padding: 3rem 0;
    }
}

/* Móviles */
@media (max-width: 768px) {
    .brand-logo {
        height: 32px; /* Tamaño original del logo para móvil */
    }

    .navbar-nav .nav-link {
        font-size: 1rem; /* Tamaño original de la fuente para móvil */
    }

    /* Alineamos la línea del hover a la izquierda en el menú móvil */
    .navbar-nav .nav-link::after {
        left: 1rem; /* Coincide con el padding del enlace */
        transform: translateX(0);
    }

    body {
        padding-top: 58px; /* Ajuste preciso para la altura de la navbar móvil */
    }
    
    .hero-section {
        min-height: auto; /* Altura automática en móvil */
        padding-top: 4rem;
        padding-bottom: 4rem;
        text-align: center; /* Centramos el texto del hero en móvil */
    }

    /* Ocultamos la imagen del hero en la versión móvil */
    .hero-image-placeholder {
        display: none;
    }

    /* Aumentamos el tamaño del título en móvil para forzar el salto de línea */
    .hero-section .display-3 {
        font-size: 3.2rem !important; /* Reducimos ligeramente el tamaño */
    }
    
    .display-1 {
        font-size: 2.5rem; /* Ajuste fino para el título en móvil */
    }
    
    .display-3 {
        font-size: 2rem;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .display-5 {
        font-size: 1.5rem;
    }
    
    section {
        padding: 2rem 0;
    }
    
    .profile-image-placeholder {
        width: 200px;
        height: 200px;
    }
    
    .card-body {
        padding: 1.5rem !important;
    }

    /* Ajustes para el footer en móvil */
    .footer {
        padding-top: 2rem;
        padding-bottom: 2rem;
        /* text-align: center; se elimina para alinear a la izquierda */
    }

    /* Reducimos el espacio vertical entre las columnas apiladas */
    .footer .row {
        --bs-gutter-y: 1rem;
    }

    /* Reducimos el espacio debajo de los títulos del footer */
    .footer h5 {
        margin-bottom: 0.5rem;
    }

    .footer .brand-logo {
        height: 48px; /* Hacemos el logo del footer más grande */
        margin-bottom: 0.5rem;
    }

    /* Reducimos el padding de la sección de contacto en móvil */
    .contact-section {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
}

/* ============================================
   UTILIDADES
   ============================================ */

.shadow-sm {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.text-primary {
    color: var(--color-primary) !important;
}

.bg-primary {
    background-color: var(--color-primary-dark) !important;
}

/* Animaciones suaves */
* {
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* ============================================
   MEJORAS DE ACCESIBILIDAD
   ============================================ */

a:focus,
button:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* ============================================
   FIN DE ESTILOS
   ============================================ */

/* Animación de aparición gradual (Fade-in) */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-section {
    animation: fadeIn 0.8s ease-out forwards;
}

