/* RESET Y FUENTES */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Salesforce Sans', 'Helvetica Neue', 'Arial', sans-serif;
    color: #161b1f;
    background-color: #f9f9fb;
    -webkit-font-smoothing: antialiased;
}

ul {
    list-style: none;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ===============================
   MOTOROLA TOP BAR
   =============================== */
.motorola-topbar {
    background-color: #333333;
    color: white;
    height: 48px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #2a2a2a;
}

.topbar-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.topbar-right:hover {
    opacity: 0.85;
}

/* Logo sizes - Desktop (pixel perfect from original) */
.moto-logo-img {
    width: 233px;
    height: 27px;
    object-fit: contain;
}

.toolhub-logo-img {
    width: 111px;
    height: 32px;
    object-fit: contain;
}

.avigilon-logo-img {
    width: 169px;
    height: 36px;
    object-fit: cover;
}

.footer-moto-logo {
    width: 233px;
    height: 27px;
    object-fit: contain;
}

/* ===============================
   MAIN HEADER - BRAND AVIGILON
   =============================== */
.site-header {
    background-color: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    height: 56px;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    width: 100%;
    margin: 0 auto;
    padding: 0 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-logo {
    display: flex;
    align-items: center;
}

.avigilon-logo-text {
    font-size: 34px;
    color: #0176d3;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.5px;
}

.avigilon-sub-text {
    font-size: 11px;
    color: #9299a4;
    font-weight: 600;
    letter-spacing: 1.5px;
    margin-top: 2px;
}

/* Menú */
.desktop-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

.nav-menu {
    display: flex;
    gap: 32px;
}

.nav-item {
    position: relative;
}

.nav-item>a {
    color: #161b1f;
    font-size: 15px;
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: color 0.1s;
    padding: 10px 0;
}

.nav-item>a:hover {
    color: #0176d3;
}

.dropdown-menu {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    top: 100%;
    left: 0;
    background: #ffffff;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    min-width: 260px;
    border-radius: 6px;
    border: 1px solid #e5e7eb;
    padding: 12px 0;
    z-index: 200;
    transform: translateY(10px);
    transition: all 0.2s ease;
}

.nav-item:hover .dropdown-menu {
    visibility: visible;
    opacity: 1;
    transform: translateY(0);
}

.dropdown-menu li a {
    padding: 10px 24px;
    display: block;
    color: #444444;
    font-size: 14px;
    transition: background 0.1s, color 0.1s;
}

.dropdown-menu li a:hover {
    background: #f3f4f6;
    color: #0176d3;
}

/* Derecha Header */
.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.btn-login {
    background-color: #0176d3;
    color: white;
    border: none;
    padding: 8px 30px;
    border-radius: 9999px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}

.btn-login:hover {
    background-color: #015ba7;
}

.lang-selector {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 15px;
    color: #161b1f;
    cursor: pointer;
}

.lang-selector:hover {
    color: #0176d3;
}

/* Mobile Hamburger - hidden on desktop */
.mobile-menu-trigger {
    display: none;
}

/* ===============================
   HERO / COMPACT (Portal de Certificados)
   =============================== */
.hero-section {
    background: linear-gradient(rgba(132, 175, 203, 0.8), rgba(95, 143, 172, 0.85)),
        url('https://images.unsplash.com/photo-1573164713714-d95e436ab8d6?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center 30%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.hero-title {
    color: #ffffff;
    font-size: 52px;
    font-weight: 400;
    text-align: center;
}

.hero-compact {
    height: 180px;
}

.hero-compact .hero-title {
    font-size: 34px;
    margin-bottom: 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* ===============================
   HOLD TIMES Y BREADCRUMBS
   =============================== */
.hold-times-bar {
    background-color: #ffffff;
    text-align: center;
    padding: 18px 20px;
    font-size: 14px;
    color: #161b1f;
    border-bottom: 1px solid #e1e3e5;
}

.label-bold {
    font-weight: 600;
}

.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px 30px 80px;
}

.breadcrumbs {
    font-size: 13px;
    color: #0176d3;
    margin-bottom: 30px;
}

.breadcrumbs a {
    font-weight: 600;
}

.breadcrumbs span {
    color: #161b1f;
}

.content-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 40px;
}

.content-header h2 {
    font-size: 26px;
    font-weight: 400;
    margin-bottom: 15px;
    color: #161b1f;
}

.content-header p {
    font-size: 15px;
    color: #4b4b4b;
    line-height: 1.6;
}

/* ===============================
   FORMULARIO DE VALIDACIÓN
   =============================== */
.verif-wrapper {
    max-width: 850px;
    margin: 0 auto;
}

.verif-card {
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    padding: 50px 60px;
    text-align: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.verif-icon-top svg {
    margin-bottom: 20px;
}

.verif-card h3 {
    font-size: 24px;
    color: #0176d3;
    margin-bottom: 10px;
}

.verif-card p {
    font-size: 15px;
    color: #6b7280;
    margin-bottom: 35px;
}

.form-group {
    text-align: left;
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #161b1f;
}

.form-group input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    font-size: 16px;
    outline: none;
    transition: 0.2s;
    font-family: inherit;
}

.form-group input:focus {
    border-color: #0176d3;
    box-shadow: 0 0 0 3px rgba(1, 118, 211, 0.1);
}

.btn-verify {
    background-color: #0176d3;
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    width: 100%;
    transition: background 0.2s;
    box-shadow: 0 4px 6px rgba(1, 118, 211, 0.2);
}

.btn-verify:hover {
    background-color: #015ba7;
    box-shadow: 0 6px 12px rgba(1, 118, 211, 0.3);
}

/* ===============================
   INTERFAZ LOADER
   =============================== */
.loader-container {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e1e4e8;
    padding: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #0176d3;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.loader-container p {
    color: #6b7280;
    font-size: 15px;
    font-weight: 600;
}

/* ===============================
   RESULTADO DEL CERTIFICADO (TAB 2)
   =============================== */
.result-card {
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e1e4e8;
    border-top: 6px solid #2e7d32;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    animation: slideUp 0.4s ease-out;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.result-badge {
    background-color: #e8f5e9;
    border-bottom: 1px solid #c8e6c9;
    padding: 15px 25px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.result-badge.valid svg {
    stroke: #2e7d32;
}

.result-badge.valid span {
    color: #1b5e20;
    font-weight: 700;
    font-size: 15px;
    letter-spacing: 0.5px;
}

/* Lado Central - Metadata Statement */
.result-p-wrap {
    padding: 35px 50px;
    background: #ffffff;
    text-align: center;
}

.official-acknowledgement {
    font-size: 16px;
    line-height: 1.7;
    color: #4b5563;
    max-width: 750px;
    margin: 0 auto;
}

.official-acknowledgement strong {
    color: #161b1f;
    font-weight: 700;
}

/* Lado Central - PDF CANVAS BORDER */
.pdf-canvas-container {
    background: #e2e8f0;
    padding: 40px;
    display: flex;
    justify-content: center;
    border-top: 1px solid #d1d5db;
    border-bottom: 1px solid #d1d5db;
}

#pdf-render {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid #cbd5e1;
    max-width: 100%;
    height: auto;
    border-radius: 2px;
}

.btn-secondary {
    background: transparent;
    color: #0176d3;
    font-weight: 600;
    border: none;
    padding: 10px 0;
    font-size: 15px;
    cursor: pointer;
    display: inline-block;
}

.btn-secondary:hover {
    text-decoration: underline;
}

/* ===============================
   RESTO (Help Banner & Footer)
   =============================== */
.help-banner {
    background-color: #0176d3;
    color: white;
    text-align: center;
    padding: 50px 20px;
}

.help-banner h2 {
    font-size: 26px;
    font-weight: 400;
    margin-bottom: 30px;
    letter-spacing: 0.5px;
}

.help-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.btn-white {
    background: white;
    color: #0176d3;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-white:hover {
    background: #f3f3f3;
}

.site-footer {
    background-color: #000000;
    color: white;
    padding-top: 60px;
}

.footer-logo-center {
    display: flex;
    justify-content: center;
    margin-bottom: 50px;
}

.footer-links-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 30px;
    padding: 0 40px;
    margin-bottom: 50px;
}

.footer-links-grid h4 {
    font-size: 16px;
    margin-bottom: 24px;
    font-weight: 600;
}

.footer-links-grid ul li {
    margin-bottom: 14px;
}

.footer-links-grid ul a {
    font-size: 14px;
    color: #cdcdcd;
    transition: 0.2s;
}

.footer-links-grid ul a:hover {
    color: white;
    text-decoration: underline;
}

.cookie-btn {
    display: inline-flex;
    align-items: center;
    background: #e2e2e2;
    color: #333;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    margin-top: 10px;
    cursor: pointer;
}

.cookie-btn span {
    color: #6bbb54;
    margin-right: 8px;
    font-size: 16px;
}

.footer-social {
    text-align: center;
    padding-bottom: 50px;
}

.footer-social a {
    display: inline-flex;
    margin: 0 12px;
    color: white;
}

.footer-social svg {
    fill: white;
    width: 22px;
    height: 22px;
    transition: opacity 0.2s;
}

.footer-social svg:hover {
    opacity: 0.7;
}

.footer-bottom {
    background-color: #222222;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-bottom p {
    color: #c4c4c4;
    font-size: 11px;
    line-height: 1.7;
    max-width: 750px;
}

.floating-btn {
    position: fixed;
    right: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: transform 0.2s;
}

.floating-btn:hover {
    transform: translateY(-2px);
}

.fb-up {
    bottom: 100px;
    width: 45px;
    height: 45px;
    background-color: white;
    border: 1px solid #e5e7eb;
}

.fb-help {
    bottom: 30px;
    width: 55px;
    height: 55px;
    background-color: #0176d3;
}

.fb-help:hover {
    background-color: #015ba7;
}

/* ===============================
   MOBILE MENU OVERLAY
   =============================== */
.mobile-menu-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #ffffff;
    z-index: 500;
    overflow-y: auto;
    flex-direction: column;
}

