:root {
    --blue: #1e63d6;
    --blue-dark: #0f3e91;
    --black: #111111;
    --gray-bg: #f3f5f8;
    --white: #ffffff;
    --text: #1d2a3b;
    --bg-page: #E1EEFF;
    --bg-section: #E1EEFF;
    --bg-header: #E1EEFF;
    --bg-footer: #E1EEFF;
    --bg-card: #FFFFFF;
    --bg-card-alt: #FDFEFE;
    --heading-color: #0b1d39;
    --muted-text: #4f6079;
    --border-color: #d9e2f2;
    --link-color: var(--blue-dark);
    --nav-hover-bg: #e7efff;
    --pill-bg: #e7efff;
    --pill-text: #0f3e91;
    --table-head-bg: #edf3ff;
    --hero-overlay-start: rgba(11, 29, 57, 0.82);
    --hero-overlay-end: rgba(11, 29, 57, 0.4);
    --surface-muted: #f4f7ff;
    --accent-danger: #d91f2f;
    --font-body: "Source Sans 3", "Segoe UI", sans-serif;
    --font-heading: "Montserrat", "Segoe UI", sans-serif;
    --header-h: 96px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg-page);
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    margin-top: 0;
    color: var(--heading-color);
}

a {
    color: var(--link-color);
    text-decoration: none;
}

.container {
    width: min(1120px, 92%);
    margin: 0 auto;
}

.site-header {
    background: var(--bg-header);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 20;
}

.nav-wrap {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 1rem;
    align-items: center;
    padding: 0.8rem 0;
}

.brand {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    color: var(--heading-color);
    font-weight: 700;
}

.brand img, .footer-logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

nav {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.45rem;
    justify-content: center;
    align-items: center;
}

nav a {
    font-weight: 600;
    font-family: "Roboto Condensed", "Arial Narrow", "Segoe UI", sans-serif;
    font-size: 0.94rem;
    letter-spacing: 0.1px;
    line-height: 1.08;
    padding: 0.26rem 0.44rem;
    border-radius: 8px;
    white-space: nowrap;
}

nav a.active, nav a:hover {
    background: var(--nav-hover-bg);
    color: var(--blue-dark);
}

.portal-btn, .btn {
    display: inline-block;
    border-radius: 10px;
    padding: 0.65rem 1rem;
    font-weight: 700;
}

.portal-btn {
    font-family: "Roboto Condensed", "Arial Narrow", "Segoe UI", sans-serif;
    font-size: 0.98rem;
    letter-spacing: 0.1px;
    line-height: 1.08;
    white-space: nowrap;
}

.portal-btn, .btn.primary {
    background: var(--blue-dark);
    color: var(--white);
}

.btn.secondary {
    border: 1px solid var(--blue-dark);
    color: var(--blue-dark);
    background: var(--white);
}

.hero {
    position: relative;
    min-height: 62vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, var(--hero-overlay-start), var(--hero-overlay-end));
}

.hero-content {
    position: relative;
    color: var(--white);
    max-width: 650px;
    padding: 2rem 0;
    text-align: var(--align-hero);
}

.hero-content h1, .hero-content p {
    color: var(--white);
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.45);
}

.hero-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
}

body.theme-align-hero-center .hero-actions {
    justify-content: center;
}

body.theme-align-hero-right .hero-actions {
    justify-content: flex-end;
}

.quick-grid, .news-grid, .branch-grid, .event-grid, .benefit-grid {
    display: grid;
    gap: 1rem;
    margin: 2.2rem auto;
}

.quick-grid {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.news-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.branch-grid, .event-grid, .benefit-grid {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.card, .mini-card, .news-card, .installer {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 1rem;
}

.news-card {
    background: var(--bg-card-alt);
}

.news-list-grid {
    display: grid;
    gap: 1rem;
    margin: 2rem 0;
}

.news-list-card {
    display: grid;
    grid-template-columns: minmax(220px, 320px) 1fr;
    gap: 1rem;
    align-items: stretch;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
}

.news-list-card img {
    width: 100%;
    height: 100%;
    min-height: 210px;
    object-fit: cover;
    background: var(--surface-muted);
}

.news-list-card > div {
    padding: 1rem;
}

.news-detail {
    margin-top: 2rem;
}

.news-detail-image {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    background: var(--surface-muted);
}

.section-gray {
    background: var(--bg-section);
    padding: 2rem 0;
}

.mini-grid {
    display: grid;
    gap: 0.8rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.mini-card span {
    display: inline-block;
    margin-top: 0.3rem;
    color: var(--blue-dark);
    font-weight: 600;
}

.quick-grid .card {
    text-align: var(--align-quick-cards);
}

.news-card p,
.offer-body p,
.benefit-body p,
.timeline-item p,
.prose p {
    text-align: var(--align-content);
}

.container > h2,
.section-gray .container > h2,
.page-header h1,
.page-header p {
    text-align: var(--align-section-titles);
}

.page-header {
    padding: 2rem 0 1rem;
    background: var(--bg-section);
    border-bottom: 1px solid var(--border-color);
}

.split {
    display: grid;
    grid-template-columns: 1fr minmax(260px, 420px);
    gap: 1rem;
    align-items: center;
}

.split img {
    width: 100%;
    border-radius: 14px;
    border: 1px solid var(--border-color);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

th, td {
    padding: 0.7rem;
    border-bottom: 1px solid #e1e8f5;
    text-align: left;
    vertical-align: top;
}

th {
    background: var(--table-head-bg);
    color: var(--heading-color);
}

.pill {
    display: inline-block;
    background: var(--pill-bg);
    color: var(--pill-text);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
}

.offer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin: 1rem 0 2rem;
}

.offer-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.offer-media {
    position: relative;
    background: var(--surface-muted);
}

.offer-media img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.offer-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    background: var(--accent-danger);
    color: #fff;
    font-weight: 700;
    font-size: 0.8rem;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
}

.offer-body {
    padding: 0.9rem;
}

.offer-body h3 {
    margin: 0.45rem 0;
}

.offer-body p {
    margin: 0.35rem 0 0.7rem;
}

.offer-prices {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    margin-bottom: 0.45rem;
}

.offer-prices small {
    color: var(--muted-text);
}

.offer-prices strong {
    color: #0f3e91;
}

.offer-date {
    color: var(--muted-text);
}

.kit-school {
    text-align: center;
}

.kit-school .btn {
    margin: 0.5rem 0 1.2rem;
}

.kit-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.kit-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    padding: 0.8rem;
}

.kit-card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 10px;
    background: var(--surface-muted);
}

