:root {
    --azul: #0A3FD4;
    --azul2: #1E5EFF;
    --verde: #00C48C;
    --negro: #0F0F1A;
    --gris: #F8F9FC;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: #FFFFFF;
    color: var(--negro);
    line-height: 1.6;
    overflow-x: hidden;
}

/* ═══════════════════════
   KEYFRAMES
═══════════════════════ */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(32px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-12px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
    0%,100% { transform: translateY(0px); }
    50%      { transform: translateY(-14px); }
}
@keyframes pulseGlow {
    0%,100% { box-shadow: 0 0 0 0 rgba(10,63,212,0); }
    50%      { box-shadow: 0 0 0 12px rgba(10,63,212,0.1); }
}
@keyframes orbFloat {
    0%,100% { transform: translate(0,0) scale(1); }
    33%      { transform: translate(30px,-20px) scale(1.05); }
    66%      { transform: translate(-20px,15px) scale(0.97); }
}
@keyframes shimmer {
    0%   { background-position: -200% center; }
    100% { background-position: 200% center; }
}
@keyframes countUp {
    from { opacity: 0; transform: scale(.8); }
    to   { opacity: 1; transform: scale(1); }
}
@keyframes lineGrow {
    from { transform: scaleX(0); }
    to   { transform: scaleX(1); }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
@keyframes blink {
    0%,100% { opacity: 1; }
    50%      { opacity: 0; }
}

/* ═══════════════════════
   NAVEGACIÓN
═══════════════════════ */
nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    border-bottom: 1px solid #E5E7EB;
    animation: slideDown .5s ease both;
}
.nav-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 30px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.logo {
    display: flex; align-items: center; gap: 12px;
    text-decoration: none; color: var(--negro);
    transition: opacity .2s;
}
.logo:hover { opacity: .85; }

.logo-circle {
    width: 48px; height: 48px;
    background: var(--azul);
    border-radius: 13px;
    display: flex; align-items: center; justify-content: center;
    color: white; font-weight: 700; font-size: 1.4rem;
    font-family: 'Space Grotesk', sans-serif;
    transition: transform .3s, box-shadow .3s;
}
.logo:hover .logo-circle { transform: rotate(-6deg) scale(1.05); box-shadow: 0 6px 20px rgba(10,63,212,.3); }

.logo-text {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700; font-size: 1.2rem; line-height: 1.2;
}
.logo-text small {
    display: block; font-family: 'Inter', sans-serif;
    font-weight: 400; font-size: .72rem; color: #94A3B8;
}

.nav-menu { display: flex; gap: 36px; list-style: none; }
.nav-menu a {
    text-decoration: none; color: #4B5563; font-weight: 500; font-size: .92rem;
    position: relative; padding-bottom: 2px;
    transition: color .2s;
}
.nav-menu a::after {
    content: '';
    position: absolute; bottom: -2px; left: 0; right: 0;
    height: 2px; background: var(--azul);
    transform: scaleX(0); transform-origin: left;
    transition: transform .25s ease;
}
.nav-menu a:hover { color: var(--azul); }
.nav-menu a:hover::after { transform: scaleX(1); }

.btn-login {
    background: var(--azul); color: white;
    padding: 10px 26px; border-radius: 50px;
    text-decoration: none; font-weight: 600; font-size: .9rem;
    transition: background .2s, transform .2s, box-shadow .2s;
}
.btn-login:hover { background: var(--azul2); transform: translateY(-2px); box-shadow: 0 6px 20px rgba(10,63,212,.3); }

.burger {
    font-size: 26px; background: none; border: none;
    cursor: pointer; display: none; color: var(--negro);
    padding: 4px; transition: transform .2s;
}
.burger:hover { transform: scale(1.1); }

