/* =====================================================================
   Digitalagentur-Verzeichnis — hoja de estilos v5 "SEO, Webdesign & Digitalagenturen"
   Rediseño visual manteniendo TODOS los nombres de clase existentes.
   Dirección: directorio profesional para agencias digitales:
   azul/índigo para tecnología y confianza, cian para detalle digital,
   dorado suave para valoraciones y superficies claras tipo producto SaaS.
   ===================================================================== */

:root {
    --page: #f4f7fb;           /* fondo digital claro */
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --surface-3: #e2e8f0;
    --ink: #0f172a;            /* azul noche */
    --ink-2: #334155;
    --muted: #64748b;
    --line: #dbe3ef;
    --line-2: #e8eef7;

    --brand: #2563eb;          /* azul digital */
    --brand-strong: #1e40af;
    --brand-ink: #0f172a;      /* navy tecnológico */
    --brand-tint: #e8f1ff;
    --brand-tint-2: #bfd7ff;

    --star: #06b6d4;           /* cian digital */
    --star-soft: #dff8ff;

    --danger: #b42318;
    --danger-soft: #fbeee9;
    --ok: #047857;
    --ok-soft: #e6f1ea;

    --shadow-1: 0 1px 2px rgba(15, 23, 42, .06);
    --shadow-2: 0 1px 2px rgba(15, 23, 42, .06), 0 10px 24px rgba(15, 23, 42, .09);
    --shadow-3: 0 12px 34px rgba(15, 23, 42, .15);

    --radius-xl: 18px;
    --radius-lg: 14px;
    --radius-md: 11px;
    --radius-sm: 8px;

    --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --font-display: "Manrope", "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--ink);
    background: var(--page);
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1, h2, h3, .logo-text strong { font-family: var(--font-display); }
a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-strong); }
img { max-width: 100%; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid rgba(37, 99, 235, .42); outline-offset: 2px; border-radius: 4px; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 22px; }

