:root {
    --sand: #f5ede0;
    --linen: #ede0cc;
    --caramel: #c08b5c;
    --espresso: #4a2e1a;
    --olive: #7a8c5c;
    --cream: #fdf8f2;
    --dark: #1e1209;
    --accent: #d4943a;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'DM Sans', sans-serif;
    background-color: var(--cream);
    color: var(--espresso);
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='200' height='200' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    opacity: .5;
}

section {
    position: relative;
    z-index: 1;
}

.navbar {
    background: rgba(253, 248, 242, .92);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--linen);
    padding: .9rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: box-shadow .3s;
}

.navbar.scrolled {
    box-shadow: 0 4px 20px rgba(74, 46, 26, .1);
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--espresso) !important;
    letter-spacing: .02em;
}

@media (min-width: 768px) {
    .navbar-brand {
        font-size: 1.55rem;
    }
}

.navbar-brand span {
    color: var(--accent);
    font-style: italic;
}

.nav-link {
    font-size: .85rem;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--espresso) !important;
    font-weight: 500;
    transition: color .2s;
}

.nav-link:hover {
    color: var(--caramel) !important;
}

.nav-link.active-page {
    color: var(--accent) !important;
}

.btn-nav {
    background: var(--espresso);
    color: var(--cream) !important;
    border-radius: 2px;
    padding: .45rem 1.1rem;
    font-size: .8rem;
    letter-spacing: .1em;
    text-transform: uppercase;
    transition: background .25s;
    display: inline-block;
    text-align: center;
    text-decoration: none;
}

.btn-nav:hover {
    background: var(--accent);
}

.navbar-toggler {
    border: 1px solid var(--caramel);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%234a2e1a' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

.hero {
    display: flex;
    align-items: center;
    position: relative;
    padding: 2rem 0;
    background:
        linear-gradient(135deg, rgba(74, 46, 26, .7) 0%, rgba(74, 46, 26, .3) 100%),
        url('../img/img_portada.png') center/cover no-repeat;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--cream), transparent);
}

.hero-badge {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    font-size: .7rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    padding: .35rem .9rem;
    border-radius: 2px;
    margin-bottom: 1rem;
}

.hero-content {
    width: 100%;
    padding: 1rem;
    background: rgba(74, 46, 26, 0.3);
    backdrop-filter: blur(8px);
    border-radius: 16px;
}

@media (min-width: 768px) {
    .hero-content {
        background: transparent;
        backdrop-filter: none;
        padding: 0;
    }
}

.hero h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 6vw, 5.5rem);
    line-height: 1.15;
    color: #fff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .hero h1 {
        line-height: 1.08;
        text-shadow: none;
    }
}

.hero h1 em {
    color: var(--accent);
    font-style: italic;
}

.hero p {
    font-size: clamp(0.9rem, 3vw, 1.15rem);
    color: rgba(255, 255, 255, 0.95);
    max-width: 100%;
    font-weight: 400;
    line-height: 1.6;
    margin-bottom: 1.8rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

@media (min-width: 768px) {
    .hero p {
        max-width: 500px;
        color: rgba(255, 255, 255, .85);
        font-weight: 300;
        text-shadow: none;
    }
}

.hero-description {
    background: #4a2e1a;
    padding: 1rem 1.2rem;
    border-radius: 8px;
    color: var(--espresso);
    border-left: 3px solid var(--accent);
    backdrop-filter: blur(2px);
}

@media (max-width: 767px) {
    .hero-description {
        background: transparent;
        padding: 0;
        border-left: none;
        backdrop-filter: none;
    }
}

.stats-bar {
    background: var(--espresso);
    padding: 1.4rem 0;
}

.stats-bar-clientes {
    background: var(--caramel);
    padding: 0.5rem 0;
}

.stats-bar-foot {
    background: var(--sand);
    padding: 0.5rem 0;
}

.img-box {
    width: 100%;
    min-height: 100px;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    padding: .5rem;
    overflow: hidden;
    /* evita desbordes raros */
    transition: transform .3s ease, box-shadow .3s ease;
}

.img-box {
    aspect-ratio: 3 / 1;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform .3s ease;
}

.img-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .08);
}

.img-box:hover img {
    transform: scale(1.05);
}


.stat-item {
    text-align: center;
}

.stat-item .num {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 4vw, 2.6rem);
    color: var(--accent);
    line-height: 1;
}

.stat-item .lbl {
    font-size: .65rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .6);
    margin-top: .25rem;
}

@media (min-width: 768px) {
    .stat-item .lbl {
        font-size: .72rem;
    }
}

.section-tag {
    font-size: .7rem;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--olive);
    font-weight: 500;
    margin-bottom: .6rem;
}

.section-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.6rem, 5vw, 3rem);
    line-height: 1.2;
    color: var(--espresso);
}

.section-title em {
    color: var(--accent);
    font-style: italic;
}

.divider-natural {
    height: 2px;
    width: 60px;
    background: linear-gradient(90deg, var(--accent), var(--olive));
    border-radius: 2px;
    margin: 1rem 0 1.5rem;
}