/* MENÚ MÓVIL */
.mobile-menu {
    position: fixed; top: 80px; left: 0; right: 0;
    background: white; border-top: 1px solid #E5E7EB;
    display: none; flex-direction: column;
    padding: 24px 30px 30px;
    box-shadow: 0 16px 40px rgba(0,0,0,.1);
    z-index: 999;
    transform-origin: top;
}
.mobile-menu.active {
    display: flex;
    animation: slideDown .25s ease both;
}
.mobile-menu a {
    padding: 14px 0; font-size: 1.05rem;
    color: var(--negro); text-decoration: none;
    border-bottom: 1px solid #F1F1F1;
    transition: color .2s, padding-left .2s;
}
.mobile-menu a:hover { color: var(--azul); padding-left: 6px; }
.mobile-menu a:last-child { border: none; color: var(--azul); font-weight: 600; }

/* BOTÓN SUBIR */
#btn-top {
    position: fixed; bottom: 28px; right: 28px;
    width: 52px; height: 52px;
    background: var(--azul); color: white; border: none;
    border-radius: 50%; font-size: 1.4rem;
    display: none; align-items: center; justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(10,63,212,.35);
    z-index: 999;
    transition: background .2s, transform .2s, box-shadow .2s;
}
#btn-top.show { display: flex; animation: fadeUp .35s ease both; }
#btn-top:hover { background: var(--azul2); transform: translateY(-3px) scale(1.05); }

/* ═══════════════════════
   HERO
═══════════════════════ */
.hero {
    min-height: 100vh;
    display: flex; align-items: center;
    background: #FFFFFF;
    position: relative; overflow: hidden;
    padding-top: 80px;
}

.orb {
    position: absolute; border-radius: 50%;
    filter: blur(72px); pointer-events: none;
    animation: orbFloat 12s ease-in-out infinite;
}
.orb-1 {
    width: clamp(400px,55vw,780px); height: clamp(400px,55vw,780px);
    background: radial-gradient(circle, rgba(10,63,212,.1) 0%, transparent 70%);
    top: -15%; right: -12%;
    animation-duration: 14s;
}
.orb-2 {
    width: clamp(250px,35vw,500px); height: clamp(250px,35vw,500px);
    background: radial-gradient(circle, rgba(0,196,140,.12) 0%, transparent 70%);
    bottom: 0; left: -8%;
    animation-duration: 10s; animation-delay: -4s;
}
.orb-3 {
    width: clamp(150px,20vw,300px); height: clamp(150px,20vw,300px);
    background: radial-gradient(circle, rgba(10,63,212,.07) 0%, transparent 70%);
    top: 40%; left: 40%;
    animation-duration: 18s; animation-delay: -8s;
}

.hero-dots {
    position: absolute; inset: 0;
    background-image: radial-gradient(circle, #D1D5DB 1px, transparent 1px);
    background-size: 30px 30px; opacity: .4;
    mask-image: radial-gradient(ellipse 70% 70% at 50% 50%, #000 20%, transparent 100%);
    pointer-events: none;
}

.hero-content {
    max-width: 1300px; margin: 0 auto;
    padding: clamp(48px,8vh,100px) 30px;
    position: relative; z-index: 1;
    width: 100%;
}

.hero h1 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2.4rem, 6.5vw, 4.8rem);
    font-weight: 700; line-height: 1.05;
    margin-bottom: 24px; max-width: 16ch;
    animation: fadeUp .7s .1s ease both;
}
.hero h1 .highlight {
    color: var(--azul); position: relative; display: inline-block;
}
.hero h1 .highlight::after {
    content: '';
    position: absolute; bottom: 0; left: 0; right: 0; height: 4px;
    background: linear-gradient(90deg, var(--azul), var(--verde));
    border-radius: 2px; transform-origin: left;
    animation: lineGrow .8s .7s ease both;
}

.hero p {
    font-size: clamp(.95rem, 2vw, 1.2rem); color: #64748B;
    max-width: 52ch; margin-bottom: 40px; font-weight: 400;
    animation: fadeUp .7s .2s ease both;
}

