/*
   Renovación visual 2026
   Capa de presentación aislada sobre el CSS histórico. No contiene reglas de
   negocio ni depende de IDs generados por ASP.NET Web Forms.
*/

:root {
    --acm-ink: #26282a;
    --acm-ink-soft: #45494d;
    --acm-accent: #f5a000;
    --acm-accent-dark: #c97f00;
    --acm-paper: #ffffff;
    --acm-canvas: #f3f1ed;
    --acm-line: #dedbd4;
    --acm-muted: #697077;
    --acm-success: #247a52;
    --acm-danger: #b42318;
    --acm-radius-sm: 10px;
    --acm-radius: 16px;
    --acm-radius-lg: 24px;
    --acm-shadow-sm: 0 6px 20px rgba(38, 40, 42, 0.07);
    --acm-shadow: 0 18px 45px rgba(38, 40, 42, 0.11);
    --acm-focus: 0 0 0 4px rgba(245, 160, 0, 0.28);
}

html {
    scroll-behavior: smooth;
}

body {
    color: var(--acm-ink);
    font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
    text-rendering: optimizeLegibility;
}

a,
button,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
    outline: 3px solid var(--acm-accent) !important;
    outline-offset: 3px;
    box-shadow: var(--acm-focus) !important;
}

.skip-link {
    position: fixed;
    top: 8px;
    left: 8px;
    z-index: 1100;
    padding: 0.7rem 1rem;
    border-radius: var(--acm-radius-sm);
    background: var(--acm-ink);
    color: #fff;
    transform: translateY(-160%);
    transition: transform 0.2s ease;
}

.skip-link:focus {
    color: #fff;
    transform: translateY(0);
}

/* Shell autenticado ------------------------------------------------------ */

.app-shell {
    min-height: 100vh;
    background: var(--acm-canvas);
}

.app-shell #form1 {
    min-height: 100vh;
}

.app-header {
    position: relative;
    min-height: 96px;
    border-bottom: 3px solid var(--acm-accent);
    background: linear-gradient(120deg, #202224 0%, #34383b 100%);
    box-shadow: 0 7px 24px rgba(0, 0, 0, 0.16);
}

.app-header__inner {
    display: grid;
    grid-template-columns: minmax(110px, 1fr) minmax(260px, 2fr) minmax(110px, 1fr);
    align-items: center;
    min-height: 96px;
    gap: 1rem;
}

.app-header__partner,
.app-header__actions {
    display: flex;
    align-items: center;
}

.app-header__actions {
    justify-content: flex-end;
}

.app-header__brand {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
}

.app-header__partner img,
.app-header__actions img {
    max-height: 38px;
    width: auto !important;
    object-fit: contain;
}

.app-header__brand img {
    max-width: min(100%, 390px);
    max-height: 76px;
    width: auto !important;
    height: auto !important;
    object-fit: contain;
}

.app-header .logout-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 50%;
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    transition: background-color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.app-header .logout-button:hover {
    border-color: var(--acm-accent);
    color: #fff;
    background: rgba(245, 160, 0, 0.2);
    transform: translateY(-1px);
}

.app-shell__main {
    width: min(100% - 2rem, 1240px);
    margin: 0 auto;
    padding: 1.25rem 0 2rem;
}

.app-nav-shell {
    position: sticky;
    top: 0.75rem;
    z-index: 1020;
    margin-bottom: 1.5rem;
    overflow: visible !important;
    border: 1px solid rgba(222, 219, 212, 0.9) !important;
    border-radius: var(--acm-radius) !important;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--acm-shadow-sm) !important;
    backdrop-filter: blur(12px);
}

.app-nav-shell .card-body,
.app-nav-shell .navbar {
    overflow: visible !important;
}

.app-nav-shell .navbar {
    min-height: 68px;
    padding: 0.45rem 0.7rem;
}

.app-nav-shell .navbar-brand {
    padding: 0.3rem 0.55rem;
    border-radius: 12px;
}

.app-nav-shell .navbar-brand img {
    width: auto;
    max-width: 64px;
    object-fit: contain;
}

