* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --navy: #0f172a;
    --navy-soft: #1e2f5f;
    --blue: #1e3a8a;
    --gold: #facc15;
    --gold-dark: #eab308;
    --red: #b91c1c;
    --bg: #f5f7fb;
    --white: #ffffff;
    --text: #0f172a;
    --muted: #64748b;
    --border: #e2e8f0;
    --shadow: 0 12px 28px rgba(15, 23, 42, 0.10);

    /* Zonas seguras Android/iOS para que el contenido no quede bajo el reloj ni botones */
    --safe-top: env(safe-area-inset-top, 0px);
    --safe-bottom: env(safe-area-inset-bottom, 0px);
    --bottom-nav-height: 74px;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    width: 100%;
    max-width: 100%;
    min-height: 100vh;
    overflow-x: hidden;
}

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

button,
select,
input,
textarea {
    font-family: inherit;
}

.app-shell {
    width: 100%;
    min-height: 100vh;
    padding-bottom: calc(var(--bottom-nav-height) + var(--safe-bottom) + 14px);
    overflow-x: hidden;
}

/* ===============================
   MOBILE HEADER
================================ */

.mobile-header {
    width: 100%;
    min-height: calc(74px + var(--safe-top));
    background: var(--white);
    border-bottom: 1px solid var(--border);
    padding: calc(10px + var(--safe-top)) 14px 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.brand-logo img {
    height: 52px;
    width: auto;
    display: block;
}

.header-action {
    background: var(--navy);
    color: var(--white);
    padding: 9px 13px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
}

/* ===============================
   MAIN APP
================================ */

.app-main {
    width: 100%;
}

/* ===============================
   HERO
================================ */

.app-hero {
    padding: 12px 8px 10px;
    background:
        linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(30, 58, 138, 0.96));
}

.hero-card {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 22px;
    padding: 18px 14px;
    color: var(--white);
    box-shadow: var(--shadow);
}

.app-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(250, 204, 21, 0.15);
    border: 1px solid rgba(250, 204, 21, 0.35);
    color: var(--gold);
    padding: 7px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    margin-bottom: 14px;
}

.hero-card h1 {
    font-size: 27px;
    line-height: 1.13;
    letter-spacing: -0.5px;
    margin-bottom: 12px;
}

.hero-card p {
    font-size: 15px;
    color: #e2e8f0;
    margin-bottom: 18px;
}

/* ===============================
   QUICK SEARCH
================================ */

