:root {
  /* Color palette with light brown background */
  --dark-bg: #f2e8dc; /* Light brown background */
  --card-bg: #ffffff; /* White card background */
  --text-primary: #333333; /* Dark text for readability */
  --text-secondary: #665e53; /* Medium dark brown text for secondary content */
  --accent-warm: #ae5c40; /* Warm accent color kept the same */
  --accent-gold: #c9954e; /* Gold accent color kept the same */
  --border-color: #d7cbb9; /* Light brown border color */
  --highlight: #784527; /* Highlight color kept the same */
  --link-hover: #e0bb7a; /* Link hover color kept the same */
  --nav-bg: #4b3c2d; /* Dark brown for nav */
  --footer-bg: #6e532c; /* Light brown for footer */
  --input-bg: #ffffff; /* White input background */
  --tydlig: #daaa6f;

  /* Add texture variables */
  --paper-texture: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIAAAACACAMAAAD04JH5AAAABlBMVEUAAAAAAAClZ7nPAAAAAnRSTlMAGovxNEIAAAAfSURBVHja7cEBDQAAAMKg909tDjegAAAAAAAAAOAXFzAAAUm0+lIAAAAASUVORK5CYII=');
}

html {
  scroll-padding: 150px;
}
.blog-image-container {
  width: 100%;
  height: 250px;
  position: relative;
  overflow: hidden;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

/* Image styling with focus on rustic aesthetic */
.blog-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease, filter 0.5s ease;
}

/* Hover effects with rustic warm filter */
.blog-card:hover .blog-image {
  transform: scale(1.05);
  filter: brightness(1.05) sepia(0.15); /* Adds slight sepia tone for rustic warmth */
}

/* Thumbnail placeholder styling */
.thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--dark-bg), var(--highlight));
  color: var(--text-primary);
  font-size: 3rem;
  text-align: center;
}

/* Thumbnail frame styling for rustic look */
.blog-image-frame {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  border: 8px solid transparent;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3);
  pointer-events: none;
  z-index: 1;
}

/* Thumbnail opacity mask for consistent look */
.blog-image-container::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.05) 0%,
    rgba(0, 0, 0, 0) 40%,
    rgba(0, 0, 0, 0) 60%,
    rgba(0, 0, 0, 0.1) 100%
  );
  pointer-events: none;
  z-index: 1;
}

/* Category page specific thumbnail styling */
.category-page .blog-image-container {
  height: 220px;
}

/* Home page feature thumbnail styling */
.featured-post .blog-image-container {
  height: 320px;
}


/* GENERAL BODY STYLING */
body {
  background-color: var(--dark-bg);
  background-image: 
    linear-gradient(135deg, rgba(82, 95, 54, 0.97), rgba(82, 95, 54, 0.97)),
    var(--paper-texture) !important;
  background-attachment: fixed;
  font-family: 'Georgia', serif;
  letter-spacing: 0.02em;
  color: var(--text-primary);
  margin: 0;
  padding: 0;
  min-height: 100vh;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  position: relative;
}

/* Add subtle grain texture overlay to entire page */
body::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('{{ MEDIA_URL }}random/IMG_8981.JPG');
  z-index: 9999;
  pointer-events: none;
}

/* CONTAINER STYLES */
.container {
  background-color: var(--card-bg);
  background-image: 
    linear-gradient(to bottom, 
      rgba(255, 255, 255, 0.95), 
      rgba(250, 250, 250, 0.95)
    ),
    var(--paper-texture);
  padding: 2rem;
  border-radius: 8px; /* Less rounded for rustic feel */
  max-width: 1200px;
  margin: 0 auto;
  border: 1px solid var(--border-color);
  box-shadow: 
    0 2px 5px rgba(0, 0, 0, 0.1),
    inset 0 1px 1px rgba(255, 255, 255, 0.7);
    box-sizing: border-box;
  width: calc(100% - 40px); 
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  color: var(--accent-warm);
  font-weight: 600;
  font-family: 'Georgia', 'Times New Roman', serif;
  letter-spacing: 0.03em;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
  position: relative;
}

h1::after, h2::after {
  content: '';
  display: block;
  width: 70%;
  height: 2px;
  margin-top: 8px;
  background: linear-gradient(to right, var(--accent-warm), transparent);
  border-radius: 1px;
}

a {
  color: var(--accent-warm);
  transition: color 0.3s ease;
  text-decoration: none;
}

a:hover {
  color: var(--link-hover);
}

/* TOP BAR STYLING */
.top-bar {
  background-image: 
    linear-gradient(to bottom, 
      rgba(75, 60, 45, 0.95), 
      rgba(98, 75, 51, 0.95)
    ),
    url('{{ MEDIA_URL }}random/IMG_8981.JPG');
  color: #f2e8dc;
  padding: 10px 20px;
  display: flex;
  justify-content: flex-end;  
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 1px solid var(--highlight);
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.top-bar a {
  text-decoration: none;
  color: #f2e8dc; 
  padding: 8px 15px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  font-size: 14px;
  font-weight: bold;
  background-color: rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    0 1px 2px rgba(0, 0, 0, 0.3);
}

.top-bar a:hover {
  background-color: var(--accent-warm);
  color: white;
  transform: translateY(-2px);
  border-color: var(--accent-warm);
  box-shadow: 0 3px 5px rgba(0, 0, 0, 0.3);
}


/* Search suggestions styling */
.search-wrapper {
    position: relative;
    display: flex;
    flex-grow: 1;
}

.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(45, 33, 28, 0.95);
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    margin-top: 5px;
    max-height: 0;
    overflow: hidden;
    /*transition: max-height 0.3s ease;*/
    z-index: 1002;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.search-suggestions.active {
    max-height: 300px;
    overflow-y: auto;
}

.suggestion-item {
    padding: 10px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    /*transition: background-color 0.2s ease;*/
    color: var(--text-primary);
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: rgba(184, 92, 60, 0.2);
}

.no-suggestions {
    padding: 15px;
    text-align: center;
    font-style: italic;
    color: var(--text-secondary);
}
.live-search-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 600px; 
    max-height: 500px;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    display: none;
    margin-top: 10px;
    padding: 15px;
    /*animation: fadeInDown 0.3s ease-out;*/
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Grid layout for results */
.results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
    margin-bottom: 15px;
}

