/* Custom CSS overrides for Foodica on Hugo */

/* --- Cheesewiddler font (from foodica-child) --- */
@font-face {
    font-family: 'Cheesewiddler';
    src: url('/fonts/Cheesewiddler.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

.navbar-brand-wpz .tagline {
    font-family: 'Cheesewiddler', cursive;
    font-size: 50px;
    letter-spacing: 2px;
    color: #363940;
    margin: 0;
    line-height: 1.2;
}

/* --- Logo --- */
.site-logo {
  display: block;
  max-height: 48px;
  width: auto;
  max-width: 200px;
}

.navbar-brand-wpz {
  display: inline-block;
  vertical-align: middle;
}

.site-title-text {
  font-family: 'Playfair Display', 'Georgia', serif;
  font-size: 28px;
  font-weight: 400;
  color: #363940;
}

/* ============================================================
   NAVBAR — single-line flex layout
   ============================================================ */

/* Kill foodica's 40px bottom gap and over-tall min-height */
.main-navbar {
  margin-bottom: 0 !important;
  min-height: unset !important;
  padding: 0 !important;
}

.main-navbar .inner-wrap {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;       /* everything stays on one line */
  gap: 0 8px;
  padding-top: 8px;
  padding-bottom: 8px;
}

/* Brand: logo + text, shrinks gracefully */
.navbar-brand-wpz {
  flex: 0 1 auto;
  min-width: 0;
  margin-right: 8px;
}

.custom-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  overflow: hidden;
}

.custom-logo-link:hover { text-decoration: none; }

/* --- Logo --- */
.site-logo {
  display: block;
  max-height: 32px;
  width: auto;
  max-width: 120px;
  flex-shrink: 0;
}

/* --- Brand text — Cheesewiddler, fluid size --- */
.brand-text {
  font-family: 'Cheesewiddler', cursive;
  font-size: clamp(18px, 2.2vw, 30px);
  font-weight: normal;
  color: #363940;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.custom-logo-link:hover .brand-text { color: #818592; }

/* Desktop nav: takes remaining space, right-aligned */
#navbar-main.navbar-main-desktop {
  flex: 1 1 auto;
  min-width: 0;
  overflow: visible;
}

/* Convert foodica float-based sf-menu to flex */
ul#menu-main.navbar-wpz {
  display: flex !important;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  list-style: none;
  margin: 0;
  padding: 0;
}

ul#menu-main.navbar-wpz > li {
  float: none !important;   /* kill foodica float */
  flex: 0 0 auto;
  padding: 0 !important;
}

/* Tighter link padding + smaller font to fit 9 items */
ul#menu-main.navbar-wpz > li > a {
  padding: 8px 9px !important;
  font-size: 13px !important;
  font-family: 'Roboto Condensed', sans-serif;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  color: #363940;
  white-space: nowrap;
}

ul#menu-main.navbar-wpz > li > a:hover,
ul#menu-main.navbar-wpz > li.current-menu-item > a {
  color: #818592;
}

/* Keep dropdown UL positioned correctly */
ul#menu-main.navbar-wpz > li {
  position: relative;
}

/* Search: compact, no grow */
#sb-search {
  flex: 0 0 auto;
}

.sb-search-input {
  padding: 5px 8px;
  border: 1px solid #e2e2e2;
  border-radius: 2px;
  font-size: 13px;
  width: 120px;
}

.sb-search-submit {
  background: #363940;
  color: #fff;
  border: none;
  padding: 5px 8px;
  cursor: pointer;
  border-radius: 2px;
  font-size: 13px;
}

.sb-search-submit:hover { background: #818592; }

/* Hamburger (mobile only — still hidden on desktop) */
.mobile-menu-toggle {
  flex: 0 0 auto;
  margin-left: auto;
}

/* Mobile nav drops full-width below the bar */
#mobile-nav {
  flex: 0 0 100%;
}