.quick-search {
    background: var(--white);
    border-radius: 22px;
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.input-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.input-group label {
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.input-group select,
.input-group input {
    width: 100%;
    height: 48px;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 0 13px;
    background: var(--white);
    color: var(--text);
    font-size: 15px;
}

.btn-main {
    width: 100%;
    height: 52px;
    border: none;
    border-radius: 16px;
    background: var(--gold);
    color: var(--navy);
    font-size: 16px;
    font-weight: 900;
    cursor: pointer;
    margin-top: 2px;
    box-shadow: 0 10px 18px rgba(250, 204, 21, 0.25);
}

/* ===============================
   ACCESS
================================ */

.access-section {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 20px 14px 8px;
}

.access-section h2,
.categories-mobile h2 {
    font-size: 20px;
    margin-bottom: 12px;
    letter-spacing: -0.2px;
}

.access-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.access-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px 13px;
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.access-card.featured {
    border-color: rgba(250, 204, 21, 0.65);
    background: #fffbeb;
}

.access-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.access-card strong {
    font-size: 15px;
    line-height: 1.2;
    margin-bottom: 5px;
}

.access-card small {
    color: var(--muted);
    font-size: 12px;
}

/* ===============================
   CATEGORIES
================================ */

.categories-mobile {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 16px 14px 8px;
}

.section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.section-head h2 {
    margin-bottom: 0;
}

.section-head a {
    font-size: 13px;
    font-weight: 800;
    color: var(--blue);
}

.category-list {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 8px;
    scrollbar-width: none;
}

.category-list::-webkit-scrollbar {
    display: none;
}

.category-pill {
    min-width: 132px;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 12px;
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
}

.category-pill span {
    font-size: 25px;
}

/* ===============================
   PROMO
================================ */

.promo-card {
    width: calc(100% - 28px);
    max-width: 560px;
    margin: 18px auto 26px;
    padding: 20px;
    border-radius: 24px;
    background: var(--navy);
    color: var(--white);
    box-shadow: var(--shadow);
}

.promo-card span {
    color: var(--gold);
    font-weight: 900;
    font-size: 13px;
}

.promo-card h2 {
    font-size: 22px;
    margin: 6px 0 8px;
}

.promo-card p {
    color: #cbd5e1;
    font-size: 14px;
    margin-bottom: 16px;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 50px;
    background: var(--gold);
    color: var(--navy);
    border-radius: 16px;
    font-weight: 900;
}

/* ===============================
   BOTTOM NAV
================================ */

.bottom-nav {
    width: 100%;
    min-height: calc(var(--bottom-nav-height) + var(--safe-bottom));
    background: var(--white);
    border-top: 1px solid var(--border);
    position: fixed;
    left: 0;
    bottom: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    padding: 6px 8px calc(8px + var(--safe-bottom));
    box-shadow: 0 -10px 25px rgba(15, 23, 42, 0.08);
}

.bottom-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: #64748b;
    border-radius: 16px;
    font-weight: 800;
}

.bottom-item span {
    font-size: 21px;
    line-height: 1;
}

.bottom-item small {
    font-size: 11px;
}

.bottom-item.active {
    color: var(--navy);
    background: #f1f5f9;
}

/* ===============================
   DESKTOP ADAPTATION
================================ */

@media (min-width: 768px) {
    body {
        background: #e5e7eb;
    }

    .app-shell {
        max-width: 430px;
        margin: 0 auto;
        background: var(--bg);
        min-height: 100vh;
        box-shadow: 0 0 35px rgba(15, 23, 42, 0.16);
        position: relative;
    }

    .mobile-header,
    .bottom-nav {
        max-width: 430px;
        left: 50%;
        transform: translateX(-50%);
    }

    .hero-card h1 {
        font-size: 30px;
    }
}

@media (max-width: 370px) {
    .brand-logo img {
        height: 45px;
    }

    .header-action {
        font-size: 12px;
        padding: 8px 10px;
    }

    .hero-card h1 {
        font-size: 24px;
    }

    .access-card {
        min-height: 124px;
        padding: 14px 11px;
    }
}
/* ===============================
   INTERNAL MOBILE PAGES
================================ */

.page-screen {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 18px 14px 26px;
}

.page-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 26px;
    padding: 22px 18px;
    box-shadow: var(--shadow);
}

.app-badge.dark {
    background: #eff6ff;
    color: var(--blue);
    border: 1px solid #bfdbfe;
}

.page-card h1 {
    font-size: 28px;
    line-height: 1.15;
    letter-spacing: -0.4px;
    margin: 14px 0 10px;
    color: var(--navy);
}

.page-description {
    color: var(--muted);
    font-size: 15px;
    margin-bottom: 18px;
}

.app-form {
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.input-group textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 14px;
    padding: 13px;
    background: var(--white);
    color: var(--text);
    font-size: 15px;
    resize: vertical;
    min-height: 110px;
}

.form-links {
    margin-top: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: center;
}

.form-links a {
    color: var(--blue);
    font-weight: 800;
    font-size: 14px;
}

.empty-state {
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 22px;
    padding: 24px 16px;
    text-align: center;
    margin: 18px 0;
}

.empty-state span {
    font-size: 38px;
    display: block;
    margin-bottom: 8px;
}

.empty-state h2 {
    font-size: 20px;
    margin-bottom: 6px;
    color: var(--navy);
}

.empty-state p {
    color: var(--muted);
    font-size: 14px;
}

.link-btn {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===============================
   RESULTS
================================ */

.results-section {
    width: 100%;
    max-width: 560px;
    margin: 0 auto;
    padding: 0 14px 28px;
}

.results-section h2 {
    font-size: 20px;
    margin: 4px 0 12px;
    color: var(--navy);
}

.provider-result {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 24px;
    padding: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
}

.provider-top {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 12px;
}

.provider-avatar {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.provider-top h3 {
    font-size: 17px;
    color: var(--navy);
}

.provider-top p,
.provider-description {
    color: var(--muted);
    font-size: 14px;
}

.provider-description {
    margin-bottom: 14px;
}

.provider-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.btn-whatsapp,
.btn-profile {
    height: 44px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    font-size: 14px;
}

.btn-whatsapp {
    background: #22c55e;
    color: white;
}

.btn-profile {
    background: #f1f5f9;
    color: var(--navy);
}
/* ===============================
   ALERTS
================================ */

.alert {
    width: 100%;
    padding: 13px 14px;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 16px;
}

.alert.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #86efac;
}

.alert.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}
/* ===============================
   PANEL ACTIONS
================================ */

