/* =========================
   VARIABLES & RESET
   ========================= */
:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f5f8fb;
    --color-primary: #0076c7;
    --color-primary-dark: #005c9b;
    --color-accent: #ff8a3d;
    --color-text: #1f2933;
    --color-text-light: #6b7280;
    --color-border: #e2e8f0;
    --color-card-bg: #ffffff;
    --color-error: #d93025;
    --color-success: #0f9d58;

    --shadow-soft: 0 10px 25px rgba(15, 23, 42, 0.1);
    --radius-card: 14px;

    --header-height: 72px;
    --max-width: 1120px;
}

/* Reset básico */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Poppins', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
}

/* Quitar márgenes por defecto en textos */
h1, h2, h3, h4, h5, h6,
p {
    margin: 0;
}

/* Imágenes responsivas */
img {
    max-width: 100%;
    display: block;
}

/* Enlaces */
a {
    color: inherit;
    text-decoration: none;
}

/* Listas */
ul {
    margin: 0;
    padding-left: 1.2rem;
}

/* =========================
   LAYOUT GENERAL
   ========================= */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 1.25rem;
}

.section {
    padding: 4.5rem 0;
}

.section-alt {
    background-color: var(--color-bg-alt);
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.section-header h2 {
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.section-header p {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

/* Grid helpers */
.grid {
    display: grid;
    gap: 1.75rem;
}

.grid-2 {
    grid-template-columns: 1fr;
}

.grid-3 {
    grid-template-columns: 1fr;
}

/* =========================
   HEADER & NAV
   ========================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(148, 163, 184, 0.2);
    z-index: 1000;
}

.header-container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-primary);
}

.logo img {
    width: 170px;
    height: auto;
    border-radius: 4px;
    object-fit: contain;
}

.logo-text {
    display: none;
}

/* Nav */
.main-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-list {
    list-style: none;
    display: none;
    flex-direction: column;
    background-color: #ffffff;
    position: absolute;
    top: var(--header-height);
    right: 0;
    left: 0;
    padding: 0.75rem 1.25rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.nav-link {
    display: block;
    padding: 0.4rem 0;
    font-size: 0.9rem;
    color: var(--color-text-light);
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover {
    color: var(--color-primary);
}

.btn-header {
    display: none;
}

/* Burger */
.nav-toggle {
    width: 38px;
    height: 32px;
    border: none;
    border-radius: 8px;
    background-color: transparent;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    cursor: pointer;
}

.nav-toggle-line {
    height: 2px;
    width: 22px;
    background-color: var(--color-text);
    border-radius: 999px;
}

/* Estado nav abierto */
.nav-open .nav-list {
    display: flex;
}

.nav-open .nav-toggle-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.nav-open .nav-toggle-line:nth-child(2) {
    opacity: 0;
}

.nav-open .nav-toggle-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* =========================
   HERO
   ========================= */
.hero {
    position: relative;
    min-height: 80vh;
    padding-top: calc(var(--header-height) + 1.5rem);
    padding-bottom: 3.5rem;
    color: #ffffff;
    background-image:
        linear-gradient(135deg, rgba(0, 118, 199, 0.85), rgba(0, 35, 82, 0.85)),
        url("https://images.unsplash.com/photo-1582719478250-c89cae4dc85b?auto=format&fit=crop&w=1400&q=80");
    background-size: cover;
    background-position: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.2), rgba(15, 23, 42, 0.45));
}

.hero-content {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-text p {
    font-size: 0.98rem;
    max-width: 32rem;
    color: #e5e7eb;
    margin-bottom: 1.5rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.hero-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: #d1d5db;
}

.hero-highlights span {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(148, 163, 184, 0.5);
}

/* Hero side card */
.hero-side-card {
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--color-text);
    padding: 1.5rem;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-soft);
}

.hero-side-card h2 {
    font-size: 1.25rem;
    color: var(--color-primary);
    margin-bottom: 0.5rem;
}

.hero-side-card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.hero-side-card ul {
    list-style: none;
    padding-left: 0;
    font-size: 0.9rem;
    color: var(--color-text);
}

.hero-side-card li {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 0.35rem;
}

.hero-side-card li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--color-accent);
}

/* =========================
   BOTONES
   ========================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.3rem;
    border-radius: 999px;
    border: 1px solid transparent;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.1s ease, box-shadow 0.1s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-dark));
    color: #ffffff;
    box-shadow: 0 10px 20px rgba(37, 99, 235, 0.35);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.5);
}

.btn-outline {
    background-color: transparent;
    border-color: #ffffff;
    color: #ffffff;
}

.btn-outline:hover {
    background-color: #ffffff;
    color: var(--color-primary-dark);
}

.btn-accent {
    background-color: var(--color-accent);
    color: #ffffff;
    box-shadow: 0 8px 16px rgba(249, 115, 22, 0.4);
}

.btn-accent:hover {
    background-color: #ff750f;
}

.btn-full {
    width: 100%;
}

/* =========================
   TARJETAS (CARDS)
   ========================= */
