/* ============================================================
   ROOT VARIABLES (Light + Dark Mode)
   ============================================================ */

:root {
  --accentColor: #4caf50;
  --bg: #fbfbfb;
  --text: #111;
  --card-bg: #fff;
  --border: #e1e1e1;
  --header-bg: #fff;
  --header-text: #111;
  --shadow: rgba(0,0,0,0.15);
  --transition: 0.25s ease;
}

/* Dark Mode Override (PHP injects darkMode=1) */

body.dark {
  --bg: #111;
  --text: #eee;
  --card-bg: #1b1b1b;
  --border: #333;
  --header-bg: #1a1a1a;
  --header-text: #eee;
  --shadow: rgba(0,0,0,0.45);
}


/* ============================================================
   GLOBAL RESET / BASE
   ============================================================ */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: Roboto, sans-serif;
  font-size: 16px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

a { 
  color: var(--text); 
  text-decoration: none;
  transition: var(--transition);
}

a:hover { color: var(--accentColor); }

ul { list-style: none; }

h1, h2, h3, h4, h5, h6 {
  font-family: Montserrat, sans-serif;
  font-weight: 700;
  color: var(--text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; margin-bottom: 12px; }
h3 { font-size: 1.2rem; margin-bottom: 8px; }

p { margin-bottom: 18px; color: var(--text); }

.mainContainer {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 18px;
  margin-top: 30px;
}


/* ============================================================
   HEADER + NAVIGATION
   ============================================================ */

header {
  background: var(--header-bg);
  color: var(--header-text);
  box-shadow: 0 3px 8px var(--shadow);
  width: 100%;
  position: fixed;
  top: 0; left: 0;
  z-index: 999;
}

nav {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.logotxt {
  font-size: 26px;
  font-weight: 700;
  color: var(--header-text);
}

.logo h3 {
  font-size: 15px;
  font-weight: 500;
  color: var(--accentColor);
}

/* Desktop menu */
.nav-menu {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-menu li a {
  padding: 10px 0;
  border-bottom: 2px solid transparent;
}

.nav-menu li a:hover {
  color: var(--accentColor);
  border-bottom-color: var(--accentColor);
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-content {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 0;
  display: none;
  box-shadow: 0 4px 14px var(--shadow);
}

.dropdown-content a {
  display: block;
  padding: 10px 16px !important;
  color: var(--text);
}

.dropdown-content a:hover {
  background: var(--accentColor);
  color: #fff !important;
}

.dropdown:hover .dropdown-content { display: block; }


/* ============================================================
   MOBILE NAVIGATION (Hamburger Right)
   ============================================================ */

.hamburger {
  display: none;
  cursor: pointer;
  width: 28px;
  height: 22px;
  flex-direction: column;
  justify-content: space-between;
}

.hamburger div {
  width: 100%;
  height: 3px;
  background: var(--header-text);
  transition: var(--transition);
}

.mobile-menu {
  display: none;
  position: fixed;
  top: 76px;
  left: 0;
  width: 100%;
  background: var(--card-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 6px 20px var(--shadow);
  padding: 20px 0;
}

.mobile-menu a {
  display: block;
  padding: 14px 22px;
  color: var(--text);
  font-size: 17px;
}

.mobile-menu a:hover {
  background: var(--accentColor);
  color: #fff;
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  margin-top: 76px;
  width: 100%;
  height: 180px;
  background-size: cover;
  background-position: center;
  border-bottom: 1px solid var(--border);
  box-shadow: 0 3px 6px var(--shadow);
}


/* ============================================================
   HOMEPAGE LAYOUT
   ============================================================ */

#homeLeft, #homeRight { display: block; }

#homeLeft {
  width: 65%;
  float: left;
  padding-right: 3%;
}

#homeRight {
  width: 32%;
  float: left;
}

.clear { clear: both; }

/* Article Cards */

.articleGrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px,1fr));
  gap: 22px;
  margin-top: 25px;
}

