/* ========================================
   SAFRELY - Estilos principales
   Paleta: Azul institucional + Amarillo
======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --azul: #1E40AF;
    --azul-claro: #3B82F6;
    --azul-oscuro: #1E3A8A;
    --amarillo: #F59E0B;
    --amarillo-hover: #D97706;
    --gris: #64748B;
    --gris-claro: #F8FAFC;
    --blanco: #FFFFFF;
    --negro: #0F172A;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    color: var(--negro);
    line-height: 1.7;
    background: var(--blanco);
}

/* ========================================
   Iconos
======================================== */
.icon {
    width: 24px;
    height: 24px;
    display: inline-block;
    vertical-align: middle;
}

/* ========================================
   Header
======================================== */
header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--blanco);
    z-index: 1000;
    border-bottom: 1px solid #E2E8F0;
}

.header-top {
    background: var(--azul);
    color: var(--blanco);
    padding: 0.5rem 1.5rem;
    font-size: 0.85rem;
}

.header-top-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-top a {
    color: var(--blanco);
    text-decoration: none;
    margin-left: 1.5rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.header-top a:hover {
    color: var(--amarillo);
}

.header-top svg {
    width: 16px;
    height: 16px;
}

.header-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.logo img {
    height: 55px;
    width: auto;
}

.logo-text {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--azul);
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--amarillo);
}

nav {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

nav a {
    text-decoration: none;
    color: var(--negro);
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
    transition: color 0.3s;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--amarillo);
    transition: width 0.3s;
}

nav a:hover {
    color: var(--azul);
}

nav a:hover::after {
    width: 100%;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    background: var(--amarillo);
    color: var(--negro);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
    font-size: 0.95rem;
}

.btn:hover {
    background: var(--amarillo-hover);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(245, 158, 11, 0.3);
}

.btn-azul {
    background: var(--azul);
    color: var(--blanco);
}

.btn-azul:hover {
    background: var(--azul-oscuro);
    box-shadow: 0 10px 25px rgba(30, 64, 175, 0.3);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--azul);
    color: var(--azul);
}

.btn-outline:hover {
    background: var(--azul);
    color: var(--blanco);
}

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    background: none;
    border: none;
    padding: 5px;
}

.menu-toggle span {
    width: 28px;
    height: 3px;
    background: var(--azul);
    border-radius: 3px;
    transition: 0.3s;
}

/* ========================================
   Hero
======================================== */
.hero {
    padding: 10rem 1.5rem 6rem;
    background: linear-gradient(180deg, var(--gris-claro) 0%, var(--blanco) 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(59, 130, 246, 0.1);
    color: var(--azul);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.hero-badge svg {
    width: 18px;
    height: 18px;
}

.hero h1 {
    font-size: 3.25rem;
    font-weight: 800;
    color: var(--negro);
    line-height: 1.15;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--azul);
    position: relative;
}

.hero h1 span::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 12px;
    background: rgba(245, 158, 11, 0.3);
    z-index: -1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--gris);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-features {
    display: flex;
    gap: 2rem;
    margin-top: 3rem;
}

.hero-feature {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.hero-feature-icon {
    width: 45px;
    height: 45px;
    background: var(--amarillo);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-feature-icon svg {
    width: 22px;
    height: 22px;
    color: var(--negro);
}

.hero-feature span {
    font-weight: 600;
    color: var(--negro);
    font-size: 0.95rem;
}

.hero-visual {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0,0,0,0.15);
}

.hero-visual img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.hero-visual-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15, 23, 42, 0.9), transparent);
    padding: 2rem;
}

.hero-categories {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

.hero-category {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
    color: var(--blanco);
    backdrop-filter: blur(10px);
}

.hero-category svg {
    width: 20px;
    height: 20px;
    color: var(--amarillo);
}

.hero-category span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* ========================================
   Secciones
======================================== */
section {
    padding: 6rem 1.5rem;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 4rem;
}

.section-tag {
    display: inline-block;
    background: rgba(30, 64, 175, 0.1);
    color: var(--azul);
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.section-header h2 {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--negro);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: var(--gris);
}

/* ========================================
   Productos
======================================== */
.productos {
    background: var(--gris-claro);
}

.productos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.producto-card {
    background: var(--blanco);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.3s;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.producto-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.1);
}

.producto-img {
    height: 180px;
    overflow: hidden;
}

.producto-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s;
}

.producto-card:hover .producto-img img {
    transform: scale(1.05);
}

.producto-body {
    padding: 1.5rem;
}

