/* =========================================================
   LGU WEBSITE - MAIN STYLESHEET
   Mobile-first, responsive
========================================================= */

:root{
  --primary: #0b3d91;      /* PH gov blue */
  --primary-dark: #082a66;
  --secondary: #c8102e;    /* PH flag red */
  --accent: #ffd100;       /* gold/yellow accent */
  --gray-light: #f4f6f9;
  --gray-mid: #e2e6ec;
  --text-dark: #1c1f26;
  --text-muted: #5b6270;
  --white: #ffffff;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --max-width: 1180px;
}

*{ box-sizing: border-box; margin:0; padding:0; }

html{ scroll-behavior: smooth; }

body{
  font-family: 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text-dark);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img{ max-width:100%; display:block; }
a{ text-decoration:none; color: inherit; }
ul{ list-style:none; }
button{ font-family: inherit; cursor:pointer; }

.container{
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}

/* ============ TOP BAR ============ */
.topbar{
  background: var(--primary-dark);
  color: var(--white);
  font-size: 13px;
  padding: 6px 0;
}
.topbar .container{
  display:flex;
  justify-content: space-between;
  align-items:center;
  flex-wrap: wrap;
  gap: 6px;
}
.topbar-left span{ margin-right: 16px; opacity:.9; }
.topbar-social a{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width: 26px; height:26px;
  background: rgba(255,255,255,.15);
  border-radius:50%;
  margin-left:6px;
  font-size:13px;
  transition:.2s;
}
.topbar-social a:hover{ background: var(--accent); color:var(--primary-dark); }

/* ============ HEADER ============ */
.site-header{
  background: var(--white);
  box-shadow: var(--shadow);
  position: sticky;
  top:0;
  z-index: 500;
}
.header-inner{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding: 12px 16px;
}
.brand{
  display:flex;
  align-items:center;
  gap: 12px;
}
.brand img{
  width: 54px; height:54px;
  object-fit:contain;
}
.brand-text h1{
  font-size: 16px;
  color: var(--primary);
  line-height:1.2;
}
.brand-text p{
  font-size: 12px;
  color: var(--text-muted);
}

/* ============ NAV / MENU ============ */
.main-nav{
  background: var(--primary);
}
.main-nav .container{ position:relative; }
.nav-toggle{
  display:flex;
  align-items:center;
  gap:8px;
  background:none;
  border:none;
  color: var(--white);
  padding: 14px 0;
  font-size: 15px;
  font-weight:600;
}
.nav-toggle .bar{
  width: 24px; height:3px; background:var(--white); border-radius:2px;
  position:relative;
}
.nav-toggle .bar::before,
.nav-toggle .bar::after{
  content:"";
  position:absolute; left:0;
  width:24px; height:3px; background:var(--white); border-radius:2px;
}
.nav-toggle .bar::before{ top:-7px; }
.nav-toggle .bar::after{ top:7px; }

.nav-menu{
  display:none;
  flex-direction:column;
  background: var(--primary);
  padding-bottom: 10px;
}
.nav-menu.open{ display:flex; }

.nav-menu li{ border-top: 1px solid rgba(255,255,255,.12); position:relative; }
.nav-menu a{
  display:block;
  color: var(--white);
  padding: 13px 6px;
  font-size: 14.5px;
  font-weight:500;
}
.nav-menu a:hover{ color: var(--accent); }
.nav-menu .has-children > a::after{ content:" \25BE"; font-size:11px; }
.nav-menu .submenu{
  display:none;
  background: var(--primary-dark);
  padding-left: 14px;
}
.nav-menu .has-children.open-sub .submenu{ display:block; }

/* Desktop nav */
@media (min-width: 900px){
  .nav-toggle{ display:none; }
  .nav-menu{
    display:flex !important;
    flex-direction:row;
    background:transparent;
    padding: 0;
  }
  .nav-menu li{ border-top:none; }
  .nav-menu > li{ position:relative; }
  .nav-menu > li > a{ padding: 16px 18px; }
  .nav-menu .submenu{
    position:absolute;
    top:100%; left:0;
    min-width: 220px;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: 0 0 var(--radius) var(--radius);
    padding: 6px 0;
    z-index: 50;
  }
  .nav-menu .submenu a{ color: var(--text-dark); padding: 10px 16px; }
  .nav-menu .submenu a:hover{ background: var(--gray-light); color: var(--primary); }
  .nav-menu .has-children:hover .submenu{ display:block; }
}

/* ============ BANNER / HERO SLIDER ============ */
.hero-slider{
  position: relative;
  overflow: hidden;
  height: 46vw;
  min-height: 220px;
  max-height: 520px;
  background: var(--gray-mid);
}
.hero-slide{
  position:absolute; inset:0;
  opacity:0;
  transition: opacity .8s ease-in-out;
}
.hero-slide.active{ opacity:1; }
.hero-slide img{
  width:100%; height:100%; object-fit:cover;
}
.hero-caption{
  position:absolute;
  left:0; right:0; bottom:0;
  padding: 24px 20px;
  background: linear-gradient(to top, rgba(0,0,0,.75), transparent);
  color:var(--white);
}
.hero-caption h2{ font-size: 20px; margin-bottom:4px; }
.hero-caption p{ font-size: 13px; opacity:.9; max-width: 600px; }
@media(min-width:768px){
  .hero-caption h2{ font-size: 30px; }
  .hero-caption p{ font-size:15px; }
}
.hero-dots{
  position:absolute;
  bottom:10px; right:16px;
  display:flex; gap:6px;
}
.hero-dots button{
  width:9px;height:9px;border-radius:50%;
  background: rgba(255,255,255,.5); border:none;
}
.hero-dots button.active{ background: var(--accent); width:22px; border-radius:5px; }