/* --- Search --- */
#sb-search {
  flex: 0 0 auto;
}

.sb-search-input {
  padding: 6px 10px;
  border: 1px solid #e2e2e2;
  border-radius: 2px;
  font-size: 14px;
  width: 160px;
}

.sb-search-submit {
  background: #363940;
  color: #fff;
  border: none;
  padding: 6px 10px;
  cursor: pointer;
  border-radius: 2px;
  font-size: 14px;
}

.sb-search-submit:hover {
  background: #818592;
}

/* --- Sidebar widgets --- */
.widget .title {
  font-family: 'Roboto Condensed', sans-serif;
  font-size: 18px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #363940;
  margin-bottom: 20px;
  padding: 10px 0;
  text-align: center;
}

/* --- Tag cloud --- */
.tagcloud a {
  display: inline-block;
  padding: 4px 12px;
  margin: 2px;
  background-color: #EFF4F7;
  color: #363940;
  border-radius: 3px;
  font-size: 13px;
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.tagcloud a:hover {
  background-color: #363940;
  color: #fff;
  text-decoration: none;
}

/* --- Recipe shortcodes --- */
.shortcode-ingredients > h3,
.shortcode-directions > h3 {
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
  font-size: 20px;
  font-weight: 700;
}

.shortcode-ingredients {
  background-color: #FBF9E7;
  color: #736458;
  border-radius: 3px;
  padding: 30px;
  margin: 30px 0;
}

.shortcode-ingredients ul {
  list-style: none;
  margin: 0;
}

.shortcode-ingredients li {
  padding: 8px 0;
  border-bottom: 1px solid #e9e5c9;
  cursor: pointer;
}

.shortcode-ingredients li:last-child {
  border-bottom: none;
}

.shortcode-ingredients li:hover {
  text-decoration: line-through;
}

.shortcode-directions {
  margin: 40px 0;
}

.shortcode-directions ol {
  list-style: none;
  counter-reset: count;
  margin: 0;
  padding: 0;
}

.shortcode-directions li {
  position: relative;
  line-height: 1.8;
  min-height: 44px;
  padding-left: 40px;
  margin: 0 0 30px;
}

.shortcode-directions li:before {
  counter-increment: count;
  content: counter(count);
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  font-size: 24px;
  font-weight: 700;
  font-family: 'Roboto Condensed', sans-serif;
  text-transform: uppercase;
  line-height: 1.4;
  width: 35px;
  text-align: center;
  border-radius: 50%;
}

/* --- Author bio --- */
.post_author {
  padding: 40px 0;
  border-top: 2px solid #eeeeee;
  overflow: hidden;
}

.author-description img {
  float: left;
  margin-right: 25px;
  border-radius: 50%;
}

.author-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0 10px 14px 0;
  display: inline-block;
}

/* --- Comments --- */
#comments h3 {
  margin-top: 80px;
  font-size: 26px;
  padding-bottom: 32px;
  margin-bottom: 40px;
  border-bottom: 1px solid #EEEEEE;
  font-weight: 700;
  text-transform: uppercase;
  text-align: center;
  font-family: 'Roboto Condensed', sans-serif;
}

.commentlist {
  list-style: none;
  padding: 0;
}

.comment .avatar {
  float: left;
  border-radius: 50%;
  margin-right: 28px;
}

.comment-meta {
  font-size: 14px;
  margin-top: 5px;
  font-style: italic;
  color: #a2a2a2;
}

.comment-meta a:hover {
  color: #333;
}

/* ============================================================
   HAMBURGER / MOBILE NAV
   ============================================================ */

/* Hide mobile toggle on desktop */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px 8px;
    float: right;
    margin-top: 10px;
}

.hamburger-bar {
    display: block;
    width: 26px;
    height: 3px;
    background: #363940;
    margin: 5px 0;
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.25s;
}

