/* font code */
@import url('https://fonts.googleapis.com/css2?family=Figtree:ital,wght@0,300..900;1,300..900&family=Instrument+Serif:ital@0;1&family=STIX+Two+Text:ital,wght@0,400..700;1,400..700&display=swap');

/* colors */
:root {
  --bg-color: #EBE4D5;
  --night-color: #141415;
  --violet-color: #8A6A87;
  --blue-color: #55828B;
  --goldenrod-color: #B27D2E;
}


.container {
    grid-template-columns: 1fr;
    grid-template-areas: 
    "header" 
    "navvy";
}

header {
    text-align: center;
}

nav {
    grid-area: "navvy";
    text-align: center;
}

/* high level styling */
body {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2em;
    padding-right: 2em;

    background-color: var(--bg-color);

    font-family: "Figtree", sans-serif;
    font-optical-sizing: auto;
    font-weight: 400;
    font-style: normal;
    color: var(--night-color);
}

h1 {
    font-family: "Instrument Serif", serif;
    font-weight: 400;
    font-style: normal;
}

nav ul {
    display: flex;
    flex-flow: row nowrap;
    justify-content: center; 
    gap: 8px; 
    padding: 0; 
    margin: 0;  
    padding-bottom: 1em;
}

nav ul li {
    list-style: none;
    margin: 0;
}

nav a {
    display: inline-block;
    padding: 6px 10px; 
    text-decoration: none;
    color: inherit;
}

nav a:hover {
    background-color: var(--goldenrod-color);
    color: white;
    border-radius: 4px;
}

/* Responsive navbar + hamburger */
.nav-toggle {
  display: none; /* shown at narrow widths */
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
}
.nav-toggle:focus { 
  outline: 2px solid var(--blue-color); 
  border-radius: 6px; 
}
.hamburger {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--night-color);
  position: relative;
}
.hamburger::before,
.hamburger::after {
  content: '';
  position: absolute;
  left: 0;
  width: 22px;
  height: 2px;
  background: var(--night-color);
}
.hamburger::before { top: -7px; }
.hamburger::after { top: 7px; }

/* mobile layout for nav */
@media (max-width: 880px) {
  /* place header and hamburger on one line */
  header { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    gap: 12px; 
    margin-top: 2em;
    margin-bottom: 1em;
    margin-left: 1em;
    margin-right: 1em;
  }
  header h1 { margin: 0; font-size: 1.25rem; }

  nav { position: relative; }
  .nav-toggle { display: inline-flex; align-items: center; gap: 8px; }

  /* hide the desktop UL; the .nav-menu will be toggled */
  #nav-menu { display: none; position: absolute; left: 0; right: 0; background: var(--bg-color); box-shadow: 0 6px 18px rgba(12,17,20,0.06); border-radius: 6px; padding: 0.75rem 0; z-index: 30; }
  #nav-menu.open { display: block; }

  /* stack items vertically on mobile */
  #nav-menu ul { display: flex; flex-direction: column; gap: 0.25rem; padding: 0.5rem 1rem; margin: 0; align-items: center; }
  #nav-menu li { width: 100%; }
  #nav-menu a { display: block; width: 100%; padding: 8px 12px; text-align: center; }
}

.left {
    background-color: white;
    width: auto;
    grid-area: lefty;
}

.center {
    background-color: black;
    width: auto;
    grid-area: centy;
}

.right {
    background-color: white;
    width: auto;
    grid-area: righty;
}

/* Featured article cards (responsive) */

.articles {
  display: grid;
  grid-template-columns: 1fr 2fr 1fr;
  grid-template-areas: "lefty centy righty";
  gap: 1rem;
  align-items: start;
}

/* allow columns to size by content and remove fixed heights */
.left, .center, .right {
  background: transparent; /* let cards define background */
  height: auto;            /* override previous fixed heights */
  padding: 0;
}

/* card styling */
.article-card {
  /* background: #ffffff; */
  /* border-radius: 10px; */
  padding: 1rem;
  /* box-shadow: 0 6px 18px rgba(12,17,20,0.06); */
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* image styling: responsive and keeps aspect ratio */
.article-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 16 / 9; /* keeps a uniform thumbnail height */
  background-color: #f6f6f6; /* shows while image loads */
}

.ad-img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  object-fit: cover;
  aspect-ratio: 10 / 9; 
  background-color: #f6f6f6; 
}

/* text */
.article-card h3 {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.2;
  font-weight: 600;
}

.article-excerpt {
  margin: 0;
  color: #333;
  font-size: 0.95rem;
}

/* read more link */
.read-more {
  margin-top: auto; /* push link to bottom of card */
  align-self: flex-start;
  text-decoration: none;
  color: var(--blue-color);
  font-weight: 600;
}

.read-more:hover {
    text-decoration: underline;
    color: var(--goldenrod-color);
}

/* Responsive: stack columns on small screens */
@media (max-width: 880px) {
  .articles {
    grid-template-columns: 1fr; /* stack */
    grid-template-areas:
      "centy"
      "lefty"
      "righty";
  }
  .article-card.featured { transform: none; }
}

#destination-list {
  list-style: none;    
  padding: 0;            
  margin: 1.0rem auto;   
  display: flex;
  flex-direction: column; 
  align-items: center;    
  gap: 0.5rem;           
  text-align: center;     
  max-width: 100%;       
}

#destination-list li {
  margin: 0;
  padding: 0;
  width: auto;        
}

#destination-list a {
  text-decoration: none; 
  color: inherit;
}

#destination-list a:hover {
  text-decoration: underline;
  color: var(--goldenrod-color)
}

footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 4em;
    padding-bottom: 2em;
}