* {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
html {
    scroll-behavior: smooth;
    background-color: #0a192f;
}
body {
    background-color: #0a192f;
    color: #f7fafc;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ===== FONDO OCÉANO REAL (foto + movimiento suave) ===== */
.ocean-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.ocean-bg img, .ocean-bg video {
    position: absolute;
    inset: -2%;
    width: 104%;
    height: 104%;
    object-fit: cover;
    filter: saturate(1.0) brightness(0.75) contrast(1.05) hue-rotate(-20deg);
}
.ocean-bg img {
    animation: oceanKenburns 50s ease-in-out infinite alternate;
}
@keyframes oceanKenburns {
    0%   { transform: scale(1.06) translate(0%, 0%); }
    100% { transform: scale(1.16) translate(-2%, -1%); }
}

/* Brillo/reflejo grande que se desliza lentamente, simula luz viva sobre el agua */
.ocean-sheen {
    position: fixed;
    top: -40%;
    left: -40%;
    width: 180%;
    height: 180%;
    z-index: 0;
    mix-blend-mode: soft-light;
    opacity: 0.65;
    pointer-events: none;
    background: radial-gradient(ellipse 22% 16% at center, rgba(170,225,220,0.85), transparent 62%);
    animation: oceanSheenMove 26s ease-in-out infinite alternate;
}
@keyframes oceanSheenMove {
    0%   { transform: translate(5%, 8%); }
    50%  { transform: translate(28%, 20%); }
    100% { transform: translate(12%, 32%); }
}
.ocean-dim {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background:
        linear-gradient(180deg, rgba(3,25,29,0.55) 0%, rgba(3,25,29,0.25) 35%, rgba(3,25,29,0.8) 100%),
        radial-gradient(ellipse at center, rgba(3,25,29,0.1) 0%, rgba(3,25,29,0.6) 100%);
}

/* Todo el contenido por encima del fondo */
section, footer, nav {
    position: relative;
    z-index: 1;
}

:root {
    --bg-primary: #0a192f;
    --bg-secondary: #1a365d;
    --bg-card: #1a365d;
    --border-subtle: #2b6cb0;
    --border-medium: #319795;
    --text-primary: #f7fafc;
    --text-secondary: #a0bbd8;
    --text-muted: #718096;
    --accent-deep: #2b6cb0;
    --accent-bright: #319795;
    --accent-glow: rgba(49, 151, 149, 0.25);
}

.img-sharpen {
    filter: url(#sharpen);
}

::-webkit-scrollbar { width: 4px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-deep); border-radius: 4px; }

.navbar {
    background: transparent;
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    border-bottom: 1px solid transparent;
}
.navbar.scrolled {
    background: rgba(3, 25, 29, 0.45);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(43, 108, 176, 0.4);
}

/* Paneles translúcidos: se mezclan con la foto de océano en vez de tapar con azul sólido */
.mobile-menu-glass {
    background: rgba(3, 25, 29, 0.6);
    backdrop-filter: blur(20px);
}
.glass-card {
    background: rgba(10, 25, 47, 0.35);
    backdrop-filter: blur(14px);
}

.btn-primary {
    background: var(--accent-deep);
    color: white;
    padding: 12px 32px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    position: relative;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.15), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}
.btn-primary:hover {
    background: var(--accent-bright);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px var(--accent-glow);
}
.btn-primary:hover::after { opacity: 1; }
.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 400;
    font-size: 14px;
    transition: all 0.3s ease;
    border: 1px solid var(--border-subtle);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}
.btn-ghost:hover {
    border-color: var(--text-secondary);
    color: white;
    transform: translateY(-2px);
}

