/* === Base Styles === */

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: Arial, sans-serif;
  background: #f9f9f9;
  color: #333;
  overflow-x: hidden;
}


/* === Header Section === */
header {
  background: #004466;
  color: white;
  padding: 1rem 5%;
}

/* === Flex Container === */
.container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

/* === Logo === */
.logo {
  color: white;
  text-decoration: none;
  font-weight: bold;
  font-size: 1.7rem; /* optional for size */
}

.logo:hover {
  text-decoration: none; /* no underline on hover */
  color: white; /* maintain white color on hover */
}

/* === Navigation === */
nav {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.menu {
  list-style: none;
  display: flex;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.menu li a {
  color: white;
  text-decoration: none;
  font-size: 1.1rem;
  font-weight: 500;
  transition: opacity 0.3s ease;
}

.menu li a:hover {
  opacity: 1;
  border-bottom: 2px solid #FABE04;
  padding-bottom: 3px;
}

/* === Search === */
.search-icon {
  cursor: pointer;
  font-size: 1.2rem;
}

#search-bar {
  display: none;
  padding: 0.4rem 0.6rem;
  margin-left: 0.5rem;
  border: none;
  border-radius: 4px;
  font-size: 0.95rem;
}
 /* === Responsive Header Fix (Mobile Only) === */
 @media (max-width: 768px) {
  header {
    padding: 1rem 16px;
  }

  .container {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    flex-direction: column;
    align-items: flex-start;
    width: 100%;
    margin-top: 1rem;
  }

  .menu {
    flex-direction: row;
    flex-wrap: nowrap; /* prevent wrap */
    justify-content: space-between; /* evenly spread */
    width: 100%;
    gap: 0.5rem;
  }

  .menu li {
    flex: 1;
    text-align: center;
  }

  .menu li a {
    font-size: clamp(0.85rem, 2.5vw, 1.1rem); /* responsive font */
  }

  .search-icon {
    margin-top: 10px;
  }

  #search-bar {
    display: none;
    width: 100%;
    margin-top: 5px;
    padding: 10px;
    font-size: 1rem;
    box-sizing: border-box;
    border-radius: 4px;
    border: none;
  }
}


/* === Footer Base === */
footer {
  background: #004466;
  color: white;
  padding: 40px 20px;
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  overflow-x: hidden;
}

/* Footer Container Wrapper */
.footer-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  box-sizing: border-box;
}

/* Footer Headings */
footer h3 {
  margin-bottom: 10px;
  color: #fff;
}

/* Footer Divider Full Width */
footer hr {
  border: none;
  border-top: 1px solid #ccc;
  margin: 30px 0;
  width: calc(100% + 40px);
  margin-left: -20px;
}

/* === Footer Navigation Links === */
.footer-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-top: 20px;
  padding: 0;
  box-sizing: border-box;
}

.footer-link {
  color: white;
  text-decoration: none;
  font-size: 0.95rem;
  position: relative;
  padding-bottom: 3px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s ease, opacity 0.3s ease;
}

.footer-link:hover {
  border-color: #FABE04;
  opacity: 1;
}

/* Footer Copyright */
footer p {
  font-size: 13px;
  margin-top: 20px;
  color: #ccc;
}

/* === Newsletter Form === */
#newsletter-form {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}

#newsletter-form input[type="email"] {
  padding: 10px;
  width: 300px;
  max-width: 100%;
  border: 1px solid #ccc;
  box-sizing: border-box;
  border-radius: 4px;
}

#newsletter-form button {
  padding: 10px 20px;
  background: #333;
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 4px;
  transition: background 0.3s ease;
}

#newsletter-form button:hover {
  background: #555;
}

/* === Success Message === */
#thanks {
  display: none;
  margin-top: 15px;
  color: lightgreen;
  font-weight: 600;
}

/* === Mobile Responsive Fixes === */
@media (max-width: 768px) {
  .footer-container {
    padding: 0 16px;
    box-sizing: border-box;
  }

  #newsletter-form {
    flex-direction: column;
    align-items: center;
    gap: 10px;
  }

  #newsletter-form input[type="email"] {
    width: 90%;
    max-width: 320px;
  }

  #newsletter-form button {
    width: 90%;
    max-width: 180px;
  }

  .footer-nav {
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 25px;
    padding: 0;
  }

  width: calc(100% + 32px);
    margin-left: -16px;
  }
}

/* === Article Content Styles === */

main h1 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  color: #222;
}

main h2 {
  font-size: 1.3rem;
  margin-top: 2rem;
  margin-bottom: 0.6rem;
  color: #004466;
  border-left: 4px solid #FABE04;
  padding-left: 10px;
}

main p {
  margin-bottom: 1.2rem;
  font-size: 1.05rem;
  line-height: 1.7;
}

/* Featured Image */
main img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 20px 0;
}

/* CTA Block */
#cta-block {
  background: #fff8e1;
  border-left: 4px solid #FABE04;
  padding: 20px;
  margin: 40px 0;
  border-radius: 6px;
}

#cta-block h3 {
  font-size: 1.2rem;
  margin-bottom: 10px;
  color: #004466;
}