/* ============ SECTION HEADINGS ============ */
.section{ padding: 40px 0; }
.section-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom: 22px;
  flex-wrap:wrap;
  gap:10px;
}
.section-title h2{
  font-size: 22px;
  color: var(--primary);
  position:relative;
  padding-left: 14px;
  border-left: 5px solid var(--secondary);
}
.section-title a.view-all{
  font-size: 13px;
  font-weight:600;
  color: var(--secondary);
}
.section-title a.view-all:hover{ text-decoration:underline; }
.bg-light{ background: var(--gray-light); }

/* ============ CARDS: POSTS ============ */
.post-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media(min-width:640px){ .post-grid{ grid-template-columns: 1fr 1fr; } }
@media(min-width:992px){ .post-grid{ grid-template-columns: repeat(3,1fr); } }

.post-card{
  background: var(--white);
  border-radius: var(--radius);
  overflow:hidden;
  box-shadow: var(--shadow);
  transition: transform .2s, box-shadow .2s;
  display:flex;
  flex-direction:column;
}
.post-card:hover{ transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.post-card img{ height: 180px; object-fit: cover; width:100%; }
.post-card-body{ padding: 16px; flex:1; display:flex; flex-direction:column; }
.post-cat{
  display:inline-block;
  font-size: 11px;
  font-weight:700;
  text-transform:uppercase;
  color: var(--secondary);
  background: #fdeaec;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 8px;
  width:fit-content;
}
.post-card h3{ font-size:16px; margin-bottom:8px; color:var(--text-dark); }
.post-card p{ font-size:13.5px; color: var(--text-muted); margin-bottom:12px; flex:1; }
.post-meta{ font-size:12px; color:#8a90a0; display:flex; justify-content:space-between; margin-top:auto; }

/* ============ QUICK LINKS / SERVICE BOXES ============ */
.quicklinks{
  display:grid;
  grid-template-columns: repeat(2,1fr);
  gap: 14px;
}
@media(min-width:768px){ .quicklinks{ grid-template-columns: repeat(4,1fr); } }
.quicklink-box{
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius);
  padding: 22px 14px;
  text-align:center;
  transition:.2s;
}
.quicklink-box:hover{ border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-3px); }
.quicklink-box .icon{ font-size: 30px; margin-bottom:10px; }
.quicklink-box h4{ font-size: 14px; color: var(--primary); }

/* ============ GALLERY ============ */
.gallery-grid{
  display:grid;
  grid-template-columns: repeat(2,1fr);
  gap: 10px;
}
@media(min-width:640px){ .gallery-grid{ grid-template-columns: repeat(3,1fr); } }
@media(min-width:992px){ .gallery-grid{ grid-template-columns: repeat(4,1fr); } }
.gallery-item{
  position:relative;
  border-radius: var(--radius);
  overflow:hidden;
  aspect-ratio: 1/1;
  cursor:pointer;
}
.gallery-item img{ width:100%; height:100%; object-fit:cover; transition:.3s; }
.gallery-item:hover img{ transform: scale(1.08); }
.gallery-item .cap{
  position:absolute; left:0;right:0;bottom:0;
  background: rgba(0,0,0,.6); color:#fff;
  font-size:12px; padding:6px 8px;
  opacity:0; transition:.2s;
}
.gallery-item:hover .cap{ opacity:1; }

.album-card{
  background:var(--white); border-radius:var(--radius); overflow:hidden; box-shadow:var(--shadow);
}
.album-card img{ height:160px; width:100%; object-fit:cover; }
.album-card .info{ padding:12px 14px; }
.album-card h4{ font-size:14px; color:var(--primary); }
.album-card p{ font-size:12px; color:var(--text-muted); }

/* Lightbox */
.lightbox{
  display:none;
  position:fixed; inset:0; z-index:1000;
  background: rgba(0,0,0,.9);
  align-items:center; justify-content:center;
  padding: 20px;
}
.lightbox.open{ display:flex; }
.lightbox img{ max-width:100%; max-height:85vh; border-radius:6px; }
.lightbox-close{
  position:absolute; top:16px; right:20px;
  color:#fff; font-size:30px; background:none; border:none;
}

/* ============ FORMS (contact, survey) ============ */
.form-card{
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  max-width: 720px;
  margin: 0 auto;
}
.form-group{ margin-bottom: 16px; }
.form-group label{ display:block; font-size:13.5px; font-weight:600; margin-bottom:6px; color: var(--text-dark); }
.form-control{
  width:100%;
  padding: 11px 12px;
  border: 1px solid var(--gray-mid);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: var(--white);
}
.form-control:focus{ outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(11,61,145,.12); }
textarea.form-control{ min-height: 130px; resize: vertical; }

