/* ==========================================================================
   Pages — Page-Specific Layout Styles
   Euroaccounts WordPress Theme

   NOTE: Component styles (.btn, .service-card, .blog-card, .caso-card,
   .timeline, .faq-*, .form-lead, .cta-inline, .check-list, .stat-card,
   .logos-grid, .erp-grid, .equipo-card, .badges, .label, .section-label)
   live in components.css. This file handles page layout and page-specific
   structure only.
   ========================================================================== */


/* ==========================================================================
   1. HEADER & NAVIGATION
   ========================================================================== */

/* --- Topbar --- */
.topbar {
    background: var(--color-bg-darker);
    color: var(--color-text-inverse);
    font-family: var(--font-label);
    font-size: var(--text-xs);
    letter-spacing: 0.03em;
    padding: var(--space-xs) 0;
}

.topbar__left,
.topbar__right {
    display: flex;
    gap: var(--space-md);
    align-items: center;
}

.topbar__link {
    color: var(--color-text-inverse);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.35em;
    transition: color var(--transition);
}

.topbar__link:hover {
    color: var(--color-accent-light);
}

.topbar__link--phone,
.topbar__link--email {
    white-space: nowrap;
}

/* Language switcher */
.lang-switcher__list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: var(--space-xs);
}

.lang-switcher__link {
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    font-weight: var(--fw-medium);
    text-transform: uppercase;
    padding: 2px 6px;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    font-size: var(--text-xs);
}

.lang-switcher__link:hover,
.lang-switcher__link.is-active {
    color: var(--color-text-inverse);
    background: rgba(255, 255, 255, 0.1);
}

/* --- Site Header (sticky wrapper) --- */
.site-header {
    position: sticky;
    top: 0;
    z-index: var(--z-header);
    background: var(--color-bg);
    box-shadow: var(--shadow-sm);
}

/* --- Site Nav --- */
.site-nav {
    background: var(--color-bg);
    padding: 0;
}

.site-nav > .container {
    height: 72px;
}

.site-nav__brand {
    flex-shrink: 0;
}

.site-nav__brand a {
    display: block;
}

.site-nav__brand img,
.site-nav__brand .custom-logo {
    height: 56px;
    width: auto;
    display: block;
}

/* Menu list */
.site-nav__list,
#menu-menu-principal {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--space-xs);
    align-items: center;
}

.nav__item {
    position: relative;
}

.nav__link {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
    padding: var(--space-xs) var(--space-sm);
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
    cursor: pointer;
    background: none;
    border: none;
    white-space: nowrap;
}

.nav__link:hover,
.nav__item.current-menu-item > .nav__link {
    color: var(--color-primary);
    background: var(--color-bg-light);
}

/* Parent link (button for megamenu) */
.nav__link--parent::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    margin-left: 4px;
    transition: transform var(--transition);
}

.nav__item--has-megamenu:hover .nav__link--parent::after,
.nav__item--has-megamenu:focus-within .nav__link--parent::after {
    transform: rotate(180deg);
}

/* Site nav actions (desktop CTA button) */
.site-nav__actions {
    flex-shrink: 0;
}

.site-nav__actions .btn {
    white-space: nowrap;
}

/* --- Megamenu Panel --- */
.megamenu__panel {
    display: none;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    min-width: 280px;
    background: var(--color-bg);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-md);
    z-index: var(--z-dropdown);
}

.nav__item--has-megamenu:hover > .megamenu__panel,
.nav__item--has-megamenu:focus-within > .megamenu__panel {
    display: block;
}

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

.megamenu__links .nav__item {
    list-style: none;
}

.megamenu__links .nav__item + .nav__item {
    margin-top: 2px;
}

.megamenu__link {
    display: block;
    padding: var(--space-xs) var(--space-sm);
    font-family: var(--font-body);
    font-size: var(--text-sm);
    font-weight: var(--fw-regular);
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: color var(--transition), background var(--transition);
}

.megamenu__link:hover {
    color: var(--color-primary);
    background: var(--color-bg-light);
}

/* --- Hamburger (Mobile) --- */
.site-nav__toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-xs);
    z-index: calc(var(--z-offcanvas) + 1);
    flex-direction: column;
    gap: 5px;
}

.site-nav__toggle-bar {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-secondary);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

/* --- Mobile-only elements: hidden on desktop --- */
.site-nav__mobile-actions {
    display: none;
    align-items: center;
    gap: var(--space-sm);
}

.site-nav__call-btn {
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
}