.modal-content {
    background: transparent;
    border: none;
}

.modal-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 1rem;
    position: relative;
}

#modalImage {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: 12px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, .3);
    cursor: default;
}

.btn-close-modal {
    position: absolute;
    top: -15px;
    right: -15px;
    z-index: 1060;
    background: var(--espresso);
    border: 2px solid var(--accent);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all .3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
}

.btn-close-modal i {
    color: var(--cream);
    font-size: 1.2rem;
    transition: transform .2s;
}

.btn-close-modal:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.btn-close-modal:hover i {
    transform: rotate(90deg);
}

@media (max-width: 768px) {
    .btn-close-modal {
        top: -10px;
        right: -10px;
        width: 36px;
        height: 36px;
    }

    .btn-close-modal i {
        font-size: 1rem;
    }
}

footer {
    background: var(--dark);
    padding: 2rem 0 1.5rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    footer {
        padding: 3.5rem 0 1.5rem;
    }
}

.footer-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--cream);
}

.footer-brand span {
    color: var(--accent);
    font-style: italic;
}

.footer-desc {
    font-size: .85rem;
    color: rgba(255, 255, 255, .45);
    line-height: 1.6;
    margin-top: .8rem;
}

.footer-title {
    font-size: .7rem;
    letter-spacing: .15em;
    text-transform: uppercase;
    color: var(--accent);
    margin-bottom: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: .5rem;
}

.footer-links a {
    font-size: .85rem;
    color: rgba(255, 255, 255, .45);
    text-decoration: none;
    transition: color .2s;
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-divider {
    border-color: rgba(255, 255, 255, .08);
    margin: 1.5rem 0 1rem;
}

.footer-copy {
    font-size: .7rem;
    color: rgba(255, 255, 255, .25);
    text-align: center;
}

@media (min-width: 768px) {
    .footer-copy {
        font-size: .78rem;
    }
}

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: 2px;
    color: rgba(255, 255, 255, .45);
    text-decoration: none;
    transition: all .2s;
    font-size: .9rem;
}

@media (min-width: 768px) {
    .social-icon {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }
}

.social-icon:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.wa-container {
    position: fixed;
    bottom: 1.5rem;
    right: 1rem;
    display: flex;
    gap: 10px;
    /* separación */
    z-index: 999;
}

.wa-float-wp {
    background: #25d366;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

.wa-float-facebook {
    background: #0866FF;
    color: #fff;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s;
}

.wa1 {
    right: 20px;
}

.wa2 {
    right: 80px;
}

@media (min-width: 768px) {
    .wa-float {
        bottom: 1.8rem;
        right: 1.5rem;
        width: 56px;
        height: 56px;
        font-size: 1.6rem;
    }
}

.wa-float:hover {
    transform: scale(1.1);
    color: #fff;
    box-shadow: 0 8px 28px rgba(37, 211, 102, .6);
}

.back-to-top {
    position: fixed;
    bottom: 5.5rem;
    right: 1rem;
    z-index: 998;
    background: var(--espresso);
    color: var(--cream);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    text-decoration: none;
    box-shadow: 0 4px 14px rgba(74, 46, 26, .35);
    opacity: 0;
    transform: translateY(10px);
    transition: opacity .3s, transform .3s, background .2s;
    pointer-events: none;
}

.back-to-top.visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top:hover {
    background: var(--accent);
    color: #fff;
}

@media (min-width: 768px) {
    .back-to-top {
        bottom: 6rem;
        right: 1.5rem;
        width: 44px;
        height: 44px;
    }
}

.cta-section {
    padding: 10rem 0;
    background:
        linear-gradient(135deg, rgba(74, 46, 26, 0.5) 0%, rgba(192, 139, 92, 0.4) 100%),
        url('../img/img_footer_2.jpg') center 20% / cover no-repeat;
    text-align: center;
    min-height: 600px;
    display: flex;
    align-items: center;
}

.cta-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    margin: 0 auto;
}

.cta-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2rem, 6vw, 4.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 2rem;
    line-height: 1.2;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.02em;
}

.cta-title em {
    color: var(--accent);
    font-style: italic;
    font-weight: 700;
}

.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    background: var(--accent);
    color: #fff;
    padding: .9rem 2.2rem;
    font-size: .9rem;
    letter-spacing: .12em;
    text-transform: uppercase;
    border-radius: 2px;
    text-decoration: none;
    transition: background .25s, transform .2s;
}

.btn-cta:hover {
    background: var(--caramel);
    color: #fff;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .cta-section {
        padding: 5rem 1rem;
        min-height: 400px;
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(28px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-content>* {
    opacity: 0;
    animation: fadeUp .8s ease forwards;
}

.hero-content>*:nth-child(1) {
    animation-delay: .1s;
}

.hero-content>*:nth-child(2) {
    animation-delay: .3s;
}

.hero-content>*:nth-child(3) {
    animation-delay: .5s;
}

.hero-content>*:nth-child(4) {
    animation-delay: .7s;
}