.panel-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.panel-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 16px;
    display: grid;
    grid-template-columns: 44px 1fr;
    column-gap: 12px;
    align-items: center;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.panel-card span {
    width: 44px;
    height: 44px;
    border-radius: 16px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
    grid-row: span 2;
}

.panel-card strong {
    color: var(--navy);
    font-size: 16px;
    line-height: 1.2;
}

.panel-card small {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.3;
}

.panel-card.danger span {
    background: #fee2e2;
}
/* ===============================
   PROFESSIONAL PANEL
================================ */

.alert.warning {
    background: #fef9c3;
    color: #854d0e;
    border: 1px solid #fde68a;
}

.profile-summary {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 14px;
    margin: 18px 0 6px;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid #e2e8f0;
}

.summary-row:last-child {
    border-bottom: none;
}

.summary-row strong {
    color: var(--navy);
    font-size: 14px;
}

.summary-row span {
    color: var(--muted);
    font-size: 14px;
    text-align: right;
}
/* ===============================
   ADMIN
================================ */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 18px 0;
}

.stat-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 14px 8px;
    text-align: center;
}

.stat-card strong {
    display: block;
    font-size: 24px;
    color: var(--navy);
    line-height: 1;
    margin-bottom: 6px;
}

.stat-card span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.admin-provider-card {
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 15px;
}

.profile-summary.compact {
    margin: 12px 0;
    padding: 10px 12px;
}

.profile-summary.compact .summary-row {
    padding: 8px 0;
}
/* =========================================================
   AJUSTE APP ANDROID - TU SERVICIO AHORA
   Pegar al final de:
   /public_html/assets/css/styles.css

   Objetivo:
   reducir márgenes laterales y evitar que el contenido se sienta
   fuera de pantalla dentro del WebView Android.
========================================================= */

@media (max-width: 520px) {
    html,
    body {
        width: 100%;
        max-width: 100%;
        margin: 0;
        padding: 0;
        overflow-x: hidden;
    }

    * {
        box-sizing: border-box;
    }

    .app-main,
    .page-screen,
    main {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding-left: 10px;
        padding-right: 10px;
    }

    .page-card,
    .home-card,
    .provider-card,
    .provider-result,
    .opportunity-card,
    .results-section,
    .profile-summary,
    .panel-actions,
    .app-form {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }

    .page-card,
    .home-card,
    .provider-card,
    .provider-result,
    .opportunity-card {
        border-radius: 22px;
    }

    .app-header,
    .mobile-header,
    header {
        width: 100%;
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
        padding-left: 10px;
        padding-right: 10px;
    }

    img,
    video,
    iframe {
        max-width: 100%;
        height: auto;
    }

    select,
    input,
    textarea,
    button {
        max-width: 100%;
    }
}

@media (max-width: 390px) {
    .app-main,
    .page-screen,
    main {
        padding-left: 8px;
        padding-right: 8px;
    }

    .page-card,
    .home-card,
    .provider-card,
    .provider-result,
    .opportunity-card {
        padding-left: 14px;
        padding-right: 14px;
    }
}


/* =========================================================
   PARCHE URGENTE SAFE AREA ANDROID - TU SERVICIO AHORA
   Mantiene header y barra inferior fuera del reloj/notch y
   fuera de los botones de navegación del teléfono.
========================================================= */

@supports (padding: max(0px)) {
    .mobile-header {
        padding-top: max(10px, calc(10px + env(safe-area-inset-top)));
        padding-left: max(12px, env(safe-area-inset-left));
        padding-right: max(12px, env(safe-area-inset-right));
    }

    .bottom-nav {
        padding-bottom: max(10px, calc(8px + env(safe-area-inset-bottom)));
        padding-left: max(8px, env(safe-area-inset-left));
        padding-right: max(8px, env(safe-area-inset-right));
    }

    .app-shell {
        padding-bottom: max(92px, calc(88px + env(safe-area-inset-bottom)));
    }
}