/* --- Off-canvas Mobile Menu --- */
.offcanvas {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    width: 320px;
    height: 100vh;
    background: var(--color-bg);
    z-index: var(--z-offcanvas);
    transform: translateX(100%);
    transition: transform var(--transition-slow);
    overflow-y: auto;
    box-shadow: var(--shadow-lg);
    flex-direction: column;
}

.offcanvas__backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: calc(var(--z-offcanvas) - 1);
}

.offcanvas.is-open {
    transform: translateX(0);
}

/* Offcanvas header */
.offcanvas__header {
    padding: var(--space-md);
    border-bottom: 1px solid var(--color-border-light);
    flex-shrink: 0;
}

.offcanvas__brand img,
.offcanvas__brand .custom-logo {
    height: 36px;
    width: auto;
}

.offcanvas__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text);
    transition: background var(--transition);
}

.offcanvas__close:hover {
    background: var(--color-bg-light);
}

/* Offcanvas body */
.offcanvas__body {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-sm) var(--space-md);
}

/* Offcanvas menu items */
.offcanvas ul,
.offcanvas__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.offcanvas .nav__item {
    border-bottom: 1px solid var(--color-border-light);
}

.offcanvas .nav__link {
    display: block;
    padding: var(--space-sm) var(--space-xs);
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--fw-semibold);
    color: var(--color-secondary);
    text-decoration: none;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.offcanvas .nav__link--parent {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.offcanvas .nav__link--parent::after {
    transition: transform var(--transition);
}

.offcanvas .nav__item--has-megamenu[aria-expanded="true"] .nav__link--parent::after {
    transform: rotate(180deg);
}

/* Sub-menu inside offcanvas (accordion) */
.offcanvas .megamenu__panel {
    display: none;
    position: static;
    transform: none;
    box-shadow: none;
    border-radius: 0;
    padding: 0 0 var(--space-sm);
    min-width: auto;
    background: transparent;
}

.offcanvas .megamenu__panel .megamenu__links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.offcanvas .megamenu__panel .megamenu__link {
    display: block;
    padding: var(--space-xs) var(--space-md);
    font-family: var(--font-body);
    font-size: var(--text-base);
    font-weight: var(--fw-regular);
    color: var(--color-text);
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.offcanvas .megamenu__panel .megamenu__link:hover {
    background: var(--color-bg-light);
    color: var(--color-primary);
}

/* Offcanvas CTA */
.offcanvas__cta {
    margin-top: var(--space-md);
}

/* Offcanvas footer (language switcher) */
.offcanvas__footer {
    padding: var(--space-md);
    border-top: 1px solid var(--color-border-light);
    flex-shrink: 0;
}

/* --- Mobile Sticky CTA --- */
.mobile-cta {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: var(--z-sticky-cta);
    background: var(--color-accent);
    text-align: center;
    padding: var(--space-sm) var(--space-md);
    box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
}

.mobile-cta a {
    color: var(--color-secondary);
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: var(--fw-bold);
    text-decoration: none;
}


/* ==========================================================================
   2. FOOTER
   ========================================================================== */

.site-footer {
    padding-top: 0;
}

.site-footer .section {
    padding-bottom: 0;
}

/* Footer grid (uses .footer-grid.grid.grid--4) */
.footer-grid {
    padding-bottom: var(--space-xl);
}

.footer-grid__col {
    min-width: 0;
}

.footer-grid__title {
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: var(--fw-bold);
    margin-bottom: var(--space-md);
    color: var(--color-accent);
}

.footer-grid__text {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.75);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-md);
}

/* Footer contact block */
.footer-contact {
    font-style: normal;
}

.footer-contact__address {
    font-size: var(--text-sm);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-sm);
    color: rgba(255, 255, 255, 0.75);
}

.footer-contact__item {
    font-size: var(--text-sm);
    margin-bottom: var(--space-xs);
}

.footer-contact__item a {
    color: var(--color-text-inverse);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-contact__item a:hover {
    color: var(--color-accent-light);
}

.footer-contact__hours {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.6);
    margin-top: var(--space-sm);
}

/* Footer links list */
.footer-links {
    list-style: none;
    margin: 0;
    padding: 0;
}

.footer-links li + li {
    margin-top: var(--space-xs);
}

.footer-links a {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    transition: color var(--transition);
}

.footer-links a:hover {
    color: var(--color-text-inverse);
}

/* Footer badges */
.footer-grid__badges {
    margin-top: var(--space-sm);
}

.footer-grid__badges img {
    max-width: 140px;
    opacity: 0.85;
    transition: opacity var(--transition);
}

.footer-grid__badges img:hover {
    opacity: 1;
}

/* Sub-footer */
.subfooter {
    background: rgba(0, 0, 0, 0.15);
    padding: var(--space-md) 0;
}