.app-nav-shell .nav-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0.55rem 0.85rem !important;
    border: 0 !important;
    border-radius: 999px;
    color: var(--acm-ink-soft) !important;
    font-weight: 650;
    white-space: nowrap;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.app-nav-shell .nav-link:hover,
.app-nav-shell .nav-link.active,
.app-nav-shell .nav-link[aria-current="page"],
.app-nav-shell .nav-link[style*="font-weight:900"],
.app-nav-shell .nav-link[style*="font-weight: 900"] {
    color: var(--acm-ink) !important;
    background: rgba(245, 160, 0, 0.14);
    transform: none;
}

.app-nav-shell .dropdown-menu {
    min-width: 230px;
    padding: 0.55rem;
    border: 1px solid var(--acm-line) !important;
    border-radius: 14px;
    box-shadow: var(--acm-shadow) !important;
}

.app-nav-shell .dropdown-item {
    padding: 0.65rem 0.75rem;
    border-radius: 9px;
    color: var(--acm-ink-soft);
}

.app-nav-shell .dropdown-item:hover,
.app-nav-shell .dropdown-item.active,
.app-nav-shell .dropdown-item[aria-current="page"] {
    color: var(--acm-ink);
    background: rgba(245, 160, 0, 0.14);
}

.app-content {
    min-height: 50vh;
}

.app-shell .card:not(.app-nav-shell) {
    border: 1px solid rgba(222, 219, 212, 0.88) !important;
    border-radius: var(--acm-radius) !important;
    box-shadow: var(--acm-shadow-sm);
}

.app-shell .card:not(.app-nav-shell):hover {
    box-shadow: var(--acm-shadow-sm);
    transform: none;
}

.app-shell .card-header {
    border-color: var(--acm-line);
    border-radius: var(--acm-radius) var(--acm-radius) 0 0 !important;
}

.app-shell .btn-primary,
.public-home .btn-primary {
    border-color: var(--acm-ink);
    border-radius: 11px;
    background: var(--acm-ink);
    box-shadow: none;
}

.app-shell .btn-primary:hover,
.public-home .btn-primary:hover {
    border-color: #111;
    background: #111;
    box-shadow: 0 7px 18px rgba(38, 40, 42, 0.2);
    transform: translateY(-1px);
}

.app-shell .btn-outline-secondary {
    border-color: #aeb3b6;
    color: var(--acm-ink-soft) !important;
    background: #fff;
}

.app-shell .btn-outline-secondary:hover {
    border-color: var(--acm-ink) !important;
    color: #fff !important;
    background: var(--acm-ink) !important;
    transform: none;
}

.app-shell .form-control,
.app-shell .form-select,
.public-home .form-control {
    min-height: 46px;
    border-color: #c9c6bf;
    border-radius: 11px;
    background-color: #fff;
}

.app-shell .form-control:focus,
.app-shell .form-select:focus,
.public-home .form-control:focus {
    border-color: var(--acm-accent);
    box-shadow: var(--acm-focus);
}

/* Inicio autenticado ----------------------------------------------------- */

.app-shell .hero-banner {
    min-height: 390px;
    height: auto;
    border: 0;
    border-radius: var(--acm-radius-lg);
    box-shadow: var(--acm-shadow);
}

.app-shell .hero-banner::before {
    background: linear-gradient(90deg, rgba(20, 21, 22, 0.78), rgba(20, 21, 22, 0.38));
}

.app-shell .hero-content {
    max-width: 760px;
    margin: 0 auto;
}

.app-shell .hero-content h1 {
    font-size: clamp(2.1rem, 4.5vw, 3.7rem);
    letter-spacing: -0.035em;
}

.app-shell .pill-visual-non-interactive,
.app-shell .hero-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0.65rem 1.4rem;
    border: 1px solid rgba(255, 255, 255, 0.58);
    border-radius: 999px;
    color: #fff;
    background: rgba(22, 23, 24, 0.52);
    text-decoration: none;
    backdrop-filter: blur(8px);
}