.hero-buttons {
    display: flex; gap: 16px; flex-wrap: wrap;
    animation: fadeUp .7s .3s ease both;
}
.btn-primary, .btn-secondary {
    padding: 15px 36px; border-radius: 50px;
    font-size: 1rem; font-weight: 600;
    text-decoration: none; transition: all .3s;
}
.btn-primary {
    background: var(--azul); color: white;
    box-shadow: 0 6px 24px rgba(10,63,212,.28);
}
.btn-primary:hover { background: var(--azul2); transform: translateY(-3px); box-shadow: 0 12px 32px rgba(10,63,212,.38); }
.btn-secondary {
    background: transparent; color: var(--negro);
    border: 2px solid #CBD5E1;
}
.btn-secondary:hover { border-color: var(--azul); color: var(--azul); transform: translateY(-3px); }

.hero-stats {
    display: flex; gap: clamp(28px,5vw,64px);
    margin-top: 60px; flex-wrap: wrap;
    animation: fadeUp .7s .45s ease both;
}
.stat strong {
    display: block; font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem,3vw,2.4rem); font-weight: 700; color: var(--azul);
}
.stat span { font-size: .75rem; color: #94A3B8; text-transform: uppercase; letter-spacing: .07em; }

/* ═══════════════════════
   SECCIÓN GENÉRICA
═══════════════════════ */
.section {
    padding: clamp(72px,10vw,120px) 30px;
}
.section-inner { max-width: 1300px; margin: 0 auto; }

.section-tag {
    font-size: .72rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--azul); margin-bottom: 10px;
}
.section-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.8rem,4vw,2.8rem); font-weight: 700;
    text-align: center; margin-bottom: 14px;
}
.section-subtitle {
    text-align: center; color: #64748B;
    font-size: clamp(.9rem,2vw,1.1rem);
    max-width: 56ch; margin: 0 auto clamp(44px,6vw,70px);
    line-height: 1.7;
}

/* ═══════════════════════
   SERVICIOS
═══════════════════════ */
#servicios { background: #F8FAFC; }

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%,300px), 1fr));
    gap: 22px;
}

.service-card {
    background: white; padding: clamp(24px,4vw,38px) clamp(20px,3.5vw,32px);
    border-radius: 20px;
    border: 1px solid #E5E7EB;
    box-shadow: 0 4px 16px rgba(0,0,0,.04);
    transition: transform .3s, box-shadow .3s, border-color .3s;
    position: relative; overflow: hidden;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--azul), var(--verde));
    transform: scaleX(0); transform-origin: left;
    transition: transform .35s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: 0 20px 48px rgba(0,0,0,.1); border-color: #C7D7FD; }
.service-card:hover::before { transform: scaleX(1); }

.service-icon-wrap {
    width: 56px; height: 56px; border-radius: 16px;
    background: #EEF4FF; border: 1px solid #C7D7FD;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; margin-bottom: 20px;
    transition: transform .3s;
}
.service-card:hover .service-icon-wrap { transform: scale(1.1) rotate(-4deg); }