@keyframes fadeUpScale {
    0% { opacity: 0; transform: translateY(40px) scale(0.96); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
.anim { opacity: 0; }
.anim.visible { animation: fadeUpScale 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards; }
.anim-d1 { animation-delay: 0.1s; }
.anim-d2 { animation-delay: 0.25s; }
.anim-d3 { animation-delay: 0.4s; }
.anim-d4 { animation-delay: 0.55s; }

@keyframes expandLine {
    from { width: 0; }
    to { width: 60px; }
}
.line-anim.visible {
    animation: expandLine 0.8s 0.2s ease-out forwards;
    width: 0;
}

/* Hero - fondo transparente para ver las partículas */
.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    /* Sin color de fondo ni gradiente para que se vea el canvas */
    background: transparent;
}
/* Eliminamos el gradiente-overlay */

.ba-container {
    position: relative;
    overflow: hidden;
    cursor: ew-resize;
    user-select: none;
    border-radius: 12px;
    border: 1px solid var(--border-subtle);
    transition: border-color 0.3s;
}
.ba-container:hover { border-color: var(--accent-bright); }
.ba-before, .ba-after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.ba-before { clip-path: inset(0 50% 0 0); z-index: 2; }
.ba-after { z-index: 1; }
.ba-slider {
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 100%;
    background: var(--accent-bright);
    z-index: 10;
    transform: translateX(-50%);
    box-shadow: 0 0 24px var(--accent-glow);
    transition: box-shadow 0.3s;
}
.ba-container:hover .ba-slider { box-shadow: 0 0 40px var(--accent-glow); }
.ba-slider::before {
    content: '⟷';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 2px solid var(--accent-bright);
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: 300;
    color: white;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
    transition: all 0.3s;
}
.ba-container:hover .ba-slider::before {
    background: var(--accent-deep);
    border-color: white;
}
.ba-label {
    position: absolute;
    bottom: 24px;
    z-index: 5;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    padding: 6px 18px;
    border-radius: 6px;
    backdrop-filter: blur(8px);
    transition: all 0.3s;
}
.ba-label-before {
    left: 24px;
    background: rgba(10, 25, 47, 0.8);
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}
.ba-label-after {
    right: 24px;
    background: var(--accent-deep);
    color: white;
    border: 1px solid var(--accent-bright);
}

.acc-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}
.acc-item.open .acc-content { max-height: 2000px; }
.acc-item.open .acc-icon {
    transform: rotate(45deg);
    color: var(--accent-bright) !important;
}
.acc-icon {
    transition: transform 0.4s ease, color 0.3s ease;
    font-size: 24px;
    font-weight: 300;
}
.acc-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.acc-item:last-child {
    border-bottom: none;
}

.star-btn {
    font-size: 28px;
    cursor: pointer;
    transition: all 0.2s;
    line-height: 1;
}
.star-btn.active { color: #fbbf24; transform: scale(1.1); }
.star-btn.inactive { color: #334155; }
.star-btn.inactive:hover { color: #64748b; transform: scale(1.05); }

.service-card {
    border: 1px solid var(--border-subtle);
    background: var(--bg-card);
    transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}
.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent-bright), transparent);
    transform: scaleX(0);
    transition: transform 0.6s;
}
.service-card:hover::before { transform: scaleX(1); }
.service-card:hover {
    border-color: var(--accent-bright);
    background: #1f4a7a;
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 16px 60px rgba(0, 0, 0, 0.5);
}

#adminPanel {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}
#adminPanel.active { opacity: 1; pointer-events: auto; }
.admin-box {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    max-width: 440px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    padding: 30px;
    border-radius: 16px;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.4s cubic-bezier(0.22, 1, 0.36, 1);
}
#adminPanel.active .admin-box { transform: scale(1) translateY(0); }
.admin-box input {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    color: white;
    padding: 10px 14px;
    border-radius: 6px;
    width: 100%;
    font-size: 14px;
    transition: border-color 0.3s;
}
.admin-box input:focus { border-color: var(--accent-bright); outline: none; }
.admin-box label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.btn-admin {
    background: var(--accent-deep);
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    font-size: 14px;
}
.btn-admin:hover { background: var(--accent-bright); transform: translateY(-2px); }
.btn-admin-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 400;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
}
.btn-admin-outline:hover {
    border-color: var(--text-secondary);
    color: white;
}
.btn-success, .btn-danger {
    padding: 8px 16px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 12px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s;
}
.btn-success {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
    border-color: rgba(34, 197, 94, 0.4);
}
.btn-success:hover { background: rgba(34, 197, 94, 0.3); color: white; }
.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #f87171;
    border-color: rgba(239, 68, 68, 0.4);
}
.btn-danger:hover { background: rgba(239, 68, 68, 0.3); color: white; }
.admin-link {
    color: var(--accent-bright);
    cursor: pointer;
    font-size: 13px;
    text-decoration: underline;
    transition: color 0.3s;
    display: inline-block;
    margin-top: 8px;
}
.admin-link:hover { color: white; }
.admin-error {
    color: #ef4444;
    font-size: 13px;
    margin-top: 6px;
    text-align: center;
}
.admin-success {
    color: #22c55e;
    font-size: 13px;
    margin-top: 6px;
    text-align: center;
}
.admin-section {
    display: none;
}
.admin-section.active {
    display: block;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 30px;
}
.stat-card {
    background: var(--bg-primary);
    padding: 14px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid var(--border-subtle);
    transition: all 0.3s;
}
.stat-card:hover { border-color: var(--accent-bright); transform: translateY(-2px); }
.stat-card .num { font-size: 24px; font-weight: 600; color: white; }
.stat-card .label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-top: 4px; }
.stat-icon { width: 16px; height: 16px; color: var(--accent-bright); margin: 0 auto 6px; display: block; }

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-subtle);
}
.admin-logout-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-muted);
    background: transparent;
    border: 1px solid var(--border-subtle);
    padding: 6px 12px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}
