/*
Theme Name:  Municipalidad Lucas González
Theme URI:   https://lucasgonzalez.gob.ar
Author:      Municipalidad de Lucas González
Author URI:  https://lucasgonzalez.gob.ar
Description: Tema oficial de la Municipalidad de Lucas González, Entre Ríos.
Version:     1.4.0
License:     GNU General Public License v2 or later
Text Domain: mlg-theme
*/

/* ============================================================
   VARIABLES GLOBALES
   ============================================================ */
:root {
  --lg-primary:      #2e8b3a;
  --lg-primary-dark: #1e6b2e;
  --lg-secondary:    #4caf52;
  --lg-accent:       #e8b84b;
  --lg-light:        #f1f8f2;
  --lg-dark:         #1c2833;
  --lg-text:         #333333;
  --lg-muted:        #777777;
  --lg-border:       #cce0d0;
  --lg-radius:       8px;
  --lg-shadow:       0 2px 14px rgba(46,139,58,0.12);
  --lg-header-h:     96px;
  --lg-topbar-h:     36px;
  --lg-max-width:    1200px;
  --lg-content-pad:  24px;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
  font-size: 16px; color: var(--lg-text);
  background: #fff; line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a   { color: var(--lg-primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, h5, h6 { color: var(--lg-dark); line-height: 1.25; font-weight: 700; }

/* ============================================================
   LAYOUT
   ============================================================ */
.mlg-site      { display: flex; flex-direction: column; min-height: 100vh; }
.mlg-main      { flex: 1; }
.mlg-container { max-width: var(--lg-max-width); margin: 0 auto; padding: 0 var(--lg-content-pad); width: 100%; }

/* ============================================================
   TOP BAR
   ============================================================ */
.mlg-topbar {
  background: var(--lg-primary-dark);
  height: var(--lg-topbar-h);
  display: flex; align-items: center;
}
.mlg-topbar-inner {
  display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 16px;
}
.mlg-topbar-contact {
  display: flex; align-items: center; gap: 20px;
  font-size: 0.78rem; color: rgba(255,255,255,0.75);
}
.mlg-topbar-contact a { color: rgba(255,255,255,0.75); text-decoration: none; display: flex; align-items: center; gap: 5px; }
.mlg-topbar-contact a:hover { color: var(--lg-accent); }
.mlg-topbar-province { font-size: 0.72rem; color: rgba(255,255,255,0.45); letter-spacing: 0.06em; text-transform: uppercase; }

/* ============================================================
   HEADER
   ============================================================ */
.mlg-header {
  background: var(--lg-primary);
  height: var(--lg-header-h);
  display: flex; align-items: center;
  position: sticky; top: 0; z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.2);
}
.mlg-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; width: 100%; }

