/* ============================================================
   PLADICOP.COM — Frontend CSS
   Colores: #1a1a2e (fondo oscuro) / #0F6E56 (verde acento)
   ============================================================ */

:root {
    --dark:    #1a1a2e;
    --green:   #0F6E56;
    --green-l: #12876a;
    --green-xl:#e8f5f1;
    --white:   #ffffff;
    --gray-50: #f8fafc;
    --gray-100:#f1f5f9;
    --gray-200:#e2e8f0;
    --gray-600:#475569;
    --gray-700:#334155;
    --gray-900:#0f172a;
    --text:    #1e293b;
    --radius:  10px;
    --shadow:  0 2px 8px rgba(0,0,0,.08);
    --shadow-md:0 4px 20px rgba(0,0,0,.12);
    --font:    -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--white);
}

img { max-width: 100%; height: auto; }
a   { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Tipografía ───────────────────────────────────────────── */
h1,h2,h3,h4 { line-height: 1.3; color: var(--gray-900); }
h1 { font-size: clamp(28px, 5vw, 48px); font-weight: 800; }
h2 { font-size: clamp(22px, 3.5vw, 34px); font-weight: 700; }
h3 { font-size: clamp(18px, 2.5vw, 24px); font-weight: 600; }

/* ── Layout ───────────────────────────────────────────────── */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.section    { padding: 72px 0; }
.section-sm { padding: 48px 0; }

/* ── Navbar ───────────────────────────────────────────────── */
.navbar {
    position: sticky;
    top: 0;
    background: var(--dark);
    z-index: 900;
    box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.navbar-inner {
    display: flex;
    align-items: center;
    height: 64px;
    gap: 24px;
}
.navbar-logo {
    font-size: 20px;
    font-weight: 800;
    color: var(--white);
    text-decoration: none;
    letter-spacing: .5px;
}
.navbar-logo span { color: var(--green); }
.navbar-nav {
    display: flex;
    gap: 4px;
    list-style: none;
    margin-left: auto;
}
.navbar-nav a {
    color: #c8d0de;
    font-size: 14px;
    padding: 6px 12px;
    border-radius: 6px;
    transition: background .15s, color .15s;
}
.navbar-nav a:hover { background: rgba(255,255,255,.08); color: #fff; text-decoration: none; }
.navbar-nav a.active { color: #7effd8; }
.navbar-cta {
    margin-left: 8px;
    display: flex;
    gap: 8px;
}
.hamburger { display: none; background: none; border: none; color: #fff; font-size: 24px; cursor: pointer; margin-left: auto; }

/* ── Botones ──────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 11px 22px;
    border-radius: 7px;
    border: 2px solid transparent;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: all .18s;
    line-height: 1;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-primary   { background: var(--green);  color: #fff; border-color: var(--green); }
.btn-primary:hover { background: var(--green-l); border-color: var(--green-l); }
.btn-outline   { background: transparent; color: var(--white); border-color: rgba(255,255,255,.5); }
.btn-outline:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-outline-dark { background: transparent; color: var(--green); border-color: var(--green); }
.btn-outline-dark:hover { background: var(--green-xl); }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.btn-lg { padding: 14px 30px; font-size: 17px; }

/* ── Hero ─────────────────────────────────────────────────── */
.hero {
    background: var(--dark);
    color: var(--white);
    padding: 96px 0 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at top, rgba(15,110,86,.3) 0%, transparent 60%);
}
.hero-content { position: relative; max-width: 800px; margin: 0 auto; }
.hero h1 { color: var(--white); margin-bottom: 20px; }
.hero h1 em { color: #7effd8; font-style: normal; }
.hero p { font-size: 18px; color: rgba(255,255,255,.8); max-width: 600px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.hero-disclaimer {
    margin-top: 28px;
    font-size: 12px;
    color: rgba(255,255,255,.4);
    border: 1px solid rgba(255,255,255,.15);
    display: inline-block;
    padding: 5px 14px;
    border-radius: 20px;
}

/* ── Estadísticas ─────────────────────────────────────────── */
.stats-bar {
    background: var(--green);
    color: var(--white);
    padding: 20px 0;
}
.stats-bar-inner {
    display: flex;
    justify-content: center;
    gap: 48px;
    flex-wrap: wrap;
}
.stat-item { text-align: center; }
.stat-item .num { font-size: 28px; font-weight: 800; }
.stat-item .lbl { font-size: 13px; opacity: .85; }

/* ── Grid de secciones ────────────────────────────────────── */
.sections-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.section-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 28px 22px;
    text-align: center;
    transition: box-shadow .2s, transform .2s;
    box-shadow: var(--shadow);
}
.section-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}
.section-card-icon {
    font-size: 36px;
    margin-bottom: 14px;
    display: block;
}
.section-card h3 { font-size: 17px; margin-bottom: 8px; }
.section-card p   { font-size: 13.5px; color: var(--gray-600); line-height: 1.5; margin-bottom: 16px; }

/* ── Planes ───────────────────────────────────────────────── */
.planes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    align-items: start;
}
.plan-card {
    border: 2px solid var(--gray-200);
    border-radius: 14px;
    padding: 32px 28px;
    position: relative;
    transition: box-shadow .2s;
}
.plan-card.destacado {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(15,110,86,.1);
}
.plan-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--green);
    color: var(--white);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
    white-space: nowrap;
}
.plan-nombre  { font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.plan-precio  { font-size: 36px; font-weight: 800; color: var(--green); }
.plan-precio span { font-size: 16px; font-weight: 400; color: var(--gray-600); }
.plan-features { list-style: none; margin: 20px 0; }
.plan-features li { padding: 7px 0; border-bottom: 1px solid var(--gray-100); font-size: 14px; display: flex; align-items: center; gap: 8px; }
.plan-features li::before { content: '✓'; color: var(--green); font-weight: 700; }
.plan-features li.no::before { content: '✗'; color: #cbd5e1; }
.plan-features li.no { color: #94a3b8; text-decoration: line-through; }

/* ── Asistente IA (chat flotante) ─────────────────────────── */
.ia-fab {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 800;
}
.ia-fab-btn {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--green);
    color: var(--white);
    border: none;
    font-size: 26px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(15,110,86,.5);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform .2s, box-shadow .2s;
}
.ia-fab-btn:hover { transform: scale(1.08); box-shadow: 0 6px 24px rgba(15,110,86,.6); }

.ia-chat-panel {
    display: none;
    position: fixed;
    bottom: 100px;
    right: 28px;
    width: 370px;
    height: 520px;
    background: var(--white);
    border-radius: 16px;
    box-shadow: 0 8px 40px rgba(0,0,0,.2);
    z-index: 801;
    flex-direction: column;
    overflow: hidden;
}
.ia-chat-panel.open { display: flex; }

.ia-chat-header {
    background: var(--dark);
    color: var(--white);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.ia-chat-header-icon { font-size: 22px; }
.ia-chat-header-info { flex: 1; }
.ia-chat-header-info strong { display: block; font-size: 14px; }
.ia-chat-header-info small   { opacity: .7; font-size: 11px; }
.ia-chat-close { background: none; border: none; color: #fff; font-size: 20px; cursor: pointer; opacity: .7; }

.ia-chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ia-msg {
    max-width: 85%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 13.5px;
    line-height: 1.5;
}
.ia-msg-user      { background: var(--green); color: #fff; align-self: flex-end; border-radius: 12px 12px 2px 12px; }
.ia-msg-assistant { background: var(--gray-100); color: #1e293b; align-self: flex-start; border-radius: 12px 12px 12px 2px; }
.ia-msg-typing    { color: var(--gray-600); font-size: 13px; }

/* Formato Markdown dentro del chat del asistente */
.ia-msg-assistant p        { margin: 0 0 7px; line-height: 1.55; }
.ia-msg-assistant p:last-child { margin-bottom: 0; }
.ia-msg-assistant strong   { color: #0f172a; font-weight: 700; }
.ia-msg-assistant em       { font-style: italic; }
.ia-msg-assistant h2       { font-size: 15px; font-weight: 700; margin: 10px 0 5px; color: #0f172a; border-bottom: 1px solid #e2e8f0; padding-bottom: 4px; }
.ia-msg-assistant h3       { font-size: 14px; font-weight: 700; margin: 8px 0 4px; color: #0f172a; }
.ia-msg-assistant h4       { font-size: 13px; font-weight: 700; margin: 6px 0 3px; color: #334155; }
.ia-msg-assistant ul       { margin: 6px 0 8px 18px; padding: 0; list-style: disc; }
.ia-msg-assistant ol       { margin: 6px 0 8px 18px; padding: 0; list-style: decimal; }
.ia-msg-assistant li       { margin: 4px 0; line-height: 1.5; }
.ia-msg-assistant pre      { background: #1e293b; color: #e2e8f0; padding: 10px 12px; border-radius: 8px;
                             font-size: 12px; overflow-x: auto; white-space: pre-wrap; margin: 8px 0; }
.ia-msg-assistant code     { background: #f1f5f9; color: #0f172a; padding: 1px 5px; border-radius: 4px;
                             font-size: 12px; font-family: monospace; }
.ia-msg-assistant pre code { background: none; color: inherit; padding: 0; border-radius: 0; font-size: 11px; }
.ia-msg-assistant hr       { border: none; border-top: 1px solid #cbd5e1; margin: 10px 0; }

.ia-chat-footer {
    padding: 12px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    gap: 8px;
}
.ia-chat-input {
    flex: 1;
    border: 1px solid var(--gray-200);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 13.5px;
    font-family: var(--font);
    resize: none;
    outline: none;
    max-height: 100px;
}
.ia-chat-input:focus { border-color: var(--green); }
.ia-chat-send {
    background: var(--green);
    color: #fff;
    border: none;
    border-radius: 8px;
    padding: 0 16px;
    cursor: pointer;
    font-size: 18px;
    transition: background .15s;
}
.ia-chat-send:hover { background: var(--green-l); }
.ia-consultas-badge {
    text-align: center;
    font-size: 11px;
    color: var(--gray-600);
    padding: 4px;
    background: var(--gray-50);
}

/* ── Noticias ─────────────────────────────────────────────── */
.noticias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.noticia-card {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: box-shadow .2s;
}
.noticia-card:hover { box-shadow: var(--shadow-md); }
.noticia-card img { width: 100%; height: 180px; object-fit: cover; }
.noticia-card-body { padding: 18px; }
.noticia-cat { font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--green); letter-spacing: .5px; }
.noticia-card h3 { font-size: 16px; margin: 6px 0 8px; }
.noticia-card p  { font-size: 13.5px; color: var(--gray-600); }
.noticia-fecha   { font-size: 12px; color: #94a3b8; margin-top: 10px; }
.badge-nuevo { background: var(--green-xl); color: var(--green); font-size: 10px; font-weight: 700; padding: 2px 7px; border-radius: 12px; margin-left: 6px; }

/* ── Footer ───────────────────────────────────────────────── */
footer {
    background: var(--dark);
    color: rgba(255,255,255,.7);
    padding: 48px 0 24px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 36px;
}
.footer-brand { font-size: 20px; font-weight: 800; color: var(--white); margin-bottom: 10px; }
.footer-brand span { color: var(--green); }
.footer-desc { font-size: 13.5px; line-height: 1.7; }
.footer-title { font-size: 13px; font-weight: 700; color: var(--white); text-transform: uppercase; letter-spacing: .5px; margin-bottom: 12px; }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,.6); font-size: 13.5px; text-decoration: none; transition: color .15s; }
.footer-links a:hover { color: var(--white); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 12.5px;
    flex-wrap: wrap;
    gap: 8px;
}
.footer-disclaimer {
    background: rgba(255,255,255,.07);
    border: 1px solid rgba(255,255,255,.12);
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    text-align: center;
    margin-bottom: 20px;
}

/* ── Formularios ──────────────────────────────────────────── */
.form-group { margin-bottom: 18px; }
.form-label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.form-control {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid var(--gray-200);
    border-radius: 7px;
    font-size: 15px;
    font-family: var(--font);
    transition: border-color .15s;
    background: var(--white);
}
.form-control:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px rgba(15,110,86,.1); }
.form-hint { font-size: 12.5px; color: var(--gray-600); margin-top: 5px; }
.form-error { color: #dc2626; font-size: 13px; margin-top: 4px; }

/* ── Alertas ──────────────────────────────────────────────── */
.alert { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 18px; font-size: 14.5px; }
.alert-success { background: #f0fdf4; border-left: 4px solid #16a34a; color: #15803d; }
.alert-danger  { background: #fff1f2; border-left: 4px solid #dc2626; color: #b91c1c; }
.alert-info    { background: #eff6ff; border-left: 4px solid #2563eb; color: #1e40af; }
.alert-warning { background: #fffbeb; border-left: 4px solid #f59e0b; color: #92400e; }

/* ── Modales ──────────────────────────────────────────────── */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal-overlay.open { display: flex; }
.modal-box {
    background: var(--white);
    border-radius: 16px;
    max-width: 520px;
    width: 100%;
    padding: 36px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    position: relative;
}
.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: none; border: none;
    font-size: 22px; cursor: pointer; color: var(--gray-600);
}
.modal-title { font-size: 22px; font-weight: 700; margin-bottom: 8px; }

/* ── Pago modal — métodos ─────────────────────────────────── */
.metodo-pago-tabs { display: flex; gap: 6px; margin-bottom: 20px; flex-wrap: wrap; }
.metodo-btn {
    padding: 8px 16px;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    cursor: pointer;
    background: none;
    font-size: 14px;
    font-weight: 500;
    transition: .15s;
}
.metodo-btn.active { border-color: var(--green); background: var(--green-xl); color: var(--green); }
.metodo-info { display: none; }
.metodo-info.active { display: block; }
.metodo-info dl { display: grid; grid-template-columns: 120px 1fr; gap: 6px 12px; font-size: 14px; }
.metodo-info dt { font-weight: 600; }
.qr-img { max-width: 180px; margin: 10px 0; border-radius: 8px; border: 2px solid var(--gray-200); }

/* ── Breadcrumb ───────────────────────────────────────────── */
.breadcrumb { font-size: 13px; color: var(--gray-600); margin-bottom: 20px; }
.breadcrumb a { color: var(--green); }
.breadcrumb span { margin: 0 6px; }

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 900px) {
    .sections-grid  { grid-template-columns: repeat(2, 1fr); }
    .planes-grid    { grid-template-columns: 1fr; }
    .noticias-grid  { grid-template-columns: repeat(2, 1fr); }
    .footer-grid    { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    .sections-grid  { grid-template-columns: 1fr; }
    .noticias-grid  { grid-template-columns: 1fr; }
    .footer-grid    { grid-template-columns: 1fr; }
    .navbar-nav     { display: none; }
    .navbar-nav.open { display: flex; flex-direction: column; position: absolute; top: 64px; left: 0; right: 0; background: var(--dark); padding: 12px; gap: 4px; }
    .hamburger      { display: block; }
    .navbar-cta     { display: none; }
    .ia-chat-panel  { width: calc(100vw - 16px); right: 8px; }
    .stats-bar-inner { gap: 24px; }
}
