/* ==========================================================
   ALESOVET CLINICA VETERINARIA - Custom Styles
   Variables, animations and details that complement Tailwind
   ========================================================== */

:root {
    /* Brand */
    --color-primary-50:  #f2faf9;
    --color-primary-100: #d7f3ef;
    --color-primary-200: #b0e8e1;
    --color-primary-500: #5dc1b9;
    --color-primary-600: #4aada5;
    --color-primary-700: #3c9991;
    --color-primary-800: #2f857d;
    --color-accent:      #81638b;
    --color-accent-dark: #6e4f78;

    /* WhatsApp */
    --color-whatsapp:      #25d366;
    --color-whatsapp-dark: #128c7e;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-md: 0 4px 12px -2px rgba(15, 23, 42, .08);
    --shadow-lg: 0 12px 28px -8px rgba(15, 23, 42, .15);
    --shadow-xl: 0 20px 40px -12px rgba(15, 23, 42, .18);

    /* Motion */
    --ease-out: cubic-bezier(.22, 1, .36, 1);
    --transition-base: all .3s var(--ease-out);
}

/* ============ BASE ============ */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: clip; /* clip (not hidden) — hidden breaks position:sticky on header */
    cursor: url('../paw-cursor.svg') 16 16, auto;
}

a,
button,
input[type="submit"],
input[type="button"],
input[type="checkbox"],
input[type="radio"],
label[for],
summary,
[role="button"],
[onclick],
.btn-primary,
.btn-secondary,
.btn-cta-light,
.btn-cta-outline,
.service-card,
.blog-card,
.blog-filter-btn {
    cursor: url('../paw-cursor.svg') 16 16, pointer;
}

/* Hover state: swap to colored paw on interactive elements */
nav a:hover,
.hero-cta a:hover,
button:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-cta-light:hover,
.btn-cta-outline:hover,
[role="button"]:hover,
.blog-filter-btn:hover,
.nav-link:hover,
.mobile-link:hover {
    cursor: url('../paw-cursor-hover.svg') 16 16, pointer;
}

/* Note: CSS cursor cannot be animated/scaled. Existing :hover transforms
   on .btn-* and card classes provide the visual "pop" effect. */

@media (pointer: coarse) {
    body,
    a, button, input, label, summary,
    [role="button"], [onclick],
    .btn-primary, .btn-secondary, .btn-cta-light, .btn-cta-outline,
    .service-card, .blog-card, .blog-filter-btn {
        cursor: auto;
    }
}

::selection {
    background: var(--color-primary-200);
    color: var(--color-primary-800);
}

::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb { background: var(--color-primary-500); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary-700); }

/* ============ HEADER ============ */
#header.scrolled { box-shadow: var(--shadow-md); }

