/* VARIABLES */
:root {
    --bg-color: #0a2540; 
    --bg-section: #113050; 
    --text-color: #ffffff; 
    --primary-color: #00d4ff; 
    --cencocal-purple: #311b92;
    --cencocal-green: #8cc63f;
}

/* CONFIGURACIÓN GENERAL */
html { scroll-behavior: smooth; }
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    padding: 0;
    font-size: 16px; 
}

/* ACCESIBILIDAD */
.skip-link {
    position: absolute;
    top: -50px;
    left: 0;
    background: var(--primary-color);
    padding: 10px;
    z-index: 100;
    text-decoration: none;
    color: #000;
}
.skip-link:focus { top: 0; }

/* ENCABEZADO Y LOGO */
.header-principal {
    background-color: #ffffff;
    padding: 10px 50px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.logo-img { height: 60px; width: auto; }

/* NAVEGACIÓN CON SUBRAYADO ANIMADO */
.nav-hero {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 1rem;
}

.nav-hero a {
    text-decoration: none;
    color: var(--cencocal-purple);
    font-weight: bold;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s;
}

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

.nav-hero a:hover::after { width: 100%; }
.nav-hero a:hover { color: var(--cencocal-green); }
.separador { color: #ccc; }

.btn-tienda {
    background-color: #e31837;
    color: #fff;
    padding: 10px 24px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: background 0.3s;
}

/* HERO BANNER */
.hero-banner {
    background: linear-gradient(rgba(10, 37, 64, 0.75), rgba(10, 37, 64, 0.75)), url('assets/logo2.png');
    background-size: cover;
    background-position: center;
    height: 65vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
}

.hero-overlay h1 { font-size: 3.2rem; margin-bottom: 10px; color: #fff; font-weight: 700; }
.hero-overlay p { font-size: 1.3rem; margin-bottom: 25px; color: #fff; }

.btn-accion {
    background-color: var(--cencocal-green);
    color: #fff;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    display: inline-block;
}

/* TÍTULOS DE SECCIÓN DECORADOS */
h2 {
    font-size: 2.4rem;
    margin-bottom: 50px;
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

h2::after {
    content: '';
    position: absolute;
    width: 60%;
    height: 4px;
    background: var(--cencocal-green);
    bottom: -15px;
    left: 20%;
    border-radius: 2px;
}

/* SECCIONES Y CONTENIDO FLEXIBLE (CON IMAGEN) */
section { padding: 90px 20px; text-align: center; }
#nosotros { background-color: var(--bg-section); }

.contenido-flexible {
    display: flex;
    align-items: center;
    gap: 40px;
    max-width: 1100px;
    margin: 0 auto;
    text-align: left; /* Texto alineado a la izquierda en PC */
}

/* Clase para invertir el orden de texto e imagen */
.contenido-flexible.reverse {
    flex-direction: row-reverse;
}

.contenido-texto {
    flex: 1;
    line-height: 1.8; 
    font-size: 1.1rem;
    color: #f0f0f0;
}

.contenido-texto p { margin-bottom: 20px; }

.contenido-imagen {
    flex: 1;
    display: flex;
    justify-content: center;
}

.img-seccion {
    width: 100%;
    max-width: 450px;
    border-radius: 15px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.img-seccion:hover {
    transform: scale(1.03);
}

/* MARCAS Y FLIP CARDS */
.seccion-blanca { background-color: #fff; color: #333; }
.contenedor-marcas { max-width: 1000px; margin: 0 auto; text-align: center; }

.grilla-marcas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    margin-top: 40px;
    justify-items: center; 
    align-items: center; 
}

.marca-item { width: 100%; max-width: 220px; }

.flip-card {
    background-color: transparent;
    perspective: 1000px;
    aspect-ratio: 1 / 1; 
    cursor: pointer;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.6s ease;
    transform-style: preserve-3d;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    border-radius: 10px;
}

.flip-card:hover .flip-card-inner {
    transform: translateY(-12px) rotateY(180deg);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.flip-card-front, .flip-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    padding: 20px;
    box-sizing: border-box;
}

.flip-card-front {
    background-color: #f4f4f4;
    color: var(--cencocal-purple);
    font-weight: 600;
    font-size: 1.2rem;
    border-bottom: 4px solid var(--cencocal-green);
}

.flip-card-back {
    background-color: #ffffff;
    transform: rotateY(180deg);
    border: 1px solid #eaeaea;
}

.flip-card-back img { max-width: 85%; max-height: 85%; object-fit: contain; }

/* CONTACTO (Reemplazo del formulario) */
.caja-contacto {
    max-width: 450px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: center; /* Lo centramos para que se vea más ordenado */
    background: #06182c; /* Mantiene la caja azul oscura */
    padding: 30px;
    border-radius: 10px;
}

.caja-contacto p {
    margin: 0;
    font-size: 1.1rem;
    color: #ffffff;
}

.caja-contacto strong {
    color: var(--primary-color); /* Pone los nombres de las redes en color celeste para que resalten */
}

/* FOOTER */
footer { padding: 30px; text-align: center; background: #051626; font-size: 0.9rem; }

/* DISEÑO RESPONSIVO */
@media (max-width: 900px) {
    .header-principal { flex-direction: column; padding: 20px; gap: 15px; }
    .hero-overlay h1 { font-size: 2.5rem; }
}

@media (max-width: 768px) {
    /* En móvil, ponemos imagen y texto uno debajo del otro */
    .contenido-flexible, .contenido-flexible.reverse {
        flex-direction: column;
        text-align: center;
        gap: 30px;
    }

    .grilla-marcas { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    h2 { font-size: 2rem; }
}

@media (max-width: 480px) {
    .grilla-marcas { grid-template-columns: 1fr; gap: 20px; }
    .nav-hero { flex-wrap: wrap; gap: 10px; }
    .separador { display: none; }
}