/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: white;
}

/* Prevent layout shifts */
* {
    box-sizing: border-box;
}

/* Prevent forced reflows in body without changing layout */
body {
    contain: layout style;
    will-change: auto;
}

/* Prevent layout shifts for breadcrumbs */
.breadcrumbs {
    contain: layout;
    will-change: auto;
    min-height: 25px;
}

/* Prevent layout shifts for recipe header */
.recipe-header {
    contain: layout;
    will-change: auto;
}

/* Prevent layout shifts for related recipes section */
.related-recipes {
    contain: layout;
    will-change: auto;
}

/* Prevent layout shifts for recipes grid */
.recipes-grid {
    contain: layout;
    will-change: auto;
}

/* Prevent layout shifts for navigation elements */
.nav-actions {
    contain: layout;
    will-change: auto;
}

.user-menu {
    contain: layout;
    will-change: auto;
}

.user-dropdown {
    contain: layout;
    will-change: auto;
}

/* Prevent layout shifts for modals */
.modal {
    contain: layout;
    will-change: auto;
}

.modal-content {
    contain: layout;
    will-change: auto;
}

/* Prevent layout shifts for images without changing dimensions */
.recipe-header-image img {
    display: block;
}

/* Prevent font loading layout shifts */
.recipe-title,
h1, h2, h3, h4, h5, h6 {
    font-display: swap;
}

/* Reserve space for dynamic content */
.recipe-stats-box {
    min-height: 80px;
    /* Prevent layout shifts */
    contain: layout;
    will-change: auto;
}

.jump-to-recipe-section {
    min-height: 60px;
}

.sidebar-categories {
    min-height: 300px;
}

.sidebar-popular-recipes {
    min-height: 400px;
}

/* Ensure images don't cause layout shifts */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Reserve space for user profile */
.user-profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
}

.user-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fix deprecated H1UserAgentFontSizeInSection warning */
/* Explicitly set font-size for h1 in semantic HTML5 elements */
h1 {
    font-size: 2em;
    margin: 0;
}

section h1,
article h1,
aside h1,
nav h1,
header h1,
footer h1,
main h1 {
    font-size: 2em !important;
}

/* Ad Spaces Styling */
.ad-container {
    margin: 30px auto;
    text-align: center;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
    overflow: hidden;
    max-width: 1200px;
}

/* Index Ad Spaces */
.ad-index-1,
.ad-index-2 {
    margin: 40px auto;
    background: transparent;
    border: none;
    padding: 0;
    position: relative;
}

/* Recipe Ad Spaces */
.ad-recipe-1,
.ad-recipe-2 {
    margin: 30px auto;
    background: transparent;
    border: none;
    padding: 0;
    position: relative;
}

/* Advertisement Text at Top and Bottom */
.ad-index-1::before,
.ad-index-2::before,
.ad-recipe-1::before,
.ad-recipe-2::before {
    content: "Advertisement";
    display: block;
    text-align: center;
    color: #999;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.ad-index-1::after,
.ad-index-2::after,
.ad-recipe-1::after,
.ad-recipe-2::after {
    content: "Advertisement";
    display: block;
    text-align: center;
    color: #999;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: 10px;
    text-transform: uppercase;
}

/* Mobile-specific styling for Index 1 - No borders */
.ad-index-1.ad-mobile {
    /* No special styling needed - inherits from parent */
}

/* Recipe Ad specific styling */
.ad-recipe-1 {
    margin: 20px auto 30px;
}

.ad-recipe-2 {
    margin: 30px auto 20px;
}

/* Ad Content Styling */
.ad-content {
    position: relative;
    z-index: 5;
}

.ad-content img {
    display: block;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease;
}

.ad-content img:hover {
    transform: scale(1.02);
}

/* Responsive adjustments for ad containers */
@media (max-width: 768px) {
    .ad-index-1,
    .ad-index-2 {
        margin: 30px auto;
    }
    
    .ad-index-1::before,
    .ad-index-2::before,
    .ad-index-1::after,
    .ad-index-2::after {
        font-size: 10px;
        margin-bottom: 8px;
        margin-top: 8px;
    }
}

/* Device-specific styling */
.ad-desktop {
    display: block;
}

.ad-mobile {
    display: none;
}

@media (max-width: 992px) {
    .ad-desktop {
        display: none;
    }
    
    .ad-mobile {
        display: block;
    }
    
    .ad-index-1,
    .ad-index-2 {
        margin: 30px auto;
        padding: 20px;
    }
}

/* Legacy ad styles for backward compatibility */
.ad-header {
    margin: 0 0 20px 0;
}

.ad-sidebar {
    margin: 15px 0;
    background: #fff;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
}

.ad-footer {
    margin: 20px 0 0 0;
    background: #f8f9fa;
    border-top: 2px solid #e9ecef;
    padding: 20px 0;
}

.ad-between_posts {
    margin: 30px 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 20px;
}

.ad-recipe_page {
    margin: 20px 0;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
}

/* Responsive ad styling */
@media (max-width: 768px) {
    .ad-container {
        margin: 20px auto;
        padding: 15px;
    }
    
    .ad-sidebar {
        margin: 10px 0;
        padding: 8px;
    }
    
    .ad-between_posts {
        margin: 20px 0;
        padding: 15px;
    }
    
    .ad-index-1,
    .ad-index-2 {
        margin: 25px auto;
        padding: 15px;
    }
}

.container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    padding: 0 20px;
    position: relative !important;
    /* Prevent layout shifts */
    contain: layout;
    will-change: auto;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    border-radius: 0 0 24px 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    /* Prevent layout shifts */
    contain: layout;
    will-change: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand h1 {
    color: #0D9488;
    font-size: 28px;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-link {
    text-decoration: none;
    color: #555;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #0D9488;
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background: #0D9488;
    border-radius: 2px;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.search-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    padding: 8px;
    border-radius: 12px;
    transition: background-color 0.3s ease;
}

.search-btn:hover {
    background-color: #f0f0f0;
}

/* Mobile Search Button */
.mobile-search-btn {
    display: none !important;
    background: none !important;
    border: none !important;
    font-size: 18px !important;
    color: #333 !important;
    cursor: pointer !important;
    padding: 8px !important;
    transition: color 0.3s ease !important;
    margin-right: 8px !important;
    position: relative !important;
    z-index: 1001 !important;
    width: auto !important;
    height: auto !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.mobile-search-btn:hover {
    color: #20B2AA !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

.mobile-search-btn:active {
    color: #0D9488 !important;
    background: none !important;
    border: none !important;
    box-shadow: none !important;
    transform: none !important;
}

/* Mobile Menu Styles */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    margin-left: 10px;
    z-index: 1001;
    position: relative;
}

/* Mobile-specific recipe grid styles */
@media (max-width: 767px) {
    .recipes-grid {
        gap: 20px;
        max-width: 100%;
    }
    
    .recipe-card {
        min-height: auto;
    }
    
    .recipe-image {
        height: 200px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
    
    .section-header {
        margin-bottom: 30px;
    }
}

.mobile-menu-btn:hover {
    background-color: #f0f0f0;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: #333;
    margin: 3px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -6px);
}

.mobile-menu-overlay {
    position: absolute !important;
    top: calc(100% + 10px) !important;
    left: 0 !important;
    width: 100% !important;
    background: white !important;
    border-radius: 24px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
    z-index: 2000 !important;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) !important;
    transition: all 0.3s ease;
    max-height: 100vh !important;
    overflow-y: auto !important;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) !important;
}

.mobile-menu-content {
    padding: 30px !important;
    width: 100% !important;
    position: relative !important;
}

.mobile-menu-header {
    display: none;
}

.mobile-menu-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #666;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: background-color 0.3s ease;
}

.mobile-menu-close:hover {
    background-color: #f0f0f0;
}

.mobile-nav-menu {
    list-style: none;
    padding: 0;
    margin: 0 0 40px 0;
    flex: 1;
}

.mobile-nav-menu li {
    margin-bottom: 15px;
}

.mobile-nav-link {
    display: block;
    padding: 20px 25px;
    color: #333;
    text-decoration: none;
    border-radius: 16px;
    transition: all 0.3s ease;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: #0D9488;
    color: white;
    transform: translateX(5px);
}

.mobile-menu-actions {
    border-top: 1px solid #eee;
    padding-top: 30px;
    margin-top: auto;
    text-align: center;
    min-height: 200px; /* Reserve consistent space to prevent layout shift */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}




.mobile-user-section {
    margin-top: 20px;
    min-height: 150px; /* Reserve space for user content */
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.mobile-user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px 20px;
    background: #f8f9fa;
    border-radius: 12px;
    margin-bottom: 15px;
    font-weight: 600;
    color: #333;
    transition: all 0.2s ease; /* Smooth transitions to prevent jarring shifts */
}

.mobile-user-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.mobile-user-links a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    transition: background-color 0.3s ease;
    font-size: 14px;
}

.mobile-user-links a:hover {
    background-color: #f0f0f0;
    color: #0D9488;
}

.mobile-auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
    min-height: 150px; /* Reserve space for auth buttons */
    justify-content: flex-start;
}

.mobile-login-btn,
.mobile-signup-btn {
    padding: 15px 20px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease; /* Smooth transitions to prevent jarring shifts */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.mobile-login-btn {
    background: #f8f9fa;
    color: #333;
    border: 2px solid #e9ecef;
}

.mobile-login-btn:hover {
    background: #e9ecef;
    border-color: #0D9488;
    transform: translateY(-2px);
}

.mobile-signup-btn {
    background: #0D9488;
    color: white;
}

.mobile-signup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.4);
}

/* Ensure mobile menu is visible on mobile devices */
@media (max-width: 768px) {
    .mobile-menu-overlay {
        display: block !important;
    }
    
    .mobile-menu-overlay.active {
        display: block !important;
    }
    
    .mobile-auth-buttons {
        display: flex;
    }
}

/* Hide username text on mobile */
@media (max-width: 768px) {
    .username-text {
        display: none;
    }
    
    .nav-menu {
        display: none;
    }
    
    .mobile-menu-btn {
        display: flex !important;
    }
    
    .mobile-search-btn {
        display: block !important;
    }
    
    .nav-actions {
        gap: 8px;
        align-items: center;
    }
    
    .mobile-search-btn {
        order: -1; /* Place search button before hamburger menu */
    }
    
    .user-btn {
        padding: 10px 15px;
    }
    
    .secondary-btn,
    .primary-btn {
        padding: 8px 15px;
        font-size: 14px;
    }
    
    /* Hide desktop-only elements on mobile */
    .desktop-only {
        display: none !important;
    }
}

