/*
Theme Name: Slow Cooker Central
Theme URI: https://slowcookercentral.com
Author: Derek Robertson
Author URI: https://pixelforge.au
Description: Custom WordPress theme for Slow Cooker Central
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: slowcooker
*/

:root {
  --primary-color: #7fa13c;
  --primary-green: #7fa13c;
  --primary-blue: #00b4e5;
  --secondary-color: #9cb95f;
  --tertiary-color: #afd274;
  --text-color: #3a3a3a;
  --background-color: #f9f9f9;
  --border-radius: 8px;
  --spacing: 1.5rem;
  --line-height: 1.5em;
  --primary-font: roboto, sans-serif; 
  --secondary-font: Lato;
  --block-width: 800px;
  --wide-block-width: 1200px;
}

html {
  width: 100%;
}

h1,h2,h3,h4,h5 {
  color: var(--primary-color);
  font-weight: normal;
}


body {
  font-family: var(--secondary-font);
  color: var(--text-color);
  font-size: 1.2em;
  margin: 0;
  padding: 0;
  background-color: var(--background-color);
  width: 100%;
  overflow-x: hidden;
}

main{
  padding: 0;
}

.main-content a {
  color: var(--primary-color);
}
.main-content a, .page-title {
  color: var(--secondary-color);
}

.main-content p{
  line-height: var(--line-height);
}

.site-header, h1, h2, h3 {
  font-family: var(--primary-font);
}

.type-post .entry-header, .blog-header {
  max-width: var(--wide-block-width);
  margin: auto;
}

/* Header */

.site-header {
  background: white;
}

.top-bar {
  background: white;
  padding: 10px 0;
  text-align: center;
  font-size: 16px;
  color: #444;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: var(--wide-block-width);
  margin: auto;
  padding: 0 15px;
}

.top-bar svg{ width: 25px; }

.logo { text-align: center;}

.social-icons { display: flex; }

.social-icons a {
  margin-left: 10px;
  text-decoration: none;
  font-size: 20px;
}

.main-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 15px;
  border-top: 1px solid #eee;
  max-width: 1200px;
  margin: auto;
}

.logo img {
  max-height: 147px;
  max-width: 90%;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 25px;
}
.cat-group{
  display: flex;
  flex-wrap: wrap;
  gap: 2px;            /* Spacing between items */
}
.cat-group a {
  flex: 1 1 auto;        /* Allow stretching/shrinking as needed */
  min-width: 100px;      /* Prevent extreme squishing */
  max-width: calc(100% - 2px); /* Prevent overflow */
  box-sizing: border-box;
}
.cat-link {
  background-color: var(--primary-green);
  color: #fff;
  padding: 0.5rem 1rem;
  border: none;
  font-size: 1rem;
  border-radius: 0.375rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.3s;
}
.cat-link:hover {
  background-color: var(--primary-green);
}

.nav-menu li a {
  text-decoration: none;
  color: rgb(10, 103, 164);
  font-weight: 500;
}

.btn-book {
  background: var(--primary-green);
  font-family: var(--secondary-font);
  color: #fff;
  padding: 10px 25px;
  font-weight: bold;
  text-decoration: none;
  display: inline-block;
  transition: background 0.3s ease;
}

.btn-book:hover {
  background: var(--secondary-color);
}

/* menu */

/* === Base Nav Styling === */
.main-nav {
  position: relative;
  margin: auto;
}

.main-nav .menu {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 0px;
}

.main-nav .menu li {
  position: relative;
  list-style: none;
}

.main-nav .menu li a {
  display: block;
  padding: 10px 15px;
  text-decoration: none;
  color: var(--primary-color);
  font-weight: 500;
}

/* === Dropdown Styling === */
.menu li.menu-item-has-children > a::after {
  content: ' ▼';
  font-size: 0.7em;
}

.menu .sub-menu {
  position: absolute;
  top: 100%;
  left: 0;
  display: none;
  flex-direction: column;
  background: #fff;
  min-width: 220px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  z-index: 1000;
  padding: 0;
}

.menu .sub-menu li {
  border-top: 1px solid var(--background-color);
}

.menu .sub-menu li a {
  padding: 10px 15px;
  color: var(--primary-color);
  white-space: nowrap;
}

.menu li.menu-item-has-children:hover > .sub-menu {
  display: flex;
}

/* === Toggle Button === */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 26px;
  padding: 10px;
  cursor: pointer;
}