.producto-body h3 {
    font-size: 1.25rem;
    color: var(--negro);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.producto-body h3 svg {
    width: 22px;
    height: 22px;
    color: var(--azul);
}

.producto-body p {
    color: var(--gris);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.producto-items {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.producto-item {
    background: var(--gris-claro);
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    color: var(--gris);
}

/* ========================================
   Beneficios
======================================== */
.beneficios {
    background: var(--azul);
    color: var(--blanco);
    position: relative;
    overflow: hidden;
}

.beneficios::before {
    content: '';
    position: absolute;
    top: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.beneficios .section-tag {
    background: rgba(255,255,255,0.2);
    color: var(--blanco);
}

.beneficios .section-header h2 {
    color: var(--blanco);
}

.beneficios .section-header p {
    color: rgba(255,255,255,0.8);
}

.beneficios-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.beneficio-card {
    text-align: center;
    padding: 2rem 1.5rem;
    background: rgba(255,255,255,0.1);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    transition: transform 0.3s;
}

.beneficio-card:hover {
    transform: scale(1.05);
}

.beneficio-icon {
    width: 80px;
    height: 80px;
    background: var(--amarillo);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.beneficio-icon svg {
    width: 36px;
    height: 36px;
    color: var(--negro);
}

.beneficio-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.beneficio-card p {
    font-size: 0.95rem;
    opacity: 0.85;
    line-height: 1.6;
}

/* ========================================
   Clientes
======================================== */
.clientes {
    background: var(--blanco);
}

.clientes-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
}

.cliente-card {
    text-align: center;
    padding: 2.5rem 1.5rem;
    background: var(--gris-claro);
    border-radius: 20px;
}

.cliente-icon {
    width: 80px;
    height: 80px;
    background: rgba(30, 64, 175, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
}

.cliente-icon svg {
    width: 36px;
    height: 36px;
    color: var(--azul);
}

.cliente-card h3 {
    font-size: 1.25rem;
    color: var(--negro);
    margin-bottom: 0.5rem;
}

.cliente-card p {
    color: var(--gris);
    font-size: 0.95rem;
}

/* ========================================
   Nosotros
======================================== */
.nosotros {
    background: var(--gris-claro);
}

.nosotros-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.nosotros-text h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--negro);
    margin-bottom: 1.5rem;
}

.nosotros-text p {
    color: var(--gris);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

.valores-lista {
    margin-top: 2rem;
}

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

.valor-check {
    width: 28px;
    height: 28px;
    background: var(--amarillo);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.valor-check svg {
    width: 16px;
    height: 16px;
    color: var(--negro);
}

.valor-item div h4 {
    color: var(--negro);
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.valor-item div p {
    color: var(--gris);
    margin-bottom: 0;
    font-size: 0.95rem;
}

.nosotros-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: var(--blanco);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 10px 40px rgba(0,0,0,0.05);
}

.stat-card h3 {
    font-size: 3rem;
    font-weight: 800;
    color: var(--azul);
    margin-bottom: 0.5rem;
}

.stat-card p {
    color: var(--gris);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* ========================================
   CTA
======================================== */
.cta {
    background: linear-gradient(135deg, var(--amarillo) 0%, var(--amarillo-hover) 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
}

.cta h2 {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--negro);
    margin-bottom: 1rem;
    position: relative;
}

.cta p {
    font-size: 1.25rem;
    color: var(--negro);
    opacity: 0.8;
    margin-bottom: 2.5rem;
    position: relative;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
}

.cta .btn-azul {
    box-shadow: 0 10px 30px rgba(30, 64, 175, 0.4);
}

/* ========================================
   Contacto
======================================== */
.contacto {
    background: var(--blanco);
}

.contacto-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.contacto-card {
    background: var(--gris-claro);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

a.contacto-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(30, 64, 175, 0.15);
}

.contacto-card-icon {
    width: 65px;
    height: 65px;
    background: var(--azul);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
}

.contacto-card-icon svg {
    width: 28px;
    height: 28px;
    color: var(--blanco);
}

.contacto-card h4 {
    color: var(--negro);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.contacto-card span {
    color: var(--gris);
    font-size: 0.95rem;
    line-height: 1.5;
}

/* ========================================
   Footer
======================================== */
footer {
    background: var(--negro);
    color: var(--blanco);
    padding: 5rem 1.5rem 2rem;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    margin-bottom: 1.25rem;
}

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

.footer-logo .logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--blanco);
}

.footer-logo .logo-text span {
    color: var(--amarillo);
}

/* Contacto CTA */
.contacto-cta {
    background: var(--blanco);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
}

.contacto-cta h3 {
    font-size: 1.5rem;
    color: var(--negro);
    margin-bottom: 0.5rem;
}

.contacto-cta > p {
    color: var(--gris);
    margin-bottom: 2rem;
}

.contacto-cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.footer-brand p {
    color: #94A3B8;
    font-size: 0.95rem;
    line-height: 1.7;
}

.footer-col h4 {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    color: var(--blanco);
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 0.75rem;
}

.footer-col ul li a {
    color: #94A3B8;
    text-decoration: none;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--amarillo);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid #334155;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #94A3B8;
    font-size: 0.9rem;
}

/* ========================================
   Responsive
======================================== */
@media (max-width: 1024px) {
    .productos-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .beneficios-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .clientes-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

@media (max-width: 968px) {
    .header-top {
        display: none;
    }

    .menu-toggle {
        display: flex;
    }

    nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--blanco);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    }

    nav.active {
        display: flex;
    }

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

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-visual {
        max-width: 500px;
        margin: 0 auto;
    }

    .hero-features {
        flex-direction: column;
        gap: 1rem;
    }

    .nosotros-content {
        grid-template-columns: 1fr;
    }

    .contacto-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .hero {
        padding: 8rem 1rem 4rem;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section-header h2 {
        font-size: 2rem;
    }

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

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

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

    .nosotros-stats {
        grid-template-columns: 1fr;
    }

    .contacto-cards {
        grid-template-columns: 1fr;
    }

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

    .footer-bottom {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    section {
        padding: 4rem 1rem;
    }
}