.card {
    background-color: var(--color-card-bg);
    border-radius: var(--radius-card);
    padding: 1.3rem 1.4rem;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.card-icon {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
    background-color: rgba(0, 118, 199, 0.08);
    color: var(--color-primary);
}

.card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.card p {
    font-size: 0.9rem;
    color: var(--color-text-light);
}

.service-card ul {
    margin-top: 0.6rem;
    padding-left: 1.1rem;
    font-size: 0.88rem;
    color: var(--color-text);
}

/* Valores */
.values-list {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.values-list li {
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    font-size: 0.78rem;
    color: var(--color-text);
}

/* =========================
   SECCIÓN NOSOTRAS
   ========================= */
.info-highlight {
    background-color: #ffffff;
    border-radius: var(--radius-card);
    padding: 1.3rem 1.4rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.info-highlight h3 {
    font-size: 1.05rem;
    margin-bottom: 0.75rem;
    color: var(--color-primary);
}

.info-highlight ul {
    list-style: none;
    padding-left: 0;
    font-size: 0.9rem;
}

.info-highlight li {
    position: relative;
    padding-left: 1.1rem;
    margin-bottom: 0.35rem;
    color: var(--color-text);
}

.info-highlight li::before {
    content: "";
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--color-accent);
    position: absolute;
    left: 0;
    top: 0.48rem;
}

/* =========================
   PRODUCTOS
   ========================= */
.product-grid {
    grid-template-columns: 1fr;
}

.product-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 0;
}

.product-image {
    width: 100%;
    overflow: hidden;
    border-radius: var(--radius-card) var(--radius-card) 0 0;
}

.product-image img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.product-card:hover .product-image img {
    transform: scale(1.03);
}

.product-content {
    padding: 1.1rem 1.3rem 1.3rem;
}

.product-content h3 {
    font-size: 1.02rem;
    margin-bottom: 0.4rem;
}

.product-content p {
    font-size: 0.88rem;
    color: var(--color-text-light);
}

.product-meta {
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: var(--color-text-light);
}

/* Badges */
.badge-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.7rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    background-color: rgba(0, 118, 199, 0.12);
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 500;
}

.badge-outline {
    background-color: transparent;
    border: 1px solid rgba(0, 118, 199, 0.45);
}

.badge-soft {
    background-color: rgba(37, 99, 235, 0.08);
    color: #1d4ed8;
}

/* =========================
   CLIENTES
   ========================= */
.clients-grid {
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    align-items: stretch;
}

.client-card {
    background-color: #ffffff;
    border-radius: var(--radius-card);
    padding: 1rem 1.1rem;
    text-align: center;
    border: 1px solid rgba(226, 232, 240, 0.9);
    box-shadow: 0 6px 14px rgba(15, 23, 42, 0.06);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.client-card img {
    margin: 0 auto 0.6rem;
    height: 48px;
    width: auto;
    object-fit: contain;
}

.client-card h3 {
    font-size: 0.88rem;
    color: var(--color-text-light);
    font-weight: 500;
}

.client-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.12);
}

/* =========================
   CONTACTO
   ========================= */
.contact-container {
    max-width: 1024px;
}

.contact-grid {
    align-items: flex-start;
}

.contact-form {
    background-color: #ffffff;
    border-radius: var(--radius-card);
    padding: 1.5rem 1.4rem;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.95);
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
    color: #4b5563;
}

.form-group input,
.form-group textarea {
    width: 100%;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    padding: 0.55rem 0.75rem;
    font-size: 0.9rem;
    font-family: inherit;
    outline: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
    background-color: #f9fafb;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.25);
    background-color: #ffffff;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #9ca3af;
    font-size: 0.85rem;
}

/* Mensajes de formulario */
.form-message {
    margin-top: 0.8rem;
    font-size: 0.85rem;
    min-height: 1rem;
}

.form-message.error {
    color: var(--color-error);
}

.form-message.success {
    color: var(--color-success);
}

/* Contact info */
.contact-info h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}

.contact-info p {
    font-size: 0.9rem;
    color: var(--color-text-light);
    margin-bottom: 0.75rem;
}

