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

html {
    scroll-behavior: smooth
}

:root {
    --dark: #1a1a1a;
    --gray-text: #666;
    --gray-light: #f2f1ef;
    --gold: #8a7455;
    --border: rgba(0, 0, 0, .11);
    --serif: 'Cormorant Garamond', Georgia, serif;
    --sans: 'Playfair Display', sans-serif;
    --nav-h: 64px;
}

body {
    font-family: var(--sans);
    color: var(--dark);
    background: #fff;
    font-weight: 300;
    line-height: 1.65
}

/* ══ NAV ══ */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 200;
    height: var(--nav-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 3rem;
    background: rgba(20, 20, 20, .2);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: background .35s
}

nav.scrolled {
    background: rgba(20, 20, 20, .9)
}

.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    z-index: 201;
    flex-shrink: 0
}

.nav-logo img {
    height: 38px;
    width: auto;
    display: block;
    object-fit: contain;
    filter: brightness(0) invert(1)
}

.nav-logo .logo-fallback {
    font-family: var(--serif);
    font-size: 1.7rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: .03em;
    display: none
}

.nav-logo img[data-error="1"] {
    display: none
}

.nav-logo img[data-error="1"]~.logo-fallback {
    display: block
}

/* When nav is over light bg, remove invert if logo is already light-safe */
/* Remove the filter line above if your logo is already white/light colored */
.nav-links {
    display: flex;
    gap: 2.2rem;
    list-style: none
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: .74rem;
    font-weight: 500;
    letter-spacing: .13em;
    text-transform: uppercase;
    opacity: .88;
    transition: opacity .2s;
    padding-bottom: 2px;
    border-bottom: 1px solid transparent
}

.nav-links a:hover {
    opacity: 1;
    border-bottom-color: rgba(255, 255, 255, .5)
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem
}

.lang-switcher {
    display: flex;
    gap: .3rem
}

.lang-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, .35);
    color: #fff;
    font-family: var(--sans);
    font-size: .65rem;
    font-weight: 500;
    letter-spacing: .1em;
    padding: .22rem .5rem;
    cursor: pointer;
    text-transform: uppercase;
    transition: background .2s, border-color .2s;
    border-radius: 2px
}

.lang-btn:hover,
.lang-btn.active {
    background: rgba(255, 255, 255, .15);
    border-color: rgba(255, 255, 255, .7)
}

.nav-hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    z-index: 201
}

.nav-hamburger span {
    display: block;
    width: 24px;
    height: 1.5px;
    background: #fff;
    transition: transform .3s, opacity .3s;
    transform-origin: center
}

.nav-hamburger.open span:nth-child(1) {
    transform: translateY(6.5px) rotate(45deg)
}

.nav-hamburger.open span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0)
}

.nav-hamburger.open span:nth-child(3) {
    transform: translateY(-6.5px) rotate(-45deg)
}

.nav-mobile {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 199;
    background: rgba(14, 14, 14, .97);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2.5rem
}

.nav-mobile.open {
    display: flex
}

.nav-mobile a {
    color: #fff;
    text-decoration: none;
    font-family: var(--serif);
    font-size: 2.2rem;
    font-weight: 300;
    letter-spacing: .04em;
    opacity: .88;
    transition: opacity .2s
}

.nav-mobile a:hover {
    opacity: 1
}

.mobile-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .8rem;
    margin-top: 1rem
}

.mobile-lang-switcher {
    display: flex;
    gap: .5rem
}

.mobile-lang-btn {
    background: none;
    border: 1px solid rgba(255, 255, 255, .3);
    color: rgba(255, 255, 255, .7);
    font-family: var(--sans);
    font-size: .72rem;
    letter-spacing: .12em;
    padding: .28rem .7rem;
    cursor: pointer;
    text-transform: uppercase;
    border-radius: 2px
}

.mobile-lang-btn.active {
    border-color: rgba(255, 255, 255, .8);
    color: #fff
}

/* ══ HERO ══ */
#inicio {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: flex-end;
    overflow: hidden
}

.hero-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #a8c4cc 0%, #7a9eae 25%, #5c8494 55%, #3a6070 100%)
}

/* Real hero image — place your photo at img/hero.jpg (1920×1080) */
.hero-bg-img {
    position: absolute;
    inset: 0;
    object-fit: cover;
    width: 100%;
    height: 100%;
    display: block
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(10, 10, 10, .62) 0%, rgba(10, 10, 10, .15) 55%, rgba(10, 10, 10, .05) 100%)
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: clamp(2rem, 5vw, 5rem) clamp(1.5rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5.5rem);
    color: #fff;
    max-width: 820px
}

