/* web/css/main.css — PMDAN site-wide layout styles */

/* ─── Top Bar ───────────────────────────────────────────────────── */
.top-bar {
  background: var(--green-deep);
  color: rgba(255,255,255,.7);
  font-size: .78rem;
  padding: 7px 0;
  border-bottom: 1px solid rgba(200,151,58,.2);
}
.top-bar__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 5%;
  display: flex; justify-content: space-between; align-items: center;
}
.top-bar__links { display: flex; gap: 1.5rem; }
.top-bar__links a { color: rgba(255,255,255,.7); text-decoration: none; transition: color .2s; }
.top-bar__links a:hover { color: var(--gold); }

/* ─── Main Header ───────────────────────────────────────────────── */
.main-header {
  position: sticky; top: 0; z-index: 200;
  background: #fff;
  box-shadow: 0 2px 16px rgba(10,54,34,.1);
  border-bottom: 3px solid var(--green-deep);
}
.main-header__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 5%;
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.main-logo {
  font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700;
  color: var(--green-deep); text-decoration: none; letter-spacing: .04em;
  flex-shrink: 0;
}
.main-logo span { color: var(--gold); }

/* ─── Main Nav ──────────────────────────────────────────────────── */
.main-nav__list {
  list-style: none; display: flex; align-items: center; gap: .25rem;
}
.main-nav__list li a {
  display: block; padding: 8px 14px;
  color: var(--ink); text-decoration: none;
  font-size: .875rem; font-weight: 500;
  border-radius: 6px;
  transition: background .2s, color .2s;
  white-space: nowrap;
}
.main-nav__list li a:hover { background: var(--green-pale); color: var(--green-deep); }
.main-nav__list li.active > a { color: var(--green-deep); font-weight: 700; border-bottom: 2px solid var(--gold); border-radius: 0; }

/* Contact Us — styled as button */
.main-nav__list li:last-child a {
  background: var(--green-deep); color: #fff !important;
  border-radius: 6px; padding: 8px 16px;
}
.main-nav__list li:last-child a:hover { background: var(--green-mid) !important; }

/* Mobile toggle */
.nav-toggle {
  display: none; background: none; border: none;
  color: var(--green-deep); font-size: 1.6rem; cursor: pointer; padding: 4px;
}

/* ─── Page Banner (inner pages) ─────────────────────────────────── */
.page-banner {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-mid) 100%);
  padding: 60px 0;
  position: relative;
  overflow: hidden;
}
.page-banner::after {
  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");
}
.page-banner__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 5%;
  position: relative; z-index: 1;
}
.page-banner h1 {
  font-family: var(--font-heading); font-size: clamp(2rem, 4vw, 3rem);
  color: #fff; font-weight: 700; margin-bottom: .5rem;
}
.page-banner p { color: rgba(255,255,255,.75); font-size: 1.05rem; }
.page-banner__breadcrumb {
  display: flex; gap: .5rem; align-items: center;
  font-size: .82rem; color: rgba(255,255,255,.6);
  margin-bottom: 1rem;
}
.page-banner__breadcrumb a { color: var(--gold); text-decoration: none; }
.page-banner__breadcrumb span { color: rgba(255,255,255,.4); }

/* ─── Main content wrapper ──────────────────────────────────────── */
.main-content { min-height: 60vh; }

/* ─── Stub pages ────────────────────────────────────────────────── */
.stub-section {
  max-width: 1200px; margin: 0 auto; padding: 80px 5%;
  text-align: center;
}
.stub-section h2 {
  font-family: var(--font-heading); font-size: 2rem;
  color: var(--green-deep); margin-bottom: 1rem;
}
.stub-section p { color: var(--muted); max-width: 500px; margin: 0 auto 2rem; }

/* ─── Footer ────────────────────────────────────────────────────── */
.main-footer {
  background: var(--green-deep);
  color: rgba(255,255,255,.75);
  padding-top: 64px;
}
.main-footer__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 5% 48px;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 3rem;
}
.footer-logo {
  font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700;
  color: #fff; letter-spacing: .04em; margin-bottom: 1rem;
}
.footer-logo span { color: var(--gold); }
.footer-col--about p { font-size: .875rem; line-height: 1.7; color: rgba(255,255,255,.65); }
.footer-social { display: flex; gap: .75rem; margin-top: 1.25rem; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.1);
  display: flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,.7); text-decoration: none;
  transition: background .2s, color .2s;
}
.footer-social a:hover { background: var(--gold); color: var(--green-deep); }

