html {
    scroll-behavior: smooth;
}

:root {
    /* Colores de Marca */
    --primary-color: #000000; /* Negro Puro */
    --secondary-color: #333333;
    --accent-color: #f8f8f8; /* Fondo Blanco Humo */
    --text-color: #555555;
    --white-color: #ffffff;
    --font-family: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--accent-color);
    line-height: 1.6;
    color: var(--secondary-color); /* Texto general ligeramente gris */
    position: relative;
    overflow-x: hidden;
}

/* Patrón de fondo de puntos */
body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(#d3d3d3 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: -1;
}

/* ======================================= */
/* 1. HEADER Y NAVEGACIÓN (Escritorio)     */
/* ======================================= */

.header {
    width: 100%;
    padding: 20px 5%;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-image {
    height: 40px;
    width: auto;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
    margin-left: auto;
    align-items: center; /* Asegura que los botones PHP estén centrados */
}

.nav-links a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: 600;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s;
}

/* Efecto hover */
.nav-links a:hover {
    color: var(--primary-color);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width 0.3s ease-in-out;
}

.nav-links a:hover::after {
    width: 100%;
}

/* Estilo para el botón de registro que viene del PHP */
.btn-registro-menu {
    background-color: var(--primary-color);
    color: var(--white-color) !important;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: 600 !important;
    transition: opacity 0.3s;
}
.btn-registro-menu:hover { opacity: 0.8; }
.user-greeting { color: var(--primary-color); }
.logout-link { color: #dc3545 !important; } /* Rojo para Salir */


/* ======================================= */
/* 2. CONTENIDO PRINCIPAL                  */
/* ======================================= */

.main-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 50px 5%;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    color: var(--primary-color);
    max-width: 800px;
    margin-bottom: 30px;
    line-height: 1.2;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
    padding: 15px 40px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
}

.products {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 80px;
    flex-wrap: wrap;
}

.product-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 350px;
    text-align: center;
    border-radius: 10px;
    background-color: var(--white-color);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

.product-image {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    margin-bottom: 20px;
}

.product-card h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.product-card p {
    color: var(--text-color);
    font-size: 1rem;
}

.what-we-do {
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.what-we-do h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.what-we-do-intro {
    color: var(--secondary-color);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.services-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.service-card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    width: 350px;
}

.service-card i {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.service-card p {
    color: var(--text-color);
}

.partners {
    padding: 80px 5%;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
    background-color: #f2f2f2;
}

.partners h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.partners-grid {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.partner-card {
    background-color: var(--white-color);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    text-align: center;
    width: 300px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.partner-logo {
    max-width: 150px;
    height: auto;
}

.partner-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-top: 15px;
}

.footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 40px 20px;
    margin-top: 50px;
}

.footer-content a {
    color: var(--white-color);
    text-decoration: none;
    font-weight: 600;
}

.footer-content a:hover {
    text-decoration: underline;
}

.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0);
}


/* ======================================= */
/* 3. MENÚ HAMBURGUESA (Móvil)             */
/* ======================================= */

/* 3.1 Menú Hamburguesa (Icono) */
.menu-toggle {
    display: none; /* Oculto por defecto en escritorio */
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: var(--primary-color); /* Negro */
    padding: 0;
    z-index: 1010;
}

/* 3.2 Panel Desplegable (Menú Móvil) */
.mobile-nav {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%; /* Ancho del panel */
    max-width: 320px;
    height: 100%;
    background-color: var(--primary-color); /* Fondo negro para el panel */
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.5);
    transform: translateX(100%); /* Inicialmente fuera de la pantalla */
    transition: transform 0.3s ease-out;
    z-index: 1000;
    /* Evita que el fondo blanco se muestre al abrir */
    pointer-events: none; 
    visibility: hidden;
}

.mobile-nav.is-open {
    transform: translateX(0); /* Despliega el panel */
    pointer-events: auto;
    visibility: visible;
}

.mobile-nav-links {
    list-style: none;
    padding: 25px;
    margin-top: 60px; 
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.mobile-nav-links a, .mobile-nav-links span {
    text-decoration: none;
    color: var(--accent-color); /* Texto blanco humo para el panel negro */
    font-size: 1.1rem;
    padding: 10px 0;
    display: block;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.mobile-nav-links a:hover {
    color: #0cc0df; /* Color de acento */
}

/* Botón de cerrar (la 'X') */
.close-btn {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    color: var(--white-color);
    font-size: 30px;
    cursor: pointer;
}

/* Estilos de botones de Login/Registro en el menú móvil */
.btn-mobile-registro {
    background-color: var(--white-color);
    color: var(--primary-color) !important;
    padding: 10px 15px !important;
    border-radius: 4px;
    text-align: center;
    font-weight: 700 !important;
    margin-top: 10px;
}
.btn-mobile-login {
    color: var(--white-color) !important;
    font-weight: 700;
}


/* ======================================= */
/* 4. MEDIA QUERY: REGLAS PARA MÓVILES     */
/* ======================================= */

@media (max-width: 900px) {
    /* Mostrar el botón Hamburguesa y ocultar el menú de escritorio */
    .menu-toggle {
        display: block; /* Muestra el icono de la hamburguesa */
    }

    .nav-links {
        display: none; /* Oculta el menú grande */
    }
    
    .navbar {
        justify-content: space-between; /* El logo a la izquierda, la hamburguesa a la derecha */
        width: 100%;
        padding: 0; /* Ya tenemos padding en .header */
    }
}


@media (max-width: 600px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    .products, .services-grid, .partners-grid {
        gap: 30px;
    }
    .product-card, .service-card, .partner-card {
        width: 100%;
        max-width: 350px;
    }
    .what-we-do h2, .partners h2 {
        font-size: 2rem;
    }
}