/* 1. Definimos las variables de colores  */
:root {
  --color-bg-main: #1E1F26;      /* Midnight Blue (Fondo principal) */
  --color-secondary: #283655;    /* Indigo Ink (Secciones secundarias/Tarjetas) */
  --color-accent: #4D648D;       /* Blueberry (Detalles/Hover) */
  --color-text-light: #D0E1F9;   /* Periwinkle (Texto principal) */
  --color-white: #FFFFFF;        /* Blanco puro para títulos importantes */
}


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


*::before,
*::after {
  box-sizing: border-box;
}


body {
  background-color: var(--color-bg-main);
  color: var(--color-text-light);
  font-family: system-ui, -apple-system, sans-serif;
  min-height: 100vh;       
  display: flex;           
  flex-direction: column; 
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}


input, button, textarea, select {
  font: inherit;
}



/* --- ESTILOS DE LA NAVBAR --- */

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--color-bg-main); /* #1E1F26 */
    padding: 1rem 2rem;
    position: sticky; 
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3); 
}


.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--color-white);
    text-decoration: none;
    letter-spacing: 1px;
}

.logo .highlight {
    color: var(--color-accent); /* #4D648D */
}


.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
    gap: 2rem; /* Espacio entre items */
}

.nav-link {
    color: var(--color-text-light); /* #D0E1F9 */
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.nav-link:hover {
    color: var(--color-accent); /* #4D648D */
}


.btn-contact {
    background-color: var(--color-secondary); /* #283655 */
    padding: 0.5rem 1.2rem;
    border-radius: 4px;
    border: 1px solid var(--color-accent);
    transition: all 0.3s ease;
}

.btn-contact:hover {
    background-color: var(--color-text-light);
    color: var(--color-bg-main);
    font-weight: bold;
}


.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--color-text-light);
    transition: all 0.3s ease-in-out;
}

/* --- RESPONSIVE (Móviles y Tablets hasta 768px) --- */
@media (max-width: 768px) {
    .hamburger {
        display: block; /* Mostramos la hamburguesa */
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0; /* Ocultamos la barra del medio al abrir */
    }
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg); /* Giramos la primera */
    }
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg); /* Giramos la tercera */
    }

    .nav-menu {
        position: fixed;
        left: -100%; /* Lo sacamos de la pantalla a la izquierda */
        top: 70px; /* Altura aproximada del navbar */
        flex-direction: column;
        background-color: var(--color-bg-main); /* Mismo fondo oscuro */
        width: 100%;
        height: calc(100vh - 70px); /* Toda la altura restante */
        text-align: center;
        transition: 0.3s; /* Animación suave de entrada */
        padding-top: 1.5rem;
        border-top: 1px solid var(--color-secondary);
    }

    .nav-menu.active {
        left: 0; /* Lo traemos a la pantalla */
    }

    .nav-item {
        margin: 0.3rem 0;
    }
}
















/* --- ESTILOS DEL FOOTER --- */

.footer {
    /* Usamos el segundo color más oscuro para diferenciarlo del body */
    background-color: var(--color-secondary); /* #283655 */
    color: var(--color-text-light);
    padding-top: 4rem;
    margin-top: auto; /* Empuja el footer al fondo si hay poco contenido */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    /* Creamos 3 columnas. La primera es más ancha (2fr) que las otras (1fr) */
    grid-template-columns: 2fr 1fr 1fr; 
    gap: 3rem;
    padding-bottom: 3rem;
}

/* Títulos y Logo */
.footer-logo {
    font-size: 1.8rem;
    color: var(--color-white);
    margin-bottom: 1rem;
    letter-spacing: 1px;
}
.footer-logo .highlight {
    color: var(--color-accent); /* #4D648D */
}

.footer-desc {
    font-size: 0.95rem;
    opacity: 0.8;
    line-height: 1.6;
    max-width: 300px;
}

.footer-col h4 {
    font-size: 1.2rem;
    color: var(--color-white);
    margin-bottom: 1.2rem;
    position: relative;
}

