:root {
    --primary: #2d6a4f;
    --primary-dark: #1b4332;
    --accent: #f4a261;
    --light-bg: #f8f9fa;
    --card-shadow: 0 2px 12px rgba(0,0,0,.08);
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: var(--light-bg);
}

/* ---- NAVBAR ---- */
.navbar-brand {
    font-weight: 700;
    font-size: 1.3rem;
    color: white !important;
}
.navbar { background: var(--primary) !important; }
.navbar .nav-link { color: rgba(255,255,255,.85) !important; }
.navbar .nav-link:hover { color: white !important; }

/* ---- HERO ---- */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    color: white;
    padding: 60px 0 50px;
}
.hero h1 { font-weight: 800; font-size: 2.4rem; }
.hero p { font-size: 1.1rem; opacity: .9; }

/* ---- FILTRO CATEGORÍAS ---- */
.filtro-categorias { padding: 20px 0 10px; }
.btn-filtro {
    border-radius: 50px;
    padding: 6px 18px;
    font-size: .88rem;
    font-weight: 500;
    border: 2px solid var(--primary);
    color: var(--primary);
    background: white;
    transition: all .2s;
    margin: 4px;
}
.btn-filtro:hover,
.btn-filtro.activo {
    background: var(--primary);
    color: white;
}