.subfooter__left {
    align-items: center;
}

.subfooter__social {
    color: rgba(255, 255, 255, 0.5);
    transition: color var(--transition);
    display: inline-flex;
}

.subfooter__social:hover {
    color: var(--color-accent);
}

.subfooter__social svg {
    width: 20px;
    height: 20px;
}

.subfooter__copy {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.5);
}

.subfooter__legal-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.subfooter__legal-list a {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color var(--transition);
}

.subfooter__legal-list a:hover {
    color: var(--color-text-inverse);
}

.subfooter__cookies {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.5);
    background: none;
    border: none;
    cursor: pointer;
    text-decoration: underline;
    font-family: inherit;
    transition: color var(--transition);
    padding: 0;
}

.subfooter__cookies:hover {
    color: var(--color-text-inverse);
}


/* ==========================================================================
   3. HOMEPAGE (front-page.php)
   ========================================================================== */

/* --- Hero Home --- */
.hero.hero--home {
    position: relative;
    background-color: var(--color-primary-dark);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 560px;
    display: flex;
    align-items: center;
    padding: var(--space-4xl) 0;
}

.hero.hero--home::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(12, 33, 71, 0.88) 0%, rgba(19, 53, 111, 0.72) 100%);
}

.hero.hero--home .container {
    position: relative;
    z-index: 1;
}

.hero__content {
    max-width: var(--max-wide);
}

.hero__title {
    font-family: var(--font-heading);
    font-size: var(--text-5xl);
    font-weight: var(--fw-bold);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-md);
    max-width: 700px;
}

.hero--home .hero__title {
    color: var(--color-text-inverse);
}

.hero__subtitle {
    font-size: var(--text-lg);
    line-height: var(--leading-normal);
    max-width: 560px;
    margin-bottom: var(--space-sm);
}

.hero--home .hero__subtitle {
    color: rgba(255, 255, 255, 0.9);
}

.hero__text {
    font-size: var(--text-base);
    line-height: var(--leading-normal);
    max-width: 560px;
    margin-bottom: var(--space-xl);
}

.hero--home .hero__text {
    color: rgba(255, 255, 255, 0.85);
}

/* --- Soluciones Section (Home) --- */
.soluciones .section-header {
    margin-bottom: var(--space-2xl);
}

/* --- Diferenciadores (Por qué nos eligen) --- */
.diferenciador {
    text-align: center;
    padding: var(--space-lg);
}

.diferenciador__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(200, 169, 110, 0.12);
    border-radius: var(--radius-full);
    margin: 0 auto var(--space-md);
    color: var(--color-accent);
}

.diferenciador__title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--fw-semibold);
    color: var(--color-text-inverse);
    margin-bottom: var(--space-xs);
}

.diferenciador__text {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.75);
    line-height: var(--leading-normal);
}

/* --- About Preview (Home) --- */
.about-preview .split__content {
    max-width: none;
}

.about-preview .split__text {
    font-size: var(--text-base);
    color: var(--color-text);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-lg);
}

.about-preview .split__text p + p {
    margin-top: var(--space-sm);
}

/* --- Blog Preview Section (Home) --- */
.blog-preview .section-header {
    margin-bottom: var(--space-xl);
}

.blog-preview__grid {
    display: grid;
    gap: var(--space-lg);
}

/* Featured blog card spans full width, then 3-col grid below */
.blog-preview__grid > .blog-card--featured {
    margin-bottom: var(--space-sm);
}

.blog-preview__grid > .grid.grid--3 {
    margin-top: 0;
}


/* ==========================================================================
   4. SERVICE LANDING (single-servicio.php)
   ========================================================================== */

/* --- Hero Service (with background image + overlay) --- */
.hero.hero--service {
    position: relative;
    min-height: 600px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
}

.hero__bg {
    position: absolute;
    inset: -20px;
    background-size: cover;
    background-position: center;
    z-index: 0;
    filter: blur(1px);
    transform: scale(1.05);
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        160deg,
        rgba(12, 33, 71, 0.94) 0%,
        rgba(19, 53, 111, 0.82) 50%,
        rgba(12, 33, 71, 0.96) 100%
    );
    z-index: 1;
}

.hero__inner {
    position: relative;
    z-index: 2;
    padding: var(--space-4xl) 0 var(--space-xl);
    max-width: var(--max-wide);
    text-align: center;
    margin: 0 auto;
}

/* Decorative accent line above badge */
.hero__badge {
    display: inline-block;
    font-family: var(--font-label);
    font-size: var(--text-xs);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--color-accent);
    background: rgba(200, 169, 110, 0.12);
    padding: 8px 20px;
    border-radius: var(--radius-full);
    margin-bottom: var(--space-lg);
    border: 1px solid rgba(200, 169, 110, 0.25);
    position: relative;
}

