/* =========================================================
   BuenHosting.com — Hoja de estilos principal
   ========================================================= */
:root {
    --primary: #2563eb;
    --primary-dark: #1e40af;
    --primary-hover: #1d4ed8;
    --success: #059669;
    --success-bg: #d1fae5;
    --success-text: #065f46;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --danger-text: #991b1b;
    --warn: #d97706;
    --warn-bg: #fef3c7;
    --warn-text: #92400e;
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --bg: #f8fafc;
    --white: #fff;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, .05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, .1), 0 2px 4px -1px rgba(0, 0, 0, .06);
    --shadow-lg: 0 18px 35px -12px rgba(15, 23, 42, .18);
    --radius: 14px;
    --radius-sm: 9px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main { flex: 1; }

img { max-width: 100%; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }
.center { text-align: center; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.02em; }

/* ---------- Botones ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    border: 0; cursor: pointer; font-weight: 600; font-size: 1rem;
    padding: .72rem 1.4rem; border-radius: var(--radius-sm);
    font-family: inherit; transition: background-color .2s, transform .1s, box-shadow .2s;
    white-space: nowrap; text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: scale(.98); }
.btn:disabled { background: #94a3b8; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); box-shadow: var(--shadow-md); }

.btn-outline { background: #fff; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

.btn-white { background: #fff; color: var(--primary-dark); }
.btn-white:hover { background: #e2e8f0; }

.btn-lg { padding: .95rem 1.8rem; font-size: 1.05rem; border-radius: var(--radius-sm); }
.btn-block { width: 100%; }

/* ---------- Header / Navegación ---------- */
.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255, 255, 255, .9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--line);
}
.nav-wrap { display: flex; align-items: center; justify-content: space-between; min-height: 68px; }

.brand {
    font-size: 1.45rem; font-weight: 800; color: var(--ink); letter-spacing: -.02em;
}
.brand span { color: var(--primary); }
.brand:hover { text-decoration: none; }

.site-nav { display: flex; align-items: center; gap: .35rem; }
.site-nav a {
    padding: .5rem .85rem; border-radius: var(--radius-sm);
    color: var(--muted); font-weight: 600; font-size: .97rem;
}
.site-nav a:hover { color: var(--ink); background: #f1f5f9; text-decoration: none; }
.site-nav a.active { color: var(--primary); background: #eff6ff; }

.nav-toggle {
    display: none; flex-direction: column; gap: 5px; background: none; border: 0; cursor: pointer;
    padding: .5rem;
}
.nav-toggle span { width: 24px; height: 2.5px; background: var(--ink); border-radius: 2px; transition: .25s; }
/* ---------- Hero ---------- */
.hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 55%, #3b82f6 100%);
    color: #fff; padding: 4.5rem 0 5rem;
}
.hero-content { max-width: 800px; margin-inline: auto; text-align: center; }
.hero h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 800; margin: 1rem 0 .75rem; }
.hero-content > p { font-size: 1.18rem; color: #dbeafe; margin-bottom: 2rem; }

.hero-badge {
    display: inline-block; background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .25);
    padding: .4rem 1rem; border-radius: 999px; font-size: .82rem; font-weight: 600;
    letter-spacing: .03em;
}

