/* =========================================================
   EGREGIO | Hoja de estilos centralizada
   Basada en Brandbook.txt: Deep Navy, Electric Cyan, Mint Green
   ========================================================= */

:root {
    --egr-navy: #0A2342;
    --egr-cyan: #00B4D8;
    --egr-mint: #2A9D8F;
    --egr-bg-light: #F8F9FA;
    --egr-bg-dark: #181C25;
    --egr-radius: 10px;
    --egr-shadow: 0 10px 30px -12px rgba(10, 35, 66, 0.35);
}

body {
    background-color: var(--egr-bg-light);
}

.bg-navy { background-color: rgba(10, 35, 66, 0.90); }
.bg-dark { background-color: rgba(24, 28, 37, 0.90); }
.text-cyan { color: var(--egr-cyan); }
.text-mint { color: var(--egr-mint); }
.text-navy { color: var(--egr-navy); }
.border-mint { border-color: var(--egr-mint); }

.btn-primary {
    background-color: var(--egr-navy);
    transition: all 0.25s ease;
}
.btn-primary:hover {
    background-color: var(--egr-cyan);
    color: var(--egr-navy);
}

.btn-mint {
    background: transparent;
    border: 2px solid var(--egr-mint);
    color: var(--egr-mint);
    transition: all 0.25s ease;
}
.btn-mint:hover {
    background: var(--egr-mint);
    color: #fff;
}

/* ---------- Iconos de marca ---------- */
.egr-icon {
    width: 64px;
    height: 64px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--egr-radius);
    overflow: hidden;
    box-shadow: var(--egr-shadow);
}
.egr-icon img { width: 100%; height: 100%; display: block; }

/* ---------- Tarjetas de solución / demo ---------- */
.egr-card {
    background: #fff;
    border-radius: var(--egr-radius);
    box-shadow: 0 4px 18px -8px rgba(10, 35, 66, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.egr-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--egr-shadow);
}

.egr-demo-thumb {
    width: 100%;
    height: 160px;
    object-fit: cover;
    background: var(--egr-bg-light);
}

/* ---------- Campo honeypot (trampa anti-spam, invisible para humanos) ---------- */
.egr-hp-field {
    position: absolute !important;
    left: -9999px !important;
    top: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    opacity: 0 !important;
}

/* ---------- Campo protegido contra copiar/pegar/links ---------- */
.egr-protected-field {
    user-select: text;
}
.egr-protected-hint {
    font-size: 0.75rem;
    color: var(--egr-mint);
    margin-top: 4px;
}
.egr-protected-warning {
    display: none;
    font-size: 0.8rem;
    color: #b91c1c;
    margin-top: 4px;
    font-weight: 600;
}
.egr-protected-warning.show { display: block; }

/* ---------- Badge de seguridad ---------- */
.egr-security-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(42, 157, 143, 0.12);
    color: var(--egr-mint);
    border: 1px solid rgba(42, 157, 143, 0.4);
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ---------- Mensajes de estado del formulario ---------- */
.egr-alert {
    border-radius: var(--egr-radius);
    padding: 14px 18px;
    margin-bottom: 20px;
    font-weight: 600;
}
.egr-alert-success {
    background: rgba(42, 157, 143, 0.12);
    color: #1f6f63;
    border: 1px solid var(--egr-mint);
}
.egr-alert-error {
    background: rgba(185, 28, 28, 0.08);
    color: #991b1b;
    border: 1px solid #b91c1c;
}