.hero-content h1 {
    font-family: var(--serif);
    font-size: clamp(2rem, 5.5vw, 3.8rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.02em;
    margin-bottom: .6rem
}

.hero-content .subtitle {
    font-family: var(--serif);
    font-size: clamp(.95rem, 2.2vw, 1.35rem);
    font-weight: 400;
    font-style: italic;
    opacity: .9;
    margin-bottom: clamp(1.5rem, 4vw, 2.8rem)
}

.hero-stats {
    display: flex;
    gap: clamp(1.5rem, 4vw, 4rem);
    margin-bottom: clamp(1.5rem, 3vw, 2.5rem);
    flex-wrap: wrap
}

.hero-stat .num {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 400;
    display: block
}

.hero-stat .label {
    font-size: clamp(.6rem, 1.2vw, .68rem);
    letter-spacing: .14em;
    text-transform: uppercase;
    opacity: .78
}

.hero-btns {
    display: flex;
    gap: .85rem;
    margin-bottom: clamp(1.2rem, 2.5vw, 2rem);
    flex-wrap: wrap
}

.btn-outline-white {
    border: 1.5px solid rgba(255, 255, 255, .85);
    color: #fff;
    background: transparent;
    padding: .75rem 1.8rem;
    font-family: var(--sans);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .14em;
    text-transform: uppercase;
    cursor: pointer;
    text-decoration: none;
    transition: background .2s, color .2s;
    display: inline-block
}

.btn-outline-white:hover {
    background: #fff;
    color: var(--dark)
}

.hero-contact-line {
    display: flex;
    gap: 2rem;
    font-size: .84rem;
    opacity: .88;
    flex-wrap: wrap
}

.hero-contact-line a {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 3px
}

/* ══ SECTIONS ══ */
section {
    padding: clamp(3.5rem, 7vw, 6.5rem) clamp(1.5rem, 5vw, 4rem)
}

.section-title {
    font-family: var(--serif);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 600;
    letter-spacing: -.01em;
    text-align: center;
    margin-bottom: .6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem
}

.section-title::before,
.section-title::after {
    content: '';
    flex: 1;
    max-width: 200px;
    height: 1px;
    background: var(--border)
}

.section-sub {
    text-align: center;
    color: var(--gray-text);
    font-size: clamp(.82rem, 1.5vw, .92rem);
    max-width: 620px;
    margin: 0 auto 3.5rem;
    line-height: 1.75
}

/* ══ PILARES ══ */
#pilares {
    background: var(--gray-light)
}

.pilares-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    max-width: 860px;
    margin: 0 auto 3rem;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border)
}

.pilar {
    padding: 2.2rem 1.5rem;
    text-align: center;
    border-right: 1px solid var(--border)
}

.pilar:last-child {
    border-right: none
}

.pilar .big-num {
    font-family: var(--serif);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 300;
    display: block;
    margin-bottom: .2rem
}

.pilar .pilar-label {
    font-size: .66rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--gray-text);
    display: block
}

.pilar-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 860px;
    margin: 0 auto
}

.pilar-feat {
    text-align: center
}

.pilar-feat h4 {
    font-family: var(--serif);
    font-size: 1.05rem;
    font-weight: 500;
    margin-bottom: .4rem
}

.pilar-feat p {
    font-size: .82rem;
    color: var(--gray-text);
    line-height: 1.6
}

/* ══ SERVICIOS ══ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    max-width: 1100px;
    margin: 0 auto 5rem
}

.service-card {
    cursor: pointer;
    transition: opacity .2s
}

/* ── Real image support ── */
.card-img {
    width: 100%;
    aspect-ratio: 4/3;
    display: block;
    margin-bottom: 1rem;
    overflow: hidden;
    background: var(--gray-light)
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .4s ease
}

.service-card:hover .card-img img {
    transform: scale(1.04)
}

/* Fallback placeholder shown when no <img> inside .card-img */
.card-img:not(:has(img)) {
    aspect-ratio: 4/3
}