/* Individual result card */
.result-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    /*transition: transform 0.2s, box-shadow 0.2s;*/
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.result-card:hover {
    /*transform: translateY(-3px);*/
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.result-card a {
    text-decoration: none;
    color: var(--text-primary);
    display: block;
}

/* Result image container */
.result-image {
    height: 120px;
    overflow: hidden;
    position: relative;
}
.inline-search {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0;
  /*transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);*/
  z-index: 1000;
}

#searchToggle {
  background: rgba(184, 92, 60, 0.9);
  color: #f2e8dc;
  border: none;
  padding: 12px 15px;
  border-radius: 25px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.3s ease;
  box-shadow: 
    0 2px 8px rgba(184, 92, 60, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

#searchToggle::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.6s ease;
}

#searchToggle:hover::before {
  left: 100%;
}

#searchToggle:hover {
  background: rgba(201, 149, 78, 0.9);
  transform: translateY(-2px);
  box-shadow: 
    0 4px 12px rgba(184, 92, 60, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.search-wrapper {
  position: absolute;
  right: 100%;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  margin-right: 10px;
}

.inline-search.active .search-wrapper {
  width: 320px;
  opacity: 1;
  visibility: visible;
  right: 100%;
}

.search-form {
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(184, 92, 60, 0.3);
  border-radius: 25px;
  padding: 2px;
  box-shadow: 
    0 4px 20px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}

.search-form:focus-within {
  border-color: rgba(184, 92, 60, 0.6);
  transform: scale(1.02);
}

.search-form input[type="text"] {
  flex: 1;
  border: none;
  background: transparent;
  padding: 12px 18px;
  font-size: 14px;
  color: #39332e;
  outline: none;
  font-family: 'Georgia', serif;
  letter-spacing: 0.02em;
  position: relative;
  z-index: 2;
}

.search-form input[type="text"]::placeholder {
  color: rgba(102, 94, 83, 0.7);
  font-style: italic;
  transition: color 0.3s ease;
}

.search-form button[type="submit"] {
  background: linear-gradient(135deg, #b85c3c, #c9954e);
  color: white;
  border: none;
  padding: 10px 12px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  position: relative;
  overflow: hidden;
  z-index: 2;
}

.search-form button[type="submit"]:hover {
  transform: translateX(2px);
  box-shadow: 0 2px 8px rgba(184, 92, 60, 0.3);
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr; 
    gap: 15px;
    margin-bottom: 15px;
}

.live-search-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 650px; 
    max-height: 500px;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    z-index: 1100;
    display: none;
    margin-top: 10px;
    padding: 15px;
    animation: fadeInDown 0.3s ease-out;
}

.result-card {
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    overflow: hidden;
    /*transition: transform 0.2s, box-shadow 0.2s;*/
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    min-height: 200px;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    transform: translate3d(0, 0, 0);
    will-change: transform, box-shadow, border-color;
    
    position: relative;
}

.result-image {
    height: 120px;
    width: 100%;
    overflow: hidden;
    position: relative;
    background-color: #f5f5f5;
}

.result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    transition: transform 0.3s ease;
}

.result-image:hover img {
    transform: scale(1.0);

}

.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f5f5 0%, #eeeeee 100%);
    color: #999;
    font-size: 2rem;
}


.result-content {
    padding: 12px;
}

.result-content h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    line-height: 1.3;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap; 
}

.result-content p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.4;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    line-clamp: 2; 
}


.result-card::before {
    display: none; 

}

.result-card:hover::before {
  opacity: 1;
}

.result-card:hover {
    transform: translate3d(0, -4px, 0);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    border-color: rgba(184, 92, 60, 0.3);
}

.result-card:hover .result-image img {
  transform: scale(1.1); 
  filter: brightness(1.05) sepia(0.1); 
}

@media (max-width: 768px) {
  .search-wrapper {
    position: fixed;
    top: -100%;
    left: 0;
    right: 0;
    bottom: 0;
    width: 50%;
    height: 50%;
    transform: none;
    transition: top 0s;
    opacity: 1;
    visibility: visible;
    margin: 0;
    background: transparent;
    display: none;
  }
  .inline-search.active .search-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    backdrop-filter: blur(10px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transform: none; 
    transition: none; 
    z-index: 9999;
  }

  .search-form {
    width: 100%;
    max-width: 400px;
    margin: 0;
    position: relative; 
  }

  .live-search-dropdown {
    position: relative !important; 
    width: 100% !important;
    max-width: 400px !important;
    right: auto !important;
    left: auto !important;
    top: auto !important;
    margin-top: 20px; 
    max-height: 60vh;
    overflow-y: auto;
    background: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    padding: 15px;
  }
  
  .results-grid {
    grid-template-columns: 1fr !important;
    gap: 12px;
  }

  .inline-search.active::before {
    position: fixed;
    top: 30px;
    right: 30px;
    color: #f2e8dc;
    font-size: 30px;
    font-weight: 300;
    cursor: pointer;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(184, 92, 60, 0.8);
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
  }
    .inline-search.active::after:hover {
      background: rgba(240, 240, 240, 0.9);
      color: #333;
    }
    
    /* Make sure the search container is positioned relative */
    .inline-search {
        position: relative;
    }
  
  .inline-search.active::before:hover {
    background: rgba(184, 92, 60, 1);
    transform: scale(1.1);
  }

  /* Adjust result cards for mobile */
  .result-card {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }

  .result-image {
    height: 150px; /* Slightly taller on mobile */
  }

  .result-content h4 {
    font-size: 1.1rem;
  }

  .result-content p {
    font-size: 0.9rem;
  }
}