/* ============================ Header ============================ */
.site-header {
    position: sticky;             /* buscador siempre a mano, como los directorios grandes */
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    backdrop-filter: blur(10px);
}
.top-strip {
    background: var(--brand-ink);
    color: rgba(255, 255, 255, .82);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .01em;
}
.top-strip .wrap {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.top-strip span { display: inline-flex; align-items: center; gap: 8px; }
.top-strip span::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--star); }
.nav-wrap {
    min-height: 74px;
    display: grid;
    grid-template-columns: auto minmax(300px, 1fr) auto;
    align-items: center;
    gap: 22px;
}
.logo { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); min-width: 0; }
.logo:hover { color: var(--ink); }
.logo-mark {
    width: 44px; height: 44px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: linear-gradient(150deg, var(--brand), #7c3aed);
    color: #fff;
    font-weight: 800;
    font-family: var(--font-display);
    letter-spacing: -.04em;
    box-shadow: 0 6px 16px rgba(15, 23, 42, .24);
}
.logo-text { display: grid; line-height: 1.1; }
.logo-text strong { font-size: 16px; font-weight: 800; letter-spacing: -.015em; max-width: 260px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.logo-text small { color: var(--muted); font-size: 11.5px; font-weight: 600; margin-top: 3px; text-transform: uppercase; letter-spacing: .07em; }

.main-nav { display: flex; align-items: center; justify-content: flex-end; gap: 4px; font-size: 14px; font-weight: 600; }
.main-nav a { color: var(--ink-2); padding: 8px 12px; border-radius: 8px; }
.main-nav a:hover { color: var(--brand); background: var(--brand-tint); }

.search-form { display: flex; align-items: center; gap: 6px; width: 100%; background: #fff; border: 1.5px solid var(--line); border-radius: 10px; padding: 5px 5px 5px 6px; transition: border-color .15s ease, box-shadow .15s ease; }
.search-form:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
.search-form::before { content: "⌕"; color: var(--muted); font-size: 20px; margin-left: 8px; line-height: 1; }
.search-form input { min-width: 0; flex: 1; border: 0; outline: none; background: transparent; padding: 9px 4px; color: var(--ink); }

.search-form button, .hero-search button, .claim-form button, .primary-btn, .secondary-btn {
    border: 0; border-radius: 9px; padding: 11px 18px;
    font-weight: 700; font-size: 14px; color: #fff; background: var(--brand);
    cursor: pointer; white-space: nowrap; transition: background .15s ease, transform .05s ease;
}
.search-form button:hover, .hero-search button:hover, .claim-form button:hover, .primary-btn:hover { background: var(--brand-strong); color: #fff; }
.search-form button:active, .primary-btn:active { transform: translateY(1px); }
.secondary-btn { background: #fff; color: var(--brand); border: 1.5px solid var(--line); }
.secondary-btn:hover { color: var(--brand-strong); border-color: var(--brand-tint-2); background: var(--brand-tint); }

.main-content { min-height: 68vh; padding-bottom: 64px; }

/* ============================ Hero ============================ */
.hero { padding: 30px 0 8px; }
.hero-shell {
    position: relative; overflow: hidden;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 48%, #2563eb 100%);
    color: #fff;
    box-shadow: var(--shadow-2);
    padding: clamp(30px, 5vw, 58px);
}
.hero-shell::after {
    content: ""; position: absolute; inset: 0;
    background:
        radial-gradient(circle at 88% -10%, rgba(34, 211, 238, .28), transparent 42%),
        radial-gradient(circle at 100% 120%, rgba(255, 255, 255, .10), transparent 45%),
        linear-gradient(90deg, rgba(255,255,255,.07) 1px, transparent 1px),
        linear-gradient(0deg, rgba(255,255,255,.055) 1px, transparent 1px);
    background-size: auto, auto, 46px 46px, 46px 46px;
    pointer-events: none;
}
.hero-copy { position: relative; z-index: 1; max-width: 820px; }
.eyebrow, .section-head span, .kicker {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; text-transform: uppercase; letter-spacing: .1em;
    color: var(--star); font-weight: 700;
}
.hero .eyebrow { color: #ffd488; }
.eyebrow::before, .section-head span::before, .kicker::before { content: ""; width: 18px; height: 2px; border-radius: 2px; background: currentColor; }
.hero h1 {
    margin: 14px 0 14px; max-width: 760px;
    font-size: clamp(32px, 5.2vw, 56px); font-weight: 800;
    line-height: 1.04; letter-spacing: -.03em;
}
.hero p { color: rgba(255, 255, 255, .84); max-width: 640px; font-size: clamp(16px, 1.6vw, 19px); margin: 0 0 26px; }
.hero-search {
    display: grid; grid-template-columns: 1fr auto; gap: 8px;
    max-width: 700px; padding: 7px; border-radius: 13px;
    background: #fff; box-shadow: 0 14px 34px rgba(15, 23, 42, .24);
}
.hero-search input { width: 100%; border: 0; outline: none; background: transparent; padding: 13px 16px; color: var(--ink); font-size: 16px; }
.hero-search button { padding: 13px 26px; font-size: 15px; }
.quick-links { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 20px; color: rgba(255, 255, 255, .72); font-size: 13.5px; font-weight: 600; }
.quick-links a { color: #fff; background: rgba(255, 255, 255, .12); border: 1px solid rgba(255, 255, 255, .18); padding: 6px 13px; border-radius: 999px; font-weight: 600; }
.quick-links a:hover { background: rgba(255, 255, 255, .22); color: #fff; }

/* ============================ Stats ============================ */
.stats-bar { margin-top: 18px; position: relative; z-index: 3; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.stat-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md);
    padding: 20px 22px; box-shadow: var(--shadow-1);
    display: flex; flex-direction: column;
}
.stat-card strong { font-family: var(--font-display); font-size: clamp(26px, 3.4vw, 36px); font-weight: 800; line-height: 1; letter-spacing: -.02em; color: var(--brand); }
.stat-card span { margin-top: 7px; color: var(--muted); font-weight: 600; font-size: 14px; }

/* ===================== Discovery (categorías/ciudades) ===================== */
.discovery-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-top: 40px; }
.panel-list, .content-card, .side-card, .page-hero, .business-card, .claim-card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-1);
}
.panel-list { padding: clamp(22px, 3vw, 30px); }
.section-block { margin-top: 46px; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section-head h2, .page-hero h1 { margin: 6px 0 0; line-height: 1.12; letter-spacing: -.02em; color: var(--ink); font-weight: 800; }
.section-head h2 { font-size: clamp(23px, 3vw, 32px); }
.section-head p { margin: 0; color: var(--muted); max-width: 520px; font-size: 14.5px; }
.section-head .details-link { white-space: nowrap; }

.lista-tags { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.lista-tags a {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    min-height: 46px; background: var(--surface-2); border: 1px solid var(--line-2);
    border-radius: 10px; padding: 9px 12px 9px 13px; color: var(--ink-2); font-weight: 600; font-size: 14px;
    transition: background .13s ease, border-color .13s ease, transform .13s ease;
}
.lista-tags a::before { content: ""; width: 6px; height: 6px; border-radius: 999px; background: var(--brand); flex: 0 0 auto; }
.lista-tags a span { margin-left: auto; color: var(--muted); font-size: 12px; font-weight: 700; background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; }
.lista-tags a:hover { background: #fff; border-color: var(--brand-tint-2); transform: translateX(2px); color: var(--brand); }
.lista-tags a:hover::before { background: var(--brand); }

/* ============================ Listados (FILAS) ============================ */
.resultados-info {
    display: inline-flex; align-items: center; gap: 8px; color: var(--ink-2);
    margin-bottom: 16px; font-size: 14px; font-weight: 700;
    background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px;
}
.resultados-info::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: var(--brand); }

.grid-fichas { display: flex; flex-direction: column; gap: 12px; }
.business-card {
    display: grid; grid-template-columns: 210px 1fr; align-items: stretch;
    overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.business-card:hover { border-color: var(--brand-tint-2); box-shadow: var(--shadow-2); transform: translateY(-2px); }
.card-media { position: relative; overflow: hidden; min-height: 158px; background: linear-gradient(135deg, #e8e1d7, #f8f5ef); display: block; }
.card-media img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s ease; }
.business-card:hover .card-media img { transform: scale(1.05); }
.image-effect { position: relative; }
.image-effect::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 32, 27, 0) 55%, rgba(20, 32, 27, .28)); pointer-events: none; }
.img-placeholder { width: 100%; height: 100%; min-height: 158px; display: grid; place-items: center; background: linear-gradient(135deg, #e8e1d7, #f8f5ef); }
.img-placeholder::before { content: "Kein Bild"; color: rgba(42, 36, 26, .34); font-weight: 700; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; }

.rating-pill {
    position: absolute; right: 11px; top: 11px; bottom: auto; z-index: 2;
    background: #fff; color: var(--star); padding: 5px 9px; border-radius: 8px;
    font-size: 13px; font-weight: 800; box-shadow: var(--shadow-2); letter-spacing: -.01em;
}
.card-content { padding: 16px 18px; display: flex; flex-direction: column; min-width: 0; }
.card-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.badge-categoria {
    display: inline-flex; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
    font-size: 11.5px; background: var(--brand-tint); color: var(--brand-strong);
    padding: 4px 10px; border-radius: 6px; font-weight: 700; letter-spacing: .01em;
}
.badge-categoria.big { font-size: 12px; padding: 6px 12px; border-radius: 8px; }
.city-mini { color: var(--muted); font-size: 12.5px; font-weight: 600; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px; }
.city-mini::before { content: "◦"; color: var(--brand); font-weight: 900; }
.card-content h3 { margin: 0 0 6px; font-size: 18px; font-weight: 700; line-height: 1.25; letter-spacing: -.015em; }
.card-content h3 a { color: var(--ink); }
.card-content h3 a:hover { color: var(--brand); }
.card-direccion { font-size: 13.5px; color: var(--muted); margin: 0 0 14px; line-height: 1.5; }
.card-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid var(--line-2); padding-top: 12px; margin-top: auto; }
.card-rating { color: var(--star); font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; gap: 5px; }
.card-rating::before { content: "★"; font-size: 13px; }
.details-link { color: var(--brand); font-size: 13.5px; font-weight: 700; display: inline-flex; align-items: center; gap: 4px; }
.details-link:hover { color: var(--brand-strong); }
.details-link::after { content: "→"; transition: transform .15s ease; }
.details-link:hover::after { transform: translateX(3px); }

.paginacion { display: flex; gap: 8px; justify-content: center; align-items: center; margin-top: 34px; font-size: 14px; flex-wrap: wrap; }
.paginacion a, .pagina-actual { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 10px 16px; font-weight: 700; box-shadow: var(--shadow-1); }
.paginacion a:hover { border-color: var(--brand-tint-2); color: var(--brand); background: var(--brand-tint); }
.pagina-actual { color: var(--muted); }
.sin-resultados { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 22px; color: var(--muted); font-weight: 600; }

/* ============================ Páginas interiores ============================ */
.page-hero { padding: clamp(24px, 3.4vw, 38px); margin-top: 30px; }
.page-hero.small { margin-top: 26px; }
.page-hero h1 { font-size: clamp(28px, 4vw, 44px); }
.page-hero p { color: var(--muted); margin: 10px 0 0; font-weight: 500; font-size: 15px; }
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 14px; font-weight: 600; }
.breadcrumbs a { color: var(--brand); }

/* ============================ Ficha ============================ */
.ficha-detalle { padding-top: 26px; }
.profile-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(340px, .95fr); gap: 22px; margin-bottom: 22px; }
.profile-intro {
    position: relative; overflow: hidden; border-radius: var(--radius-xl);
    background: linear-gradient(150deg, var(--brand) 0%, var(--brand-strong) 70%, var(--brand-ink) 100%);
    color: #fff; padding: clamp(28px, 4vw, 46px); box-shadow: var(--shadow-2);
}
.profile-intro::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 92% -8%, rgba(6, 182, 212, .20), transparent 45%); pointer-events: none; }
.profile-intro > * { position: relative; z-index: 1; }
.profile-intro h1 { margin: 12px 0 10px; font-size: clamp(30px, 4.4vw, 50px); font-weight: 800; line-height: 1.05; letter-spacing: -.03em; }
.intro-line { color: rgba(255, 255, 255, .82); font-size: 16px; max-width: 640px; }
.rating-grande { display: inline-flex; align-items: center; gap: 10px; margin: 16px 0 0; color: #ffd488; font-size: 20px; font-weight: 800; }
.rating-grande span { color: rgba(255, 255, 255, .74); font-size: 13.5px; font-weight: 600; }
.profile-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px; margin-top: 22px; }
.profile-actions a { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; }
.profile-media { display: grid; grid-template-columns: 1.4fr .8fr; gap: 10px; min-height: 100%; }
.main-photo, .side-photo { margin: 0; position: relative; overflow: hidden; border-radius: var(--radius-lg); background: #efe7d4; box-shadow: var(--shadow-1); min-height: 320px; }
.main-photo img, .side-photo img, .galeria-imagenes img { width: 100%; height: 100%; object-fit: cover; display: block; }
.side-photo figcaption { position: absolute; left: 12px; bottom: 12px; z-index: 2; color: #fff; background: rgba(15, 23, 42, .82); border-radius: 8px; padding: 5px 10px; font-size: 12px; font-weight: 700; backdrop-filter: blur(6px); }

.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 350px; gap: 22px; align-items: start; }
.detail-main { display: grid; gap: 18px; }
.content-card, .side-card { padding: clamp(22px, 3vw, 28px); }
.content-card h2, .side-card h2 { margin: 0 0 15px; font-size: 21px; font-weight: 800; line-height: 1.2; letter-spacing: -.02em; }
.content-card p:first-child { margin-top: 0; }
.content-card p:last-child { margin-bottom: 0; }
.descripcion { font-size: 15.5px; }
.side-card { position: sticky; top: 96px; }
.datos-contacto h2 { margin-bottom: 6px; }
.contact-note { color: var(--muted); margin: 0 0 16px; font-size: 14px; font-weight: 500; }
.contact-row { display: grid; gap: 4px; border-top: 1px solid var(--line-2); padding-top: 13px; margin-top: 13px; }
.contact-row span { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.contact-row a, .contact-row strong { color: var(--ink); font-weight: 700; overflow-wrap: anywhere; }
.contact-row a:hover { color: var(--brand); }
.sidebar-cta { display: grid; gap: 9px; margin-top: 16px; }
.hours-box table { width: 100%; border-collapse: collapse; }
.hours-box td, .hours-box th { border-bottom: 1px solid var(--line-2); padding: 9px 6px; text-align: left; font-size: 14px; }

/* Galería */
.galeria-imagenes { overflow: hidden; position: relative; z-index: 1; }
.gallery-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 240px)); gap: 12px; align-items: start; justify-content: center; }
.gallery-item {
    display: block; justify-self: center; position: relative; width: 100%; max-width: 240px;
    aspect-ratio: 1 / 1; overflow: hidden; border-radius: var(--radius-md);
    background: linear-gradient(135deg, #dbeafe, #f8fafc); box-shadow: var(--shadow-1); isolation: isolate;
    border: 0 !important; padding: 0 !important; appearance: none; -webkit-appearance: none; cursor: zoom-in; text-align: inherit;
}
.gallery-item::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20, 32, 27, 0) 55%, rgba(20, 32, 27, .12)); opacity: .6; pointer-events: none; }
.gallery-item img { width: 100% !important; height: 100% !important; max-width: none !important; display: block !important; object-fit: cover !important; object-position: center !important; border-radius: inherit !important; transition: transform .25s ease; }
.gallery-item:hover img { transform: scale(1.04); }
.gallery-zoom-hint {
    position: absolute; right: 9px; bottom: 9px; z-index: 2; display: inline-flex; align-items: center; justify-content: center;
    min-height: 26px; padding: 0 9px; border-radius: 999px; background: rgba(15, 23, 42, .82); color: #fff;
    font-size: 10.5px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
    opacity: 0; transform: translateY(4px); transition: opacity .18s ease, transform .18s ease; pointer-events: none;
}
.gallery-item:hover .gallery-zoom-hint, .gallery-item:focus-visible .gallery-zoom-hint { opacity: 1; transform: translateY(0); }
.gallery-item:focus-visible { outline: 3px solid rgba(37, 99, 235, .5); outline-offset: 3px; }

