/* ── Ciudad Provincia Generator – frontend styles ── */

/* ===== Hub pages – kgg-* system ===== */

.kgg-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6; color: #1a1a1a; max-width: 1200px; margin: 0 auto; padding: 0; background: #fff;
    --kgg-header-h: 72px;
}
.kgg-page * { box-sizing: border-box; }
.kgg-page p,
.entry-content .kgg-page p,
.kgg-content p,
.entry-content .kgg-content p { margin-bottom: 1.2rem; line-height: 1.8; color: #2d3748 !important; }

.kgg-bleed {
    position: relative; width: 100vw; left: 50%; transform: translateX(-50%); max-width: 100vw;
}

/* Hero */
.kgg-hero {
    background: linear-gradient(135deg, rgba(0,147,179,.92), rgba(0,163,196,.90));
    color: #fff; padding: 96px 20px 80px; margin: 0; overflow: visible;
}
.kgg-hero-inner { max-width: 960px; margin: 0 auto; text-align: center; }
.kgg-hero h1 {
    font-size: clamp(2rem, 3.6vw, 3rem); font-weight: 800; color: #fff;
    margin: 0 0 16px; line-height: 1.15; text-shadow: 0 2px 8px rgba(0,0,0,.25);
}
.kgg-hero .sub { color: #fff !important; font-size: 1.1rem; margin: 0 0 32px; text-shadow: 0 1px 3px rgba(0,0,0,.25); }

/* Search form in hero */
.kgg-finder {
    background: #fff !important; border-radius: 16px !important;
    box-shadow: 0 14px 42px rgba(0,0,0,.35) !important;
    padding: 24px !important; max-width: 680px; margin: 0 auto;
    position: relative; z-index: 10;
}
.kgg-finder-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 12px;
}
.kgg-finder input, .kgg-finder input[type="text"], .kgg-finder input[type="search"],
.kgg-finder select {
    padding: 13px 14px !important; border: 2px solid #e0e6ee !important;
    border-radius: 10px !important; font-size: 1rem !important;
    background: #fff !important; color: #1a1a1a !important;
    transition: border-color .2s; width: 100% !important; display: block !important;
    margin-bottom: 0 !important; box-shadow: none !important;
}
.kgg-finder input:focus, .kgg-finder select:focus { outline: none !important; border-color: #00a3c4 !important; }
.kgg-btn-search {
    display: block !important; width: 100% !important; padding: 15px 16px !important;
    background: #00a3c4 !important; color: #fff !important; border: none !important;
    border-radius: 10px !important; font-weight: 700 !important; font-size: 1rem !important;
    border-bottom: 4px solid #0075e3 !important; cursor: pointer; transition: all .2s ease;
    box-shadow: none !important;
}
.kgg-btn-search:hover { background: #0091b0 !important; transform: translateY(-2px); }

/* Header height offset (fixed menu compensation) */
@media (min-width: 783px) { .kgg-page { --kgg-header-h: 84px; } }
body.admin-bar .kgg-page { --kgg-adminbar-h: 46px; }
@media (min-width: 783px) { body.admin-bar .kgg-page { --kgg-adminbar-h: 32px; } }
.kgg-page .kgg-hero { padding-top: calc(96px + var(--kgg-header-h) + var(--kgg-adminbar-h, 0px)); }
.kgg-page .kgg-hero h1, .kgg-page .kgg-h2, .kgg-page .kgg-h3, .kgg-page [id] {
    scroll-margin-top: calc(var(--kgg-header-h) + var(--kgg-adminbar-h, 0px) + 12px);
}

/* Content wrapper */
.kgg-content { padding: 20px; }

/* Headings */
.kgg-h2 {
    border-left: 6px solid #00a3c4; border-radius: 10px;
    padding: 16px 24px; background: linear-gradient(135deg, #e6f0ff 0%, #f0f7ff 100%);
    color: #002a5c; font-size: 1.7rem; font-weight: 800; margin: 3rem 0 1.5rem;
    box-shadow: 0 2px 8px rgba(0,163,196,.08);
}
.kgg-h3 {
    font-size: 1.35rem; font-weight: 700; color: #003b73; margin-top: 2em; margin-bottom: 1em;
    line-height: 1.4; position: relative; padding-left: 16px;
}
.kgg-h3::before {
    content: ''; position: absolute; left: 0; top: 6px; width: 4px; height: calc(100% - 12px);
    background: linear-gradient(180deg, #00a3c4, #0075e3); border-radius: 2px;
}

/* Links */
.kgg-link { color: #0183e4; text-decoration: none; border-bottom: 2px solid #00a3c4; font-weight: 600; transition: all .3s ease; padding-bottom: 2px; }
.kgg-link:hover { color: #000; border-bottom-width: 3px; }

/* FAQ questions — sin barra lateral ni indentación */
.kgg-faq-q {
    font-size: 1.1rem; font-weight: 700; color: #003b73 !important;
    margin-top: 1.8em; margin-bottom: .5em; line-height: 1.4;
    padding-left: 0 !important; position: static !important;
}
.kgg-faq-q::before { display: none !important; }

/* Featured cards */
.kgg-fila-tarjetas { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 2rem; margin: 2.5rem 0; align-items: stretch; }
.kgg-tarjeta {
    background: #fff; border: 2px solid #e7ecf3; border-radius: 16px; padding: 0 1.75rem 1.75rem;
    box-shadow: 0 4px 16px rgba(0,0,0,.06); transition: .3s; position: relative; overflow: hidden;
    display: flex; flex-direction: column;
}
.kgg-tarjeta::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: linear-gradient(90deg, #00a3c4, #0075e3); }
.kgg-tarjeta:hover { transform: translateY(-8px); box-shadow: 0 12px 28px rgba(0,163,196,.18); border-color: #00a3c4; }
.kgg-tarjeta h3 { font-size: 1.35rem; font-weight: 800; color: #0f172a; margin-top: 1.75rem; margin-bottom: .75rem; line-height: 1.3; text-align: center; }
.kgg-tarjeta h4 { font-size: 1rem; color: #00a3c4; margin-bottom: 1rem; font-weight: 600; text-align: center; }
.kgg-tarjeta p { font-size: .98rem; color: #2d3748; line-height: 1.7; text-align: left; margin-bottom: .75rem; }
.kgg-tarjeta p:last-of-type { margin-bottom: 1.1rem; }
.kgg-boton {
    display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
    background: linear-gradient(135deg, #00a3c4, #0091b0); color: #fff !important;
    font-weight: 700; font-size: 1rem; padding: .85rem 1.75rem; border: none; border-radius: 10px;
    text-decoration: none !important; border-bottom: 4px solid #0075e3; transition: .3s;
    margin-top: auto; align-self: center; box-shadow: 0 4px 12px rgba(0,163,196,.25);
}
.kgg-boton:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,163,196,.35); background: linear-gradient(135deg, #0091b0, #007a96); }

/* Directory */
.kgg-directory { padding: 40px 0; background: #f5f7fa; }
.kgg-directory .box {
    background: #fff; border: 1px solid #e7ecf3; border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,.06); padding: 28px 22px; max-width: 1200px; margin: 0 auto;
}
.kgg-dir-title { font-size: clamp(1.6rem, 2.6vw, 2rem); font-weight: 800; color: #002a5c; text-align: center; margin: 0 0 10px; }
.kgg-dir-sub { text-align: center; color: #64748b; margin: 0 0 18px; }
.kgg-dir-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; margin-top: 10px; }
.kgg-dir-item {
    background: #fff; border: 1px solid #e7ecf3; border-radius: 12px; padding: 16px;
    transition: .25s; box-shadow: 0 2px 8px rgba(0,0,0,.04);
}
.kgg-dir-item:hover { transform: translateY(-4px); box-shadow: 0 10px 24px rgba(0,163,196,.18); border-color: #00a3c4; }
.kgg-dir-name { font-weight: 700; color: #0f172a; min-height: 2.6rem; margin: 0 0 10px; }
.kgg-dir-link {
    display: inline-block; color: #00a3c4; text-decoration: none; font-weight: 600;
    border: 2px solid #00a3c4; border-radius: 8px; padding: .55rem 1.1rem;
}
.kgg-dir-link:hover { background: #00a3c4; color: #fff; }

/* Info boxes */
.kgg-caja-azul { background: linear-gradient(135deg, #e6f0ff 0%, #f0f7ff 100%); border-left: 5px solid #0075e3; padding: 1.25rem 1.5rem; border-radius: 12px; margin: 1.5rem 0; box-shadow: 0 2px 8px rgba(0,117,227,.08); }
.kgg-caja-verde { background: linear-gradient(135deg, #f0fdf9 0%, #f7fefb 100%); border-left: 5px solid #10b981; padding: 1.25rem 1.5rem; border-radius: 12px; margin: 1.5rem 0; box-shadow: 0 2px 8px rgba(16,185,129,.08); }
.kgg-caja-gris { background: linear-gradient(135deg, #f5f5f5 0%, #fafafa 100%); border-left: 5px solid #64748b; padding: 1.25rem 1.5rem; border-radius: 12px; margin: 1.5rem 0; box-shadow: 0 2px 8px rgba(100,116,139,.08); }

/* State/region box */
.kgg-caja-regiones {
    background: linear-gradient(135deg, #f5f7f9 0%, #fafbfc 100%); padding: 2rem; border-radius: 16px; margin: 2rem 0;
    border: 2px solid #e7ecf3; box-shadow: 0 4px 12px rgba(0,0,0,.05);
}
.kgg-caja-regiones h3 { color: #002a5c; margin-bottom: 1.5rem; font-size: 1.4rem; }
.kgg-caja-regiones ul { columns: 2; -webkit-columns: 2; -moz-columns: 2; column-gap: 48px; list-style: none; padding-left: 0; margin: 0; }
.kgg-caja-regiones li {
    list-style: none !important; padding-left: 0 !important;
    display: flex !important; align-items: center; gap: 10px;
    margin: 0 0 .75rem; color: #0f172a; font-weight: 600; line-height: 1.7;
}
.kgg-caja-regiones li::before {
    content: '📍' !important; display: inline-block; width: 20px; flex: 0 0 20px;
    position: static !important; height: auto; background: none !important;
    box-shadow: none !important; border-radius: 0 !important;
    filter: drop-shadow(0 0 0 rgba(0,0,0,0));
}

/* Lists inside hub content */
.kgg-page ul { list-style: none !important; list-style-type: none !important; margin: 1.2rem 0; padding-left: 0 !important; }
.kgg-page ul li {
    list-style: none !important; list-style-type: none !important; margin-bottom: .75rem;
    padding-left: 28px !important; position: relative; line-height: 1.7;
}
.kgg-page ul li::marker { content: none !important; display: none !important; }
.kgg-page ul li::before {
    content: '' !important; position: absolute !important; left: 0 !important; top: 8px !important;
    width: 8px !important; height: 8px !important;
    background: linear-gradient(135deg, #00a3c4, #0075e3) !important; border-radius: 50% !important;
    box-shadow: 0 0 0 3px rgba(0,163,196,.15) !important;
}
.kgg-page ol { counter-reset: kgg; list-style: none; padding-left: 0; margin: 1.2rem 0; }
.kgg-page ol > li { counter-increment: kgg; position: relative; padding-left: 3rem; margin-bottom: 1rem; line-height: 1.7; }
.kgg-page ol > li::before {
    content: counter(kgg); position: absolute; left: 0; top: 0; width: 2em; height: 2em;
    background: linear-gradient(135deg, #00a3c4, #0075e3); color: #fff; font-weight: 700;
    display: flex; align-items: center; justify-content: center; border-radius: 10px;
    font-size: 1rem; box-shadow: 0 3px 8px rgba(0,163,196,.25);
}

/* CTA enlazatom */
.kgg-enlazatom { max-width: 100%; margin: 3rem 0; }
.kgg-enlazatom a {
    position: relative; display: block; width: 100%; background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    color: #23262b; text-decoration: none; border: 1px solid #e7ecf3; border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0,0,0,.08); padding: 20px 110px 20px 24px; line-height: 1.6; transition: all .3s ease; overflow: hidden;
}
.kgg-enlazatom a::after {
    content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 90px;
    background: linear-gradient(135deg, #00a3c4, #0091b0); border-top-right-radius: 14px; border-bottom-right-radius: 14px; z-index: 1;
}
.kgg-enlazatom a::before {
    content: '→'; position: absolute; top: 50%; right: 32px; font-size: 24px; font-weight: 700;
    color: #fff; transform: translateY(-50%); z-index: 2; transition: all .3s ease;
}
.kgg-enlazatom a:hover { transform: translateY(-4px); box-shadow: 0 12px 28px rgba(0,163,196,.2); border-color: #00a3c4; }
.kgg-enlazatom a:hover::after { background: linear-gradient(135deg, #0091b0, #007a96); }
.kgg-enlazatom a:hover::before { right: 28px; }

/* Hub page responsive */
@media (max-width: 768px) {
    .kgg-hero { padding: 64px 16px 56px; }
    .kgg-hero h1 { font-size: 1.9rem; }
    .kgg-hero .sub { font-size: 1rem; }
    .kgg-finder { padding: 20px; }
    .kgg-finder-row { grid-template-columns: 1fr; }
    .kgg-content { padding: 16px; }
    .kgg-h2 { font-size: 1.4rem; padding: 14px 18px; }
    .kgg-h3 { font-size: 1.2rem; }
    .kgg-dir-grid { grid-template-columns: 1fr; }
    .kgg-fila-tarjetas { grid-template-columns: 1fr; gap: 1.5rem; }
    .kgg-caja-regiones ul { columns: 1; }
}

/* ── Ciudad Provincia Generator – frontend cluster styles ── */

/* Grid de ciudades / provincias */
.cpg-ciudad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: .6rem;
    margin: 1rem 0 1.25rem;
}

.cpg-ciudad-card {
    display: block;
    text-decoration: none !important;
    padding: .7rem .9rem;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #ddeaf8;
    border-left: 3px solid #00a3c4;
    color: #002a5c !important;
    font-size: .88rem;
    font-weight: 700;
    line-height: 1.3;
    transition: transform .15s, box-shadow .15s;
    box-shadow: none;
}

.cpg-ciudad-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 14px rgba(0, 115, 150, .1);
    border-left-color: #0075e3;
}

.cpg-ciudad-sub {
    display: block;
    font-size: .72rem;
    font-weight: 400;
    color: #7a9ab8;
    margin-top: .15rem;
    border: none !important;
}

/* Botón centrado bajo el cluster */
.cpg-btn-center {
    text-align: center;
    margin: 1.25rem 0 1.75rem;
}

/* Responsive */
@media (max-width: 900px) {
    .cpg-ciudad-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 680px) {
    .cpg-ciudad-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 420px) {
    .cpg-ciudad-grid { grid-template-columns: 1fr; }
}