/* === Responsive Styles === */
@media (max-width: 768px) {
  .menu-toggle {
    display:inline-block;
    background-color: var(--primary-green);
  }

  .menu-wrapper {
    display: none;
    flex-direction: column;
    background: #fff;
    width: 100%;
    position: absolute;
    top: 200px;
    left: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
    z-index: 999;
  }

  .menu-wrapper.open {
    display: flex;
  }
  .main-nav {
    position: static;
    min-width: 60px;
    text-align: center; 
    margin: auto;
  }

  .main-nav .menu {
    flex-direction: column;
    text-align: left; 
  }

  .main-nav .menu li {
    width: 100%;
  }

  .menu .sub-menu {
    position: relative;
    box-shadow: none;
  }

  .main-nav .menu li.menu-item-has-children {
    width: calc(100% - 50px);
  }
  .menu li.menu-item-has-children > a::after {
    content: ' ▶';
    float: right;
    position: relative;
    right: -50px;
  }

  .menu li.open > .sub-menu {
    display: flex;
  }
}


/* Footer */

#site-footer {
  background-color: var(--secondary-color);
  color: white;
  text-align: center;
  padding: 30px 15px;
}

#site-footer a {
  color: white;
}

.back-to-top {
float: right;
background-color: var(--primary-color); /* Bootstrap blue or customize */
color: white;
text-decoration: none;
padding: 10px 15px;
border-radius: 5px;
font-weight: bold;
font-size: 16px;
transition: background-color 0.3s ease;
}

.back-to-top:hover {
background-color: var(--primary-color);/* Darker blue on hover */
}

.clear-fix::after {
content: "";
display: table;
clear: both;
}

/* Blog index page */
/* Grid Container */
.grid-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
  padding: 2rem 0;
  margin: 30px;
}

/* Card Styles */
.post-card {
  background: #fff;
  box-shadow: 0 10px 20px rgba(0,0,0,0.1);
  overflow: hidden;
  perspective: 1000px;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  transform-style: preserve-3d;
}

.post-card:hover {
  transform: rotateY(5deg) scale(1.02);
  box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.card-link {
  text-decoration: none;
  color: inherit;
  display: block;
}

/* Image */

.post-thumbnail {
    height: 200px; /* or any consistent height you like */
    overflow: hidden;
    position: relative;
}

.post-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

/* Content */

.post-content {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.post-collection {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem;
}

.post-title {
  color: var(--primary-green);
  font-size: 1.5rem;
  margin: 0 0 0.5rem;
}

.page-title {
  font-family: var(--primary-font);
  font-size: 2.8rem;
  font-weight: normal;
}

.post-content {
  flex: 1;
  font-size: 1rem;
  color: #444;
  margin-bottom: 1rem;
}

.read-more {
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: underline;
  transition: color 0.3s ease;
}

.read-more:hover {
  color: var(--secondary-color);
}

/* Accordion */
.accordion {
  background-color: var(--primary-color);
  color: white;
  cursor: pointer;
  padding: 18px;
  width: 100%;
  text-align: left;
  border: none;
  outline: none;
  transition: 0.4s;
  font-size: 18px;
  margin-bottom: 5px;
  border-radius: 4px;
}

.accordion:hover,
.accordion:focus {
  background-color: var(--primary-green);
}

.active,
.accordion:focus {
  background-color: var(--primary-green);
}

.panel {
  padding: 0 18px;
  display: none;
  background-color: var(--background-color);
  overflow: hidden;
  margin-bottom: 10px;
  border-radius: 0 0 4px 4px;
}

.panel p {
  margin: 15px 0;
}

/* General archive */

.archive-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  padding: 2rem;
}
.archive-header {
  height: 300px;
  display: flex;
  align-items: center;       /* Vertical centering */
  justify-content: center;   /* Horizontal centering */
  text-align: center;
  flex-direction: column;    /* Stack content vertically (optional) */
}

/* Packages item */

.package-item {
  border: 1px solid #eee;
  padding: 1rem;
  margin-bottom: 2rem;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}
.package-item a{
  text-decoration: none;
}

.package-thumbnail {
  position: relative;
  height: 220px; /* Set to your desired fixed height */
  overflow: hidden;
}

.package-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Crop the image to fill the container */
  display: block;
}

.package-title {
  font-size: 1.75rem;
  margin-bottom: 0.5rem;
}
.package-title a {
  color: var(--primary-green);
}

.package-content {
  margin-top: 1rem;
}

.read-more {
  display: inline-block;
  margin-top: 1rem;
  color: var(--primary-color);
  font-weight: bold;
  text-decoration: none;
}
.read-more:hover {
  text-decoration: underline;
}