/* ============ BUTTONS ============ */
.btn-primary,
.btn-secondary,
.btn-cta-light,
.btn-cta-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    font-weight: 600;
    padding: .75rem 1.5rem;
    border-radius: .75rem;
    transition: var(--transition-base);
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    line-height: 1.25;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
    color: #fff;
    box-shadow: 0 4px 14px -2px rgba(13, 148, 136, .35);
}
.btn-primary:hover {
    background: linear-gradient(135deg, var(--color-primary-700), var(--color-primary-800));
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -2px rgba(13, 148, 136, .5);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
    background: #fff;
    color: var(--color-primary-700);
    border-color: var(--color-primary-600);
}
.btn-secondary:hover {
    background: var(--color-primary-50);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* CTAs sobre fondo oscuro (sección final del home) */
.btn-cta-light {
    background: #fff;
    color: var(--color-primary-700);
}
.btn-cta-light:hover {
    background: var(--color-primary-50);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px -2px rgba(0,0,0,.25);
}
.btn-cta-outline {
    background: transparent;
    color: #fff;
    border-color: rgba(255,255,255,.7);
}
.btn-cta-outline:hover {
    background: rgba(255,255,255,.1);
    border-color: #fff;
    transform: translateY(-2px);
}

.btn-lg { padding: 1rem 2rem; font-size: 1.0625rem; }

/* ============ NAV PILL (mooiza-pet style) ============ */
.nav-pill {
    position: relative;
    background: rgba(242, 250, 249, .55);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-radius: 9999px;
    padding: .35rem;
    box-shadow:
        inset 2px 2px 1px 0 rgba(255, 255, 255, .55),
        inset -2px -2px 2px 1px rgba(255, 255, 255, .35),
        0 1px 2px rgba(15, 23, 42, .05),
        -1px 0 0 0 rgba(255, 255, 255, .35);
    transition: box-shadow .3s ease;
}

/* Sliding pill background — animates left/width via JS-set CSS vars */
.nav-pill::before {
    content: '';
    position: absolute;
    top: .35rem;
    left: var(--pill-left, 0);
    height: calc(100% - .7rem);
    width: var(--pill-width, 0);
    background: var(--color-primary-600);
    border-radius: 9999px;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition:
        left  .4s cubic-bezier(.2, .9, .3, 1.4),
        width .4s cubic-bezier(.2, .9, .3, 1.4),
        opacity .25s ease,
        background-color .25s ease;
}
.nav-pill:hover::before,
.nav-pill.has-active::before {
    opacity: 1;
}

/* ============ NAV LINKS ============ */
.nav-link {
    position: relative;
    z-index: 2;
    color: #13322B;
    font-weight: 500;
    padding: .65rem 1.1rem;
    border-radius: 9999px;
    background: transparent;
    white-space: nowrap;
    transition: color .25s ease;
}
.nav-link:hover { color: #fff; }

/* Estado activo (página actual) — sliding pill provides background */
.nav-link.active {
    color: #fff;
    font-weight: 600;
}

/* When user hovers another link, pill leaves active link → restore dark text */
.nav-pill:hover .nav-link.active { color: #13322B; }
.nav-pill:hover .nav-link.active:hover { color: #fff; }

.mobile-link {
    display: flex;
    align-items: center;
    padding: .75rem .75rem;
    color: #334155;
    border-radius: .5rem;
    font-weight: 500;
    transition: var(--transition-base);
}
.mobile-link:hover {
    background: var(--color-primary-50);
    color: var(--color-primary-700);
}
.mobile-link.active {
    background: var(--color-primary-50);
    color: var(--color-primary-700);
    font-weight: 600;
}

/* ============ IMPACT BANNER ============ */
.impact-banner {
    position: relative;
    isolation: isolate;
    min-height: 92vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    color: #fff;
    background: #0b0f1a;
}
@media (min-width: 1024px) {
    .impact-banner { min-height: 100vh; }
}

.impact-banner__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}
.impact-banner__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.15);
    opacity: 0;
    filter: saturate(1.05) contrast(1.05);
    animation:
        impactImgIn 1.6s cubic-bezier(.2,.8,.2,1) .2s forwards,
        impactKenBurns 22s ease-in-out 1.8s infinite alternate;
}
@keyframes impactImgIn {
    from { opacity: 0; transform: scale(1.22); filter: blur(14px) saturate(1.05) contrast(1.05); }
    to   { opacity: 1; transform: scale(1.15); filter: blur(0) saturate(1.05) contrast(1.05); }
}
@keyframes impactKenBurns {
    0%   { transform: scale(1.15) translate3d(0, 0, 0); }
    100% { transform: scale(1.22) translate3d(-2%, -1.5%, 0); }
}

.impact-banner__overlay {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg,
            rgba(11, 15, 26, 0.55) 0%,
            rgba(11, 15, 26, 0.25) 35%,
            rgba(11, 15, 26, 0.55) 70%,
            rgba(11, 15, 26, 0.92) 100%),
        linear-gradient(105deg,
            rgba(11, 15, 26, 0.78) 0%,
            rgba(11, 15, 26, 0.25) 55%,
            rgba(129, 99, 139, 0.35) 100%);
    mix-blend-mode: multiply;
}

.impact-banner__vignette {
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center,
        transparent 40%,
        rgba(0, 0, 0, 0.55) 100%);
    pointer-events: none;
}

