/* ============================================================
   PUBLICO.CSS — ESTILOS PARA PÁGINAS PÚBLICAS
   index.php, reclamaciones.php, privacidad.php, terminos.php
   ============================================================ */

/* ── RESET Y BASE ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --primario:        #1a3a5c;
    --primario-hover:  #142e4a;
    --acento:          #c8973a;
    --acento-hover:    #b07d2a;
    --fondo:           #f0f4f8;
    --blanco:          #ffffff;
    --borde:           #dde3ea;
    --texto:           #1e2d3d;
    --texto-suave:     #546e7a;
    --sombra:          0 2px 14px rgba(26,58,92,0.10);
    --sombra-hover:    0 8px 32px rgba(26,58,92,0.18);
    --radio:           12px;
    --transicion:      all 0.25s ease;
    --verde:           #2e7d32;
    --verde-bg:        #e8f5e9;
    --rojo:            #c62828;
    --rojo-bg:         #ffebee;
    --max-ancho:       1100px;
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: var(--fondo);
    color: var(--texto);
    font-size: 15px;
    line-height: 1.6;
}

a { color: var(--primario); }
a:hover { color: var(--acento); }
img { max-width: 100%; height: auto; display: block; }

/* ── LAYOUT ──────────────────────────────────────────────── */
.pub-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.pub-main { flex: 1; }

.contenedor {
    max-width: var(--max-ancho);
    margin: 0 auto;
    padding: 0 20px;
}

