

/* Hover effect for affiliate cards */
.affiliate-card:hover .affiliate-badge {
    background-color: var(--highlight);
}

/* Non-clickable image container */
.image-only {
    cursor: default;
    width: 100%;
    height: 100%;
}

/* Affiliate link styling */
.affiliate-link {
    display: inline-block;
    margin: 1rem;
    padding: 0.6rem 1rem;
    background-color: var(--accent-warm);
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: all 0.3s ease;
    margin-left: 1rem;
    margin-bottom: 1rem;
    align-self: flex-start;
    width: calc(100% - 2rem);
    text-align: center;
    box-sizing: border-box;
}

.affiliate-link i {
    margin-right: 5px;
}

.affiliate-link:hover {
    background-color: var(--highlight);
    transform: translateY(-2px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.affiliate-link::after {
    font-family: "Font Awesome 5 Free";
    content: " \f35d";
    font-weight: 900;
    font-size: 0.8em;
    opacity: 0.8;
    margin-left: 5px;
    transition: margin-left 0.2s;
}

.affiliate-link:hover::after {
    margin-left: 8px;
}
/* Book Banner Styles */
.book-banner {
    position: relative;
    margin: 4rem 0;
    padding: 4rem 2rem;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    background: linear-gradient(145deg, #99644a, #3d2e25);
}

.book-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('/media/random/wood.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.1;
    mix-blend-mode: overlay;
}

.book-banner:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.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-gold);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.4);
    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: #9d764f;;
    max-width: 700px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

/* Book Carousel */
.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;
}

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

.book-spine {
    position: absolute;
    width: 40px;
    height: 100%;
    left: 0;
    background: 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 10px 10px 2px;
    background:  transparent;
    box-shadow: 
        5px 5px 20px rgba(0, 0, 0, 0.4),
        1px 1px 5px rgba(0, 0, 0, 0.4);
    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-gold);
    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: var(--text-primary);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.book-link:hover {
    background: transparent;
    color: var(--accent-warm);
    border-color: var(--accent-warm);
}


/* Affiliate post styling */
.affiliate-card {
    position: relative;
    border: 2px solid var(--accent-warm);
    box-shadow: 0 5px 15px rgba(224, 122, 95, 0.3);
}

.affiliate-badge {
  letter-spacing: 0.5px;
  box-shadow: -2px 2px 4px rgba(0, 0, 0, 0.1);
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--accent-warm);
  color: white;
  padding: 3px 8px;
  font-size: 0.7rem;
  font-weight: bold;
  border-radius: 3px;
  z-index: 10;
}


/* 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 */
}


.welcome-section {
    position: relative;
    padding: 3rem 0;
    margin: 0 0 4rem 0;
    min-height: 600px;
    overflow: hidden;
}

.welcome-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -2;
}

.welcome-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, 
                rgba(245, 240, 235, 0.95) 0%, 
                rgba(245, 240, 235, 0.8) 60%, 
                rgba(245, 240, 235, 0.6) 100%);
    z-index: -1;
}

.welcome-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.03;
    pointer-events: none;
    z-index: 1;
}

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

.welcome-text {
    flex: 1;
    max-width: 600px;
    padding-right: 3rem;
}

.welcome-text h2 {
    font-size: 3rem;
    color: var(--accent-warm);
    margin-bottom: 1.5rem;
    font-weight: 700;
    position: relative;
    line-height: 1.2;
}

.welcome-text h2::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -10px;
    width: 100px;
    height: 3px;
    background: linear-gradient(to right, var(--accent-warm), transparent);
}

.welcome-subtitle {
    font-size: 1.4rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-style: italic;
}

.welcome-description {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.welcome-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.welcome-btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    font-weight: 600;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.primary-btn {
    background-color: var(--accent-warm);
    color: white;
    border: 1px solid var(--accent-warm);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.primary-btn:hover {
    background-color: var(--highlight);
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.secondary-btn {
    background-color: transparent;
    color: var(--accent-warm);
    border: 1px solid var(--accent-warm);
}

.secondary-btn:hover {
    background-color: rgba(184, 92, 60, 0.1);
    color: var(--highlight);
    transform: translateY(-3px);
}

.welcome-image-container {
    flex: 1;
    min-width: 300px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.welcome-image-frame {
    position: relative;
    width: 100%;
    max-width: 500px;
    height: 400px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.2),
        0 4px 10px rgba(0, 0, 0, 0.15);
    border: 8px solid white;
    transform: rotate(2deg);
    transition: all 0.3s ease;
}

.welcome-image-frame::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    pointer-events: none;
    z-index: 1;
}

.welcome-image-frame:hover {
    transform: rotate(0deg) scale(1.02);
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.25),
        0 8px 15px rgba(0, 0, 0, 0.2);
}

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

.welcome-image-frame:hover .welcome-image {
    transform: scale(1.05);
}

.welcome-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, 
        rgba(0, 0, 0, 0.3) 0%, 
        rgba(0, 0, 0, 0) 50%);
    pointer-events: none;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.welcome-image-frame:hover .welcome-image-overlay {
    opacity: 0.4;
}

