/* custom css properties */
:root{
  --orange: #E09041;
  --coral:#E05841;
  --turq: #42E0D0;
  --forrest:#4D615F;
  --brown:#61574D;
  --taupe: #E3D0C0;
  --background:#EAE4DF;
  --text:#FFF;
}

html {
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit;
}

/* FIX: Consolidated single body rule — removed duplicate, reduced padding for mobile */
body {
  font-family: "navigo", sans-serif;
  font-weight: 400;
  font-style: normal;
  background: var(--taupe);
  color: #222;
  margin: 0;
  padding: 15px;
}

.container{
  width: 100%;       
  max-width: 500px;  
  margin: 0 auto;
  background-color: var(--background);
  padding: 0 10px; /* FIX: prevents content touching screen edges on mobile */
}

p{
  font-family: "navigo", sans-serif;
  font-weight: 400;
  font-style: normal;
}

ul{
  font-family: "navigo", sans-serif;
  font-weight: 200;
  font-style: normal;
}

h1,h2,h3,h4{
  font-family: "gin", serif;
  font-weight: 400;
  font-style: normal;
}

/* -------------------------------------------------------------Index and About CSS----------------------------------------------------------- */

#title {
  display: grid;
  grid-template-columns: 120px auto;
  grid-template-rows: 100px auto; 
  grid-template-areas:
  "img nav"
  "heading heading";
}

#home #title{
  background-image: url(https://kacolter.github.io/buffalo-river/assets/img/homeback480px.webp);
  background-repeat: no-repeat;
  max-width: 500px;
  height: 450px;
}

#title img{
  grid-area: img;
  max-width:100%;
}

#home #navbar{
  grid-area: nav;
  display:block;
}

#home .title-content{
  grid-area: heading;
}

#home .title-content {
  text-align:center;
  margin-top: 75px;
  color: var(--text);
  padding:10px;  
}

#mission{
  padding: 25px;
  margin: 25px 10px 10px 10px;
  text-align: center;
}

#story{
  padding: 25px;
  margin: 10px;
  text-align: center;
}

#commitment{
  padding: 25px;
  margin: 10px;
  text-align: center;
}

#why{
  padding: 25px;
  margin: 10px 10px 25px 10px;
  text-align: center;
}

#home h2{
  color:var(--coral);
}

#home #commitment h2{
  margin-bottom: 35px;
}

footer #copy{
  text-align: center;
}

footer ul{
  text-align: center;
  margin-right: 50px;
}

/* -------------------------------------------------------------Index and About CSS End----------------------------------------------- */

/* -------------------------------------------Nav CSS----------------------------------------------- */

/* FIX: Added flex-wrap so nav doesn't overflow on narrow screens */
.nav-links {
  margin-top:25px;
  padding:0;
  display: flex;
  flex-wrap: wrap;
  gap:10px;
  list-style: none;
  justify-content:flex-end; 
}

.nav-links li {
  position: relative;
}

.nav-links a {
  display: block;
  padding: 15px;
  color: white;
  text-decoration: none;
}

.nav-links a:hover {
  background-color: var(--forrest);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: var(--brown);
  min-width: 160px;
  list-style: none;
  padding:0;
  z-index: 1;
}

.dropdown-menu li {
  width: 100%;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

/* -------------------------------------------Nav CSS End----------------------------------------------- */

/* -------------------------------------------------------------Canoe CSS----------------------------------------------------------*/

#canoe .title-content{
  margin-top: 50px;
}

#canoe #title{
  background-image: url(https://kacolter.github.io/buffalo-river/assets/img/canoeback480px.webp);
  background-repeat: no-repeat;
  max-width: 500px;
  height: 450px;
}

#title img{
  grid-area: img;
}

#canoe #navbar{
  grid-area: nav;
}

#canoe .title-content{
  grid-area: heading;
}

#about-canoes{
  color:var(--text);
  text-align: center;
  padding:10px;
}

#about-canoes h2{
  margin-top: 50px;
}

.availability{
  width: 150px;
}

#about-canoes{
  background-image: url(https://kacolter.github.io/buffalo-river/assets/img/canoelake480px.webp);
  background-repeat: no-repeat;
  max-width: 500px;
  height: 400px;
}

#rentals{
  padding: 40px;
  margin: 20px;
}

#shuttle{
  padding: 20px;
  margin: 20px;
  text-align: center;
}

#shuttle h3{
  color:var(--orange);
}

table{
  width: 100%;       
  max-width: 100%;
  border-collapse: collapse;
}

#title, #about-canoes {
  background-size: cover;
  background-position: center;
  width: 100%;
}

tr:nth-child(even){ 
  background-color: var(--coral);
  color:var(--text);
}

tr:nth-child(odd){
  background-color: var(--background);
  color:var(--coral);
}

tr:hover{
  background-color: rgba(0, 0, 0, 0.3);
}

td:nth-child(n+2){
  text-align:right;
}

th{
  background-color:var(--coral);
  color:var(--text);
  padding:7.5px;
}

td, th{
  border:5px solid var(--background);
  padding:5px;
}