.impact-banner__grain {
    position: absolute;
    inset: -50%;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.55 0'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='0.45'/></svg>");
    opacity: .08;
    mix-blend-mode: overlay;
    pointer-events: none;
    animation: impactGrain 1.2s steps(4) infinite;
}
@keyframes impactGrain {
    0%   { transform: translate(0, 0); }
    25%  { transform: translate(-3%, 2%); }
    50%  { transform: translate(2%, -3%); }
    75%  { transform: translate(-2%, -2%); }
    100% { transform: translate(0, 0); }
}

.impact-banner__shine {
    position: absolute;
    top: 0;
    left: -40%;
    width: 30%;
    height: 100%;
    background: linear-gradient(105deg,
        transparent 0%,
        rgba(255, 255, 255, 0.06) 45%,
        rgba(255, 255, 255, 0.18) 50%,
        rgba(255, 255, 255, 0.06) 55%,
        transparent 100%);
    transform: skewX(-18deg);
    pointer-events: none;
    animation: impactShine 7s ease-in-out 2.2s infinite;
}
@keyframes impactShine {
    0%   { left: -40%; opacity: 0; }
    20%  { opacity: 1; }
    60%  { left: 140%; opacity: 0; }
    100% { left: 140%; opacity: 0; }
}

.impact-banner__inner {
    max-width: 900px;
    padding: 7rem 0 6rem;
}
@media (min-width: 1024px) {
    .impact-banner__inner { padding: 8rem 0 7rem; max-width: 980px; }
}

.impact-banner__title {
    font-family: var(--font-heading, 'Poppins', sans-serif);
    font-weight: 800;
    font-size: clamp(2.6rem, 7vw, 5.5rem);
    line-height: 1.02;
    letter-spacing: -0.025em;
    margin: 0 0 1.5rem;
    text-shadow: 0 6px 40px rgba(0, 0, 0, 0.45);
}
.impact-banner__title-line {
    display: block;
    opacity: 0;
    transform: translateY(28px);
    filter: blur(10px);
    animation: impactRise .9s cubic-bezier(.2,.8,.2,1) forwards;
}
.impact-banner__title-line--1 { animation-delay: .35s; }
.impact-banner__title-line--2 { animation-delay: .65s; }
@keyframes impactRise {
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
}

.impact-banner__title-accent {
    background: linear-gradient(120deg, #f5d0fe 0%, #c4b5fd 35%, #fbcfe8 65%, #f5d0fe 100%);
    background-size: 200% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    animation:
        impactRise .9s cubic-bezier(.2,.8,.2,1) .65s forwards,
        impactAccentShift 8s ease-in-out 1.6s infinite;
}
@keyframes impactAccentShift {
    0%, 100% { background-position: 0% 50%; }
    50%      { background-position: 100% 50%; }
}

.impact-banner__lede {
    font-size: clamp(1.1rem, 1.7vw, 1.45rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.92);
    max-width: 640px;
    margin: 0;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transform: translateY(20px);
    animation: impactRise .9s cubic-bezier(.2,.8,.2,1) 1s forwards;
}

.impact-banner__scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 26px;
    height: 42px;
    border: 2px solid rgba(255, 255, 255, 0.55);
    border-radius: 14px;
    z-index: 5;
    pointer-events: none;
    opacity: 0;
    animation: impactScrollIn .8s ease 1.6s forwards;
}
@keyframes impactScrollIn { to { opacity: 1; } }
.impact-banner__scroll span {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 3px;
    height: 8px;
    background: #fff;
    border-radius: 3px;
    transform: translateX(-50%);
    animation: impactScroll 1.8s ease-in-out infinite;
}
@keyframes impactScroll {
    0%   { opacity: 0; transform: translate(-50%, 0); }
    40%  { opacity: 1; }
    80%  { opacity: 0; transform: translate(-50%, 14px); }
    100% { opacity: 0; transform: translate(-50%, 14px); }
}

@media (max-width: 640px) {
    .impact-banner {
        min-height: 80vh;
        align-items: flex-end;
    }
    .impact-banner__inner { padding: 16rem 0 3rem; }
    .impact-banner__scroll { display: none; }
}

@media (prefers-reduced-motion: reduce) {
    .impact-banner__media img,
    .impact-banner__grain,
    .impact-banner__shine,
    .impact-banner__title-line,
    .impact-banner__title-accent,
    .impact-banner__lede,
    .impact-banner__scroll span { animation: none; }
    .impact-banner__media img { opacity: 1; transform: scale(1.05); filter: none; }
    .impact-banner__title-line,
    .impact-banner__lede { opacity: 1; transform: none; filter: none; }
    .impact-banner__scroll { opacity: 1; }
}

