/* css/style.css */

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

/* Body/base typography & background */
body {
  font-family: 'Open Sans', Verdana, Geneva, sans-serif;
  line-height: 1.6;
  color: #222;
  background: #f8f8f8;
  font-size: 16px;
}

h1, h2, h3 {
  font-family: 'Merriweather', serif;
}

/* Header – stack banner and nav vertically */
.site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
}

/* Banner image */
.site-banner {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 0;
}

/* Navigation bar styling */
.site-nav {
  width: 100%;
  background: #3B5E45; /* deep forest green */
  padding: 0.30rem 0;
}

.site-nav ul {
  list-style: none;
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin: 0;
  padding: 0;
}

.site-nav a {
  color: #fff;
  text-decoration: none;
  font-family: Verdana, Geneva, sans-serif;
}

.site-nav a:hover {
  text-decoration: underline;
  color: #EAECE7;
}

/* Full-width white wrapper */
.site-content {
  width: 100%;
  background: #fff;
  padding-bottom: 2rem;
}

/* Centered column */
.container {
  max-width: 820px;
  margin: 0 auto;
  padding: 2rem 1rem;
}

/* Main sections */
main {
  padding: 0;
  background: none;
}

/* Hero section */
.hero {
  text-align: center;
  padding: 2rem 0;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
  color: #3B5E45;
}

.hero p {
  font-size: 1.2rem;
  color: #5A5A5A;
}

/* Section headings */
h2 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: #3B5E45;
}

/* Footer */
.site-footer {
  background: #F6F1EB;
  color: #222;
  text-align: center;
  padding: 1.5rem;
  font-size: 0.9rem;
  border-top: 1px solid #ccc;
}

.site-footer a {
  color: #3B5E45;
  text-decoration: none;
}

.site-footer a:hover {
  text-decoration: underline;
  color: #2F4A35;
}

/* Responsive nav for small screens */
@media (max-width: 820px) {
  .site-nav ul {
    flex-wrap: wrap;
    gap: 0.3rem;
  }
  .site-nav a {
    display: inline-block;
    padding: 0.4rem 0.8rem;
    text-align: center;
  }
}

/* Desktop: constrain header/content/footer into one outlined box */
@media (min-width: 821px) {
  .site-header,
  .site-content,
  .site-footer {
    max-width: 820px;
    margin: 0 auto;
    border-left: 1px solid #ccc;
    border-right: 1px solid #ccc;
  }
  .site-header {
    border-bottom: none;
  }
}

/* Bullet list spacing inside page sections */
.page-section ul {
  margin-left: 1.5rem;
}

.page-section ul li p,
.highlights ul li p {
  margin: 0.2rem 0 1rem 0;
  font-size: 0.9em;
  color: #555;
}

/* Link behavior */
.site-content a {
  color: #3B5E45;
  text-decoration: none;
}

.site-content a:hover {
  text-decoration: underline;
  color: #2F4A35;
}

/* All headers use green */
h1, h2, h3, h4, h5, h6 {
  color: #3B5E45;
}

/* Paragraph spacing inside article */
article p {
  margin-bottom: 1rem;
}

article h2,
article h3,
article h4,
article h5,
article h6 {
  margin-top: 2rem;
}

article ul {
  margin-left: 2rem;
}

/* Center all H1s */
h1 {
  text-align: center;
}

/* Issue metadata */
.issue h1,
.issue .issue-meta {
  text-align: center;
}

.issue article {
  margin-top: 2rem;
}

/* Author box */
.author-box {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0.5em 0 1em;
  flex-wrap: wrap;
  text-align: center;
}

.author-photo {
  width: 48px !important;
  height: 48px !important;
  border-radius: 50%;
  object-fit: cover;
  display: inline-block !important;
}

.author-info {
  font-size: 0.95em;
  line-height: 1.4;
  text-align: center;
}

.author-link {
  text-decoration: none;
  color: #3B5E45;
  font-style: normal;
}

.author-link:hover {
  text-decoration: underline;
  color: #2F4A35;
}

.pub-date {
  color: #555;
}

/* Navigation block under articles */
.issue-nav {
  text-align: center;
  margin-top: 2rem;
}

.issue-nav a {
  display: block;
  margin: 0.5rem 0;
  text-decoration: none;
  color: #3B5E45;
}

.issue-nav a:hover {
  text-decoration: underline;
  color: #2F4A35;
}

/* Responsive image wrapper */
.centered-image {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  margin: 2em 0;
}

.centered-image img {
  max-width: 100%;
  height: auto;
}

.centered-image figcaption {
  font-size: 0.8em;
  color: #555;
  margin-top: 0.5em;
  max-width: 90%;
}

/* Table responsiveness */
.table-container {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 2rem auto;
  width: fit-content;
}

table {
  border-collapse: collapse;
  font-family: sans-serif;
  width: 100%;
}

table th,
table td {
  border: 1px solid #000;
  padding: 6px 10px;
  text-align: center;
  white-space: nowrap;
  font-size: 0.95rem;
}

/* Index list links */
.page-section.index-list > ul {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
  text-align: center;
}

.page-section.index-list > ul > li {
  margin: 0.5rem 0;
  font-size: 1.25rem;
}

.page-section.index-list > ul > li > a {
  color: #3B5E45;
  text-decoration: none;
}

.page-section.index-list > ul > li > a:hover {
  text-decoration: underline;
  color: #2F4A35;
}

p {
  margin-bottom: 1rem;
}

.highlights {
  margin: 2rem 0;
}