.img-ph-admin {
    background: linear-gradient(135deg, #d4cfc8, #b8b2aa)
}

.img-ph-economica {
    background: linear-gradient(135deg, #c8c0b8, #a8a098)
}

.img-ph-mant {
    background: linear-gradient(135deg, #b8c8d0, #8faab8)
}

.img-ph-juridica {
    background: linear-gradient(135deg, #c8c0a8, #a89878)
}

.img-ph-inmo {
    background: linear-gradient(135deg, #c8d4c0, #8aaa88)
}

.img-ph-seguros {
    background: linear-gradient(135deg, #c0c8d4, #8898b8)
}

.service-card h3 {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 500;
    margin-bottom: .3rem
}

.card-sub {
    font-size: .8rem;
    color: var(--gray-text);
    margin-bottom: .8rem;
    line-height: 1.55
}

.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem
}

.card-tag {
    font-size: .65rem;
    letter-spacing: .08em;
    border: 1px solid var(--border);
    padding: .18rem .55rem;
    color: var(--gray-text);
    text-transform: uppercase
}

.service-detail {
    grid-column: 1/-1;
    background: var(--gray-light);
    border-top: 2px solid var(--gold);
    padding: 2.5rem 3rem;
    display: none
}

.service-detail.active {
    display: block;
    animation: fadeSlide .25s ease
}

@keyframes fadeSlide {
    from {
        opacity: 0;
        transform: translateY(-8px)
    }

    to {
        opacity: 1;
        transform: none
    }
}

.detail-intro {
    font-family: var(--serif);
    font-size: clamp(.98rem, 1.8vw, 1.12rem);
    font-weight: 300;
    font-style: italic;
    color: var(--gray-text);
    margin-bottom: 2rem;
    max-width: 780px;
    line-height: 1.8
}

.detail-list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .65rem 3rem;
    margin-bottom: 2rem
}

.detail-list li {
    font-size: .84rem;
    color: var(--dark);
    padding-left: 1.3rem;
    position: relative;
    line-height: 1.6
}

.detail-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: .75rem;
    top: .1rem
}

.detail-close {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: none;
    border: 1px solid var(--border);
    padding: .5rem 1.1rem;
    cursor: pointer;
    font-family: var(--sans);
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: var(--gray-text);
    transition: color .2s, border-color .2s
}

.detail-close:hover {
    color: var(--dark);
    border-color: var(--dark)
}

.detail-close svg {
    width: 13px;
    height: 13px;
    fill: currentColor
}

.actividades-title {
    font-family: var(--serif);
    font-size: clamp(1.3rem, 2.5vw, 1.9rem);
    font-weight: 400;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    margin-bottom: 2.5rem
}

.actividades-title::before,
.actividades-title::after {
    content: '';
    flex: 1;
    max-width: 160px;
    height: 1px;
    background: var(--border)
}

.actividades-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    max-width: 800px;
    margin: 0 auto
}

.actividad-card .card-img {
    width: 100%;
    aspect-ratio: 4/3;
    display: block;
    margin-bottom: 1rem
}

.actividad-card h3 {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: .4rem
}

.act-registro {
    font-size: .75rem;
    color: var(--gold);
    margin-bottom: .3rem
}

.act-desc {
    font-size: .83rem;
    color: var(--gray-text);
    line-height: 1.65;
    margin-bottom: .7rem
}

.actividad-card ul {
    list-style: none;
    padding: 0
}

.actividad-card ul li {
    font-size: .81rem;
    color: var(--gray-text);
    padding-left: 1.1rem;
    position: relative;
    line-height: 1.55;
    margin-bottom: .3rem
}

.actividad-card ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--gold);
    font-size: .72rem;
    top: .1rem
}

/* ══ EQUIPO ══ */
#equipo {
    background: var(--gray-light)
}

.team-leader {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 380px;
    margin: 0 auto 3rem;
    gap: 1rem
}

/* Team photos: place images at img/team/rocio.jpg (400×400), img/team/member-1.jpg … (300×300) */
.team-avatar {
    width: 140px;
    height: 140px;
    border-radius: 4px;
    overflow: hidden;
    background: linear-gradient(135deg, #c8b8a8, #a89880);
    flex-shrink: 0
}

.team-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block
}

.team-name {
    font-family: var(--serif);
    font-size: 1.2rem;
    font-weight: 500
}

.team-role {
    font-size: .81rem;
    color: var(--gray-text)
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 4rem;
    max-width: 900px;
    margin: 0 auto
}

.team-member {
    display: flex;
    align-items: center;
    gap: 1.3rem
}

.tm-avatar {
    width: 84px;
    height: 84px;
    border-radius: 4px;
    flex-shrink: 0;
    overflow: hidden;
    background: linear-gradient(135deg, #d4c8b8, #b8a898)
}

.tm-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block
}