.hero.hero--service .hero__title {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: var(--fw-bold);
    color: var(--color-text-inverse);
    line-height: 1.08;
    margin-bottom: var(--space-md);
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    letter-spacing: -0.02em;
}

.hero__lead {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto var(--space-xl);
    line-height: var(--leading-relaxed);
}

.hero__ctas {
    display: flex;
    gap: var(--space-md);
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: var(--space-sm);
}

.btn--ghost {
    background: rgba(255, 255, 255, 0.06);
    color: var(--color-text-inverse);
    border: 2px solid rgba(255, 255, 255, 0.25);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(4px);
}

.btn--ghost:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.5);
    color: var(--color-text-inverse);
}

/* Social proof bar — always pinned to bottom of hero */
.hero__proof {
    position: relative;
    z-index: 2;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: var(--space-md) 0;
    margin-top: auto;
}

.hero__proof-grid {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    flex-wrap: wrap;
}

.hero__proof-item {
    text-align: center;
    color: var(--color-text-inverse);
    min-width: 100px;
}

.hero__proof-item strong {
    display: block;
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--fw-bold);
    color: var(--color-accent);
    line-height: 1;
    margin-bottom: 4px;
}

.hero__proof-item span {
    font-size: 11px;
    font-family: var(--font-label);
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
}

/* Intro split (text + bullets below hero) */
.intro-split {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: var(--space-2xl);
    align-items: start;
}

.intro-split__lead {
    font-size: var(--text-lg);
    line-height: var(--leading-relaxed);
    color: var(--color-text);
}

/* Service card with icon */
.service-card--icon .service-card__icon-wrap {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg-light);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-md);
}

/* Image with dark filter overlay */
.split__image-dark {
    width: 100%;
    aspect-ratio: 4 / 3;
    border-radius: var(--radius-lg);
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.split__image-dark::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(12, 33, 71, 0.3) 0%, rgba(19, 53, 111, 0.15) 100%);
}

/* LEGACY — keep for backwards compat */
.hero__form h3 {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--fw-bold);
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

/* --- Authority Detail Blocks (full-width, CRO+GEO) --- */
.authority-block {
    max-width: var(--max-content, 780px);
    margin-left: auto;
    margin-right: auto;
}

.authority-block .section-label {
    color: var(--color-accent);
    margin-bottom: var(--space-sm);
}

.authority-block__title {
    font-size: var(--text-3xl);
    font-weight: var(--fw-bold);
    line-height: 1.25;
    margin-bottom: var(--space-lg);
    color: var(--color-secondary);
}

@media (max-width: 768px) {
    .authority-block__title {
        font-size: var(--text-2xl);
    }
}

/* --- Rich content area (HTML from ACF wysiwyg) --- */
.authority-block__body {
    font-size: var(--text-base);
    line-height: 1.8;
    color: var(--color-text);
}

.authority-block__body p {
    margin-bottom: var(--space-md);
}

.authority-block__body p:last-child {
    margin-bottom: 0;
}