.mobile-menu-overlay.active {
    display: flex;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #333;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-menu-nav {
    flex: 1;
    padding: 0;
}

.mobile-menu-nav .mobile-nav-item {
    border-bottom: 1px solid #f0f0f0;
}

.mobile-menu-nav .mobile-nav-item>a,
.mobile-menu-nav .mobile-nav-item>button {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 16px 24px;
    font-size: 16px;
    font-weight: 400;
    color: #161b1f;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.mobile-menu-nav .mobile-nav-item>button svg {
    transition: transform 0.2s;
}

.mobile-menu-nav .mobile-nav-item>button.expanded svg {
    transform: rotate(180deg);
}

.mobile-submenu {
    display: none;
    background: #f9f9fb;
    padding: 0;
}

.mobile-submenu.open {
    display: block;
}

.mobile-submenu li a {
    display: block;
    padding: 12px 24px 12px 40px;
    font-size: 14px;
    color: #444;
    border-bottom: 1px solid #f0f0f0;
}

.mobile-submenu li a:hover {
    color: #0176d3;
    background: #f3f4f6;
}

/* ===============================
   MOBILE RESPONSIVE
   =============================== */
@media (max-width: 768px) {

    /* Topbar mobile */
    .motorola-topbar {
        height: 40px;
    }

    .topbar-container {
        padding: 0 16px;
    }

    .moto-logo-img {
        width: 191px;
        height: 23px;
    }

    .toolhub-logo-img {
        width: 111px;
        height: 32px;
    }

    /* Header mobile */
    .site-header {
        height: 60px;
    }

    .header-container {
        padding: 0 12px;
    }

    .avigilon-logo-img {
        width: 120px;
        height: 26px;
        object-fit: cover;
    }

    /* Hide desktop nav, show burger */
    .desktop-nav {
        display: none;
    }

    .lang-selector {
        display: none;
    }

    .mobile-menu-trigger {
        display: flex;
        flex-direction: column;
        justify-content: center;
        gap: 4px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
        width: 36px;
        height: 36px;
    }

    .mobile-menu-trigger span {
        display: block;
        width: 20px;
        height: 2px;
        background-color: #333333;
        border-radius: 1px;
    }

    /* Reorder header: burger | logo | login */
    .header-container {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .header-actions {
        gap: 10px;
    }

    .btn-login {
        padding: 6px 16px;
        font-size: 13px;
        width: 69px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    /* Hero */
    .hero-compact {
        height: 140px;
    }

    .hero-compact .hero-title {
        font-size: 22px;
        padding: 0 16px;
    }

    /* Hold times */
    .hold-times-bar {
        font-size: 12px;
        padding: 14px 16px;
    }

    /* Main content */
    .main-content {
        padding: 16px 16px 40px;
    }

    .breadcrumbs {
        font-size: 12px;
        margin-bottom: 20px;
    }

    .content-header h2 {
        font-size: 20px;
    }

    .content-header p {
        font-size: 13px;
    }

    /* Verif card */
    .verif-card {
        padding: 30px 20px;
    }

    .verif-card h3 {
        font-size: 20px;
    }

    .verif-card p {
        font-size: 13px;
        margin-bottom: 25px;
    }

    .form-group input {
        padding: 12px 16px;
        font-size: 14px;
    }

    .btn-verify {
        padding: 14px 20px;
        font-size: 15px;
    }

    /* Result */
    .result-p-wrap {
        padding: 20px 16px;
    }

    .official-acknowledgement {
        font-size: 14px;
    }

    .pdf-canvas-container {
        padding: 16px;
    }

    /* Help banner */
    .help-banner {
        padding: 30px 16px;
    }

    .help-banner h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }

    .help-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .btn-white {
        width: 100%;
        max-width: 280px;
    }

    /* Footer */
    .footer-logo-center {
        margin-bottom: 30px;
    }

    .footer-links-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
        padding: 0 16px;
        margin-bottom: 30px;
    }

    .footer-links-grid h4 {
        font-size: 14px;
        margin-bottom: 16px;
    }

    .footer-links-grid ul a {
        font-size: 12px;
    }

    .footer-links-grid ul li {
        margin-bottom: 10px;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px 16px;
    }

    .footer-moto-logo {
        width: 160px;
        height: auto;
    }

    .footer-social {
        padding-bottom: 30px;
    }

    /* Floating buttons */
    .fb-up {
        width: 38px;
        height: 38px;
        right: 16px;
        bottom: 80px;
    }

    .fb-help {
        width: 48px;
        height: 48px;
        right: 16px;
        bottom: 20px;
    }
}