#cta-block p {
  margin-bottom: 12px;
}

#cta-block a {
  display: inline-block;
  background: #FABE04;
  color: #000;
  font-weight: bold;
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s ease;
}

#cta-block a:hover {
  background: #f9d13b;
}

/* Related Links Section */
.related-links {
  margin-top: 40px;
}

.related-links h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
  color: #004466;
}

.related-links ul {
  list-style: disc;
  padding-left: 20px;
}

.related-links li {
  margin-bottom: 8px;
}

.related-links a {
  color: #0077cc;
  text-decoration: none;
}

.related-links a:hover {
  text-decoration: underline;
}

main ul li,
main ol li {
  margin-bottom: 0.8rem; /* add vertical space between bullets */
  line-height: 1.7;       /* improve text readability */
}


/* Responsive Adjustments */
@media (max-width: 768px) {
  main {
    padding: 1.5rem 1rem;
  }

  main h1 {
    font-size: 1.5rem;
  }

  main h2 {
    font-size: 1.1rem;
  }

  #cta-block {
    padding: 16px;
  }

  #cta-block a {
    width: 100%;
    text-align: center;
  }
}
/* === Desktop Article Spacing Fixes === */
main {
  flex: 1;
  background: #fff;
  padding: 2.5rem 3rem;
  border-radius: 10px;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

/* Remove max-width and margin from here — let .article-layout handle it */


main h2 {
  display: block;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  font-size: 1.3rem;
  line-height: 1.4;
  color: #004466;
  border-left: 4px solid #FABE04;
  padding-left: 10px;
}

main p {
  margin-top: 0.4rem;
  margin-bottom: 1.6rem;
  font-size: 1.1rem;
  line-height: 1.8;
}

/* === Featured Image Padding Boost === */
main img {
  display: block;
  margin: 30px auto;
  border-radius: 10px;
}

/* === Fix CTA Button Overflow on Mobile === */
#cta-block a {
  white-space: normal;
  word-wrap: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

.home-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

@media (max-width: 600px) {
  .home-container {
    padding: 0 12px; /* Less padding on very small screens */
  }
}

/* === Align Publication Date Correctly on Desktop === */
@media (min-width: 769px) {
  p[style*="font-size: 0.9rem"] {
    display: block;
    text-align: left;
    font-style: italic;
    margin-top: -1rem;
    margin-bottom: 2rem;
  }
}
/* === Smart Picks Section === */
.smart-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* limit to 2 cards per row */
  gap: 30px;
  justify-content: center;
  align-items: stretch;
}

.smart-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fff;
  border-left: 4px solid #FABE04;
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 1px 5px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
}

.smart-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.smart-card .emoji {
  font-size: 2rem;
  margin-right: 10px;
}

.smart-card h3 {
  font-size: 1.2rem;
  margin: 0 0 6px;
  color: #004466;
}

.smart-card p {
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}
/* === Home Category Articles with Thumbnail Support === */
.article-section {
  max-width: 1200px;
  margin: 60px auto 40px;
  padding: 0 5%;
}

.article-section h2 {
  font-size: 1.6rem;
  margin-bottom: 24px;
  color: #004466;
  border-left: 4px solid #FABE04;
  padding-left: 12px;
}

/* Main Article Card Layout */
.article-card {
  display: flex;
  align-items: flex-start;
  text-decoration: none;
  background: #fff;
  border-left: 4px solid #FABE04;
  border-radius: 10px;
  padding: 16px 20px;
  margin-bottom: 24px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  color: #333;
}

.article-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

/* Thumbnail Image */
.article-card img {
  width: 160px;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
  margin-right: 20px;
  flex-shrink: 0;
}

/* Article Text */
.article-text h3 {
  font-size: 1.25rem;
  margin: 0 0 10px;
  color: #004466;
  line-height: 1.4;
}

.article-text p {
  font-size: 1.05rem;
  margin: 0;
  line-height: 1.6;
  color: #444;
}
.article-text {
  flex: 1;
}

/* Responsive: Stack on Mobile */
@media (max-width: 700px) {
  .article-card {
    flex-direction: column;
    align-items: flex-start;
    padding: 16px;
  }

  .article-card img {
    width: 100%;
    height: auto;
    margin: 0 0 12px;
  }

  .article-text h3 {
    font-size: 1.15rem;
  }

  .article-text p {
    font-size: 0.95rem;
  }
}

/* === Article Table Styling === */
main table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
  margin: 2rem auto;
  font-size: 1rem;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0,0,0,0.05);
}

/* Table cell styles */
main th,
main td {
  border: 1px solid #ddd;
  padding: 12px 16px;
  text-align: left;
  white-space: nowrap; /* Prevent text from wrapping on small screens */
}

/* Table header styling */
main th {
  background-color: #f3f3f3;
  color: #004466;
  font-weight: bold;
}

/* Row striping */
main tr:nth-child(even) {
  background-color: #f9f9f9;
}

/* === Table Scroll Wrapper === */
.table-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 1rem;
  margin-bottom: 2rem;
}

