/* Estilos comunes de la web pública (sitio_web). Las páginas añaden solo lo suyo. */

/* Letra Inter servida desde nuestro propio servidor (no desde Google Fonts): un solo fichero
   variable con todos los grosores. Licencia SIL OFL en ../fonts/LICENSE.txt */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter-latin-wght-normal.woff2') format('woff2');
}

:root {
    --urodata-primary: #122c43;
    --ud-navy: #0a1929;
    --ud-navy-2: #122c43;
    --ud-navy-3: #1a4063;
    --ud-blue: #12b5ff;
    --ud-blue-dark: #0891d1;
    --ud-green: #4dbb6e;
    --ud-ink: #0f2235;
    --ud-muted: #5b6b7b;
    --ud-line: #e6ebf1;
    --ud-soft: #f5f8fb;
    --ud-radius: 20px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--ud-ink);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    letter-spacing: -0.02em;
}

/* ========== NAVBAR ========== */
.navbar {
    background: transparent !important;
    transition: all 0.3s ease;
    padding: 1.5rem 0;
}

.navbar.scrolled {
    background: rgba(10, 25, 41, 0.92) !important;
    backdrop-filter: saturate(160%) blur(16px);
    -webkit-backdrop-filter: saturate(160%) blur(16px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
    padding: 0.8rem 0;
}

.navbar-brand {
    transition: all 0.3s ease;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    font-size: 1rem;
    margin: 0 0.35rem;
    position: relative;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: white !important;
}

.btn-nav {
    background: white;
    color: var(--urodata-primary);
    font-weight: 600;
    padding: 0.6rem 1.5rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.btn-nav:hover {
    background: var(--ud-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(18, 181, 255, 0.35);
}

.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 12px;
    padding: 0.5rem 0.75rem;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(18, 181, 255, 0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 0.8)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (min-width: 992px) {
    .nav-link::after {
        content: '';
        position: absolute;
        left: 0.5rem;
        right: 0.5rem;
        bottom: 0.2rem;
        height: 2px;
        border-radius: 2px;
        background: var(--ud-blue);
        transform: scaleX(0);
        transition: transform 0.25s ease;
    }
    .nav-link:hover::after,
    .nav-link.active::after {
        transform: scaleX(1);
    }
}

@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(10, 25, 41, 0.96);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border: 1px solid rgba(255, 255, 255, 0.08);
        padding: 1.25rem;
        margin-top: 1rem;
        border-radius: 16px;
        box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
    }
    .nav-link {
        margin: 0.25rem 0;
        padding: 0.75rem 1rem !important;
        border-radius: 10px;
    }
    .nav-link:hover,
    .nav-link.active {
        background: rgba(255, 255, 255, 0.08);
    }
    .btn-nav {
        width: 100%;
        margin: 1rem 0 0 0 !important;
    }
    .navbar-nav {
        align-items: stretch !important;
    }
}

/* ========== BLOQUES COMUNES ========== */
.ud-hero {
    position: relative;
    overflow: hidden;
    color: white;
    background: linear-gradient(135deg, var(--ud-navy) 0%, var(--ud-navy-2) 55%, var(--ud-navy-3) 100%);
}

/* Rejilla fina y brillos azul/verde de fondo */
.ud-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
    background-size: 56px 56px;
    -webkit-mask-image: radial-gradient(ellipse at 50% 40%, black 30%, transparent 75%);
    mask-image: radial-gradient(ellipse at 50% 40%, black 30%, transparent 75%);
    pointer-events: none;
}

.ud-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 15% 30%, rgba(18, 181, 255, 0.18) 0%, transparent 45%),
        radial-gradient(circle at 85% 75%, rgba(77, 187, 110, 0.14) 0%, transparent 45%);
    pointer-events: none;
}

.ud-hero > .container {
    position: relative;
    z-index: 2;
}

.ud-gradient-text {
    background: linear-gradient(120deg, var(--ud-blue) 0%, #6fe0c0 60%, var(--ud-green) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.ud-section {
    padding: 7rem 0;
    background: white;
}

.ud-section--soft {
    background: var(--ud-soft);
}

.ud-section-title {
    font-size: 2.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--ud-navy-2);
    margin-bottom: 1rem;
}

.ud-section-lead {
    font-size: 1.15rem;
    color: var(--ud-muted);
    line-height: 1.7;
    max-width: 640px;
    margin: 0 auto;
}

/* Botones */
.ud-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    padding: 1rem 2rem;
    font-size: 1.05rem;
    font-weight: 600;
    border-radius: 50px;
    border: 1px solid transparent;
    transition: all 0.25s ease;
    text-decoration: none;
}

