/* ===== MAIN LAYOUT ===== */
main {
  display: flex;
  flex-direction: column;
}

/* ===== INTRO SECTION ===== */
#intro {
  display: flex;
  max-height: 80vh;
  align-items: center;
  background-image: url(/assets/images/pizza_Banner.jpg);
  background-size: cover;
}

#overMarco {
  padding: 2rem;
  margin: auto auto 2rem 2rem;
}

#overMarco p {
  color: var(--color-light-bg);
  padding-bottom: 1rem;
  width: 25rem;
  word-wrap: normal;
}

/* ===== HIGHLIGHTS SECTION ===== */
.highlights:not(#topItems) {
  display: flex;
  flex-flow: column;
  padding-bottom: 2.5rem;
  margin: 0 auto 2.5rem;
}

.highlights h1 {
  width: fit-content;
  align-self: center;
  font-size: 5rem;
  text-align: center;
  margin: 1rem 0;
}

#topitems {
  display: flex;
  justify-content: center;
  gap: 2rem;
}

#topitems article {
  background-color: #F9F3E7;
  border-radius: var(--border-radius-large);
}

.topitem {
  height: auto;
  display: flex;
  justify-content: space-around;
  flex-flow: column;
  align-items: center;
}

.topitem img {
  margin: 1rem;
  max-width: 12rem;
  border-radius: 4%;
}

/* ===== BUTTON STYLES ===== */
.anchor,
.topitemButton {
  text-align: center;
  position: relative;
  background: var(--primary-color);
  color: var(--color-light-bg);
  border: none;
  padding: 0.5rem 0.75rem;
  border-radius: var(--border-radius-large);
  cursor: pointer;
  text-decoration: none;
  display: inline-block;
  font-size: large;
}

.topitemButton {
  width: 75%;
  margin: 0.75rem 0;
  padding: 0 auto;
  border-radius: 2rem;
  
}

/* ===== REVIEWS SECTION ===== */
#review {
  display: flex;
  flex-direction: column;
}

#review h1 {
  align-self: center;
  font-size: 5rem;
  margin-bottom: 1rem;
}

#reviewItems {
  display: flex;
  gap: 2rem;
  justify-content: space-around;
}

.reviewItem {
  background-color: #F9F3E7;
  border-radius: var(--border-radius-large);
}

.profilePic {
  border-radius: 60rem;
  height: 5rem;
}

.reviewItem h2 {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-right: 4rem;
}

.reviewItem p {
  max-width: 20rem;
  font-size: 1rem;
}

.reviewItem h2,
.reviewItem p {
  padding: 1rem 0.75rem;
}

/* ===== REVIEW BUTTONS ===== */
#seeAndAddReviews {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.review-buttons {
    display: flex;
    gap: 1rem;
}

.review-btn {
    width: 3rem;
    height: 3rem;
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.view-all-btn {
    background-color: var(--color-green-dark);
    color: var(--color-light-bg);
}

.review-btn:hover {
    transform: scale(1.1);
    background-color: var(--primary-color);
}

.add-btn {
    background-color: var(--primary-color);
    color: var(--color-light-bg);
}

/* Form styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: bold;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: var(--border-radius-large);
    font-size: 1rem;
}

.submit-btn {
    background-color: var(--primary-color);
    color: var(--color-light-bg);
    border: none;
    padding: 0.75rem 2rem;
    border-radius: var(--border-radius-large);
    cursor: pointer;
    font-size: 1rem;
}

.submit-btn:hover {
    background-color: var(--color-green-dark);
}

/* ===== POPUP STYLES ===== */
.popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.popup-content {
    background-color: var(--color-light-bg);
    margin: 5% auto;
    padding: 2rem;
    border-radius: var(--border-radius-large);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close-btn {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    cursor: pointer;
    color: var(--color-text);
}

.close-btn:hover {
    color: var(--primary-color);
}

/* ===== ABOUT US SECTION ===== */
.aboutUs {
  display: flex;
  flex-direction: column;
  align-self: center;
}

.aboutUs h1 {
  align-self: center;
  font-size: 5rem;
}

#verhaal {
  display: flex;
  gap: var(--spacing-medium);
}

#verhaal img {
  width: 20rem;
  margin: 0.625rem auto auto 0;
  border-radius: 2%;
}

#verhaal p {
  max-width: 45rem;
}

/* ===== COMMON SECTION STYLES ===== */
.highlights, .middensection,
.aboutUs,
#review {
  border-bottom: solid var(--color-green-dark) 0.125rem;
  padding-bottom: 4rem;
  margin: 0 auto 4rem;
  width: 70%;
}

/* ===== INTERACTIVE STATES ===== */
button:hover,
.topitemButton:hover,
.anchor:hover {
  background-color: var(--color-green-dark);
  transform: scale(1.05);
}

button:active,
.topitemButton:active,
.anchor:active {
  transform: scale(0.95);
}

/* ===== MEDIA QUERIES ===== */
@media screen and (max-width: 2400px) 
{
  #intro {
    height: 50rem;
  }
}
@media screen and (max-width: 1900px) 
{
  #intro {
    height: 40rem;
  }
}

@media screen and (max-width: 1278px) {
  #reviewItems {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  gap: 1rem;
  padding: 1rem;
  scroll-behavior: smooth;
  }
  .reviewItem {
  flex: 0 0 90%; /* 80% van containerbreedte */
  scroll-snap-align: center;
  }
  #reviewItems::-webkit-scrollbar {
  display: none;
  }
  .reviewItem p {
    font-size: 1rem;
    max-width: fit-content;
  }
  #intro {
    height: 30rem;
  }
}

@media screen and (max-width: 1100px) {
  
  .reviewItem{
    padding-left: 3rem;
    padding-right: 3rem;
  }
  
  #overMarco {
    padding: 0.5rem;
    margin: auto auto 1rem 1rem;
  }
  
  #overMarco p {
    padding-bottom: 0.5rem;
    width: 20rem;
  }
  
  .aboutUs img {
    display: none;
  }
  
  .aboutUs p {
    font-size: 1rem;
    padding: 0 0.9375rem;
  }
}

@media (max-width: 768px) {
  /* Algemene full-width stijl voor alle secties */
  .highlights,
  #review,
  .aboutUs {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
    margin-left: 0;
    margin-right: 0;
  }

  .reviewItem h2 {
    margin-right: 0;
  }

  /* Algemene stijl voor alle titels */
  .highlights h1,
  #review h1,
  .aboutUs h1 {
    width: 100%;
    padding: 0 0.5rem;
  }

  /* Algemene stijl voor alle containers */
  #verhaal {
    width: 100%;
    padding: 0;
    margin: 0;
    gap: 1rem;
  }
  /* ===== POPULAIRE PIZZA’S: CAROUSEL OP MOBIEL ===== */
  #topitems {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    justify-content: flex-start;
    gap: 0;
    padding: 1rem;
  }
  
  #topitems article {
    flex: 0 0 70%;
    scroll-snap-align: center;
    margin: 0 0.5rem; 
  }
  
  #topitems::-webkit-scrollbar {
    display: none;
  }
  .topitemButton {
    width: 75%;
    max-width: 200px; 
  }
  #seeAndAddReviews {
      flex-direction: column;
      gap: 1rem;
  }
    
  .popup-content {
      margin: 10% auto;
      width: 95%;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  .reviewItem {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  #topitems {
    padding-left: 1rem;
    padding-right: 1rem;
    gap: 0.8rem;
    overflow-x: auto;
  }
}