/* ── HEADER / NAVBAR ─────────────────────────────────────── */
.pub-nav {
    background: var(--primario);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

.pub-nav-inner {
    max-width: var(--max-ancho);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 60px;
    gap: 16px;
}

.pub-nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.pub-nav-logo img {
    height: 36px;
    width: auto;
    border-radius: 5px;
}

.pub-nav-nombre {
    font-size: 17px;
    font-weight: 800;
    color: white;
    line-height: 1.1;
}

.pub-nav-sub {
    font-size: 10px;
    color: rgba(255,255,255,0.65);
    font-weight: 400;
    letter-spacing: 0.3px;
}

.pub-nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.pub-nav-link {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: 6px;
    transition: var(--transicion);
}

.pub-nav-link:hover {
    background: rgba(255,255,255,0.12);
    color: white;
}

.pub-nav-link-acento {
    background: var(--acento);
    color: white !important;
    font-weight: 700;
}

.pub-nav-link-acento:hover {
    background: var(--acento-hover);
}

/* ── HERO ────────────────────────────────────────────────── */
.pub-hero {
    background: linear-gradient(135deg, var(--primario) 0%, #2a5298 70%, #1565c0 100%);
    color: white;
    padding: 64px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.pub-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    pointer-events: none;
}

.pub-hero-contenido { position: relative; z-index: 1; max-width: 700px; margin: 0 auto; }

.pub-hero h1 {
    font-size: clamp(28px, 5vw, 44px);
    font-weight: 900;
    margin-bottom: 12px;
    line-height: 1.15;
}

.pub-hero-sub {
    font-size: 16px;
    opacity: 0.85;
    margin-bottom: 28px;
    line-height: 1.6;
}

.pub-hero-categoria {
    display: inline-block;
    background: var(--acento);
    color: white;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}

/* ── FILTROS HABITACIONES ────────────────────────────────── */
.pub-filtros {
    background: white;
    border-bottom: 1px solid var(--borde);
    padding: 14px 0;
    position: sticky;
    top: 60px;
    z-index: 90;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.pub-filtros-inner {
    max-width: var(--max-ancho);
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.pub-filtro-select,
.pub-filtro-input {
    padding: 9px 14px;
    border: 1.5px solid var(--borde);
    border-radius: 8px;
    font-size: 13px;
    font-family: inherit;
    background: white;
    color: var(--texto);
    outline: none;
    transition: var(--transicion);
    cursor: pointer;
}

.pub-filtro-select:focus,
.pub-filtro-input:focus {
    border-color: var(--primario);
    box-shadow: 0 0 0 3px rgba(26,58,92,0.08);
}

.pub-filtro-btn {
    background: var(--primario);
    color: white;
    border: none;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transicion);
}

.pub-filtro-btn:hover { background: var(--primario-hover); }

.pub-filtro-clear {
    color: var(--rojo);
    text-decoration: none;
    font-size: 12px;
    padding: 4px 8px;
    transition: var(--transicion);
}

.pub-contador {
    margin-left: auto;
    font-size: 12px;
    color: var(--texto-suave);
    white-space: nowrap;
}

/* ── GRID HABITACIONES ───────────────────────────────────── */
.pub-seccion {
    padding: 40px 0;
}

.pub-seccion-titulo {
    font-size: 22px;
    font-weight: 800;
    color: var(--primario);
    margin-bottom: 6px;
}

.pub-seccion-sub {
    font-size: 14px;
    color: var(--texto-suave);
    margin-bottom: 24px;
}

.hab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.hab-card-pub {
    background: white;
    border-radius: var(--radio);
    border: 1px solid var(--borde);
    overflow: hidden;
    transition: var(--transicion);
    box-shadow: var(--sombra);
}

.hab-card-pub:hover {
    transform: translateY(-4px);
    box-shadow: var(--sombra-hover);
    border-color: var(--acento);
}

.hab-foto-wrap {
    height: 200px;
    overflow: hidden;
    background: #f0f4f8;
    position: relative;
}

.hab-foto-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.hab-card-pub:hover .hab-foto-wrap img {
    transform: scale(1.04);
}

.hab-foto-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    font-size: 56px;
    color: var(--borde);
}

.hab-badge-tipo {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(26,58,92,0.85);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.hab-badge-estado {
    position: absolute;
    top: 12px;
    right: 12px;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 9px;
    border-radius: 20px;
}

.hab-info {
    padding: 18px 18px 16px;
}

.hab-codigo {
    font-size: 13px;
    color: var(--texto-suave);
    margin-bottom: 4px;
}

.hab-nombre {
    font-size: 17px;
    font-weight: 800;
    color: var(--primario);
    margin-bottom: 8px;
}

.hab-detalles {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 10px;
    font-size: 12px;
    color: var(--texto-suave);
}

.hab-detalle-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.hab-amenities-pub {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin-bottom: 14px;
}

.amenity-tag {
    background: var(--fondo);
    color: var(--primario);
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.hab-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid var(--borde);
}

.hab-tarifa {
    display: flex;
    flex-direction: column;
}

.hab-precio {
    font-size: 22px;
    font-weight: 900;
    color: var(--acento);
    line-height: 1;
}

.hab-precio-label {
    font-size: 10px;
    color: var(--texto-suave);
    font-weight: 500;
}

.hab-btn-reservar {
    background: var(--primario);
    color: white;
    text-decoration: none;
    padding: 9px 16px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    transition: var(--transicion);
    white-space: nowrap;
}

.hab-btn-reservar:hover {
    background: var(--acento);
    color: white;
}

.hab-btn-reservar.deshabilitado {
    background: var(--borde);
    color: var(--texto-suave);
    cursor: not-allowed;
}

/* ── ESTADO VACÍO ────────────────────────────────────────── */
.pub-vacio {
    text-align: center;
    padding: 60px 20px;
    color: var(--texto-suave);
}

.pub-vacio-icono { font-size: 48px; margin-bottom: 12px; }
.pub-vacio h3 { font-size: 18px; color: var(--primario); margin-bottom: 8px; }

/* ── INFO STRIPS ─────────────────────────────────────────── */
.pub-strip {
    background: var(--primario);
    color: white;
    padding: 40px 20px;
}

.pub-strip-grid {
    max-width: var(--max-ancho);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 24px;
    text-align: center;
}

.strip-item-icono { font-size: 32px; margin-bottom: 8px; }
.strip-item-titulo { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.strip-item-desc   { font-size: 12px; opacity: 0.75; }

/* ── FORMULARIO PÚBLICO ──────────────────────────────────── */
.pub-form-wrap {
    max-width: 680px;
    margin: 0 auto;
}

.pub-form-card {
    background: white;
    border-radius: var(--radio);
    border: 1px solid var(--borde);
    padding: 28px 32px;
    box-shadow: var(--sombra);
}

@media (max-width: 600px) {
    .pub-form-card { padding: 20px 16px; }
}

.pub-campo-grupo {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
}

.pub-campo-grupo label {
    font-size: 13px;
    font-weight: 600;
    color: var(--primario);
}

.pub-campo-grupo input,
.pub-campo-grupo select,
.pub-campo-grupo textarea {
    padding: 10px 14px;
    border: 1.5px solid var(--borde);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    color: var(--texto);
    background: #fafafa;
    outline: none;
    transition: var(--transicion);
}

.pub-campo-grupo input:focus,
.pub-campo-grupo select:focus,
.pub-campo-grupo textarea:focus {
    border-color: var(--primario);
    background: white;
    box-shadow: 0 0 0 3px rgba(26,58,92,0.07);
}

.pub-campo-ayuda {
    font-size: 11px;
    color: var(--texto-suave);
}

.pub-requerido { color: var(--rojo); margin-left: 2px; }

.pub-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: var(--transicion);
}

.pub-btn-primario {
    background: var(--primario);
    color: white;
}

.pub-btn-primario:hover { background: var(--primario-hover); color: white; }

.pub-btn-acento {
    background: var(--acento);
    color: white;
}

.pub-btn-acento:hover { background: var(--acento-hover); color: white; }

/* Alertas públicas */
.pub-alerta {
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 20px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.pub-alerta-verde { background: var(--verde-bg); color: var(--verde); border-left: 4px solid var(--verde); }
.pub-alerta-rojo  { background: var(--rojo-bg);  color: var(--rojo);  border-left: 4px solid var(--rojo); }
.pub-alerta-azul  { background: #e3f2fd; color: #1565c0; border-left: 4px solid #1565c0; }

/* ── PÁGINAS LEGALES ─────────────────────────────────────── */
.legal-contenido {
    max-width: 760px;
    margin: 0 auto;
    background: white;
    border-radius: var(--radio);
    padding: 36px 40px;
    box-shadow: var(--sombra);
    line-height: 1.8;
}

@media (max-width: 600px) {
    .legal-contenido { padding: 20px 16px; }
}

.legal-contenido h1 { font-size: 24px; color: var(--primario); margin-bottom: 6px; }
.legal-contenido h2 { font-size: 17px; color: var(--primario); margin: 24px 0 8px; }
.legal-contenido h3 { font-size: 15px; color: var(--primario); margin: 18px 0 6px; }
.legal-contenido p  { margin-bottom: 12px; color: var(--texto); }
.legal-contenido ul, .legal-contenido ol { padding-left: 20px; margin-bottom: 12px; }
.legal-contenido li { margin-bottom: 5px; }
.legal-contenido strong { color: var(--primario); }
.legal-fecha { font-size: 12px; color: var(--texto-suave); margin-bottom: 28px; }
.legal-separador { border: none; border-top: 1px solid var(--borde); margin: 28px 0; }

/* ── MANUAL ──────────────────────────────────────────────── */
.manual-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 24px;
    max-width: var(--max-ancho);
    margin: 0 auto;
    padding: 32px 20px;
    align-items: start;
}

@media (max-width: 800px) { .manual-layout { grid-template-columns: 1fr; } }

.manual-nav {
    background: white;
    border-radius: var(--radio);
    border: 1px solid var(--borde);
    padding: 16px 0;
    position: sticky;
    top: 80px;
}

.manual-nav-titulo { font-size: 11px; font-weight: 700; color: var(--texto-suave); text-transform: uppercase; letter-spacing: .5px; padding: 0 16px 8px; }

.manual-nav-link {
    display: block;
    padding: 8px 16px;
    font-size: 13px;
    color: var(--texto-suave);
    text-decoration: none;
    transition: var(--transicion);
    border-left: 3px solid transparent;
}

.manual-nav-link:hover  { color: var(--primario); background: var(--fondo); }
.manual-nav-link-activo { color: var(--primario); font-weight: 700; border-left-color: var(--primario); background: #f0f4f8; }

.manual-cuerpo section { margin-bottom: 40px; }
.manual-sec-titulo { font-size: 20px; font-weight: 800; color: var(--primario); margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--borde); }
.manual-card { background: white; border-radius: var(--radio); border: 1px solid var(--borde); padding: 20px; margin-bottom: 14px; }
.manual-card h4 { font-size: 14px; font-weight: 700; color: var(--primario); margin-bottom: 8px; }
.manual-card p, .manual-card li { font-size: 13px; color: var(--texto-suave); line-height: 1.7; }
.manual-card ul, .manual-card ol { padding-left: 18px; }
.manual-paso { display: flex; gap: 12px; margin-bottom: 10px; align-items: flex-start; }
.manual-paso-num { width: 26px; height: 26px; background: var(--primario); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; flex-shrink: 0; margin-top: 1px; }
.manual-paso-texto { font-size: 13px; color: var(--texto-suave); line-height: 1.6; flex: 1; }
.manual-badge-nivel { display: inline-block; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 10px; margin-left: 6px; }
.nivel-admin { background: #e8f5e9; color: #2e7d32; }
.nivel-recep  { background: #e3f2fd; color: #1565c0; }
.nivel-hk     { background: #fff3e0; color: #e65100; }
.tip-card { background: #e8f5e9; border-left: 4px solid #2e7d32; border-radius: 8px; padding: 12px 16px; font-size: 13px; color: #1b5e20; margin: 10px 0; }
.aviso-card { background: #fff3e0; border-left: 4px solid #e65100; border-radius: 8px; padding: 12px 16px; font-size: 13px; color: #e65100; margin: 10px 0; }

/* ── FOOTER PÚBLICO ──────────────────────────────────────── */
.pub-footer {
    background: var(--primario);
    color: rgba(255,255,255,0.7);
    padding: 28px 20px;
    margin-top: auto;
}

.pub-footer-inner {
    max-width: var(--max-ancho);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 20px;
    align-items: center;
}

@media (max-width: 600px) { .pub-footer-inner { grid-template-columns: 1fr; text-align: center; } }

.pub-footer-nombre { font-size: 14px; font-weight: 700; color: white; margin-bottom: 4px; }
.pub-footer-links  { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 6px; }
.pub-footer-link   { color: rgba(255,255,255,0.6); text-decoration: none; font-size: 12px; transition: var(--transicion); }
.pub-footer-link:hover { color: white; }

.pub-footer-hosting { text-align: right; font-size: 11px; line-height: 1.7; }
.pub-footer-hosting a { color: rgba(255,255,255,0.6); text-decoration: none; transition: var(--transicion); }
.pub-footer-hosting a:hover { color: white; }
.pub-footer-wa { color: #6bff9a !important; font-weight: 600; }

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 768px) {
    .pub-nav-links { gap: 0; }
    .pub-nav-link  { padding: 6px 8px; font-size: 12px; }
    .pub-hero      { padding: 44px 16px; }
    .pub-hero h1   { font-size: 26px; }
    .hab-grid      { grid-template-columns: 1fr; }
    .pub-filtros-inner { gap: 6px; }
    .pub-filtro-select { font-size: 12px; }
}

@media (max-width: 480px) {
    .pub-nav-links .pub-nav-link:not(.pub-nav-link-acento) { display: none; }
}
