/* ============================================================
   XPERTIUS — Hoja de estilos corporativa
   DEBTALIA — Colores: Rojo #E4173E · Gris #77787B · Blanco #FFFFFF
   ============================================================ */

:root {
    --xpert-blue:       #E4173E; /* Debtalia — rojo principal */
    --xpert-blue-dark:  #B91232;
    --xpert-blue-light: #FDE9ED;
    --xpert-dark:       #26262E;
    --xpert-gray:       #6c757d;
    --xpert-light:      #f8f9fb;
    --xpert-border:     #e2e8f0;
    --xpert-success:    #28a745;
    --xpert-warning:    #ffc107;
    --xpert-danger:     #dc3545;
    --font-main:        'Inter', sans-serif;
    --shadow-sm:        0 2px 8px rgba(228,23,62,0.10);
    --shadow-md:        0 4px 20px rgba(228,23,62,0.15);
    --radius:           10px;
    --radius-lg:        16px;
}

* { box-sizing: border-box; }
body { font-family: var(--font-main); color: var(--xpert-dark); background: #fff; }
a { color: var(--xpert-blue); text-decoration: none; }
a:hover { color: var(--xpert-blue-dark); text-decoration: underline; }

/* ── BOTONES ── */
.btn-primary {
    background: var(--xpert-blue);
    border-color: var(--xpert-blue);
    font-weight: 600;
    border-radius: var(--radius);
    padding: .55rem 1.4rem;
}
.btn-primary:hover { background: var(--xpert-blue-dark); border-color: var(--xpert-blue-dark); }
.btn-outline-primary { color: var(--xpert-blue); border-color: var(--xpert-blue); font-weight: 600; border-radius: var(--radius); }
.btn-outline-primary:hover { background: var(--xpert-blue); border-color: var(--xpert-blue); color: #fff; }
.btn-lg { padding: .8rem 2rem; font-size: 1.05rem; }

/* ── NAVBAR ── */
.xpert-navbar {
    background: #fff;
    border-bottom: 1px solid var(--xpert-border);
    box-shadow: 0 2px 12px rgba(0,0,0,.06);
    padding: .75rem 0;
}
.xpert-navbar .nav-link { color: var(--xpert-dark); font-weight: 500; font-size: .92rem; padding: .4rem .75rem; border-radius: 6px; transition: all .2s; }
.xpert-navbar .nav-link:hover, .xpert-navbar .nav-link.active { color: var(--xpert-blue); background: var(--xpert-blue-light); }
/* Logo: solo límites máximos + dimensiones automáticas => nunca se deforma */
.logo-img { transition: opacity .2s; height: auto; width: auto; max-height: 44px; max-width: 200px; display: inline-block; object-fit: contain; }
.logo-img:hover { opacity: .85; }
.xpert-navbar .navbar-brand { padding-top: .2rem; padding-bottom: .2rem; }
@media (max-width: 575px) {
    .logo-img { max-height: 38px; max-width: 60vw; }
}

/* ── HERO ── */
.hero-section {
    background: linear-gradient(135deg, #FEF2F4 0%, #ffffff 60%, #FCE4E9 100%);
    padding: 90px 0 80px;
    position: relative;
    overflow: hidden;
}
.hero-section::before {
    content: '';
    position: absolute;
    top: -80px; right: -80px;
    width: 500px; height: 500px;
    background: radial-gradient(circle, rgba(228,23,62,.12) 0%, transparent 70%);
    border-radius: 50%;
}
.hero-section h1 { font-size: 3rem; font-weight: 800; line-height: 1.15; color: var(--xpert-dark); }
.hero-section h1 span { color: var(--xpert-blue); }
.hero-section .lead { font-size: 1.2rem; color: var(--xpert-gray); }
.hero-badge { background: var(--xpert-blue-light); color: var(--xpert-blue); border-radius: 30px; padding: .35rem 1rem; font-size: .82rem; font-weight: 600; display: inline-block; margin-bottom: 1rem; }
.hero-img-wrapper { position: relative; }
.hero-card {
    background: #fff;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem;
    border: 1px solid var(--xpert-border);
}

/* ── SECCIÓN GENÉRICA ── */
.section-title { font-size: 2rem; font-weight: 800; color: var(--xpert-dark); }
.section-title span { color: var(--xpert-blue); }
.section-subtitle { color: var(--xpert-gray); font-size: 1.05rem; max-width: 600px; margin: 0 auto; }

/* ── COMO FUNCIONA (PASOS) ── */
.step-card {
    background: #fff;
    border: 1px solid var(--xpert-border);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    transition: all .3s;
    height: 100%;
}
.step-card:hover { box-shadow: var(--shadow-md); transform: translateY(-4px); border-color: var(--xpert-blue); }
.step-number {
    width: 60px; height: 60px;
    background: var(--xpert-blue);
    color: #fff;
    border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 1.4rem; font-weight: 800; line-height: 1;
    margin: 0;
    text-align: center;
    flex-shrink: 0;
}
/* Solo dentro de las tarjetas de paso el círculo se centra como bloque con margen inferior */
.step-card .step-number { display: flex; margin: 0 auto 1.2rem; }
/* Los placeholders de inputs en mayúsculas no deben gritar */
input.text-uppercase::placeholder { text-transform: none; letter-spacing: normal; font-weight: 400; }
.step-icon { font-size: 2rem; color: var(--xpert-blue); margin-bottom: 1rem; }
.step-card h4 { font-weight: 700; font-size: 1.1rem; margin-bottom: .75rem; }
.step-connector { position: relative; }
.step-connector::after {
    content: '→';
    position: absolute;
    right: -18px; top: 30px;
    color: var(--xpert-blue);
    font-size: 1.5rem;
}

/* ── TARJETAS DE PRECIO ── */
.price-card {
    background: #fff;
    border: 2px solid var(--xpert-border);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    text-align: center;
    transition: all .3s;
    height: 100%;
    position: relative;
}
.price-card:hover, .price-card.destacado { border-color: var(--xpert-blue); box-shadow: var(--shadow-md); transform: translateY(-4px); }
.price-card.destacado { border-width: 2px; }
.price-badge-top { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--xpert-blue); color: #fff; border-radius: 20px; padding: .3rem 1.2rem; font-size: .78rem; font-weight: 700; white-space: nowrap; }
.price-amount { font-size: 3.2rem; font-weight: 800; color: var(--xpert-blue); line-height: 1; white-space: nowrap; }
.price-cur { font-size: 1.9rem; font-weight: 700; margin-left: .1rem; }
.price-amount small { font-size: 1rem; color: var(--xpert-gray); font-weight: 400; margin-left: .15rem; }
.price-tramo { font-weight: 600; font-size: 1rem; color: var(--xpert-dark); margin-bottom: .25rem; }
.price-features { list-style: none; padding: 0; margin: 1.5rem 0; text-align: left; }
.price-features li { padding: .4rem 0; font-size: .93rem; color: var(--xpert-gray); }
.price-features li i { color: var(--xpert-blue); margin-right: .5rem; }

/* ── FEATURE CARDS ── */
.feature-card {
    background: #fff;
    border: 1px solid var(--xpert-border);
    border-radius: var(--radius-lg);
    padding: 1.8rem;
    height: 100%;
    transition: all .3s;
}
.feature-card:hover { box-shadow: var(--shadow-md); border-color: var(--xpert-blue); }
.feature-icon {
    width: 52px; height: 52px;
    background: var(--xpert-blue-light);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    color: var(--xpert-blue);
    margin-bottom: 1rem;
}
.feature-card h5 { font-weight: 700; font-size: 1rem; margin-bottom: .5rem; }
.feature-card p { font-size: .9rem; color: var(--xpert-gray); margin: 0; }

/* ── STATS BAR ── */
.stats-bar { background: var(--xpert-blue); padding: 50px 0; }
.stat-item { text-align: center; color: #fff; }
.stat-number { font-size: 2.8rem; font-weight: 800; display: block; }
.stat-label { font-size: .9rem; opacity: .85; }

/* ── CTA SECTION ── */
.cta-section { background: linear-gradient(135deg, var(--xpert-dark) 0%, #1a1a2e 100%); padding: 80px 0; }
.cta-section h2 { color: #fff; font-weight: 800; }
.cta-section p { color: rgba(255,255,255,.75); }
.btn-white { background: #fff; color: var(--xpert-blue); font-weight: 700; border-radius: var(--radius); padding: .8rem 2rem; }
.btn-white:hover { background: var(--xpert-blue-light); color: var(--xpert-blue); }

/* ── SECCIÓN COBRATIS ── */
.cobratis-section { background: var(--xpert-blue-light); border-radius: var(--radius-lg); padding: 2.5rem; }

/* ── TESTIMONIOS ── */
.testimonio-card {
    background: #fff;
    border: 1px solid var(--xpert-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    height: 100%;
}
.testimonio-card .stars { color: #ffc107; font-size: 1.1rem; margin-bottom: .75rem; }
.testimonio-card p { font-style: italic; color: var(--xpert-gray); font-size: .95rem; }
.testimonio-autor { font-weight: 700; font-size: .9rem; color: var(--xpert-dark); }
.testimonio-empresa { font-size: .82rem; color: var(--xpert-gray); }

/* ── FAQ ── */
.accordion-button:not(.collapsed) { background: var(--xpert-blue-light); color: var(--xpert-blue); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 .2rem rgba(228,23,62,.25); }
.accordion-item { border: 1px solid var(--xpert-border); border-radius: var(--radius) !important; margin-bottom: .5rem; }

/* ── BLOG ── */
.blog-card { background: #fff; border: 1px solid var(--xpert-border); border-radius: var(--radius-lg); overflow: hidden; height: 100%; transition: all .3s; }
.blog-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.blog-card img { width: 100%; height: 180px; object-fit: cover; }
.blog-card-body { padding: 1.4rem; }
.blog-cat { font-size: .75rem; font-weight: 700; color: var(--xpert-blue); text-transform: uppercase; letter-spacing: .05em; }
.blog-card h5 { font-weight: 700; font-size: 1rem; margin: .5rem 0; }
.blog-card p { font-size: .88rem; color: var(--xpert-gray); }

/* ── FORMULARIOS ── */
.form-control, .form-select {
    border: 1.5px solid var(--xpert-border);
    border-radius: var(--radius);
    padding: .65rem 1rem;
    font-size: .95rem;
    transition: border-color .2s;
}
.form-control:focus, .form-select:focus {
    border-color: var(--xpert-blue);
    box-shadow: 0 0 0 .2rem rgba(228,23,62,.2);
}
.form-label { font-weight: 600; font-size: .9rem; color: var(--xpert-dark); margin-bottom: .35rem; }

/* ── AUTH PAGES ── */
.auth-wrapper { min-height: 100vh; background: linear-gradient(135deg, #FEF2F4 0%, #fff 100%); display: flex; align-items: center; }
.auth-card { background: #fff; border-radius: var(--radius-lg); box-shadow: var(--shadow-md); padding: 2.5rem; max-width: 460px; width: 100%; margin: 0 auto; }
.auth-logo { text-align: center; margin-bottom: 1.5rem; }
.auth-card h2 { font-weight: 800; font-size: 1.5rem; text-align: center; margin-bottom: .25rem; }
.auth-card .text-muted { text-align: center; font-size: .9rem; display: block; margin-bottom: 1.5rem; }

/* ── DASHBOARD USUARIO ── */
.dash-sidebar {
    background: var(--xpert-dark);
    min-height: 100vh;
    width: 260px;
    position: fixed;
    left: 0; top: 0;
    padding: 0;
    z-index: 100;
}
.dash-sidebar .sidebar-logo { padding: 1.5rem 1.5rem 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.dash-sidebar .sidebar-logo img { height: 38px; }
.dash-nav { padding: 1rem .75rem; }
.dash-nav .nav-link { color: rgba(255,255,255,.75); font-size: .93rem; font-weight: 500; padding: .7rem 1rem; border-radius: 8px; display: flex; align-items: center; gap: .6rem; margin-bottom: .2rem; transition: all .2s; }
.dash-nav .nav-link:hover, .dash-nav .nav-link.active { background: rgba(228,23,62,.25); color: #fff; }
.dash-nav .nav-link i { font-size: 1.1rem; width: 20px; }
.dash-content { margin-left: 260px; padding: 2rem; min-height: 100vh; background: var(--xpert-light); }
.dash-topbar { background: #fff; border-radius: var(--radius); padding: 1rem 1.5rem; box-shadow: var(--shadow-sm); margin-bottom: 1.5rem; display: flex; align-items: center; justify-content: space-between; }
.dash-topbar h1 { font-size: 1.3rem; font-weight: 700; margin: 0; }
.stat-dash-card {
    background: #fff;
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid var(--xpert-blue);
    height: 100%;
}
.stat-dash-card .stat-val { font-size: 2rem; font-weight: 800; color: var(--xpert-dark); }
.stat-dash-card .stat-lbl { font-size: .85rem; color: var(--xpert-gray); margin-top: .25rem; }
.stat-dash-card .stat-icon { font-size: 2rem; color: var(--xpert-blue); opacity: .4; }

/* Estados de factura */
.badge-activa    { background: #d4edda; color: #155724; }
.badge-vencida   { background: #f8d7da; color: #721c24; }
.badge-cobrada   { background: #d1ecf1; color: #0c5460; }
.badge-pendiente { background: #fff3cd; color: #856404; }

/* ── ADMIN PANEL ── */
.admin-sidebar { background: #1a1a2e; }
.admin-sidebar .dash-nav .nav-link:hover,
.admin-sidebar .dash-nav .nav-link.active { background: rgba(228,23,62,.3); }

/* ── TABLAS ── */
.xpert-table { background: #fff; border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm); }
.xpert-table table { margin: 0; }
.xpert-table thead th { background: var(--xpert-light); font-weight: 700; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--xpert-gray); border: none; padding: 1rem 1.25rem; }
.xpert-table tbody td { padding: .9rem 1.25rem; vertical-align: middle; border-color: var(--xpert-border); font-size: .92rem; }
.xpert-table tbody tr:hover { background: var(--xpert-blue-light); }

/* ── ALERTAS ── */
.alert { border-radius: var(--radius); border: none; font-size: .92rem; }
.alert-success { background: #d4edda; color: #155724; }
.alert-danger   { background: #f8d7da; color: #721c24; }
.alert-info     { background: #d1ecf1; color: #0c5460; }
.alert-warning  { background: #fff3cd; color: #856404; }

/* ── FOOTER ── */
.xpert-footer { background: #1a1a2e; padding: 60px 0 0; color: rgba(255,255,255,.7); }
.footer-title { color: #fff; font-weight: 700; font-size: .9rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 1rem; }
.footer-links li { margin-bottom: .5rem; }
.footer-links a { color: rgba(255,255,255,.65); font-size: .88rem; transition: color .2s; text-decoration: none; }
.footer-links a:hover { color: var(--xpert-blue); text-decoration: none; }
/* En el footer oscuro forzamos texto claro (Bootstrap .text-muted es gris oscuro e ilegible aquí) */
.xpert-footer .text-muted { color: rgba(255,255,255,.6) !important; }
.xpert-footer a { color: rgba(255,255,255,.7); text-decoration: none; }
.xpert-footer a:hover { color: var(--xpert-blue); }
.xpert-footer strong { color: rgba(255,255,255,.9); }
.xpert-footer hr { border-color: rgba(255,255,255,.12) !important; opacity: 1; }

/* ── RESPONSIVE ── */
@media (max-width: 991px) {
    .dash-sidebar { width: 100%; min-height: auto; position: relative; }
    .dash-content { margin-left: 0; }
    .hero-section h1 { font-size: 2.2rem; }
}
@media (max-width: 767px) {
    .hero-section { padding: 60px 0 50px; }
    .hero-section h1 { font-size: 1.9rem; }
    .section-title { font-size: 1.6rem; }
    .price-amount { font-size: 2.5rem; }
    .stat-number { font-size: 2rem; }
}

/* ── UTILIDADES ── */
.bg-xpert { background: var(--xpert-blue) !important; }
.text-xpert { color: var(--xpert-blue) !important; }
.border-xpert { border-color: var(--xpert-blue) !important; }
.bg-xpert-light { background: var(--xpert-blue-light) !important; }
.rounded-xpert { border-radius: var(--radius) !important; }
.shadow-xpert { box-shadow: var(--shadow-md) !important; }
.section-pad { padding: 80px 0; }
.section-pad-sm { padding: 50px 0; }

/* ── DEBTALIA: banner cookies ── */
.cookie-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 1050; background: #26262E; color: #fff; box-shadow: 0 -4px 20px rgba(0,0,0,.25); }
.cookie-banner a { color: #ff8fa5; }

/* ── DEBTALIA: tarjetas de deudas ── */
.deuda-card { border: 1px solid var(--xpert-border); border-radius: var(--radius-lg); background: #fff; transition: all .2s; height: 100%; display: flex; flex-direction: column; }
.deuda-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); border-color: rgba(228,23,62,.35); }
.deuda-card .dc-head { display: flex; justify-content: space-between; align-items: center; padding: .8rem 1.1rem; border-bottom: 1px solid var(--xpert-border); }
.deuda-card .dc-ref { font-size: .78rem; color: var(--xpert-gray); font-weight: 600; letter-spacing: .04em; }
.deuda-card .dc-body { padding: 1rem 1.1rem 1.2rem; flex: 1; display: flex; flex-direction: column; }
.deuda-card h3 { font-size: 1.02rem; font-weight: 700; line-height: 1.4; margin-bottom: .7rem; }
.deuda-card h3 a { color: var(--xpert-dark); }
.deuda-card h3 a:hover { color: var(--xpert-blue); text-decoration: none; }
.deuda-card .dc-datos { font-size: .85rem; color: var(--xpert-gray); margin-bottom: .9rem; }
.deuda-card .dc-datos i { color: var(--xpert-blue); width: 1.2rem; }
.deuda-card .dc-precios { margin-top: auto; display: flex; align-items: baseline; gap: .6rem; flex-wrap: wrap; }
.deuda-card .dc-importe { text-decoration: line-through; color: var(--xpert-gray); font-size: .95rem; }
.deuda-card .dc-precio { color: var(--xpert-blue); font-size: 1.35rem; font-weight: 800; }
.badge-descuento { background: var(--xpert-blue-light); color: var(--xpert-blue); font-weight: 700; border-radius: 20px; padding: .3rem .7rem; font-size: .78rem; }
.badge-tipo { background: #f1f3f5; color: #444; font-weight: 600; border-radius: 20px; padding: .3rem .7rem; font-size: .78rem; }

/* ── DEBTALIA: formulario multi-paso ── */
.paso-indicador { display: flex; gap: .4rem; margin-bottom: 1.6rem; }
.paso-indicador .p-step { flex: 1; height: 6px; border-radius: 4px; background: #eee; }
.paso-indicador .p-step.done { background: var(--xpert-blue); }
.form-paso { display: none; }
.form-paso.activo { display: block; animation: fadeIn .25s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px);} to { opacity: 1; transform: none; } }
.opcion-grande { border: 2px solid var(--xpert-border); border-radius: var(--radius-lg); padding: 1.2rem 1.3rem; cursor: pointer; transition: all .15s; display: block; }
.opcion-grande:hover { border-color: rgba(228,23,62,.5); }
.opcion-grande.selected, .opcion-grande:has(input:checked) { border-color: var(--xpert-blue); background: var(--xpert-blue-light); }
.opcion-grande input { accent-color: var(--xpert-blue); }

/* ── DEBTALIA: ficha de deuda ── */
.ficha-datos li { padding: .55rem 0; border-bottom: 1px dashed var(--xpert-border); font-size: .95rem; }
.ficha-datos li:last-child { border-bottom: 0; }
.ficha-datos strong { color: var(--xpert-dark); }
.ficha-precio-box { background: var(--xpert-blue-light); border: 1px solid rgba(228,23,62,.25); border-radius: var(--radius-lg); padding: 1.4rem 1.5rem; }

/* ── DEBTALIA: artículo SEO home ── */
.seo-article h2 { font-size: 1.55rem; font-weight: 800; margin: 2.2rem 0 .9rem; color: var(--xpert-dark); }
.seo-article h3 { font-size: 1.2rem; font-weight: 700; margin: 1.6rem 0 .7rem; }
.seo-article p, .seo-article li { color: #444; line-height: 1.75; }
.seo-article blockquote { background: var(--xpert-blue-light); border-left: 4px solid var(--xpert-blue); padding: 1rem 1.3rem; border-radius: 0 10px 10px 0; margin: 1.3rem 0; }