/* Restore list bullets inside rich content (base.css resets list-style globally) */
.authority-block__body ul {
    list-style: disc;
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.authority-block__body ol {
    list-style: decimal;
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.authority-block__body ul ul {
    list-style: circle;
    margin-top: var(--space-xs);
    margin-bottom: var(--space-xs);
}

.authority-block__body li {
    margin-bottom: var(--space-xs);
    line-height: 1.7;
    padding-left: 4px;
}

.authority-block__body li::marker {
    color: var(--color-accent);
}

/* Bold text = primary color for legal/technical emphasis */
.authority-block__body strong {
    color: var(--color-primary);
    font-weight: var(--fw-semibold);
}

/* Bold text in rich content — stays inline, no display:block tricks */

/* Takeaway bullets — highlighted summary box */
.authority-block__takeaways {
    margin-top: var(--space-lg);
    padding: var(--space-md) var(--space-lg);
    background: var(--color-bg-light);
    border-left: 3px solid var(--color-accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

.section--light .authority-block__takeaways {
    background: var(--color-bg);
}

/* Spacing between consecutive authority sections */
.section + .section > .container > .authority-block {
    /* Each block is its own <section>, spacing handled by .section padding */
}

/* --- FAQ Section --- */
.faq-list {
    margin-left: auto;
    margin-right: auto;
}


/* ==========================================================================
   5. BLOG SINGLE
   ========================================================================== */

.blog-single {
    padding: var(--space-3xl) 0;
}

.blog-single__layout {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: var(--space-2xl);
    align-items: start;
}

.blog-single__meta {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    font-family: var(--font-label);
    font-size: var(--text-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.blog-single__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.3em;
}

.blog-single__title {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: var(--fw-bold);
    color: var(--color-secondary);
    line-height: var(--leading-tight);
    margin-bottom: var(--space-lg);
}

.blog-single__featured-img {
    width: 100%;
    border-radius: var(--radius-lg);
    margin-bottom: var(--space-xl);
}

/* Key Takeaway Box */
.blog-single__takeaway {
    background: var(--color-bg-light);
    border-left: 4px solid var(--color-accent);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    padding: var(--space-md) var(--space-lg);
    margin-bottom: var(--space-xl);
}

.blog-single__takeaway h4 {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-accent);
    margin-bottom: var(--space-xs);
}

.blog-single__takeaway p {
    font-size: var(--text-base);
    color: var(--color-text);
    line-height: var(--leading-normal);
}

/* Sidebar TOC */
.blog-single__sidebar {
    position: sticky;
    top: 96px;
}

.blog-single__toc {
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
}

.blog-single__toc h4 {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
}

.blog-single__toc ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.blog-single__toc li + li {
    margin-top: var(--space-xs);
}

.blog-single__toc a {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-light);
    text-decoration: none;
    padding: 4px var(--space-xs);
    border-left: 2px solid transparent;
    transition: color var(--transition), border-color var(--transition);
}

.blog-single__toc a:hover,
.blog-single__toc a.is-active {
    color: var(--color-primary);
    border-left-color: var(--color-primary);
}

/* Author Box */
.blog-single__author {
    display: flex;
    gap: var(--space-md);
    align-items: center;
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: var(--space-md);
    margin-top: var(--space-xl);
}

.blog-single__author img {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-full);
    object-fit: cover;
}

.blog-single__author h4 {
    font-family: var(--font-heading);
    font-size: var(--text-sm);
    font-weight: var(--fw-bold);
    color: var(--color-secondary);
}

.blog-single__author p {
    font-size: var(--text-xs);
    color: var(--color-text-light);
}

/* Related Posts */
.blog-single__related {
    margin-top: var(--space-3xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--color-border);
}

.blog-single__related h3 {
    font-family: var(--font-heading);
    font-size: var(--text-2xl);
    font-weight: var(--fw-bold);
    color: var(--color-secondary);
    margin-bottom: var(--space-lg);
}

.blog-single__related-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}


/* ==========================================================================
   6. BLOG ARCHIVE
   ========================================================================== */

.blog-archive {
    padding: var(--space-3xl) 0;
}

.blog-archive__header {
    margin-bottom: var(--space-2xl);
}

.blog-archive__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}

/* Archive grid spacing (featured + grid) */
.archive-grid {
    margin-top: var(--space-lg);
}

/* Blog single content inherits prose styles */
.blog-single__content {
    margin-bottom: var(--space-xl);
}


/* ==========================================================================
   7. CONTACT PAGE
   ========================================================================== */

.contacto-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-2xl);
    padding: var(--space-3xl) 0;
    align-items: start;
}

.contacto-grid__form h2 {
    font-family: var(--font-heading);
    font-size: var(--text-3xl);
    font-weight: var(--fw-bold);
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

.contacto-grid__form p {
    font-size: var(--text-base);
    color: var(--color-text);
    margin-bottom: var(--space-lg);
}

.contacto-grid__form .form-lead-wrapper {
    max-width: none;
    background: var(--color-bg-light);
    border: 1px solid var(--color-border-light);
}

.contacto-grid__info {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.contacto-grid__map {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 4 / 3;
}

.contacto-grid__map iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.contacto-grid__details {
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.contacto-grid__details h3 {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--fw-bold);
    color: var(--color-secondary);
    margin-bottom: var(--space-md);
}

.contacto-grid__details li {
    display: flex;
    gap: var(--space-sm);
    align-items: flex-start;
    font-size: var(--text-sm);
    color: var(--color-text);
    line-height: var(--leading-normal);
}

.contacto-grid__details li + li {
    margin-top: var(--space-sm);
}

.contacto-grid__details li svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    color: var(--color-primary);
    margin-top: 2px;
}


/* ==========================================================================
   8. ABOUT PAGE
   ========================================================================== */

/* --- About Hero --- */
.hero.hero--about {
    text-align: center;
    padding: var(--space-3xl) 0;
    background: var(--color-primary-dark);
}

.hero.hero--about .hero__title {
    color: var(--color-text-inverse);
    margin-left: auto;
    margin-right: auto;
}

.hero.hero--about .hero__text {
    color: rgba(255, 255, 255, 0.85);
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Team Lead (Principal Member) --- */
.team-lead {
    display: grid;
    grid-template-columns: 300px 1fr;
    align-items: stretch;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(19, 53, 111, 0.10);
    margin-bottom: var(--space-2xl);
}

.team-lead__photo {
    overflow: hidden;
    background: var(--color-bg-light);
}

.team-lead__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.team-lead__info {
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.team-lead__name {
    font-family: var(--font-heading);
    font-size: 1.75rem;
    font-weight: var(--fw-bold);
    color: var(--color-secondary);
    margin-bottom: 6px;
    line-height: 1.2;
}

.team-lead__name a {
    color: inherit;
    text-decoration: none;
}

.team-lead__name a:hover {
    color: var(--color-primary);
}

.team-lead__role {
    font-family: var(--font-label);
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-md);
}

.team-lead__bio {
    font-size: var(--text-base);
    color: var(--color-text-light);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-lg);
}

.team-lead__actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.team-lead__linkedin {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    font-weight: var(--fw-medium);
    color: var(--color-text-light);
    text-decoration: none;
    transition: color var(--transition);
}

.team-lead__linkedin:hover {
    color: #0077B5;
}

.team-lead__link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-sm);
    font-weight: var(--fw-semibold);
    color: var(--color-primary);
    text-decoration: none;
    transition: gap var(--transition);
}