.placeholder-image {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to right, #f5f5f5, #e6e6e6);
    color: var(--accent-warm);
    font-size: 2rem;
}

.result-content {
    padding: 12px;
}

.result-content h4 {
    margin: 0 0 8px 0;
    font-size: 1rem;
    color: var(--accent-warm);
    line-height: 1.3;
}

.result-content p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--text-secondary);
    overflow: hidden;
    max-height: 2.5em;
    line-height: 1.25;
}

.see-all-results {
    text-align: center;
    padding: 12px;
    border-top: 1px solid var(--border-color);
    margin-top: 5px;
}

.see-all-results a {
    color: var(--accent-warm);
    font-weight: bold;
    font-size: 0.95rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.see-all-results a:hover {
    color: var(--highlight);
}

.see-all-results a i {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.see-all-results a:hover i {
    transform: translateX(3px);
}

/* No results message */
.no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    color: var(--text-secondary);
    text-align: center;
}

.no-results i {
    font-size: 2rem;
    margin-bottom: 10px;
    opacity: 0.5;
}

.no-results p {
    font-style: italic;
    margin: 0;
}

nav {
  background-image: 
    linear-gradient(to bottom, 
      rgba(124, 95, 67, 0.95), 
      rgba(107, 83, 59, 0.95)
    );
  display: flex;
  justify-content: center;
  overflow: visible;
  position: relative;
  top: 0;
  z-index: 900;
  padding: 10px 0;
  border-bottom: 1px solid var(--highlight);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.2);
}

nav a {
  color: #f2e8dc;
  text-decoration: none;
  padding: 12px 20px;
  margin: 0 10px;
  display: inline-block;
  text-align: center;
  font-weight: bold;
  transition: all 0.3s ease;
  border-radius: 4px;
  border: 1px solid transparent;
  background-color: transparent;
  box-shadow: 1px 0 0 rgba(255, 255, 255, 0.2);
}

nav a:last-child, nav .dropdown:last-child {
  box-shadow: none;
}

nav a:hover, nav .dropdown:hover > a {
  background-color: var(--accent-warm);
  color: white;
  transform: translateY(-2px);
  border-color: var(--accent-warm);
}

nav a.active {
  background-color: var(--highlight);
  color: white;
}

.dropdown-content {
  display: block;
  position: absolute;
  background-color: #4b3c2d;
  left: 50%;
  transform: translateX(-50%);
  top: 100%;
  padding: 15px;
  width: 90%;
  max-width: 1200px;
  max-height: 0;        
  opacity: 0;
  overflow: hidden;
  visibility: hidden;    
  transition: 
  max-height 0.5s ease, 
  opacity 0.4s ease,
  visibility 0.4s;
  z-index: 1001;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
  border: 1px solid var(--highlight);
  border-radius: 0 0 8px 8px;
}

.dropdown:hover .dropdown-content {
  max-height: 1200px;   
  opacity: 1;
  visibility: visible;  
}

.supercategory-container {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 15px;
  padding: 10px;
}

.supercategory-item {
  width: 100%;
  padding-bottom: 100%; 
  position: relative;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 6px;
  overflow: hidden;
}

/* SUPERCATEGORY CARDS */
.supercategory-card {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: transparent;
  background-size: cover;
  background-position: center;
  transition: transform 0.3s;
}

.supercategory-card:hover {
  transform: scale(1.05);
}

.supercategory-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  color: var(--accent-gold);
  font-size: 1.1rem;
  margin: 0;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.7);
  text-align: center;
  padding: 15px 10px;
  background: linear-gradient(to bottom, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(0, 0, 0, 0.4) 70%, 
    rgba(0, 0, 0, 0) 100%);
  transition: all 0.3s ease;
}

.supercategory-link {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, 
    rgba(0, 0, 0, 0.7) 0%, 
    rgba(0, 0, 0, 0.4) 70%, 
    rgba(0, 0, 0, 0) 100%);
  color: white !important;
  padding: 35px 0 20px 0;
  text-decoration: none;
  font-size: 1rem;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
  transform: translateY(100%);
  opacity: 0;
}

.supercategory-card:hover .supercategory-link {
  transform: translateY(0);
  opacity: 1;
}

/* BLOG CATEGORIES SECTION */
.alphabetical-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.letter-group {
  background-image: 
    linear-gradient(to bottom, 
      rgba(255, 255, 255, 0.95), 
      rgba(250, 250, 250, 0.95)
    ),
    var(--paper-texture);
  border-radius: 8px;
  padding: 1.5rem;
  border: 1px solid var(--border-color);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s, box-shadow 0.3s;
}

.letter-group:hover {
  transform: translateY(-5px);
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.letter-heading {
  color: var(--accent-warm);
  font-size: 1.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border-color);
}

.category-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.category-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  background-color: var(--card-bg);
  color: var(--text-secondary);
  text-decoration: none;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  transition: all 0.2s ease;
  margin-bottom: 8px;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 1px 2px rgba(0, 0, 0, 0.1);
}

.category-button:hover {
  background-color: var(--accent-warm);
  color: white;
  border-color: var(--accent-warm);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 30px;
  width: 100%;
  max-width: 1200px;
  margin: 2rem auto;
  padding: 0;
  transform: translateX(-1px);
}
.blog-index .blog-grid {
  margin: 2rem auto;
  padding: 20px 0; 
  justify-content: center; 
}
@media (max-width: 1240px) {
  .blog-grid {
    margin: 2rem 20px; 
    width: calc(100% - 40px);
  }
}