/* Decoración debajo de los títulos h4 */
.footer-col h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 40px;
    height: 3px;
    background-color: var(--color-accent); /* #4D648D */
}

/* Enlaces del Footer */
.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.8rem;
}

.footer-links a {
    color: var(--color-text-light);
    text-decoration: none;
    transition: 0.3s;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--color-white);
    padding-left: 5px; /* Efecto sutil de movimiento */
}

/* Redes Sociales */
.social-links {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.social-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: rgba(255, 255, 255, 0.1); /* Fondo semi-transparente */
    color: var(--color-text-light);
    border-radius: 50%; /* Círculo perfecto */
    text-decoration: none;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--color-accent); /* #4D648D */
    color: var(--color-white);
    transform: translateY(-3px); /* Se eleva un poquito */
}

.footer-contact-info {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Barra Inferior Copyright */
.footer-bottom {
    background-color: var(--color-bg-main); /* #1E1F26 (Vuelve al oscuro total) */
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid rgba(255,255,255, 0.05);
    font-size: 0.85rem;
    opacity: 0.7;
}

/* --- RESPONSIVE FOOTER --- */
@media (max-width: 768px) {
    .footer-container {
        grid-template-columns: 1fr; /* Una sola columna en móvil */
        gap: 2.5rem;
        text-align: center;
    }
    
    .footer-desc {
        margin: 0 auto; /* Centrar texto descripción */
    }

    .footer-col h4::after {
        /* Centrar la línea decorativa en móvil */
        left: 50%;
        transform: translateX(-50%);
    }

    .social-links {
        justify-content: center; /* Centrar iconos */
    }
}




/* heroo */


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

.hero {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
    padding: 4rem 2rem;
    gap: 2rem;
    background: linear-gradient(135deg, #1E1F26 60%, #283655 100%);
    min-height: 80vh;
}

/* --- COL LEFT --- */
.hero-content {
    animation: fadeIn 1s ease forwards;
}

.hero-content h1 {
    color: var(--color-white);
    font-size: 2.8rem;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-content h1 span {
    color: var(--color-accent);
}

.hero-content p {
    color: var(--color-text-light);
    max-width: 500px;
    opacity: 0.9;
    margin-bottom: 1.8rem;
    font-size: 1rem;
}

/* BUTTONS */
.hero-buttons {
    display: flex;
    gap: 1rem;
}

.btn-primary {
    padding: 0.9rem 1.6rem;
    background-color: var(--color-accent);
    color: var(--color-white);
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s ease;
    border: 1px solid var(--color-accent);
}

.btn-primary:hover {
    background-color: var(--color-white);
    color: var(--color-bg-main);
}

.btn-secondary {
    padding: 0.9rem 1.6rem;
    background-color: transparent;
    color: var(--color-text-light);
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    border: 1px solid var(--color-text-light);
    transition: 0.3s ease;
}

.btn-secondary:hover {
    background-color: var(--color-text-light);
    color: var(--color-bg-main);
}

/* --- COL RIGHT IMAGE --- */
.hero-image {
    position: relative;
    animation: slideIn 1s ease forwards;
}

.hero-image img {
    width: 100%;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    filter: brightness(0.9);
}

/* === ANIMATIONS === */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

/* === RESPONSIVE === */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 3rem 1.5rem;
        min-height: auto;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-image {
        margin-top: 2rem;
    }
}


/* --- KEYFRAMES PARA EFECTO DE CARGA (FADE-IN UP) --- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px); /* Empieza 25px abajo */
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- NUEVOS KEYFRAMES DE FADE-IN DE PÁGINA --- */
@keyframes fadeInPage {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Aplica el Fade-In al contenido de las páginas al cargar */
.contact-page, .about-page-content {
    animation: fadeInPage 0.4s ease-out forwards; /* Duración corta y suave */
}

/* Aumentar la duración de la transición en el logo para un efecto suave */
.navbar .logo {
    transition: color 0.3s ease-in-out; 
}

/* Haz que los enlaces de la navegación también sean más suaves */
.nav-link {
    transition: color 0.3s ease-in-out, border-color 0.3s ease-in-out;
}