/* Animated X when open */
.mobile-menu-toggle.is-open .hamburger-bar:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.mobile-menu-toggle.is-open .hamburger-bar:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.is-open .hamburger-bar:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* Mobile nav hidden by default */
.mobile-nav {
    display: none;
    width: 100%;
    background: #fff;
    border-top: 1px solid #F0F0F0;
}

.mobile-nav.is-open {
    display: block;
}

.mobile-menu-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-list li {
    border-bottom: 1px solid #F0F0F0;
}

.mobile-menu-list li a {
    display: block;
    padding: 14px 20px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 16px;
    text-transform: uppercase;
    color: #363940;
    letter-spacing: 0.5px;
}

.mobile-menu-list li a:hover,
.mobile-menu-list li.current-menu-item a {
    color: #818592;
    background: #f5f5f5;
}

/* ============================================================
   RESPONSIVE LAYOUT
   ============================================================ */

/* Inner wrap padding on small screens */
@media screen and (max-width: 1200px) {
    .inner-wrap {
        padding-left: 16px;
        padding-right: 16px;
    }
}

/* Tablet + mobile: show hamburger, hide desktop nav */
@media screen and (max-width: 979px) {
    .mobile-menu-toggle {
        display: block;
    }

    #navbar-main,
    .navbar-main-desktop {
        display: none;
    }

    /* Stack main-navbar content — re-allow wrap on mobile */
    .main-navbar .inner-wrap {
        flex-wrap: wrap;
        min-height: 48px;
        padding-top: 6px;
        padding-bottom: 6px;
    }

    /* Hide search on mobile — saves space */
    #sb-search {
        display: none;
    }

    /* Content + sidebar stack */
    .content-area {
        width: 100% !important;
        float: none !important;
    }

    #sidebar {
        float: none !important;
        width: 100% !important;
        margin: 40px 0 0 !important;
    }

    /* Inner wrap uses flex for sidebar layout */
    .inner-wrap.layout-wrap {
        display: block;
    }

    /* Post grid: 2 columns on tablet */
    .recent-posts .post {
        width: 48%;
        margin-right: 4%;
    }

    .recent-posts .post:nth-child(2n) {
        margin-right: 0;
    }

    /* Top nav bar: center social icons */
    .header_social {
        text-align: center;
        float: none;
    }

    /* Hide top nav links on mobile */
    #navbar-top {
        display: none;
    }

    /* Brand smaller on mobile */
    .navbar-brand-wpz a img {
        max-width: 200px;
    }

    .navbar-brand-wpz h1 {
        font-size: 22px !important;
    }

    .navbar-brand-wpz .tagline {
        font-size: 32px !important;
    }
}

/* Small mobile: single column posts */
@media screen and (max-width: 640px) {
    .recent-posts .post {
        width: 100% !important;
        margin-right: 0 !important;
    }

    .post-thumb img {
        width: 100%;
        height: auto;
    }

    h1.entry-title {
        font-size: 26px !important;
    }

    .navbar-brand-wpz .tagline {
        font-size: 24px !important;
        letter-spacing: 1px;
    }

    /* Full-width images in post content */
    .entry-content img {
        max-width: 100%;
        height: auto;
    }

    /* Share buttons stack */
    .share a {
        display: block;
        max-width: 180px;
        margin: 0 auto 10px;
        text-align: center;
    }
}
/* ============================================================
   TAXONOMY PAGE (categories / tags index)
   ============================================================ */
.category-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 30px 0;
}

.category-item {
    flex: 0 0 auto;
}

.category-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    background: #EFF4F7;
    border: 1px solid #e2e2e2;
    border-radius: 3px;
    font-family: 'Roboto Condensed', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #363940;
    transition: background 0.2s, color 0.2s;
}

.category-link:hover {
    background: #363940;
    color: #fff;
    border-color: #363940;
    text-decoration: none;
}

.category-count {
    font-size: 12px;
    font-weight: 400;
    opacity: 0.7;
}