.highlights .tiles {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.highlights .tiles li {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 4px;
  display: flex;
  flex-direction: column;
}

.highlights .tiles li a {
  color: inherit;
  text-decoration: none;
}

.highlights .tiles .tile-image img {
  width: 100%;
  height: auto;
}

.highlights .tiles h2 {
  padding: 0.5rem;
  font-weight: normal;
  font-size: 1rem;
  margin: 0;
  line-height: 1.3;
}

.highlights .tiles p {
  flex-grow: 1;
  margin: 0.5rem;
  font-size: 0.95rem;
  line-height: 1.4;
}

.highlights > h1 {
  margin-bottom: 0.5rem;
}

/* Load More button */
.load-more {
  display: block;
  margin: 1rem auto;
  background-color: #3B5E45;
  color: #fff;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.2rem;
  font-size: 1rem;
  font-family: Verdana, Geneva, sans-serif;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.load-more:hover {
  background-color: #2F4A35;
}

.load-more:active {
  background-color: #1E3323;
}

/* Desktop adjustments */
@media (min-width: 821px) {
  .issue article {
    padding: 0 2.5rem;
  }
}

/* Gallery grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-grid img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border: 1px solid #ccc;
  border-radius: 4px;
  cursor: pointer;
}

/* Modal navigation zones */
#image-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

#image-modal .modal-nav {
  position: absolute;
  top: 0;
  height: 100%;
  width: 20%;
  cursor: pointer;
}

#image-modal .modal-nav.prev {
  left: 0;
}

#image-modal .modal-nav.next {
  right: 0;
}

#image-modal .modal-nav::before {
  content: '';
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 2rem;
  color: #fff;
  user-select: none;
}

#image-modal .modal-nav.prev::before {
  content: '‹';
  left: 10px;
}

#image-modal .modal-nav.next::before {
  content: '›';
  right: 10px;
}

#image-modal img {
  max-width: 90%;
  max-height: 90%;
  box-shadow: 0 0 10px rgba(0,0,0,0.5);
  border-radius: 4px;
  z-index: 1001;
}

#image-modal .modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  z-index: 1002;
}

.unit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1rem;
  margin-top: 1.5rem;
}

.unit-tile {
  aspect-ratio: 1 / 1;
  border: 1px solid #ddd;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.unit-tile img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

.unit-info {
  flex-grow: 1;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.unit-info h2 {
  font-size: 1.2rem;
  margin: 0 0 0.3rem;
  color: #3B5E45;
}

.unit-info p {
  margin: 0;
  font-size: 0.95rem;
  color: #555;
}


/* Contact + FAQ grid layout */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
}

.contact-card {
  background: #F6F1EB;
  padding: 1.5rem;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.contact-info p {
  font-size: 1rem;
  line-height: 1.5;
}

.contact-info a {
  color: #3B5E45;
  text-decoration: none;
}

.contact-info a:hover {
  text-decoration: underline;
}

/* FAQ accordion */
.faq-section .faq-item {
  border-bottom: 1px solid #ddd;
}

.faq-question {
  background: none;
  border: none;
  font-size: 1rem;
  font-weight: bold;
  text-align: left;
  width: 100%;
  padding: 0.75rem 0;
  cursor: pointer;
  color: #3B5E45;
}

.faq-answer {
  display: none;
  padding: 0 0 1rem 0;
  color: #555;
}

/* Two-column layout on larger screens */
@media (min-width: 820px) {
  .contact-grid {
    grid-template-columns: 1fr 2fr;
    align-items: start;
  }
}




/* ==== GRID HELPERS ==== */
.gallery-app .building-cards,
.gallery-app .unit-cards {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 900px) {
  .gallery-app .building-cards,
  .gallery-app .unit-cards {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 500px) {
  .gallery-app .building-cards,
  .gallery-app .unit-cards {
    grid-template-columns: 1fr;
  }
}

.unit-gallery .gallery-grid {
  display: grid;
  gap: 0.5rem;
  grid-template-columns: repeat(5, 1fr);
}

@media (max-width: 1200px) {
  .unit-gallery .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 800px) {
  .unit-gallery .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 500px) {
  .unit-gallery .gallery-grid {
    grid-template-columns: 1fr;
  }
}

/* ==== CARD & TILE COMMON STYLES ==== */
.building-card,
.unit-card,
.tile {
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
  overflow: hidden;
}

.building-card,
.unit-card {
  cursor: pointer;
  text-align: center;
  border: 1px solid #ddd;
}

.building-card span,
.unit-card span {
  display: block;
  padding: 0.5rem;
  background: #f8f8f8;
  font-weight: bold;
  color: #3B5E45;
}

/* ==== IMAGE SIZING & RATIO ==== */
.building-card img,
.unit-card img,
.tile img {
  width: 100%;
  aspect-ratio: 1/1;       /* force square */
  object-fit: cover;
  transition: transform 0.2s;
}

.tile img:hover {
  transform: scale(1.05);
}

/* ==== SECTION SPACING ==== */
.building-section {
  margin: 3rem 0;
}

.unit-gallery {
  margin: 1.5rem 0 3rem;
}

.unit-gallery h3 {
  margin-bottom: 1rem;
}

/* ==== BUILDING COVER ==== */
.building-cover {
  display: block;
  margin: 1rem auto;
  max-width: 300px;
  width: 100%;
  border-radius: 4px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

/* ==== MOBILE FONT TWEAK ==== */
@media (max-width: 600px) {
  .building-card span,
  .unit-card span {
    font-size: 0.9rem;
  }
}