/* Header fade effect */
.fade-container {
  position: relative;
  height: calc( 100vh - 163px );
  width: 100%;
  display: flex;
  align-items: center;        /* Center content vertically */
  justify-content: center;    /* Center content horizontally */
  text-align: center;
  overflow: hidden;
  z-index: 0;
}
.fade-container.small{
  height: 300px;

}

.fade-container::before,
.fade-container::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  height: 100%;
  transform: translateY(-50%); /* Center background vertically */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  z-index: -2;
  opacity: 0;
  animation: fadeImages 10s infinite ease-in-out;
}

.fade-container::before {
  background-image: url('./assets/slowcooker-background.webp');
  animation-delay: 0s;
}

.fade-container::after {
  background-image: url('./assets/slowcooker-background.webp');
  animation-delay: 5s;
}

@keyframes fadeImages {
  0%, 45% { opacity: 0; }
  50%, 95% { opacity: 1; }
  100% { opacity: 0; }
}

/* Overlay between content and background */

.overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4); /* Semi-transparent black */
  z-index: -1;
}

.fade-content {
  position: relative;
  z-index: 1;
  max-width: 600px;
  padding: 2rem;
}
.fade-content * {
  color: white;
}

/* iframe element */

.iframe-wrapper {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 650px;
  overflow: hidden;
}

.iframe-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.iframe-wrapper::after {
  content: "";
  display: table;
  clear: both;
}
/* general formatting */
article.post{
  background-color: #fff;
}

/* custom post grid block */

.custom-post-grid .grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 2rem;
}

.editor-styles-wrapper .custom-post-grid {
  /* Your theme-specific styles that apply in editor only */
}

/* gutenberg integrations */
/* Ensure content wrapper is constrained */
.site-content, .entry-content {
  max-width: 800px;
  width: 800px;
  margin: 0 auto;
  padding: 1.5rem;
}

.entry-header{
  padding: 1.5rem;
}

@media (max-width: 900px) {
  .site-content, .entry-content {
    max-width: none;
    width: auto;
    
  }
}

.wp-block-columns {
  max-width: 800px;
  
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0 !important;
}

.wp-block-cover a{
  text-decoration: none;
}

.wp-block-media-text a{
  text-decoration: none;
  color: var(--primary-green);
  font-family: var(--primary-font);
  font-size: 1.2em;
}

/* Wide alignment — slightly wider than content */

.alignwide {
  max-width: var(--wide-block-width);
  margin-left: auto !important;
  margin-right: auto !important;
  display: block;
}

/* Full width block */

.alignfull {
  max-width: 100vw;
  width: 100vw;
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  box-sizing: border-box;
}

/* Gutenberg block spacing */
.wp-block {
  margin-bottom: 1.5rem;
} 

/* Pagination */

.cps-pagination {
  text-align: center;
}

/* custom post script */


.pagination {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin: 3rem 0;
  padding: 1rem;
  flex-wrap: wrap;
  position: relative;
  overflow: hidden;
}

.cps-page-link, .pagination .page-numbers{
  text-decoration: none;
  border-style: none;
  border-width: 0;
  background-clip: border-box;
  border-color: #cccccc;
  color: var(--primary-color);
  background-color: #fff;
  border-top-width: 1px;
  border-right-width: 1px;
  border-bottom-width: 1px;
  border-left-width: 1px;
  border-top-left-radius: 100px;
  border-top-right-radius: 100px;
  border-bottom-left-radius: 100px;
  border-bottom-right-radius: 100px;
  padding-top: 5px;
  padding-right: 10px;
  padding-bottom: 5px;
  padding-left: 10px;
  font-size: 14px;
  transition: all 0.3s ease, transform 0.2s;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
}

.pagination .page-numbers:hover {
  background: #fff;
  color: #0a0a0a;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 0 30px var(--primary-green);
}

.pagination .current, .cps-page-link.current {
  background: var(--primary-green);
  border-color: #fff;
  color: #fff;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.6), inset 0 0 10px rgba(255,255,255,0.3);
  animation: bounceHighlight 1.5s infinite ease-in-out;
}


/* Animation Definitions */
@keyframes bounceHighlight {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.15);
  }
}

/* single post */

.about-author {
  background: #f9f9f9;
  border-left: 4px solid var(--primary-green);
  padding: 1rem;
  margin-top: 2rem;
  border-radius: 6px;
}

.about-author h3 {
  margin-top: 0;
}

.comment-reply-title {
  margin-top: 2rem;
  font-size: 1.25rem;
  font-weight: bold;
}