.app-shell .hero-cta:hover {
    border-color: var(--acm-accent);
    color: #fff;
    background: rgba(245, 160, 0, 0.22);
}

.app-shell .specialty-item {
    border: 1px solid var(--acm-line);
    box-shadow: none;
}

/* Catálogo y muestrario ------------------------------------------------- */

.app-shell .filter-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.42rem;
}

.app-shell .filter-btn-group.btn-group > .btn,
.app-shell .filter-btn-group .btn {
    flex: 0 0 auto;
    min-height: 40px;
    margin: 0;
    padding: 0.48rem 0.78rem;
    border: 1px solid #b9bdc0;
    border-radius: 999px !important;
    color: var(--acm-ink-soft) !important;
    background: #fff;
    font-size: 0.93rem;
    font-weight: 650;
    line-height: 1.15;
    text-decoration: none !important;
    white-space: nowrap;
}

.app-shell .filter-btn-group .btn::after {
    display: none;
}

.app-shell .filter-btn-group .btn:hover,
.app-shell .filter-btn-group .btn.active,
.app-shell .filter-btn-group .btn[style*="font-weight:bold"],
.app-shell .filter-btn-group .btn[style*="font-weight: bold"] {
    border-color: var(--acm-ink) !important;
    color: #fff !important;
    background: var(--acm-ink) !important;
    box-shadow: none;
    text-decoration: none !important;
    transform: none;
}

.app-shell .filter-panel {
    overflow: hidden;
    border: 1px solid var(--acm-line);
    border-radius: var(--acm-radius);
    background: #f8f7f4;
    box-shadow: none;
}

.app-shell .filter-panel:hover {
    box-shadow: none;
    transform: none;
}

.app-shell .filter-panel::before {
    display: none;
}

.app-shell .pagination-controls .btn {
    width: 42px;
    height: 42px;
    border-radius: 50% !important;
}

.app-shell .pagination-count {
    min-width: 108px;
    color: var(--acm-ink-soft) !important;
    font-variant-numeric: tabular-nums;
}

.app-shell button[data-bs-img] {
    overflow: hidden;
    border-radius: 14px !important;
    background: #eceae5;
}

.app-shell button[data-bs-img] img {
    transition: transform 0.28s ease, filter 0.28s ease;
}

.app-shell button[data-bs-img]:hover img {
    filter: saturate(1.04) contrast(1.02);
    transform: scale(1.025);
}

.app-shell button[data-bs-img] + figcaption,
.app-shell figcaption {
    margin-top: 0.65rem !important;
    color: var(--acm-ink-soft) !important;
    font-size: 0.95rem !important;
    font-weight: 650;
}

.app-shell .modal-content {
    overflow: hidden;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.32);
}

.app-shell .modal-img {
    max-height: min(70vh, 760px);
    object-fit: contain;
    background: #f0efeb;
}

.app-shell .modal-footer {
    gap: 0.75rem;
    border-color: var(--acm-line);
}

.app-shell .modal-footer .btn:disabled {
    opacity: 0.42;
    cursor: not-allowed;
}

.app-shell .gallery-modal-info {
    color: var(--acm-muted);
    font-size: 0.9rem;
    font-weight: 650;
}

/* Footer ---------------------------------------------------------------- */

.app-footer {
    margin-top: 2rem;
    border-top: 3px solid var(--acm-accent);
    background: #252729;
    color: #fff;
}

.app-footer a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.08);
}

.app-footer a:hover {
    color: var(--acm-ink);
    background: var(--acm-accent);
}

.app-shell .back-to-top {
    width: 46px;
    height: 46px;
    background: var(--acm-accent);
    box-shadow: 0 9px 24px rgba(38, 40, 42, 0.25);
}

.app-shell .back-to-top:hover {
    color: #fff;
    background: var(--acm-accent-dark);
}

/* Portada pública ------------------------------------------------------- */

.public-home {
    background: #f5f3ef;
}