/* ---- CARDS DE EMPRENDIMIENTOS ---- */
.card-emp {
    border: none;
    border-radius: 14px;
    box-shadow: var(--card-shadow);
    transition: transform .25s, box-shadow .25s;
    overflow: hidden;
    height: 100%;
}
.card-emp:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,.13);
}
.card-emp .card-img-top {
    height: 200px;
    object-fit: cover;
}
.card-emp .badge-cat {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--primary);
    color: white;
    font-size: .75rem;
    padding: 4px 10px;
    border-radius: 50px;
}
.card-emp .badge-destacado {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--accent);
    color: white;
    font-size: .72rem;
    padding: 4px 9px;
    border-radius: 50px;
}
.card-emp .badge-premium {
    position: absolute;
    top: 44px;
    right: 12px;
    background: linear-gradient(135deg, #f6c90e, #e6a817);
    color: #5a3e00;
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 9px;
    border-radius: 50px;
    box-shadow: 0 2px 6px rgba(230,168,23,.4);
}
.card-emp.card-premium { border: 2px solid #f6c90e22; }
.card-emp .card-title { font-weight: 700; font-size: 1.05rem; color: #1a1a2e; }
.card-emp .card-text { font-size: .87rem; color: #555; }
.btn-ver {
    background: var(--primary);
    color: white;
    border-radius: 8px;
    font-size: .85rem;
    padding: 6px 16px;
    border: none;
    text-decoration: none;
    display: inline-block;
}
.btn-ver:hover { background: var(--primary-dark); color: white; }

/* ---- PUBLICIDAD ---- */
.pub-banner {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    margin: 10px 0;
}
.pub-banner img { width: 100%; display: block; }
.pub-label {
    font-size: .7rem;
    color: #aaa;
    text-align: right;
    margin-top: 2px;
}

/* ---- SIDEBAR ---- */
.sidebar-sticky { position: sticky; top: 80px; }

/* ---- DETALLE EMPRENDIMIENTO ---- */
.detalle-foto-principal {
    border-radius: 16px;
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}
.info-contacto a { color: var(--primary); text-decoration: none; }
.info-contacto a:hover { text-decoration: underline; }
.galeria-thumb {
    border-radius: 8px;
    width: 80px;
    height: 60px;
    object-fit: cover;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border .2s;
}
.galeria-thumb:hover { border-color: var(--primary); }

/* ---- FOOTER ---- */
footer {
    background: var(--primary-dark);
    color: rgba(255,255,255,.75);
    padding: 30px 0 20px;
    margin-top: 60px;
    font-size: .88rem;
}
footer a { color: var(--accent); text-decoration: none; }

/* ---- ADMIN SECCIONES DE FORMULARIO ---- */
.form-section {
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 18px;
    box-shadow: 0 1px 6px rgba(0,0,0,.07);
}
.form-section-header {
    padding: 10px 18px;
    font-weight: 600;
    font-size: .88rem;
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: .01em;
}
.form-section-body {
    background: white;
    padding: 18px 18px 10px;
}
.sec-basica    .form-section-header { background:#e8f5e9; color:#1b5e20; }
.sec-fotos     .form-section-header { background:#e3f2fd; color:#0d47a1; }
.sec-contacto  .form-section-header { background:#e0f7fa; color:#006064; }
.sec-social    .form-section-header { background:#fce4ec; color:#880e4f; }
.sec-ubicacion .form-section-header { background:#fff3e0; color:#e65100; }
.sec-mapa      .form-section-header { background:#f3e5f5; color:#4a148c; }
.sec-config    .form-section-header { background:#eceff1; color:#263238; }

/* ---- ADMIN ---- */
.admin-sidebar {
    background: var(--primary-dark);
    min-height: 100vh;
    width: 240px;
    position: fixed;
    top: 0; left: 0;
    padding-top: 20px;
    z-index: 100;
}
.admin-sidebar .brand {
    color: white;
    font-weight: 700;
    font-size: 1.1rem;
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.15);
    display: block;
}
.admin-sidebar .nav-link {
    color: rgba(255,255,255,.75);
    padding: 10px 20px;
    font-size: .9rem;
    border-radius: 0;
    transition: background .2s;
}
.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(255,255,255,.12);
    color: white;
}
.admin-sidebar .nav-link i { width: 22px; }
.admin-content {
    margin-left: 240px;
    padding: 30px;
    min-height: 100vh;
    background: #e8edf2;
}
.admin-topbar {
    background: #fff;
    box-shadow: 0 1px 6px rgba(0,0,0,.1);
    padding: 12px 30px;
    margin: -30px -30px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--primary);
}
.admin-topbar h5 { margin: 0; font-weight: 700; color: #1a1a2e; }

/* Cards y tablas en el admin sobre fondo gris */
.admin-content .card  { box-shadow: 0 2px 8px rgba(0,0,0,.08); }
.admin-content .table { background: white; }
.admin-content .form-control,
.admin-content .form-select { background: #fafafa; }
.admin-content .form-control:focus,
.admin-content .form-select:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(45,106,79,.15);
}

/* ---- UTILIDADES ---- */
.sin-resultados { text-align: center; padding: 60px 20px; color: #aaa; }

/* ---- BOTÓN WHATSAPP FLOTANTE ---- */
.btn-whatsapp-flotante {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 999;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #25d366;
    color: white;
    text-decoration: none;
    padding: 12px 20px 12px 16px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 16px rgba(37,211,102,.45);
    transition: transform .2s, box-shadow .2s;
    animation: wa-entrada .4s ease both;
}
.btn-whatsapp-flotante:hover {
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(37,211,102,.55);
}
.btn-whatsapp-flotante .bi-whatsapp {
    font-size: 1.4rem;
    line-height: 1;
}
.btn-wa-texto {
    white-space: nowrap;
}

/* Pulso periódico para llamar la atención */
.btn-whatsapp-flotante::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50px;
    background: #25d366;
    z-index: -1;
    animation: wa-pulso 2.5s ease-out 1.5s infinite;
}

@keyframes wa-entrada {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes wa-pulso {
    0%   { transform: scale(1);   opacity: .6; }
    70%  { transform: scale(1.35); opacity: 0; }
    100% { transform: scale(1.35); opacity: 0; }
}

/* En móvil: solo el ícono para no tapar contenido */
@media (max-width: 576px) {
    .btn-whatsapp-flotante { padding: 14px; border-radius: 50%; }
    .btn-wa-texto { display: none; }
}