.ud-btn:hover {
    text-decoration: none;
    transform: translateY(-3px);
}

.ud-btn--primary {
    background: linear-gradient(135deg, var(--ud-blue) 0%, var(--ud-blue-dark) 100%);
    color: white;
    box-shadow: 0 12px 30px rgba(18, 181, 255, 0.35);
}

.ud-btn--primary:hover {
    color: white;
    box-shadow: 0 18px 40px rgba(18, 181, 255, 0.5);
}

.ud-btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.35);
    color: white;
}

.ud-btn--ghost:hover {
    background: white;
    border-color: white;
    color: var(--ud-navy-2);
}

/* Tarjetas */
.ud-card {
    position: relative;
    height: 100%;
    background: white;
    border: 1px solid var(--ud-line);
    border-radius: var(--ud-radius);
    padding: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.ud-card:hover {
    transform: translateY(-6px);
    border-color: rgba(18, 181, 255, 0.35);
    box-shadow: 0 24px 50px rgba(18, 44, 67, 0.10);
}

.ud-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--ud-blue);
    background: rgba(18, 181, 255, 0.1);
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
}

.ud-card:hover .ud-icon {
    transform: scale(1.08) rotate(-4deg);
}

.ud-card-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ud-navy-2);
    margin-bottom: 0.6rem;
}

.ud-card-text {
    font-size: 0.98rem;
    color: var(--ud-muted);
    line-height: 1.65;
    margin: 0;
}

/* Mosaico: tarjetas de anchos distintos */
.ud-bento {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.ud-bento > .ud-span-2 {
    grid-column: span 2;
}

@media (max-width: 991px) {
    .ud-bento { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 575px) {
    .ud-bento { grid-template-columns: 1fr; }
    .ud-bento > .ud-span-2 { grid-column: auto; }
}

/* Tarjeta oscura destacada dentro del mosaico */
.ud-card--dark {
    background: linear-gradient(145deg, var(--ud-navy) 0%, var(--ud-navy-2) 60%, var(--ud-navy-3) 100%);
    border-color: transparent;
    color: white;
    overflow: hidden;
}

.ud-card--dark::after {
    content: '';
    position: absolute;
    width: 260px;
    height: 260px;
    right: -80px;
    bottom: -100px;
    background: radial-gradient(circle, rgba(18, 181, 255, 0.35) 0%, transparent 70%);
    pointer-events: none;
}

.ud-card--dark .ud-card-title { color: white; }
.ud-card--dark .ud-card-text { color: rgba(255, 255, 255, 0.75); }
.ud-card--dark .ud-icon { background: rgba(18, 181, 255, 0.18); }

.ud-card--tint {
    background: linear-gradient(145deg, rgba(18, 181, 255, 0.08) 0%, rgba(77, 187, 110, 0.08) 100%);
    border-color: rgba(18, 181, 255, 0.18);
}

.ud-card--tint .ud-icon {
    color: var(--ud-green);
    background: rgba(77, 187, 110, 0.14);
}

/* Cabecera de las páginas interiores */
.ud-page-hero {
    padding: 170px 0 110px;
    text-align: center;
}

.ud-page-title {
    font-size: 3.75rem;
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    animation: udFadeUp 0.9s ease-out both;
}

.ud-page-subtitle {
    font-size: 1.25rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
    max-width: 680px;
    margin: 0 auto;
    animation: udFadeUp 0.9s 0.15s ease-out both;
}

@keyframes udFadeUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: none; }
}

/* Sección oscura (misma piel que la cabecera) */
.ud-section--dark {
    background: linear-gradient(135deg, var(--ud-navy) 0%, var(--ud-navy-2) 55%, var(--ud-navy-3) 100%);
}

.ud-section--dark .ud-section-title { color: white; }
.ud-section--dark .ud-section-lead { color: rgba(255, 255, 255, 0.72); }

/* Tarjeta de cristal sobre fondo oscuro */
.ud-card--glass {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.12);
    color: white;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.ud-card--glass:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(18, 181, 255, 0.5);
    box-shadow: 0 24px 50px rgba(0, 0, 0, 0.3);
}

.ud-card--glass .ud-card-title { color: white; }
.ud-card--glass .ud-card-text { color: rgba(255, 255, 255, 0.75); }
.ud-card--glass .ud-icon { background: rgba(18, 181, 255, 0.18); }

