/* ══════════════════════════════════════
   GABINETE 89 — Estilos principales
   ══════════════════════════════════════ */

:root {
    --crimson: #8b1a2a;
    --crimson-dark: #6b1220;
    --crimson-light: #a82535;
    --ink: #1a1a24;
    --ink-mid: #252535;
    --white: #ffffff;
    --gray-50: #f8f8f8;
    --gray-100: #f0f0f0;
    --gray-200: #e4e4e4;
    --gray-400: #9a9a9a;
    --gray-600: #5a5a5a;
    --text-dark: #1a1a1a;
    --text-mid: #4a4a4a;
    --text-light: #888888;

    --font-body: 'Poppins', system-ui, sans-serif;
    --radius: 6px;
    --radius-lg: 14px;
    --transition: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.07);
    --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 12px 40px rgba(0, 0, 0, 0.14);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

.container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* ══════════════════════════════════════
   HEADER
══════════════════════════════════════ */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(26, 26, 36, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    transition: box-shadow var(--transition);
}

.header.scrolled {
    box-shadow: 0 2px 24px rgba(0, 0, 0, 0.35);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 0;
}

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

.logo-img {
    height: 42px;
    width: auto;
    filter: brightness(3) contrast(2);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.1rem;
    list-style: none;
}

.nav-links a {
    padding: 0.5rem 0.9rem;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.65);
    border-radius: var(--radius);
    transition: all var(--transition);
}

.nav-links a:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.07);
}

.nav-links .nav-cta {
    background: var(--crimson);
    color: var(--white) !important;
    padding: 0.5rem 1.2rem;
    border-radius: var(--radius);
    margin-left: 0.5rem;
}

.nav-links .nav-cta:hover {
    background: var(--crimson-light);
    transform: translateY(-1px);
}

.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: rgba(255, 255, 255, 0.8);
    transition: all var(--transition);
}

/* ══════════════════════════════════════
   HERO — oscuro
══════════════════════════════════════ */
.hero {
    min-height: 100vh;
    background: var(--ink);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 70% 70% at 75% 50%, rgba(139, 26, 42, 0.16) 0%, transparent 65%),
        radial-gradient(ellipse 50% 60% at 15% 80%, rgba(139, 26, 42, 0.07) 0%, transparent 55%);
}

.hero-lines {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
    background-size: 72px 72px;
}

.hero-ornament {
    position: absolute;
    right: 7%;
    top: 50%;
    transform: translateY(-50%);
    width: 380px;
    height: 380px;
    border: 1px solid rgba(139, 26, 42, 0.18);
    border-radius: 50%;
    opacity: 0.7;
}

.hero-ornament::before {
    content: '';
    position: absolute;
    inset: 36px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hero-ornament::after {
    content: '';
    position: absolute;
    inset: 72px;
    border: 1px solid rgba(139, 26, 42, 0.1);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    padding: 9rem 0 6rem;
    max-width: 660px;
}

.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
    opacity: 0;
    animation: fadeUp 0.7s 0.15s forwards;
}

.hero-eyebrow::before, .hero-eyebrow::after {
    content: '';
    width: 28px;
    height: 1px;
    background: var(--crimson);
}

.hero-eyebrow span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--crimson);
}

.hero-title {
    font-size: clamp(3rem, 6.5vw, 5.5rem);
    font-weight: 300;
    line-height: 1.08;
    color: var(--white);
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
    opacity: 0;
    animation: fadeUp 0.7s 0.3s forwards;
}

.hero-title em {
    font-style: italic;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.45);
}

.hero-title strong {
    font-weight: 700;
    color: var(--crimson);
}

.hero-desc {
    font-size: 1rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.55);
    max-width: 480px;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: fadeUp 0.7s 0.45s forwards;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeUp 0.7s 0.6s forwards;
}

.hero-stats {
    position: absolute;
    bottom: 3.5rem;
    right: 0;
    display: flex;
    gap: 3rem;
    opacity: 0;
    animation: fadeUp 0.7s 0.9s forwards;
}

.stat {
    text-align: center;
}

