/* =========================
   VARIABLES & RESET
   ========================= */
:root {
    --color-bg: #ffffff;
    --color-bg-alt: #f0f9ff;          /* azul muy claro, clínico */
    --color-primary: #0f766e;         /* teal salud/rehab */
    --color-primary-dark: #0b4f4a;    /* teal oscuro */
    --color-accent: #3b82f6;          /* azul eléctrico, tech */
    --color-text: #0f172a;
    --color-text-light: #6b7280;
    --color-border: #e2e8f0;
    --color-card-bg: #ffffff;
    --color-error: #ef4444;
    --color-success: #16a34a;

    --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;
}

h1, h2, h3, h4, h5, h6,
p {
    margin: 0;
}

img {
    max-width: 100%;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
}

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: 120px;
    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-size: cover;
    background-position: center;
     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;
}


/* Variante hero en tonos tech/salud con imagen de fondo */
.hero-variant {
    background-image:
        linear-gradient(135deg, rgba(15, 118, 110, 0.92), rgba(37, 99, 235, 0.92)),
        url("main.jpg"); /* ← tu imagen de fondo */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}


.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.25), 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: #e0f2fe;
    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: #bae6fd;
}

.hero-highlights span {
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background-color: rgba(15, 23, 42, 0.35);
    border: 1px solid rgba(226, 232, 240, 0.5);
}

/* Hero side card */
.hero-side-card {
    background-color: rgba(255, 255, 255, 0.98);
    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.45);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.6);
}

.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(59, 130, 246, 0.4);
}

.btn-accent:hover {
    background-color: #2563eb;
}

.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(59, 130, 246, 0.12);
    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(59, 130, 246, 0.65);
    font-size: 0.78rem;
    color: var(--color-text);
}

/* =========================
   SECCIÓN NOSOTROS
   ========================= */
.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;
}

/* =========================
   ACTIVIDADES / ENFOQUES
   ========================= */
.activity-stats {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2.3rem;
}

.activity-card {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
    padding: 1rem 1.1rem;
    border-radius: var(--radius-card);
    border: 1px dashed rgba(129, 199, 212, 0.9);
    background: linear-gradient(135deg, #e0f2fe, #ecfeff);
}

.activity-percent {
    min-width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #ffffff;
    box-shadow: 0 6px 15px rgba(129, 199, 212, 0.7);
    font-size: 1.2rem;
    font-weight: 700;
    color: #0ea5e9;
}

.activity-text h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
    color: #0f766e;
}

.activity-text p {
    font-size: 0.86rem;
    color: var(--color-text);
}

/* =========================
   PROGRAMAS / PRODUCTOS / EQUIPOS
   ========================= */
.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(191, 219, 254, 0.7);
    color: var(--color-primary);
    font-size: 0.72rem;
    font-weight: 500;
}

.badge-outline {
    background-color: transparent;
    border: 1px solid rgba(129, 199, 212, 0.9);
}

.badge-soft {
    background-color: rgba(56, 189, 248, 0.22);
    color: #0369a1;
}

/* =========================
   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: 0.5rem 0.5rem;
    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;
    display: flex;
    align-items: center;
    justify-content: center;
}
.client-card img {
    height: 60px;
    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: #eff6ff;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.55);
    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 #bfdbfe;
    background: linear-gradient(135deg, #eff6ff, #e0f2fe);
    padding: 0.9rem;
}

.map-placeholder-inner {
    border-radius: 10px;
    border: 1px solid #bfdbfe;
    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; /* azul casi negro, tech */
    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: #bfdbfe;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: #e0f2fe;
}

.footer-social {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #bfdbfe;
}

.social-icons {
    display: flex;
    gap: 0.4rem;
}

.social-icons span {
    width: 24px;
    height: 24px;
    border-radius: 999px;
    border: 1px solid rgba(191, 219, 254, 0.9);
    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.75rem;
    }

    .site-footer .footer-container {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .activity-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@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));
    }
}
