/* ============================================
   FOODS APP STYLES
   Consistent with Heritage Tourism Theme
   ============================================ */

/* ============================================
   FOODS HERO SECTION
   ============================================ */
.foods-hero {
    position: relative;
    min-height: 350px;
    display: flex;
    align-items: center;
    justify-content: center;
        /* Background Image - Replace with your image path */
    background-image: url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* Fallback gradient if image doesn't load */
    background-color: var(--primary-color);
    margin-top: 60px;
    overflow: hidden;
}

.foods-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

.foods-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0; /* Dark overlay for text readability */
    background: linear-gradient(135deg, rgba(99, 24, 3, 0.6) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.foods-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 3rem 1rem;
}

.foods-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.foods-hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin: 0 auto;
}

/* ============================================
   FOODS SECTION
   ============================================ */
.foods-section {
    background-color: var(--bg-secondary);
    padding: 4rem 0;
}

.foods-section .section-header {
    margin-bottom: 3rem;
}

.foods-section .section-subtitle {
    display: inline-block;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.foods-section .section-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.foods-section .section-line {
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    margin: 0 auto;
    border-radius: 2px;
}

/* ============================================
   FOOD CARDS GRID
   ============================================ */
.foods-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 2rem;
}

.food-card {
    display: block;
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
}

.food-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.food-card-image {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.food-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.food-card:hover .food-card-image img {
    transform: scale(1.08);
}

.food-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(45, 24, 16, 0.8) 100%);
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.food-card:hover .food-card-overlay {
    opacity: 0.9;
}

.food-card-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(168, 60, 50, 0.4);
}

.food-card-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    color: var(--text-muted);
    font-size: 3rem;
}

.food-card-content {
    padding: 1.5rem;
}

.food-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.75rem;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.food-card:hover .food-card-title {
    color: var(--primary-color);
}