.stat-num {
    font-size: 2.6rem;
    font-weight: 700;
    color: var(--crimson);
    line-height: 1;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.35);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin-top: 0.4rem;
}

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

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

/* ══════════════════════════════════════
   BOTONES
══════════════════════════════════════ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 1.75rem;
    background: var(--crimson);
    color: var(--white);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    border-radius: var(--radius);
    border: 2px solid var(--crimson);
    transition: all var(--transition);
}

.btn-primary:hover {
    background: var(--crimson-light);
    border-color: var(--crimson-light);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(139, 26, 42, 0.35);
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 1.75rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.88rem;
    font-weight: 500;
    border-radius: var(--radius);
    border: 1px solid rgba(255, 255, 255, 0.25);
    transition: all var(--transition);
}

.btn-outline:hover {
    border-color: rgba(255, 255, 255, 0.6);
    color: var(--white);
    background: rgba(255, 255, 255, 0.06);
}

.btn-white {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.9rem 2rem;
    background: var(--white);
    color: var(--crimson);
    font-size: 0.9rem;
    font-weight: 700;
    border-radius: var(--radius);
    white-space: nowrap;
    transition: all var(--transition);
}

.btn-white:hover {
    background: var(--gray-100);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.9rem 2rem;
    background: transparent;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius);
    white-space: nowrap;
    transition: all var(--transition);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.6);
}

/* ══════════════════════════════════════
   SECCIONES
══════════════════════════════════════ */
.section {
    padding: 6rem 0;
}

.section-gray {
    background: var(--gray-50);
}

.section-dark {
    background: var(--ink);
}

.section-mid {
    background: var(--ink-mid);
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.section-label::before {
    content: '';
    width: 24px;
    height: 2px;
    background: var(--crimson);
}

.section-label span {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--crimson);
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 3rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-title-light {
    color: var(--white);
}

.section-subtitle {
    font-size: 1rem;
    line-height: 1.75;
    color: var(--text-mid);
    max-width: 540px;
}

.section-subtitle-light {
    color: rgba(255, 255, 255, 0.5);
}

/* ══════════════════════════════════════
   QUIÉNES SOMOS
══════════════════════════════════════ */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.about-img-wrap {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.about-img-wrap img {
    width: 100%;
    height: 500px;
    object-fit: cover;
}

.about-badge {
    position: absolute;
    bottom: -1.5rem;
    right: -1.5rem;
    width: 130px;
    height: 130px;
    background: var(--crimson);
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(139, 26, 42, 0.4);
    z-index: 2;
}

.about-badge-num {
    font-size: 2.6rem;
    font-weight: 800;
    color: var(--white);
    line-height: 1;
    letter-spacing: -0.03em;
}

.about-badge-text {
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.75);
    text-align: center;
    margin-top: 3px;
}

.about-text p {
    font-size: 0.97rem;
    line-height: 1.85;
    color: var(--text-mid);
    margin-bottom: 1.1rem;
}

.about-values {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 2rem;
}

.value-item {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.9rem 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 3px solid var(--crimson);
    transition: box-shadow var(--transition);
}

.value-item:hover {
    box-shadow: var(--shadow-sm);
}

.value-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

.value-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-dark);
    line-height: 1.4;
}

/* ══════════════════════════════════════
   ÁREAS
══════════════════════════════════════ */
.areas-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.areas-header .section-label {
    justify-content: center;
}

.areas-header .section-subtitle {
    margin: 0 auto;
}

.areas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.area-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem 1.75rem;
    border: 1px solid var(--gray-200);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.area-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--crimson);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform var(--transition);
}

.area-card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.area-card:hover::after {
    transform: scaleX(1);
}

.area-icon {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    display: block;
}

.area-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.6rem;
    line-height: 1.3;
}

.area-desc {
    font-size: 0.83rem;
    line-height: 1.7;
    color: var(--text-light);
}

/* ══════════════════════════════════════
   EQUIPO
══════════════════════════════════════ */
.team-header {
    margin-bottom: 3.5rem;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.75rem;
}

