/* =========================================================
   Nextbit v2 · estilos compartidos (portada, proyectos, kit digital)
   ========================================================= */

/* ================= BASE ================= */
:root {
    --ink: #2D2D2E;
    --dark: #1b1b1c;
    --dark-2: #262628;
    --muted: #55555a;
    --muted-2: #6b6b70;
    --line: #ececec;
    --soft: #f7f7f8;
    --star: #FBBC04;
    --radius: 16px;
}
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: 'Nunito', sans-serif; color: var(--ink); background: #fff; line-height: 1.5; }
h1, h2, h3, h4 { font-family: 'Montserrat', sans-serif; margin: 0; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: var(--ink); }
a:hover { color: #000; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.bg-soft { background: var(--soft); }
.bg-dark { background: var(--dark); color: #fff; }
.eyebrow { font-weight: 700; letter-spacing: 2px; font-size: 13px; color: var(--muted-2); text-transform: uppercase; }
.bg-dark .eyebrow { color: #a8a8ad; }
.title { font-size: 40px; line-height: 1.15; margin-top: 12px; }
.stars { color: var(--star); letter-spacing: 2px; }

.btn {
    display: inline-block; text-decoration: none; padding: 15px 28px; border-radius: 999px;
    font-weight: 700; font-size: 15px; transition: transform .2s, background .2s, color .2s; cursor: pointer;
}
.btn:hover { transform: translateY(-2px); }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-light { background: #fff; color: var(--dark); }
.btn-light:hover { color: var(--dark); }
.btn-ghost { border: 1px solid rgba(255,255,255,.45); color: #fff; }
.btn-ghost:hover { color: #fff; background: rgba(255,255,255,.1); }
.btn-outline { border: 1.5px solid var(--ink); color: var(--ink); }

/* ================= HEADER ================= */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.95); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.logo img { height: 34px; width: auto; }
.main-nav { display: flex; gap: 28px; font-weight: 600; font-size: 15px; }
.main-nav a { text-decoration: none; }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 44px; cursor: pointer; }
.header-cta { padding: 11px 20px; font-size: 14px; }

/* ================= HERO (imagen + partículas) ================= */
.hero { position: relative; color: #fff; background: url(../prova2.jpg) center center / cover no-repeat; overflow: hidden; }
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(15,15,16,.72); z-index: 0; }
.hero canvas { position: absolute; inset: 0; z-index: 1; }
.hero .container { position: relative; z-index: 2; display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 104px; padding-bottom: 96px; pointer-events: none; }
.hero .container a { pointer-events: auto; }
.hero-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.google-badge {
    align-self: flex-start; display: inline-flex; align-items: center; gap: 10px;
    background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.22);
    padding: 8px 16px; border-radius: 999px; color: #fff; text-decoration: none; font-size: 14px; font-weight: 600;
}
.google-badge:hover { color: #fff; background: rgba(255,255,255,.18); }
.google-badge .stars { font-size: 16px; }
.hero h1 { font-size: 56px; line-height: 1.08; font-weight: 800; }
.hero-lead { font-size: 20px; line-height: 1.55; color: #dedee1; max-width: 560px; }
.hero-buttons { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stats { flex: 1 1 380px; min-width: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stat { background: rgba(38,38,40,.78); border: 1px solid rgba(255,255,255,.08); border-radius: var(--radius); padding: 28px; }
.stat-num { font-family: 'Montserrat', sans-serif; font-size: 44px; font-weight: 800; line-height: 1.1; }
.stat-num.is-star { color: var(--star); }
.stat-label { color: #c4c4c8; margin-top: 6px; }

/* ================= CLIENTES ================= */
.clients { border-bottom: 1px solid var(--line); }
.clients .container { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 14px 40px; align-items: center; justify-content: center; color: var(--muted-2); font-weight: 600; font-size: 15px; }

/* ================= SERVICIOS ================= */
.section-head { max-width: 640px; margin-bottom: 48px; }
.cards-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 24px; }
.card { background: #fff; border-radius: var(--radius); padding: 36px; display: flex; flex-direction: column; gap: 16px; transition: transform .25s, box-shadow .25s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.08); }
.card h3 { font-size: 22px; }
.card p { line-height: 1.6; color: var(--muted); }
.card .tags { font-size: 14px; font-weight: 700; color: var(--ink); }
.services-extra { margin-top: 32px; color: var(--muted); }
.services-extra a { font-weight: 700; }

/* ================= PROYECTOS ================= */
.projects-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 40px; }
.projects-head .section-head { margin-bottom: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filter { font: inherit; font-size: 14px; font-weight: 700; padding: 10px 16px; border-radius: 999px; cursor: pointer; background: #fff; color: var(--ink); border: 1px solid #dcdcdf; transition: all .2s; }
.filter:hover { border-color: var(--ink); }
.filter.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
.project { text-decoration: none; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; background: #fff; transition: transform .25s, box-shadow .25s; }
.project:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(0,0,0,.08); }
.project img { width: 100%; max-height: 270px; object-fit: cover; object-position: top center; background: #ededef; }
.project-info { padding: 14px 18px 16px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.project-info strong { font-size: 15px; overflow-wrap: anywhere; }
.project-info span { flex-shrink: 0; font-size: 12px; background: #f2f2f3; padding: 4px 10px; border-radius: 999px; color: var(--muted); }
.project.is-hidden { display: none; }
.projects-more { text-align: center; margin-top: 40px; }

/* ================= OPINIONES ================= */
.reviews-head { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; justify-content: space-between; margin-bottom: 48px; }
.reviews-head .section-head { margin-bottom: 0; }
.rating-box { background: #fff; color: var(--dark); border-radius: var(--radius); padding: 22px 28px; display: flex; gap: 20px; align-items: center; }
.rating-num { font-family: 'Montserrat', sans-serif; font-size: 48px; font-weight: 800; }
.rating-box .stars { font-size: 22px; display: block; }
.rating-box small { display: block; font-size: 14px; color: var(--muted); }
.rating-box a { font-size: 14px; font-weight: 700; }
.review { background: var(--dark-2); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.review blockquote { margin: 0; line-height: 1.65; color: #e4e4e7; }
.review-author { display: flex; align-items: center; gap: 12px; margin-top: auto; }
.avatar { width: 42px; height: 42px; border-radius: 50%; background: #3a3a3d; display: flex; align-items: center; justify-content: center; font-weight: 700; }
.review-author small { display: block; font-size: 13px; color: #a8a8ad; }

/* ================= CÓMO TRABAJO ================= */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; }
.step-num { font-family: 'Montserrat', sans-serif; font-weight: 800; font-size: 28px; color: #b0b0b5; }
.step h3 { font-size: 19px; margin: 10px 0; }
.step p { line-height: 1.6; color: var(--muted); }

/* ================= SOBRE MÍ ================= */
.about { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; }
.about-photo { flex: 1 1 320px; min-width: 0; border-radius: 20px; background: var(--soft); overflow: hidden; display: flex; justify-content: center; align-items: flex-end; min-height: 420px; }
.about-photo img { max-height: 460px; width: auto; }
.about-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
.about-text p { font-size: 18px; line-height: 1.7; color: var(--muted); }
.chips { display: flex; gap: 10px; flex-wrap: wrap; }
.chips span { border: 1px solid #dcdcdf; padding: 8px 14px; border-radius: 999px; font-size: 14px; font-weight: 700; }

/* ================= CONTACTO ================= */
.contact-grid { display: flex; flex-wrap: wrap; gap: 40px; align-items: stretch; }
.contact-info { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.contact-info .lead { font-size: 18px; line-height: 1.6; color: #cfcfd2; margin-bottom: 8px; }
.info-item { display: flex; gap: 16px; align-items: flex-start; background: var(--dark-2); border-radius: 14px; padding: 18px 20px; }
.info-item svg { flex-shrink: 0; margin-top: 2px; }
.info-item strong { display: block; font-family: 'Montserrat', sans-serif; font-size: 15px; margin-bottom: 2px; }
.info-item span, .info-item a { color: #cfcfd2; text-decoration: none; line-height: 1.6; }
.info-item a:hover { color: #fff; }
.contact-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 8px; }
.btn-whatsapp { background: #25D366; color: #0b2d17; }
.btn-whatsapp:hover { color: #0b2d17; }
.contact-map { flex: 1 1 520px; min-width: 0; border-radius: 20px; overflow: hidden; min-height: 460px; background: var(--dark-2); }
.contact-map iframe { width: 100%; height: 100%; min-height: 460px; border: 0; display: block; filter: grayscale(.35); }

/* ================= FOOTER ================= */
.site-footer { background: #111112; color: #a8a8ad; font-size: 14px; }
.site-footer .container { padding-top: 28px; padding-bottom: 28px; display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; }
.site-footer a { color: #a8a8ad; margin-left: 20px; }
.site-footer a:hover { color: #fff; }

/* ================= WHATSAPP FLOTANTE ================= */
.whatsapp-float { position: fixed; right: 10px; bottom: 10px; z-index: 100; transition: transform .2s; }
.whatsapp-float:hover { transform: scale(1.04); }
.whatsapp-float img { width: 180px; height: auto; }

/* ================= RESPONSIVE ================= */
@media (max-width: 991px) {
    .nav-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .main-nav { display: none; position: absolute; top: 100%; left: 0; right: 0; background: #fff; flex-direction: column; gap: 0; border-bottom: 1px solid var(--line); }
    .main-nav.open { display: flex; }
    .main-nav a { padding: 14px 24px; border-top: 1px solid var(--line); }
    .header-cta { display: none; }
}
@media (max-width: 600px) {
    .section { padding: 64px 0; }
    .hero .container { padding-top: 64px; padding-bottom: 64px; gap: 36px; }
    .hero h1 { font-size: 38px; }
    .hero-lead { font-size: 17px; }
    .stat { padding: 20px; }
    .stat-num { font-size: 32px; }
    .title { font-size: 30px; }
    .card, .review { padding: 26px; }
    .whatsapp-float img { width: 140px; }
}
    

/* ================= NAV: página activa ================= */
.main-nav a.is-active { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }

/* ================= HERO DE PÁGINAS INTERIORES ================= */
.hero--page .container { padding-top: 88px; padding-bottom: 80px; justify-content: center; text-align: center; }
.hero--page .hero-text { flex: 0 1 820px; align-items: center; }
.hero--page .google-badge { align-self: center; }
.hero--page h1 { font-size: 52px; }
.hero--page .hero-lead { margin: 0 auto; }
.hero-mini-stats { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: center; color: #dedee1; font-weight: 600; }
.hero-mini-stats strong { font-family: 'Montserrat', sans-serif; color: #fff; font-size: 20px; margin-right: 6px; }

/* ================= PROYECTOS: barra de filtros fija ================= */
.filters-bar { position: sticky; top: 65px; z-index: 20; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(6px); }
.filters-bar .container { padding-top: 14px; padding-bottom: 14px; }
.filters-bar .filters { justify-content: center; }
.filter .count { font-weight: 600; opacity: .55; margin-left: 4px; }
.filter.active .count { opacity: .75; }
.results-line { color: var(--muted); margin-bottom: 28px; }
.results-line strong { color: var(--ink); }
.cat-title { font-size: 26px; margin: 56px 0 20px; display: flex; align-items: baseline; gap: 12px; }
.cat-title:first-child { margin-top: 0; }
.cat-title small { font-family: 'Nunito', sans-serif; font-size: 15px; font-weight: 600; color: var(--muted-2); }
.cat-block.is-hidden { display: none; }

/* ================= FRANJA CTA ================= */
.cta-band { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; justify-content: space-between; }
.cta-band .title { margin-top: 0; }
.cta-band p { color: #cfcfd2; font-size: 18px; margin-top: 10px; }
.cta-band .contact-buttons { margin-top: 0; }

/* ================= KIT DIGITAL ================= */
.notice { display: flex; gap: 16px; align-items: flex-start; background: #fff8e1; border: 1px solid #f3dc8a; color: #4a3b00; border-radius: 14px; padding: 18px 22px; margin-bottom: 48px; line-height: 1.6; }
.notice svg { flex-shrink: 0; margin-top: 2px; }
.notice a { color: #4a3b00; font-weight: 700; }
.kit-intro { display: flex; flex-wrap: wrap; gap: 32px; align-items: center; margin-bottom: 64px; }
.kit-intro-text { flex: 1 1 100%; min-width: 0; max-width: 820px; display: flex; flex-direction: column; gap: 16px; }
.kit-intro-text p { font-size: 18px; line-height: 1.7; color: var(--muted); }
.kit-intro-img { flex: 1 1 100%; min-width: 0; border-radius: 14px; border: 1px solid var(--line); background: #fff; padding: 20px 24px; }
.kit-intro-img img { width: 100%; height: auto; }
.kit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 24px; align-items: start; }
.kit-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; display: flex; flex-direction: column; gap: 18px; }
.kit-card h3 { font-size: 21px; }
.kit-card .kit-sum { color: var(--muted); line-height: 1.6; }
.kit-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.kit-list li { display: flex; gap: 12px; line-height: 1.6; color: var(--muted); font-size: 15px; }
.kit-list li svg { flex-shrink: 0; margin-top: 4px; }
.kit-list li strong { color: var(--ink); }
.kit-card details summary { cursor: pointer; font-weight: 700; list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 10px 0; }
.kit-card details summary::-webkit-details-marker { display: none; }
.kit-card details summary::after { content: "+"; font-size: 20px; line-height: 1; }
.kit-card details[open] summary::after { content: "–"; }
.kit-card details[open] summary { margin-bottom: 8px; }

@media (max-width: 600px) {
    .hero--page .container { padding-top: 56px; padding-bottom: 56px; }
    .hero--page h1 { font-size: 34px; }
    .filters-bar { top: 73px; }
    .filters-bar .filters { flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 4px; }
    .filter { flex-shrink: 0; }
    .kit-card { padding: 24px; }
}

/* ================= PROYECTOS: carrusel por sector ================= */
.cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 56px 0 20px; }
.cat-block:first-of-type .cat-head, .cat-block.is-first .cat-head { margin-top: 0; }
.cat-head .cat-title { margin: 0; min-width: 0; flex-wrap: wrap; row-gap: 2px; }
.cat-arrows { display: flex; gap: 8px; flex-shrink: 0; }
.cat-carousel { position: relative; }
.cat-track {
    display: flex; gap: 24px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    padding: 4px 2px 12px; scrollbar-width: none;
}
.cat-track::-webkit-scrollbar { display: none; }
.cat-track .project { flex: 0 0 calc((100% - 72px) / 4); scroll-snap-align: start; }
.cat-arrow {
    width: 44px; height: 44px; border-radius: 50%; border: 1px solid #dcdcdf; background: #fff; color: var(--ink);
    display: inline-flex; align-items: center; justify-content: center; cursor: pointer; transition: all .2s;
}
.cat-arrow:hover:not(:disabled) { background: var(--ink); color: #fff; border-color: var(--ink); }
.cat-arrow:disabled { opacity: .3; cursor: default; }
.cat-carousel .cat-arrow.side { position: absolute; top: 95px; z-index: 3; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.cat-carousel .cat-arrow.side.prev { left: -22px; }
.cat-carousel .cat-arrow.side.next { right: -22px; }
.cat-carousel .cat-arrow.side:disabled { opacity: 0; pointer-events: none; }
.cat-carousel .cat-arrow.side.hidden-all { display: none; }
@media (max-width: 1100px) { .cat-track .project { flex-basis: calc((100% - 48px) / 3); } }
@media (max-width: 800px)  { .cat-track .project { flex-basis: calc((100% - 24px) / 2); } }
@media (max-width: 600px)  {
    .cat-track { gap: 14px; }
    .cat-track .project { flex-basis: 72%; }
    .cat-carousel .cat-arrow.side { display: none; }
    .cat-head { margin-top: 40px; gap: 10px; }
    .cat-head .cat-title { font-size: 21px; gap: 8px; }
    .cat-head .cat-title small { font-size: 13px; }
    .cat-arrows .cat-arrow { width: 38px; height: 38px; }
}

/* ================= AVISO LEGAL ================= */
.hero--legal .container { padding-top: 64px; padding-bottom: 56px; }
.hero--legal h1 { font-size: 44px; }
.legal { max-width: 820px; margin: 0 auto; color: var(--muted); font-size: 16px; line-height: 1.75; }
.legal p { margin: 0 0 14px; }
.legal p strong { color: var(--ink); }
.legal p > strong:only-child { display: block; font-family: 'Montserrat', sans-serif; font-size: 19px; margin-top: 34px; }
.legal p:first-child > strong:only-child { margin-top: 0; font-size: 16px; }
@media (max-width: 600px) { .hero--legal h1 { font-size: 32px; } .legal { font-size: 15px; } }
