/* RESET */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  overflow-x: hidden;
  scroll-behavior: smooth;
}

/* Remove all bullets */
ul, li {
  list-style: none;
}

/* BODY */
body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f9f9f9;
  color: #333;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* HEADER */
header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #222;
  color: white;
  border-bottom: 3px solid #ffcc00;
  width: 100%;
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

/* LOGO + TITLE */
.logo-section {
  display: flex;
  align-items: center;
  transform: scale(1.25);
  transform-origin: left center;
}

.logo-section img {
  width: 80px;
  height: 80px;
  object-fit: contain;
  margin-right: 15px;
  transition: transform 0.3s ease, filter 0.3s ease;
  cursor: pointer;
}

.logo-section img:hover {
  transform: scale(1.15) rotate(3deg);
  filter: brightness(1.2);
}

h1 {
  font-size: 1.75rem;
  font-weight: 600;
}

/* NAVIGATION (desktop baseline) */
nav {
  margin-top: 10px;
}

.nav-links {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
}

.nav-links > li {
  position: relative;
}

.nav-links li a {
  color: white;
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: #ffcc00;
}

/* Dropdown base (desktop) */
.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  background-color: #333;
  padding: 10px 0;
  border: 1px solid #444;
  border-radius: 4px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.2);
  z-index: 999;
}

.dropdown-menu li a {
  display: block;
  padding: 8px 15px;
  color: white;
  font-size: 0.95rem;
  transition: background-color 0.3s ease;
}

.dropdown-menu li a:hover {
  background-color: #ffcc00;
  color: #222;
}

/* Show dropdown on hover (desktop) */
.dropdown:hover .dropdown-menu {
  display: block;
}

/* Hide submenu toggle button on desktop */
.submenu-toggle {
  display: none;
}

/* HAMBURGER BUTTON (will show only on mobile) */
.menu-toggle {
  display: none;
}

/* ------------------- */
/* TABLET FIX (Desktop behavior preserved) */
/* 769px – 1024px */
/* ------------------- */
@media (min-width: 769px) and (max-width: 1024px) {
  
  /* Reduce gaps so menu fits in one line */
  .nav-links {
    gap: 12px;
  }

  /* Slightly adjust logo + title to prevent wrapping */
  .logo-section img {
    width: 70px;
    height: 70px;
    margin-right: 10px;
  }

  header h1 {
    font-size: 1.55rem;
  }

  .header-inner {
    padding: 10px 16px;
  }
}


/* ------------------------------- */
/* MOBILE STYLES */
/* ------------------------------- */
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
    background-color: #ffcc00;   /* GOLD BACKGROUND */
    border: 2px solid #ffcc00;   /* MATCH BORDER COLOR */
    border: none;
    border-radius: 6px;
    cursor: pointer;
    padding: 5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    margin-top: 8px;
    align-self: flex-end; /* pushes it to the right */
    margin-right: 15px;
    margin-left: auto;    /* ensures it stays right-aligned */
  }

  .menu-toggle img {
    width: 22px;
    height: 22px;
    filter: brightness(0.2); /* makes the icon darker for contrast */
  }

  .header-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  nav {
    width: 100%;
    background-color: #333;
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s ease;
  }

  nav.open {
    max-height: 1000px;
  }

  .nav-links {
    flex-direction: column;
    gap: 0;
    width: 100%;
  }

  /* divider between top-level items */
  .nav-links > li {
    width: 100%;
    border-bottom: 1px solid #444;
  }

  .nav-links > li:last-child {
    border-bottom: none;
  }

  /* TOP-LEVEL ITEMS: UNIFORM SPACING */

  /* plain top-level items (About Me, About My Site) */
  .nav-links > li > a {
    display: block;
    padding: 10px 15px;
    color: white;
  }

  /* dropdown parents (Family Recipes, My Hobbies) */
  .nav-link-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 15px;
  }

  .nav-link-wrapper > a {
    flex: 1;
    display: block;
    padding: 10px 0;    /* same vertical padding as above */
    color: white;
  }

  /* submenu toggle arrow (mobile only) */
  .submenu-toggle {
    display: flex;
    background-color: white;
    border: 2px solid #ccc;
    border-radius: 5px;
    padding: 4px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
  }

  .submenu-toggle img {
    width: 20px;
    height: 20px;
  }

  .dropdown.open .submenu-toggle img {
    transform: rotate(180deg);
  }

  /* MOBILE SUBMENU (animated height, no jump) */
  .dropdown-menu {
    position: static;          /* no absolute on mobile */
    border: none;
    box-shadow: none;
    padding: 0;                /* no padding when closed */
    border-left: 5px solid transparent;
    background-color: transparent;
    height: 0;
    overflow: hidden;
    transition: height 0.35s ease;
  }

  .dropdown.open .dropdown-menu {
    padding-top: 5px;
    padding-bottom: 5px;
    border-left-color: #ffcc00;
    background-color: #444;
  }

  /* submenu list items */
  .dropdown-menu li {
    border-bottom: 1px solid #444;
  }

  .dropdown-menu li:last-child {
    border-bottom: none;
  }

  .dropdown-menu li a {
    display: block;
    color: white;
    padding: 8px 15px 8px 40px;
    background-color: rgba(255,255,255,0.05);
    transition: background-color 0.3s ease, color 0.3s ease;
  }

  .dropdown-menu li a:hover {
    background-color: #555;
    color: #ffcc00;
  }
}

/* ------------------------------- */
/* MAIN CONTENT */
/* ------------------------------- */
main {
  flex: 1;
  padding: 30px 20px;
  max-width: 900px;
  margin: 0 auto;
}

main section {
  margin-bottom: 50px;
}