.team-card {
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--white);
    border: 1px solid var(--gray-200);
    transition: all var(--transition);
    box-shadow: var(--shadow-sm);
}

.team-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: transparent;
}

.team-photo {
    position: relative;
    overflow: hidden;
}

.team-photo img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: top center;
    transition: transform 0.5s ease;
}

.team-card:hover .team-photo img {
    transform: scale(1.05);
}

.team-info {
    padding: 1.4rem 1.5rem;
    border-top: 3px solid var(--crimson);
}

.team-name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.2rem;
    line-height: 1.3;
}

.team-role {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--crimson);
    margin-bottom: 0.7rem;
}

.team-bio {
    font-size: 0.82rem;
    line-height: 1.65;
    color: var(--text-mid);
}

.team-colegiado {
    display: inline-block;
    margin-top: 0.65rem;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.07em;
    color: var(--text-light);
    background: var(--gray-100);
    padding: 0.2rem 0.55rem;
    border-radius: 3px;
}

/* ══════════════════════════════════════
   CTA
══════════════════════════════════════ */
.cta-section {
    background: linear-gradient(130deg, var(--crimson-dark) 0%, var(--crimson) 60%, #b02030 100%);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 15% 50%, rgba(255, 255, 255, 0.06), transparent 50%),
        radial-gradient(circle at 85% 30%, rgba(0, 0, 0, 0.12), transparent 50%);
}

.cta-inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 3rem;
    align-items: center;
}

.cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    padding: 0.3rem 0.85rem;
    border-radius: 50px;
    margin-bottom: 1rem;
    width: fit-content;
}

.cta-title {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    font-weight: 700;
    color: var(--white);
    line-height: 1.2;
    margin-bottom: 0.85rem;
    letter-spacing: -0.02em;
}

.cta-desc {
    font-size: 0.97rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.78);
    max-width: 480px;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    flex-shrink: 0;
}

/* ══════════════════════════════════════
   ENLACES
══════════════════════════════════════ */
.links-header {
    margin-bottom: 3rem;
}

.accordion-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.accordion-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.accordion-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.4rem;
    background: none;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    transition: all var(--transition);
    text-align: left;
}

.accordion-trigger:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.04);
}

.accordion-trigger.open {
    color: #f08090;
}

.accordion-arrow {
    font-size: 0.65rem;
    transition: transform var(--transition);
    color: var(--crimson);
    flex-shrink: 0;
}

.accordion-trigger.open .accordion-arrow {
    transform: rotate(180deg);
}

.accordion-body {
    display: none;
    padding: 0 1.4rem 1.4rem;
}

.accordion-body.open {
    display: block;
}

.accordion-body ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.accordion-body ul li a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: color var(--transition);
}

.accordion-body ul li a::before {
    content: '→';
    font-size: 0.7rem;
    color: var(--crimson);
    flex-shrink: 0;
}

.accordion-body ul li a:hover {
    color: rgba(255, 255, 255, 0.85);
}