.blog-index {
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.blog-index .blog-grid {
  margin: 2rem 0;
  padding: 0;
}

.blog-card {
  position: relative;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  background-image: 
    linear-gradient(to bottom, 
      rgba(255, 255, 255, 0.95), 
      rgba(250, 250, 250, 0.95)
    ),
    var(--paper-texture);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
  border-color: var(--accent-warm);
}

.blog-image-container {
  width: 100%;
  position: relative;
  overflow: hidden;
  margin: 0;
  padding-top: 56.25%;
  background-color: #f5f5f5;
  border-bottom: 1px solid var(--border-color);
}

.blog-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.blog-card:hover .blog-image {
  transform: scale(1.05);
}

.blog-card h2 {
  margin: 1rem 0 0.5rem 0;
  padding-bottom: 8px;
  font-size: 1.3rem;
  color: var(--accent-warm);
  border-bottom: 1px solid var(--border-color);
  line-height: 1.3;
}

.post-content {
  color: var(--text-secondary);
  margin: 0.75rem 0;
  line-height: 1.6;
  flex-grow: 1;
  padding: 0 1rem;
}

.post-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  border-top: 1px solid var(--border-color);
}

.date {
  color: var(--text-secondary);
  font-style: italic;
  font-size: 0.9rem;
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.tag {
  background-color: var(--highlight);
  color: white;
  padding: 3px 8px;
  border-radius: 3px;
  font-size: 0.75rem;
  transition: background-color 0.3s;
}

.read-more {
  display: inline-block;
  margin-top: 1rem;
  padding: 0.6rem 1.2rem;
  background-color: var(--accent-warm);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.2s ease;
  text-align: center;
  border: 1px solid transparent;
  align-self: flex-start;
  margin-left: 1rem;
  margin-bottom: 1rem;
}

.read-more:hover {
  background-color: var(--highlight);
  color: white;
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 30px;
  gap: 10px;
}

.pagination a, .pagination span {
  padding: 8px 15px;
  border: 1px solid var(--border-color);
  text-decoration: none;
  color: var(--text-secondary);
  border-radius: 4px;
  background-color: var(--card-bg);
  transition: all 0.3s;
}

.pagination a:hover {
  background-color: var(--accent-warm);
  color: white;
  border-color: var(--accent-warm);
}

.pagination-current, .current-page {
  background-color: var(--highlight) !important;
  color: white !important;
}


.footer {
  background-color: #8a633d;
  background-image: 
    linear-gradient(to bottom, 
      rgba(75, 60, 45, 0.95), 
      rgba(59, 47, 35, 0.95)),
    url('/media/random/IMG_8981.jpg');
  background-repeat: repeat;
  background-position: center;
  color: #e6d9c7;
  padding: 2rem 0;
  margin-top: 0;
  border-top: 1px solid var(--highlight);
  position: relative;
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.2);
}

.footer .container {
  max-width: 1200px !important;
  width: 90% !important;
  margin: 0 auto !important;
  padding: 1rem 2rem !important;
  border: 0 !important;
  
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 2rem !important;
  align-items: start !important;
}

.footer .footer-grid {
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  flex-wrap: wrap !important;
  gap: 2rem !important;
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
}

.footer-column {
  flex: 1 !important;
  min-width: 250px !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  text-align: center !important;
}

.footer-column:first-child {
  text-align: left !important;
  align-items: flex-start !important;
}

.footer-column:nth-child(2) {
  text-align: center !important;
  align-items: center !important;
}

.footer-column:nth-child(3) {
  text-align: right !important;
  align-items: flex-end !important;
}

.footer h3 {
  font-size: 1.2rem !important;
  font-weight: bold !important;
  margin-bottom: 0.5rem !important;
  color: #e6d9c7 !important; 
}

.footer p {
  font-size: 0.9rem !important;
  color: #b8906a !important; 
  margin: 0.25rem 0 !important;
}

.footer-author {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
}

.author-content {
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-end !important;
  margin-top: 10px !important;
}

.author-image-footer {
  width: 80px !important;
  height: 80px !important;
  border-radius: 50% !important;
  object-fit: cover !important;
  border: 3px solid var(--accent-warm) !important;
  margin-bottom: 0.5rem !important;
  transition: transform 0.3s ease !important;
}

.author-image-footer:hover {
  transform: scale(1.1) !important;
}

.author-bio {
  font-size: 0.85rem !important;
  line-height: 1.4 !important;
  max-width: 200px !important;
  text-align: right !important;
}

.footer a {
  color: var(--accent-gold) !important;
  text-decoration: none !important;
  font-weight: bold !important;
  transition: color 0.3s ease !important;
}

.footer a:hover {
  color: var(--link-hover) !important;
  text-decoration: underline !important;
}

/* Responsive behavior for mobile */
@media (max-width: 768px) {
  .footer .container,
  .footer .footer-grid {
    grid-template-columns: 1fr !important;
    flex-direction: column !important;
    text-align: center !important;
    gap: 1.5rem !important;
  }
  
  .footer-column {
    text-align: center !important;
    align-items: center !important;
    min-width: auto !important;
  }
  
  .footer-column:first-child,
  .footer-column:nth-child(2),
  .footer-column:nth-child(3) {
    text-align: center !important;
    align-items: center !important;
  }
  
  .footer-author,
  .author-content {
    align-items: center !important;
  }
  
  .author-bio {
    text-align: center !important;
    max-width: 300px !important;
  }
}

/* For tablets */
@media (min-width: 769px) and (max-width: 1024px) {
  .footer .container,
  .footer .footer-grid {
    gap: 1.5rem !important;
    padding: 1rem 1.5rem !important;
  }
  
  .footer-column {
    min-width: 200px !important;
  }
  
  .author-bio {
    max-width: 180px !important;
  }
}

/* Ensure proper spacing and alignment */
.footer .container > * {
  margin: 0 !important;
}

/* Override any conflicting Tailwind classes */
.footer .text-center {
  text-align: center !important;
}

.footer .md\:text-left {
  text-align: left !important;
}

.footer .md\:text-right {
  text-align: right !important;
}

@media (max-width: 768px) {
  .footer .md\:text-left,
  .footer .md\:text-right {
    text-align: center !important;
  }
}