.kit-card h3 {
    margin: 0.7rem 0 0.2rem;
    font-size: 1rem;
}

.benefit-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.benefit-media img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    background: var(--surface-muted);
}

.benefit-body {
    padding: 0.9rem;
}

.timeline {
    margin: 2rem 0;
    border-left: 3px solid #bfd1f8;
    padding-left: 1rem;
    display: grid;
    gap: 1rem;
}

.timeline-item {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1rem;
}

.timeline-item span {
    color: var(--blue-dark);
    font-weight: 700;
}

.prose {
    margin-top: 2rem;
}

.narrow {
    width: min(640px, 92%);
}

.form-grid {
    display: grid;
    gap: 0.8rem;
}

input, button {
    font: inherit;
}

input {
    width: 100%;
    margin-top: 0.3rem;
    padding: 0.6rem 0.7rem;
    border-radius: 8px;
    border: 1px solid #c6d4ec;
}

.error, .ok {
    padding: 0.7rem;
    border-radius: 10px;
}

.error {
    background: #ffe8e8;
    color: #a10000;
}

.ok {
    background: #e8ffe8;
    color: #0a6f1a;
}

.dashboard-top {
    margin-top: 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 1rem;
    margin: 1rem 0 2rem;
}

.coupon {
    border: 1px dashed #9db7ed;
    padding: 0.8rem;
    border-radius: 10px;
    margin-bottom: 0.8rem;
    background: #f8fbff;
}

.portal-header {
    background: var(--bg-section);
}

.portal-dashboard .card,
.portal-benefits .benefit-card,
.portal-login .card {
    background: var(--bg-card);
    border-color: var(--border-color);
}

.portal-dashboard .coupon {
    border: 1px dashed var(--primary-dark);
    background: var(--surface-muted);
}

body.page-portal .dashboard-top h2,
body.page-portal .dashboard-top h3,
body.page-portal .card h3 {
    color: var(--heading-color);
}

body.page-portal .dashboard-top {
    text-align: var(--align-section-titles);
}

body.page-portal .dashboard-grid p,
body.page-portal .dashboard-grid td,
body.page-portal .dashboard-grid th {
    text-align: var(--align-content);
}

body.theme-layout-showcase.page-portal .portal-header {
    background:
        linear-gradient(135deg, var(--hero-overlay-start), var(--hero-overlay-end)),
        var(--bg-section);
    border-bottom: 1px solid var(--border-color);
}

body.theme-layout-showcase.page-portal .portal-header h1,
body.theme-layout-showcase.page-portal .portal-header p {
    color: var(--heading-color);
}

body.theme-layout-showcase.page-portal .portal-dashboard .card,
body.theme-layout-showcase.page-portal .portal-login .card {
    box-shadow: 0 14px 30px rgba(7, 12, 20, 0.18);
}

body.theme-layout-showcase.page-portal .dashboard-grid {
    gap: 1.2rem;
}

body.theme-layout-showcase.page-portal .portal-benefits {
    background: var(--bg-section);
}

.site-footer {
    background: var(--bg-footer);
    color: var(--text);
    margin-top: 2rem;
    padding: 2rem 0;
    border-top: 1px solid var(--border-color);
}

.site-footer a {
    display: block;
    color: var(--text);
    margin: 0.2rem 0;
}

.site-footer h4 {
    color: var(--heading-color);
}

.theme-selector-form {
    display: grid;
    gap: 0.45rem;
    max-width: 280px;
}