.team-lead__link:hover {
    gap: 8px;
}

@media (max-width: 768px) {
    .team-lead {
        grid-template-columns: 1fr;
    }
    .team-lead__photo {
        aspect-ratio: 4 / 3;
    }
    .team-lead__info {
        padding: var(--space-lg);
    }
}

/* --- Team Cards (Secondary Members) --- */
.team-secondary {
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-bg-light);
}

.team-card {
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-card);
    transition: box-shadow var(--transition), transform var(--transition);
}

.team-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.team-card__image {
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--color-bg-light);
}

.team-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card__body {
    padding: var(--space-md) var(--space-lg);
}

.team-card__name {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--fw-semibold);
    color: var(--color-secondary);
    margin-bottom: 2px;
}

.team-card__role {
    font-family: var(--font-label);
    font-size: var(--text-xs);
    font-weight: var(--fw-medium);
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-sm);
}

.team-card__bio {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    line-height: var(--leading-normal);
    margin-bottom: var(--space-sm);
}

.team-card__social {
    display: inline-flex;
    color: var(--color-text-light);
    transition: color var(--transition);
}

.team-card__social:hover {
    color: #0077B5;
}

/* Compact variant — secondary members */
.team-card--compact {
    text-align: left;
    box-shadow: none;
    border: 1px solid var(--color-bg-light);
}

.team-card--compact:hover {
    box-shadow: var(--shadow-card);
}

.team-card--compact .team-card__header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    margin-bottom: var(--space-sm);
}

.team-card--compact .team-card__name {
    font-size: var(--text-base);
    margin-bottom: 2px;
}

.team-card--compact .team-card__role {
    margin-bottom: 0;
    font-size: 0.7rem;
}

.team-card__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.team-card__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.team-card__avatar--initials {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    color: #fff;
    font-family: var(--font-heading);
    font-size: var(--text-base);
    font-weight: var(--fw-semibold);
    letter-spacing: 1px;
}

/* --- INPACT badge in footer --- */
.badges__item--inpact img {
    width: 300px;
    height: auto;
    max-width: 100%;
}

/* --- About Stats --- */
.about-stats {
    padding: var(--space-2xl) 0;
    background: var(--color-bg);
    margin-top: -40px;
    position: relative;
    z-index: 1;
}

.about-stats__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-lg);
    max-width: var(--max-wide);
    margin: 0 auto;
    background: var(--color-bg);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: var(--space-xl) var(--space-lg);
}

/* --- About Memberships --- */
.about-memberships {
    padding: var(--space-3xl) 0;
    background: var(--color-bg-light);
    text-align: center;
}

.about-memberships h2 {
    margin-bottom: var(--space-md);
}

.about-memberships__logos {
    display: flex;
    justify-content: center;
    gap: var(--space-2xl);
    align-items: center;
    margin-top: var(--space-xl);
    flex-wrap: wrap;
}

.about-memberships__logos img {
    height: 60px;
    width: auto;
    opacity: 0.75;
    transition: opacity var(--transition);
}

.about-memberships__logos img:hover {
    opacity: 1;
}


/* ==========================================================================
   8b. PROFILE PAGE (David Bua)
   ========================================================================== */

/* --- Profile Hero (horizontal: photo + info) --- */
.profile-hero {
    background: var(--color-primary-dark);
    padding: var(--space-2xl) 0;
}