.food-card-description {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.food-card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.food-card-link i {
    transition: transform 0.3s ease;
}

.food-card:hover .food-card-link i {
    transform: translateX(5px);
}

/* No Foods State */
.no-foods {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.no-foods i {
    color: var(--primary-color);
    opacity: 0.5;
    margin-bottom: 1rem;
}

.no-foods h3 {
    font-family: 'Playfair Display', serif;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* ============================================
   FOOD DETAIL PAGE
   ============================================ */
.food-detail-section {
    background: var(--bg-secondary);
    padding: 2rem 0 4rem;
    margin-top: 60px;
    min-height: calc(100vh - 60px);
}

/* Food Intro - Full Width Header */
.food-intro {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.food-title {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.2;
}

.food-subtitle {
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 0;
    font-weight: 500;
}

/* ============================================
   FOOD IMAGE GALLERY
   ============================================ */
.food-gallery-wrapper {
    position: sticky;
    top: 80px;
}

.food-main-image-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    cursor: pointer;
}

.food-main-image {
    width: 100%;
    height: 400px;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.food-main-image-container:hover .food-main-image {
    transform: scale(1.02);
}

.food-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(45, 24, 16, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.food-image-overlay i {
    font-size: 2rem;
}

.food-main-image-container:hover .food-image-overlay {
    opacity: 1;
}

.food-no-image {
    width: 100%;
    height: 400px;
    background: linear-gradient(135deg, var(--bg-secondary), var(--bg-tertiary));
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
}

.food-no-image i {
    font-size: 3rem;
    opacity: 0.5;
}

/* Thumbnail Gallery */
.food-thumbnail-gallery {
    display: flex;
    gap: 0.75rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.food-thumbnail-item {
    width: calc(25% - 0.6rem);
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-sm);
}

.food-thumbnail-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.food-thumbnail-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

.food-thumbnail-item:hover img {
    transform: scale(1.1);
}

.food-thumbnail-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px var(--primary-color);
}

/* ============================================
   FOOD CONTENT SECTION
   ============================================ */
.food-content-card {
    background: var(--bg-card);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
}

.food-content-card-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.food-content-card-title i {
    color: var(--primary-color);
}

.food-description-text {
    color: var(--text-secondary);
    line-height: 1.8;
    font-size: 1rem;
}

.food-description-text p {
    margin-bottom: 1rem;
}

/* ============================================
   TRANSLATIONS SECTION
   ============================================ */
.food-translations-list {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.food-translation-item {
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    border-left: 4px solid var(--primary-color);
    transition: all 0.3s ease;
}

.food-translation-item:hover {
    box-shadow: var(--shadow-sm);
}

.food-lang-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.75rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #ffffff;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.75rem;
}

.food-translation-item h4 {
    font-family: 'Playfair Display', serif;
    font-size: 1.15rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.food-translation-item p {
    color: var(--text-secondary);
    line-height: 1.7;
    font-size: 0.95rem;
    margin: 0;
}

/* ============================================
   RELATED EVENTS SECTION
   ============================================ */
.food-related-events {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 1rem;
}

.food-related-event {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-secondary);
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.food-related-event:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-sm);
    transform: translateY(-3px);
}

.food-related-event-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1rem;
    flex-shrink: 0;
    box-shadow: 0 3px 10px rgba(168, 60, 50, 0.25);
}

.food-related-event-content h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.35rem;
    transition: color 0.3s ease;
}

.food-related-event:hover .food-related-event-content h4 {
    color: var(--primary-color);
}

.food-related-event-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ============================================
   BACK BUTTON
   ============================================ */
.btn-back-foods {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-back-foods:hover {
    background: var(--primary-color);
    color: white;
    transform: translateX(-5px);
}

/* ============================================
   IMAGE MODAL
   ============================================ */
.food-modal-image {
    max-height: 90vh;
    border-radius: 10px;
}

/* ============================================
   RESPONSIVE STYLES
   ============================================ */
@media (max-width: 991.98px) {
    .foods-hero-title {
        font-size: 2.5rem;
    }

    .foods-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 1.5rem;
    }

    /* Food Detail - Tablet */
    .food-gallery-wrapper {
        position: static;
        margin-bottom: 2rem;
    }

    .food-main-image {
        height: 350px;
    }

    .food-thumbnail-item {
        width: calc(20% - 0.6rem);
    }

    .food-related-events {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767.98px) {
    .foods-hero {
        min-height: 280px;
    }

    .foods-hero-title {
        font-size: 2rem;
    }

    .foods-hero-subtitle {
        font-size: 1rem;
    }

    .foods-section {
        padding: 3rem 0;
    }

    .foods-section .section-title {
        font-size: 2rem;
    }

    .foods-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }

    .food-card-image {
        height: 200px;
    }

    /* Food Detail - Mobile */
    .food-detail-section {
        padding: 1.5rem 0 3rem;
    }

    .food-title {
        font-size: 1.8rem;
    }

    .food-main-image {
        height: 280px;
    }

    .food-no-image {
        height: 250px;
    }

    .food-thumbnail-gallery {
        gap: 0.5rem;
    }

    .food-thumbnail-item {
        width: calc(25% - 0.4rem);
    }

    .food-content-card {
        padding: 1.25rem;
    }

    .food-image-overlay span {
        display: none;
    }

    .btn-back-foods {
        width: 100%;
        justify-content: center;
    }

    .food-related-events {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .foods-hero-title {
        font-size: 1.75rem;
    }

    .foods-grid {
        gap: 1rem;
    }

    .food-card-content {
        padding: 1.25rem;
    }

    .food-card-title {
        font-size: 1.1rem;
    }

    .food-main-image {
        height: 220px;
    }
}

/* No Results Message */
.no-foods {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-secondary);
}

.no-foods i {
    color: rgba(99, 24, 3, 0.3);
    margin-bottom: 1rem;
}

.no-foods h3 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* Pagination Container */
.pagination {
    margin-top: 3rem;
    gap: 0.5rem;
    padding: 0;
    list-style: none;
}

/* Page Item */
.page-item {
    margin: 0;
}

/* Page Link */
.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    min-width: 44px;
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.page-link:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

/* Active Page */
.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
    font-weight: 700;
    cursor: default;
}

.page-item.active .page-link:hover {
    transform: none;
}

/* Disabled Page */
.page-item.disabled .page-link {
    color: var(--text-muted);
    background: var(--bg-secondary);
    border-color: var(--border-color);
    pointer-events: none;
    cursor: not-allowed;
    opacity: 0.6;
}