/* ============ HERO ============ */
.hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: .35;
    z-index: 0;
    pointer-events: none;
}
.hero-blob--1 {
    width: 400px; height: 400px;
    background: var(--color-primary-300, #5eead4);
    top: -100px; left: -100px;
}
.hero-blob--2 {
    width: 350px; height: 350px;
    background: #fdba74;
    bottom: -100px; right: -80px;
}

.hero-blob-shape { animation: morph 12s ease-in-out infinite; }

@keyframes morph {
    0%, 100% { border-radius: 42% 58% 46% 54% / 55% 45% 55% 45%; }
    33%      { border-radius: 58% 42% 60% 40% / 45% 55% 45% 55%; }
    66%      { border-radius: 50% 50% 35% 65% / 65% 35% 50% 50%; }
}

.floating-card {
    position: absolute;
    background: #fff;
    padding: .75rem 1rem;
    border-radius: 1rem;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    gap: .75rem;
    z-index: 5;
    animation: float 4s ease-in-out infinite;
}
.floating-card--top    { top: 8%; right: -1rem; animation-delay: 0s; }
.floating-card--bottom { bottom: 8%; left: -1rem; animation-delay: 1.5s; }

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-10px); }
}

/* ============ MASCOTA PARALLAX (Mooiza style) ============ */
.pet-parallax {
    position: fixed;
    bottom: 90px;
    left: 0;
    width: 90px;
    height: 90px;
    z-index: 4;
    pointer-events: none;
    filter: drop-shadow(0 10px 16px rgba(15, 23, 42, .25));
    will-change: transform, opacity;
    /* Empieza fuera para evitar flash inicial; GSAP la coloca */
    opacity: 0;
}
@media (max-width: 767px) {
    .pet-parallax { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    .pet-parallax { display: none; }
}

/* ============ SERVICE CARDS ============ */
.service-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
    transition: transform .4s var(--ease-out),
                box-shadow .4s var(--ease-out),
                border-color .4s var(--ease-out);
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--color-primary-500), var(--color-primary-700), var(--color-accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .5s var(--ease-out);
}
.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary-100);
}
.service-card:hover::before { transform: scaleX(1); }

.service-icon {
    width: 64px; height: 64px;
    border-radius: 1rem;
    background: linear-gradient(135deg, var(--color-primary-500), var(--color-primary-700));
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.625rem;
    margin-bottom: 1.25rem;
    transition: var(--transition-base);
    box-shadow: 0 8px 16px -4px rgba(13, 148, 136, .35);
}
.service-card:hover .service-icon {
    transform: scale(1.1) rotate(-6deg);
    box-shadow: 0 12px 22px -4px rgba(13, 148, 136, .5);
}

.service-title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.25rem;
    color: #0f172a;
    margin-bottom: .5rem;
}
.service-desc {
    color: #64748b;
    font-size: .9375rem;
    line-height: 1.6;
}

/* ============ STAT CARDS ============ */
.stat-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.25rem;
    padding: 1.75rem 1.25rem;
    text-align: center;
    transition: var(--transition-base);
}
.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-200);
}
.stat-card--offset { transform: translateY(1.5rem); }
.stat-card--offset:hover { transform: translateY(calc(1.5rem - 4px)); }

@media (max-width: 640px) {
    .stat-card--offset,
    .stat-card--offset:hover { transform: translateY(0); }
}

/* ============ FORM ============ */
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-weight: 500;
    font-size: .875rem;
    color: #334155;
    margin-bottom: .375rem;
}
.form-group input:not([type="checkbox"]),
.form-group textarea {
    width: 100%;
    padding: .75rem 1rem;
    border: 1.5px solid #cbd5e1;
    border-radius: .625rem;
    background: #fff;
    transition: var(--transition-base);
    font-family: inherit;
    font-size: .9375rem;
    color: #0f172a;
}
.form-group input:not([type="checkbox"]):focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--color-primary-500);
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .15);
}
.form-group textarea { resize: vertical; min-height: 120px; }