.admin-logout-btn:hover { color: #f87171; border-color: #f87171; }

.admin-comments-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
}
.pending-badge {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
    border: 1px solid rgba(251, 191, 36, 0.4);
    padding: 3px 9px;
    border-radius: 999px;
}

.comment-card {
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    padding: 18px;
    transition: border-color 0.3s;
}
.comment-card.is-pending { border-left: 3px solid #fbbf24; }
.comment-card:hover { border-color: var(--accent-bright); }
.comment-status {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 3px 9px;
    border-radius: 999px;
    white-space: nowrap;
}
.status-pending { background: rgba(251, 191, 36, 0.15); color: #fbbf24; }
.status-approved { background: rgba(34, 197, 94, 0.15); color: #4ade80; }

.mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(6px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-overlay.active { opacity: 1; pointer-events: auto; }
.admin-close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
    background: none;
    border: none;
    transition: color 0.3s;
}
.admin-close:hover { color: white; }

.reveal {
    opacity: 0;
    transform: translateY(60px);
    transition: all 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-d1 { transition-delay: 0.1s; }
.reveal-d2 { transition-delay: 0.2s; }
.reveal-d3 { transition-delay: 0.3s; }
.reveal-d4 { transition-delay: 0.4s; }

.btn-shine { position: relative; overflow: hidden; }
.btn-shine::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}
.btn-shine:hover::before { opacity: 1; }

/* ===== GRANO/TEXTURA (estética vanguardista) ===== */
.grain-overlay {
    position: fixed;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    opacity: 0.035;
    mix-blend-mode: overlay;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='120' height='120'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
}

/* ===== BARRA DE PROGRESO DE SCROLL ===== */
#scrollProgress {
    position: fixed;
    top: 0;
    left: 0;
    height: 2px;
    width: 0%;
    background: linear-gradient(90deg, var(--accent-deep), var(--accent-bright));
    z-index: 60;
    transition: width 0.1s linear;
    box-shadow: 0 0 12px var(--accent-glow);
}

/* ===== HERO 3D PARALLAX ===== */
#heroPerspective { perspective: 700px; }
#heroTilt {
    transform-style: preserve-3d;
    transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1);
    will-change: transform;
}
#heroTilt h1, #heroTilt blockquote { transform: translateZ(40px); }

/* ===== LOGO — EFECTO MONEDA 3D ===== */
.navbar a.group, footer a { perspective: 400px; }
.logo-img {
    transition: transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
    transform-style: preserve-3d;
}
.group:hover .logo-img { transform: rotateY(360deg); }

/* ===== SERVICIOS — TILT 3D + NÚMERO EDITORIAL ===== */
.services-grid { perspective: 900px; }
.service-card {
    transform-style: preserve-3d;
    will-change: transform;
    transition: transform 0.12s ease-out, border-color 0.4s, background 0.4s, box-shadow 0.4s;
}
.service-card > * { position: relative; z-index: 1; }
.service-num-bg {
    position: absolute;
    bottom: -30px;
    right: -10px;
    font-size: 140px;
    font-weight: 700;
    line-height: 1;
    color: rgba(255, 255, 255, 0.04);
    z-index: 0;
    transition: color 0.4s ease, transform 0.4s ease;
    pointer-events: none;
    user-select: none;
}
.service-card:hover .service-num-bg {
    color: rgba(49, 151, 149, 0.1);
    transform: translateZ(20px) scale(1.05);
}