/* Captura de la plataforma dentro de un marco de ventana */
.ud-mockup-wrap {
    position: relative;
    perspective: 1600px;
}

.ud-mockup-wrap::before {
    content: '';
    position: absolute;
    inset: 10% 5%;
    background: radial-gradient(circle, rgba(18, 181, 255, 0.45) 0%, transparent 70%);
    filter: blur(40px);
}

.ud-mockup {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #0d2136;
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow: 0 40px 80px rgba(10, 25, 41, 0.35);
    transition: transform 0.6s ease;
}

.ud-mockup--tilt {
    transform: rotateY(-10deg) rotateX(4deg);
}

.ud-mockup-wrap:hover .ud-mockup--tilt {
    transform: rotateY(-4deg) rotateX(2deg);
}

.ud-mockup-bar {
    display: flex;
    gap: 6px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.06);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.ud-mockup-bar span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
}

.ud-mockup img {
    display: block;
    width: 100%;
    height: auto;
}

@media (max-width: 991px) {
    .ud-mockup--tilt { transform: none; }
}

@media (max-width: 768px) {
    .ud-page-hero { padding: 140px 0 80px; }
    .ud-page-title { font-size: 2.6rem; }
    .ud-page-subtitle { font-size: 1.1rem; }
}

/* Entrada suave al hacer scroll (solo si hay JS y el usuario no pide menos movimiento) */
.ud-js [data-reveal] {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

.ud-js [data-reveal].is-visible {
    opacity: 1;
    transform: none;
}

@media (prefers-reduced-motion: reduce) {
    .ud-js [data-reveal] {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

@media (max-width: 768px) {
    .ud-section { padding: 4.5rem 0; }
    .ud-section-title { font-size: 2rem; }
    .ud-btn { padding: 0.9rem 1.6rem; font-size: 1rem; }
}

/* ========== FOOTER ========== */
.ud-footer {
    position: relative;
    background: var(--ud-navy);
    color: rgba(255, 255, 255, 0.7);
    padding: 4.5rem 0 2rem;
}

.ud-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(18, 181, 255, 0.6), rgba(77, 187, 110, 0.6), transparent);
}

.ud-footer-logo {
    max-height: 120px;
    margin: -38px 0 -24px -12px;
}

.ud-footer-tagline {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.6);
}

.ud-footer h5 {
    color: white;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-bottom: 1.25rem;
}

.ud-footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ud-footer li {
    margin-bottom: 0.6rem;
}

.ud-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

.ud-footer a:hover {
    color: var(--ud-blue);
}

.ud-footer-social {
    display: inline-flex;
    gap: 0.75rem;
}

.ud-footer-social a {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.04);
    transition: all 0.25s ease;
}

.ud-footer-social a:hover {
    color: white;
    border-color: var(--ud-blue);
    background: rgba(18, 181, 255, 0.15);
    transform: translateY(-2px);
}

.ud-footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 3rem;
    padding-top: 1.5rem;
    text-align: center;
}

.ud-footer-bottom p {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.45);
    margin: 0;
}

@media (max-width: 768px) {
    .ud-footer .col-md-4 {
        text-align: center !important;
        margin-bottom: 2rem;
    }
    .ud-footer-logo {
        max-height: 80px;
        margin: -20px auto 0.5rem;
    }
}

/* ========== COOKIE BANNER ========== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.15);
    padding: 1.5rem 2rem;
    z-index: 9999;
    display: none;
    border-top: 4px solid #122c43;
    backdrop-filter: blur(10px);
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}

.cookie-text {
    flex: 1;
}

.cookie-text p {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 0.95rem;
    line-height: 1.6;
}

.cookie-text strong {
    color: #122c43;
    font-size: 1.1rem;
    font-weight: 700;
}

.cookie-text i {
    color: #122c43;
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

.cookie-text a {
    color: #12b5ff;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.cookie-text a:hover {
    color: #0d9dd9;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-buttons .btn {
    padding: 10px 28px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.cookie-buttons .btn-primary {
    background: linear-gradient(135deg, #12b5ff 0%, #0d9dd9 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(18, 181, 255, 0.3);
}

.cookie-buttons .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(18, 181, 255, 0.4);
}

.cookie-buttons .btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #dee2e6;
}

.cookie-buttons .btn-secondary:hover {
    background: #e9ecef;
    border-color: #adb5bd;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .cookie-banner {
        padding: 1rem;
    }
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .cookie-buttons {
        width: 100%;
        justify-content: center;
        flex-direction: column;
    }
    .cookie-buttons .btn {
        width: 100%;
    }
}