.articleCardFull {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 22px;
  transition: var(--transition);
  text-decoration: none;
  color: var(--text);
}

.articleCardFull:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px var(--shadow);
}

.articleCardImage img {
  width: 100%;
  height: 160px;
  object-fit: cover;
  border-radius: 6px;
  margin-bottom: 14px;
}

.articleCardTitle {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}


/* ============================================================
   CATEGORY PAGE — Article Cards
   ============================================================ */

.article-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px,1fr));
  gap: 22px;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  transition: var(--transition);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 6px 16px var(--shadow);
}

.card-img img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card-title {
  padding: 14px;
  font-size: 17px;
  font-weight: bold;
}


/* ============================================================
   FULL ARTICLE PAGE
   ============================================================ */

.article-container {
  max-width: 860px;
  margin: 40px auto;
  padding: 0 18px;
}

.article-hero {
  width: 100%;
  border-radius: 10px;
  margin-bottom: 25px;
}

.article-title {
  font-size: 34px;
  font-weight: 700;
  margin-bottom: 10px;
}

.article-meta {
  font-size: 14px;
  color: var(--text);
  opacity: 0.7;
  margin-bottom: 25px;
}

.article-body h2 {
  margin-top: 30px;
  margin-bottom: 12px;
}

.article-body p {
  margin: 14px 0;
}

.article-body ul {
  padding-left: 20px;
}

.article-body li {
  margin: 6px 0;
}


/* ============================================================
   ABOUT PAGE
   ============================================================ */

.about-us-container {
  font-family: Inter, sans-serif;
  line-height: 1.75;
  font-size: 17px;
  color: var(--text);
  margin-top: 20px;
}

.about-us-container h2 {
  font-size: 26px;
  border-bottom: 2px solid var(--border);
  padding-bottom: 6px;
  margin-top: 24px;
}

.about-us-container h3 {
  font-size: 21px;
  margin-top: 20px;
  border-left: 4px solid var(--accentColor);
  padding-left: 10px;
}

.about-us-container blockquote {
  background: var(--card-bg);
  border-left: 4px solid var(--accentColor);
  padding: 18px;
  margin: 20px 0;
  font-style: italic;
}


/* ============================================================
   CONTACT PAGE
   ============================================================ */

.contact-section {
  padding: 60px 20%;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0px;
  margin-top: 50px;

}

.contact-section input,
.contact-section textarea {
  width: 100%;
  padding: 12px;
  border: 1px solid var(--border);
  background: var(--bg);
  border-radius: 6px;
  margin-bottom: 15px;
  font-size: 15px;
}

.contact-section button {
  background: var(--accentColor);
  color: #fff;
  padding: 12px 22px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: var(--transition);
}

.contact-section button:hover {
  opacity: 0.85;
}


/* ============================================================
   FOOTER
   ============================================================ */

footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 20px 0;
  margin-top: 40px;
}

footer p { font-size: 16px; opacity: 1; color: var(--accentColor);}


/* ============================================================
   RESPONSIVE (MOBILE FIRST)
   ============================================================ */

@media (max-width: 900px) {

  #homeLeft, #homeRight {
    width: 100%;
    float: none;
  }

  .articleGrid {
    grid-template-columns: 1fr;
  }

}

@media (max-width: 768px) {

  .nav-menu { display: none; }

  .hamburger { display: flex; }

  .mobile-menu { display: block; }

  .hero {
    height: 160px;
  }

}

@media (max-width: 480px) {

  .article-title { font-size: 26px; }

  .card-title { font-size: 15px; }

}


/* MOBILE MENU ACTIVE STATE */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}

.mobile-menu.open {
  max-height: 500px; /* expanded height */
}