.footer .container.mx-auto {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 2rem !important;
  align-items: start !important;
  max-width: 1200px !important;
  margin: 0 auto !important;
  padding: 1rem 2rem !important;
}
.footer-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 2rem !important;
  align-items: start !important;
}
.footer .container.mx-auto .footer-grid {
  display: grid !important;
  grid-template-columns: repeat(3, 1fr) !important;
  gap: 2rem !important;
  width: 100% !important;
}

.footer .footer-column:first-child {
  text-align: left !important;
  justify-self: start !important;
}

.footer .footer-column:nth-child(2) {
  text-align: center !important;
  justify-self: center !important;
}

.footer .footer-column:nth-child(3) {
  text-align: right !important;
  justify-self: end !important;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .footer .container.mx-auto,
  .footer .container.mx-auto .footer-grid {
    grid-template-columns: 1fr !important;
    text-align: center !important;
  }
  
  .footer .footer-column:first-child,
  .footer .footer-column:nth-child(2),
  .footer .footer-column:nth-child(3) {
    text-align: center !important;
    justify-self: center !important;
  }
}

.footer h3 {
  color: #e6d9c7 !important;
}

.footer p {
  color: #b8906a !important; 
}





/* SCROLL TO TOP BUTTON */
#scrollToTop {
  display: none;
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--accent-warm);
  color: white;
  padding: 12px 16px;
  border: none;
  cursor: pointer;
  border-radius: 50%;
  font-size: 18px;
  transition: background 0.3s, transform 0.2s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  z-index: 999999; /* Add this line */

}

#scrollToTop:hover {
  background: var(--highlight);
  transform: translateY(-3px);
}



.btn {
  display: inline-block;
  background-color: var(--accent-warm);
  color: white;
  padding: 10px 20px;
  font-size: 1.2em;
  font-weight: bold;
  text-decoration: none;
  border-radius: 4px;
  transition: background 0.3s;
  border: none;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.2);
}

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

/* RECIPE SPECIFIC STYLES */
.recipe-card {
  background-image: 
    linear-gradient(to bottom, 
      rgba(255, 255, 255, 0.95), 
      rgba(250, 250, 250, 0.95)
    ),
    var(--paper-texture);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  padding: 2rem;
  margin: 2rem 0;
}

/* BOOK BANNER STYLES */
.book-banner {
  position: relative;
  margin: 4rem 0;
  padding: 4rem 2rem;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
  background: linear-gradient(145deg, #f5f5f5, #e6e6e6);
  border: 1px solid var(--border-color);
}

.book-banner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: repeating-linear-gradient(
    45deg,
    rgba(184, 92, 60, 0.05),
    rgba(184, 92, 60, 0.05) 10px,
    rgba(201, 149, 78, 0.05) 10px,
    rgba(201, 149, 78, 0.05) 20px
  );
}

.book-banner-content {
  position: relative;
  z-index: 10;
  max-width: 1200px;
  margin: 0 auto;
  text-align: center;
}

.book-banner h2 {
  font-size: 2.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  color: var(--accent-warm);
  text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.1);
  position: relative;
  display: inline-block;
}

.book-banner h2:after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 25%;
  width: 50%;
  height: 3px;
  background: var(--accent-warm);
  border-radius: 3px;
}

.book-banner p {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 3rem;
  line-height: 1.6;
}

.book-carousel {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 3rem;
  margin: 3rem 0;
}

.book-item {
  width: 240px;
  perspective: 1200px;
  transition: transform 0.3s ease;
}

.book-item:hover {
  transform: translateY(-15px);
}

.book-cover {
  position: relative;
  height: 340px;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
  box-shadow: 
    5px 5px 15px rgba(0, 0, 0, 0.2),
    -2px 0 5px rgba(0, 0, 0, 0.1);
}

.book-item:hover .book-cover {
  transform: rotateY(-30deg);
}

.book-spine {
  position: absolute;
  width: 40px;
  height: 100%;
  left: 0;
  background: linear-gradient(to right, 
    var(--highlight), 
    var(--accent-warm));
  transform: rotateY(90deg);
  transform-origin: left;
  box-shadow: inset -5px 0 10px rgba(0, 0, 0, 0.2);
}