/* Hide mobile menu on desktop */
@media (min-width: 769px) {
    .mobile-menu-overlay {
        display: none !important;
        visibility: hidden;
        opacity: 0;
    }
    
    .mobile-menu-actions {
        display: none !important;
    }
    
    .mobile-menu-btn {
        display: none !important;
    }
    
    .mobile-menu-content {
        display: none !important;
    }
    
    .mobile-nav-menu {
        display: none !important;
    }
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-btn {
    background: transparent;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-avatar-placeholder {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.dropdown-arrow {
    font-size: 12px;
    color: #333;
    transition: transform 0.3s ease;
}

.user-btn:hover .dropdown-arrow {
    transform: rotate(180deg);
}

.user-btn:hover {
    background: rgba(0, 0, 0, 0.05);
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1001;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    color: #555;
    text-decoration: none;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.user-dropdown a:last-child {
    border-bottom: none;
}

.user-dropdown a:hover {
    background-color: #f8f9fa;
    color: #0D9488;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 40px;
    border-radius: 24px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

/* Google Login Button for Modals */
.google-login-btn-modal {
    width: 100%;
    padding: 12px 16px;
    background: #ffffff;
    color: #000000 !important;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 16px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.google-login-btn-modal:hover {
    background: #f9fafb;
    border-color: #9CA3AF;
}

.google-login-btn-modal svg {
    width: 18px;
    height: 18px;
    margin-right: 12px;
}

/* Modal Divider */
.modal-divider {
    text-align: center;
    margin: 16px 0;
    position: relative;
    color: #6B7280;
    font-size: 14px;
    display: flex;
    align-items: center;
}

.modal-divider::before {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E7EB;
}

.modal-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E5E7EB;
}

.modal-divider span {
    background: transparent;
    color: #6B7280;
    padding: 0 12px;
    margin: 0 12px;
    white-space: nowrap;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 15px;
    right: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover {
    color: #0D9488;
}

.modal h2 {
    margin-bottom: 30px;
    text-align: center;
    color: #2d3748;
    font-size: 24px;
    font-weight: 600;
}

.modal form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal input,
.modal select {
    padding: 16px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    transition: border-color 0.3s ease;
}

.modal input:focus,
.modal select:focus {
    outline: none;
    border-color: #0D9488;
}

.modal p {
    text-align: center;
    margin-top: 20px;
}

.modal a {
    color: #0D9488;
    text-decoration: none;
    font-weight: 500;
}

.modal a:hover {
    text-decoration: underline;
}

/* Buttons */
.primary-btn {
    background: #0D9488;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.4);
}

.primary-btn.large {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: 20px;
}

.secondary-btn {
    background: transparent;
    color: #0D9488;
    border: 2px solid #0D9488;
    padding: 12px 24px;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.secondary-btn:hover {
    background: #0D9488;
    color: white;
    transform: translateY(-2px);
}

.secondary-btn.large {
    padding: 16px 32px;
    font-size: 16px;
    border-radius: 20px;
}

/* Hero Section */
.hero {
    padding: 120px 0 40px;
    background: #f0f9f9;
    border-radius: 0;
    margin-bottom: 0px;
    /* Prevent layout shifts */
    contain: layout;
    will-change: auto;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 40px;
}

.hero-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: #2d3748;
}

.gradient-text {
    color: #0D9488;
}

.hero-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.hero-image {
    display: flex;
    justify-content: center;
}

.hero-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    transform: rotate(5deg);
    transition: transform 0.3s ease;
}

.hero-card:hover {
    transform: rotate(0deg) scale(1.05);
}

.hero-card img {
    width: 100%;
    height: 300px;
    object-fit: cover;
}

.hero-card-content {
    padding: 20px;
}

.hero-card-content h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2d3748;
}

.hero-card-content p {
    color: #666;
    font-size: 14px;
}

/* Sections */
.section-title {
    text-align: center;
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 40px;
    color: #2d3748;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 50px;
}

.section-header {
    margin-bottom: 60px;
}

/* Search Section */
.search-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 0 0 30px 30px;
    margin-bottom: 10px;
    margin-top: -80px;
}

.search-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.search-container form {
    display: flex;
    gap: 10px;
    align-items: center;
}

.search-submit-btn {
    background: #0D9488;
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.4);
}

.search-box {
    display: flex;
    align-items: center;
    background: white;
    border-radius: 50px;
    padding: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.search-box:focus-within {
    border-color: #0D9488;
    box-shadow: 0 15px 40px rgba(13, 148, 136, 0.2);
    transform: translateY(-2px);
}

.search-icon-left {
    font-size: 20px;
    color: #0D9488;
    margin: 0 15px 0 0;
    padding-left: 15px;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px;
    padding: 15px 0;
    background: transparent;
    color: #2d3748;
}

.search-input::placeholder {
    color: #a0aec0;
    font-weight: 400;
}

.search-button {
    background: #0D9488;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 40px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    margin: 0 10px;
}

.search-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.4);
}

.search-button:active {
    transform: translateY(0);
}



.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    margin-top: 10px;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.search-suggestions.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.suggestion-item {
    padding: 15px 20px;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 12px;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f8f9fa;
}

.suggestion-icon {
    font-size: 16px;
    color: #0D9488;
    opacity: 0.7;
}

.suggestion-text {
    color: #2d3748;
    font-weight: 500;
}

.suggestion-category {
    color: #a0aec0;
    font-size: 12px;
    margin-left: auto;
}

/* Categories Section */
.categories {
    padding: 40px 0 60px 0;
}

/* Desktop specific gap between heading and category circles */
@media (min-width: 1025px) {
    .categories .section-title {
        margin-bottom: 40px;
    }
}

.categories-grid {
    display: flex;
    justify-content: center;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    max-width: 110px;
    background: transparent;
    padding: 0;
    border: none;
    box-shadow: none;
}

.category-card:hover {
    transform: translateY(-4px);
}

.category-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.category-image {
    width: 120px;
    height: 120px;
    margin: 0 auto 12px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    transition: all 0.3s ease;
    border: 1px solid #ffffff;
}

.category-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-label {
    text-align: center;
}

.category-label span {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
    line-height: 1.3;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-count {
    text-align: center;
    margin-top: 4px;
}

.category-count span {
    font-size: 11px;
    font-weight: 500;
    color: #64748b;
    display: block;
}


.category-card p {
    color: #666;
    font-size: 12px;
}

.categories-actions {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.categories-grid-all {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Featured Recipes */
.featured-recipes {
    padding: 40px 0 80px 0;
    background: #f0f9f9;
    border-radius: 50px 50px 0 0;
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #2d3748;
}

.section-subtitle {
    font-size: 18px;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

/* Latest Recipes */
.latest-recipes {
    padding: 80px 0;
    background: #f8fafc;
}

.recipes-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

/* Desktop layout - 3 recipes per row */
@media (min-width: 768px) {
    .recipes-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 30px;
        max-width: 1200px;
    }
    
    .recipe-card {
        min-height: 450px;
    }
    
    .recipe-image {
        height: 250px;
    }
    
    .recipe-title {
        font-size: 20px;
    }
    
    .recipe-description {
        font-size: 14px;
    }
}

/* Large desktop layout - maintain 3 columns but increase spacing */
@media (min-width: 1200px) {
    .recipes-grid {
        gap: 40px;
    }
    
    .recipe-card {
        min-height: 480px;
    }
}

/* Medium screens - 2 columns for tablets */
@media (min-width: 768px) and (max-width: 1023px) {
    .recipes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .recipe-card {
        min-height: 420px;
    }
    
    .recipe-image {
        height: 220px;
    }
    
    .section-title {
        font-size: 32px;
    }
    
    .section-subtitle {
        font-size: 16px;
    }
}

.recipe-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    height: 100%;
}

.recipe-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    border-color: #0D9488;
}

/* Ensure recipe cards maintain consistent height in grid */
.recipe-card {
    display: flex;
    flex-direction: column;
}

.recipe-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.recipe-meta {
    margin-top: auto;
}

.recipe-btn {
    margin-top: 20px;
    width: 100%;
}

.recipe-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: #f8f9fa;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.recipe-card:hover .recipe-image img {
    transform: scale(1.1);
}

.recipe-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 8px 14px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #000000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.author-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    padding: 6px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: white;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recipe-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.recipe-title {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #2d3748;
    line-height: 1.3;
}

.recipe-description {
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
    flex: 1;
}

.recipe-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
    margin-top: auto;
    align-items: center;
    justify-content: space-between;
}