.form-group.error input:not([type="checkbox"]),
.form-group.error textarea {
    border-color: #ef4444;
    background: #fef2f2;
}
.form-group.error input:not([type="checkbox"]):focus,
.form-group.error textarea:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, .15);
}

.error-msg {
    display: block;
    font-size: .8125rem;
    color: #ef4444;
    margin-top: .25rem;
    min-height: 1.125rem;
    font-weight: 500;
}

/* ============ CONTACT INFO ============ */
.contact-info-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 1.25rem;
    background: linear-gradient(135deg, var(--color-primary-50), #fff);
    border-radius: 1rem;
    border: 1px solid #ccfbf1;
    transition: var(--transition-base);
}
.contact-info-card:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-md);
    border-color: var(--color-primary-200);
}
.contact-info-card .info-icon {
    width: 48px; height: 48px;
    flex-shrink: 0;
    border-radius: .75rem;
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.125rem;
    box-shadow: 0 4px 10px -2px rgba(13, 148, 136, .4);
}
.contact-info-card h4 {
    font-weight: 700;
    color: #0f172a;
    margin-bottom: .25rem;
    font-size: 1.0625rem;
}
.contact-info-card p {
    color: #475569;
    font-size: .9375rem;
    line-height: 1.6;
}
.contact-info-card a {
    color: var(--color-primary-700);
    text-decoration: none;
    font-weight: 500;
    transition: color .2s ease;
}
.contact-info-card a:hover {
    color: var(--color-primary-800);
    text-decoration: underline;
}

/* CTA variant — overrides text colors for dark background */
.contact-info-card--cta {
    background: linear-gradient(135deg, var(--color-primary-600), var(--color-primary-700));
    border-color: var(--color-primary-500);
}
.contact-info-card--cta:hover {
    border-color: var(--color-primary-400);
}
.contact-info-card--cta h4 { color: #fff; }
.contact-info-card--cta p  { color: rgba(204, 251, 241, 0.9); }

/* ============ FOOTER ============ */
.footer-link {
    color: #cbd5e1;
    text-decoration: none;
    transition: color .2s ease;
}
.footer-link:hover { color: var(--color-primary-200); }

.social-icon {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    display: inline-flex; align-items: center; justify-content: center;
    color: #fff;
    transition: var(--transition-base);
    text-decoration: none;
}
.social-icon:hover {
    background: var(--color-primary-600);
    transform: translateY(-3px);
    box-shadow: 0 6px 12px -2px rgba(13, 148, 136, .4);
}

/* ============ WHATSAPP FLOAT ============ */
.whatsapp-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 60px; height: 60px;
    border-radius: 50%;
    background: var(--color-whatsapp);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.875rem;
    box-shadow: 0 8px 24px rgba(37, 211, 102, .4);
    z-index: 100;
    transition: var(--transition-base);
    animation: pulse-whatsapp 2.5s infinite;
    text-decoration: none;
}
.whatsapp-float:hover {
    background: var(--color-whatsapp-dark);
    transform: scale(1.08);
    animation: none;
}

.whatsapp-tooltip {
    position: absolute;
    right: calc(100% + 12px);
    top: 50%;
    transform: translateY(-50%) translateX(8px);
    background: #0f172a;
    color: #fff;
    padding: .5rem .875rem;
    border-radius: .5rem;
    font-size: .8125rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-base);
    box-shadow: var(--shadow-md);
}
.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    left: 100%; top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: #0f172a;
}
.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

@keyframes pulse-whatsapp {
    0%, 100% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, .4),
                    0 0 0 0 rgba(37, 211, 102, .5);
    }
    50% {
        box-shadow: 0 8px 24px rgba(37, 211, 102, .4),
                    0 0 0 16px rgba(37, 211, 102, 0);
    }
}

/* ============ FADE-IN (estado inicial — GSAP anima al estado final) ============ */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
}

/* ============ SCROLL PROGRESS BAR ============ */
#scroll-progress {
    position: absolute;
    bottom: -1px;
    left: 0;
    height: 3px;
    width: 100%;
    background: linear-gradient(90deg,
        var(--color-primary-500),
        var(--color-primary-700),
        var(--color-accent));
    transform: scaleX(0);
    transform-origin: 0 50%;
    z-index: 60;
    will-change: transform;
    pointer-events: none;
    box-shadow: 0 0 8px rgba(74, 173, 165, .45);
}