main h2 {
  color: #222;
  margin-bottom: 10px;
}

/* ------------------------------- */
/* FOOTER */
/* ------------------------------- */
footer {
  background-color: #222;
  padding: 30px 20px;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  border-top: 3px solid #ffcc00;
}

.footer-contact-box {
  background-color: #f2f2f2;
  border: 2px solid #ffcc00;
  border-radius: 8px;
  padding: 12px 16px;
  max-width: 800px;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  justify-content: center;
  color: #222;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.footer-image img {
  width: 70px;
  border-radius: 5px;
}

.footer-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-text p {
  margin: 0 0 4px;
  font-size: 0.95rem;
}

.footer-text .contact-title {
  font-size: 1.1rem;
  font-weight: 600;
}

.footer-contact-link {
  font-size: 1.05rem;
  font-weight: 600;
  color: #222;
  background-color: #ffcc00;
  text-decoration: none;
  padding: 6px 12px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
}

.footer-contact-link:hover {
  background-color: #ffed99;
}

.footer-copyright {
  font-size: 0.9rem;
  opacity: 0.8;
}

/* VERY SMALL SCREENS = 500px */
@media (max-width: 500px) {
  .header-inner { padding: 12px 8px; }
  .logo-section { transform: scale(1.1); }

  .menu-toggle img { width: 22px; height: 22px; }

  .footer-contact-box {
    flex-direction: column;
    text-align: center;
    padding: 10px;
    gap: 10px;
  }

  .footer-text {
    align-items: center;
  }

  .footer-image img {
    width: 60px;
  }
}

/* RECIPE GRID LAYOUT */
.recipe-list {
  max-width: 1100px;
  margin: 40px auto;
  padding: 0 20px;
}

.recipe-list h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
  color: #333;
}

.recipe-intro {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 25px;
  font-size: 1.05rem;
  color: #555;
}

.recipe-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
}

/* GLOBAL CARD BASE */
.recipe-card {
  background: #fff;
  border: 2px solid #ffcc00;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.recipe-card:hover {
  transform: scale(1.02);
}

/* Recipe info */
.recipe-info {
  padding: 15px;
}

.recipe-info h3 a {
  color: #222;
  text-decoration: none;
  font-size: 1.2rem;
}

.recipe-info h3 a:hover {
  text-decoration: underline;
}

.recipe-info p {
  margin-top: 8px;
  color: #555;
}

/* -------------------------------------------- */
/* HORIZONTAL CARD LAYOUT                       */
/* -------------------------------------------- */

.recipe-card.horizontal {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 15px;
  padding: 15px;
}

/* USE ONLY THE SMALL IMAGE (300px) EVERYWHERE */
.recipe-card.horizontal img {
  width: 120px;     /* desktop thumbnail */
  height: auto;
  object-fit: contain;
  flex-shrink: 0;
}

/* -------------------------------------------- */
/* VERTICAL CARDS (future use, optional)        */
/* -------------------------------------------- */

.recipe-card:not(.horizontal) img {
  width: 100%;
  height: 250px;
  object-fit: contain;
  background-color: #fff;
}

/* -------------------------------------------- */
/* MOBILE BEHAVIOR                              */
/* -------------------------------------------- */

@media (max-width: 500px) {

  .recipe-card.horizontal {
    flex-direction: column;
    text-align: center;
  }

  .recipe-card.horizontal img {
    width: 100px;     /* mobile thumbnail */
    max-width: 100px;
    height: auto;
  }
}

/**********************************************/
/* PANCAKE RECIPE PAGE STYLES                 */
/**********************************************/

.recipe-page {
  max-width: 900px;
  margin: 0 auto;
  padding: 20px;
}

.recipe-header {
  text-align: center;
  margin-bottom: 25px;
}

.recipe-header h1 {
  font-size: 2rem;
  color: #222;
  margin-bottom: 10px;
}

.recipe-summary {
  font-size: 1.1rem;
  color: #444;
  line-height: 1.6;
  text-align: center;
  margin-bottom: 25px;
}

/* PDF Download Button */
.download-btn {
  display: inline-block;
  background-color: #ffcc00;
  color: #222;
  padding: 10px 18px;
  font-weight: 600;
  border-radius: 6px;
  text-decoration: none;
  margin: 15px 0 30px;
  transition: background-color 0.3s ease;
}

.download-btn:hover {
  background-color: #ffe680;
}

/* Two-column layout */
.ingredients-layout {
  display: flex;
  gap: 25px;
  align-items: flex-start;
  margin-top: 10px;
  margin-bottom: 20px;
}

.ingredients-content {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.ingredients-list {
  flex: 1;
}

.ingredients-image img {
  width: 220px;
  height: auto;
  border-radius: 10px;
  border: 2px solid #ffcc00;
  background-color: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

/* MOBILE — IMAGE - TITLE - LIST */
@media (max-width: 768px) {

  .ingredients-layout {
    flex-direction: column;
    align-items: center;
  }

  .ingredients-image {
    order: 1;
    width: 100%;
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
  }

  /* NEW: moves title + list as one block */
  .ingredients-content {
    order: 2;
    width: 100%;
  }

  .ingredients-title {
    text-align: left;
    margin-bottom: 12px;
    padding-left: 20px; /* optional */
  }

  .ingredients-list {
    padding-left: 20px; /* optional */
  }

  .ingredients-image img {
    width: 70%;
    max-width: 260px;
  }
}



/* Tips Box */
.tips-box {
  background: #fff8d1;
  border-left: 5px solid #ffcc00;
  padding: 15px;
  border-radius: 6px;
  margin-top: 25px;
}

.tips-box h3 {
  margin-top: 0;
}