.meta-item {
    font-size: 18px !important;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
    background: transparent;
    padding: 6px 12px;
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.meta-item:hover {
    background: transparent;
}

.meta-item img {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    object-fit: contain;
}

.rating-stars {
    display: flex;
    gap: 3px;
    align-items: center;
}

.rating-stars i {
    font-size: 16px;
    color: #0D9488;
    transition: color 0.2s ease;
}

.recipe-btn {
    width: 100%;
    background: #0D9488;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.recipe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

/* Newsletter */
.newsletter {
    background: #0D9488;
    padding: 80px 0 60px;
    border-radius: 0;
    margin: 0;
}

.newsletter-content {
    text-align: center;
    color: white;
}

.newsletter h2 {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 16px;
}

.newsletter p {
    font-size: 18px;
    margin-bottom: 40px;
    opacity: 0.9;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 20px;
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-form input {
    flex: 1;
    padding: 16px 20px;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
}

.newsletter-form input::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.3);
}

.newsletter-form .primary-btn {
    background: white;
    color: #0D9488;
    padding: 16px 32px;
}

.newsletter-form .primary-btn:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

/* Hero Section Links */
.hero-image-link {
    display: block;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.hero-image-link:hover {
    transform: scale(1.02);
}

.hero-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
    transition: color 0.3s ease;
}

.hero-card-link:hover {
    color: #0D9488;
}

.hero-description {
    font-size: 16px;
    color: #666;
    margin-top: 12px;
    line-height: 1.6;
}

.newsletter-message {
    margin-top: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    text-align: center;
    animation: slideIn 0.3s ease-out;
}

.newsletter-message.success {
    background: #ffffff;
    color: #333;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

.newsletter-message.error {
    background: #ffffff;
    color: #ef4444;
    border: 1px solid #e5e7eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Footer */
.footer {
    background: #fafafc;
    color: #333333;
    padding: 60px 0 30px;
    border-radius: 0 0 0 0;
    margin-top: 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #1a1a1a;
}

.footer-section h4 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.footer-section p {
    color: #555555;
    line-height: 1.6;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section ul li a {
    color: #555555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: #1a1a1a;
}

.social-links {
    display: flex;
    flex-direction: row;
    gap: 15px;
    justify-content: flex-start;
}

.social-links a {
    color: #cbd5e0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    font-size: 18px;
}

.social-links a:hover {
    color: #0D9488;
    background-color: rgba(13, 148, 136, 0.2);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #e0e0e0;
    color: #555555;
}

/* Page Header */
.page-header {
    padding: 120px 0 60px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    border-radius: 0 0 50px 50px;
    margin-bottom: 60px;
}

/* Recipes page: soft teal background as requested */
.recipes-header {
    background: #f0f9f9 !important;
}

/* Categories page: same soft teal header */
.categories-header {
    background: #f0f9f9 !important;
}

/* Single category page header color */
.category-header {
    background: #f0f9f9 !important;
}

/* Recipes page cards: increase prep/servings icon size only on recipes.php */
.recipes-section .meta-item i {
    font-size: 16px !important;
}

.header-content {
    text-align: center;
}

.page-title {
    font-size: 48px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 16px;
}

.page-subtitle {
    font-size: 18px;
    color: #666;
    margin-bottom: 30px;
}

.filters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.filter-form select {
    padding: 12px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    background: white;
    cursor: pointer;
}

.filter-btn {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    background: #5a67d8;
    transform: translateY(-1px);
}

.clear-filters {
    color: #0F766E;
    text-decoration: none;
    font-weight: 500;
    padding: 12px 20px;
    border: 2px solid #0F766E;
    border-radius: 16px;
    transition: all 0.3s ease;
}

.clear-filters:hover {
    background: #0F766E;
    color: white;
}

/* Category Header */
.category-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    margin-bottom: 20px;
}

.category-icon {
    font-size: 48px;
    color: #0D9488;
    filter: drop-shadow(0 4px 8px rgba(102, 126, 234, 0.3));
}

/* Recipes Section */
.recipes-section {
    padding: 0 0 80px;
}

.no-recipes {
    text-align: center;
    padding: 60px 20px;
}

.no-recipes-icon {
    font-size: 64px;
    margin-bottom: 20px;
}

.no-recipes h2 {
    font-size: 24px;
    color: #2d3748;
    margin-bottom: 12px;
}

.no-recipes p {
    color: #666;
    margin-bottom: 30px;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.page-link {
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #2d3748;
    font-weight: 500;
    transition: all 0.3s ease;
}

.page-link:hover,
.page-link.active {
    background: #0D9488;
    color: white;
    border-color: #0D9488;
}

/* Recipe Detail Styles */
.recipe-header {
    padding: 20px 0 0;
    background: transparent;
    border-radius: 0;
    margin-bottom: 20px;
    min-height: 80px;
    position: relative;
    z-index: 1;
    margin-top: 90px;
}

.recipe-header-content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-bottom: 0;
}

.recipe-header-text {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.recipe-header-image {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: none;
    order: 2;
    background-color: #f5f5f5;
    height: auto;
    min-height: 200px;
}

/* Breadcrumbs */
.breadcrumbs {
    display: flex !important;
    align-items: center;
    gap: 8px;
    margin-bottom: 15px;
    font-size: 15px;
    color: #64748b !important;
    overflow-x: auto;
    overflow-y: visible;
    white-space: nowrap;
    padding: 0;
    scrollbar-width: none;
    -ms-overflow-style: none;
    visibility: visible !important;
    opacity: 1 !important;
    background: transparent !important;
    border: none !important;
    border-radius: 0 !important;
    z-index: 1 !important;
    position: static !important;
    box-shadow: none !important;
    min-height: auto !important;
    width: 100% !important;
    max-width: 100% !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    backdrop-filter: none !important;
    transition: color 0.3s ease !important;
}

.breadcrumbs::-webkit-scrollbar {
    display: none;
}

.breadcrumb-link {
    color: #0f766e !important;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    flex-shrink: 0;
    font-size: 15px !important;
    line-height: 1.4 !important;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

.breadcrumb-link:hover {
    color: #1a9a94 !important;
    text-decoration: underline;
}

.breadcrumb-separator {
    color: #000000 !important;
    margin: 0 2px;
    font-weight: 500;
    flex-shrink: 0;
    font-size: 16px !important;
    opacity: 0.8;
}

.breadcrumb-current {
    color: #000000 !important;
    font-weight: 600;
    flex-shrink: 0;
    font-size: 15px !important;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: none;
}

.recipe-category-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    color: #0D9488;
    margin-bottom: 20px;
}

.recipe-category-badge .category-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.recipe-category-badge .category-link:hover {
    color: #0D9488;
}

.recipe-header-text .recipe-title {
    font-size: 48px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 4px;
    line-height: 1.2;
}

/* Rating Display */
.recipe-rating-display {
    display: flex;
    align-items: center;
    gap: 15px;
    /* Prevent layout shifts */
    contain: layout;
    will-change: auto;
    margin-bottom: 6px;
}

.rating-stars {
    display: flex;
    gap: 2px;
}

.rating-stars .fas.fa-star {
    color: #e2e8f0;
    font-size: 20px;
}

.rating-stars .fas.fa-star.active {
    color: #dc2626;
}

.rating-text {
    font-size: 16px;
    color: #2d3748;
    font-weight: 500;
}

.rating-score {
    text-decoration: underline;
}

.rating-count {
    text-decoration: none;
}

.rating-separator {
    width: 4px;
    height: 4px;
    background-color: #dc2626;
    border-radius: 50%;
    margin: 0 5px;
}

.review-count {
    font-size: 14px;
    color: #2d3748;
    text-decoration: underline;
    cursor: pointer;
}

.recipe-header-text .recipe-description {
    font-size: 18px;
    color: #666;
    margin-bottom: 3px;
    line-height: 1.6;
}

.recipe-author {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
}

.author-text {
    font-size: 16px;
    color: #2d3748;
}

.author-link {
    color: #2d3748;
    text-decoration: underline;
    font-weight: 500;
}

.author-link:hover {
    color: #0D9488;
}

.recipe-date {
    font-size: 14px;
    color: #666;
}

.recipe-actions {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    /* Prevent layout shifts */
    contain: layout;
    will-change: auto;
    border-radius: 25px;
    padding: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1), 0 2px 4px rgba(0, 0, 0, 0.06);
    border: 2px solid rgba(32, 178, 170, 0.2);
    overflow: hidden;
    max-width: 450px;
    gap: 18px;
    margin-top: 20px;
    margin-bottom: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border: none;
    border-radius: 20px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    flex: 1;
    justify-content: center;
    position: relative;
    background: rgba(255, 255, 255, 0.8);
    color: #2d3748;
    min-width: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.action-btn i {
    font-size: 16px;
    transition: all 0.3s ease;
}

.action-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(32, 178, 170, 0.3);
}

.action-btn:hover i {
    transform: scale(1.1);
}

.action-btn:not(:last-child)::after {
    display: none;
}

.save-btn {
    background: linear-gradient(135deg, #20B2AA 0%, #1a9a94 100%);
    color: white;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 2px 8px rgba(32, 178, 170, 0.3);
}

.save-btn:hover,
.save-btn.saved {
    background: linear-gradient(135deg, #1a9a94 0%, #20B2AA 100%);
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 25px rgba(32, 178, 170, 0.4);
    border-color: rgba(255, 255, 255, 0.3);
}

.save-btn.saved i {
    color: #fecaca;
}

.rate-btn,
.print-btn,
.share-btn {
    background: transparent;
    color: #2d3748;
    border: 1px solid #e2e8f0;
}

.rate-btn:hover,
.print-btn:hover,
.share-btn:hover {
    background: rgba(32, 178, 170, 0.15);
    transform: translateY(-3px) scale(1.02);
    color: #0f766e;
    border-color: rgba(32, 178, 170, 0.4);
    box-shadow: 0 8px 25px rgba(32, 178, 170, 0.2);
}

/* Recipe Stats Box within Main Content */
.recipe-stats-box {
    display: flex;
    align-items: center;
    justify-content: space-around;
    background: white;
    color: #333;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin-bottom: 0.5rem;
    border: 1px solid #e2e8f0;
}


.recipe-header-image img {
    width: 100%;
    max-width: 1200px;
    height: auto;
    max-height: 500px;
    object-fit: cover;
    border-radius: 24px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    margin: 0 auto;
    display: block;
}

/* Print Styles */
@media print {
    .navbar,
    .recipe-actions,
    .rating-comments-section,
    .related-recipes,
    .footer {
        display: none !important;
    }
    
    .recipe-header {
        padding: 15px 0 0;
        background: white !important;
        border-radius: 0;
        margin-bottom: 15px;
    }
    
    .recipe-header-content {
        gap: 10px;
    }
    
    .breadcrumbs {
        margin-bottom: 15px !important;
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .recipe-title {
        font-size: 24px !important;
        color: black !important;
    }
    
    .recipe-description {
        color: black !important;
    }
    
    .recipe-content-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .recipe-sidebar {
        order: -1;
        margin-bottom: 30px;
    }
    
    .recipe-ingredients,
    .recipe-instructions {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Recipe Content */
.recipe-content-section {
    padding: 10px 0 80px;
    /* Prevent layout shifts */
    contain: layout;
    will-change: auto;
}

/* Prevent layout shifts for conditional content */
.jump-to-recipe-section {
    contain: layout;
    will-change: auto;
    min-height: 60px;
}

/* Content section with dynamic content */
.recipe-content-section > div[style*="margin: 30px 0"] {
    contain: layout;
    will-change: auto;
    min-height: 50px;
}

/* Step images that load dynamically */
.step-image-container {
    contain: layout;
    will-change: auto;
}

.step-image {
    width: 100%;
    height: auto;
    display: block;
    contain: layout;
}

/* Cook mode toggle and interactive elements */
.cook-mode-toggle {
    contain: layout;
    will-change: auto;
    min-height: 40px;
}

.ingredient-item {
    contain: layout;
    will-change: auto;
}

.instruction-step {
    contain: layout;
    will-change: auto;
}

/* Recipe ingredients and instructions containers */
.recipe-ingredients,
.recipe-instructions {
    contain: layout;
    will-change: auto;
}

/* Main Recipe Content Grid - Desktop */
.recipe-content-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
    margin-top: 0;
    /* Prevent layout shifts */
    contain: layout;
    will-change: auto;
}

.recipe-main-content {
    display: flex;
    flex-direction: column;
    gap: 40px;
    /* Prevent layout shifts */
    contain: layout;
    will-change: auto;
}

.recipe-sidebar {
    display: flex;
    flex-direction: column;
    gap: 30px;
    height: fit-content;
    background: linear-gradient(135deg, rgba(32, 178, 170, 0.02) 0%, rgba(32, 178, 170, 0.05) 100%);
    padding: 20px;
    border-radius: 20px;
    border: 1px solid rgba(32, 178, 170, 0.1);
}



.recipe-ingredients {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(32, 178, 170, 0.1);
    border: 1px solid rgba(32, 178, 170, 0.2);
    margin-bottom: 40px;
    position: relative;
    overflow: hidden;
}

.recipe-ingredients::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #20B2AA, #1a9a94);
}

.recipe-instructions {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: 40px;
}

.recipe-ingredients h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f766e;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(32, 178, 170, 0.2);
    padding-bottom: 10px;
}

.recipe-instructions h2 {
    font-size: 24px;
    font-weight: 600;
    color: #0f766e;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.ingredients-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    /* Prevent layout shifts */
    contain: layout;
    will-change: auto;
}

.ingredient-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: white;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(32, 178, 170, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.ingredient-item:hover {
    background: rgba(32, 178, 170, 0.05);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.15);
    border-color: rgba(32, 178, 170, 0.3);
}

.ingredient-checkbox {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #20B2AA;
    flex-shrink: 0;
    border-radius: 4px;
    border: 2px solid #e2e8f0;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.ingredient-checkbox:checked {
    background-color: #667eea;
    border-color: #667eea;
}

.ingredient-text {
    font-size: 16px;
    color: #2d3748;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
}

.ingredient-item.checked .ingredient-text {
    text-decoration: line-through;
    color: #a0aec0;
    opacity: 0.7;
    transform: scale(0.98);
}

.ingredient-item.checked {
    background: rgba(32, 178, 170, 0.08);
    border-left: 3px solid #20B2AA;
    padding-left: 15px;
    box-shadow: 0 2px 12px rgba(32, 178, 170, 0.2);
}

.instructions-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    /* Prevent layout shifts */
    contain: layout;
    will-change: auto;
}

.instruction-step {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    padding: 16px;
    border-radius: 12px;
    border-left: 3px solid transparent;
    position: relative;
}



.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #20B2AA 0%, #1a9a94 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    flex-shrink: 0;
}

.step-content p {
    font-size: 16px;
    line-height: 1.6;
    color: #2d3748;
    margin: 0;
}

.step-content {
    flex: 1;
    padding: 8px 0;
}

/* Recipe Gallery */
.recipe-gallery {
    margin-bottom: 60px;
}

.recipe-gallery h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.image-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 12px 16px;
    font-size: 14px;
}

/* Recipe Video */
.recipe-video {
    margin-bottom: 60px;
}

.recipe-video h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.video-container {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* Rating Section */
.rating-section {
    background: white;
    border-radius: 24px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-bottom: 60px;
    text-align: center;
}

.rating-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.rating-form {
    margin-bottom: 30px;
}

.rating-stars {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 16px;
}

.star-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.star-btn:hover,
.star-btn.active {
    color: #ffc107;
    transform: scale(1.1);
}

.rating-text {
    color: #666;
    font-size: 16px;
}

.rating-summary {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.average-rating {
    display: flex;
    align-items: center;
    gap: 12px;
}

.rating-number {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
}

.rating-stars-display {
    display: flex;
    gap: 4px;
}

.rating-stars-display i {
    font-size: 20px;
    color: #ddd;
}

.rating-stars-display i.active {
    color: #ffc107;
}

.total-ratings {
    color: #666;
    font-size: 16px;
}

/* Rating & Comments Section */
.rating-comments-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(32, 178, 170, 0.1);
    border: 1px solid rgba(32, 178, 170, 0.2);
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.rating-comments-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #20B2AA, #1a9a94);
}

.rating-comments-header {
    text-align: center;
    margin-bottom: 40px;
}

.rating-comments-header h2 {
    font-size: 24px;
    font-weight: 700;
    color: #0f766e;
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(32, 178, 170, 0.2);
    padding-bottom: 10px;
}

.rating-comments-header p {
    color: #666;
    font-size: 14px;
}

.rating-comments-form {
    margin-bottom: 40px;
}

.rating-section-form {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(32, 178, 170, 0.05);
    border-radius: 12px;
    border: 2px dashed rgba(32, 178, 170, 0.2);
    transition: all 0.3s ease;
}

.rating-section-form:hover {
    border-color: #ffc107;
    background-color: #fffbf0;
}

.rating-label {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #0f766e;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.required-asterisk {
    color: #f56565;
    font-weight: bold;
    font-size: 1.2em;
}

.rating-helper-text {
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 13px;
    color: #6b7280;
    font-style: italic;
}

.rating-stars-form {
    display: flex;
    justify-content: center;
    gap: 8px;
}

.star-btn-form {
    background: none;
    border: none;
    font-size: 28px;
    color: #ddd;
    cursor: pointer;
    transition: all 0.2s ease;
    padding: 8px;
    position: relative;
}

.star-btn-form:hover {
    color: #ffc107;
    transform: scale(1.2);
}

.star-btn-form.active {
    color: #ffc107;
    transform: scale(1.1);
    animation: starPulse 0.3s ease;
}

@keyframes starPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.3);
    }
    100% {
        transform: scale(1.1);
    }
}