/* ============ CLIP REVEAL (images) ============ */
.reveal-clip {
    clip-path: inset(0 0 100% 0);
    -webkit-clip-path: inset(0 0 100% 0);
    will-change: clip-path;
}
.reveal-clip.is-revealed {
    clip-path: inset(0 0 0 0);
    -webkit-clip-path: inset(0 0 0 0);
    transition: clip-path 1.1s cubic-bezier(.65, 0, .35, 1),
                -webkit-clip-path 1.1s cubic-bezier(.65, 0, .35, 1);
}

/* ============ SECTION HEADING REVEAL ============ */
.reveal-heading {
    opacity: 0;
    transform: translateY(20px);
    will-change: opacity, transform;
}

/* ============ Lenis required styles ============ */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-smooth iframe { pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
    .reveal-clip, .reveal-heading {
        clip-path: none !important;
        -webkit-clip-path: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    #scroll-progress { display: none; }
}

/* ============ TEAM CARDS ============ */
.team-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1.5rem;
    padding: 2rem 1.25rem 1.75rem;
    text-align: center;
    transition: var(--transition-base);
    display: flex;
    flex-direction: column;
    align-items: center;
}
.team-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-200);
}
.team-card__photo-wrap {
    width: clamp(200px, 80%, 320px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 1.5rem;
    border: 4px solid var(--color-primary-100);
    box-shadow: 0 6px 24px rgba(60, 153, 145, .18);
    flex-shrink: 0;
    /* Force a dedicated compositor layer — Chromium then antialiases the
       border-radius clip cleanly instead of falling back to the cheap
       hard-edge mask that makes circular photos look jagged. */
    transform: translateZ(0);
    -webkit-mask-image: -webkit-radial-gradient(circle, #fff 100%, #fff 100%);
            mask-image:         radial-gradient(circle, #fff 100%, #fff 100%);
    isolation: isolate;
}
.team-card__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    border-radius: 50%;
    display: block;
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
            backface-visibility: hidden;
    transform: translateZ(0);
    will-change: transform;
}
.team-card__body {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.team-card__name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.25rem;
    color: #0f172a;
    margin-bottom: .25rem;
}
.team-card__role {
    font-size: .8125rem;
    font-weight: 600;
    color: var(--color-primary-600);
    text-transform: uppercase;
    letter-spacing: .04em;
    line-height: 1.4;
    margin-bottom: .75rem;
}
.team-card__desc {
    font-size: .9375rem;
    color: #64748b;
    line-height: 1.65;
}

/* ============ MOBILE TWEAKS ============ */
@media (max-width: 640px) {
    .whatsapp-float {
        bottom: 16px; right: 16px;
        width: 56px; height: 56px;
        font-size: 1.625rem;
    }
    .whatsapp-tooltip { display: none; }
    .service-card { padding: 1.5rem; }
    .floating-card { padding: .5rem .75rem; }
    .floating-card--top    { right: 0; }
    .floating-card--bottom { left: 0; }
}

/* ============ ACCESSIBILITY ============ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    .fade-in { opacity: 1; transform: none; }
}

/* Focus visible (accessibility) */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid var(--color-primary-500);
    outline-offset: 2px;
    border-radius: 4px;
}

/* ============ BLOG — FILTROS ============ */
.blog-filters-wrap {
    /* Oculta scrollbar en móvil pero permite scroll */
    -ms-overflow-style: none;
    scrollbar-width: none;
}
.blog-filters-wrap::-webkit-scrollbar { display: none; }

.blog-filter-btn {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1.125rem;
    border-radius: 9999px;
    font-size: .875rem;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border: 1.5px solid #e2e8f0;
    cursor: pointer;
    transition: var(--transition-base);
    white-space: nowrap;
    flex-shrink: 0;
}
.blog-filter-btn:hover {
    border-color: var(--color-primary-300, #5eead4);
    color: var(--color-primary-700);
    background: var(--color-primary-50);
    transform: translateY(-1px);
}
.blog-filter-btn.active {
    background: var(--color-primary-600);
    border-color: var(--color-primary-600);
    color: #fff;
    box-shadow: 0 4px 12px -2px rgba(13, 148, 136, .4);
}
.blog-filter-btn.active:hover {
    background: var(--color-primary-700);
    border-color: var(--color-primary-700);
    transform: translateY(-1px);
}

/* ============ BLOG — CARDS ============ */
.blog-card {
    background: #fff;
    border-radius: 1.25rem;
    padding: 1.75rem;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: .875rem;
    transition: transform .35s var(--ease-out),
                box-shadow .35s var(--ease-out),
                border-color .35s var(--ease-out);
}
.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
    border-color: var(--color-primary-100);
}

.blog-card__badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .7rem;
    font-weight: 700;
    padding: .28rem .75rem;
    border-radius: 9999px;
    width: fit-content;
    text-transform: uppercase;
    letter-spacing: .055em;
}