@media (max-width: 520px) {
    .app-main,
    main {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .app-hero {
        padding-left: 8px;
        padding-right: 8px;
    }

    .page-screen,
    .results-section,
    .access-section,
    .categories-mobile {
        padding-left: 10px;
        padding-right: 10px;
    }

    .page-card,
    .provider-result,
    .opportunity-card,
    .profile-summary,
    .panel-actions,
    .app-form {
        max-width: 100%;
    }

    .mobile-header {
        min-height: calc(74px + env(safe-area-inset-top, 0px));
    }

    .bottom-nav {
        min-height: calc(74px + env(safe-area-inset-bottom, 0px));
    }
}

@media (max-width: 370px) {
    .app-hero {
        padding-left: 6px;
        padding-right: 6px;
    }

    .hero-card,
    .page-card {
        padding-left: 12px;
        padding-right: 12px;
    }
}


/* ===============================
   TSA 2.0 - IA BASE Y PRODUCCIÓN
================================ */
.ai-card {
    width: calc(100% - 24px);
    max-width: 560px;
    margin: 18px auto;
    padding: 18px;
    border-radius: 26px;
    background: linear-gradient(135deg, #ffffff, #f8fbff);
    border: 1px solid #dbeafe;
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.10);
    overflow: hidden;
}

.ai-card.compact {
    margin-top: 0;
}

.ai-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 11px;
    border-radius: 999px;
    background: #eef2ff;
    color: #1e3a8a;
    font-size: 12px;
    font-weight: 900;
    border: 1px solid #c7d2fe;
    margin-bottom: 10px;
}

.ai-card h2 {
    margin: 0 0 8px;
    color: #0f172a;
    font-size: 22px;
    line-height: 1.15;
    letter-spacing: -0.3px;
}

.ai-card p {
    margin: 0 0 14px;
    color: #64748b;
    font-size: 14px;
    line-height: 1.45;
}

.ai-form {
    display: grid;
    gap: 10px;
}

.ai-form textarea {
    width: 100%;
    min-height: 86px;
    resize: vertical;
    border: 1px solid #cbd5e1;
    border-radius: 18px;
    padding: 13px;
    background: #ffffff;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.45;
}

.ai-form textarea:focus,
.input-group select:focus,
.input-group input:focus {
    outline: 3px solid rgba(37, 99, 235, 0.16);
    border-color: #2563eb;
}

.ai-result {
    margin-top: 12px;
    padding: 14px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 14px;
    line-height: 1.45;
}

.ai-result strong {
    color: #0f172a;
}

.ai-result .ai-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    margin-top: 12px;
}

.ai-result .ai-actions a,
.ai-result .ai-actions button {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    border-radius: 15px;
    border: 0;
    text-decoration: none;
    font-weight: 900;
    cursor: pointer;
}

.ai-result .ai-actions a {
    background: #facc15;
    color: #0f172a;
}

.ai-result .ai-actions button {
    background: #ffffff;
    color: #1e3a8a;
    border: 1px solid #bfdbfe;
}

.ai-inline-note {
    border: 1px solid #bfdbfe;
    background: #eff6ff;
    color: #1e3a8a;
    border-radius: 16px;
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.35;
}

@supports (padding: max(0px)) {
    .mobile-header {
        padding-top: max(12px, env(safe-area-inset-top));
    }

    .bottom-nav {
        padding-bottom: max(8px, env(safe-area-inset-bottom));
    }
}