.tm-info .team-name {
    font-size: 1rem
}

.tm-info .team-role {
    font-size: .79rem
}

/* ══ CONTACTO ══ */
#contacto {
    background: #fff
}

.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 5rem;
    max-width: 1000px;
    margin: 0 auto 3.5rem
}

.contact-left h2 {
    font-family: var(--serif);
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 400;
    margin-bottom: .8rem
}

.contact-left .lead {
    font-size: .88rem;
    color: var(--gray-text);
    margin-bottom: 2.2rem;
    line-height: 1.8
}

.ci-item {
    margin-bottom: 1.3rem
}

.ci-item strong {
    font-size: .68rem;
    letter-spacing: .13em;
    text-transform: uppercase;
    display: block;
    margin-bottom: .25rem
}

.ci-item a {
    font-size: .86rem;
    color: var(--dark);
    text-decoration: underline;
    text-underline-offset: 3px
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .28rem
}

.form-group label {
    font-size: .68rem;
    letter-spacing: .09em;
    text-transform: uppercase
}

.form-group input,
.form-group textarea {
    width: 100%;
    border: 1px solid var(--border);
    padding: .78rem 1rem;
    font-family: var(--sans);
    font-size: .86rem;
    font-weight: 300;
    color: var(--dark);
    background: #fff;
    outline: none;
    transition: border-color .2s;
    border-radius: 0;
    -webkit-appearance: none
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--dark)
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #bbb
}

.form-group textarea {
    min-height: 110px;
    resize: vertical
}

.btn-dark {
    background: var(--dark);
    color: #fff;
    border: none;
    padding: .9rem 2.5rem;
    font-family: var(--sans);
    font-size: .72rem;
    font-weight: 500;
    letter-spacing: .15em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background .2s;
    align-self: flex-start
}

.btn-dark:hover {
    background: #333
}

.btn-dark:disabled {
    background: #888;
    cursor: not-allowed
}

.form-msg {
    font-size: .82rem;
    padding: .7rem 1rem;
    border-radius: 2px;
    display: none
}

.form-msg.ok {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
    display: block
}

.form-msg.err {
    background: #fce4ec;
    color: #c62828;
    border: 1px solid #f8bbd0;
    display: block
}

.map-wrap {
    max-width: 1000px;
    margin: 0 auto;
    height: 300px;
    overflow: hidden;
    border: 1px solid var(--border)
}

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

/* ══ FOOTER ══ */
footer {
    background: var(--dark);
    color: #fff;
    padding: clamp(3rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem)
}

.footer-inner {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1fr;
    gap: 3rem;
    max-width: 1000px;
    margin: 0 auto 2.5rem
}

.footer-brand .logo {
    display: block;
    margin-bottom: 1rem
}

.footer-brand .logo img {
    height: 42px;
    width: auto;
    object-fit: contain;
    filter: brightness(0) invert(1);
    display: block
}

.footer-brand .logo-text {
    font-family: var(--serif);
    font-size: 2rem;
    font-weight: 600;
    color: #fff;
    display: none
}

.footer-brand p {
    font-size: .82rem;
    opacity: .5;
    line-height: 1.7;
    margin-bottom: .3rem
}

.footer-col h4 {
    font-size: .66rem;
    letter-spacing: .17em;
    text-transform: uppercase;
    opacity: .4;
    margin-bottom: 1.2rem
}

.fc-link {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    color: rgba(255, 255, 255, .68);
    text-decoration: none;
    font-size: .82rem;
    margin-bottom: .85rem;
    line-height: 1.55
}

.fc-link:hover {
    color: #fff
}

.fc-link svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
    opacity: .55;
    flex-shrink: 0;
    margin-top: 2px
}

.legal-link {
    display: block;
    color: rgba(255, 255, 255, .58);
    text-decoration: none;
    font-size: .82rem;
    margin-bottom: .5rem;
    cursor: pointer;
    background: none;
    border: none;
    text-align: left;
    font-family: var(--sans);
    font-weight: 300
}

.legal-link:hover {
    color: #fff
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, .08);
    padding-top: 1.5rem;
    max-width: 1000px;
    margin: 0 auto;
    font-size: .75rem;
    opacity: .3;
    text-align: center
}

/* WhatsApp */
.wa-float {
    position: fixed;
    bottom: 1.8rem;
    right: 1.8rem;
    z-index: 300;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: #25d366;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 18px rgba(37, 211, 102, .38);
    text-decoration: none;
    transition: transform .2s
}