.public-home .header {
    border-bottom: 3px solid var(--acm-accent);
    background: linear-gradient(120deg, #202224 0%, #35383a 100%);
}

.public-home .hero-section {
    padding-block: clamp(2rem, 5vw, 4rem) !important;
    background:
        radial-gradient(circle at 15% 15%, rgba(245, 160, 0, 0.13), transparent 34%),
        linear-gradient(135deg, #fbfaf7, #efede8);
}

.public-home .hero-content {
    max-width: 720px;
    text-align: left;
}

.public-home .hero-content h1 {
    color: var(--acm-ink) !important;
    font-size: clamp(2.2rem, 5vw, 4.25rem);
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.public-home .login-card {
    overflow: visible !important;
    border: 1px solid rgba(222, 219, 212, 0.92) !important;
    border-radius: var(--acm-radius-lg) !important;
    box-shadow: var(--acm-shadow) !important;
}

.public-home .login-card .card-body {
    padding: 2.15rem !important;
}

.public-home .login-field .form-control {
    min-height: 58px;
    padding: 0.9rem 1rem;
    font-size: 1rem;
}

.public-home .login-field .form-control::placeholder {
    color: #747474;
    opacity: 0.78;
    transition: opacity 0.15s ease;
}

.public-home .login-field .form-control:focus::placeholder {
    opacity: 0;
}
.public-home .login-logo {
    border-color: var(--acm-line);
    background: #fff;
}

.public-home .showcase-section,
.public-home .tech-facilities-section,
.public-home .brands-section {
    padding-block: clamp(2.5rem, 6vw, 5rem) !important;
}

.public-home .section-title {
    color: var(--acm-ink);
    letter-spacing: -0.02em;
}

.public-home .footer {
    border-top: 3px solid var(--acm-accent);
    background: #252729;
}

/* Responsive ----------------------------------------------------------- */

@media (max-width: 991.98px) {
    .app-header__inner {
        grid-template-columns: 1fr minmax(180px, 2fr) 1fr;
    }

    .app-nav-shell {
        top: 0.4rem;
    }

    .app-nav-shell .navbar-collapse {
        padding: 0.7rem 0.25rem 0.35rem;
    }

    .app-nav-shell .nav-link {
        width: 100%;
        border-radius: 10px;
    }

    .app-nav-shell .dropdown-menu {
        border: 0 !important;
        box-shadow: none !important;
    }
}

@media (max-width: 767.98px) {
    .app-header {
        min-height: 84px;
    }

    .app-header__inner {
        grid-template-columns: 1fr auto;
        min-height: 84px;
        gap: 0.7rem;
    }

    .app-header__partner {
        display: none;
    }

    .app-header__brand {
        justify-content: flex-start;
    }

    .app-header__brand img {
        max-width: min(100%, 270px);
        max-height: 60px;
    }

    .app-header__actions img {
        display: none !important;
    }

    .app-shell__main {
        width: min(100% - 1rem, 1240px);
        padding-top: 0.7rem;
    }

    .app-nav-shell {
        margin-bottom: 1rem;
        border-radius: 13px !important;
    }

    .app-nav-shell .navbar {
        min-height: 60px;
    }

    .app-shell .hero-banner {
        min-height: 420px;
        border-radius: 16px;
    }

    .app-shell .hero-content {
        padding: 1.25rem;
    }

    .app-shell .filter-btn-group {
        width: 100%;
        gap: 0.38rem;
    }

    .app-shell .filter-btn-group .btn {
        flex: 1 1 calc(50% - 0.38rem);
        justify-content: center;
        min-width: 0;
        padding-inline: 0.5rem;
        white-space: normal;
    }

    .app-shell .filter-panel {
        padding: 1rem !important;
    }

    .app-shell .modal-dialog {
        margin: 0.5rem;
    }

    .app-shell .modal-footer {
        flex-wrap: nowrap;
        padding: 0.85rem;
    }

    .app-shell .modal-footer .btn {
        padding-inline: 0.8rem !important;
    }

    .public-home .hero-section {
        padding-block: 1.25rem 2.5rem !important;
    }

    .public-home .hero-content {
        padding: 0.75rem !important;
    }

    .public-home .login-card .card-body {
        padding: 1.35rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