#rentals h2{
  color:var(--orange);
  text-align: center;
}

#rentals p{
  color:black;
  text-align: center;
}

#canoe #rentals table{
  margin-left: auto;
  margin-right: auto;
  margin-top: 30px;
}

#canoe #shuttle table{
  margin-left: auto;
  margin-right: auto;
}

#title li{
  list-style-type: none;
}

.title-content ul{
  padding: 20px;
}

.title-content a{
  text-decoration: none;
  color:var(--text);
}

.title-content a:hover{
  transition: color 0.7s ease;
  color:var(--turq);
}

#canoe .title-content {
  text-align: center;
  color: var(--text);
  padding:10px;  
}

/* -------------------------------------------------------------Canoe CSS End----------------------------------------------------------- */

/* -------------------------------------------------------------Cabin CSS----------------------------------------------------------- */

#cabin #title{
  background-image: url(../img/cabin.webp);
  background-repeat: no-repeat;
  max-width: 500px;
  height: 450px;
}

#cabin .title-content {
  text-align: center;
  color: var(--text);
  padding:10px;  
}

#title img{
  grid-area: img;
}

#cabin #navbar{
  grid-area: nav;
}

#cabin .title-content{
  grid-area: heading;
  margin: 0px;
}

#cabin-info{
  margin:20px;
  padding:10px;
}

#activities{
  margin:20px;
  padding:10px;
}

#search{
  margin:20px;
  padding:10px;
}

#amenities{
  margin:20px;
  padding:10px;
}

#reviews{
  margin:20px;
  padding:10px;
}

#cabin h2{
  color:var(--coral);
  text-align: center;
}

#cabin h3{
  color:var(--orange);
}

#cabin-info h3, h4{
  color:var(--orange);
}

#cabin .form-container h2{
  color:var(--text);
}

#cabin-imgs img{
  max-width:100%;
}

#activities ul, #search ul, #cabin-info ul, #amenities ul{
  list-style-type: square;
  padding: 10px;
}

#activities ul li, #search ul li, #cabin-info ul li, #amenities ul li{
  padding:5px;
}

#activities ul li::marker, #search ul li::marker, #cabin-info ul li::marker, #amenities ul li::marker{
  color:var(--coral);
}

#cabin-imgs{
  margin:15px;
  padding:20px;
}

blockquote{
  background-color: var(--background);
  border-left: 4px solid var(--coral);
  padding: 10px 20px;
  margin: 20px auto;
}

footer.reviews{
  padding:10px;
  text-align: right;
  font-style: italic;
  color: #000;
}

/* -------------------------------------------------------------Cabin CSS End----------------------------------------------------------- */

/* -------------------------------------------------------------Footer CSS----------------------------------------------------------- */

.footer{
  background-color: var(--forrest);
  color:var(--text);
  font-size: 0.8rem;
  padding: 10px 7px 10px 7px;
}

address{
  text-align: left;
}

.footer ul{
  display: flex;
  justify-content: center;
  gap: 10px;
  list-style-type: none;
}

.footer ul a{
  color:var(--text);
  text-decoration: none;
}

footer a:hover{
  transition: color 0.7s ease;
  color:var(--turq);
}

/* -------------------------------------------------------------Footer CSS End----------------------------------------------------------- */

/* ---------------------------------------------- River Levels CSS -----------------------------------------*/

#river #title{
  background-image: url(../img/river1200px.webp);
  background-repeat: no-repeat;
  max-width: 500px;
  height: 450px;
}

#river #cards, #river .chart-card{
  margin: 50px;
}

h1.river { 
  color: var(--forrest);
  margin: 28px 0 6px; 
  text-align:center;
}

h2.river {
  margin-top: 4px;
  font-size: 1.3rem;
  opacity: 0.8;
  color: var(--forrest);
}

.cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 20px 0;
}