.scroll-indicator {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--accent-warm);
    font-size: 0.9rem;
    animation: bounce 2s infinite;
    z-index: 5;
}

.scroll-indicator span {
    margin-bottom: 5px;
    font-style: italic;
}

.scroll-indicator i {
    font-size: 1.2rem;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) translateX(-50%);
    }
    40% {
        transform: translateY(-10px) translateX(-50%);
    }
    60% {
        transform: translateY(-5px) translateX(-50%);
    }
}
/* ============================================
WELCOME SECTION MOBILE RESPONSIVE STYLES
============================================ */
/* Tablet and Mobile (768px and below) */
@media screen and (max-width: 768px) {
.welcome-section {
margin: 1rem 0;
padding: 2rem 1rem;
min-height: auto;
}
.welcome-background {
background-attachment: scroll; /* Better performance on mobile */
background-position: center center;
}
.welcome-overlay {
background: rgba(245, 240, 235, 0.95); /* Solid overlay on mobile for readability */
}
.welcome-content {
padding: 1rem;
flex-direction: column;
gap: 2rem;
}
.welcome-text {
max-width: 100%;
padding-right: 0;
text-align: center;
}
.welcome-text h2 {
font-size: 1.8rem;
margin-bottom: 1rem;
}
.welcome-text h2::after {
left: 50%;
transform: translateX(-50%);
width: 80px;
}
.welcome-subtitle {
font-size: 1.1rem;
margin-bottom: 1rem;
}
.welcome-description {
font-size: 0.95rem;
line-height: 1.6;
margin-bottom: 1.5rem;
}
.welcome-buttons {
flex-direction: column;
gap: 0.75rem;
margin-top: 1.5rem;
align-items: center;
width: 100%;
}
.welcome-btn {
width: 100%;
max-width: 280px;
text-align: center;
align-items: center !important;

/*padding: 0.75rem 1.25rem;*/
font-size: 0.95rem;
}
.welcome-image-container {
min-width: 100%;
max-width: 400px;
margin: 0 auto;
}
.welcome-image-frame {
max-width: 100%;
height: 300px;
transform: rotate(0deg);
border: 6px solid white;
}
.welcome-image-frame:hover {
transform: scale(1.01);
}
.scroll-indicator {
bottom: 10px;
font-size: 0.85rem;
}
}
/* Small Mobile (480px and below) */
@media screen and (max-width: 480px) {
.welcome-section {
padding: 1.5rem 0.75rem;
margin: 0.5rem 0 2rem 0;
}
.welcome-content {
padding: 0.75rem;
gap: 1.5rem;
}
.welcome-text h2 {
font-size: 1.5rem;
margin-bottom: 0.75rem;
}
.welcome-text h2::after {
width: 60px;
height: 2px;
}
.welcome-subtitle {
font-size: 1rem;
margin-bottom: 0.75rem;
}
.welcome-description {
font-size: 0.9rem;
line-height: 1.5;
margin-bottom: 1rem;
}
.welcome-buttons {
gap: 0.5rem;
margin-top: 1rem;
}
.welcome-btn {
max-width: 250px;
align-items: center !important;

padding: 0.65rem 1rem;
font-size: 0.9rem;
}
.welcome-image-container {
max-width: 320px;
}
.welcome-image-frame {
height: 250px;
border: 4px solid white;
}
.scroll-indicator {
font-size: 0.8rem;
bottom: 5px;
}
.scroll-indicator i {
font-size: 0.7rem;
}
}
/* Landscape Mobile Orientation */
@media screen and (max-height: 600px) and (orientation: landscape) {
.welcome-section {
padding: 1rem;
min-height: auto;
}
.welcome-content {
flex-direction: row;
gap: 1.5rem;
align-items: center;
}
.welcome-text {
flex: 1;
text-align: left;
max-width: 50%;
}
.welcome-text h2 {
font-size: 1.5rem;
}
.welcome-text h2::after {
left: 0;
transform: none;
}
.welcome-subtitle {
font-size: 0.95rem;
}
.welcome-description {
font-size: 0.85rem;
}
.welcome-buttons {
flex-direction: row;
justify-content: flex-start;
gap: 0.5rem;
margin-top: 1rem;
}
.welcome-btn {
max-width: 140px;
padding: 0.5rem 0.75rem;
align-items: center !important;

font-size: 0.8rem;
}
.welcome-image-container {
flex: 1;
max-width: 45%;
}
.welcome-image-frame {
height: 200px;
}
.scroll-indicator {
display: none;
}
}
/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
/* Remove complex hover animations for better performance */
.welcome-image-frame:hover {
transform: none;
}
.welcome-image-frame:hover .welcome-image {
transform: none;
}
/* Active state instead of hover for buttons */
.welcome-btn:active {
transform: scale(0.97);
opacity: 0.9;
}
/* Ensure tap targets are large enough */
.welcome-btn {
min-height: 44px;
}
}
/* ============================================
   BLOG CARDS MOBILE RESPONSIVE STYLES
   ============================================ */