.contact-list {
    list-style: none;
    padding-left: 0;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.contact-list li {
    margin-bottom: 0.3rem;
}

/* Mapa placeholder */
.map-placeholder {
    margin: 1rem 0;
    border-radius: 14px;
    border: 1px dashed #cbd5f5;
    background: linear-gradient(135deg, #f9fafb, #eff6ff);
    padding: 0.9rem;
}

.map-placeholder-inner {
    border-radius: 10px;
    border: 1px solid #dbeafe;
    padding: 0.7rem 0.8rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.map-placeholder-inner span {
    display: block;
    font-size: 0.78rem;
    margin-top: 0.3rem;
    color: #9ca3af;
}

.contact-note p {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.4rem;
}

/* =========================
   FOOTER
   ========================= */
.site-footer {
    background-color: #020617;
    color: #e5e7eb;
    padding: 1.3rem 0;
    font-size: 0.85rem;
}

.footer-container {
    display: flex;
    flex-direction: column;
    gap: 0.7rem;
    align-items: flex-start;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.footer-links a {
    color: #9ca3af;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #e5e7eb;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #9ca3af;
}

.social-icons {
    display: flex;
    gap: 0.4rem;
}

.social-icons span {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

/* =========================
   ANIMACIONES SCROLL
   ========================= */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hero visible de inicio */
.hero.reveal-on-scroll {
    opacity: 1;
    transform: none;
}

/* =========================
   RESPONSIVE (TABLET & DESKTOP)
   ========================= */
@media (min-width: 640px) {
    .section {
        padding: 5rem 0;
    }

    .hero-text h1 {
        font-size: 2.1rem;
    }
}

@media (min-width: 768px) {
    .grid-2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .product-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-content {
        grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    }

    .logo-text {
        display: inline;
    }

    .nav-toggle {
        display: none;
    }

    .nav-list {
        position: static;
        display: flex !important;
        flex-direction: row;
        padding: 0;
        gap: 1rem;
        background: transparent;
        border-bottom: none;
    }

    .nav-link {
        padding: 0.2rem 0;
        font-size: 0.9rem;
    }

    .btn-header {
        display: inline-flex;
        font-size: 0.85rem;
    }

    .site-footer .footer-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 1024px) {
    :root {
        --max-width: 1180px;
    }

    .hero {
        min-height: 85vh;
    }

    .hero-text h1 {
        font-size: 2.3rem;
    }

    .product-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

/* =========================
   WIDGET WHATSAPP CHAT
   ========================= */

.whatsapp-chat {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    z-index: 999;
    font-family: inherit;
}

.whatsapp-toggle {
    width: 56px;
    height: 56px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-soft, 0 10px 25px rgba(15, 23, 42, 0.2));
    background: #25d366;
    color: #ffffff;
    font-size: 1.6rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.whatsapp-toggle:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.25);
    background: #21bd5a;
}

.whatsapp-toggle-icon {
    pointer-events: none;
}

.whatsapp-window {
    position: absolute;
    right: 0;
    bottom: 70px;
    width: 320px;
    max-width: calc(100vw - 3rem);
    background: #ffffff;
    border-radius: 16px;
    box-shadow: var(--shadow-soft, 0 10px 25px rgba(15, 23, 42, 0.18));
    overflow: hidden;
    transform: translateY(16px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

/* Estado abierto */
.whatsapp-window.is-open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.whatsapp-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: linear-gradient(135deg, #1d4ed8, #22c55e);
    color: #ffffff;
}

.whatsapp-avatar {
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.18);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.whatsapp-title {
    font-size: 0.95rem;
    font-weight: 600;
    margin: 0;
}

.whatsapp-status {
    font-size: 0.78rem;
    opacity: 0.9;
    margin: 0;
}

.whatsapp-body {
    padding: 0.75rem 0.75rem 0.25rem;
    background: #e5ddd5;
}

.whatsapp-message {
    display: inline-block;
    max-width: 90%;
    padding: 0.45rem 0.7rem;
    border-radius: 12px;
    font-size: 0.8rem;
    line-height: 1.4;
}

.whatsapp-message-bot {
    background: #ffffff;
    border-radius: 12px 12px 12px 2px;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.08);
}

.whatsapp-form {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem;
    background: #f0f0f0;
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.whatsapp-input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid rgba(15, 23, 42, 0.12);
    padding: 0.4rem 0.8rem;
    font-size: 0.82rem;
    font-family: inherit;
    outline: none;
}

.whatsapp-input:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.25);
}

.whatsapp-send {
    border-radius: 999px;
    border: none;
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    background: #22c55e;
    color: #ffffff;
    transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.whatsapp-send:hover {
    background: #16a34a;
    transform: translateY(-1px);
}

.whatsapp-send:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(34, 197, 94, 0.25);
}

.whatsapp-note {
    margin: 0;
    padding: 0 0.75rem 0.6rem;
    font-size: 0.7rem;
    color: #6b7280;
    background: #f0f0f0;
}

/* En móviles, que suba un poco más para no tapar tanto */
@media (max-width: 640px) {
    .whatsapp-chat {
        right: 1rem;
        bottom: 1rem;
    }

    .whatsapp-window {
        right: 0;
        width: 80vw;
        max-width: none;
    }

.btn {

    padding: 0.7rem 1rem;
    font-size: 0.7rem;
    text-align: center;
}
.logo img {
    width: 115px;
}

}

.hidden-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}


.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}