.service-num {
    font-family: 'Space Grotesk', sans-serif;
    font-size: .7rem; font-weight: 700;
    color: #CBD5E1; letter-spacing: .08em;
    margin-bottom: 4px;
}
.service-card h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.05rem; font-weight: 700; margin-bottom: 10px;
}
.service-card p { font-size: .88rem; color: #64748B; line-height: 1.65; }

/* ═══════════════════════
   RESEÑAS - CARRUSEL
═══════════════════════ */
#reseñas { background: white; }

/* Contenedor principal del carrusel */
.carousel {
    position: relative;
    max-width: 860px;          /* un poco más estrecho → tarjetas más altas y legibles */
    margin: 0 auto;
    padding: 0 56px;           /* espacio para botones laterales */
}

/* Slides container */
.carousel-container {
    overflow: hidden;
    border-radius: 24px;
}

.carousel-slides {
    display: flex;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;    /* aceleración GPU */
}

/* Cada slide */
.carousel-slide {
    flex: 0 0 100%;
    padding: 8px;
    box-sizing: border-box;
}

/* Tarjeta de reseña — altura mínima para que todas sean iguales */
.review-card {
    background: #ffffff;
    border-radius: 24px;
    padding: 28px 28px 24px;
    border: 1px solid #eef2f6;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.03);
    transition: all 0.25s ease;
    min-height: 280px;          /* altura uniforme aunque el texto sea corto */
    display: flex;
    flex-direction: column;
}

.review-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 35px -12px rgba(0, 0, 0, 0.1);
    border-color: #cbdffc;
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.review-user {
    display: flex;
    align-items: center;
    gap: 14px;
}

.review-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    object-fit: cover;
    background: #f1f5f9;
    border: 2px solid var(--azul);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.review-name {
    font-weight: 700;
    font-size: 1rem;
    color: var(--negro);
}

.review-name .empresa {
    font-weight: 400;
    font-size: 0.8rem;
    color: #5b6e8c;
}

.review-stars {
    margin-top: 4px;
}

.review-stars .star {
    color: #cbd5e1;
    font-size: 0.95rem;
    letter-spacing: 2px;
}

.review-stars .star.filled {
    color: #fbbf24;
}

.review-date {
    font-size: 0.7rem;
    color: #94a3b8;
    background: #f8fafc;
    padding: 4px 10px;
    border-radius: 20px;
    white-space: nowrap;
}

.review-comment {
    color: #334155;
    font-size: 0.92rem;
    line-height: 1.65;
    margin: 0 0 14px;
    background: #fafcff;
    padding: 14px 16px;
    border-radius: 16px;
    border-left: 3px solid var(--azul);
    flex: 1;                    /* ocupa el espacio sobrante → tarjetas de igual alto */
}

.review-servicio,
.review-amejorar {
    font-size: 0.8rem;
    margin-top: 10px;
    padding: 6px 10px;
    background: #f8fafc;
    border-radius: 12px;
    color: #1e293b;
}

.review-servicio {
    background: #eef4ff;
    color: var(--azul);
    font-weight: 500;
    display: inline-block;
}

.review-amejorar {
    background: #fff9e8;
    color: #b45309;
    border-left: 2px solid #f59e0b;
}

/* ── Botones del carrusel ── */
.carousel-btn {
    position: absolute;
    top: 50%; transform: translateY(-50%);
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    width: 44px; height: 44px;
    cursor: pointer;
    font-size: 1.4rem;
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s;
    box-shadow: 0 4px 12px rgba(0,0,0,.07);
    z-index: 2;
    user-select: none;
}
.carousel-btn:hover {
    background: var(--azul);
    color: white;
    border-color: var(--azul);
    box-shadow: 0 6px 20px rgba(10,63,212,.28);
    transform: translateY(-50%) scale(1.08);
}
/* Estado deshabilitado (primer / último slide) */
.carousel-btn:disabled {
    opacity: .35;
    cursor: default;
    pointer-events: none;
}
.btn-prev { left: 0; }
.btn-next { right: 0; }

/* ── Indicadores (dots) ── */
.carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 28px;
}
.dot {
    height: 8px;
    width: 8px;
    background: #cbd5e1;
    border-radius: 99px;
    cursor: pointer;
    transition: background 0.25s, width 0.25s, transform 0.25s;
}
.dot.active {
    background: var(--azul);
    width: 24px;               /* dot activo se alarga como píldora */
}

/* ── Barra de progreso del auto-avance ── */
.carousel-progress {
    height: 3px;
    background: #E5E7EB;
    border-radius: 99px;
    margin-top: 16px;
    overflow: hidden;
}
.carousel-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, var(--azul), var(--verde));
    border-radius: 99px;
    transition: width linear;  /* la duración se asigna por JS */
}