.profile-hero__inner {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.profile-hero__photo {
    flex-shrink: 0;
    width: 160px;
    height: 160px;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 4px solid rgba(255, 255, 255, 0.15);
    background: var(--color-primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-hero__initials {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: var(--fw-bold);
    color: rgba(255, 255, 255, 0.2);
}

.profile-hero__name {
    font-family: var(--font-heading);
    font-size: var(--text-4xl);
    font-weight: var(--fw-bold);
    color: var(--color-text-inverse);
    margin-bottom: 4px;
    line-height: var(--leading-tight);
}

.profile-hero__role {
    font-family: var(--font-label);
    font-size: var(--text-base);
    font-weight: var(--fw-semibold);
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 2px;
}

.profile-hero__org {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--space-md);
}

.profile-hero__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
}

.profile-hero__link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.75);
    text-decoration: none;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-full);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all var(--transition);
}

.profile-hero__link:hover {
    background: rgba(255, 255, 255, 0.15);
    color: var(--color-text-inverse);
}

/* --- Profile Blockquote --- */
.profile-blockquote {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: var(--space-lg) 0;
}

.profile-blockquote::before {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background: var(--color-accent);
    margin: 0 auto var(--space-lg);
    border-radius: 2px;
}

.profile-blockquote p {
    font-family: var(--font-heading);
    font-size: var(--text-xl);
    font-weight: var(--fw-medium);
    color: var(--color-secondary);
    line-height: var(--leading-relaxed);
    font-style: italic;
    margin-bottom: var(--space-md);
}

