/* ============================================================
   Municipalidad Distrital de Yamango - Estilos principales
   Paleta: Verde institucional #1a6e3c | Dorado #c8a000
   ============================================================ */

:root {
    --verde:      #1a6e3c;
    --verde-dark: #124d2a;
    --verde-light:#e8f5ee;
    --dorado:     #c8a000;
    --gris:       #f5f5f5;
    --texto:      #333333;
}

body {
    font-family: 'Segoe UI', sans-serif;
    color: var(--texto);
}

/* ---- BARRA SUPERIOR ---- */
#top-bar {
    background-color: var(--verde-dark);
    color: #fff;
    font-size: 0.82rem;
    padding: 6px 0;
}
#top-bar a {
    color: rgba(255,255,255,0.85);
    text-decoration: none;
    margin-left: 16px;
    transition: color .2s;
}
#top-bar a:hover { color: var(--dorado); }

/* ---- NAVBAR ---- */
#main-nav {
    background-color: var(--verde);
    padding: 10px 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
#main-nav .navbar-brand img { max-height: 60px; }
#main-nav .logo-text {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fff;
    max-width: 180px;
    line-height: 1.2;
}
#main-nav .nav-link {
    color: rgba(255,255,255,0.9) !important;
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.3px;
    padding: 8px 12px;
    transition: color .2s;
}
#main-nav .nav-link:hover,
#main-nav .nav-link.active { color: var(--dorado) !important; }

#main-nav .dropdown-menu {
    border: none;
    border-top: 3px solid var(--dorado);
    border-radius: 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
#main-nav .dropdown-item:hover {
    background-color: var(--verde-light);
    color: var(--verde);
}
#main-nav .form-control { font-size: 0.82rem; border-radius: 20px 0 0 20px; }
.btn-buscar {
    background: var(--dorado);
    color: #fff;
    border-radius: 0 20px 20px 0;
    border: none;
}
.btn-buscar:hover { background: var(--verde-dark); }

/* ---- HERO SLIDER ---- */
.hero-img {
    max-height: 650px;
    min-height: 420px;
    object-fit: cover;
    width: 100%;
}
.hero-placeholder {
    background: linear-gradient(135deg, var(--verde-dark), var(--verde));
    min-height: 400px;
}
#hero-carousel .carousel-caption {
    background: rgba(0,0,0,0.45);
    border-radius: 8px;
    padding: 12px 20px;
}
#hero-carousel .carousel-caption h2 { font-size: 1.4rem; font-weight: 700; }

/* ---- SERVICIOS RÁPIDOS ---- */
#servicios-rapidos {
    background-color: var(--verde);
}
.servicio-card {
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 16px 10px;
    color: #fff;
    text-decoration: none;
    transition: background .25s, transform .2s;
}
.servicio-card:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px);
    color: var(--dorado);
}
.servicio-card i { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.servicio-card span { font-size: 0.78rem; font-weight: 600; }

/* ---- SECTION HEADER ---- */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-left: 4px solid var(--verde);
    padding-left: 12px;
}
.section-header h2 { font-size: 1.4rem; font-weight: 700; color: var(--verde-dark); margin: 0; }
.btn-ver-mas {
    font-size: 0.85rem;
    color: var(--verde);
    text-decoration: none;
    font-weight: 600;
}
.btn-ver-mas:hover { color: var(--dorado); }

/* ---- TARJETAS DE NOTICIAS ---- */
.noticia-card {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: box-shadow .25s, transform .2s;
    background: #fff;
}
.noticia-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,0.15); transform: translateY(-3px); }
.noticia-img { width: 100%; height: 200px; object-fit: cover; }
.noticia-img-placeholder {
    width: 100%; height: 200px;
    background: var(--verde-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--verde); font-size: 3rem;
}
.noticia-body { padding: 16px; }
.noticia-fecha { font-size: 0.78rem; color: #888; }
.noticia-body h5 { font-size: 1rem; font-weight: 700; margin: 8px 0; color: var(--verde-dark); }
.noticia-body p { font-size: 0.88rem; color: #555; }
.leer-mas { font-size: 0.82rem; color: var(--verde); font-weight: 600; text-decoration: none; }
.leer-mas:hover { color: var(--dorado); }

/* ---- BANNER TRANSPARENCIA ---- */
#banner-transparencia {
    background: linear-gradient(135deg, var(--verde-dark), var(--verde));
    color: #fff;
    padding: 60px 0;
}
#banner-transparencia h3 { font-size: 1.8rem; font-weight: 700; }
#banner-transparencia p { font-size: 1rem; opacity: .9; margin-bottom: 20px; }
.btn-transparencia {
    background: var(--dorado);
    color: #fff;
    padding: 10px 28px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    transition: background .2s;
}
.btn-transparencia:hover { background: #fff; color: var(--verde-dark); }

/* ---- PAGE BANNER ---- */
.page-banner {
    background: linear-gradient(135deg, var(--verde-dark), var(--verde));
    color: #fff;
    padding: 40px 0 20px;
}
.page-banner h1 { font-size: 1.8rem; font-weight: 700; }
.page-banner .breadcrumb-item a { color: rgba(255,255,255,0.8); }
.page-banner .breadcrumb-item.active { color: var(--dorado); }
.page-banner .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.5); }