.book-front {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 2px 8px 8px 2px;
  background: #fff;
  box-shadow: 
    5px 5px 20px rgba(0, 0, 0, 0.2),
    1px 1px 5px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.book-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.book-item:hover .book-image {
  transform: scale(1.05);
}

.book-info {
  margin-top: 1.5rem;
  text-align: center;
}

.book-info h3 {
  color: var(--accent-warm);
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  font-weight: 600;
}

.book-info p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.book-link {
  display: inline-block;
  padding: 0.5rem 1.5rem;
  background: var(--accent-warm);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.3s ease;
  border: none;
  box-shadow: 
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 2px 4px rgba(0, 0, 0, 0.2);
}

.book-link:hover {
  background: var(--highlight);
}

.view-all-books {
  display: inline-flex;
  align-items: center;
  padding: 0.8rem 2rem;
  margin-top: 1rem;
  background: transparent;
  color: var(--accent-warm);
  text-decoration: none;
  border: 2px solid var(--accent-warm);
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.view-all-books i {
  margin-left: 8px;
  transition: transform 0.3s;
}

.view-all-books:hover {
  background: var(--accent-warm);
  color: white;
}

.view-all-books:hover i {
  transform: translateX(5px);
}



.footer-author {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.author-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 10px;
}

.author-image-footer {
    width: 120px;
    height: 120px;
    border-radius: 60%;
    object-fit: cover;
    border: 3px solid var(--accent-warm);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    margin-bottom: 12px;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.author-image:hover {
    transform: scale(1.1);
    border-color: var(--accent-gold);
}

.author-bio {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #63461e;
    max-width: 250px;
    margin: 0 auto 12px;
    font-style: italic;
}

.author-social {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-link:hover {
    background-color: var(--accent-warm);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}


.site-header {
    background-image: 
      linear-gradient(to bottom, 
        rgba(206, 135, 99, 0.85), 
        rgba(229, 115, 67, 0.9)),
      url('media/random/IMG_8981.JPG');
    background-size: cover;
    background-position: center;
    padding: 3rem 0;
    position: relative;
    border-bottom: 3px solid var(--border-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
}

.author-frame {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.author-image-container {
  width: 220px;
  height: 220px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  
  border: 4px solid #ffffff;
  box-shadow: 
    0 0 0 2px var(--accent-warm),
    0 0 0 6px #ffffff,
    0 0 0 8px #e0d9cf,
    0 8px 25px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.1);
  
  /* Subtle background pattern */
  background: linear-gradient(45deg, #f9f7f5, #ffffff);
}

.author-image-container::before {
  content: '';
  position: absolute;
  top: -8px;
  left: -8px;
  right: -8px;
  bottom: -8px;
  background: linear-gradient(45deg, 
    var(--accent-warm) 0%, 
    var(--accent-gold) 25%, 
    var(--accent-warm) 50%, 
    var(--accent-gold) 75%, 
    var(--accent-warm) 100%);
  border-radius: 16px;
  z-index: -1;
  opacity: 0.3;
}

.author-image-container::after {
  content: '';
  position: absolute;
  top: 8px;
  left: 8px;
  right: 8px;
  bottom: 8px;
  border: 1px solid rgba(174, 92, 64, 0.2);
  border-radius: 8px;
  pointer-events: none;
  z-index: 2;
}

.author-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 20%; 
  position: relative;
  z-index: 1;
  
  /* Subtle sepia filter for vintage look */
  filter: sepia(0.1) contrast(1.05) brightness(1.02);
}

.author-frame::before {
  content: '❦';
  position: absolute;
  top: -35px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 24px;
  color: var(--accent-gold);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  opacity: 0.8;
}

.author-frame::after {
  content: '';
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 3px;
  background: linear-gradient(to right, 
    transparent, 
    var(--accent-gold), 
    var(--accent-warm), 
    var(--accent-gold), 
    transparent);
  border-radius: 2px;
  opacity: 0.7;
}



.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  position: relative;
  z-index: 2;
}

.left-section {
  display: flex;
  align-items: center;
  gap: 3.5rem;
}

.site-branding {
  text-align: left;
  position: relative;
}

.blog-name {
  font-family: 'Georgia', serif;
  font-size: 4rem; 
  margin: 0;
  line-height: 1.1;
  color: var(--accent-gold);
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.05em;
  position: relative;
  display: inline-block;
}

.blog-name::after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 0;
  width: 80px;
  height: 3px;
  background: linear-gradient(to right, var(--accent-warm), transparent);
}

.author-name {
  font-size: 2rem; 
  margin: 1.8rem 0 0.8rem;
  font-style: italic;
  color: var(--tydlig);
  text-shadow: 2px 2px 4px rgba( 0, 0, 0.5);
  opacity: 0.95;
}

.bok-beskrivning
{
  font-size: 1rem; 
  margin: 1.8rem 0 0.8rem;
  font-style: italic;
  color: var(--tydlig);
  text-shadow: 2px 2px 4px rgba( 0, 0, 0.5);
  opacity: 0.95;
}
.tagline {
  font-size: 1.2rem;
  margin: 0;
  color: var(--text-secondary);
  font-weight: 300;
  letter-spacing: 0.05em;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.header-book-section {
  flex-shrink: 0;
  perspective: 1500px;
  margin-left: 2rem;
  transform-style: preserve-3d;
}

.header-book-link {
  text-decoration: none;
  display: block;
  width: 220px;
}

.header-book {
  position: relative;
  width: 180px;
  height: 240px;
  transition: all 0.6s ease;
  transform-style: preserve-3d;
  transform: rotateY(-30deg) rotateX(5deg);
  margin: 0 auto;
}

.header-book-link:hover .header-book {
  transform: rotateY(-15deg) rotateX(5deg) translateY(-10px);
}

.header-book-cover {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  background: var(--highlight);
  border-radius: 2px 10px 10px 2px;
  box-shadow: 
    5px 5px 20px rgba(0, 0, 0, 0.4),
    1px 1px 5px rgba(0, 0, 0, 0.3);
  overflow: hidden;
}

.header-book-cover-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform-origin: left;
  transition: all 0.6s ease;
}

.header-book-spine {
  position: absolute;
  width: 30px;
  height: 100%;
  left: 0;
  top: 0;
  background: var(--accent-warm);
  transform: rotateY(90deg) translateZ(-15px);
  transform-origin: left;
  box-shadow: inset -2px 0 5px rgba(0, 0, 0, 0.3);
}

.header-book-side {
  position: absolute;
  width: 240px;
  height: 100%;
  left: 0;
  background: #392A21;
  transform: rotateY(90deg) translateZ(15px) translateX(-30px);
  transform-origin: left;
  z-index: -1;
}

.header-book-info {
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  text-align: center;
  opacity: 0;
  transition: all 0.4s ease;
  transform: translateY(10px);
}

.header-book-link:hover .header-book-info {
  opacity: 1;
  transform: translateY(0);
}

.header-book-title {
  font-weight: bold;
  color: var(--accent-gold);
  margin: 0;
  font-size: 1.1rem;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
}

.header-book-cta {
  margin: 5px 0 0 0;
  font-size: 0.9rem;
  font-style: italic;
  color: var(--tydlig);
  z-index: 9999;
}

/* Book floating animation */
@keyframes headerBookFloat {
  0% { transform: rotateY(-30deg) rotateX(5deg) translateY(0); }
  50% { transform: rotateY(-25deg) rotateX(5deg) translateY(-10px); }
  100% { transform: rotateY(-30deg) rotateX(5deg) translateY(0); }
}

@keyframes headerBookGlow {
  0% { box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.4); }
  50% { box-shadow: 5px 5px 30px rgba(224, 122, 95, 0.6); }
  100% { box-shadow: 5px 5px 20px rgba(0, 0, 0, 0.4); }
}

.header-book {
  animation: headerBookFloat 4s ease-in-out infinite;
}

.header-book-cover {
  animation: headerBookGlow 4s ease-in-out infinite;
}

body {
  position: relative;
  background-color: #f2e8dc; /* Light background as fallback */
  margin: 0;
  padding: 0;
  min-height: 100vh;
}

/* Create the side textures */
body::before,
body::after {
  content: '';
  position: fixed;
  top: 0;
  bottom: 0;
  width: 15%; /* Width of the side textures */
  background-repeat: repeat;
  background-size: cover;
  opacity: 0.15; /* Subtle appearance */
  z-index: -1;
  pointer-events: none; /* Allow clicking through */
}

body::before {
  left: 0;
  background-image: url('./{{ MEDIA_URL }}random/souce.jpg');
  border-right: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset -5px 0 15px rgba(0, 0, 0, 0.05);
}

body::after {
  right: 0;
  background-image: url('{{ MEDIA_URL }}/kyckling.jpg');
  border-left: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: inset 5px 0 15px rgba(0, 0, 0, 0.05);
}

/* Add a subtle texture overlay to the entire page */
.texture-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url('{{ MEDIA_URL }}random/IMG_8981.jpg');
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}

.content, 
.container,
.blog-post {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  background-color: #fff; 
}

/* Image fitting options */
.cover-fit::before,
.cover-fit::after {
  background-size: cover;
  background-position: center;
}

.contain-fit::before,
.contain-fit::after {
  background-size: contain;
  background-repeat: repeat;
}

.container, 
.blog-post {
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
  border: 1px solid #e0d9cf;
}
.side-texture-left {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 15%; 
  background-image: url('{{ MEDIA_URL }}random/souce.jpg');
  background-size: cover;
  background-position: center left;
  background-repeat: no-repeat;
  opacity: 0.2; 
  z-index: -1;
  pointer-events: none; 
  border-right: 1px solid rgba(0, 0, 0, 0.1);
}

.side-texture-right {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 15%;
  background-image: url('{{ MEDIA_URL }}random/image.png');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  opacity: 0.2; 
  z-index: -1;
  pointer-events: none; 
  border-left: 1px solid rgba(0, 0, 0, 0.1);
}


/* ============================================
   MOBILE RESPONSIVE STYLES FOR INDEX.HTML
   ============================================ */

/* Mobile First - Base styles for small screens */
@media screen and (max-width: 768px) {
  
  /* === HEADER SECTION === */
  .site-header {
    padding: 1.5rem 0;
  }
  
  .header-container {
    flex-direction: column;
    padding: 0 1rem;
    gap: 1.5rem;
  }
  
  .left-section {
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    align-items: center;
  }
  
  /* Author image - smaller on mobile */
  .author-image-container {
    width: 120px;
    height: 120px;
  }
  
  .author-frame::before {
    font-size: 18px;
    top: -25px;
  }
  
  .site-branding {
    text-align: center;
  }
  
  .blog-name {
    font-size: 2.5rem;
  }
  
  .author-name {
    font-size: 1.3rem;
    margin: 1rem 0 0.5rem;
  }
  
  .tagline {
    font-size: 1rem;
  }
  
  .header-book-section {
    margin-left: 0;
    width: 100%;
    display: flex;
    justify-content: center;
  }
  
  .header-book-link {
    width: 160px;
  }
  
  .header-book {
    width: 140px;
    height: 180px;
  }
  
  .top-bar {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    justify-content: center;
  }
  
  .top-bar .btn,
  .top-bar .icon {
    flex: 0 1 auto;
    text-align: center;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    min-width: auto;
  }
  
  .top-bar .icon {
    padding: 0.5rem 0.75rem;
  }
  
  /* Search on mobile */
  .inline-search {
    width: 100%;
    justify-content: center;
  }
  
  .inline-search.active .search-wrapper {
    width: 100%;
    position: static;
    margin-right: 0;
    margin-top: 0.5rem;
  }
  
  .search-form {
    width: 100%;
  }
  
  .live-search-dropdown {
    width: 100%;
    right: 0;
    left: 0;
  }
  
  .results-grid {
    grid-template-columns: 1fr;
  }
  
  /* === NAVIGATION === */
  nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 0;
    padding: 0;
    justify-content: center;
  }
  
  nav > a {
    display: flex;
    justify-content: center;
    align-items: center;

    margin: 0 !important;
    font-size: 0.9rem;
    border-radius: 0 !important;
    border: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
    box-shadow: none !important;
    min-width: fit-content;
    background-color: transparent !important;
  }
  
  nav > a:last-of-type {
    border-right: none !important;
  }
  
  nav > a:hover {
    border: none !important;
    border-right: 1px solid rgba(255, 255, 255, 0.15) !important;
    border-radius: 0 !important;
  }
  
  nav > a:last-of-type:hover {
    border-right: none !important;
  }
  
  .dropdown {
    flex: 1 1 auto;
    border-right: 1px solid rgba(255, 255, 255, 0.15);
    border-left: none;
    border-top: none;
    border-bottom: none;
  }
  
  .dropdown:last-child {
    border-right: none;
  }
  
  .dropdown > a {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
    width: 100%;
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    background-color: transparent !important;
  }
  
  .dropdown > a:hover {
    border: none !important;
    border-radius: 0 !important;
  }
  
  .dropdown > a::after {
    content: '▼';
    font-size: 0.6rem;
    margin-left: 0.4rem;
    transition: transform 0.3s ease;
  }
  
  .dropdown.active > a::after {
    transform: rotate(180deg);
  }
  
  nav {
    overflow: visible !important;
    position: relative !important;
  }
  
  .dropdown {
    position: static !important; 
  }
  
  .dropdown-content {
    position: fixed !important; 
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-width: 100% !important;
    transform: none !important; 
    margin: 0 !important;
    padding: 10px !important;
    background-color: rgba(75, 60, 45, 0.98);
    z-index: 1001;
    box-sizing: border-box;
    overflow-x: hidden;
    border-radius: 0;
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  
  .dropdown-content {
    position: absolute !important;
    left: 50% !important;
    right: auto !important;
    transform: translateX(-50%) !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
  }
  
  .dropdown:hover .dropdown-content,
  .dropdown.active .dropdown-content {
    display: block;
  }
  
  .supercategory-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important; 
    gap: 8px !important;
    padding: 5px !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    margin: 0 auto !important;
  }
  
  .supercategory-item {
    padding-bottom: 100% !important;
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    position: relative;
    overflow: hidden;
  }
  
  .supercategory-card {
    position: absolute !important;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
  }
  
  /* Adjust text size for mobile */
  .supercategory-overlay h3,
  .supercategory-title {
    font-size: 0.75rem !important;
    padding: 0.25rem !important;
    line-height: 1.2;
    word-wrap: break-word;
  }
  
  .supercategory-link {
    font-size: 0.7rem !important;
    padding: 18px 5px 10px 5px !important;
  }
  
  .supercategory-link i {
    font-size: 0.65rem;
  }
}