/* ══════════════════════════════════════
   CONTACTO
══════════════════════════════════════ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
    align-items: start;
}

.contact-info .section-title {
    margin-bottom: 2rem;
}

.contact-items {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1.1rem;
    align-items: flex-start;
}

.contact-icon {
    width: 44px;
    height: 44px;
    background: var(--crimson);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.contact-item-label {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--crimson);
    margin-bottom: 0.3rem;
}

.contact-item-value {
    font-size: 0.93rem;
    line-height: 1.7;
    color: var(--text-dark);
    font-weight: 500;
}

.contact-item-value a:hover {
    color: var(--crimson);
}

.contact-hours {
    margin-top: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    border-left: 3px solid var(--crimson);
}

.contact-hours-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--crimson);
    margin-bottom: 0.6rem;
}

.contact-hours p {
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.8;
}

.map-wrap {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 460px;
}

.map-wrap iframe {
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
    background: var(--ink);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 4rem 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo-img {
    height: 38px;
    width: auto;
    margin-bottom: 1.1rem;
}

.footer-about {
    font-size: 0.85rem;
    line-height: 1.75;
    color: rgba(255, 255, 255, 0.38);
    margin-bottom: 1.4rem;
}

.footer-social {
    display: flex;
    gap: 0.65rem;
}

.footer-social a {
    width: 34px;
    height: 34px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.38);
    transition: all var(--transition);
}

.footer-social a:hover {
    border-color: var(--crimson);
    color: var(--crimson);
}

.footer-col-title {
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.55);
    margin-bottom: 1.1rem;
}

.footer-links-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
}

.footer-links-list a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.38);
    transition: color var(--transition);
}

.footer-links-list a:hover {
    color: rgba(255, 255, 255, 0.8);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 1.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copyright {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.25);
}

.footer-legal {
    display: flex;
    gap: 1.5rem;
}

.footer-legal a {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.25);
    transition: color var(--transition);
}

.footer-legal a:hover {
    color: rgba(255, 255, 255, 0.6);
}

/* ══════════════════════════════════════
   BACK TO TOP
══════════════════════════════════════ */
.back-to-top {
    position: fixed;
    bottom: 1.75rem;
    right: 1.75rem;
    width: 42px;
    height: 42px;
    background: var(--crimson);
    color: var(--white);
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 14px rgba(139, 26, 42, 0.45);
    transition: all var(--transition);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    z-index: 50;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--crimson-light);
    transform: translateY(-2px);
}

/* ══════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════ */
@media (max-width: 1024px) {
    .areas-grid {
        grid-template-columns: repeat(2, 1fr);
    }

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

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {

    /* Fix overflow horizontal global */
    html, body {
        overflow-x: hidden;
    }

    .container {
        padding: 0 1.25rem;
    }

    .section {
        padding: 4rem 0;
    }

    /* Header */
    .navbar {
        padding: 0.85rem 0;
    }

    .mobile-toggle {
        display: flex;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 68px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--ink);
        flex-direction: column;
        padding: 1.5rem;
        gap: 0.25rem;
        align-items: flex-start;
        overflow-y: auto;
    }

    .nav-links.open {
        display: flex;
    }

    .nav-links a {
        font-size: 0.95rem;
        padding: 0.7rem 1rem;
        width: 100%;
        border-radius: var(--radius);
    }

    /* Hero */
    .hero-content {
        padding: 7rem 0 4rem;
    }

    .hero-ornament {
        display: none;
    }

    .hero-stats {
        position: static;
        margin-top: 2.5rem;
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 0;
        width: 100%;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: var(--radius);
        overflow: hidden;
    }

    .stat {
        padding: 1.25rem 0.5rem;
        border-right: 1px solid rgba(255, 255, 255, 0.08);
    }

    .stat:last-child {
        border-right: none;
    }

    .stat-num {
        font-size: 2rem;
    }

    .stat-label {
        font-size: 0.6rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn-primary, .btn-outline {
        width: 100%;
        justify-content: center;
    }

    /* Quiénes somos */
    .about-grid {
        grid-template-columns: 1fr;
        gap: 4rem;
    }

    .about-img-wrap img {
        height: 320px;
    }

    /* Badge dentro del contenedor sin desbordarse */
    .about-badge {
        right: 1rem;
        bottom: -1.5rem;
        width: 100px;
        height: 100px;
    }

    .about-badge-num {
        font-size: 2rem;
    }

    .about-values {
        grid-template-columns: 1fr 1fr;
    }

    /* CTA */
    .cta-inner {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .cta-actions {
        flex-direction: column;
    }

    .btn-white, .btn-ghost {
        width: 100%;
    }

    /* Acordeón */
    .accordion-group {
        grid-template-columns: 1fr;
    }

    /* Contacto */
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .map-wrap {
        height: 300px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .footer-legal {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 1rem 1rem;
    }

    .areas-grid {
        grid-template-columns: 1fr;
    }

    .team-grid {
        grid-template-columns: 1fr;
    }

    .about-values {
        grid-template-columns: 1fr;
    }

    .hero-title {
        font-size: 2.6rem;
    }
}