.theme-selector-form select {
    width: 100%;
    font: inherit;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.installer-wrap {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1rem;
    background: radial-gradient(circle at top left, #dbe7ff, #eef3fe 45%, #f7f9ff 100%);
}

.installer {
    width: min(780px, 96%);
}

.small {
    font-size: 0.88rem;
    color: #3e4f69;
}

.mt-2 {
    margin-top: 1.2rem;
}

body.theme-header-floating .site-header {
    background: var(--bg-header);
    box-shadow: 0 8px 24px rgba(11, 29, 57, 0.12);
    backdrop-filter: blur(6px);
}

body.theme-cards-square .quick-grid .card,
body.theme-cards-square .news-card,
body.theme-cards-square .mini-card,
body.theme-cards-square .offer-card,
body.theme-cards-square .benefit-card,
body.theme-cards-square .kit-card {
    border-radius: 4px;
}

body.theme-cards-organic .quick-grid .card {
    border-radius: 45% 55% 53% 47% / 39% 48% 52% 61%;
    padding: 1.4rem 1.1rem;
}

body.theme-cards-organic .quick-grid .card h3 {
    margin-top: 0.4rem;
}

body.theme-density-compact .quick-grid,
body.theme-density-compact .news-grid,
body.theme-density-compact .branch-grid,
body.theme-density-compact .event-grid,
body.theme-density-compact .benefit-grid {
    margin: 1.3rem auto;
    gap: 0.75rem;
}

body.theme-density-compact .section-gray {
    padding: 1.2rem 0;
}

body.theme-density-compact .card,
body.theme-density-compact .mini-card,
body.theme-density-compact .news-card {
    padding: 0.75rem;
}

body.theme-layout-showcase.page-inicio .site-header {
    position: absolute;
    left: 0;
    width: 100%;
    background: transparent;
    border-bottom: 0;
}

body.theme-layout-showcase.page-inicio .brand span,
body.theme-layout-showcase.page-inicio nav a {
    color: var(--heading-color);
    text-shadow: none;
}

body.theme-layout-showcase.page-inicio nav a.active,
body.theme-layout-showcase.page-inicio nav a:hover {
    background: var(--nav-hover-bg);
    color: var(--heading-color);
}

body.theme-layout-showcase.page-inicio .portal-btn {
    border: 1px solid var(--border-color);
    background: var(--bg-card);
    color: var(--heading-color);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.18);
}

body.theme-layout-showcase.page-inicio .hero {
    min-height: 80vh;
}

body.theme-layout-showcase.page-inicio .hero-content {
    margin: 0 auto;
    text-align: var(--align-hero);
    max-width: 820px;
    padding-top: calc(var(--header-h, 96px) + 1.25rem);
    padding-bottom: clamp(5.5rem, 10vh, 8rem);
    z-index: 6;
}

body.theme-layout-showcase.page-inicio .hero-content h1 {
    font-size: clamp(2rem, 4.4vw, 3.35rem);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

body.theme-layout-showcase.page-inicio .hero-actions {
    justify-content: flex-start;
}

body.theme-layout-showcase.page-inicio.theme-align-hero-right .hero-content {
    margin-left: auto;
    margin-right: 0;
}

body.theme-layout-showcase.page-inicio.theme-align-hero-center .hero-content {
    margin-left: auto;
    margin-right: auto;
}

body.theme-layout-showcase.page-inicio.theme-align-hero-left .hero-content {
    margin-left: 0;
    margin-right: auto;
}

body.theme-layout-showcase.page-inicio.theme-align-hero-center .hero-actions {
    justify-content: center;
}

body.theme-layout-showcase.page-inicio.theme-align-hero-right .hero-actions {
    justify-content: flex-end;
}

body.theme-layout-showcase.page-inicio .quick-grid {
    margin-top: -1.2rem;
    position: relative;
    z-index: 4;
}

body.theme-layout-showcase.page-inicio .quick-grid .card {
    box-shadow: 0 14px 30px rgba(8, 24, 52, 0.22);
}

@media (max-width: 960px) {
    .nav-wrap {
        grid-template-columns: 1fr;
        gap: 0.6rem;
        padding: 0.65rem 0;
    }
    nav {
        justify-content: flex-start;
        flex-wrap: wrap;
        gap: 0.45rem 0.65rem;
    }
    nav a {
        font-size: 1rem;
        line-height: 1.15;
        padding: 0.28rem 0.48rem;
    }
    .portal-btn {
        font-size: 1rem;
        line-height: 1.15;
        padding: 0.56rem 0.9rem;
    }
    .split, .dashboard-grid {
        grid-template-columns: 1fr;
    }
    .news-list-card {
        grid-template-columns: 1fr;
    }
    body.theme-layout-showcase.page-inicio .hero-content {
        padding-top: calc(var(--header-h, 120px) + 0.8rem);
        padding-bottom: 2rem;
    }
    body.theme-layout-showcase.page-inicio .quick-grid {
        margin-top: 0.8rem;
    }
    body.theme-cards-organic .quick-grid .card {
        border-radius: 22px;
    }
}

@media (max-width: 1200px) {
    nav a,
    .portal-btn {
        font-size: 0.92rem;
    }
}

@media (max-width: 820px) {
    nav a,
    .portal-btn {
        font-size: 0.86rem;
        line-height: 1.12;
    }
}
