* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --background-color: #f2f1ec;
  --header-color: #ffffff;
  --title-color: #e8f5ff;
  --text-color: #111;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', 'Segoe UI', sans-serif;
  background-color: var(--background-color);
  color: var(--text-color);
  line-height: 1.6;
  padding: 0;
}

img {
  max-width:100%;
  height:auto;
  display:block;
}

/* === HEADER === */
.site-header {
  background: var(--header-color);
  border-bottom:1px solid #ddd;
  padding:20px 40px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:10px;
  flex-wrap:wrap; /* allows wrap on small screens */
}

/* logo */
.logo img {
  height:120px;
  width:auto;
  display:block;
}

/* nav */
.nav-links {
  list-style:none;
  display:flex;
  gap:28px;
  margin:0;
  padding:0;
  flex-wrap:wrap;
}

.nav-links a {
  text-decoration:none;
  color: var(--text-color);
  font-size:1.6rem;
  font-weight:600;
  line-height:1.2;
  transition:color .2s;
}

.nav-links a:hover {
  color:#0077cc;
}

.hero{
  position: relative;
  z-index: 0;                 /* creates a stable stacking context */
  padding: 40px 40px;
  background-image: url("images/HeaderBackgroundSized.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: #fff;
  text-align: center;
}

/* darken ONLY the background */
.hero-overlay{
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 0;                 /* explicitly behind content */
  pointer-events: none;       /* never blocks button clicks */
}

/* keep text/buttons above overlay */
.hero-content, .book-row{
  position: relative;
  z-index: 1;                 /* explicitly above overlay */
}

.hero h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.hero h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: white;
}

.book-row {
  margin-top: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 30px;
  flex-wrap: wrap;
  color: #fff;
}

.book-cover {
  max-width: 200px;
  height: auto;
  flex: 0 0 auto;
  border-radius: 12px;
}

.book-text p {
  font-size: 1.8rem;
  font-weight: 800;
  margin: 10px 0;
  text-align: left;
}

/* === GRID SECTIONS === */
.section {
  text-align: center;
  padding: 40px 40px;
  background-color: var(--title-color);
}

.section h1 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 20px;
}

.section h2 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
}

.section p {
    font-size: 1.2rem;
    font-weight: 400;
}
/* === This is the start of the second section. === */
.section2 {
  text-align: center;
  padding: 20px 20px;
}

.section2 h2 {
  text-align: center;
  font-size: 1.6rem;
  font-weight: 700;
}

.section2 p {
    font-size: 1.2rem;
    font-weight: 400;
}

/* === This is for text writing from book. ===*/
.section3 {
  max-width: 900px;
  margin: 40px auto;
  padding: 0 20px;
  text-align: left;
}

.section3 img {
  max-width:900px;
  margin:40px auto;
}

.section3 p{
  text-indent: 2em;
  margin-bottom: 1.2em;
}

.section3 p.center{
  text-align: center;
  text-indent: 0;
}

.section3 h2 {
    text-align: center;
    font-size: 1.7rem;
    font-weight: 700;
    margin-top: 1.4em;
    margin-bottom: 1.2em;
}
/* === These are tables used in .section3 === */
.data-table {
  width: 100%;
  max-width: 900px;
  margin: 30px auto;
  border-collapse: collapse;
  text-align: center;
}
.data-table caption {
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 10px;
}
.data-table thead th {
  font-weight: 700;
  border-bottom: 1px solid #444;
}
.data-table td {
  padding: 8px 0;
}
/* this table is aligned left */
.comparison-table {
  width: 100%;
  max-width: 900px;
  margin: 30px auto;
  border-collapse: collapse;
  text-align: left;
}
.comparison-table th {
  text-align: center;
  font-size: 1.2rem;
  border-bottom: 1px solid #444;
}
.comparison-table td {
  padding: 8px;
}

/* === This is the card sections, such as on main page ===*/
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 40px;
  margin-top: 40px;
}

.card {
background: #fff;
border: 1px solid #ddd; 
border-radius: 12px; 
padding: 30px; 
box-shadow: 0 0 8px rgba(0, 0, 0, 0.04); 
transition: transform 0.2s; 
display: block;
text-decoration: none;
color: inherit;
} 

.card:hover { 
transform: translateY(-4px); 
}

.card-img {
  display: block;      /* removes weird inline spacing */
  width: 100%;
  height: 160px;
  object-fit: cover;   /* fills the box without stretching */
  border-radius: 10px;
}


.card h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.card p {
  font-size: 1rem;
  color: #333;
}

/* === BUTTONS === */
.btn-download {
  background-color: #0077cc;
  color: #fff;
  padding: 15px 30px;
  border: none;
  border-radius: 6px;
  font-size: 1.5rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin-top: 20px;
  transition: background 0.3s;
}
.btn2 {
  background-color: #aa7400;
  color: #fff;
  padding: 15px 55px;
  border: none;
  border-radius: 6px;
  font-size: 1.5rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  margin-top: 20px;
  transition: background 0.3s;
}

.btn-download:hover {
  background-color: #004d85;
}

.btn2:hover {
    background-color:#5a3e00;
}

.forum-small-btn{
  display: inline-block;
  background: #009933;
  color: #fff;
  padding: 15px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: 20px;
  transition:background 0.3s;
}

.forum-small-btn:hover{
  background: #003300;
}

/* ======== Click-to-zoom lightbox ======== */
.zoomable {
  cursor: zoom-in;
}

/* overlay */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.85);
  display: none;
  z-index: 9999;
  padding: 20px;
}

.lightbox.open {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* the zoomed image */
.lightbox img {
  max-width: 95vw;
  max-height: 85vh;
  width: auto;
  height: auto;
  transform: translate(0px, 0px) scale(1);
  transform-origin: center center;
  cursor: grab;
  user-select: none;
}

/* close button */
.lightbox-close {
  position: fixed;
  top: 12px;
  right: 16px;
  font-size: 40px;
  line-height: 1;
  border: 0;
  background: transparent;
  color: #fff;
  cursor: pointer;
}

/* ======= FOOTER ======= */
footer {
  background-color: #111;
  color: #eee;
  text-align: center;
  padding: 40px 20px;
  font-size: 0.9rem;
}

footer a {
  color: #00ccff;
  margin: 0 10px;
  text-decoration: none;
}

footer a:hover {
  text-decoration: underline;
}

/* === RESPONSIVE === */
@media (max-width: 900px) {
  .site-header {
    padding: 16px 20px;
  }

  .header-inner {
    flex-direction: column;
    align-items: center;
  }

  .nav-container {
    width: 100%;
  }

  .nav-links {
    gap: 14px 18px;
  }

  .logo img {
    height: 120px;
  }

  .hero h1 {
    font-size: 2.2rem;
  }

  .section {
    padding: 40px 20px;
  }
}