/* ===== ANTES/DESPUÉS — SWEEP REVEAL CINEMATOGRÁFICO ===== */
.ba-sweep {
    position: absolute;
    inset: 0;
    background: rgba(3, 25, 29, 0.9);
    backdrop-filter: blur(6px);
    z-index: 20;
    transform-origin: right;
    transition: transform 1.2s cubic-bezier(0.83, 0, 0.17, 1);
}
.ba-container.revealed .ba-sweep { transform: scaleX(0); }

/* ===== NAVBAR BLUR PROGRESIVO ===== */
.navbar { backdrop-filter: blur(0px); }

/* ===== SERVICIOS — LISTA EDITORIAL CON PREVIEW DE IMAGEN ===== */
.service-row {
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.service-row:first-child { border-top: 1px solid rgba(255, 255, 255, 0.08); }
.service-row::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: var(--row-img);
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1.15);
    transition: opacity 0.7s ease, transform 1s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 1;
}
.service-row::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(10,25,47,0.97) 35%, rgba(10,25,47,0.6));
    z-index: 1;
    opacity: 0;
    transition: opacity 0.6s ease;
}
.service-row:hover::before, .service-row:hover::after { opacity: 1; }
.service-row:hover::before { transform: scale(1); }
.service-row-inner {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: clamp(1rem, 4vw, 3rem);
    padding: clamp(1.75rem, 4vw, 3rem) 0.5rem;
    transition: padding-left 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.service-row:hover .service-row-inner { padding-left: 1.5rem; }
.service-row-num {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.1em;
    color: var(--text-muted);
    width: 2.5rem;
    shrink: 0;
    transition: color 0.4s ease;
}
.service-row:hover .service-row-num { color: var(--accent-bright); }
.service-row-text { flex: 1; min-width: 0; }
.service-row-text h3 {
    font-size: clamp(1.5rem, 3.2vw, 2.5rem);
    font-weight: 300;
    letter-spacing: -0.02em;
    transition: color 0.4s ease;
}
.service-row-text p {
    margin-top: 0.5rem;
    font-size: 14px;
    color: var(--text-secondary);
    max-width: 34ch;
    opacity: 0.85;
}
.service-row-arrow {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    border: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translate(-12px, 12px) rotate(-45deg);
    transition: all 0.45s cubic-bezier(0.22, 1, 0.36, 1);
    shrink: 0;
}
.service-row:hover .service-row-arrow {
    opacity: 1;
    transform: translate(0, 0) rotate(0deg);
    border-color: var(--accent-bright);
    background: rgba(49, 151, 149, 0.12);
}

/* ===== ALCANCE — LISTA EDITORIAL NUMERADA ===== */
.alcance-row {
    position: relative;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.alcance-row:first-child { border-top: 1px solid rgba(255, 255, 255, 0.06); }
.alcance-hover-line {
    position: absolute;
    left: 0;
    bottom: -1px;
    height: 1px;
    width: 0;
    background: var(--accent-bright);
    box-shadow: 0 0 10px var(--accent-glow);
    transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.alcance-row:hover .alcance-hover-line { width: 100%; }
.alcance-num {
    font-size: 40px;
    font-weight: 300;
    line-height: 1;
    color: rgba(255, 255, 255, 0.12);
    transition: color 0.5s ease;
}
.alcance-row:hover .alcance-num { color: var(--accent-bright); }

/* ===== ZONAS DE COBERTURA ===== */
.zone-chip {
    border: 1px solid var(--border-subtle);
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 12px;
    color: var(--text-secondary);
    transition: all 0.3s ease;
    display: inline-block;
}
.zone-chip:hover {
    border-color: var(--accent-bright);
    color: white;
    background: rgba(49, 151, 149, 0.1);
    transform: translateY(-2px);
}