/* Comment area container *//* Comment container */
.comments-area {
  max-width: 800px;
  margin: 4rem auto;
  font-family: system-ui, sans-serif;
}

/* Each comment wrapper */
.comment {
  display: flex;
  justify-content: center;
  margin-bottom: 3rem;
  position: relative;
}

/* Profile (avatar + name) container */
.comment-meta-wrap {
  position: absolute;
  top: 0;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: bold;
  font-size: 0.95rem;
  color: #333;
}

.comment .comment-author img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

/* Position avatar/name left or right */
.comment .comment-meta-wrap {
  left: -160px;
  flex-direction: row;
  text-align: left;
}

.children .comment:nth-child(odd) .comment-meta-wrap {
  left: -160px;
  flex-direction: row;
  text-align: left;
}

.children .comment:nth-child(even) .comment-meta-wrap {
  right: -60px;
  flex-direction: row-reverse;
  text-align: right;
}

/* Speech bubble body */
.comment-body {
  background: #f0f4ff;
  padding: 1rem 1.5rem;
  border-radius: 1.5rem;
  max-width: 400px;
  width: 400px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
  position: relative;
}

/* Speech bubble tail */
.comment-body::after {
  content: '';
  position: absolute;
  top: 1rem;
  width: 0;
  height: 0;
  border: 8px solid transparent;
}

.children .comment:nth-child(odd) .comment-body::after {
  left: -16px;
  border-right-color: #f0f4ff;
}

.children .comment:nth-child(even) .comment-body::after {
  right: -16px;
  border-left-color: #f0f4ff;
}

/* Comment text */
.comment-content {
  font-size: 1rem;
  line-height: 1.6;
  color: #222;
}

/* Comment form */
.comment-respond {
  margin-top: 4rem;
  border-top: 1px solid #ccc;
  padding-top: 2rem;
}

.comment-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  border: 1px solid #ccc;
  border-radius: 0.375rem;
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--primary-green);
  outline: none;
}

.comment-form .form-submit input {
  background-color: var(--primary-green);
  color: #fff;
  border: none;
  padding: 0.75rem 1.5rem;
  border-radius: 0.375rem;
  font-size: 1rem;
  cursor: pointer;
}

.comment-form .form-submit input:hover {
  background-color: var(--primary-green);
}


/* Form styles */
.info-message {
  background-color: #f0f4ff;
  color: var(--primary-green);
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--primary-green);
  border-radius: 0.375rem;
  font-weight: bold;
  font-size: 1rem;
  margin: 1.5rem auto;
  max-width: 600px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}


/* Base form styles */
form {
  max-width: 600px;
  margin: 2rem auto;
  padding: 1rem;
  font-family: system-ui, sans-serif;
}

/* Labels */
label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

/* Text inputs, email, password, number, etc. */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="url"],
input[type="tel"],
textarea,
select {
  width: 100%;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 0.375rem;
  font-size: 1rem;
  line-height: 1.5;
  margin-bottom: 1rem;
  box-sizing: border-box;
  transition: border-color 0.3s, box-shadow 0.3s;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--primary-green);
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 115, 230, 0.2);
}

/* Textarea */
textarea {
  resize: vertical;
  min-height: 100px;
}

/* Checkbox + Radio */
input[type="checkbox"],
input[type="radio"] {
  margin-right: 0.5rem;
  accent-color: var(--primary-green);
}

fieldset {
  border: 1px solid #ddd;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1rem;
}

legend {
  padding: 0 0.5rem;
  font-weight: bold;
}

/* Submit and buttons */
button,
input[type="submit"],
input[type="button"] {
  background-color: var(--primary-green);
  color: #fff;
  padding: 0.5rem 1rem;
  border: none;
  font-size: 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: background-color 0.3s;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
  background-color: #005bb5;
}

button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled {
  background-color: #aaa;
  cursor: not-allowed;
}

/* Error states */
input.error,
textarea.error,
select.error {
  border-color: #e63946;
  background-color: #fff5f5;
}

.error-message {
  color: #e63946;
  font-size: 0.875rem;
  margin-top: -0.75rem;
  margin-bottom: 1rem;
}

.social-icons svg {
  fill: #7fa13c;
}

.page-body.single.alignwide {
  padding:15px;
  margin:15px 0;
  background: #fff;
}

.single-post .single-thumb {
  height:auto;
}

@media (max-width: 768px) {
  .comment-meta-wrap {
    position:relative;
    left: 0 !important;
    padding:3px;
  }
}