.profile-blockquote cite {
    font-style: normal;
    font-family: var(--font-label);
    font-size: var(--text-sm);
    color: var(--color-text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Profile Columns (experience + credentials) --- */
.profile-columns {
    align-items: start;
}

/* --- Profile Credentials --- */
.profile-credential {
    background: var(--color-bg-light);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
}

.profile-credential__title {
    font-family: var(--font-heading);
    font-size: var(--text-lg);
    font-weight: var(--fw-semibold);
    color: var(--color-secondary);
    margin-bottom: var(--space-sm);
}

.profile-credential__text {
    font-size: var(--text-sm);
    color: var(--color-text);
    line-height: var(--leading-normal);
}

.profile-credential__list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.profile-credential__list li {
    font-size: var(--text-sm);
    color: var(--color-text);
    padding: var(--space-xs) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.profile-credential__list li:last-child {
    border-bottom: none;
}

@media (max-width: 768px) {
    .profile-hero__inner {
        flex-direction: column;
        text-align: center;
    }

    .profile-hero__photo {
        width: 120px;
        height: 120px;
    }

    .profile-hero__name {
        font-size: var(--text-3xl);
    }

    .profile-hero__links {
        justify-content: center;
    }

    .profile-blockquote p {
        font-size: var(--text-lg);
    }
}


/* ==========================================================================
   9. LEGAL PAGES
   ========================================================================== */

.legal-page {
    padding: var(--space-3xl) 0;
    background: var(--color-bg);
}

.legal-page__content {
    max-width: var(--max-wide);
    margin: 0 auto;
}

.legal-page__content h1 {
    font-size: var(--text-4xl);
    margin-bottom: var(--space-xs);
    color: var(--color-secondary);
}

.legal-page__content h1 + p {
    font-size: var(--text-sm);
    color: var(--color-text-light);
    margin-bottom: var(--space-2xl);
    padding-bottom: var(--space-lg);
    border-bottom: 1px solid var(--color-border);
}

.legal-page__content h2 {
    font-size: var(--text-xl);
    margin-top: var(--space-2xl);
    margin-bottom: var(--space-md);
    padding-bottom: var(--space-xs);
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
}

.legal-page__content h3 {
    font-size: var(--text-lg);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-sm);
    color: var(--color-primary);
}

.legal-page__content p,
.legal-page__content li {
    font-size: var(--text-base);
    color: var(--color-text);
    line-height: var(--leading-relaxed);
    margin-bottom: var(--space-sm);
}

.legal-page__content ul,
.legal-page__content ol {
    padding-left: var(--space-lg);
    margin-bottom: var(--space-md);
}

.legal-page__content a {
    color: var(--color-primary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color var(--transition);
}

.legal-page__content a:hover {
    color: var(--color-accent);
}

.legal-page__content strong {
    color: var(--color-secondary);
}


/* ==========================================================================
   10. CTA INLINE — page-level overrides
   ========================================================================== */

/* Full-bleed CTA when used as a direct section (not inside .container) */
section.cta-inline {
    border-radius: 0;
}

.cta-inline__subtitle {
    font-size: var(--text-lg);
    max-width: 560px;
    margin: 0 auto var(--space-sm);
}

.cta-inline__text {
    margin-bottom: var(--space-lg);
}

/* Utility: text-center (used in CTA sections) */
.text-center {
    text-align: center;
}


/* ==========================================================================
   RESPONSIVE — Tablet (max-width: 1024px)
   ========================================================================== */

@media (max-width: 1024px) {

    /* Header & Nav */
    .site-nav__menu,
    .site-nav__actions {
        display: none !important;
    }

    .site-nav__mobile-actions {
        display: flex !important;
        align-items: center;
        gap: var(--space-sm);
    }

    .site-nav__toggle {
        display: flex;
    }

    /* Hide desktop megamenu panels, but allow offcanvas accordion to override */
    .site-nav .megamenu__panel {
        display: none !important;
    }

    .offcanvas .megamenu__panel[style*="display: block"] {
        display: block !important;
    }

    /* Offcanvas */
    .offcanvas {
        display: flex;
        transform: translateX(100%);
    }

    .offcanvas.is-open {
        transform: translateX(0);
    }

    .offcanvas__backdrop.is-open {
        display: block;
    }

    /* Footer grid */
    .footer-grid.grid.grid--4 {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Hero */
    .hero.hero--service .hero__title {
        font-size: var(--text-3xl);
    }

    .hero__proof-grid {
        gap: var(--space-lg);
    }

    .intro-split {
        grid-template-columns: 1fr;
    }

    .hero__form {
        max-width: 480px;
    }

    /* Blog single */
    .blog-single__layout {
        grid-template-columns: 1fr;
    }

    .blog-single__sidebar {
        position: static;
        order: -1;
    }

    .blog-single__related-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Blog archive */
    .blog-archive__grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contact */
    .contacto-grid {
        grid-template-columns: 1fr;
    }

    /* About stats */
    .about-stats__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}


/* ==========================================================================
   RESPONSIVE — Mobile (max-width: 768px)
   ========================================================================== */

@media (max-width: 768px) {

    /* Topbar: hide label text on phone link */
    .topbar__link--phone span {
        display: none;
    }

    /* Header */
    .site-nav > .container {
        height: 60px;
    }

    .site-nav__brand img,
    .site-nav__brand .custom-logo {
        height: 32px;
    }

    /* Mobile sticky CTA */
    .mobile-cta {
        display: block;
    }

    /* Padding at bottom of page so content isn't hidden behind mobile CTA */
    body {
        padding-bottom: 56px;
    }

    /* Off-canvas full width */
    .offcanvas {
        width: 100%;
    }

    /* Footer */
    .footer-grid.grid.grid--4 {
        grid-template-columns: 1fr;
        gap: var(--space-lg);
    }

    .subfooter .container {
        flex-direction: column;
        text-align: center;
        gap: var(--space-xs);
    }

    .subfooter__legal-list {
        justify-content: center;
    }

    /* Hero Home */
    .hero.hero--home {
        min-height: 420px;
        padding: var(--space-2xl) 0;
    }

    .hero.hero--home .hero__title {
        font-size: var(--text-3xl);
    }

    .hero.hero--home .hero__subtitle {
        font-size: var(--text-base);
    }

    /* Hero Service */
    .hero.hero--service .hero__title {
        font-size: var(--text-3xl);
    }

    .hero__ctas {
        flex-direction: column;
        align-items: center;
    }

    .hero__ctas .btn {
        width: 100%;
        max-width: 320px;
    }

    .hero__actions {
        flex-direction: column;
        align-items: stretch;
    }

    .hero__form {
        max-width: 100%;
    }

    /* Blog preview grid: stack */
    .blog-preview__grid > .blog-card--featured {
        grid-template-columns: 1fr;
    }

    /* Blog single */
    .blog-single__title {
        font-size: var(--text-3xl);
    }

    .blog-single__related-grid {
        grid-template-columns: 1fr;
    }

    /* Blog archive */
    .blog-archive__grid {
        grid-template-columns: 1fr;
    }

    /* Contact */
    .contacto-grid__map {
        aspect-ratio: 16 / 9;
    }

    /* About */
    .hero.hero--about .hero__title {
        font-size: var(--text-3xl);
    }

    .about-stats__grid {
        grid-template-columns: 1fr 1fr;
        padding: var(--space-md);
    }

    .about-memberships__logos {
        gap: var(--space-lg);
    }

    .about-memberships__logos img {
        height: 44px;
    }

    /* Legal */
    .legal-page__content h1 {
        font-size: var(--text-2xl);
    }
}