/* Extra Small Mobile - tighter spacing */
@media screen and (max-width: 480px) {
  .supercategory-container {
    gap: 6px !important;
    padding: 4px !important;
  }
  
  .supercategory-overlay h3,
  .supercategory-title {
    font-size: 0.65rem !important;
    padding: 0.2rem !important;
  }
  
  .supercategory-link {
    font-size: 0.6rem !important;
    padding: 15px 3px 8px 3px !important;
  }
}

/* Tablet-specific (769px-1024px) - 3 columns */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  .blog-index {
   margin-top: 0 !important;
  }
  .supercategory-container {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 12px;
  }

  .supercategory-overlay h3 {
    font-size: 0.85rem;
    padding: 0.3rem;
  }
  
  /* === MAIN CONTAINER === */
  .container {
    margin: 0 auto 1rem auto !important;
  }
  
  .blog-index h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
  }
  
  /* === WELCOME SECTION === */
  .welcome-section {
    margin: 0 0 1rem 0;  /* Only bottom margin, no top margin */
    padding: 2rem 1rem;
    min-height: auto;
  }
  
  .welcome-content {
    padding: 1.5rem;
  }
  
  .welcome-content h2 {
    font-size: 1.8rem;
  }
  
  .welcome-subtitle {
    font-size: 1rem;
  }
  
  .welcome-description {
    font-size: 0.95rem;
    line-height: 1.6;
  }
  
  /* === BLOG GRID === */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1rem 0;
    width: 100%;
    padding: 0;
    min-height: 250px;
  }
  
  .blog-card {
    width: 100%;
  }
  
  .blog-image-container {
    padding-top: 75%;
    height: auto;
  }
  
  .blog-card h2 {
    font-size: 1.2rem;
    padding: 0 1rem;
  }
  
  .post-content {
    padding: 0 1rem;
    font-size: 0.95rem;
  }
  
  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }
  
  .date {
    font-size: 0.85rem;
  }
  
  .tags {
    width: 100%;
    justify-content: flex-start;
  }
  
  .tag {
    font-size: 0.7rem;
    padding: 2px 6px;
  }
  
  /* === SIDE TEXTURES === */
  .side-texture-left,
  .side-texture-right {
    display: none;
  }
  
  .texture-overlay {
    opacity: 0.3;
  }
}