/* ---- TRÁMITES ---- */
.tramite-sidebar { background: var(--gris); border-radius: 8px; padding: 16px; }
.tramite-sidebar h6 { color: var(--verde-dark); font-weight: 700; margin-bottom: 12px; }
.tramite-sidebar ul { list-style: none; padding: 0; margin: 0; }
.tramite-sidebar ul li { border-bottom: 1px solid #ddd; }
.tramite-sidebar ul li a {
    display: block; padding: 8px 0;
    color: var(--texto); text-decoration: none; font-size: 0.9rem;
}
.tramite-sidebar ul li a:hover, .tramite-sidebar ul li a.active { color: var(--verde); font-weight: 600; }

.tramite-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 4px solid var(--verde);
    border-radius: 8px;
    padding: 16px 20px;
    transition: box-shadow .2s;
}
.tramite-card:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.1); }
.tramite-card h5 { font-size: 1rem; color: var(--verde-dark); margin-bottom: 6px; }
.tramite-cat-badge {
    background: var(--verde-light); color: var(--verde);
    font-size: 0.72rem; font-weight: 600;
    padding: 3px 10px; border-radius: 20px; white-space: nowrap;
}
.tramite-meta { font-size: 0.85rem; color: #555; margin-top: 8px; }
.btn-requisitos {
    background: var(--verde-light); color: var(--verde);
    border: 1px solid var(--verde); font-size: 0.82rem;
}
.btn-requisitos:hover { background: var(--verde); color: #fff; }
.requisitos-box {
    background: var(--gris); border-radius: 6px;
    padding: 12px 16px; font-size: 0.85rem; color: #444;
}

/* ---- CONTACTO ---- */
.contacto-info p {
    display: flex; gap: 12px; align-items: flex-start;
    font-size: 0.9rem; color: #555; margin-bottom: 12px;
}
.contacto-info i { color: var(--verde); width: 18px; margin-top: 3px; flex-shrink: 0; }
.btn-enviar {
    background: var(--verde); color: #fff;
    padding: 10px 28px; border: none; border-radius: 6px;
    font-weight: 600; transition: background .2s;
}
.btn-enviar:hover { background: var(--verde-dark); }

/* ---- FOOTER ---- */
#main-footer {
    background-color: var(--verde-dark);
    color: rgba(255,255,255,0.85);
    padding: 50px 0 0;
    font-size: 0.88rem;
}
.footer-logo { max-height: 70px; filter: brightness(10); }
.footer-slogan { color: var(--dorado); font-style: italic; font-size: 0.85rem; }
.footer-title {
    color: var(--dorado); font-weight: 700; font-size: 0.85rem;
    letter-spacing: 1px; text-transform: uppercase; margin-bottom: 14px;
}
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 8px; }
.footer-links a { color: rgba(255,255,255,0.8); text-decoration: none; font-size: 0.87rem; }
.footer-links a:hover { color: var(--dorado); }