.blog-card__title {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.0625rem;
    color: #0f172a;
    line-height: 1.4;
}

.blog-card__content {
    color: #64748b;
    font-size: .9375rem;
    line-height: 1.65;
}

@media (max-width: 640px) {
    .blog-card { padding: 1.375rem; }
}

/* ============ BLOG — CARD COMO ENLACE ============ */
a.blog-card {
    text-decoration: none;
    color: inherit;
}
a.blog-card:hover .blog-card__title {
    color: var(--color-primary-700);
}
.blog-card__cta {
    margin-top: auto;
    color: var(--color-primary-700);
    font-weight: 600;
    font-size: .875rem;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}
.blog-card__cta i {
    transition: transform .25s var(--ease-out);
}
a.blog-card:hover .blog-card__cta i {
    transform: translateX(4px);
}

/* ============ ARTICLE PAGE ============ */
.article-prose {
    color: #334155;
    font-size: 1.0625rem;
    line-height: 1.75;
}
.article-prose > * + * {
    margin-top: 1.25rem;
}
.article-prose h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.625rem;
    color: #0f172a;
    line-height: 1.3;
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    scroll-margin-top: 90px;
}
.article-prose h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
    color: #0f172a;
    margin-top: 2rem;
    margin-bottom: .75rem;
}
.article-prose p { margin-bottom: 0; }
.article-prose ul, .article-prose ol {
    padding-left: 1.5rem;
    margin: 1rem 0;
}
.article-prose ul { list-style: disc; }
.article-prose ol { list-style: decimal; }
.article-prose li + li { margin-top: .5rem; }
.article-prose strong { color: #0f172a; font-weight: 600; }
.article-prose a {
    color: var(--color-primary-700);
    text-decoration: underline;
    text-underline-offset: 3px;
}
.article-prose a:hover { color: var(--color-primary-800); }
.article-prose blockquote {
    border-left: 4px solid var(--color-primary-500);
    background: var(--color-primary-50);
    padding: 1rem 1.25rem;
    border-radius: 0 .75rem .75rem 0;
    color: #0f172a;
    font-style: italic;
}
.article-callout {
    background: linear-gradient(135deg, var(--color-primary-50), #fff);
    border: 1px solid var(--color-primary-100);
    border-radius: 1rem;
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.article-callout--warn {
    background: linear-gradient(135deg, #fff7ed, #fff);
    border-color: #fed7aa;
}
.article-callout i {
    color: var(--color-primary-700);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: .15rem;
}
.article-callout--warn i { color: #ea580c; }

.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem 1.5rem;
    color: #64748b;
    font-size: .875rem;
}
.article-meta span {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

/* Breadcrumb visual */
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    color: #64748b;
    font-size: .875rem;
}
.breadcrumb a {
    color: var(--color-primary-700);
    text-decoration: none;
    font-weight: 500;
}
.breadcrumb a:hover { text-decoration: underline; }
.breadcrumb [aria-current="page"] {
    color: #0f172a;
    font-weight: 500;
}

/* Related articles */
.related-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.25rem;
    border: 1px solid #f1f5f9;
    box-shadow: var(--shadow-sm);
    transition: transform .3s var(--ease-out), box-shadow .3s var(--ease-out);
    display: block;
    text-decoration: none;
    color: inherit;
}
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary-100);
}
.related-card h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #0f172a;
    margin-top: .5rem;
    line-height: 1.4;
    font-size: 1rem;
}