.star-btn-form:focus {
    outline: 2px solid #ffc107;
    outline-offset: 2px;
    border-radius: 4px;
}

/* Error message styles */
.rating-error-message {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px 16px;
    border-radius: 8px;
    margin-top: 12px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    animation: slideIn 0.3s ease;
}

.rating-error-message i {
    font-size: 16px;
}

.field-error-message {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 6px;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    animation: slideIn 0.3s ease;
}

.field-error-message i {
    font-size: 14px;
}

/* Error state styling */
.rating-section-form.has-error .rating-stars-form {
    padding: 12px;
    background-color: #fff5f5;
    border: 2px solid #fcc;
    border-radius: 12px;
}

.rating-section-form.has-error .star-btn-form {
    color: #f56565;
}

.rating-section-form.has-error .star-btn-form:hover {
    color: #ffc107;
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: #f56565 !important;
    background-color: #fff5f5 !important;
}

.form-group.has-error label {
    color: #c33;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #0f766e;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #20B2AA;
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.2);
    transform: translateY(-1px);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.checkbox-group {
    margin-top: 20px;
}

.checkbox-label {
    display: flex !important;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px !important;
    font-weight: 400 !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    cursor: pointer;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-top: 2px;
}

.form-submit {
    text-align: right;
}

.submit-btn {
    background: linear-gradient(135deg, #20B2AA 0%, #1a9a94 100%);
    color: white;
    border: none;
    padding: 14px 28px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.3);
}

.submit-btn:hover {
    background: linear-gradient(135deg, #1a9a94 0%, #20B2AA 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(32, 178, 170, 0.4);
}

.login-prompt {
    text-align: center;
    padding: 40px;
    background: transparent;
    border-radius: 0;
    margin-bottom: 30px;
}

.login-prompt p {
    color: #666;
    font-size: 16px;
}

.login-prompt a {
    color: #0D9488;
    text-decoration: none;
    font-weight: 600;
}

.login-prompt a:hover {
    text-decoration: underline;
}

.rating-summary-display {
    padding: 30px;
    background: rgba(32, 178, 170, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(32, 178, 170, 0.1);
    margin-bottom: 30px;
}

.rating-summary-content {
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.rating-overview {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 120px;
}

.rating-score {
    font-size: 32px;
    font-weight: 700;
    color: #2d3748;
    line-height: 1;
    margin-bottom: 8px;
}

.rating-stars-visual {
    display: flex;
    gap: 4px;
    margin-bottom: 8px;
}

.rating-stars-visual i {
    font-size: 20px;
    color: #ddd;
}

.rating-stars-visual i.active {
    color: #0f766e;
}

.rating-count {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.rating-distribution {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.rating-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.star-label {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    min-width: 20px;
}

.rating-bar {
    flex: 1;
    height: 16px;
    background: #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.rating-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #20B2AA, #1a9a94);
    border-radius: 8px;
    transition: width 0.3s ease;
}

.rating-count-bar {
    font-size: 12px;
    color: #666;
    min-width: 30px;
    text-align: right;
}

/* Reviews List Styling */
.reviews-list h3 {
    font-size: 24px;
    font-weight: 700;
    color: #0f766e;
    margin-bottom: 30px;
    text-align: left;
    border-bottom: 2px solid rgba(32, 178, 170, 0.2);
    padding-bottom: 10px;
}

.review-item {
    margin-bottom: 24px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(32, 178, 170, 0.1);
}

.review-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 8px;
}

.review-avatar {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #20B2AA 0%, #1a9a94 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 16px;
    box-shadow: 0 4px 12px rgba(32, 178, 170, 0.3);
    flex-shrink: 0;
}

.review-author {
    font-size: 16px;
    font-weight: 600;
    color: #2d3748;
    text-align: left;
}

.review-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
    margin-left: 0;
}

.review-rating {
    display: flex;
    gap: 2px;
}

.review-rating i {
    font-size: 14px;
    color: #ddd;
}

.review-rating i.active {
    color: #0f766e;
}

.review-date {
    font-size: 12px;
    color: #666;
}

.review-content {
    font-size: 14px;
    line-height: 1.6;
    color: #2d3748;
}

.no-reviews {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px 20px;
    background: rgba(32, 178, 170, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(32, 178, 170, 0.1);
}

.comments-list h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    text-align: center;
}

/* Comments Section (Legacy - keeping for existing comments) */
.comments-section {
    background: transparent;
    border-radius: 0;
    padding: 0;
    box-shadow: none;
    margin-bottom: 60px;
}

.comments-section h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.comment-form {
    margin-bottom: 40px;
}

.comment-form form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.comment-form textarea {
    width: 100%;
    min-height: 120px;
    padding: 16px;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    font-size: 16px;
    resize: vertical;
    transition: border-color 0.3s ease;
}

.comment-form textarea:focus {
    outline: none;
    border-color: #667eea;
}

.comments-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.comment {
    padding: 20px;
    background: transparent;
    border-radius: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.comment-info {
    display: flex;
    flex-direction: column;
}

.comment-author {
    font-weight: 600;
    color: #2d3748;
}

.comment-date {
    font-size: 12px;
    color: #666;
}

.comment-content {
    color: #2d3748;
    line-height: 1.6;
}

.no-comments {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

/* Related Recipes */
.related-recipes {
    background: transparent;
    border-radius: 0;
    padding: 60px 0 80px 0; /* Add proper top and bottom padding */
    box-shadow: none;
    margin-bottom: 0; /* Ensure no extra margin */
}

.related-recipes h2 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 30px;
    text-align: center;
}

/* Responsive spacing for related recipes */
@media (max-width: 768px) {
    .related-recipes {
        padding: 40px 0 60px 0; /* Reduce padding on mobile */
    }
    
    .related-recipes h2 {
        font-size: 20px;
        margin-bottom: 20px;
    }
}

/* Recipe Card Enhancements */
.recipe-card {
    position: relative;
}

.recipe-category {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: #0D9488;
}

.category-icon {
    font-size: 20px;
}

.recipe-author {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .categories-grid {
        gap: 20px;
        justify-content: center;
    }
    
    .category-card {
        max-width: 140px;
    }
    
    .category-image {
        width: 110px !important;
        height: 110px !important;
    }
    
    .categories-grid-all {
        grid-template-columns: repeat(4, 1fr);
        gap: 25px;
    }
    
    .recipe-header-image img {
        max-width: 100%;
        height: auto;
        max-height: 400px;
    }
}

@media (max-width: 768px) {
    .recipe-header-image {
        box-shadow: none;
        border-radius: 12px;
        margin-bottom: 0;
        padding-bottom: 0;
        height: auto;
        overflow: hidden;
        background-color: #f5f5f5;
        min-height: 250px;
    }
    
    .recipe-header-image img {
        max-width: 100%;
        height: auto;
        max-height: 250px;
        border-radius: 12px;
        object-fit: cover;
        display: block;
    }
    
    /* Ensure mobile layout is properly stacked */
    .recipe-content-section {
        padding: 10px 0 20px;
    }
    
    .recipe-content-grid {
        margin-top: 0;
        margin-bottom: 20px;
    }
    
    .recipe-main-content {
        gap: 30px;
    }
    
    /* Reduce breadcrumbs spacing on mobile */
    .breadcrumbs {
        margin-bottom: 8px !important;
        gap: 6px !important;
        font-size: 14px !important;
        padding: 0 !important;
    }
    
    .breadcrumb-separator {
        margin: 0 1px !important;
        font-size: 14px !important;
    }
    
    .breadcrumb-link {
        font-size: 14px !important;
    }
    
    .breadcrumb-current {
        font-size: 14px !important;
    }
    
    /* Force mobile recipe header spacing */
    .recipe-header {
        margin-bottom: 10px !important;
        padding: 15px 0 0 !important;
    }
    
    /* Force mobile content section spacing */
    .recipe-content-section {
        padding: 5px 0 40px !important;
    }
    
    /* Force mobile content grid spacing */
    .recipe-content-grid {
        margin-top: 0 !important;
        margin-bottom: 30px !important;
    }
}

@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .rating-comments-header h2 {
        font-size: 24px;
    }
    
    .rating-section-form {
        padding: 15px;
    }
    
    .rating-label {
        font-size: 16px;
    }
    
    .rating-helper-text {
        font-size: 12px;
    }
    
    .star-btn-form {
        font-size: 20px;
    }
    
    .star-btn-form:hover {
        color: #ffc107;
    }
    
    .star-btn-form.active {
        color: #ffc107;
        transform: scale(1.1);
    }
    
    .rating-error-message {
        padding: 10px 12px;
        font-size: 13px;
    }
    
    .field-error-message {
        padding: 6px 10px;
        font-size: 12px;
    }
    
    .submit-btn {
        width: 100%;
        text-align: center;
    }
    
    /* Mobile rating summary */
    .rating-summary-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .rating-overview {
        min-width: auto;
    }
    
    .rating-score {
        font-size: 28px;
    }
    
    .rating-distribution {
        width: 100%;
    }
    
    /* Mobile reviews styling */
    .review-item {
        padding: 16px;
    }
    
    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin-bottom: 6px;
    }
    
    .review-avatar {
        width: 35px;
        height: 35px;
        font-size: 14px;
    }
    
    .review-author {
        font-size: 15px;
        text-align: left;
    }
    
    .review-meta {
        gap: 8px;
        margin-bottom: 10px;
    }
    
    .rating-bar-row {
        gap: 8px;
    }
    
    .rating-bar {
        height: 14px;
    }
    
    .rating-bar-fill {
        background: linear-gradient(90deg, #20B2AA, #1a9a94) !important;
        min-width: 2px;
    }
    
    .star-label {
        font-size: 12px;
        min-width: 15px;
    }
    
    .rating-count-bar {
        font-size: 11px;
        min-width: 25px;
    }
    
    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    /* Ensure desktop layout is maintained */
    @media (min-width: 768px) {
        .recipes-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 30px;
        }
    }
    
    .nav-menu {
        display: none;
    }
    
    .search-box {
        flex-direction: column;
        border-radius: 20px;
        padding: 15px;
        gap: 15px;
    }
    
    .search-input {
        width: 100%;
        text-align: center;
    }
    
    .search-button {
        width: 100%;
        justify-content: center;
    }
    

    
    .search-icon-left {
        margin: 0;
        align-self: center;
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-title {
        font-size: 36px;
    }

    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }

    .categories-grid {
        gap: 15px;
        justify-content: center;
    }
    
    .category-card {
        max-width: 170px;
    }
    
    .category-image {
        width: 120px !important;
        height: 120px !important;
    }
    
    .categories-grid-all {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }

    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Ensure desktop layout is maintained */
    @media (min-width: 768px) {
        .recipes-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 30px;
        }
    }

    .newsletter-form {
        flex-direction: column;
        gap: 15px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .section-title {
        font-size: 28px;
    }

    .newsletter h2 {
        font-size: 28px;
    }

    .modal-content {
        margin: 10% auto;
        padding: 30px;
        width: 95%;
    }
    
    .search-container form {
        flex-direction: column;
        gap: 15px;
    }
    
    .search-submit-btn {
        width: 100%;
        justify-content: center;
    }

    .page-title {
        font-size: 32px;
    }

    .recipe-header-content {
        gap: 5px;
        text-align: left;
    }
    
    .recipe-header-text {
        padding: 10px 15px;
        text-align: left;
    }

    .recipe-header-text .recipe-title {
        font-size: 32px;
    }

    .recipe-content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .recipe-actions {
        justify-content: flex-start;
        gap: 20px;
        flex-wrap: wrap;
    }
    
    .action-btn {
        flex: 1;
        min-width: 120px;
        justify-content: center;
    }
    
    .recipe-rating-display {
        flex-wrap: wrap;
        gap: 10px;
        justify-content: flex-start;
    }
    
    .rating-summary {
        flex-direction: column;
        gap: 16px;
    }
}

@media (max-width: 480px) {
    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    /* Ensure desktop layout is maintained */
    @media (min-width: 768px) {
        .recipes-grid {
            grid-template-columns: repeat(3, 1fr);
            gap: 30px;
        }
    }
    
    .categories-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr); /* max 3 per row */
        gap: 8px; /* reduced gap only for ≤480px */
        justify-content: center;
        padding: 0 12px; /* add side padding on small screens */
    }
    
    .category-card {
        max-width: none; /* let grid control width */
        width: 100%;
    }
    
    
    .categories-grid-all {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .category-card {
        padding: 10px 8px; /* reduced padding on small screens */
        min-height: 100px;
    }
    
    .category-card h3 {
        font-size: 16px;
    }
    
    .category-card p {
        font-size: 13px;
    }
    
    .category-icon {
        font-size: 36px;
    }
    
    .category-image {
        width: 110px !important; /* fits 3 columns on small screens */
        height: 110px !important;
    }
    .container {
        padding: 0 15px;
    }

    .hero {
        padding: 100px 0 30px;
    }

    .hero-title {
        font-size: 28px;
    }

    .hero-subtitle {
        font-size: 16px;
    }

    .category-card {
        padding: 10px 8px; /* keep consistent reduced padding */
    }

    .recipe-content {
        padding: 20px;
    }

    .newsletter {
        margin: 0;
        padding: 60px 0 100px;
    }

    .nav-container {
        padding: 0 15px;
    }

    .nav-actions {
        gap: 6px;
    }

    .mobile-search-btn {
        padding: 8px;
        font-size: 18px;
        margin-right: 4px;
    }

    .user-btn {
        padding: 8px 16px;
        font-size: 12px;
    }
    
    .breadcrumb-separator {
        margin: 0 2px;
    }
}

/* Extra-narrow screens: step down columns from 3 → 2 → 1 */
@media (max-width: 360px) {
    .categories-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 6px;
    }
    .category-image {
        width: 100px !important;
        height: 100px !important;
    }
}