.wa-float:hover {
    transform: scale(1.08)
}

.wa-float svg {
    width: 27px;
    height: 27px;
    fill: #fff
}

/* ══ LEGAL MODAL ══ */
.legal-overlay {
    position: fixed;
    inset: 0;
    z-index: 700;
    background: rgba(0, 0, 0, .5);
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 2rem 1rem;
    overflow-y: auto
}

.legal-overlay.open {
    display: flex
}

.legal-box {
    background: #fff;
    max-width: 760px;
    width: 100%;
    margin: auto;
    position: relative;
    max-height: 90vh;
    overflow-y: auto
}

.legal-box-header {
    background: var(--dark);
    color: #fff;
    padding: 2.5rem 3rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem
}

.legal-box-header h2 {
    font-family: var(--serif);
    font-size: clamp(1.5rem, 3vw, 2.2rem);
    font-weight: 400
}

.legal-box-header p {
    opacity: .45;
    font-size: .75rem;
    margin-top: .3rem;
    letter-spacing: .05em
}

.legal-close {
    background: none;
    border: 1px solid rgba(255, 255, 255, .3);
    color: #fff;
    width: 34px;
    height: 34px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-top: .2rem;
    transition: border-color .2s
}

.legal-close:hover {
    border-color: #fff
}

.legal-close svg {
    width: 16px;
    height: 16px;
    fill: #fff
}

.legal-body {
    padding: 2.5rem 3rem 3.5rem
}

.legal-body h3 {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 400;
    margin: 2.2rem 0 .7rem;
    padding-top: 2.2rem;
    border-top: 1px solid var(--border)
}

.legal-body h3:first-child {
    border-top: none;
    margin-top: 0;
    padding-top: 0
}

.legal-body h4 {
    font-size: .78rem;
    font-weight: 500;
    letter-spacing: .08em;
    text-transform: uppercase;
    margin: 1.3rem 0 .4rem
}

.legal-body p {
    font-size: .86rem;
    color: var(--gray-text);
    margin-bottom: .9rem;
    line-height: 1.82
}

.legal-body a {
    color: var(--dark);
    text-decoration: underline;
    text-underline-offset: 3px
}

.legal-body ul {
    padding-left: 1.4rem;
    margin-bottom: .9rem
}

.legal-body ul li {
    font-size: .86rem;
    color: var(--gray-text);
    margin-bottom: .35rem;
    line-height: 1.7
}

.legal-body strong {
    color: var(--dark);
    font-weight: 500
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.3rem;
    font-size: .83rem
}

.legal-table th {
    background: var(--dark);
    color: #fff;
    padding: .55rem .85rem;
    text-align: left;
    font-weight: 400;
    font-size: .7rem;
    letter-spacing: .08em;
    text-transform: uppercase
}

.legal-table td {
    padding: .6rem .85rem;
    border-bottom: 1px solid var(--border);
    color: var(--gray-text);
    vertical-align: top;
    line-height: 1.6
}

.legal-table tr:last-child td {
    border-bottom: none
}

.rights-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: .8rem;
    margin-bottom: 1.3rem
}

.right-item {
    background: var(--gray-light);
    padding: .9rem;
    border-left: 2px solid var(--gold)
}

.right-item h5 {
    font-size: .78rem;
    font-weight: 500;
    margin-bottom: .25rem
}

.right-item p {
    font-size: .76rem;
    color: var(--gray-text);
    margin: 0;
    line-height: 1.5
}

/* ══ COOKIES BANNER ══ */
#cookieBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 500;
    background: #fff;
    border-top: 1px solid var(--border);
    padding: 1.2rem clamp(1.5rem, 5vw, 3rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, .08);
    transform: translateY(100%);
    transition: transform .4s ease
}

#cookieBanner.visible {
    transform: translateY(0)
}

.cookie-text {
    font-size: .82rem;
    color: var(--gray-text);
    line-height: 1.6;
    flex: 1;
    min-width: 200px
}

.cookie-text a {
    color: var(--dark);
    text-decoration: underline;
    text-underline-offset: 2px;
    cursor: pointer;
    background: none;
    border: none;
    font-family: var(--sans);
    font-size: .82rem;
    font-weight: 300
}

.cookie-btns {
    display: flex;
    gap: .7rem;
    flex-wrap: wrap;
    flex-shrink: 0
}

.cookie-btn {
    padding: .55rem 1.2rem;
    font-family: var(--sans);
    font-size: .7rem;
    font-weight: 500;
    letter-spacing: .1em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 2px;
    transition: background .2s, color .2s
}