/* Tablet styles (768px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
  
  .header-container {
    padding: 0 1.5rem;
  }
  
  .blog-name {
    font-size: 3rem;
  }
  
  .author-name {
    font-size: 1.6rem;
  }
  
  .container {
    padding: 1.5rem;
    width: calc(100% - 40px);
  }
  
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
  }
  
  .side-texture-left,
  .side-texture-right {
    width: 8%;
  }
}

/* Small mobile devices (max-width: 480px) */
@media screen and (max-width: 480px) {
  
  .blog-name {
    font-size: 2rem;
  }
  
  .author-name {
    font-size: 1.1rem;
  }
  
  .tagline {
    font-size: 0.9rem;
  }
  
  .author-image-container {
    width: 100px;
    height: 100px;
  }
  
  .container {
    padding: 0.75rem;
  }
  
  .welcome-content h2 {
    font-size: 1.5rem;
  }
  
  .blog-card h2 {
    font-size: 1.1rem;
  }
  
  .post-content {
    font-size: 0.9rem;
  }
}

/* Landscape mobile devices */
@media screen and (max-height: 600px) and (orientation: landscape) {
  
  .site-header {
    padding: 1rem 0;
  }
  
  .header-container {
    flex-direction: row;
    justify-content: space-around;
  }
  
  .left-section {
    flex-direction: row;
    gap: 1rem;
  }
  
  .author-image-container {
    width: 80px;
    height: 80px;
  }
  
  .blog-name {
    font-size: 1.8rem;
  }
  
  .welcome-section {
    padding: 1rem;
  }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
  
  /* Larger tap targets for mobile */
  .blog-card,
  nav a,
  .btn,
  .icon {
    min-height: 44px;
  }
  
  /* Remove hover effects on touch devices */
  .blog-card:hover {
    transform: none;
  }
  
  /* Active state instead of hover */
  .blog-card:active {
    transform: scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  }
}


/* PERFORMANCE OPTIMIZATION - Add at the end of style.css */
.blog-image {
  transition: opacity 0.2s ease !important;
  will-change: auto !important;
}

.blog-card:hover .blog-image {
  transform: none !important;
  filter: none !important;
}

.blog-card {
  transition: box-shadow 0.2s ease !important;
}

.blog-card:hover {
  transform: none !important;
}

.pinned-icon {
    color: #ff6b6b;
    margin-right: 5px;
    transform: rotate(45deg);
    display: inline-block;
}

/* Pinned badge styling */
.pinned-badge {
    background: linear-gradient(135deg, #ff6b6b, #ff8e8e);
    color: white;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: absolute;
    top: 10px;
    right: 10px;
    box-shadow: 0 2px 4px rgba(255, 107, 107, 0.3);
}