@media (max-width: 340px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .category-card { width: 100%; }
    .category-image {
        width: 120px !important;
        height: 120px !important;
        margin: 0 auto 12px;
    }
}

/* Recipe Statistics Box */
.recipe-stats-section {
    padding: 40px 0;
    background-color: #fafafa;
}

.recipe-stats-box {
    background: white;
    border: 2px solid #20B2AA;
    border-radius: 16px;
    padding: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 600px;
    margin: 0 auto 30px auto;
    box-shadow: 0 4px 20px rgba(32, 178, 170, 0.1);
}


.stat-item {
    text-align: center;
    flex: 1;
}

.stat-label {
    font-size: 14px;
    font-weight: 500;
    color: #666;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #333;
    line-height: 1.2;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background-color: #ddd;
    margin: 0 20px;
}

/* Responsive design for recipe stats */
@media (max-width: 768px) {
    .recipe-stats-section {
        padding: 10px 0;
    }
    
    .recipe-stats-box {
        flex-direction: column;
        gap: 15px;
        padding: 20px 15px;
        margin: 0 15px 15px 15px;
    }
    
    .stat-divider {
        width: 100%;
        height: 1px;
        margin: 0;
    }
    
    .stat-item {
        text-align: center;
    }
    
}

@media (max-width: 480px) {
    .recipe-stats-section {
        padding: 5px 0;
    }
    
    .recipe-stats-box {
        padding: 15px 10px;
        margin: 0 10px 10px 10px;
    }
    
    
    .stat-label {
        font-size: 12px;
    }
    
    .stat-value {
        font-size: 20px;
    }
}

/* Sidebar Styles */
.sidebar-search {
    background: white;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(32, 178, 170, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-search::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #20B2AA, #1a9a94);
}

.sidebar-search:hover {
    border-color: rgba(32, 178, 170, 0.3);
    box-shadow: 0 6px 25px rgba(32, 178, 170, 0.15);
    transform: translateY(-2px);
}

.search-input-group {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid transparent;
    transition: all 0.3s ease;
}

.search-input-group:focus-within {
    border-color: #20B2AA;
    background: white;
    box-shadow: 0 0 0 3px rgba(32, 178, 170, 0.1);
}

.search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    outline: none;
}

.search-input::placeholder {
    color: #999;
}

.search-btn-sidebar {
    background: #20B2AA;
    color: white;
    border: none;
    padding: 12px 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-btn-sidebar:hover {
    background: #1a9a94;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.3);
}

/* User Profile Card */
.sidebar-user-about {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    border: 1px solid rgba(32, 178, 170, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-user-about::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #20B2AA, #1a9a94);
}

.sidebar-user-about:hover {
    border-color: rgba(32, 178, 170, 0.3);
    box-shadow: 0 6px 25px rgba(32, 178, 170, 0.15);
    transform: translateY(-2px);
}

.user-profile-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 3px solid #f0f0f0;
}

.user-profile-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-greeting {
    font-size: 18px;
    font-weight: 700;
    color: #0f766e;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.user-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 15px;
    font-style: italic;
    font-family: 'Georgia', serif;
}

.user-bio {
    font-size: 14px;
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
}

.learn-more-btn {
    background: #0f766e;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.learn-more-btn:hover {
    background: #0d5d56;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(15, 118, 110, 0.3);
}

/* Sidebar Categories */
.sidebar-categories {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(32, 178, 170, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-categories::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #20B2AA, #1a9a94);
}

.sidebar-categories:hover {
    border-color: rgba(32, 178, 170, 0.3);
    box-shadow: 0 6px 25px rgba(32, 178, 170, 0.15);
    transform: translateY(-2px);
}

.sidebar-title {
    font-size: 18px;
    font-weight: 600;
    color: #0f766e;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid rgba(32, 178, 170, 0.2);
    padding-bottom: 10px;
}

.sidebar-categories-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.sidebar-category-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 12px;
    border-radius: 16px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid transparent;
    min-height: 80px;
    text-align: center;
}

.sidebar-category-item:hover {
    background: linear-gradient(135deg, #20B2AA 0%, #1a9a94 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(32, 178, 170, 0.3);
    border-color: #20B2AA;
}

.category-icon-sidebar {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #20B2AA 0%, #1a9a94 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.category-icon-sidebar i {
    font-size: 18px;
    color: white;
}

.sidebar-category-item:hover .category-icon-sidebar {
    background: rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

.sidebar-category-item:hover .category-icon-sidebar i {
    color: white;
}

.sidebar-category-item img {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    object-fit: cover;
    margin-bottom: 8px;
}

.sidebar-category-item span {
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
}

/* Cook Mode Toggle */
.cook-mode-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid rgba(32, 178, 170, 0.1);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-checkmark {
    color: white;
    font-weight: bold;
    font-size: 14px;
    opacity: 0;
    transition: 0.3s;
    position: absolute;
    left: 35%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    pointer-events: none;
}

input:checked + .toggle-slider {
    background-color: #20B2AA;
}

input:checked + .toggle-slider:before {
    transform: translateX(22px);
}

input:checked + .toggle-slider .toggle-checkmark {
    opacity: 1;
    color: white;
}

.cook-mode-text {
    font-size: 14px;
    font-weight: 600;
    color: #333;
}

/* Sidebar Popular Recipes */
.sidebar-popular-recipes {
    background: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(32, 178, 170, 0.1);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.sidebar-popular-recipes::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #20B2AA, #1a9a94);
}

.sidebar-popular-recipes:hover {
    border-color: rgba(32, 178, 170, 0.3);
    box-shadow: 0 6px 25px rgba(32, 178, 170, 0.15);
    transform: translateY(-2px);
}

.sidebar-recipes-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sidebar-recipe-item {
    display: flex;
    gap: 15px;
    padding: 16px;
    border-radius: 10px;
    transition: all 0.3s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.sidebar-recipe-item:hover {
    background: rgba(32, 178, 170, 0.1);
    transform: translateX(5px);
    border-left: 3px solid transparent;
    padding-left: 16px;
}

.sidebar-recipe-image {
    width: 70px;
    height: 70px;
    border-radius: 10px;
    overflow: hidden;
    flex-shrink: 0;
}

.sidebar-recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sidebar-recipe-content {
    flex: 1;
    min-width: 0;
}

.sidebar-recipe-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.sidebar-recipe-meta {
    display: flex;
    font-size: 14px;
    color: #666;
}

.recipe-meta-single-row {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    gap: 12px;
}

.left-meta-items {
    display: flex;
    align-items: center;
    gap: 12px;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #666;
}

.meta-item i {
    font-size: 10px;
    color: #0f766e;
}

.meta-item.servings i {
    color: #0f766e;
}

.meta-item.prep-time i {
    color: #0f766e;
}

.meta-item.prep-time {
    font-size: 14px !important;
}

.star-with-review {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #0f766e;
    font-weight: 600;
}

.star-with-review i {
    font-size: 14px;
    color: #0f766e;
}

.star-with-review .rating-value {
    font-size: 11px;
    color: #666;
    font-weight: 500;
}

/* Mobile Responsive for Sidebar - High Priority */
@media (max-width: 768px) {
    .recipe-content-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        display: flex !important;
        flex-direction: column !important;
    }
    
    /* Increase icon sizes for mobile in popular recipes */
    .sidebar-recipe-meta .meta-item i {
        font-size: 12px !important;
    }
    
    .sidebar-recipe-meta .star-with-review i {
        font-size: 16px !important;
    }
    
    .sidebar-recipe-meta .meta-item {
        font-size: 12px !important;
    }
    
    .sidebar-recipe-meta .star-with-review .rating-value {
        font-size: 12px !important;
    }
    
    .sidebar-popular-recipes {
        margin-bottom: 40px !important;
    }
    
    
    .recipe-main-content {
        order: 1 !important;
        width: 100% !important;
        margin-bottom: 30px !important;
    }
    
    .recipe-sidebar {
        order: 2 !important;
        width: 100% !important;
        margin-bottom: 30px !important;
        background: transparent !important;
        border: none !important;
        padding: 0 !important;
        display: flex !important;
        flex-direction: column !important;
        gap: 20px !important;
    }
    
    .sidebar-search,
    .sidebar-user-about,
    .sidebar-categories,
    .sidebar-popular-recipes {
        padding: 20px !important;
        margin-bottom: 20px !important;
        background: white !important;
        border-radius: 16px !important;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
    }
    
    .user-profile-image {
        width: 60px !important;
        height: 60px !important;
    }
    
    .user-greeting {
        font-size: 16px !important;
    }
    
    .sidebar-title {
        font-size: 16px !important;
    }
}

/* Tablet layout - slightly wider sidebar */
@media (min-width: 769px) and (max-width: 1024px) {
    .recipe-content-grid {
        grid-template-columns: 2fr 1fr;
        gap: 30px;
        display: grid;
    }
}

/* Recipe Content Grid Layout - Consolidated */

.recipe-main-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.recipe-sidebar {
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.comments-list h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 20px;
    text-align: center;
}

/* Reviews Section */
.reviews-list {
    margin-bottom: 40px;
}

.reviews-list h3 {
    font-size: 24px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 30px;
    text-align: center;
}

.no-reviews {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
}

.review {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
}

.review-header {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 16px;
    gap: 12px;
}

.review-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.review-author {
    font-weight: 600;
    color: #2d3748;
    font-size: 16px;
    text-align: left;
}

.review-website {
    font-size: 14px;
    color: #667eea;
}

.review-website a {
    color: inherit;
    text-decoration: none;
}

.review-website a:hover {
    text-decoration: underline;
}

.review-date {
    font-size: 12px;
    color: #666;
}

.review-rating {
    display: flex;
    gap: 2px;
}

.review-rating .fas.fa-star {
    color: #ddd;
    font-size: 16px;
}

.review-rating .fas.fa-star.active {
    color: #ffc107;
}

.review-content {
    color: #2d3748;
    line-height: 1.6;
    font-size: 14px;
}

/* Recipe Categories Section */
.recipe-categories-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
}

.categories-header {
    text-align: center;
    margin-bottom: 50px;
}

.categories-header h2 {
    font-size: 36px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
}

.categories-header p {
    font-size: 18px;
    color: #64748b;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.recipe-categories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}

.recipe-category-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 24px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid #e2e8f0;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.recipe-category-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #20B2AA, #1a9a94);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.recipe-category-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(32, 178, 170, 0.15);
    border-color: #20B2AA;
}

.recipe-category-card:hover::before {
    transform: scaleX(1);
}

.category-icon-wrapper {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #20B2AA, #1a9a94);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.category-icon-wrapper i {
    font-size: 24px;
    color: white;
}

.category-content {
    flex: 1;
    min-width: 0;
}

.category-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 8px;
    line-height: 1.3;
}

.category-content p {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
    line-height: 1.4;
}

.category-count {
    font-size: 12px;
    color: #0f766e;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.category-arrow {
    color: #cbd5e0;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.recipe-category-card:hover .category-arrow {
    color: #0f766e;
    transform: translateX(4px);
}

/* Mobile Responsive for Categories */
@media (max-width: 768px) {
    .recipe-categories-section {
        padding: 60px 0;
    }
    
    .categories-header h2 {
        font-size: 28px;
    }
    
    .categories-header p {
        font-size: 16px;
    }
    
    .recipe-categories-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 0 20px;
    }
    
    .recipe-category-card {
        padding: 20px;
        gap: 16px;
    }
    
    .category-icon-wrapper {
        width: 50px;
        height: 50px;
    }
    
    .category-icon-wrapper i {
        font-size: 20px;
    }
    
    .category-content h3 {
        font-size: 16px;
    }
    
    .category-content p {
        font-size: 13px;
    }
}