.table-scroll table {
  min-width: 600px;
  width: 100%;
}
/* === Sidebar Layout for Articles (Desktop Only) === */
.left-sidebar, .right-sidebar {
  position: fixed;
  top: 120px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Left: Social Share Icons */
/* === Sidebar Layout for Articles (Desktop Only) === */
.left-sidebar,
.right-sidebar {
  position: fixed;
  top: 120px;
  z-index: 999;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Left: Social Share Icons */
.left-sidebar {
  left: 20px;
  align-items: center;
}

.share-title {
  font-weight: bold;
  font-size: 1rem;
  margin-bottom: 10px;
  color: #004466;
  text-align: center;
}

/* Right: eBook Badge */
.right-sidebar {
  right: 20px;
}

.ebook-badge {
  background: #FABE04;
  color: #000;
  font-weight: bold;
  padding: 10px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.95rem;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: background 0.3s ease;
}

.ebook-badge:hover {
  background: #ffd84a;
}

/* === Social Icon Buttons === */
.social-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  background-color: #f3f3f3;
  color: #004466;
  border-radius: 50%;
  text-decoration: none;
  font-size: 1.3rem;
  transition: background 0.3s, transform 0.2s;
}

.social-icon:hover {
  background-color: #ddd;
  transform: scale(1.1);
}
.social-icon .facebook { color: #3b5998; }
.social-icon .twitter { color: #1da1f2; }
.social-icon .whatsapp { color: #25d366; }
.social-icon .linkedin { color: #0077b5; }
.social-icon .pinterest { color: #e60023; }


/* === Narrower Layout for Articles on Desktop === */
@media (min-width: 1024px) {
  main.article-layout {
    max-width: 900px;
    margin: 40px auto;
  }
}

/* === Hide Sidebars on Mobile === */
@media (max-width: 768px) {
  .left-sidebar,
  .right-sidebar {
    display: none !important;
  }
}

/* === eBook Grid Cards === */
.ebook-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

/* eBook Smart Cards */
.ebook-card {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  background: #fff;
  border-left: 4px solid #FABE04;
  border-radius: 10px;
  padding: 20px;
  text-decoration: none;
  color: #333;
  box-shadow: 0 1px 5px rgba(0,0,0,0.06);
  transition: transform 0.2s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.ebook-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
}

.ebook-card .emoji {
  font-size: 2rem;
  margin-right: 10px;
}

.ebook-card h3 {
  font-size: 1.2rem;
  margin: 0 0 6px;
  color: #004466;
}

.ebook-card p {
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.5;
}

/* === Form Section for Email Opt-in === */
.category-form {
  margin-top: 40px;
  background: #fff;
  border-left: 4px solid #FABE04;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 6px rgba(0,0,0,0.05);
}

.category-form h2 {
  font-size: 1.3rem;
  margin-bottom: 12px;
  color: #004466;
}

.category-form form {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 10px;
}

.category-form input[type="email"] {
  padding: 10px;
  width: 100%;
  max-width: 100%;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}

.category-form button {
  padding: 10px 20px;
  background: #333;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.category-form button:hover {
  background: #555;
}
.ebook-grid {
  overflow-x: hidden;
  width: 100%;
  box-sizing: border-box;
}
@media (max-width: 400px) {
  .ebook-card .emoji {
    font-size: 1.6rem;
    margin-right: 8px;
  }

  .ebook-card {
    padding: 16px;
  }
}


/* Responsive Form Fixes */
@media (max-width: 600px) {
  .category-form form {
    flex-direction: column;
  }

  .category-form input[type="email"],
  .category-form button {
    width: 100%;
  }
}

/* === Success Message Styles === */
#thanks {
  margin-top: 20px;
  color: green;
  font-weight: bold;
  font-size: 1rem;
  background: #eaffea;
  padding: 15px 20px;
  border-left: 4px solid green;
  border-radius: 6px;
}

.checkmark-container {
  display: inline-block;
  width: 50px;
  height: 50px;
  margin-right: 10px;
  vertical-align: middle;
}

.checkmark {
  width: 100%;
  height: 100%;
  stroke: green;
  stroke-width: 4;
  stroke-miterlimit: 10;
  fill: none;
  animation: scale .3s ease-in-out .9s both;
}

.checkmark-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  stroke: #4CAF50;
  animation: stroke 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

.checkmark-check {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  stroke: #4CAF50;
  animation: stroke 0.3s 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

@keyframes stroke {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes scale {
  0%, 100% {
    transform: none;
  }
  50% {
    transform: scale(1.1);
  }
}

/* === eBook Card Selection Styles (Scoped) === */
.ebook-section .smart-card {
  position: relative;
  transition: box-shadow 0.3s, background 0.3s;
}

.ebook-section .smart-card.active-card {
  background: #f0f9ff;
  border-left: 4px solid #004466;
  box-shadow: 0 0 0 2px #00446644;
}

.ebook-section .smart-card .badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #2ecc71;
  color: white;
  font-size: 0.75rem;
  padding: 2px 6px;
  border-radius: 12px;
  font-weight: 600;
  z-index: 1;
}