/* Placeholder */
.reviews-placeholder {
    border: 2px dashed #E2E8F0;
    border-radius: 20px;
    padding: clamp(48px,8vw,80px) clamp(20px,5vw,48px);
    text-align: center;
    color: #94A3B8;
}
.reviews-placeholder .placeholder-icon { font-size: 2.4rem; margin-bottom: 16px; opacity: .5; }
.reviews-placeholder p { font-size: .9rem; line-height: 1.65; max-width: 40ch; margin-inline: auto; }

/* Responsive: ajustar botones en móvil */
@media (max-width: 680px) {
    .carousel { padding: 0 34px; }
    .carousel-btn { width: 36px; height: 36px; font-size: 1.1rem; }
    .review-card { padding: 18px; min-height: 240px; }
}

/* ═══════════════════════
   CONTACTO
═══════════════════════ */
#contacto { background: var(--negro); }
#contacto .section-title  { color: white; }
#contacto .section-subtitle { color: #CBD5E1; }

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%,280px), 1fr));
    gap: 16px;
}

.contact-item {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.1);
    padding: clamp(20px,3vw,32px) clamp(18px,3vw,28px);
    border-radius: 18px;
    display: flex; align-items: center; gap: 18px;
    text-decoration: none; color: white;
    transition: background .25s, transform .25s, border-color .25s;
    position: relative; overflow: hidden;
}
.contact-item::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(135deg, rgba(10,63,212,.15) 0%, transparent 60%);
    opacity: 0; transition: opacity .3s;
}
.contact-item:hover { background: rgba(255,255,255,.1); transform: translateY(-4px); border-color: rgba(255,255,255,.22); }
.contact-item:hover::after { opacity: 1; }

.contact-ico {
    width: 52px; height: 52px; flex-shrink: 0;
    border-radius: 14px; font-size: 1.4rem;
    display: flex; align-items: center; justify-content: center;
}
.ico-mail { background: rgba(22,94,240,.22);  border: 1px solid rgba(22,94,240,.35); }
.ico-wa   { background: rgba(37,211,102,.18); border: 1px solid rgba(37,211,102,.35); }
.ico-fb   { background: rgba(24,119,242,.18); border: 1px solid rgba(24,119,242,.35); }

.contact-info small { display: block; font-size: .68rem; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: rgba(255,255,255,.4); margin-bottom: 4px; }
.contact-info span  { font-size: .95rem; font-weight: 500; }

/* ═══════════════════════
   FOOTER
═══════════════════════ */
footer {
    background: #07070F;
    border-top: 1px solid rgba(255,255,255,.06);
    color: #475569;
    text-align: center;
    padding: 28px 20px;
    font-size: .82rem;
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: 10px;
    max-width: 100%;
}
footer .wrap { max-width: 1300px; margin-inline: auto; width: 100%; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; }
footer a { color: #475569; text-decoration: none; transition: color .2s; }
footer a:hover { color: #94A3B8; }

/* ═══════════════════════
   REVEAL (scroll)
═══════════════════════ */
.reveal {
    opacity: 0; transform: translateY(28px);
    transition: opacity .6s ease, transform .6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-left  { opacity: 0; transform: translateX(-28px); transition: opacity .6s ease, transform .6s ease; }
.reveal-left.visible { opacity: 1; transform: translateX(0); }
.reveal-scale { opacity: 0; transform: scale(.94); transition: opacity .55s ease, transform .55s ease; }
.reveal-scale.visible { opacity: 1; transform: scale(1); }

@media (max-width: 768px) {
    .nav-menu, .btn-login { display: none; }
    .burger { display: block; }
    .hero-buttons { flex-direction: column; align-items: flex-start; }
    .hero-buttons a { width: 100%; max-width: 320px; text-align: center; }
    .hero-stats { gap: 28px; }
}
@media (max-width: 480px) {
    .logo-text { display: none; }
    .hero-stats { flex-wrap: wrap; }
}

/* ── Avatar con iniciales ── */
.review-avatar-initials {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.05rem;
    color: white;
    text-transform: uppercase;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    flex-shrink: 0;
    letter-spacing: .02em;
}