/* High Priority Mobile Breadcrumbs Fix - Must be at the end */
@media (max-width: 768px) {
    /* Hide breadcrumbs completely on mobile */
    .recipe-header .breadcrumbs {
        display: none !important;
    }
    
    /* Move recipe title to top on mobile */
    .recipe-header {
        margin-bottom: 0 !important;
        padding: 5px 0 0 !important;
        min-height: 20px !important;
    }
    
    /* Reduce top margin since no breadcrumbs */
    .recipe-content-section {
        padding: 0 0 20px !important;
    }
    
    .recipe-content-grid {
        margin-top: 0 !important;
        margin-bottom: 15px !important;
    }
    
    /* Ensure recipe title is at the very top */
    .recipe-header-content {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .recipe-header-text {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
    
    .recipe-title {
        margin-top: 0 !important;
        padding-top: 0 !important;
    }
}

/* Step Images in Recipe Display */
.step-image-container {
    margin-top: 15px;
    text-align: left;
}

.step-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.step-image:hover {
    transform: scale(1.02);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.step-image-credits {
    margin-top: 8px;
    text-align: left;
}

.step-image-credits small {
    color: #666;
    font-style: italic;
    font-size: 12px;
}

/* Jump to Recipe Button Section - Clean Line Design */
.jump-to-recipe-section {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
    padding: 15px 0;
    background: transparent;
    border: none;
    overflow: visible;
}

.jump-divider {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e2e8f0;
    z-index: 1;
}

.jump-to-recipe-btn {
    position: relative;
    z-index: 3;
    background: linear-gradient(135deg, rgba(32, 178, 170, 0.8) 0%, rgba(26, 154, 148, 0.9) 100%);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    padding: 14px 28px;
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 32px rgba(32, 178, 170, 0.3);
    backdrop-filter: blur(20px);
    min-width: 180px;
    justify-content: center;
    overflow: hidden;
}

.jump-to-recipe-btn span {
    position: relative;
    z-index: 2;
}

.jump-to-recipe-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%, rgba(255, 255, 255, 0.1) 100%);
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.jump-to-recipe-btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 40px rgba(32, 178, 170, 0.4);
    background: linear-gradient(135deg, rgba(32, 178, 170, 0.9) 0%, rgba(26, 154, 148, 1) 100%);
    border-color: rgba(255, 255, 255, 0.3);
}

.jump-to-recipe-btn:hover::before {
    opacity: 1;
}

.jump-to-recipe-btn:active {
    transform: translateY(-1px) scale(1.01);
}

.jump-to-recipe-btn i {
    font-size: 12px;
    transition: all 0.4s ease;
    color: white;
    position: relative;
    z-index: 2;
}

.jump-to-recipe-btn:hover i {
    transform: translateY(2px);
}

/* Recipe Notes Section */
.recipe-notes {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, rgba(32, 178, 170, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 15px;
    border-left: 4px solid #20B2AA;
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.1);
    /* Prevent layout shifts */
    contain: layout;
    will-change: auto;
}

.recipe-notes h2 {
    color: #0f766e;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.recipe-notes h2 i {
    font-size: 20px;
}

.notes-content {
    background: rgba(255, 255, 255, 0.8);
    padding: 20px;
    border-radius: 10px;
    border: 1px solid rgba(32, 178, 170, 0.1);
}

.notes-content p {
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
    font-size: 16px;
}

/* Alternative Note Section Style - Modern Card Design */
.recipe-notes.modern-style {
    margin: 40px 0;
    padding: 0;
    background: transparent;
    border-radius: 20px;
    border: none;
    box-shadow: none;
    position: relative;
    overflow: hidden;
}

.recipe-notes.modern-style::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0.05;
    border-radius: 20px;
    z-index: 1;
}

.recipe-notes.modern-style h2 {
    color: #4a1a4a;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    z-index: 2;
    padding: 30px 30px 0 30px;
}

.recipe-notes.modern-style h2 i {
    font-size: 24px;
    color: #501850;
}

.recipe-notes.modern-style .notes-content {
    background: rgba(255, 255, 255, 0.95);
    padding: 0 30px 30px 30px;
    border-radius: 16px;
    border: 2px solid rgba(102, 126, 234, 0.1);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.15);
    position: relative;
    z-index: 2;
    backdrop-filter: blur(10px);
    margin: 0 30px 30px 30px;
}

.recipe-notes.modern-style .notes-content p {
    color: #2d3748;
    line-height: 1.7;
    margin: 0;
    font-size: 17px;
    font-weight: 500;
    padding-top: 15px;
}

/* Alternative Note Section Style - Minimalist Design */
.recipe-notes.minimalist-style {
    margin: 40px 0;
    padding: 25px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: none;
    position: relative;
}

.recipe-notes.minimalist-style h2 {
    color: #1a202c;
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.recipe-notes.minimalist-style h2 i {
    font-size: 18px;
    color: #4a5568;
}

.recipe-notes.minimalist-style .notes-content {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.recipe-notes.minimalist-style .notes-content p {
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
    font-size: 15px;
}

/* Alternative Note Section Style - Highlight Design */
.recipe-notes.highlight-style {
    margin: 40px 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    border: none;
    box-shadow: none;
    position: relative;
}

.recipe-notes.highlight-style::before {
    content: '';
    position: absolute;
    top: 0;
    left: -20px;
    right: -20px;
    bottom: 0;
    background: linear-gradient(135deg, #ffecd2 0%, #fcb69f 100%);
    border-radius: 0;
    z-index: 1;
}

.recipe-notes.highlight-style h2 {
    color: #8b4513;
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
    z-index: 2;
    padding: 25px 25px 0 25px;
}

.recipe-notes.highlight-style h2 i {
    font-size: 22px;
    color: #d2691e;
}

.recipe-notes.highlight-style .notes-content {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 0;
    border: none;
    box-shadow: none;
    position: relative;
    z-index: 2;
    margin: 0 25px 25px 25px;
}

.recipe-notes.highlight-style .notes-content p {
    color: #5d4e37;
    line-height: 1.6;
    margin: 0;
    font-size: 16px;
    font-weight: 500;
}

/* Nutrition Facts Section */
.nutrition-facts {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, rgba(32, 178, 170, 0.08) 0%, rgba(255, 255, 255, 0.05) 100%);
    border-radius: 15px;
    border: 1px solid rgba(32, 178, 170, 0.2);
    box-shadow: 0 6px 20px rgba(32, 178, 170, 0.15);
}

.nutrition-facts h2 {
    color: #0f766e;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: center;
    justify-content: center;
}

.nutrition-facts h2 i {
    font-size: 20px;
}

.nutrition-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.nutrition-item {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid rgba(32, 178, 170, 0.1);
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nutrition-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(32, 178, 170, 0.2);
    border-color: rgba(32, 178, 170, 0.3);
}

.nutrition-label {
    font-size: 14px;
    color: #666;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.nutrition-value {
    font-size: 24px;
    font-weight: 700;
    color: #0f766e;
    margin: 0;
}

/* FAQ Section */
.recipe-faq {
    margin: 40px 0;
    padding: 30px;
    background: linear-gradient(135deg, rgba(32, 178, 170, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%);
    border-radius: 15px;
    border: 1px solid rgba(32, 178, 170, 0.1);
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.1);
}

.recipe-faq h2 {
    color: #0f766e;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-align: center;
    justify-content: center;
}

.recipe-faq h2 i {
    font-size: 20px;
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    border-radius: 10px;
    border: 1px solid rgba(32, 178, 170, 0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(32, 178, 170, 0.3);
    box-shadow: 0 4px 15px rgba(32, 178, 170, 0.1);
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(32, 178, 170, 0.05);
    transition: all 0.3s ease;
}

.faq-question:hover {
    background: rgba(32, 178, 170, 0.1);
}

.faq-question h3 {
    color: #2d3748;
    font-size: 16px;
    font-weight: 600;
    margin: 0;
    flex: 1;
}

.faq-question i {
    color: #0f766e;
    font-size: 14px;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.9);
}

.faq-item.active .faq-answer {
    padding: 20px;
    max-height: 200px;
}

.faq-answer p {
    color: #4a5568;
    line-height: 1.6;
    margin: 0;
    font-size: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .jump-to-recipe-section {
        margin: 2px 6px;
        padding: 10px 0;
    }
    
    /* Recipe Notes Responsive */
    .recipe-notes {
        margin: 30px 0;
        padding: 20px;
    }
    
    .recipe-notes h2 {
        font-size: 20px;
    }
}

/* Hero Slider Section */
.hero-slider-section {
    padding: 50px 0 60px 0;
    background: transparent;
    margin-bottom: 40px;
    width: 100%;
    overflow: hidden;
    margin-top: 0px;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.hero-slider-section .container {
    max-width: 1200px;
    width: 100%;
}

/* Slider and Trending Wrapper */
.slider-trending-wrapper {
    display: flex;
    gap: 30px;
    align-items: stretch;
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    min-height: 450px;
}

.hero-slider-container {
    position: relative;
    flex: 0 0 60%;
    max-width: 720px;
    width: 100%;
    margin: 0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    background: transparent;
    min-height: 450px;
    display: flex;
    flex-direction: column;
}

/* Trending Recipes */
.trending-recipes-container {
    flex: 0 0 40%;
    max-width: 480px;
    width: 100%;
    min-width: 350px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.trending-title {
    font-size: 24px;
    font-weight: 700;
    color: #2d3748;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

.trending-icon {
    font-size: 28px;
    animation: pulse 2s infinite;
}

.trending-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 12px;
    flex: 1;
    height: 100%;
    align-content: stretch;
}

.trending-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.trending-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.trending-image {
    position: relative;
    width: 100%;
    height: 110px;
    overflow: hidden;
    flex-shrink: 0;
}

.trending-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.trending-card:hover .trending-image img {
    transform: scale(1.05);
}

.trending-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 11px;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}

.views-count {
    font-weight: 700;
    font-size: 12px;
}

.views-label {
    font-size: 9px;
    opacity: 0.8;
}

.trending-content {
    padding: 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 60px;
}

.trending-recipe-title {
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.trending-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    color: #666;
}

.trending-time {
    display: flex;
    align-items: center;
    gap: 4px;
}

.trending-time i {
    font-size: 10px;
}

.trending-difficulty {
    padding: 2px 6px;
    border-radius: 8px;
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
}

.trending-difficulty:contains("Easy") {
    background: #e6fffa;
    color: #00a99d;
}

.trending-difficulty:contains("Medium") {
    background: #fff7e6;
    color: #ff8c00;
}

.trending-difficulty:contains("Hard") {
    background: #ffe6e6;
    color: #e53e3e;
}

.hero-slider {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 450px;
    overflow: hidden;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    flex: 1;
    border-radius: 20px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.2);
}

/* Add a subtle vignette overlay for depth */
.hero-slider::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    pointer-events: none;
    background: radial-gradient(ellipse at center, transparent 40%, rgba(0, 0, 0, 0.12) 100%);
    z-index: 3;
    border-radius: 20px;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out;
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    z-index: 1;
    overflow: hidden;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* Smooth zoom effect on active slide image */
.slide.active .slide-image {
    animation: smoothZoom 8s ease-in-out forwards;
}

/* Keyframes for image zoom effect */
@keyframes smoothZoom {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.slide-link {
    display: flex;
    width: 100%;
    height: 100%;
    text-decoration: none;
    color: inherit;
    flex: 1;
    align-items: stretch;
    cursor: pointer;
    pointer-events: auto;
    position: relative;
    z-index: 1;
    transition: transform 0.3s ease;
}

.slide-link:hover .slide-image {
    filter: brightness(1.1);
}

.slide-link:active {
    transform: scale(0.98);
}

.slide-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    flex: 1;
    min-height: 100%;
    object-position: center center;
    transition: filter 0.4s ease, transform 0.3s ease;
}

.slide-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.5) 50%, transparent 100%);
    padding: 35px 30px 70px;
    color: white;
    pointer-events: none;
    z-index: 2;
}