.footer-col__title {
  font-size: .7rem; letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold); font-weight: 600; margin-bottom: 1.25rem;
}
.footer-nav { list-style: none; }
.footer-nav li { margin-bottom: .6rem; }
.footer-nav a {
  color: rgba(255,255,255,.65); text-decoration: none; font-size: .875rem;
  transition: color .2s; display: inline-flex; align-items: center; gap: .4rem;
}
.footer-nav a::before { content: '→'; color: var(--gold); font-size: .75rem; opacity: 0; transition: opacity .2s, transform .2s; transform: translateX(-4px); }
.footer-nav a:hover { color: #fff; }
.footer-nav a:hover::before { opacity: 1; transform: translateX(0); }

.footer-contact { list-style: none; }
.footer-contact li {
  display: flex; align-items: flex-start; gap: .6rem;
  margin-bottom: .85rem; font-size: .875rem; color: rgba(255,255,255,.65);
}
.footer-contact svg { flex-shrink: 0; margin-top: 2px; color: var(--gold); }
.footer-contact a { color: rgba(255,255,255,.65); text-decoration: none; transition: color .2s; }
.footer-contact a:hover { color: var(--gold); }

.footer-ipma { font-size: .875rem; color: rgba(255,255,255,.65); line-height: 1.6; margin-bottom: .75rem; }
.footer-ipma-link { color: var(--gold); text-decoration: none; font-size: .875rem; font-weight: 600; }
.footer-ipma-link:hover { color: #fff; }
.footer-policies { display: flex; flex-wrap: wrap; gap: .5rem 1rem; margin-top: 1.5rem; }
.footer-policies a { color: rgba(255,255,255,.5); font-size: .78rem; text-decoration: none; transition: color .2s; }
.footer-policies a:hover { color: var(--gold); }

.main-footer__bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 20px 5%;
  max-width: 100%;
}
.main-footer__bottom p {
  max-width: 1200px; margin: 0 auto;
  font-size: .78rem; color: rgba(255,255,255,.4); text-align: center;
}

/* ─── Home page ─────────────────────────────────────────────────── */
.home-hero {
  background: linear-gradient(135deg, var(--green-deep) 0%, var(--green-mid) 60%, var(--green-bright) 100%);
  padding: 100px 0 80px;
  position: relative; overflow: hidden;
}
.home-hero::before {
  content: ''; position: absolute; inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M0 0h80v80H0V0zm20 20v40h40V20H20zm20 35a15 15 0 1 1 0-30 15 15 0 0 1 0 30z'/%3E%3C/g%3E%3C/svg%3E");
}
.home-hero__inner {
  max-width: 1200px; margin: 0 auto; padding: 0 5%;
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.home-hero__text h1 {
  font-family: var(--font-heading); font-size: clamp(2.5rem, 5vw, 3.8rem);
  color: #fff; font-weight: 700; line-height: 1.1; margin-bottom: 1.25rem;
}
.home-hero__text h1 em { color: var(--gold); font-style: normal; }
.home-hero__text p { color: rgba(255,255,255,.8); font-size: 1.1rem; line-height: 1.7; margin-bottom: 2rem; }
.home-hero__btns { display: flex; gap: 1rem; flex-wrap: wrap; }
.home-hero__card {
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-lg); padding: 2.5rem; backdrop-filter: blur(8px);
}
.home-hero__stats { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.home-stat__num {
  font-family: var(--font-heading); font-size: 2.2rem; font-weight: 700;
  color: var(--gold); line-height: 1;
}
.home-stat__label { font-size: .82rem; color: rgba(255,255,255,.65); margin-top: .3rem; }

.home-why {
  padding: 80px 0;
  background: var(--cream);
}
.home-why__inner { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
.home-why__grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; margin-top: 3rem;
}
.why-card {
  background: #fff; border-radius: var(--radius); padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform .25s, box-shadow .25s;
}
.why-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.why-card__icon {
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--green-pale); display: flex; align-items: center; justify-content: center;
  color: var(--green-deep); margin-bottom: 1rem;
}
.why-card h3 { font-family: var(--font-heading); font-size: 1.15rem; color: var(--green-deep); margin-bottom: .5rem; }
.why-card p { font-size: .875rem; color: var(--muted); line-height: 1.6; }
.why-card__link { display: inline-block; margin-top: 1rem; font-size: .85rem; font-weight: 600; color: var(--green-bright); text-decoration: none; }
.why-card__link:hover { color: var(--green-deep); }

.home-news {
  padding: 80px 0; background: #fff;
}
.home-news__inner { max-width: 1200px; margin: 0 auto; padding: 0 5%; }
.home-news__header { display: flex; justify-content: space-between; align-items: flex-end; margin-bottom: 2.5rem; }
.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.news-card {
  border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
  transition: box-shadow .25s, transform .25s;
}
.news-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.news-card__img { height: 180px; background: var(--green-pale); display: flex; align-items: center; justify-content: center; }
.news-card__img svg { opacity: .3; }
.news-card__body { padding: 1.25rem; }
.news-card__date { font-size: .75rem; color: var(--muted); margin-bottom: .5rem; }
.news-card__title { font-family: var(--font-heading); font-size: 1.1rem; color: var(--green-deep); margin-bottom: .5rem; line-height: 1.3; }
.news-card__excerpt { font-size: .85rem; color: var(--muted); line-height: 1.6; }

/* ─── Responsive ────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .main-footer__inner { grid-template-columns: 1fr 1fr; }
  .home-why__grid { grid-template-columns: repeat(2, 1fr); }
  .news-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .top-bar__links { display: none; }
  .nav-toggle { display: block; }
  .main-nav {
    display: none; position: absolute; top: 72px; left: 0; right: 0;
    background: #fff; box-shadow: 0 8px 24px rgba(0,0,0,.12);
    padding: 1rem 5%;
  }
  .main-nav.open { display: block; }
  .main-nav__list { flex-direction: column; gap: 0; }
  .main-nav__list li a { padding: 12px 8px; border-radius: 0; border-bottom: 1px solid var(--border); }
  .main-nav__list li:last-child a { background: none; color: var(--green-deep) !important; border-radius: 0; }
  .main-header { position: relative; }
  .home-hero__inner { grid-template-columns: 1fr; }
  .home-hero__card { display: none; }
  .main-footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .home-why__grid { grid-template-columns: 1fr; }
  .news-grid { grid-template-columns: 1fr; }
  .home-news__header { flex-direction: column; align-items: flex-start; gap: 1rem; }
}