/* ---------- Marca de agua fija de toda la página ---------- */
.egr-watermark-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}
.egr-wm {
    position: absolute;
    opacity: 0.14;
    will-change: transform;
}
.egr-wm-center {
    width: min(60vw, 820px);
    height: min(60vw, 820px);
    top: 50%;
    left: 50%;
    margin: calc(min(60vw, 820px) / -2) 0 0 calc(min(60vw, 820px) / -2);
    opacity: 0.13;
    animation: egr-spin-slow 160s linear infinite;
}
.egr-wm-sm { width: 150px; height: 150px; opacity: 0.18; }
.egr-wm-1 { top: 6%;  left: 8%;  animation: egr-spin-slow 90s linear infinite; }
.egr-wm-2 { top: 12%; right: 6%; width: 200px; height: 200px; animation: egr-spin-slow-rev 120s linear infinite; }
.egr-wm-3 { bottom: 18%; left: 4%; width: 170px; height: 170px; animation: egr-spin-slow 140s linear infinite; }
.egr-wm-4 { bottom: 8%; right: 10%; animation: egr-spin-slow-rev 100s linear infinite; }
.egr-wm-5 { top: 42%; left: 2%; width: 110px; height: 110px; animation: egr-spin-slow 75s linear infinite; }

@keyframes egr-spin-slow { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes egr-spin-slow-rev { from { transform: rotate(0deg); } to { transform: rotate(-360deg); } }

/* Todo el contenido real debe ir por encima de la marca de agua fija */
body > nav, body > header, body > section, body > footer, body > .egr-divider {
    position: relative;
    z-index: 1;
}

/* ---------- Titular animado del hero (4 tipos de transición) ---------- */
.egr-hero-title-wrap { perspective: 900px; }
.egr-hero-title {
    display: inline-block;
    will-change: transform, opacity;
}
@keyframes egr-enter-left { from { opacity: 0; transform: translateX(-70px); } to { opacity: 1; transform: translateX(0); } }
@keyframes egr-exit-left  { from { opacity: 1; transform: translateX(0); } to { opacity: 0; transform: translateX(70px); } }
@keyframes egr-enter-up   { from { opacity: 0; transform: translateY(50px) scale(0.96); } to { opacity: 1; transform: translateY(0) scale(1); } }
@keyframes egr-exit-up    { from { opacity: 1; transform: translateY(0) scale(1); } to { opacity: 0; transform: translateY(-50px) scale(0.96); } }
@keyframes egr-enter-zoom { from { opacity: 0; transform: scale(0.55); } to { opacity: 1; transform: scale(1); } }
@keyframes egr-exit-zoom  { from { opacity: 1; transform: scale(1); } to { opacity: 0; transform: scale(1.35); } }
@keyframes egr-enter-flip { from { opacity: 0; transform: rotateX(75deg); } to { opacity: 1; transform: rotateX(0deg); } }
@keyframes egr-exit-flip  { from { opacity: 1; transform: rotateX(0deg); } to { opacity: 0; transform: rotateX(-75deg); } }

.egr-anim-enter-left { animation: egr-enter-left 0.7s cubic-bezier(.22,.9,.35,1) forwards; }
.egr-anim-exit-left  { animation: egr-exit-left 0.55s ease-in forwards; }
.egr-anim-enter-up    { animation: egr-enter-up 0.7s cubic-bezier(.22,.9,.35,1) forwards; }
.egr-anim-exit-up     { animation: egr-exit-up 0.55s ease-in forwards; }
.egr-anim-enter-zoom   { animation: egr-enter-zoom 0.7s cubic-bezier(.22,.9,.35,1) forwards; }
.egr-anim-exit-zoom    { animation: egr-exit-zoom 0.55s ease-in forwards; }
.egr-anim-enter-flip   { animation: egr-enter-flip 0.8s cubic-bezier(.22,.9,.35,1) forwards; }
.egr-anim-exit-flip    { animation: egr-exit-flip 0.55s ease-in forwards; }

@media (prefers-reduced-motion: reduce) {
    .egr-wm, .egr-hero-title { animation: none !important; }
}

/* ---------- Header / nav ---------- */
.egr-nav-logo { height: 40px; width: 40px; display: block; }

/* ---------- Hero: foto animada (Ken Burns), overlay de marca y marca de agua ---------- */
.egr-hero {
    position: relative;
    overflow: hidden;
    background: linear-gradient(160deg, var(--egr-bg-dark) 0%, var(--egr-navy) 55%, #0d2d54 100%);
}
.egr-hero-photo {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
    animation: egr-kenburns 23.4s ease-in-out infinite alternate;
    will-change: transform;
}
@keyframes egr-kenburns {
    from { transform: scale(1) translate(0, 0); }
    to   { transform: scale(1.16) translate(-2%, -1.5%); }
}
.egr-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(160deg, rgba(24,28,37,0.93) 0%, rgba(10,35,66,0.87) 50%, rgba(13,45,84,0.72) 100%);
}
.egr-hero-watermark {
    position: absolute;
    z-index: 2;
    top: 50%;
    right: -6%;
    width: min(60vw, 780px);
    height: auto;
    transform: translateY(-50%) rotate(-6deg);
    opacity: 0.14;
    pointer-events: none;
    user-select: none;
}
.egr-hero-content { position: relative; z-index: 3; }

@media (prefers-reduced-motion: reduce) {
    .egr-hero-photo { animation: none !important; }
}

/* ---------- Carrusel de frases (hero) ---------- */
.egr-rotator {
    position: relative;
    min-height: 3.6em;
    display: flex;
    align-items: center;
    justify-content: center;
}
.egr-rotator-item {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    pointer-events: none;
}
.egr-rotator-item.is-active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* ---------- Contadores animados ---------- */
.egr-stats-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 640px;
    margin: 0 auto;
}
.egr-stat-number {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    color: var(--egr-cyan);
    line-height: 1;
}
.egr-stat-label {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 4px;
}