.slide-text {
    text-align: center;
}

/* Animate slide title */
.slide-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 10px;
    color: white;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.8), 0 1px 3px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.slide.active .slide-title {
    animation: slideUpFadeIn 0.8s ease-out 0.3s forwards;
}

/* Animate slide subtitle */
.slide-subtitle {
    font-size: 18px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
    margin: 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    line-height: 1.4;
}

.slide.active .slide-subtitle {
    animation: slideUpFadeIn 0.8s ease-out 0.5s forwards;
}

/* Keyframes for text slide up and fade in animation */
@keyframes slideUpFadeIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 20;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid rgba(255, 255, 255, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: all;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    z-index: 20;
    opacity: 0.85;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.nav-btn:hover {
    background: white;
    transform: scale(1.15) translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
    opacity: 1;
    border-color: rgba(255, 255, 255, 0.5);
}

.nav-btn:active {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.nav-btn i {
    font-size: 18px;
    color: #333;
    transition: transform 0.3s ease;
}

.nav-btn:hover i {
    transform: scale(1.1);
}

.slider-dots {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
    z-index: 20;
    padding: 8px 16px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 50px;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.6);
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.dot::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background: white;
    transition: all 0.4s ease;
}

.dot.active {
    background: white;
    border-color: white;
    transform: scale(1.3);
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

.dot.active::before {
    width: 100%;
    height: 100%;
}

.dot:hover {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.9);
    transform: scale(1.15);
}

/* Responsive Hero Slider */
@media (max-width: 768px) {
    .hero-slider-section {
        padding: 35px 0 45px 0;
        width: 100%;
        margin-top: 0px;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .hero-slider-section .container {
        padding: 0 20px;
        max-width: 100%;
        width: 100%;
    }
    
    .slider-trending-wrapper {
        flex-direction: column;
        gap: 30px;
        min-height: auto;
    }
    
    .hero-slider-container {
        flex: none;
        max-width: 100%;
        width: 100%;
        min-height: 300px;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .trending-recipes-container {
        flex: none;
        max-width: 100%;
        width: 100%;
        min-width: unset;
        justify-content: flex-start;
    }
    
    .trending-title {
        font-size: 24px;
        text-align: center;
        margin-bottom: 20px;
    }
    
    .trending-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
        gap: 15px;
        height: auto;
    }
    
    .trending-card {
        display: flex;
        align-items: center;
        gap: 15px;
        height: auto;
        min-height: 120px;
        flex-direction: row;
    }
    
    .trending-image {
        width: 120px;
        height: 120px;
        flex-shrink: 0;
    }
    
    .trending-content {
        flex: 1;
        padding: 15px;
        justify-content: flex-start;
        min-height: auto;
    }
    
    .trending-recipe-title {
        font-size: 16px;
        margin-bottom: 10px;
        -webkit-line-clamp: 2;
    }
    
    .trending-meta {
        font-size: 13px;
    }
    
    .hero-slider {
        min-height: 300px;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .slide {
        display: flex !important;
        visibility: visible !important;
        opacity: 0;
    }
    
    .slide.active {
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 2;
    }
    
    /* Ensure non-active slides are hidden */
    .slide:not(.active) {
        opacity: 0 !important;
        visibility: hidden !important;
        z-index: 1;
    }
    
    .slide-image {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        flex: 1 !important;
        min-height: 100% !important;
    }
}

/* Extra Small Screens - Very small mobile devices */
@media (max-width: 480px) {
    .hero-slider-section {
        padding: 20px 0 30px 0 !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    /* Force single column for trending recipes on very small screens */
    .trending-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 12px !important;
    }
    
    .hero-slider-section .container {
        padding: 0 10px !important;
        max-width: 100%;
        width: 100%;
    }
    
    .slider-trending-wrapper {
        flex-direction: column !important;
        gap: 20px !important;
        min-height: auto !important;
    }
    
    .hero-slider-container {
        flex: none !important;
        max-width: 100%;
        width: 100%;
        min-height: 250px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        border-radius: 15px !important;
    }
    
    .hero-slider {
        min-height: 250px !important;
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 250px !important;
    }
    
    .slide {
        display: flex !important;
        visibility: visible !important;
        opacity: 0;
        width: 100% !important;
        height: 100% !important;
        min-height: 250px !important;
    }
    
    .slide.active {
        opacity: 1 !important;
        visibility: visible !important;
        z-index: 2;
    }
    
    .slide:not(.active) {
        opacity: 0 !important;
        visibility: hidden !important;
        z-index: 1;
    }
    
    .slide-image {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
        width: 100% !important;
        height: 100% !important;
        min-height: 250px !important;
        object-fit: cover !important;
    }
    
    .slide-content {
        padding: 20px 15px 55px !important;
    }
    
    .slide-title {
        font-size: 20px !important;
        margin-bottom: 8px !important;
    }
    
    .slide-subtitle {
        font-size: 14px !important;
    }
    
    .slider-nav {
        padding: 0 10px !important;
    }
    
    .nav-btn {
        width: 35px !important;
        height: 35px !important;
        font-size: 12px !important;
        opacity: 0.75 !important;
    }
    
    .nav-btn:hover {
        opacity: 1 !important;
    }
    
    .slider-dots {
        bottom: 10px !important;
        gap: 6px !important;
        padding: 6px 12px !important;
    }
    
    .dot {
        width: 8px !important;
        height: 8px !important;
    }
    
    /* Trending Recipes Fix for Small Screens */
    .trending-recipes-container {
        flex: none !important;
        max-width: 100%;
        width: 100%;
        min-width: unset !important;
        justify-content: flex-start !important;
    }
    
    .trending-grid {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
        gap: 12px !important;
        height: auto !important;
    }
    
    .trending-card {
        display: flex !important;
        align-items: center !important;
        gap: 12px !important;
        height: auto !important;
        min-height: 100px !important;
        flex-direction: row !important;
        padding: 0 !important;
        border-radius: 10px !important;
    }
    
    .trending-image {
        width: 100px !important;
        height: 100px !important;
        flex-shrink: 0 !important;
        border-radius: 8px !important;
        overflow: hidden !important;
    }
    
    .trending-image img {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        display: block !important;
    }
    
    .trending-content {
        flex: 1 !important;
        padding: 10px !important;
        justify-content: flex-start !important;
        min-height: auto !important;
    }
    
    .trending-recipe-title {
        font-size: 14px !important;
        margin-bottom: 6px !important;
        line-height: 1.3 !important;
        -webkit-line-clamp: 2 !important;
    }
    
    .trending-meta {
        font-size: 11px !important;
        gap: 8px !important;
    }
    
    .trending-badge {
        top: 6px !important;
        right: 6px !important;
        padding: 4px 6px !important;
        border-radius: 8px !important;
        font-size: 10px !important;
    }
    
    .views-count {
        font-size: 10px !important;
    }
    
    .views-label {
        font-size: 8px !important;
    }
}

/* Ultra Small Screens - iPhone SE, very small devices */
@media (max-width: 375px) {
    .hero-slider-section {
        padding: 15px 0 25px 0 !important;
        min-height: 200px !important;
    }
    
    .hero-slider-container {
        min-height: 200px !important;
        border-radius: 12px !important;
    }
    
    .hero-slider {
        min-height: 200px !important;
        height: 200px !important;
    }
    
    .slide {
        min-height: 200px !important;
    }
    
    .slide-image {
        min-height: 200px !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        flex: 1 !important;
    }
    
    .slide-content {
        padding: 18px 10px 48px !important;
    }
    
    .slide-title {
        font-size: 18px !important;
        margin-bottom: 6px !important;
    }
    
    .slide-subtitle {
        font-size: 13px !important;
    }
    
    .nav-btn {
        width: 30px !important;
        height: 30px !important;
        font-size: 10px !important;
        opacity: 0.75 !important;
    }
    
    .nav-btn:hover {
        opacity: 1 !important;
    }
    
    .slider-nav {
        padding: 0 8px !important;
    }
    
    .slider-dots {
        bottom: 8px !important;
        gap: 4px !important;
        padding: 5px 10px !important;
    }
    
    .dot {
        width: 6px !important;
        height: 6px !important;
    }
    
    /* Trending Recipes Fix for Ultra Small Screens */
    .trending-card {
        min-height: 90px !important;
        gap: 10px !important;
    }
    
    .trending-image {
        width: 90px !important;
        height: 90px !important;
    }
    
    .trending-content {
        padding: 8px !important;
    }
    
    .trending-recipe-title {
        font-size: 13px !important;
        margin-bottom: 4px !important;
    }
    
    .trending-meta {
        font-size: 10px !important;
        gap: 6px !important;
    }
}

/* Minimum Screen Support - 320px and below */
@media (max-width: 320px) {
    .hero-slider-section {
        padding: 10px 0 20px 0 !important;
        min-height: 180px !important;
    }
    
    .hero-slider-section .container {
        padding: 0 5px !important;
    }
    
    .hero-slider-container {
        min-height: 180px !important;
        border-radius: 10px !important;
    }
    
    .hero-slider {
        min-height: 180px !important;
        height: 180px !important;
    }
    
    .slide {
        min-height: 180px !important;
    }
    
    .slide-image {
        min-height: 180px !important;
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        flex: 1 !important;
    }
    
    .slide-content {
        padding: 15px 8px 45px !important;
    }
    
    .slide-title {
        font-size: 16px !important;
        margin-bottom: 4px !important;
    }
    
    .slide-subtitle {
        font-size: 12px !important;
    }
    
    .nav-btn {
        width: 28px !important;
        height: 28px !important;
        font-size: 9px !important;
        opacity: 0.75 !important;
    }
    
    .nav-btn:hover {
        opacity: 1 !important;
    }
    
    .slider-nav {
        padding: 0 5px !important;
    }
    
    .slider-dots {
        bottom: 6px !important;
        gap: 3px !important;
        padding: 4px 8px !important;
    }
    
    .dot {
        width: 5px !important;
        height: 5px !important;
    }
    
    /* Trending Recipes Fix for Minimum Screens */
    .trending-card {
        min-height: 80px !important;
        gap: 8px !important;
        border-radius: 8px !important;
    }
    
    .trending-image {
        width: 80px !important;
        height: 80px !important;
        border-radius: 6px !important;
    }
    
    .trending-content {
        padding: 6px !important;
    }
    
    .trending-recipe-title {
        font-size: 12px !important;
        margin-bottom: 3px !important;
    }
    
    .trending-meta {
        font-size: 9px !important;
        gap: 4px !important;
    }
    
    .trending-badge {
        top: 4px !important;
        right: 4px !important;
        padding: 2px 4px !important;
        border-radius: 6px !important;
        font-size: 8px !important;
    }
    
    .views-count {
        font-size: 8px !important;
    }
    
    .views-label {
        font-size: 7px !important;
    }
}

/* Tablet responsive adjustments */
@media (max-width: 1024px) and (min-width: 769px) {
    .slider-trending-wrapper {
        gap: 25px;
    }
    
    .hero-slider-container {
        flex: 0 0 55%;
        max-width: 55%;
    }
    
    .trending-recipes-container {
        flex: 0 0 45%;
        max-width: 45%;
        min-width: 320px;
    }
    
    .trending-grid {
        gap: 10px;
    }
    
    .trending-image {
        height: 100px;
    }
    
    .trending-content {
        padding: 10px;
    }
    
    .trending-recipe-title {
        font-size: 13px;
    }
    
    .trending-meta {
        font-size: 11px;
    }
}
    
    .hero-slider {
        height: 300px;
    }

/* Add pulse animation for trending icon */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

@media (max-width: 768px) {
    .slide-title {
        font-size: 28px;
        margin-bottom: 8px;
    }
    
    .slide-subtitle {
        font-size: 16px;
    }
    
    .slide-content {
        padding: 25px 20px 55px;
    }
    
    .nav-btn {
        width: 40px;
        height: 40px;
        opacity: 0.75;
    }
    
    .nav-btn:hover {
        opacity: 1;
    }
    
    .nav-btn i {
        font-size: 14px;
    }
    
    .slider-dots {
        bottom: 12px;
    }
    
    .dot {
        width: 10px;
        height: 10px;
    }
}

@media (max-width: 480px) {
    .hero-slider-section {
        padding: 25px 0 35px 0;
        width: 100%;
        margin-top: 0px;
    }
    
    .hero-slider-section .container {
        padding: 0 15px;
        max-width: 100%;
    }
    
    .slider-trending-wrapper {
        gap: 25px;
        height: auto;
    }
    
    .hero-slider-container {
        max-width: 100%;
        margin: 0 auto;
        border-radius: 12px;
        height: 250px;
    }
    
    .trending-recipes-container {
        height: auto;
        justify-content: flex-start;
    }
    
    .trending-title {
        font-size: 22px;
    }
    
    .trending-grid {
        gap: 15px;
    }
    
    .trending-card {
        gap: 12px;
    }
    
    .trending-image {
        width: 100px;
        height: 100px;
    }
    
    .trending-content {
        padding: 12px;
    }
    
    .trending-recipe-title {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .trending-meta {
        font-size: 12px;
    }
    
    .hero-slider {
        height: 250px;
    }
    
    .slide-title {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .slide-subtitle {
        font-size: 14px;
    }
    
    .slide-content {
        padding: 20px 15px 55px;
    }
    
    .nav-btn {
        width: 35px;
        height: 35px;
        opacity: 0.75;
    }
    
    .nav-btn:hover {
        opacity: 1;
    }
    
    .nav-btn i {
        font-size: 12px;
    }
    
    .slider-dots {
        bottom: 10px;
        gap: 8px;
    }
    
    .dot {
        width: 8px;
        height: 8px;
    }
}
    
    .notes-content {
        padding: 15px;
    }
    
    /* Footer responsive styles */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: left;
    }
    
    .social-links {
        justify-content: flex-start;
        gap: 20px;
    }
    
    .social-links a {
        width: 45px;
        height: 45px;
        font-size: 20px;
    }
    
    /* Ensure proper left alignment for footer sections */
    .footer-section {
        text-align: left;
    }
    
    .footer-section h3,
    .footer-section h4 {
        text-align: left;
    }
    
    .footer-section ul {
        text-align: left;
    }
    
    /* Responsive styles for alternative note designs */
    .recipe-notes.modern-style h2 {
        font-size: 24px;
        padding: 20px 20px 0 20px;
    }
    
    .recipe-notes.modern-style .notes-content {
        padding: 0 20px 20px 20px;
        margin: 0 20px 20px 20px;
    }
    
    .recipe-notes.minimalist-style {
        padding: 20px;
    }
    
    .recipe-notes.minimalist-style h2 {
        font-size: 20px;
    }
    
    .recipe-notes.highlight-style h2 {
        font-size: 22px;
        padding: 20px 20px 0 20px;
    }
    
    .recipe-notes.highlight-style .notes-content {
        margin: 0 20px 20px 20px;
        padding: 20px;
    }
    
    /* Nutrition Facts Responsive */
    .nutrition-facts {
        margin: 30px 0;
        padding: 20px;
    }
    
    .nutrition-facts h2 {
        font-size: 20px;
    }
    
    .nutrition-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .nutrition-item {
        padding: 15px;
    }
    
    .nutrition-value {
        font-size: 20px;
    }
    
    /* FAQ Responsive */
    .recipe-faq {
        margin: 30px 0;
        padding: 20px;
    }
    
    .recipe-faq h2 {
        font-size: 20px;
    }
    
    .faq-question {
        padding: 15px;
    }
    
    .faq-question h3 {
        font-size: 14px;
    }
    
    .faq-item.active .faq-answer {
        padding: 15px;
    }
    
    .jump-divider {
        left: 30px;
        right: 30px;
    }
    
    .jump-to-recipe-btn {
        padding: 14px 28px;
        font-size: 14px;
        min-width: 180px;
    }

@media (max-width: 480px) {
    .recipe-header-image {
        min-height: 200px;
        background-color: #f5f5f5;
    }
    
    .recipe-header-image img {
        height: auto;
        max-height: 200px;
        object-fit: cover;
        display: block;
    }
    
    .jump-to-recipe-section {
        margin: 2px 6px;
        padding: 10px 0;
    }
    
    .jump-divider {
        left: 20px;
        right: 20px;
    }
    
    .jump-to-recipe-btn {
        padding: 12px 24px;
        font-size: 13px;
        min-width: 160px;
        gap: 8px;
    }
}

/* Category Items - Remove Underlines - High Priority */
.custom-category-item,
.custom-category-item *,
.custom-category-item:hover,
.custom-category-item:hover * {
    text-decoration: none !important;
}

.custom-category-item .category-label span,
.custom-category-item:hover .category-label span {
    text-decoration: none !important;
}

/* Category Items - Circular Shape */
.sidebar-categories .sidebar-category-circle {
    width: 80px !important;
    height: 80px !important;
    border-radius: 50% !important;
    margin: 0 auto 6px !important;
    border: 2px solid #f0f0f0 !important;
}

.sidebar-categories .sidebar-category-circle img {
    border-radius: 50% !important;
}

/* Popular Recipes Section - Custom Text Sizes */
.sidebar-popular-recipes .meta-item {
    font-size: 12px !important;
    display: flex;
    align-items: center;
    gap: 4px;
    color: #666;
}

.sidebar-popular-recipes .meta-item i {
    font-size: 14px !important;
    color: #0f766e;
}

.sidebar-popular-recipes .meta-item.prep-time {
    font-size: 12px !important;
}

.sidebar-popular-recipes .star-with-review {
    display: flex;
    align-items: center;
    gap: 4px;
    color: #0f766e;
    font-weight: 600;
}

.sidebar-popular-recipes .star-with-review i {
    font-size: 14px !important;
    color: #0f766e;
}

.sidebar-popular-recipes .star-with-review .rating-value {
    font-size: 12px !important;
    color: #666;
    font-weight: 500;
}

/* Related Recipes Section - Increase Icon Sizes */
.related-recipes .recipe-meta .meta-item i {
    font-size: 16px !important;
    color: #0f766e;
}

/* Cookie Warning Modal Popup Styles */
.cookie-warning-banner {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    height: 100vh !important;
    background: rgba(0, 0, 0, 0.5) !important;
    z-index: 999999 !important;
    display: flex !important;
    align-items: flex-end !important;
    justify-content: center !important;
    padding-bottom: 10vh !important;
    opacity: 0 !important;
    visibility: hidden !important;
    transition: opacity 0.3s ease, visibility 0.3s ease !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.cookie-warning-banner.show {
    opacity: 1 !important;
    visibility: visible !important;
}

/* Ensure no parent containers affect positioning */
html, body {
    position: relative !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Prevent any container from affecting the cookie banner */
footer, main, .container, .wrapper {
    position: relative !important;
}


.cookie-warning-content {
    background: white !important;
    border-radius: 12px !important;
    padding: 30px !important;
    max-width: 400px !important;
    width: 90% !important;
    text-align: center !important;
    position: relative !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3) !important;
    transform: translateY(20px) !important;
    transition: transform 0.3s ease !important;
    margin: 0 !important;
    box-sizing: border-box !important;
}

.cookie-warning-banner.show .cookie-warning-content {
    transform: translateY(0) !important;
}

.cookie-close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.cookie-close-btn:hover {
    background: #f5f5f5;
    color: #333;
}

.cookie-warning-message {
    color: #333 !important;
    font-size: 16px !important;
    line-height: 1.6 !important;
    margin-bottom: 25px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    text-align: center !important;
}

.cookie-warning-message a {
    color: #007bff !important;
    text-decoration: underline !important;
}

.cookie-warning-message a:hover {
    color: #0056b3 !important;
}

.cookie-warning-actions {
    display: flex !important;
    justify-content: center !important;
    margin: 0 !important;
}

.cookie-accept-btn {
    background: #17a2b8 !important;
    color: white !important;
    border: none !important;
    padding: 12px 24px !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    font-weight: 500 !important;
    cursor: pointer !important;
    transition: all 0.2s ease !important;
    min-width: 140px !important;
}

.cookie-accept-btn:hover {
    background: #138496 !important;
    transform: translateY(-1px) !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-warning-banner {
        padding-bottom: 10vh !important;
    }
    
    .cookie-warning-content {
        max-width: 350px !important;
        padding: 25px 20px !important;
        margin: 0 15px !important;
    }
    
    .cookie-warning-message {
        font-size: 15px !important;
        margin-bottom: 20px !important;
    }
    
    .cookie-accept-btn {
        padding: 10px 20px !important;
        font-size: 15px !important;
    }
}

@media (max-width: 480px) {
    .cookie-warning-banner {
        padding-bottom: 12vh !important;
    }
    
    .cookie-warning-content {
        max-width: 320px !important;
        padding: 20px 15px !important;
        margin: 0 10px !important;
    }
    
    .cookie-warning-message {
        font-size: 14px !important;
        margin-bottom: 18px !important;
    }
    
    .cookie-accept-btn {
        padding: 10px 18px !important;
        font-size: 14px !important;
        min-width: 120px !important;
    }
}