/* ---------- Buscador de dominios ---------- */
.bh-search-block { text-align: left; }
.bh-search {
    display: flex; background: #fff; padding: .45rem;
    border-radius: 1rem; box-shadow: var(--shadow-lg);
    border: 1px solid transparent;
}
.section-search .bh-search { border-color: var(--line); box-shadow: var(--shadow-md); }
.bh-search input {
    flex: 1; min-width: 0; border: 0; outline: 0; background: transparent;
    padding: .8rem 1.1rem; font-size: 1.06rem; font-family: inherit; color: var(--ink);
}
.bh-search input::placeholder { color: #94a3b8; }
.bh-search .btn { border-radius: .75rem; }

.bh-tlds { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: 1rem; }
.tld-chip {
    border: 1.5px solid rgba(255, 255, 255, .5); background: rgba(255, 255, 255, .08);
    color: #fff; padding: .3rem .8rem; border-radius: 999px; font-size: .86rem; font-weight: 600;
    cursor: pointer; font-family: inherit; transition: .15s;
}
.section-search .tld-chip { border-color: var(--line); background: #fff; color: var(--muted); }
.tld-chip:hover { transform: translateY(-1px); }
.tld-chip.selected { background: #fff; color: var(--primary-dark); border-color: #fff; font-weight: 700; }
.section-search .tld-chip.selected { background: var(--primary); color: #fff; border-color: var(--primary); }

.bh-hint { color: #bfdbfe; font-size: .82rem; margin-top: .7rem; }
.section-search .bh-hint { color: var(--muted); }

.bh-results {
    margin-top: 1.6rem; background: #fff; border-radius: var(--radius);
    padding: 1.1rem 1.25rem; box-shadow: var(--shadow-lg); color: var(--ink); text-align: left;
}
.bh-results-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .7rem; }
.bh-loader {
    width: 22px; height: 22px; border-radius: 50%; display: inline-block;
    border: 3px solid var(--line); border-top-color: var(--primary); animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.bh-list { list-style: none; display: grid; gap: .45rem; }
.bh-row {
    display: grid; grid-template-columns: 1.3fr auto auto auto; align-items: center; gap: 1rem;
    padding: .6rem .85rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
    background: #fbfcfe;
}
.bh-dom { font-weight: 700; font-size: 1.02rem; word-break: break-all; }
.bh-dom .ext { color: var(--primary); }
.bh-badge { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: .28rem .7rem; border-radius: 999px; }
.badge-ok { background: var(--success-bg); color: var(--success-text); }
.badge-no { background: var(--danger-bg); color: var(--danger-text); }
.badge-warn { background: var(--warn-bg); color: var(--warn-text); }
.bh-precio { color: var(--muted); font-size: .85rem; text-align: right; white-space: nowrap; }
.bh-precio strong { display: block; color: var(--ink); font-size: 1rem; }
.bh-comprar { font-size: .88rem; padding: .5rem .95rem; }

.bh-error {
    margin-top: 1.4rem; background: var(--danger-bg); color: var(--danger-text);
    padding: .9rem 1.1rem; border-radius: var(--radius-sm); font-weight: 500;
}
/* ---------- Secciones ---------- */
.section { padding: 4rem 0; }
.section-alt { background: #fff; }
.section-title { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; text-align: center; margin-bottom: .5rem; }
.section-sub { text-align: center; color: var(--muted); max-width: 640px; margin: 0 auto 2.2rem; }
.section-search { padding-top: 3rem; }
.section-search .container { max-width: 840px; }
.note { color: var(--muted); margin-top: 1.2rem; font-size: .85rem; }

/* ---------- Pasos ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.6rem; margin-top: 2rem; }
.steps-4 { grid-template-columns: repeat(4, 1fr); gap: 1.2rem; }
.step { text-align: center; padding: 1.6rem 1.2rem; }
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border-radius: 50%; background: var(--primary); color: #fff;
    font-weight: 800; font-size: 1.2rem; margin-bottom: .9rem;
}
.step h3 { font-size: 1.08rem; margin-bottom: .4rem; }
.step p { color: var(--muted); font-size: .93rem; }

/* ---------- Tarjetas de características ---------- */
.feature-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.6rem; margin-top: 1.5rem; }
.feature-card {
    background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
    padding: 2rem 1.7rem; text-align: center; transition: transform .25s, box-shadow .25s;
}
.feature-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.feature-card h3 { margin-bottom: .5rem; }
.feature-card p { color: var(--muted); font-size: .95rem; margin-bottom: 1.2rem; }
.feature-icon { font-size: 2.4rem; line-height: 1; margin-bottom: .9rem; }

/* ---------- Split / listas con check ---------- */
.split { display: grid; grid-template-columns: 1.15fr .85fr; gap: 3rem; align-items: center; }
.split h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); font-weight: 800; margin-bottom: 1.2rem; }
.check-list { list-style: none; display: grid; gap: .8rem; }
.check-list li { padding-left: 1.9rem; position: relative; color: #334155; }
.check-list li::before {
    content: ''; position: absolute; left: 0; top: .3em;
    width: 1.15rem; height: 1.15rem; border-radius: 50%;
    background: var(--success-bg);
}
.check-list li::after {
    content: '✓'; position: absolute; left: .1rem; top: .14em; font-size: .78rem; color: var(--success); font-weight: 800;
}

/* ---------- Card genérica ---------- */
.card {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
    padding: 2rem; box-shadow: var(--shadow-sm);
}
.card h2 { margin-bottom: .8rem; }
.card h3 { margin-bottom: .6rem; }
.card p { color: var(--muted); margin-bottom: 1rem; }
.card p:last-child { margin-bottom: 0; }

/* ---------- Planes (hosting / SSL) ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.6rem; margin-top: 1.5rem; align-items: stretch; }
.plan-card {
    position: relative; background: #fff; border: 1.5px solid var(--line); border-radius: var(--radius);
    padding: 2rem 1.7rem; display: flex; flex-direction: column; box-shadow: var(--shadow-sm);
}
.plan-featured { border-color: var(--primary); box-shadow: var(--shadow-lg); transform: translateY(-6px); }
.plan-tag {
    position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--primary); color: #fff; font-size: .72rem; font-weight: 700;
    padding: .3rem .9rem; border-radius: 999px; letter-spacing: .04em; text-transform: uppercase;
}
.plan-card h3 { font-size: 1.15rem; margin-bottom: .9rem; }
.plan-price { margin-bottom: 1rem; }
.plan-price strong { font-size: 2.1rem; font-weight: 800; letter-spacing: -.03em; }
.plan-price small { color: var(--muted); font-weight: 500; }
.plan-meta { font-size: .88rem; color: var(--muted); margin-bottom: .35rem; }
.plan-features { list-style: none; display: grid; gap: .55rem; margin: .6rem 0 1.6rem; flex: 1; }
.plan-features li { position: relative; padding-left: 1.5rem; font-size: .93rem; color: #334155; }
.plan-features li::before { content: '✓'; position: absolute; left: 0; color: var(--success); font-weight: 800; }

/* ---------- Tabla de precios ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.tabla-precios { width: 100%; border-collapse: collapse; min-width: 560px; }
.tabla-precios th, .tabla-precios td { padding: .85rem 1.1rem; text-align: left; }
.tabla-precios thead th { background: var(--primary); color: #fff; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; }
.tabla-precios thead th:first-child { border-top-left-radius: var(--radius); }
.tabla-precios thead th:last-child { border-top-right-radius: var(--radius); }
.tabla-precios tbody tr:nth-child(even) { background: #f8fafc; }
.tabla-precios tbody tr:hover { background: #eff6ff; }
.td-tld { font-weight: 800; color: var(--primary); }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 1.6rem auto 0; display: grid; gap: .8rem; }
.faq details {
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: 0 1.3rem;
}
.faq summary {
    cursor: pointer; font-weight: 600; padding: 1rem 0; list-style: none; position: relative;
    padding-right: 1.6rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: '+'; position: absolute; right: 0; top: .9rem; color: var(--primary); font-size: 1.3rem; font-weight: 700;
}
.faq details[open] summary::after { content: '−'; }
.faq p { padding-bottom: 1rem; color: var(--muted); font-size: .95rem; }
/* ---------- Cabecera de páginas interiores ---------- */
.page-head {
    background: linear-gradient(135deg, #1e3a8a, #2563eb);
    color: #fff; padding: 3.2rem 0 3.4rem; text-align: center;
}
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); font-weight: 800; margin-bottom: .5rem; }
.page-head p { color: #dbeafe; max-width: 620px; margin-inline: auto; }

/* ---------- Formulario de contacto ---------- */
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 2.2rem; align-items: start; }
.contact-info h2 { margin-bottom: .7rem; }
.form { display: grid; gap: 1.1rem; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.form-field { display: grid; gap: .35rem; }
.form-field label { font-weight: 600; font-size: .9rem; }
.form-field input, .form-field select, .form-field textarea {
    font-family: inherit; font-size: 1rem; color: var(--ink);
    border: 1.5px solid var(--line); border-radius: var(--radius-sm);
    padding: .7rem .9rem; background: #fff; width: 100%; transition: border-color .15s, box-shadow .15s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    outline: 0; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.honey { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-alert { border-radius: var(--radius-sm); padding: .85rem 1.1rem; font-weight: 500; font-size: .95rem; }
.form-alert.ok { background: var(--success-bg); color: var(--success-text); }
.form-alert.err { background: var(--danger-bg); color: var(--danger-text); }
.form-alert ul { list-style: none; }

/* ---------- Banda CTA ---------- */
.cta-band { background: linear-gradient(135deg, #1e3a8a, #2563eb); color: #fff; padding: 3.4rem 0; }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; flex-wrap: wrap; }
.cta-inner h2 { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; margin-bottom: .35rem; }
.cta-inner p { color: #dbeafe; }

/* ---------- Footer ---------- */
.site-footer { background: #0f172a; color: #cbd5e1; margin-top: 0; }
.footer-grid {
    display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 2.4rem;
    padding: 3.4rem 0 2.2rem;
}
.footer-brand .brand { color: #fff; }
.brand-footer { display: inline-block; margin-bottom: .8rem; }
.footer-brand p { color: #94a3b8; font-size: .92rem; max-width: 260px; }
.footer-col h4 { color: #fff; font-size: .98rem; margin-bottom: .9rem; }
.footer-col a { display: block; color: #cbd5e1; font-size: .93rem; padding: .25rem 0; }
.footer-col a:hover { color: #fff; }
.footer-col p { font-size: .93rem; color: #94a3b8; }
.footer-bottom { border-top: 1px solid #1e293b; padding: 1.1rem 0; }
.footer-bottom p { font-size: .85rem; color: #64748b; }

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
    .steps, .steps-4 { grid-template-columns: repeat(2, 1fr); }
    .split, .contact-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 680px) {
    .site-nav {
        display: none; position: absolute; top: 68px; left: 0; right: 0;
        flex-direction: column; align-items: stretch; gap: 0;
        background: #fff; border-bottom: 1px solid var(--line); padding: .6rem 1rem;
        box-shadow: var(--shadow-lg);
    }
    .site-nav.open { display: flex; }
    .site-nav a { padding: .85rem .8rem; border-radius: var(--radius-sm); }
    .nav-toggle { display: flex; }
    .hero { padding: 3rem 0 3.4rem; }
    .bh-search { flex-direction: column; gap: .5rem; padding: .8rem; }
    .bh-search .btn { width: 100%; }
    .bh-row {
        grid-template-columns: 1fr auto; grid-template-areas: 'dom badge' 'precio boton';
        row-gap: .4rem;
    }
    .bh-dom { grid-area: dom; }
    .bh-badge { grid-area: badge; justify-self: end; }
    .bh-precio { grid-area: precio; text-align: left; }
    .bh-comprar { grid-area: boton; justify-self: end; }
    .steps, .steps-4 { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .footer-grid { grid-template-columns: 1fr; gap: 1.6rem; }
    .cta-inner { flex-direction: column; text-align: center; }
}

/* ---------- Tienda: carrito / checkout ---------- */
.nav-cart {
    display: inline-flex; align-items: center; justify-content: center;
    position: relative; margin-left: .35rem;
    width: 42px; height: 42px; border-radius: 50%;
    color: var(--muted); background: #f1f5f9;
}
.nav-cart:hover { color: var(--primary); background: #eff6ff; text-decoration: none; }
.cart-badge {
    position: absolute; top: -4px; right: -6px;
    background: var(--primary); color: #fff; font-size: .68rem; font-weight: 700;
    min-width: 18px; height: 18px; border-radius: 999px;
    display: inline-flex; align-items: center; justify-content: center; padding: 0 4px;
}

.cart-list { list-style: none; display: grid; gap: .7rem; margin: 1.4rem 0; }
.cart-row {
    display: flex; align-items: center; justify-content: space-between; gap: 1rem;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    padding: .85rem 1.1rem;
}
.cart-row .c-titulo { font-weight: 700; }
.cart-row .c-detalle { font-size: .85rem; color: var(--muted); }
.cart-row .c-precio { font-weight: 700; white-space: nowrap; }
.cart-row .c-quitar { color: var(--danger); font-size: .85rem; }
.cart-total {
    display: flex; justify-content: flex-end; gap: 1rem; align-items: baseline;
    font-size: 1.15rem; margin: 1.2rem 0;
}
.cart-total strong { font-size: 1.7rem; color: var(--primary); }
.cart-empty { text-align: center; padding: 3rem 1rem; }
.cart-actions { display: flex; justify-content: flex-end; gap: .8rem; flex-wrap: wrap; }

.checkout-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 2rem; align-items: start; }
.checkout-resumen .plan-price { margin: 0; }
.checkout-resumen ul { margin: 1rem 0; }
.aviso-demo {
    background: var(--warn-bg); color: var(--warn-text);
    border: 1px solid #f59e0b55; border-radius: var(--radius-sm);
    padding: .8rem 1.1rem; font-size: .9rem; margin-bottom: 1rem;
}
.aviso-ok { background: var(--success-bg); color: var(--success-text); }

@media (max-width: 920px) {
    .checkout-grid { grid-template-columns: 1fr; }
}

/* Utilidad global: el atributo hidden siempre debe ocultar (vence a display de clases). */
[hidden] { display: none !important; }

/* Iconos SVG en lugar de emojis */
.feature-icon svg { display: inline-block; vertical-align: middle; }
.section-title svg { vertical-align: -0.18em; }
.btn svg { flex: 0 0 auto; }
.page-head h1 svg { vertical-align: -0.18em; margin-right: .35rem; }

/* ---------- Submenús de navegación ---------- */
.site-nav .nav-item { position: relative; }
.nav-main {
    display: inline-flex; align-items: center; gap: .2rem;
    padding: .5rem .85rem; border-radius: var(--radius-sm);
    color: var(--muted); font-weight: 600; font-size: .97rem;
}
.nav-main:hover { color: var(--ink); background: #f1f5f9; text-decoration: none; }
.nav-main svg { transition: transform .2s; }
.nav-item:hover .nav-main svg, .nav-item:focus-within .nav-main svg { transform: rotate(180deg); }
.nav-item.active-parent > .nav-main { color: var(--primary); background: #eff6ff; }

.nav-sub {
    position: absolute; top: 100%; left: 0; min-width: 235px;
    background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg); padding: .45rem; display: none; z-index: 60;
}
/* Puente invisible para que no se pierda el hover al bajar al desplegable */
.nav-item::after {
    content: ''; position: absolute; left: 0; right: 0; top: 100%;
    height: 8px; display: none;
}
.nav-item:hover::after, .nav-item:focus-within::after { display: block; }
.nav-item:hover .nav-sub, .nav-item:focus-within .nav-sub { display: block; }
.nav-sub a {
    display: block; padding: .55rem .75rem; color: var(--muted);
    font-size: .93rem; border-radius: 7px;
}
.nav-sub a:hover { background: #eff6ff; color: var(--primary); text-decoration: none; }

@media (max-width: 680px) {
    .site-nav .nav-item { width: 100%; }
    .nav-main { width: 100%; justify-content: space-between; padding: .85rem .8rem; }
    .nav-sub {
        position: static; display: block; box-shadow: none; border: 0;
        background: transparent; padding: 0 0 .35rem .9rem;
    }
    .nav-sub a { padding: .55rem .8rem; color: var(--ink); }
}

/* ---------- Logo: brillo elegante que recorre el texto ---------- */
.brand {
    position: relative; display: inline-block; overflow: hidden;
}
.brand::after {
    content: '';
    position: absolute; top: 0; left: -70%; height: 100%; width: 40%;
    background: linear-gradient(105deg, transparent 0%, rgba(255, 255, 255, .75) 50%, transparent 100%);
    transform: skewX(-18deg);
    pointer-events: none;
    animation: bhShine 5s ease-in-out infinite;
}
@keyframes bhShine {
    0%   { left: -70%; }
    20%  { left: 130%; }
    100% { left: 130%; }
}
@media (prefers-reduced-motion: reduce) {
    .brand::after { animation: none; display: none; }
}