@media (min-width: 480px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

.card {
  background: white;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-align: center;
  border-top: 5px solid var(--forrest);
  transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover, .card:focus {
  transform: translateY(-3px);
  box-shadow: 0 14px 32px rgba(0,0,0,0.15);
  outline: 2px solid var(--turq);
}

.card h3      { font-size: 1.1rem; margin-bottom: 6px; color: var(--forrest); }
.card .status { font-size: 0.8rem; font-weight: 600; margin: 4px 0; text-transform: uppercase; letter-spacing: 0.05em; }
.card .level  { font-family: "gin", serif; font-size: 1.4rem; color: var(--brown); margin: 0; }

.card.very-low  { border-top-color: #aaa; }
.card.low       { border-top-color: var(--turq); }
.card.moderate  { border-top-color: #4caf50; }
.card.high      { border-top-color: var(--orange); }
.card.flood     { border-top-color: var(--coral); }
.card.very-low  .status { color: #777; }
.card.low       .status { color: #00897b; }
.card.moderate  .status { color: #388e3c; }
.card.high      .status { color: var(--orange); }
.card.flood     .status { color: var(--coral); }

.chart-card {
  background: white;
  border-radius: 16px;
  padding: 20px 16px;
  margin: 24px 0 40px;
  box-shadow: var(--shadow);
}

.chart-container {
  position: relative;
  width: 100%;
  height: 300px;
}

#riverChart { width: 100% !important; height: 100% !important; }

/* ---------------------------------------------- River Levels CSS End -----------------------------------------*/

/* ---------------------------------------------- Map CSS ---------------------------------------------------*/

#map #title{
  background-image: url(../img/mapback428px.webp);
  background-repeat: no-repeat;
  max-width: 500px;
  height: 450px;
}

#map-canvas {
  width: 100%;
  height: 350px;
  margin: 24px auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: #d8d3cc;
  display: block;
}

.map-section { padding: 0 0 20px; }

h2.map {
  font-family: "gin", serif;
  color: var(--forrest);
  margin: 28px 0 0;
}

.map-link {
  text-align: center;
  margin: 12px 0 32px;
}

.map-link a {
  color: var(--forrest);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}

.map-link a:hover {
  color: var(--turq);
  border-bottom-color: var(--turq);
}

/* ---------------------------------------------- Map CSS End ---------------------------------------------------*/

/* ---------------------------------------------- Form CSS ---------------------------------------------------*/

/* FIX: width changed from 400px to 100% — prevents overflow on screens narrower than ~440px */
#canoe .form-container {
  max-width: 400px;
  width: 100%;
  margin: auto;
  color: #000;
  background: var(--turq);
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#cabin .form-container {
  max-width: 400px;
  width: 100%;
  margin: auto;
  color: #000;
  background: var(--coral);
  padding: 25px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

h2.form {
  margin-bottom: 20px;
  color: #000;
  text-align: center;
}

label {
  display: block;
  margin-top: 15px;
  font-weight: bold;
}

/* FIX: Added box-sizing: border-box so padding doesn't push fields beyond 100% width */
input, select, button {
  width: 100%;
  max-width: 100%;
  padding: 10px;
  margin-top: 5px;
  border-radius: 6px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

#cabin button {
  background-color: var(--brown);
  color: var(--text);
}

#cabin button:hover {
  background: var(--turq);
}

#cabin label {
  color: var(--text);
}

button {
  margin-top: 20px;
  background: var(--forrest);
  color: white;
  font-weight: bold;
  cursor: pointer;
}

button:hover {
  background: var(--coral);
}

#liveTotal {
  margin-top: 15px;
  font-size: 18px;
  font-weight: bold;
  color: #2e7d32;
}

#confirmationMessage {
  margin-top: 20px;
  padding: 12px;
  background: #e7fbe7;
  border: 1px solid #2e7d32;
  border-radius: 6px;
  display: none;
}

.flatpickr-day.available {
  background: #e7fbe7;
}

.flatpickr-day.unavailable {
  background: #ffdddd;
  color: #999;
}

/* ---------------------------------------------- Form CSS End ---------------------------------------------------*/

/* =========================================================
   RESPONSIVE MEDIA QUERIES
========================================================= */

/* =========================
   TABLET (768px+)
========================= */
@media screen and (min-width: 768px) {

  body {
    padding: 0;
  }

  .container {
    max-width: 900px;
    padding: 0; /* reset mobile padding at tablet+ */
  }

  /* Home */
  #home #title {
    background-image: url(https://kacolter.github.io/buffalo-river/assets/img/homeback1200px.webp);
    max-width: 100%;
  }

  #home #navbar {
    grid-area: nav;
    width: 100%;
  }

  #home .title-content {
    grid-area: heading;
  }

  #mission,
  #story,
  #commitment,
  #why {
    margin-left: 35px;
    margin-right: 35px;
  }

  /* Cabin */
  #cabin-imgs {
    display: flex;
    flex-direction: row;
  }

  #cabin #title {
    background-image: url(https://kacolter.github.io/buffalo-river/assets/img/cabin1200px.webp);
    max-width: 100%;
  }

  /* Canoe */
  #canoe #title {
    background-image: url(../img/canoeback1200px.webp);
    max-width: 100%;
  }

  #canoe #about-canoes {
    background: url(../img/canoelake2000px.webp) no-repeat center;
    max-width: 100%;
  }

  /* Footer */
  footer h5,
  address,
  #phone {
    margin: 35px;
  }

  /* Chart & Map */
  .chart-container {
    height: 380px;
  }

  #map-canvas {
    height: 450px;
  }
}

/* =========================
   DESKTOP (992px+)
========================= */
@media screen and (min-width: 992px) {

  .container {
    max-width: 2000px;
  }

  #river #title {
    max-width: 100%;
  }

  #map #title {
    background-image: url(../img/mapback1200px.webp);
    max-width: 100%;
  }

  #cabin #title {
    max-height: 100%;
  }
}

/* =========================
   LARGE DESKTOP (1024px+)
========================= */
@media screen and (min-width: 1024px) {

  .chart-container {
    height: 480px;
  }

  .chart-card {
    padding: 28px;
  }

  #map-canvas {
    height: 550px;
    max-width: 900px;
  }
}