@media (min-width: 720px) {
    .ai-result .ai-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* =========================================================
   TSA 2.0.1 - MODO PORTAL WEB + MODO APP
   Objetivo: que el mismo subdominio funcione como app móvil
   y también como portal web centrado en escritorio.
========================================================= */

:root {
    --portal-max: 1180px;
}

@media (min-width: 900px) {
    html,
    body {
        width: 100%;
        min-height: 100%;
        background: #f8fafc;
        overflow-x: hidden;
    }

    body {
        display: block;
    }

    .app-shell {
        width: 100%;
        max-width: none;
        min-height: 100vh;
        margin: 0;
        padding-bottom: 40px;
        background: #f8fafc;
        box-shadow: none;
        position: relative;
    }

    .mobile-header {
        width: 100%;
        max-width: none;
        left: auto;
        right: auto;
        transform: none;
        min-height: 82px;
        padding-top: 14px;
        padding-bottom: 14px;
        padding-left: max(32px, calc((100vw - var(--portal-max)) / 2));
        padding-right: max(32px, calc((100vw - var(--portal-max)) / 2));
        border-bottom: 1px solid #e2e8f0;
        box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
    }

    .brand-logo img {
        height: 58px;
    }

    .header-action {
        min-height: 44px;
        padding: 11px 22px;
        font-size: 15px;
    }

    .bottom-nav {
        display: none;
    }

    .app-main {
        width: 100%;
        max-width: none;
        margin: 0;
        padding: 0;
    }

    .app-hero {
        width: 100%;
        padding: 42px max(32px, calc((100vw - var(--portal-max)) / 2));
    }

    .hero-card {
        width: 100%;
        max-width: var(--portal-max);
        min-height: 520px;
        margin: 0 auto;
        padding: 44px;
        border-radius: 34px;
        display: grid;
        grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
        column-gap: 34px;
        row-gap: 16px;
        align-items: center;
    }

    .hero-card > .app-badge,
    .hero-card > h1,
    .hero-card > p,
    .hero-card > div:not([style*="position:absolute"]) {
        grid-column: 1;
        align-self: start;
    }

    .hero-card > form.quick-search {
        grid-column: 2;
        grid-row: 1 / span 5;
        align-self: center;
        min-height: auto;
        padding: 24px;
        border-radius: 28px;
        box-shadow: 0 22px 45px rgba(15, 23, 42, 0.18);
    }

    .hero-card h1 {
        max-width: 640px;
        font-size: clamp(38px, 4vw, 58px);
        line-height: 1.05;
        letter-spacing: -1.4px;
    }

    .hero-card p {
        max-width: 620px;
        font-size: 19px;
        line-height: 1.55;
    }

    .app-main > section:not(.app-hero) {
        width: min(var(--portal-max), calc(100% - 64px)) !important;
        max-width: var(--portal-max) !important;
        margin-left: auto !important;
        margin-right: auto !important;
    }

    .access-section,
    .categories-mobile,
    .results-section,
    .page-screen,
    .promo-card,
    .ai-card {
        max-width: var(--portal-max) !important;
    }

    .access-section,
    .categories-mobile,
    .results-section,
    .page-screen {
        padding-left: 0;
        padding-right: 0;
    }

    .access-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 18px;
    }

    .access-card {
        min-height: 160px;
        padding: 24px;
    }

    .access-card strong {
        font-size: 20px;
    }

    .access-card small {
        font-size: 15px;
    }

    .category-list {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 16px;
        overflow: visible;
        padding-bottom: 0;
    }

    .category-pill {
        min-width: 0;
        min-height: 132px;
        padding: 22px;
        border-radius: 24px;
        font-size: 18px;
    }

    .ai-card {
        width: min(var(--portal-max), calc(100% - 64px)) !important;
        display: grid;
        grid-template-columns: minmax(0, 0.85fr) minmax(360px, 1.15fr);
        gap: 20px 32px;
        padding: 32px;
    }

    .ai-card .ai-badge,
    .ai-card h2,
    .ai-card > p {
        grid-column: 1;
    }

    .ai-card h2 {
        font-size: 34px;
    }

    .ai-card > p {
        font-size: 17px;
    }

    .ai-form,
    .ai-result {
        grid-column: 2;
    }

    .promo-card {
        width: min(var(--portal-max), calc(100% - 64px)) !important;
        display: grid;
        grid-template-columns: 1fr auto;
        align-items: center;
        gap: 24px;
        padding: 32px;
    }

    .promo-card .btn-secondary {
        width: auto;
        min-width: 230px;
        padding: 0 24px;
    }

    .page-screen {
        width: min(980px, calc(100% - 64px));
        padding-top: 34px;
        padding-bottom: 48px;
    }

    .page-card {
        padding: 34px;
        border-radius: 32px;
    }
}

@media (min-width: 900px) and (max-width: 1120px) {
    .hero-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }

    .hero-card > form.quick-search {
        grid-column: 1;
        grid-row: auto;
    }

    .ai-card {
        grid-template-columns: 1fr;
    }

    .ai-form,
    .ai-result {
        grid-column: 1;
    }

    .category-list,
    .access-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}


/* =========================================================
   TSA 2.0.2 - CENTRADO REAL DE PÁGINAS INTERIORES
   Corrige conflicto: main.app-main.page-screen heredaba margin:0
   desde .app-main en escritorio y se pegaba a la izquierda.
========================================================= */

@media (min-width: 900px) {
    main.app-main.page-screen,
    .app-main.page-screen,
    .page-screen {
        width: min(980px, calc(100% - 64px)) !important;
        max-width: 980px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-top: 34px;
        padding-bottom: 48px;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    main.app-main.page-screen .page-card,
    .app-main.page-screen .page-card,
    .page-screen .page-card {
        width: 100%;
        max-width: 100%;
        margin-left: auto !important;
        margin-right: auto !important;
        padding: 34px;
        border-radius: 32px;
    }

    .results-section,
    .access-section,
    .categories-mobile,
    .ai-card,
    .promo-card {
        margin-left: auto !important;
        margin-right: auto !important;
    }
}

@media (min-width: 1200px) {
    main.app-main.page-screen,
    .app-main.page-screen,
    .page-screen {
        max-width: 1040px !important;
        width: min(1040px, calc(100% - 96px)) !important;
    }
}