/* Legal pages */
.legal-prose {
    color: #334155;
    line-height: 1.75;
    font-size: 1rem;
}
.legal-prose > * + * { margin-top: 1rem; }
.legal-prose h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: #0f172a;
    margin-top: 2.5rem;
    margin-bottom: .75rem;
    scroll-margin-top: 90px;
}
.legal-prose h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 1.125rem;
    color: #0f172a;
    margin-top: 1.75rem;
    margin-bottom: .5rem;
}
.legal-prose ul, .legal-prose ol {
    padding-left: 1.5rem;
    margin: .75rem 0;
}
.legal-prose ul { list-style: disc; }
.legal-prose ol { list-style: decimal; }
.legal-prose li + li { margin-top: .35rem; }
.legal-prose a {
    color: var(--color-primary-700);
    text-decoration: underline;
}
.legal-prose strong { color: #0f172a; font-weight: 600; }
.legal-prose table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: .9375rem;
}
.legal-prose th, .legal-prose td {
    border: 1px solid #e2e8f0;
    padding: .65rem .85rem;
    text-align: left;
    vertical-align: top;
}
.legal-prose th {
    background: var(--color-primary-50);
    color: #0f172a;
    font-weight: 600;
}

/* ============ I18N LANGUAGE SWITCHER ============ */
/* Desktop slot in navbar — hidden on mobile (mobile uses #mobile-menu slot) */
.lang-switcher-slot {
    display: none;
    margin-right: .5rem;
    align-items: center;
}
@media (min-width: 1024px) {
    .lang-switcher-slot { display: inline-flex; }
}

.lang-switcher {
    display: inline-flex;
    align-items: center;
    padding: .25rem;
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
    gap: 2px;
}
.lang-switcher__btn {
    appearance: none;
    background: transparent;
    border: 0;
    padding: .3rem .55rem;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .04em;
    color: #475569;
    cursor: pointer;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.lang-switcher__flag {
    width: 1.05rem;
    height: .75rem;
    border-radius: 2px;
    flex-shrink: 0;
    box-shadow: 0 0 0 1px rgba(15, 23, 42, 0.08);
    overflow: hidden;
    display: block;
}
.lang-switcher__code { line-height: 1; }
.lang-switcher__btn:hover {
    color: var(--color-primary-700, #3c5d6b);
    background: var(--color-primary-50, #f3eff5);
}
.lang-switcher__btn.is-active {
    background: var(--color-primary-600, #81638b);
    color: #fff;
    box-shadow: 0 1px 4px rgba(129, 99, 139, 0.35);
}
.lang-switcher__btn:focus-visible {
    outline: 2px solid var(--color-primary-600, #81638b);
    outline-offset: 2px;
}

/* mobile placement inside #mobile-menu */
#mobile-menu .lang-switcher {
    width: 100%;
    justify-content: center;
    margin-top: .25rem;
}

/* ============ BLOG "ONLY IN SPANISH" BANNER ============ */
.i18n-blog-banner {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-bottom: 1px solid #f59e0b;
    color: #78350f;
}
.i18n-blog-banner__inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: .9rem 1rem;
    display: flex;
    align-items: center;
    gap: .9rem;
    font-size: .9rem;
}
.i18n-blog-banner i { font-size: 1.1rem; color: #b45309; flex-shrink: 0; }
.i18n-blog-banner strong { display: block; font-weight: 700; color: #78350f; }
.i18n-blog-banner p { margin: .15rem 0 0; color: #92400e; line-height: 1.4; }
.i18n-blog-banner__back {
    margin-left: auto;
    flex-shrink: 0;
    background: #b45309;
    color: #fff;
    padding: .5rem .9rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: .8rem;
    text-decoration: none;
    transition: background-color .15s ease;
}
.i18n-blog-banner__back:hover { background: #92400e; }
@media (max-width: 640px) {
    .i18n-blog-banner__inner { flex-wrap: wrap; }
    .i18n-blog-banner__back { margin-left: 0; width: 100%; text-align: center; }
}