.page-item.disabled .page-link:hover {
    background: var(--bg-secondary);
    border-color: var(--border-color);
    color: var(--text-muted);
    transform: none;
}

/* Icon styling in pagination */
.page-link i {
    font-size: 0.85rem;
}

/* ============================================
   SEARCH FILTER CONTAINER
   ============================================ */
.search-filter-container {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

/* Search Toggle Button */
.search-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-toggle-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}

.search-toggle-btn i {
    font-size: 0.85rem;
}

/* Search Box Wrapper */
.search-box-wrapper {
    display: none;
    width: 100%;
    margin-top: 1.5rem;
    animation-duration: 0.3s;
}

/* Fade In Down Animation */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Search Box */
.search-box {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 50px;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(168, 60, 50, 0.1);
}

.search-box i.fa-search {
    color: var(--primary-color);
    margin-right: 0.75rem;
    font-size: 1rem;
}

.search-box input {
    flex: 1;
    border: none;
    outline: none;
    background: transparent;
    font-size: 0.95rem;
    color: var(--text-primary);
    padding: 0.25rem 0;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.search-close-btn {
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0.25rem 0.5rem;
    margin-left: 0.5rem;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.search-close-btn:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

/* ============================================
   LOADING SPINNER (for search)
   ============================================ */
.spinner-border {
    width: 2rem;
    height: 2rem;
    border: 0.25em solid #f3f3f3;
    border-top: 0.25em solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* ============================================
   ALERT STYLES (for error messages)
   ============================================ */
.alert {
    padding: 1rem;
    margin: 0;
    border-radius: 8px;
    border: 1px solid transparent;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Dark alert styles moved to base.css */

/* Override Bootstrap defaults if needed */
.pagination {
    border: none;
    background: transparent;
    margin-bottom: 0;
}

.page-link {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Fix Bootstrap link & state overrides */
.page-link,
.page-link:visited {
    color: var(--text-secondary);
    background-color: var(--bg-card);
    border-color: var(--border-color);
}

.page-link:hover {
    color: #ffffff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.page-link:focus,
.page-link:active {
    color: var(--text-secondary);
    background-color: var(--bg-card);
    border-color: var(--border-color);
    box-shadow: 0 0 0 0.2rem rgba(168, 60, 50, 0.25);
}

.page-item.active .page-link,
.page-item.active .page-link:visited,
.page-item.active .page-link:focus {
    z-index: 3;
    color: #ffffff;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    box-shadow: none;
}

.page-item.disabled .page-link,
.page-item.disabled .page-link:visited {
    color: var(--text-muted);
    background-color: var(--bg-secondary);
    border-color: var(--border-color);
}

/* ============================================
   ENSURE FOOD CARDS ANIMATE ON PAGINATION
   ============================================ */
.food-card {
    animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
    opacity: 0;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(25px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Stagger animation based on index */
.food-card {
    animation-delay: 0s;
}

.foods-grid .food-card:nth-child(1) {
    animation-delay: 0.1s;
}

.foods-grid .food-card:nth-child(2) {
    animation-delay: 0.2s;
}

.foods-grid .food-card:nth-child(3) {
    animation-delay: 0.3s;
}

.foods-grid .food-card:nth-child(4) {
    animation-delay: 0.4s;
}

.foods-grid .food-card:nth-child(5) {
    animation-delay: 0.5s;
}

.foods-grid .food-card:nth-child(6) {
    animation-delay: 0.6s;
}

/* ============================================
   MOBILE RESPONSIVE PAGINATION
   ============================================ */
@media (max-width: 767.98px) {
    .pagination {
        gap: 0.25rem;
        margin-top: 2rem;
    }

    .page-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        min-width: 40px;
    }

    .page-link i {
        font-size: 0.75rem;
    }

    /* Keep all page items visible on mobile - no hiding */
    .pagination .page-item {
        display: flex;
    }

    /* Make page numbers more compact on mobile */
    .pagination .page-link {
        min-width: 35px;
        padding: 0.4rem 0.6rem;
    }

    .search-toggle-btn {
        width: 100%;
        justify-content: center;
    }
    
    .search-box-wrapper {
        max-width: 100%;
    }
}