.cookie-btn.accept {
    background: var(--dark);
    color: #fff;
    border: 1px solid var(--dark)
}

.cookie-btn.accept:hover {
    background: #333
}

.cookie-btn.reject {
    background: #fff;
    color: var(--gray-text);
    border: 1px solid var(--border)
}

.cookie-btn.reject:hover {
    border-color: var(--dark);
    color: var(--dark)
}

.cookie-btn.manage {
    background: #fff;
    color: var(--gray-text);
    border: 1px solid var(--border)
}

.cookie-btn.manage:hover {
    border-color: var(--dark);
    color: var(--dark)
}

/* ══ COOKIES MODAL ══ */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 600;
    background: rgba(0, 0, 0, .45);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem
}

.modal-overlay.open {
    display: flex
}

.modal-box {
    background: #fff;
    max-width: 520px;
    width: 100%;
    padding: 2.5rem;
    position: relative;
    max-height: 90vh;
    overflow-y: auto
}

.modal-box h3 {
    font-family: var(--serif);
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 1.5rem
}

.cookie-option {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border)
}

.cookie-option:last-of-type {
    border-bottom: none
}

.cookie-option-text h4 {
    font-size: .85rem;
    font-weight: 500;
    margin-bottom: .2rem
}

.cookie-option-text p {
    font-size: .78rem;
    color: var(--gray-text);
    line-height: 1.5
}

.toggle-wrap {
    flex-shrink: 0;
    margin-top: .15rem
}

.toggle {
    position: relative;
    width: 40px;
    height: 22px;
    display: inline-block
}

.toggle input {
    opacity: 0;
    width: 0;
    height: 0
}

.toggle-slider {
    position: absolute;
    inset: 0;
    background: #ccc;
    border-radius: 22px;
    cursor: pointer;
    transition: .3s
}

.toggle-slider::before {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: .3s
}

.toggle input:checked+.toggle-slider {
    background: var(--dark)
}

.toggle input:checked+.toggle-slider::before {
    transform: translateX(18px)
}

.toggle input:disabled+.toggle-slider {
    opacity: .6;
    cursor: not-allowed
}

.modal-actions {
    display: flex;
    gap: .8rem;
    margin-top: 1.5rem;
    flex-wrap: wrap
}

.modal-close-x {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    opacity: .35;
    transition: opacity .2s;
    padding: .3rem
}

.modal-close-x:hover {
    opacity: .8
}

.modal-close-x svg {
    width: 18px;
    height: 18px;
    fill: var(--dark)
}

/* ══ RESPONSIVE ══ */
@media(max-width:900px) {
    nav {
        padding: 0 1.4rem
    }

    .nav-links,
    .nav-right {
        display: none
    }

    .nav-hamburger {
        display: flex
    }

    .pilares-grid {
        grid-template-columns: 1fr
    }

    .pilar {
        border-right: none;
        border-bottom: 1px solid var(--border)
    }

    .pilar:last-child {
        border-bottom: none
    }

    .pilar-features {
        grid-template-columns: 1fr;
        gap: 1.5rem
    }

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

    .detail-list {
        grid-template-columns: 1fr
    }

    .service-detail {
        padding: 2rem 1.4rem
    }

    .actividades-grid {
        grid-template-columns: 1fr;
        gap: 2rem
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 360px
    }

    .contact-inner {
        grid-template-columns: 1fr;
        gap: 2.5rem
    }

    .form-row {
        grid-template-columns: 1fr
    }

    .footer-inner {
        grid-template-columns: 1fr;
        gap: 2rem
    }

    #cookieBanner {
        flex-direction: column;
        align-items: flex-start
    }

    .legal-box-header,
    .legal-body {
        padding-left: 1.5rem;
        padding-right: 1.5rem
    }

    .rights-grid {
        grid-template-columns: 1fr
    }
}

@media(max-width:520px) {
    .services-grid {
        grid-template-columns: 1fr
    }

    .hero-stats {
        gap: 1.4rem
    }

    .hero-btns {
        flex-direction: column;
        align-items: flex-start
    }

    .btn-outline-white {
        width: 100%;
        text-align: center
    }

    .hero-contact-line {
        flex-direction: column;
        gap: .5rem
    }

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

    .section-title::before,
    .section-title::after {
        max-width: 50px
    }

    .cookie-btns {
        width: 100%
    }

    .cookie-btn {
        flex: 1;
        text-align: center
    }
}