/* HAMBURGER ANIMATION */
.hamburger.open div:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}
.hamburger.open div:nth-child(2) {
  opacity: 0;
}
.hamburger.open div:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}
.newsletter {
  width: 100%;
  text-align: center;
  padding: 35px;
  border: solid 1px #dad8d8;
  border-radius: 6px;
  display: inline-block;
  vertical-align: top;
  margin-bottom: 30px;
}
.newsletter img {
  max-width: 100px;
  opacity: 0.8;
}
.newsletterTitle {
  font-size: 1.2em;
}
.newsletterSubtext {
  font-size: 0.85em;
  color: #616060;
}
.newLetterInput {
  width: 100%;
  height: 35px;
  margin-bottom: 8px;
  font-size: 1.2em;
  font-weight: 100;
  padding: 7px;
  border: solid 1px #c7c7c7;
  outline: 0;
}
.newLetterInput:focus {
  background-color: #ececec;
  outline: 0;
}
.newLetterButton {
  background-color: #2c2c2c;
  color: #ececec;
  height: 50px;
  border-radius: 5px;
}
.newLetterButton:hover {
  background-color: #3f3f3f;
  color: #ececec;
  height: 50px;
  border-radius: 5px;
  text-decoration: underline;
}
.featuredArticle {
  width: 100%;
  padding: 0;
  border: solid 1px #dad8d8;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 30px;
}
.featuredArticle img {
  width: 100%;
  max-width:100px;
  top: 0;
  left: 0;
}
.featuredArticle {
  width: 100%;
  padding: 0;
  border: solid 1px #dad8d8;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 30px;
}
.featuredArticle img {
  width: 100%;
  max-width:100px;
  top: 0;
  left: 0;
}
.featuredArticleBottom {
  width: 100%;
  padding: 15px;
}
.featuredArticleCategoryText {
  color: #616060;
  font-size: 0.7em;
}
.featuredArticleTitleText {
  font-size: 1.2em;
}
.featuredArticleDateText {
  font-size: 0.7em;
  color: #a3a3a3;
}
.featuredArticleGrid {
  width: 100%;
  padding: 0px;
  border: solid 0px #dad8d8;
  border-radius: 6px;
  display: inline-block;
  margin-bottom: 30px;
}
.featuredArticleGridSubItemLeft {
  width: 45%;
  box-sizing: border-box;
  padding: 0px;
  border: solid 1px #dad8d8;
  border-radius: 6px;
  display: inline-block;
  margin: 4.2%;
  margin-left: 0px !important;

}
.featuredArticleGridSubItemLeft img {
  width: 100%;
  top: 0;
  left: 0;
}

.featuredArticleGridSubItemRight {
  width: 45%;
  box-sizing: border-box;
  padding: 0px;
  border: solid 1px #dad8d8;
  border-radius: 6px;
  display: inline-block;
  margin: 4.2%;
  margin-right: 0px !important;

}
.featuredArticleGridSubItemRight img {
  width: 100%;
  top: 0;
  left: 0;
}
/* ============================================
   CONTACT FORM — DARK MODE / LIGHT MODE SUPPORT
   ============================================ */

.contact-section {
    background: var(--bg);
    color: var(--text);
    padding: 60px 0;
    transition: background 0.3s ease, color 0.3s ease;
}

.contact-section h2 {
    color: var(--text);
}

.contact-section p {
    color: var(--text);
}

/* FORM CARD */
.contact-section form {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 25px;
    border-radius: 8px;
    max-width: 600px;
    margin: 0 auto;
    transition: background 0.3s ease, border-color 0.3s ease;
}

/* INPUTS / TEXTAREA */
.contact-section form input,
.contact-section form textarea {
    background: var(--card-bg);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 5px;
    width: 100%;
    font-size: 16px;
    transition: background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.contact-section form input:focus,
.contact-section form textarea:focus {
    border-color: var(--accentColor);
    outline: none;
}

/* BUTTON */
.contact-section form button {
    background: var(--accentColor);
    color: #fff;
    border: none;
    padding: 12px 22px;
    font-size: 16px;
    border-radius: 6px;
    cursor: pointer;
    display: inline-block;
    transition: background 0.25s ease;
}

.contact-section form button:hover {
    background: #333;
}