/* Tablet and Mobile (768px and below) */
@media screen and (max-width: 768px) {
  
  /* === BLOG GRID === */
  .blog-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin: 1rem 0;
    padding: 0;
    width: 100%;
  }
  
  /* === BLOG CARDS === */
  .blog-card {
    width: 100%;
    margin: 0 auto;
    border-radius: 8px;
  }
  
  /* Card Title */
  .blog-card h2 {
    font-size: 1.2rem;
    padding: 0 1rem;
    margin: 1rem 0 0.5rem 0;
    line-height: 1.4;
  }
  
  /* Image Container */
  .blog-image-container {
    padding-top: 75%; /* Slightly taller aspect ratio for mobile */
    height: auto;
    min-height: 250px;
  }
  
  .blog-image {
    object-fit: cover;
  }
  
  /* Post Content */
  .post-content {
    padding: 0 1rem;
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0.75rem 0;
  }
  
  .post-content p {
    margin: 0;
  }
  
  /* Post Meta (Date and Tags) */
  .post-meta {
    flex-direction: column;
    gap: 0.5rem;
    align-items: flex-start;
    padding: 0.75rem 1rem;
  }
  
  .post-meta-details {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
  }
  
  .date {
    font-size: 0.85rem;
  }
  
  /* Tags */
  .tags {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
  
  .tag {
    font-size: 0.7rem;
    padding: 2px 6px;
  }
  
  /* Read More Button */
  .read-more {
    margin: 0 1rem 1rem 1rem;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    text-align: center;
    width: calc(100% - 2rem);
    box-sizing: border-box;
  }
  
  /* === AFFILIATE CARDS === */
  .affiliate-card {
    border: 2px solid var(--accent-warm);
  }
  
  .affiliate-badge {
    top: 0;
    right: 0;
    font-size: 0.65rem;
    padding: 4px 8px;
    border-radius: 0 8px 0 8px;
  }
  
  .affiliate-link {
    margin: 0 1rem 1rem 1rem;
    padding: 0.6rem 1rem;
    font-size: 0.9rem;
    width: calc(100% - 2rem);
  }
  
  /* Remove hover transforms on mobile for better performance */
  .blog-card:hover {
    transform: translateY(-3px);
  }
}

/* Small Mobile (480px and below) */
@media screen and (max-width: 480px) {
  
  .blog-grid {
    gap: 1.25rem;
  }
  
  .blog-card h2 {
    font-size: 1.1rem;
    padding: 0 0.75rem;
  }
  
  .post-content {
    font-size: 0.9rem;
    padding: 0 0.75rem;
  }
  
  .post-meta {
    padding: 0.5rem 0.75rem;
  }
  
  .date {
    font-size: 0.8rem;
  }
  
  .tag {
    font-size: 0.65rem;
    padding: 2px 5px;
  }
  
  .read-more,
  .affiliate-link {
    margin: 0 0.75rem 0.75rem 0.75rem;
    padding: 0.5rem 0.85rem;
    font-size: 0.85rem;
    width: calc(100% - 1.5rem);
  }
  
  .affiliate-badge {
    font-size: 0.6rem;
    padding: 3px 6px;
  }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
  
  /* Larger tap targets */
  .blog-card,
  .read-more,
  .affiliate-link {
    min-height: 44px;
  }
  
  /* Remove hover effects on touch devices */
  .blog-card:hover {
    transform: none;
  }
  
  .blog-card:hover .blog-image {
    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);
  }
  
  .read-more:active,
  .affiliate-link:active {
    transform: scale(0.97);
    opacity: 0.9;
  }
}

/* Landscape Mobile Orientation */
@media screen and (max-height: 600px) and (orientation: landscape) {
  
  .blog-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
  
  .blog-card h2 {
    font-size: 1rem;
  }
  
  .blog-image-container {
    padding-top: 50%;
  }
  
  .post-content {
    font-size: 0.85rem;
  }
  
  .post-meta {
    padding: 0.5rem 0.75rem;
  }
}

/* Container adjustments for mobile */
@media screen and (max-width: 768px) {
  
  .container {
    padding: 1rem;
    margin-top: 0 !important;
    width: calc(100% - 20px);
  }
  
  .blog-index {
    width: 100%;
  }
  
  .blog-index h1 {
    font-size: 2rem;
    text-align: center;
    margin-bottom: 1rem;
    padding: 0 1rem;
  }
  
  .blog-index .blog-grid {
    margin: 1rem 0;
  }
}

@media screen and (max-width: 480px) {
  
  .container {
    padding: 0.75rem;
  }
  
  .blog-index h1 {
    font-size: 1.75rem;
  }
}
