/* ==========================================================
   tu-buscador.com
   Colores sacados del logo: azul marino, turquesa y coral
   ========================================================== */
:root {
    --brand: #03224d;
    --brand-dark: #021836;
    --brand-soft: rgba(4, 188, 196, .25);
    --teal: #04bcc4;
    --teal-dark: #03787e;
    --coral: #fa5440;
    --call: #e2432e;
    --call-dark: #c53521;

    --ink: #0f1e36;
    --text: #34405a;
    --muted: #56637b;
    --line: #dfe5ee;
    --bg: #f4f7fb;
    --surface: #ffffff;
    --footer: #03224d;

    --radius: 14px;
    --shadow: 0 10px 30px rgba(3, 34, 77, .09), 0 2px 6px rgba(3, 34, 77, .05);
    --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
    --strip: linear-gradient(90deg, var(--teal) 0 80%, var(--coral) 80% 100%);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.55;
}

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

a { color: var(--teal-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

.wrap {
    width: 100%;
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 20px;
}

.brand-bar {
    height: 4px;
    background: var(--strip);
}

/* ---------- Portada ---------- */
.hero {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 96px 20px 110px;
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(620px 440px at 86% 8%, rgba(4, 188, 196, .14), transparent 70%),
        radial-gradient(520px 380px at 8% 12%, rgba(3, 34, 77, .06), transparent 70%),
        radial-gradient(440px 340px at 10% 92%, rgba(250, 84, 64, .08), transparent 70%);
}

/* Aros decorativos que recuerdan a la lupa del logo */
.hero::before,
.hero::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero::before {
    top: -200px;
    right: -170px;
    width: 560px;
    height: 560px;
    border: 74px solid rgba(4, 188, 196, .08);
}

.hero::after {
    bottom: -150px;
    left: -130px;
    width: 320px;
    height: 320px;
    border: 44px solid rgba(250, 84, 64, .06);
}

.hero > * { position: relative; z-index: 1; }

.hero-brand { margin: 0; line-height: 0; }

.hero-logo { width: min(560px, 100%); }

.hero-tagline {
    margin: 20px 0 36px;
    color: var(--muted);
    font-size: 18px;
    font-weight: 500;
}

.hero .search-box {
    width: 100%;
    max-width: 680px;
    min-height: 62px;
}

/* ---------- Caja de búsqueda de Google ---------- */
.search-box form.gsc-search-box { margin: 0 !important; }

.search-box table.gsc-search-box {
    border-collapse: separate !important;
    margin: 0 !important;
    padding: 6px 6px 6px 14px;
    background: var(--surface);
    border: 1px solid var(--line) !important;
    border-radius: 999px;
    box-shadow: var(--shadow);
    transition: border-color .15s, box-shadow .15s;
}

.search-box table.gsc-search-box:focus-within {
    border-color: var(--brand) !important;
    box-shadow: var(--shadow), 0 0 0 4px var(--brand-soft);
}

.search-box table.gsc-search-box td {
    padding: 0 !important;
    border: 0 !important;
    vertical-align: middle;
}

.search-box .gsc-input-box {
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    padding: 0 !important;
}

/* El rediseño de Google oculta el botón y pone una lupa dentro de la caja:
   quitamos esa lupa y volvemos a mostrar el botón "Buscar" */
.search-box .gsib_a {
    padding: 0 10px !important;
    background-image: none !important;
}

.search-box .gsib_a::before { display: none !important; }

.search-box input.gsc-input {
    height: 48px !important;
    padding: 0 !important;
    font-family: var(--font) !important;
    font-size: 18px !important;
    color: var(--ink) !important;
    background-color: transparent !important;
}

.search-box .gsib_b,
.search-box .gsc-clear-button { display: none !important; }

.search-box td.gsc-search-button {
    display: table-cell !important;
    width: 1%;
    margin: 0 !important;
}

.search-box button.gsc-search-button-v2 {
    display: inline-flex !important;
    align-items: center;
    gap: 8px;
    margin: 0 !important;
    height: 48px;
    padding: 0 28px !important;
    color: #fff;
    font-family: var(--font);
    font-size: 17px !important;
    font-weight: 700;
    white-space: nowrap;
    border: 0 !important;
    border-radius: 999px !important;
    background: var(--brand) !important;
    cursor: pointer;
    transition: background .15s;
}

.search-box button.gsc-search-button-v2::after { content: "Buscar"; }

.search-box button.gsc-search-button-v2:hover { background: #0b3a78 !important; }

.search-box button.gsc-search-button-v2 svg {
    width: 17px;
    height: 17px;
    fill: #fff;
}

/* Versión pequeña (cabecera) */
.search-box--compact table.gsc-search-box {
    padding: 4px 4px 4px 10px;
    box-shadow: none;
    background: var(--bg);
}

.search-box--compact table.gsc-search-box:focus-within {
    background: var(--surface);
    box-shadow: 0 0 0 4px var(--brand-soft);
}

.search-box--compact input.gsc-input {
    height: 38px !important;
    font-size: 16px !important;
}

.search-box--compact button.gsc-search-button-v2 {
    height: 38px;
    padding: 0 20px !important;
    font-size: 15px !important;
}

/* ---------- Cabecera (resultados y páginas legales) ---------- */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.header-inner {
    display: flex;
    align-items: center;
    gap: 32px;
    padding-top: 14px;
    padding-bottom: 14px;
}

.header-logo { flex: none; line-height: 0; }

.header-logo img { width: 230px; }

.header-inner .search-box {
    flex: 1;
    max-width: 640px;
    min-height: 48px;
}

/* ---------- Resultados ---------- */
.results {
    flex: 1;
    padding-top: 30px;
    padding-bottom: 20px;
}

.results-title {
    margin: 0 0 20px;
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    word-break: break-word;
}

.results-label {
    display: block;
    margin-bottom: 2px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.help-card {
    position: relative;
    max-width: 700px;
    padding: 22px 24px 20px 28px;
    overflow: hidden;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.help-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
    background: linear-gradient(180deg, var(--teal) 0 75%, var(--coral) 75% 100%);
}

.help-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.help-card-title {
    margin: 0;
    font-size: 19px;
    font-weight: 700;
}

.help-card-sub {
    margin: 2px 0 0;
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
}

.share-btn {
    flex: none;
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    color: var(--muted);
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 50%;
    cursor: pointer;
    transition: color .15s, border-color .15s;
}

.share-btn:hover { color: var(--teal-dark); border-color: var(--teal); }

.call-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 18px;
    padding: 14px 22px;
    color: #fff;
    font-size: 19px;
    font-weight: 700;
    background: var(--call);
    border-radius: 12px;
    transition: background .15s, transform .15s;
}

.call-btn:hover {
    color: #fff;
    text-decoration: none;
    background: var(--call-dark);
}

.call-btn:active { transform: translateY(1px); }

.help-notice {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.related-title {
    margin: 40px 0 6px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
}

/* Resultados de Google */
.cse-results { max-width: 700px; }

.cse-results .gsc-control-cse {
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    font-family: var(--font) !important;
}

.cse-results .gsc-control-cse * { font-family: var(--font); }

.cse-results .gsc-above-wrapper-area { border-bottom: 1px solid var(--line) !important; }

.cse-results .gsc-webResult.gsc-result,
.cse-results .gsc-results .gsc-imageResult {
    padding: 14px 0 !important;
    background: transparent !important;
    border: 0 !important;
    border-bottom: 1px solid var(--line) !important;
}

.cse-results .gs-title,
.cse-results .gs-title b { font-weight: 700 !important; }

.cse-results .gsc-results .gsc-cursor-box .gsc-cursor-page {
    padding: 4px 9px;
    border-radius: 8px;
    color: var(--brand);
}

.cse-results .gsc-results .gsc-cursor-box .gsc-cursor-current-page {
    color: #fff;
    background: var(--brand);
}

/* ---------- Compartir ---------- */
.share-dialog {
    width: min(420px, calc(100% - 32px));
    padding: 0;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 30px 80px rgba(10, 20, 40, .28);
}

.share-dialog::backdrop { background: rgba(15, 23, 42, .5); }

.share-inner { padding: 22px 24px 26px; }

.share-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
}

.share-head h2 { margin: 0; font-size: 20px; }

.share-close {
    width: 36px;
    height: 36px;
    padding: 0;
    color: var(--muted);
    font-size: 26px;
    line-height: 1;
    background: none;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
}

.share-close:hover { background: var(--bg); }

.share-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 6px;
    color: var(--ink);
    font-size: 13px;
    font-weight: 700;
    text-align: center;
    border: 1px solid var(--line);
    border-radius: 12px;
    transition: border-color .15s, background .15s;
}

.share-option:hover {
    text-decoration: none;
    background: #effafb;
    border-color: var(--teal);
}

.share-option svg { color: var(--brand); }

/* ---------- Páginas legales ---------- */
.legal {
    flex: 1;
    max-width: 880px;
    padding-top: 40px;
}

.legal-card {
    padding: 40px 44px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
}

.legal h1 {
    margin: 0 0 6px;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
}

.legal .updated {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 14px;
}

.legal h2 {
    margin: 34px 0 10px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

.legal p,
.legal li {
    color: var(--text);
    font-size: 16px;
}

.legal a { word-break: break-word; }

/* ---------- Pie ---------- */
.site-footer {
    position: relative;
    margin-top: 64px;
    color: rgba(255, 255, 255, .78);
    font-size: 13.5px;
    background: var(--footer);
}

.page-home .site-footer { margin-top: 0; }

.site-footer::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: var(--strip);
}

.footer-notice {
    max-width: 860px;
    margin: 0 auto;
    padding: 38px 0 22px;
    text-align: center;
}

.footer-notice p { margin: 0 0 8px; }

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 20px 0 30px;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

.footer-bottom p { margin: 0; }

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 22px;
}

.site-footer a { color: #fff; }

/* ---------- Móvil ---------- */
@media (max-width: 720px) {
    .hero { padding: 64px 16px 80px; }

    .hero-tagline { font-size: 17px; margin: 16px 0 28px; }

    .hero .search-box { min-height: 56px; }

    .search-box table.gsc-search-box { padding: 4px 4px 4px 8px; }

    .search-box input.gsc-input { height: 44px !important; font-size: 16px !important; }

    .search-box button.gsc-search-button-v2 { height: 44px; padding: 0 18px !important; }

    .search-box--compact button.gsc-search-button-v2::after { content: none; }

    .header-inner {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .header-logo { align-self: center; }

    .header-logo img { width: 200px; }

    .header-inner .search-box { max-width: none; }

    .search-box--compact input.gsc-input { height: 38px !important; }

    .search-box--compact button.gsc-search-button-v2 { height: 38px; padding: 0 18px !important; }

    .wrap { padding: 0 16px; }

    .results { padding-top: 22px; }

    .results-title { font-size: 23px; }

    .help-card { padding: 18px 18px 18px 22px; }

    .call-btn { font-size: 18px; }

    .legal { padding-top: 24px; }

    .legal-card { padding: 26px 20px; }

    .legal h1 { font-size: 26px; }
}