.mlg-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; flex-shrink: 0; }
.mlg-brand:hover { text-decoration: none; }
.mlg-brand-logo {
  width: 88px; height: 88px; border-radius: 50%;
  background: rgba(255,255,255,0.12);
  display: flex; align-items: center; justify-content: center;
  font-size: 2.4rem; flex-shrink: 0;
  border: 2px solid rgba(255,255,255,0.25); overflow: hidden;
}
.mlg-brand-logo img { width: 100%; height: 100%; object-fit: cover; }
.mlg-brand-name { color: #fff; font-size: 1.05rem; font-weight: 800; line-height: 1.1; letter-spacing: 0.01em; }
.mlg-brand-sub  { color: rgba(255,255,255,0.60); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }

/* Navegación desktop */
.mlg-nav { display: flex; align-items: center; gap: 2px; }
.mlg-nav ul { list-style: none; display: flex; align-items: center; gap: 2px; }
.mlg-nav ul li { position: relative; }
.mlg-nav ul li a {
  display: block; color: rgba(255,255,255,0.85); font-size: 0.84rem; font-weight: 600;
  padding: 8px 14px; border-radius: 6px;
  transition: background 0.15s, color 0.15s; white-space: nowrap; text-decoration: none;
}
.mlg-nav ul li a:hover,
.mlg-nav ul li.current-menu-item > a,
.mlg-nav ul li.current-page-ancestor > a { background: rgba(255,255,255,0.15); color: #fff; }

/* Submenú desktop */
.mlg-nav ul li ul {
  position: absolute; top: calc(100% + 4px); left: 0;
  background: #fff; border-radius: var(--lg-radius);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  min-width: 200px; flex-direction: column; display: none; z-index: 100;
  border: 1px solid var(--lg-border);
}
.mlg-nav ul li:hover > ul { display: flex; }
.mlg-nav ul li ul li a { color: var(--lg-dark); font-size: 0.83rem; padding: 9px 16px; border-radius: 0; border-bottom: 1px solid #eef4ef; }
.mlg-nav ul li ul li:last-child a { border-bottom: none; }
.mlg-nav ul li ul li a:hover { background: var(--lg-light); color: var(--lg-primary); }

/* Botón hamburguesa — oculto en desktop */
.mlg-menu-toggle {
  display: none;
  background: rgba(255,255,255,0.12);
  border: 2px solid rgba(255,255,255,0.30);
  border-radius: 6px;
  cursor: pointer;
  padding: 8px 11px;
  color: #fff;
  font-size: 1.3rem;
  line-height: 1;
  flex-shrink: 0;
}

/* ============================================================
   SLIDER
   ============================================================ */
.mlg-slider {
  position: relative; overflow: hidden;
  background: var(--lg-primary);
  user-select: none;
}

.mlg-slider-track {
  display: flex;
  transition: transform 0.55s cubic-bezier(0.4,0,0.2,1);
  will-change: transform;
}

.mlg-slide {
  min-width: 100%; padding: 72px 0 64px;
  position: relative; overflow: hidden;
  display: flex; align-items: center;
}
.mlg-slide::before {
  content:''; position:absolute; inset:0;
  background: inherit; z-index:0;
}
.mlg-slide::after {
  content:''; position:absolute;
  bottom:-80px; right:-80px;
  width:380px; height:380px; border-radius:50%;
  background: rgba(255,255,255,0.05); z-index:0;
}
.mlg-slide-inner { position:relative; z-index:1; width:100%; }

.mlg-slide-eyebrow {
  display:inline-block; background:var(--lg-accent); color:var(--lg-dark);
  font-size:0.72rem; font-weight:700; text-transform:uppercase;
  letter-spacing:0.10em; padding:4px 14px; border-radius:20px; margin-bottom:20px;
}
.mlg-slide h2 {
  color:#fff; font-size:2.4rem; font-weight:800;
  margin-bottom:16px; max-width:640px; line-height:1.15;
}
.mlg-slide p.mlg-slide-sub {
  color:rgba(255,255,255,0.78); font-size:1.05rem;
  max-width:520px; margin-bottom:32px; line-height:1.6;
}
.mlg-slide-actions { display:flex; gap:12px; flex-wrap:wrap; }

/* Controles slider */
.mlg-slider-prev,
.mlg-slider-next {
  position:absolute; top:50%; transform:translateY(-50%);
  background:rgba(255,255,255,0.15); border:none; color:#fff;
  width:44px; height:44px; border-radius:50%;
  font-size:1.1rem; cursor:pointer; z-index:10;
  display:flex; align-items:center; justify-content:center;
  transition:background 0.15s;
  backdrop-filter: blur(4px);
}
.mlg-slider-prev { left:16px; }
.mlg-slider-next { right:16px; }
.mlg-slider-prev:hover,
.mlg-slider-next:hover { background:rgba(255,255,255,0.30); }

/* Dots */
.mlg-slider-dots {
  position:absolute; bottom:16px; left:50%; transform:translateX(-50%);
  display:flex; gap:8px; z-index:10;
}
.mlg-slider-dot {
  width:8px; height:8px; border-radius:50%;
  background:rgba(255,255,255,0.40); border:none; cursor:pointer;
  transition:background 0.2s, transform 0.2s; padding:0;
}
.mlg-slider-dot.active { background:#fff; transform:scale(1.3); }

/* Slide con imagen de fondo */
.mlg-slide.has-img {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
}
.mlg-slide.has-img::before {
  content:''; position:absolute; inset:0; z-index:0;
  background: linear-gradient(135deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.30) 100%) !important;
}

/* ============================================================
   BOTONES GLOBALES
   ============================================================ */
.mlg-btn-primary {
  display:inline-flex; align-items:center; gap:8px;
  background:var(--lg-accent); color:var(--lg-dark);
  padding:12px 24px; border-radius:var(--lg-radius);
  font-weight:700; font-size:0.92rem;
  transition:transform 0.1s, box-shadow 0.15s; text-decoration:none;
}
.mlg-btn-primary:hover { transform:translateY(-1px); box-shadow:0 4px 14px rgba(0,0,0,0.2); text-decoration:none; }
.mlg-btn-outline {
  display:inline-flex; align-items:center; gap:8px;
  background:transparent; color:#fff;
  border:2px solid rgba(255,255,255,0.40);
  padding:12px 24px; border-radius:var(--lg-radius);
  font-weight:700; font-size:0.92rem;
  transition:background 0.15s, border-color 0.15s; text-decoration:none;
}
.mlg-btn-outline:hover { background:rgba(255,255,255,0.10); border-color:#fff; text-decoration:none; }

/* ============================================================
   PAGE TITLE BAR
   ============================================================ */
.mlg-page-title-bar {
  background: var(--lg-light); border-bottom: 3px solid var(--lg-accent); padding: 28px 0;
}
.mlg-page-title-bar h1 { font-size: 1.5rem; color: var(--lg-primary); font-weight: 800; margin: 0; }
.mlg-breadcrumb { margin-top: 6px; font-size: 0.82rem; color: var(--lg-muted); }
.mlg-breadcrumb a { color: var(--lg-primary); }

/* ============================================================
   CONTENIDO DE PÁGINA
   ============================================================ */
.mlg-page-content { padding: 40px 0 60px; width: 100%; }
.mlg-page-content .entry-content,
.mlg-page-content .wp-block-group,
.mlg-page-content .wp-block-html,
.mlg-page-content figure.wp-block-image,
.mlg-page-content .wp-block-cover { max-width: 100% !important; width: 100% !important; }

/* ============================================================
   ACCESOS RÁPIDOS
   ============================================================ */
.mlg-quick-access { padding: 56px 0; background: #fff; }
.mlg-section-title { font-size: 1.4rem; font-weight: 800; color: var(--lg-primary); margin-bottom: 6px; }
.mlg-section-sub   { font-size: 0.90rem; color: var(--lg-muted); margin-bottom: 32px; }

.mlg-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 18px;
}

.mlg-card {
  background: var(--lg-light); border: 1.5px solid var(--lg-border);
  border-radius: var(--lg-radius); padding: 24px 20px;
  display: flex; flex-direction: column; gap: 10px;
  transition: transform 0.15s, box-shadow 0.15s, border-color 0.15s;
  text-decoration: none; position: relative; overflow: hidden;
}
.mlg-card::before {
  content:''; position:absolute; bottom:0; left:0;
  width:100%; height:3px; background:var(--lg-primary);
  transform:scaleX(0); transform-origin:left; transition:transform 0.2s;
}
.mlg-card:hover { transform:translateY(-3px); box-shadow:var(--lg-shadow); border-color:#8fc89a; text-decoration:none; }
.mlg-card:hover::before { transform:scaleX(1); }
.mlg-card-ico   { font-size:1.8rem; }
.mlg-card-title { font-size:0.95rem; font-weight:700; color:var(--lg-dark); line-height:1.3; }
.mlg-card-desc  { font-size:0.80rem; color:var(--lg-muted); line-height:1.4; }
.mlg-card-arrow { font-size:0.80rem; color:var(--lg-primary); font-weight:700; margin-top:auto; }

/* ============================================================
   FOOTER
   ============================================================ */
.mlg-footer { background: var(--lg-dark); padding: 48px 0 0; margin-top: auto; }
.mlg-footer-grid {
  display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px;
  padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08);
}
.mlg-footer-tagline { color: rgba(255,255,255,0.45); font-size: 0.83rem; margin-top: 12px; line-height: 1.5; }
.mlg-footer h4 {
  color: var(--lg-accent); font-size: 0.75rem;
  text-transform: uppercase; letter-spacing: 0.10em; font-weight: 700; margin-bottom: 14px;
}
.mlg-footer-links { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.mlg-footer-links li a { color: rgba(255,255,255,0.60); font-size: 0.85rem; transition: color 0.13s; text-decoration: none; }
.mlg-footer-links li a:hover { color: #fff; text-decoration: none; }
.mlg-footer-contact { display: flex; flex-direction: column; gap: 10px; }
.mlg-footer-contact-item { display: flex; align-items: flex-start; gap: 10px; color: rgba(255,255,255,0.60); font-size: 0.84rem; }
.mlg-footer-contact-item .ico { font-size: 0.95rem; margin-top: 2px; flex-shrink: 0; }
.mlg-footer-contact-item a { color: rgba(255,255,255,0.60); }
.mlg-footer-contact-item a:hover { color: #fff; }
.mlg-footer-bottom {
  padding: 16px 0; display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px;
}
.mlg-footer-bottom p, .mlg-footer-bottom a { color: rgba(255,255,255,0.30); font-size: 0.77rem; }
.mlg-footer-bottom a:hover { color: rgba(255,255,255,0.70); }

/* Logo en footer */
.mlg-footer .mlg-brand-logo img,
.mlg-footer .custom-logo { width: 70px; height: 70px; object-fit: cover; border-radius: 50%; }
.mlg-footer .mlg-brand-logo { width: 70px; height: 70px; }

/* Crédito desarrollador */
.mlg-footer-dev {
  display: flex; align-items: center; justify-content: center;
  gap: 12px; padding: 14px 0 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
  flex-wrap: wrap;
}
.mlg-footer-dev-label {
  font-size: 0.72rem; color: rgba(255,255,255,0.28);
  text-transform: uppercase; letter-spacing: 0.07em;
}
.mlg-footer-dev-link {
  display: inline-flex; align-items: center;
  opacity: 0.55; transition: opacity 0.2s;
  text-decoration: none;
}
.mlg-footer-dev-link:hover { opacity: 1; text-decoration: none; }
.mlg-footer-dev-logo { height: 28px; width: auto; filter: brightness(0) invert(1); }
.mlg-footer-dev-text-fallback {
  color: rgba(255,255,255,0.55); font-size: 0.80rem; font-weight: 700;
  letter-spacing: 0.03em;
}

/* ============================================================
   BLOG / 404
   ============================================================ */
.mlg-posts-list { display: flex; flex-direction: column; gap: 24px; padding: 40px 0; }
.mlg-post-card { background: var(--lg-light); border: 1.5px solid var(--lg-border); border-radius: var(--lg-radius); padding: 24px; transition: box-shadow 0.15s; }
.mlg-post-card:hover { box-shadow: var(--lg-shadow); }
.mlg-post-card-meta  { font-size: 0.78rem; color: var(--lg-muted); margin-bottom: 8px; }
.mlg-post-card-title { font-size: 1.15rem; margin-bottom: 8px; }
.mlg-post-card-title a { color: var(--lg-dark); text-decoration: none; }
.mlg-post-card-title a:hover { color: var(--lg-primary); }
.mlg-post-card-excerpt { font-size: 0.88rem; color: #555; }
.mlg-post-card-more { display: inline-block; margin-top: 12px; font-size: 0.82rem; font-weight: 700; color: var(--lg-primary); }

.mlg-404 { text-align: center; padding: 80px var(--lg-content-pad); }
.mlg-404 .code { font-size: 5rem; font-weight: 900; color: var(--lg-border); line-height: 1; }
.mlg-404 h2 { font-size: 1.6rem; color: var(--lg-dark); margin: 12px 0 16px; }
.mlg-404 p  { color: var(--lg-muted); font-size: 1rem; margin-bottom: 28px; }

/* ============================================================
   RESPONSIVO — TABLET
   ============================================================ */
@media (max-width: 900px) {
  .mlg-footer-grid { grid-template-columns: 1fr 1fr; }
  .mlg-slide h2 { font-size: 1.8rem; }
  .mlg-cards-grid { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
}

/* ============================================================
   RESPONSIVO — MÓVIL
   ============================================================ */
@media (max-width: 768px) {

  /* Variables */
  :root {
    --lg-header-h:    62px;
    --lg-topbar-h:    auto;
    --lg-content-pad: 16px;
  }

  /* Topbar: apila contacto y provincia */
  .mlg-topbar { height: auto; padding: 8px 0; }
  .mlg-topbar-inner { flex-direction: column; align-items: flex-start; gap: 4px; }
  .mlg-topbar-province { display: none; }
  .mlg-topbar-contact { gap: 12px; flex-wrap: wrap; }
  .mlg-topbar-contact a { font-size: 0.76rem; }

  /* Header: logo más chico, muestra hamburguesa */
  .mlg-brand-logo { width: 52px; height: 52px; font-size: 1.5rem; }
  .mlg-brand-name { font-size: 0.88rem; }
  .mlg-brand-sub  { display: none; }

  .mlg-menu-toggle { display: flex; align-items: center; justify-content: center; }

  /* Nav: se despliega hacia abajo como panel */
  .mlg-nav {
    display: none;
    position: absolute;
    top: var(--lg-header-h);
    left: 0; right: 0;
    background: var(--lg-primary-dark);
    flex-direction: column;
    align-items: stretch;
    padding: 12px 0 16px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    z-index: 999;
    max-height: calc(100vh - var(--lg-header-h));
    overflow-y: auto;
  }
  .mlg-nav.open { display: flex; }

  .mlg-nav ul { flex-direction: column; width: 100%; gap: 0; }
  .mlg-nav ul li { width: 100%; }
  .mlg-nav ul li a {
    border-radius: 0;
    padding: 13px 20px;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    white-space: normal;
  }
  .mlg-nav ul li:last-child > a { border-bottom: none; }
  .mlg-nav ul li a:hover,
  .mlg-nav ul li.current-menu-item > a { background: rgba(255,255,255,0.12); }

  /* Submenús mobile: se apilan inline */
  .mlg-nav ul li ul {
    position: static;
    display: flex !important;
    box-shadow: none;
    border-radius: 0;
    border: none;
    background: rgba(0,0,0,0.20);
    min-width: unset;
    flex-direction: column;
  }
  .mlg-nav ul li ul li a {
    color: rgba(255,255,255,0.75);
    padding-left: 36px;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    background: transparent;
  }
  .mlg-nav ul li ul li a:hover { background: rgba(255,255,255,0.10); color: #fff; }

  /* Slider */
  .mlg-slide { padding: 44px 0 52px; }
  .mlg-slide h2 { font-size: 1.5rem; max-width: 100%; }
  .mlg-slide p.mlg-slide-sub { font-size: 0.92rem; max-width: 100%; margin-bottom: 24px; }
  .mlg-slide-actions { flex-direction: column; gap: 10px; }
  .mlg-btn-primary,
  .mlg-btn-outline { width: 100%; justify-content: center; }
  .mlg-slider-prev { left: 8px; }
  .mlg-slider-next { right: 8px; }

  /* Accesos rápidos */
  .mlg-quick-access { padding: 36px 0; }
  .mlg-cards-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .mlg-card { padding: 18px 14px; }

  /* Page title */
  .mlg-page-title-bar { padding: 20px 0; }
  .mlg-page-title-bar h1 { font-size: 1.25rem; }
  .mlg-page-content { padding: 28px 0 40px; }

  /* Footer */
  .mlg-footer { padding: 36px 0 0; }
  .mlg-footer-grid { grid-template-columns: 1fr; gap: 28px; padding-bottom: 28px; }
  .mlg-footer-bottom { flex-direction: column; text-align: center; gap: 4px; }
}

/* ============================================================
   RESPONSIVO — MÓVIL PEQUEÑO
   ============================================================ */
@media (max-width: 400px) {
  .mlg-cards-grid { grid-template-columns: 1fr; }
  .mlg-slide h2 { font-size: 1.3rem; }
  .mlg-brand-name { font-size: 0.80rem; max-width: 160px; }
}