/* Reclamación */
.claim-box { background: linear-gradient(135deg, #fff, var(--surface-2)); border-color: var(--line); }
.claim-form { display: grid; gap: 13px; margin-top: 15px; width: 100%; }
.claim-form label { display: grid; gap: 6px; color: var(--ink); font-weight: 700; font-size: 14px; }
.claim-form input, .claim-form textarea {
    width: 100%; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 13px;
    color: var(--ink); background: #fff; outline: none; transition: border-color .15s ease, box-shadow .15s ease;
}
.claim-form input:focus, .claim-form textarea:focus, .hero-search input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(37, 99, 235, .14); }
.claim-form textarea { resize: vertical; }
.success-message { background: var(--ok-soft); border: 1px solid #a8dfb9; color: var(--ok); border-radius: 10px; padding: 12px 14px; font-weight: 700; }
.hp-field { display: none; }
.claim-url-row { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--surface-2); }
.claim-url-row span { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }
.claim-url-row p { margin: 0; color: var(--muted); font-size: 13px; font-weight: 500; overflow-wrap: anywhere; }

/* CTAs de ficha sobre fondo verde */
.compact-actions .secondary-btn { background: rgba(255, 255, 255, .12); color: #fff; border-color: rgba(255, 255, 255, .24); }
.compact-actions .secondary-btn:hover { background: rgba(255, 255, 255, .2); color: #fff; border-color: rgba(255, 255, 255, .4); }
.muted-cta { border-top: 1px solid var(--line-2); padding-top: 14px; }
.text-link-cta {
    display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 9px 12px;
    border-radius: 10px; border: 1.5px solid var(--line); background: var(--surface-2); color: var(--ink-2);
    font-size: 13.5px; font-weight: 700;
}
.text-link-cta:hover { background: #fff; color: var(--brand); border-color: var(--brand-tint-2); }

.map-card { margin-top: 16px; border-top: 1px solid var(--line-2); padding-top: 16px; }
.map-card iframe { width: 100%; height: 220px; display: block; border: 0; border-radius: var(--radius-md); background: var(--surface-2); box-shadow: var(--shadow-1); }
.map-card a { display: inline-flex; margin-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--brand); }

/* Relacionados: se mantienen como TARJETAS compactas (contraste con las filas) */
.related-section { margin-top: 42px; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.related-grid .business-card { grid-template-columns: 1fr; }
.related-grid .card-media { aspect-ratio: 16 / 10; min-height: 0; }
.related-grid .card-media .rating-pill { top: auto; bottom: 11px; }

/* ============================ Buscador ============================ */
.search-page-hero { margin-top: 30px; margin-bottom: 20px; }
.search-panel {
    background: linear-gradient(135deg, #0f172a 0%, #1e40af 52%, #2563eb 100%);
    border-radius: var(--radius-xl); padding: clamp(26px, 4vw, 40px); color: #fff; box-shadow: var(--shadow-2);
    overflow: hidden; position: relative;
}
.search-panel::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 92% -12%, rgba(6, 182, 212, .18), transparent 45%); }
.search-panel h1, .search-panel p, .search-panel form { position: relative; z-index: 1; }
.search-panel h1 { margin: 0 0 8px; font-size: clamp(28px, 4vw, 46px); font-weight: 800; line-height: 1.02; letter-spacing: -.03em; }
.search-panel p { margin: 0 0 20px; max-width: 720px; color: rgba(255, 255, 255, .82); font-weight: 500; }
.search-advanced { display: grid; grid-template-columns: minmax(240px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(140px, .8fr) auto; gap: 9px; align-items: end; }
.search-advanced label { display: grid; gap: 6px; color: rgba(255, 255, 255, .8); font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.search-advanced input, .search-advanced select { width: 100%; border: 1.5px solid transparent; border-radius: 10px; padding: 13px 13px; outline: none; color: var(--ink); background: #fff; box-shadow: var(--shadow-1); }
.search-advanced input:focus, .search-advanced select:focus { border-color: var(--star); box-shadow: 0 0 0 3px rgba(6, 182, 212, .25); }
.search-advanced button { border: 0; border-radius: 10px; padding: 14px 22px; font-weight: 800; color: var(--brand-strong); background: #fff; cursor: pointer; box-shadow: var(--shadow-2); }
.search-advanced button:hover { background: var(--star-soft); }
.search-summary { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.search-summary p { margin: 0; color: var(--muted); font-weight: 500; }
.search-suggestions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.search-suggestions a { background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-weight: 600; color: var(--ink-2); box-shadow: var(--shadow-1); font-size: 13.5px; }
.search-suggestions a:hover { color: var(--brand); border-color: var(--brand-tint-2); background: var(--brand-tint); }

/* ============================ Adsense / Impressum ============================ */
.adsense-block { width: 100%; margin: 0 0 16px; padding: 10px; border-radius: var(--radius-md); background: var(--surface-2); border: 1px dashed var(--line); overflow: hidden; }
.adsense-before-company { margin-bottom: 16px; }
.impressum-content { font-size: 15.5px; }
.impressum-content h1, .impressum-content h2, .impressum-content h3 { line-height: 1.15; letter-spacing: -.02em; }
.impressum-content a { font-weight: 700; }

/* ============================ Footer ============================ */
.site-footer { border-top: 1px solid var(--line); background: #fff; color: var(--muted); padding: 40px 0 26px; margin-top: 20px; }
.footer-grid { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; }
.footer-grid strong { color: var(--ink); font-size: 17px; font-family: var(--font-display); font-weight: 800; }
.footer-grid p { margin: 8px 0 0; max-width: 600px; font-size: 14.5px; }
.footer-grid nav { display: flex; gap: 6px; flex-wrap: wrap; font-weight: 600; }
.footer-grid nav a { color: var(--ink-2); padding: 6px 10px; border-radius: 8px; }
.footer-grid nav a:hover { color: var(--brand); background: var(--brand-tint); }
.copyright { margin-top: 26px; padding-top: 18px; border-top: 1px solid var(--line-2); font-size: 13px; }

/* ============================ Lightbox ============================ */
body.lightbox-open { overflow: hidden; }
.image-lightbox { position: fixed; inset: 0; z-index: 99999; display: grid; place-items: center; padding: clamp(18px, 4vw, 46px); opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .18s ease, visibility .18s ease; }
.image-lightbox.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.image-lightbox__backdrop { position: absolute; inset: 0; border: 0; background: rgba(9, 16, 13, .8); backdrop-filter: blur(6px); cursor: zoom-out; }
.image-lightbox__figure { position: relative; z-index: 1; margin: 0; max-width: min(920px, 94vw); max-height: 88vh; border-radius: var(--radius-lg); overflow: hidden; background: #0f1a15; box-shadow: 0 30px 90px rgba(0, 0, 0, .45); transform: scale(.965); transition: transform .2s ease; }
.image-lightbox.is-open .image-lightbox__figure { transform: scale(1); }
.image-lightbox__figure img { display: block; width: auto; height: auto; max-width: min(920px, 94vw); max-height: 88vh; object-fit: contain; }
.image-lightbox__close { position: fixed; right: clamp(16px, 3vw, 34px); top: clamp(16px, 3vw, 34px); z-index: 2; width: 44px; height: 44px; border: 0; border-radius: 999px; background: #fff; color: var(--ink); font-size: 28px; line-height: 1; font-weight: 400; cursor: pointer; box-shadow: 0 14px 38px rgba(0, 0, 0, .24); }
.image-lightbox__close:hover { transform: scale(1.05); }


/* ============================ FAQ Home ============================ */
.faq-section {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-1);
    padding: clamp(24px, 3vw, 34px);
}
.faq-head { align-items: flex-start; }
.faq-list { display: grid; gap: 10px; }
.faq-item {
    border: 1px solid var(--line-2);
    border-radius: 13px;
    background: var(--surface-2);
    overflow: hidden;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.faq-item[open] {
    background: #fff;
    border-color: var(--brand-tint-2);
    box-shadow: var(--shadow-1);
}
.faq-item summary {
    cursor: pointer;
    list-style: none;
    position: relative;
    padding: 17px 52px 17px 18px;
    color: var(--ink);
    font-weight: 800;
    line-height: 1.35;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: "+";
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: var(--brand-tint);
    color: var(--brand);
    font-size: 18px;
    font-weight: 800;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
    margin: 0;
    padding: 0 18px 18px;
    color: var(--muted);
    font-size: 15px;
}

/* ============================ Responsive ============================ */
@media (min-width: 1021px) {
    .related-section .related-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1020px) {
    .site-header { position: static; }
    .nav-wrap { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "logo nav" "search search"; gap: 12px; padding: 12px 0; }
    .logo { grid-area: logo; }
    .main-nav { grid-area: nav; }
    .search-form { grid-area: search; }
    .profile-hero, .detail-layout { grid-template-columns: 1fr; }
    .profile-media { min-height: 320px; }
    .side-card { position: static; }
}
@media (max-width: 820px) {
    .top-strip { display: none; }
    .hero { padding-top: 22px; }
    .hero-shell { border-radius: var(--radius-lg); }
    .hero-search { grid-template-columns: 1fr; }
    .stats-grid, .discovery-grid { grid-template-columns: 1fr; }
    .section-head { display: block; }
    .section-head p { margin-top: 8px; }
    .section-head .details-link { margin-top: 10px; }
    .profile-media { grid-template-columns: 1fr; }
    .main-photo, .side-photo { min-height: 240px; }
    .footer-grid { grid-template-columns: 1fr; }
    .search-advanced { grid-template-columns: 1fr 1fr; }
    .search-advanced .full-field { grid-column: 1 / -1; }
    .search-advanced button { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 15px; }
    .main-nav { gap: 2px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
    .main-nav::-webkit-scrollbar { display: none; }
    .main-nav a { flex: 0 0 auto; font-size: 13px; padding: 7px 10px; white-space: nowrap; }
    .logo-text small { display: none; }
    /* Fila -> tarjeta apilada en móvil */
    .business-card { grid-template-columns: 1fr; }
    .card-media { aspect-ratio: 16 / 10; min-height: 0; }
    .card-media .rating-pill { top: auto; bottom: 11px; }
    .related-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, minmax(0, 220px)); gap: 10px; }
    .lista-tags { grid-template-columns: 1fr; }
    .search-advanced { grid-template-columns: 1fr; }
    .search-summary { align-items: flex-start; flex-direction: column; }
    .profile-actions { display: grid; }
    .profile-actions a { width: 100%; }
}
@media (max-width: 390px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .gallery-item { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
    * { animation-duration: .001ms !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* ============================ Ficha: módulos visuales y confianza ============================ */
.verified-trust {
    display: grid;
    gap: 4px;
    max-width: 520px;
    margin-top: 18px;
    padding: 14px 16px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 14px;
    background: rgba(255, 255, 255, .12);
    backdrop-filter: blur(8px);
}
.verified-trust strong { color: #fff; font-weight: 850; }
.verified-trust span { color: rgba(255, 255, 255, .82); font-size: 13.5px; font-weight: 650; }
.verified-trust small { color: #ffd488; font-size: 12.5px; font-weight: 750; }
.info-modules-card { background: linear-gradient(135deg, #fff, var(--surface-2)); }
.info-module-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 14px; }
.info-module {
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    min-height: 78px;
    padding: 14px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: var(--shadow-1);
}
.info-module-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: linear-gradient(150deg, var(--brand), #7c3aed);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}
.info-module-icon svg { width: 22px; height: 22px; }
.info-module-body { min-width: 0; display: grid; gap: 3px; }
.info-module-label { color: var(--muted); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.info-module a, .info-module strong { color: var(--ink); font-size: 14.5px; font-weight: 800; overflow-wrap: anywhere; }
.info-module a:hover { color: var(--brand); }
.editorial-note {
    border-color: #d8c7a2;
    background: linear-gradient(135deg, #fffdf7, #f7ecd2);
}
.editorial-note h2 { color: var(--brand-ink); }
.editorial-note p { color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 640px) {
    .info-module-grid { grid-template-columns: 1fr; }
    .info-module { min-height: 0; }
}

/* ============================ Home v8: búsqueda real, dinamismo y Ratgeber ============================ */
.hero-search-dual {
    grid-template-columns: minmax(180px, 1.1fr) minmax(160px, .9fr) auto;
    max-width: 900px;
    align-items: end;
}
.hero-search-dual label {
    display: grid;
    gap: 4px;
    color: var(--ink-2);
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .08em;
    background: #f7f4ee;
    border: 1px solid var(--line-2);
    border-radius: 10px;
    padding: 6px 8px 4px;
}
.hero-search-dual input { padding: 8px 8px 10px; color: var(--ink); }
.hero-search-dual input::placeholder { color: var(--muted); opacity: 1; }
.how-grid, .article-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.how-card, .article-card, .empty-editorial-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px;
    box-shadow: var(--shadow-1);
}
.how-card {
    display: grid;
    gap: 10px;
    min-height: 205px;
}
.how-icon, .live-card-head > span {
    width: 46px;
    height: 46px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    color: #fff;
    background: linear-gradient(150deg, var(--brand), #7c3aed);
    box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}
.how-icon svg, .live-card-head svg { width: 23px; height: 23px; }
.how-card strong {
    font-family: var(--font-display);
    font-size: 18px;
    color: var(--ink);
}
.how-card p, .article-card p, .empty-editorial-card p { margin: 0; color: var(--muted); }
.live-columns {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}
.live-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 18px;
    box-shadow: var(--shadow-1);
}
.live-card-head {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr);
    gap: 12px;
    align-items: start;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--line-2);
}
.live-card-head h3 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.live-card-head p { margin: 4px 0 0; color: var(--muted); font-size: 13.5px; }
.mini-business-list { display: grid; gap: 10px; margin-top: 14px; }
.mini-business {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    color: var(--ink);
    padding: 8px;
    border-radius: 12px;
}
.mini-business:hover { background: var(--brand-tint); color: var(--ink); }
.mini-thumb {
    width: 54px;
    height: 54px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    overflow: hidden;
    background: var(--surface-2);
    color: var(--brand);
    border: 1px solid var(--line-2);
}
.mini-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mini-thumb svg { width: 24px; height: 24px; }
.mini-business strong {
    display: block;
    font-size: 14px;
    line-height: 1.25;
    color: var(--ink);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}
.mini-business small { display: block; color: var(--muted); margin-top: 3px; font-size: 12.5px; }
.article-card h2, .article-card h3 { margin: 8px 0 10px; line-height: 1.16; letter-spacing: -.02em; }
.article-card h2 { font-size: 22px; }
.article-card h3 { font-size: 20px; }
.article-card h2 a, .article-card h3 a { color: var(--ink); }
.article-card h2 a:hover, .article-card h3 a:hover { color: var(--brand); }
.article-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 16px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
}
.article-meta span:not(:last-child)::after { content: ""; }
.empty-editorial-card { display: grid; gap: 10px; }
.empty-editorial-card .secondary-btn { width: fit-content; }
.article-detail { max-width: 920px; }
.article-header { margin-top: 30px; padding: clamp(24px, 4vw, 42px); }
.article-header h1 {
    margin: 10px 0 12px;
    font-size: clamp(32px, 5vw, 54px);
    line-height: 1.04;
    letter-spacing: -.04em;
}
.article-lead { color: var(--ink-2); font-size: clamp(17px, 2vw, 20px); max-width: 760px; }
.article-body { margin-top: 18px; padding: clamp(22px, 4vw, 38px); }
.article-body h2 { margin-top: 32px; }
.article-body h2:first-child { margin-top: 0; }
.article-body p, .article-body li { font-size: 16px; }
.ratgeber-hero { margin-top: 30px; padding: clamp(26px, 4vw, 44px); }
.article-grid-list { align-items: stretch; }
.search-advanced {
    grid-template-columns: minmax(170px, 1.25fr) minmax(160px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(130px, .75fr) auto;
}
@media (max-width: 1020px) {
    .live-columns { grid-template-columns: 1fr; }
    .how-grid, .article-grid { grid-template-columns: 1fr; }
    .hero-search-dual { grid-template-columns: 1fr; }
    .search-advanced { grid-template-columns: 1fr 1fr; }
    .search-advanced button { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
    .search-advanced { grid-template-columns: 1fr; }
    .live-card-head { grid-template-columns: 1fr; }
}

/* Ratgeber multimedia */
.article-card-image {
    display: block;
    margin: -4px -4px 14px;
    border-radius: 16px;
    overflow: hidden;
    background: var(--surface-2);
    border: 1px solid var(--line-2);
}
.article-card-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
    transition: transform .25s ease;
}
.article-card-image:hover img { transform: scale(1.025); }
.article-featured-image {
    margin: 24px 0 0;
    border-radius: 22px;
    overflow: hidden;
    border: 1px solid var(--line-2);
    background: var(--surface-2);
}
.article-featured-image img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}
.article-body figure {
    margin: 28px 0;
}
.article-body figure img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 18px;
    border: 1px solid var(--line-2);
    background: var(--surface-2);
}
.article-body figcaption {
    margin-top: 8px;
    color: var(--muted);
    font-size: 14px;
    text-align: center;
}
.article-body .video-embed {
    position: relative;
    width: 100%;
    padding-top: 56.25%;
    margin: 28px 0;
    border-radius: 18px;
    overflow: hidden;
    background: #111827;
    border: 1px solid var(--line-2);
}
.article-body .video-embed iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* ============================ Fix v11: labels visibles en buscador Home ============================ */
.hero .hero-search.hero-search-dual label {
    color: #263238 !important;
    opacity: 1 !important;
    text-shadow: none !important;
    background: #ffffff !important;
    border: 1.5px solid #ded7cc !important;
    font-size: 12px !important;
    line-height: 1.15 !important;
    font-weight: 900 !important;
    letter-spacing: .075em !important;
}
.hero .hero-search.hero-search-dual input {
    color: #1e2428 !important;
    opacity: 1 !important;
    font-weight: 700;
}
.hero .hero-search.hero-search-dual input::placeholder {
    color: #626970 !important;
    opacity: 1 !important;
    font-weight: 700;
}

/* ============================ Fix v12: espaciado en artículos Ratgeber ============================ */
.article-detail {
    max-width: 920px;
    padding-top: 30px;
    padding-bottom: 56px;
}
.article-detail .breadcrumbs {
    margin-top: 0;
    margin-bottom: 20px;
}
.article-detail .article-header {
    margin-top: 0;
}
.article-detail .content-card + .content-card,
.article-body + .editorial-note {
    margin-top: 26px;
}
.article-body {
    line-height: 1.72;
    overflow-wrap: anywhere;
}
.article-body > *:first-child {
    margin-top: 0 !important;
}
.article-body > *:last-child {
    margin-bottom: 0 !important;
}
.article-body p {
    margin: 0 0 18px;
}
.article-body h2 {
    margin: 42px 0 16px;
    line-height: 1.22;
}
.article-body h3 {
    margin: 30px 0 12px;
    line-height: 1.25;
}
.article-body ul,
.article-body ol {
    margin: 12px 0 22px;
    padding-left: 24px;
}
.article-body li {
    margin: 6px 0;
}
.article-body table {
    width: 100%;
    margin: 22px 0 28px;
    border-collapse: collapse;
}
.article-body th,
.article-body td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line-2);
    vertical-align: top;
}
.article-body th {
    background: var(--surface-2);
    font-weight: 800;
}
.article-detail .editorial-note {
    padding: 22px 24px;
}
.article-detail .editorial-note h2 {
    margin-bottom: 10px;
}
.article-detail .editorial-note p {
    line-height: 1.65;
}
@media (max-width: 640px) {
    .article-detail {
        padding-top: 22px;
        padding-bottom: 44px;
    }
    .article-detail .content-card + .content-card,
    .article-body + .editorial-note {
        margin-top: 20px;
    }
}
