/* ==========================================================================
   Variables y Estilos Globales
   Aquí defines los colores y fuentes principales. Cambiarlos aquí
   afectará a todo el sitio, facilitando la personalización.
   ========================================================================== */
:root {
    --primary-color: #4A4AFF; /* Azul vibrante del logo */
    --dark-color: #212121;    /* Negro/Gris oscuro para títulos */
    --text-color: #333;       /* Gris para texto general, más suave a la vista */
    --light-color: #ffffff;   /* Blanco */
    --light-gray-bg: #f8f9fa; /* Fondo gris claro para alternar secciones */
    --font-family: 'Poppins', sans-serif;
    --header-height: 80px;
}

/* Reseteo básico para consistencia entre navegadores */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    color: var(--text-color);
    line-height: 1.6;
    background-color: var(--light-color);
}

h1, h2, h3 {
    color: var(--dark-color);
    font-weight: 700;
    line-height: 1.2;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; }
h3 { font-size: 1.4rem; }

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Clase de utilidad para centrar texto */
.text-center {
    text-align: center;
}

/* Contenedor principal para centrar el contenido */
.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Estilo general de las secciones */
section {
    padding: 80px 0;
}

.section-title {
    margin-bottom: 40px;
}


/* ==========================================================================
   Encabezado y Navegación
   ========================================================================== */
.site-header {
    background-color: var(--dark-color);
    padding: 0 20px;
    height: var(--header-height);
    position: sticky;
    top: 0;
    z-index: 1000;
    width: 100%;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo img {
    height: 50px; /* Ajusta según el tamaño deseado */
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--light-color);
    font-weight: 600;
    padding: 5px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a:hover::after {
    width: 100%;
}

.menu-toggle {
    display: none; /* Oculto en escritorio */
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--light-color);
    position: relative;
    transition: background-color 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 3px;
    background-color: var(--light-color);
    left: 0;
    transition: transform 0.3s ease, top 0.3s ease;
}

.hamburger::before { top: -8px; }
.hamburger::after { top: 8px; }

/* ==========================================================================
   Sección Hero
   ========================================================================== */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - var(--header-height));
    padding: 40px 20px;
    text-align: center;
    color: var(--light-color);
    position: relative;
    background-image: url('../images/01.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efecto Parallax */
}

/* Overlay oscuro para legibilidad del texto */
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.7);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

.hero-title {
    color: var(--light-color);
    font-size: 3.5rem;
    margin-bottom: 1rem;
}

.hero-subtitle {
    font-size: 1.2rem;
    max-width: 650px;
    margin: 0 auto 30px;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.cta-button {
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.cta-button.primary {
    background-color: var(--primary-color);
    color: var(--light-color);
}

.cta-button.primary:hover {
    background-color: #3a3ad8;
    transform: translateY(-3px);
}

.cta-button.secondary {
    background-color: transparent;
    color: var(--light-color);
    border-color: var(--light-color);
}

.cta-button.secondary:hover {
    background-color: var(--light-color);
    color: var(--dark-color);
    transform: translateY(-3px);
}


/* ==========================================================================
   Sección Quiénes Somos (About Us)
   ========================================================================== */
.about-us {
    background-color: var(--light-gray-bg);
}

.content-section {
    display: flex;
    align-items: center;
    gap: 60px;
}

.text-content {
    flex: 1;
}

.image-content {
    flex: 1;
}

.image-content img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ==========================================================================
   Sección Filosofía (Misión, Visión, Valores)
   ========================================================================== */
.philosophy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.philosophy-item {
    background-color: #ffffff;
    padding: 30px;
    border-radius: 8px;
    border-left: 5px solid var(--primary-color);
}

.philosophy-item.values ul {
    list-style: none;
    padding-left: 0;
}

.philosophy-item.values li {
    padding-left: 1.2em;
    position: relative;
}

.philosophy-item.values li::before {
    content: '✔';
    color: var(--primary-color);
    position: absolute;
    left: 0;
}


/* ==========================================================================
   Sección Portafolio
   ========================================================================== */
.portfolio {
    background-color: var(--light-gray-bg);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.portfolio-card {
    background-color: var(--light-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.portfolio-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.12);
}

.portfolio-card img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    object-position: top;
}

.card-content {
    padding: 25px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-bottom: 10px;
}

.card-content p {
    flex-grow: 1;
}

.card-link {
    font-weight: 600;
    margin-top: 15px;
    align-self: flex-start;
}

/* ==========================================================================
   Sección Por Qué Travisafe
   ========================================================================== */
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.why-us-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    background: var(--light-gray-bg);
    padding: 20px;
    border-radius: 8px;
}

.why-us-item .icon {
    font-size: 1.5rem;
    color: var(--primary-color);
    line-height: 1;
}

.why-us-item p {
    margin: 0;
}

/* ==========================================================================
   Pie de Página (Footer)
   ========================================================================== */
.site-footer {
    background-color: var(--dark-color);
    color: rgba(255, 255, 255, 0.8);
    padding: 60px 0 0;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
    padding-bottom: 40px;
}

.footer-about {
    flex-basis: 40%;
}

.footer-logo {
    max-width: 200px;
    margin-bottom: 20px;
}

.footer-contact {
    flex-basis: 40%;
}

.footer-contact h3 {
    color: var(--light-color);
    margin-bottom: 20px;
}

.footer-contact a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease;
}

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

.social-links {
    margin-top: 20px;
    display: flex;
    gap: 15px;
}

.social-links a {
    font-weight: 600;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
}


/* ==========================================================================
   Media Queries para Diseño Responsive
   ========================================================================== */

/* Tablets y pantallas pequeñas (hasta 992px) */
@media (max-width: 992px) {
    .philosophy-grid {
        grid-template-columns: 1fr;
    }

    .content-section {
        flex-direction: column;
    }
}

/* Móviles (hasta 768px) */
@media (max-width: 768px) {
    h1, .hero-title { font-size: 2.5rem; }
    h2 { font-size: 1.8rem; }

    /* Menú hamburguesa */
    .nav-links {
        position: fixed;
        top: var(--header-height);
        left: 0;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--dark-color);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        transform: translateX(100%);
        transition: transform 0.3s ease-in-out;
    }

    .nav-links.active {
        transform: translateX(0);
    }
    
    body.no-scroll {
        overflow: hidden;
    }

    .menu-toggle {
        display: block;
    }
    
    /* Animación del ícono hamburguesa a 'X' */
    .menu-toggle.active .hamburger {
        background-color: transparent;
    }

    .menu-toggle.active .hamburger::before {
        transform: rotate(45deg);
        top: 0;
    }

    .menu-toggle.active .hamburger::after {
        transform: rotate(-45deg);
        top: 0;
    }

    .portfolio-grid, .why-us-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-about, .footer-contact {
        flex-basis: 100%;
    }

    .social-links {
        justify-content: center;
    }
}