.rating-group{ display:flex; gap:8px; flex-wrap:wrap; }
.rating-group label{
  border:1px solid var(--gray-mid);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight:500;
  cursor:pointer;
  display:flex; align-items:center; gap:6px;
}
.rating-group input{ accent-color: var(--primary); }
.rating-group input:checked + span{ color: var(--primary); font-weight:700; }

.btn{
  display:inline-block;
  background: var(--primary);
  color: var(--white);
  border:none;
  padding: 12px 26px;
  border-radius: 8px;
  font-size: 14.5px;
  font-weight:600;
  transition:.2s;
}
.btn:hover{ background: var(--primary-dark); }
.btn-secondary{ background: var(--secondary); }
.btn-secondary:hover{ background:#9c0c24; }
.btn-outline{ background:transparent; border:1px solid var(--primary); color:var(--primary); }
.btn-block{ width:100%; text-align:center; }

.alert{
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 18px;
  font-size: 14px;
}
.alert-success{ background:#e7f7ec; color:#1c7c3f; border:1px solid #b8ecc8; }
.alert-error{ background:#fdecec; color:#b3261e; border:1px solid #f6c1bd; }

/* ============ DOWNLOADS ============ */
.download-list{ display:flex; flex-direction:column; gap:10px; }
.download-item{
  display:flex; align-items:center; justify-content:space-between;
  gap: 10px;
  background: var(--white);
  border: 1px solid var(--gray-mid);
  border-radius: var(--radius);
  padding: 14px 16px;
  flex-wrap: wrap;
}
.download-item .file-info{ display:flex; align-items:center; gap:12px; }
.download-item .file-icon{
  width:40px;height:40px; border-radius:8px;
  background: var(--gray-light); color: var(--primary);
  display:flex; align-items:center; justify-content:center;
  font-weight:700; font-size:11px;
}
.download-item h4{ font-size:14px; color: var(--text-dark); }
.download-item p{ font-size:12px; color: var(--text-muted); }
.download-category-title{
  font-size: 15px; font-weight:700; color:var(--primary);
  margin: 22px 0 10px; padding-bottom:6px; border-bottom: 2px solid var(--gray-mid);
}

/* ============ CONTACT PAGE ============ */
.contact-grid{
  display:grid; grid-template-columns:1fr; gap: 24px;
}
@media(min-width:900px){ .contact-grid{ grid-template-columns: 1fr 1fr; } }
.contact-info-box{
  background: var(--primary);
  color: var(--white);
  border-radius: var(--radius);
  padding: 26px;
}
.contact-info-box h3{ margin-bottom: 16px; }
.contact-info-item{ display:flex; gap:12px; margin-bottom:16px; font-size:14px; }
.contact-info-item .ic{ font-size:18px; }
.contact-info-box iframe{ width:100%; height:220px; border:0; border-radius:8px; margin-top:12px; }

/* ============ FOOTER ============ */
.site-footer{
  background: var(--primary-dark);
  color: rgba(255,255,255,.85);
  padding: 40px 0 0;
  margin-top: 40px;
}
.footer-grid{
  display:grid;
  grid-template-columns: 1fr;
  gap: 26px;
  padding-bottom: 26px;
}
@media(min-width:768px){ .footer-grid{ grid-template-columns: 2fr 1fr 1fr 1.2fr; } }
.footer-col h4{ color: var(--white); font-size:15px; margin-bottom:14px; }
.footer-col p, .footer-col li{ font-size:13px; margin-bottom:8px; }
.footer-col a:hover{ color: var(--accent); }
.footer-brand{ display:flex; gap:10px; align-items:center; margin-bottom:12px; }
.footer-brand img{ width:42px; height:42px; }
.footer-brand strong{ font-size:15px; color:var(--white); }
.footer-bottom{
  border-top: 1px solid rgba(255,255,255,.12);
  text-align:center;
  padding: 16px;
  font-size: 12.5px;
}

/* ============ BREADCRUMB / PAGE HEADER ============ */
.page-header{
  background: linear-gradient(120deg, var(--primary), var(--primary-dark));
  color: var(--white);
  padding: 34px 0;
  text-align:center;
}
.page-header h1{ font-size: 24px; margin-bottom: 6px; }
.page-header p{ font-size: 13px; opacity:.85; }

/* ============ UTILITIES ============ */
.text-center{ text-align:center; }
.mt-2{ margin-top:20px; }
.mb-2{ margin-bottom:20px; }
.empty-state{ text-align:center; padding:40px 20px; color: var(--text-muted); }
.pagination{ display:flex; justify-content:center; gap:6px; margin-top:24px; flex-wrap:wrap; }
.pagination a, .pagination span{
  padding: 8px 13px; border-radius:6px; border: 1px solid var(--gray-mid); font-size:13px;
}
.pagination a:hover{ background: var(--gray-light); }
.pagination .active{ background: var(--primary); color:#fff; border-color:var(--primary); }