.social-icons { display: flex; gap: 10px; }
.social-btn {
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    color: #fff; text-decoration: none; font-size: 1rem;
    transition: opacity .2s, transform .2s;
}
.social-btn:hover { opacity: 0.85; transform: translateY(-2px); color: #fff; }
.social-btn.facebook  { background: #3b5998; }
.social-btn.youtube   { background: #ff0000; }
.social-btn.instagram { background: #e1306c; }
.social-btn.twitter   { background: #000; }

#footer-bottom {
    background: rgba(0,0,0,0.3);
    margin-top: 40px; padding: 14px 0;
    font-size: 0.82rem; color: rgba(255,255,255,0.6);
}

/* ---- AUTORIDADES ---- */
.seccion-titulo {
    text-align: center;
    position: relative;
    color: var(--verde-dark);
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.seccion-titulo span {
    background: #fff;
    padding: 0 16px;
    position: relative;
    z-index: 1;
}
.seccion-titulo::before {
    content: '';
    position: absolute;
    top: 50%; left: 0; right: 0;
    height: 2px;
    background: var(--verde-light);
    z-index: 0;
}

.autoridad-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform .25s, box-shadow .25s;
}
.autoridad-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.alcalde-card {
    border-top: 4px solid var(--dorado);
}
.autoridad-foto {
    width: 100%;
    height: 340px;
    object-fit: cover;
    object-position: top center;
}
.autoridad-foto-placeholder {
    width: 100%; height: 340px;
    background: var(--verde-light);
    display: flex; align-items: center; justify-content: center;
    font-size: 4rem; color: var(--verde);
}
.autoridad-info {
    padding: 16px 12px 20px;
}
.autoridad-info h5 {
    font-size: 1rem; font-weight: 700;
    color: var(--verde-dark); margin-bottom: 8px;
}
.autoridad-cargo {
    display: inline-block;
    font-size: 0.78rem; font-weight: 600;
    padding: 4px 14px; border-radius: 20px;
}
.alcalde-badge  { background: #fff4cc; color: #8a6d00; border: 1px solid var(--dorado); }
.regidor-badge  { background: var(--verde-light); color: var(--verde); border: 1px solid var(--verde); }

/* ---- COMISIONES ---- */
.comision-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 14px rgba(0,0,0,0.08);
    overflow: hidden;
    border-left: 5px solid var(--verde);
}
.comision-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    background: var(--verde-light);
    padding: 18px 24px;
}
.comision-titulo {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--verde-dark);
    margin: 0 0 4px;
}
.comision-desc {
    font-size: 0.85rem;
    color: #555;
}
.comision-badge {
    background: var(--verde);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
    flex-shrink: 0;
}
.comision-miembros {
    display: flex;
    flex-wrap: wrap;
    gap: 0;
}
.miembro-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 24px;
    border-bottom: 1px solid #f0f0f0;
    border-right: 1px solid #f0f0f0;
    width: 50%;
    box-sizing: border-box;
}
.miembro-item:last-child,
.miembro-item:nth-last-child(2):nth-child(odd) {
    border-bottom: none;
}
.miembro-foto {
    width: 52px; height: 52px;
    border-radius: 50%;
    object-fit: cover;
    object-position: top;
    flex-shrink: 0;
    border: 2px solid var(--verde-light);
}
.miembro-foto-placeholder {
    width: 52px; height: 52px;
    border-radius: 50%;
    background: var(--verde-light);
    display: flex; align-items: center; justify-content: center;
    color: var(--verde); font-size: 1.3rem;
    flex-shrink: 0;
}
.miembro-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.miembro-info strong {
    font-size: 0.92rem;
    color: var(--verde-dark);
}
.miembro-cargo-com {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--verde);
}
.miembro-cargo-inst {
    font-size: 0.75rem;
    color: #888;
}
@media (max-width: 640px) {
    .miembro-item { width: 100%; border-right: none; }
}

/* ---- NOTICIA CONTENIDO ---- */
.noticia-contenido { font-size: 1rem; line-height: 1.8; color: #333; }
.noticia-contenido img { max-width: 100%; border-radius: 8px; margin: 16px 0; }

/* ---- RESPONSIVE ---- */
@media (max-width: 768px) {
    .hero-img { max-height: 320px; min-height: 200px; }
    .section-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    #main-nav .form-control { width: 120px; }
}

/* ---- Acceso rápido normatividad (home) ---- */
#normatividad-home { background-color: var(--verde-dark); }

.norm-home-titulo {
    color: rgba(255,255,255,.7);
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 0;
}
.norm-home-card {
    background: rgba(255,255,255,0.12);
    border-radius: 10px;
    padding: 16px 10px;
    color: #fff;
    text-decoration: none;
    transition: background .25s, transform .2s;
}
.norm-home-card:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-3px);
    color: var(--dorado);
}
.norm-home-card i { font-size: 1.8rem; display: block; margin-bottom: 8px; }
.norm-home-card span { font-size: 0.78rem; font-weight: 600; }
