/* --- Variables y Estilos Base --- */
:root {
    --primary-color: #0A2F5B; /* Azul oscuro corporativo */
    --secondary-color: #D98324; /* Naranja/dorado como acento */
    --light-gray: #f4f7fa;
    --dark-gray: #333333;
    --text-color: #4a4a4a;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.7;
    color: var(--text-color);
    background-color: #fff;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 700;
}

h2 {
    font-size: 2.8rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
    padding-bottom: 1rem;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
}

section {
    padding: 6rem 0;
}

/* --- Cabecera --- */
#main-header {
    background: transparent;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: background-color 0.4s ease, padding 0.4s ease;
}

#main-header.scrolled {
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
}

#main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    color: #fff;
    font-size: 1.8rem;
    font-family: var(--font-heading);
    text-decoration: none;
    transition: color 0.4s ease;
}

#main-header.scrolled .logo {
    color: var(--primary-color);
}

#main-header nav ul {
    list-style: none;
    display: flex;
}

#main-header nav a {
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 1rem;
    margin: 0 0.5rem;
    position: relative;
    transition: color 0.4s ease;
}

#main-header.scrolled nav a {
    color: var(--primary-color);
}

#main-header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}

#main-header nav a:hover::after {
    width: 100%;
}

#mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}
#main-header.scrolled #mobile-menu-toggle {
    color: var(--primary-color);
}


/* --- Sección Hero --- */
#hero {
    height: 100vh;
    background: url('./assets/hero-background.jpg') no-repeat center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
    padding: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 47, 91, 0.7); /* Overlay del color primario */
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

#hero h1 {
    font-size: 4.5rem;
    color: #fff;
    margin-bottom: 1rem;
}

#hero p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 300;
}

.cta-button {
    background-color: var(--secondary-color);
    color: #fff;
    padding: 1rem 2.5rem;
    text-decoration: none;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.cta-button:hover {
    background-color: #b96d1c;
    transform: translateY(-5px);
}

/* --- Animaciones Fade-in --- */
.fade-in {
    animation: fadeIn 1s ease-out forwards;
    opacity: 0;
}
@keyframes fadeIn {
    to { opacity: 1; }
}

.scroll-fade {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.scroll-fade.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Sección Nosotros --- */
#nosotros {
    background-color: var(--light-gray);
}
#nosotros .container {
    max-width: 800px;
    text-align: center;
}
#nosotros p {
    font-size: 1.1rem;
}

/* --- Sección Productos --- */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2.5rem;
    margin-top: 4rem;
}

.product-card {
    background: #fff;
    padding: 2.5rem;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.product-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12);
}

.product-card i {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
}

.product-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* --- Pie de Página --- */
footer {
    background-color: var(--dark-gray);
    color: #e0e0e0;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    gap: 3rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.footer-about, .footer-contact {
    flex: 1;
    min-width: 300px;
}

footer h3 {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.5rem;
}

footer h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: var(--secondary-color);
}

footer p {
    margin-bottom: 0.8rem;
}

footer a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a:hover {
    color: #fff;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #555;
    font-size: 0.9rem;
    color: #aaa;
}

/* --- Diseño Responsivo --- */
@media(max-width: 768px) {
    h2 { font-size: 2.2rem; }
    #hero h1 { font-size: 3rem; }
    #hero p { font-size: 1.1rem; }

    #main-header nav {
        display: none; /* Ocultar menú en escritorio */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: #fff;
        flex-direction: column;
        padding: 1rem 0;
    }
    #main-header nav.active {
        display: flex; /* Mostrar con JS */
    }
    #main-header.scrolled nav a, #main-header nav a {
        color: var(--primary-color);
        padding: 1rem;
        text-align: center;
        border-bottom: 1px solid #eee;
    }
    #mobile-menu-toggle {
        display: block;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    footer h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
}