/* ---------- Divisores angulados entre secciones ---------- */
.egr-divider { display: block; width: 100%; line-height: 0; }
.egr-divider svg { width: 100%; height: 60px; display: block; }

/* ---------- Sección Misión / Visión / Valores ---------- */
.egr-mvv-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--egr-radius);
    padding: 2rem;
}
.egr-value-chip {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--egr-radius);
    padding: 1rem 1.1rem;
    transition: border-color 0.2s ease, background 0.2s ease;
}
.egr-value-chip:hover { border-color: var(--egr-mint); background: rgba(42,157,143,0.08); }
.egr-value-dot {
    width: 8px; height: 8px; border-radius: 999px;
    background: var(--egr-mint); flex-shrink: 0; margin-top: 6px;
}

/* ---------- Acentos de color en tarjetas ---------- */
.egr-card-accent-cyan { border-top: 3px solid var(--egr-cyan); }
.egr-card-accent-mint { border-top: 3px solid var(--egr-mint); }
.egr-card-accent-navy { border-top: 3px solid var(--egr-navy); }

.egr-pill {
    border-radius: 999px;
    padding: 6px 16px;
    font-weight: 600;
    font-size: 0.85rem;
}

/* ---------- Tinte de sección (rompe el blanco/gris plano; semi-transparente
   para dejar ver la marca de agua fija de fondo) ---------- */
.egr-tint-cyan { background: linear-gradient(180deg, rgba(240,250,252,0.72) 0%, rgba(248,249,250,0.72) 100%); }

/* ---------- Panel admin ---------- */
.egr-admin-shell { min-height: 100vh; background: var(--egr-bg-dark); }
.egr-stat-card {
    background: #fff;
    border-radius: var(--egr-radius);
    padding: 20px;
    box-shadow: var(--egr-shadow);
}
.egr-stat-value { font-size: 2rem; font-weight: 800; color: var(--egr-navy); }
.egr-table { width: 100%; border-collapse: collapse; }
.egr-table th, .egr-table td {
    text-align: left;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
}
.egr-table th { color: var(--egr-navy); font-weight: 700; background: #f1f5f9; }
.egr-badge-estado {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}
.egr-badge-nuevo { background: rgba(0,180,216,0.15); color: #0369a1; }
.egr-badge-contactado { background: rgba(42,157,143,0.15); color: #1f6f63; }
.egr-badge-descartado { background: #e5e7eb; color: #4b5563; }
.egr-badge-spam { background: rgba(185,28,28,0.12); color: #991b1b; }
.egr-badge-publicado { background: rgba(42,157,143,0.15); color: #1f6f63; }
.egr-badge-borrador { background: #e5e7eb; color: #4b5563; }
