/* Variables de diseño (Diseño moderno corporativo) */
:root {
    /* Paleta de colores. Utilizamos un azul oscuro corporativo y naranja tipo industria moderna */
    --primary-color: #f75c03; /* Naranja corporativo vibrante */
    --primary-hover: #d64f02;
    --secondary-color: #1c2541; /* Azul muy oscuro/grisaceo */
    
    --text-main: #333333;
    --text-light: #666666;
    --text-inverse: #ffffff;
    
    --bg-main: #ffffff;
    --bg-alt: #f8f9fa; /* Gris muy claro para secciones */
    
    --border-color: #e2e8f0;
    
    /* Tipografía */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    
    /* Efectos, sombras y transiciones */
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --radius-md: 8px;
    --radius-lg: 12px;
    
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease-in-out;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-primary);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

ul {
    list-style: none;
}

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

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.text-center {
    text-align: center;
}

/* Tipografía Básica */
h1, h2, h3, h4, h5, h6 {
    color: var(--secondary-color);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.5em;
}

p {
    margin-bottom: 1rem;
}

.section-header {
    margin-bottom: 3rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-title {
    font-size: 2rem;
    position: relative;
    padding-bottom: 10px;
}

.title-underline {
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
    border-radius: 2px;
    margin-top: 8px;
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--text-inverse);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--text-inverse);
}

.card {
    background: var(--bg-main);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-color);
}

/* ==========================================================================
   Cabecera & Navbar
   ========================================================================== */
.header {
    background-color: #000000;
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
    transition: padding var(--transition-normal);
}

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

.logo img {
    height: 60px; /* Tamaño del logo */
    object-fit: contain;
}

/* Menú Estilos Base (Mobile First) */
.nav {
    position: fixed;
    top: 90px;
    left: 100%;
    width: 100%;
    height: calc(100vh - 90px);
    background-color: #000000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    transition: left var(--transition-normal);
    z-index: 999;
}

.nav.active {
    left: 0;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    text-align: center;
    padding-top: 2rem;
    width: 100%;
}

.nav-link {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-inverse);
    position: relative;
}

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

/* Botón Hamburger */
.menu-toggle {
    display: block;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--text-inverse);
    position: relative;
    border-radius: 3px;
    transition: background-color var(--transition-fast);
}

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

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

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

.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;
}

/* ==========================================================================
   Secciones
   ========================================================================== */
section {
    padding: 5rem 0;
}

/* Hero Section */
.hero {
    background-color: var(--secondary-color); /* Fondo oscuro para resaltar el logo blanco */
    position: relative;
    overflow: hidden;
}

.hero::before {
    /* Patrón sutil para darle textura tecnológica o industrial */
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: radial-gradient(var(--text-inverse) 1px, transparent 1px);
    background-size: 30px 30px;
    z-index: 0;
}

.hero-container {
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    gap: 3rem;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
}

.hero-title {
    font-size: 2.5rem;
    color: var(--text-inverse); /* Título en blanco */
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.hero-text {
    font-size: 1.1rem;
    color: #cbd5e1; /* Texto secundario en gris claro */
    margin-bottom: 2rem;
}

.hero-image {
    width: 100%;
    max-width: 400px;
}

.hero-img-showcase {
    filter: drop-shadow(0px 10px 20px rgba(0,0,0,0.1));
    animation: float 6s ease-in-out infinite;
    max-height: 250px;
    margin: 0 auto;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* About Section */
.about {
    background-color: var(--bg-main);
}

.about-grid {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-text h3 {
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.about-text p {
    font-size: 1.1rem;
    color: var(--text-light);
    line-height: 1.8;
}

/* Contact Section */
.contact {
    background-color: var(--bg-alt);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item i {
    font-size: 1.5rem;
    line-height: 1;
}

.info-item h4 {
    margin-bottom: 0.2rem;
    font-size: 1.1rem;
}

.info-item p, .info-item a {
    color: var(--text-light);
}

.info-item a:hover {
    color: var(--primary-color);
}

.certifications-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    margin-top: 1.5rem;
    align-items: center;
}

.cert-img {
    max-height: 80px;
    object-fit: contain;
    border-radius: var(--radius-md);
    mix-blend-mode: multiply; /* Helps with white backgrounds on logos */
}

/* Ajuste específico para igualar el logo de Webpay con el del SII */
.webpay-img {
    max-height: 110px;
    width: 180px;
    object-fit: contain;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--secondary-color);
    color: #e2e8f0;
    padding-top: 4rem;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 50px;
    margin-bottom: 1rem;
    /* Filtrar logo para que se vea blanco sobre fondo oscuro si es necesario, o mantenerlo si tiene colores propios */
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.footer-desc {
    color: #cbd5e1;
}

.footer-links h4 {
    color: var(--text-inverse);
    margin-bottom: 1rem;
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-links a {
    color: #cbd5e1;
}

.footer-links a:hover {
    color: var(--primary-color);
    padding-left: 5px;
}

.footer-bottom {
    background-color: #0f172a;
    padding: 1.5rem 0;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* ==========================================================================
   Animations
   ========================================================================== */
.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-in.appear {
    opacity: 1;
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.appear {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

/* ==========================================================================
   Media Queries (Tablet and Desktop)
   ========================================================================== */
@media screen and (min-width: 768px) {
    .section-title {
        font-size: 2.5rem;
    }

    /* Navbar Tablet/Desktop */
    .menu-toggle {
        display: none;
    }

    .nav {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
        display: block;
    }

    .nav-list {
        flex-direction: row;
        padding-top: 0;
        gap: 2rem;
    }

    .nav-link {
        font-size: 1rem;
    }

    .nav-link::after {
        content: '';
        position: absolute;
        bottom: -5px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--primary-color);
        transition: width var(--transition-fast);
    }

    .nav-link:hover::after, .nav-link.active::after {
        width: 100%;
    }

    /* Sections Layout */
    .hero {
        padding: 8rem 0;
    }

    .hero-container {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .hero-content {
        text-align: left;
        flex: 1;
        max-width: 55%;
    }

    .hero-title {
        font-size: 3.5rem;
    }

    .hero-image {
        flex: 1;
    }
    
    .hero-img-showcase {
        max-height: 350px;
    }

    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-container {
        grid-template-columns: 2fr 1fr;
    }
}
