/* --- 0. LOCAL FONTS --- */

/* Playfair Display (Bold only for headers) */
@font-face {
    font-family: 'Playfair Display';
    font-style: normal;
    font-weight: 700;
    src: url('fonts/playfair-display-v40-latin/playfair-display-v40-latin-700.woff2') format('woff2'); /* Ensure filename matches exactly! */
}

/* Poppins (Light) */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 300;
    src: url('fonts/poppins-v24-latin/poppins-v24-latin-300.woff2') format('woff2');
}

/* Poppins (Regular) */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 400;
    src: url('fonts/poppins-v24-latin/poppins-v24-latin-regular.woff2') format('woff2'); /* often named 'poppins-v20-latin-400.woff2' or just 'regular' */
}

/* Poppins (Semi-Bold) */
@font-face {
    font-family: 'Poppins';
    font-style: normal;
    font-weight: 600;
    src: url('fonts/poppins-v24-latin/poppins-v24-latin-600.woff2') format('woff2');
}

/* --- 1. GLOBAL THEME (Update to use local names) --- */
:root {
    --honey-gold: #f8b400;
    --honey-dark: #d99100;
    --nature-dark: #1a1a1a;
    --cream-bg: #fffbf2;
}

body {
    /* Use the names we defined in @font-face above */
    font-family: 'Poppins', sans-serif;
    background-color: var(--cream-bg);
    color: #333;
}

h1, h2, h3, h4, h5 {
    font-family: 'Playfair Display', serif;
    color: var(--nature-dark);
}

/* ... rest of your CSS ... */

/* --- 2. NAVBAR STYLING --- */
.navbar-custom {
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.navbar-brand-text {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--nature-dark);
}

.nav-link-custom {
    font-weight: 500;
    color: #555 !important;
    margin: 0 10px;
    position: relative;
    transition: color 0.3s;
}

    .nav-link-custom:hover {
        color: var(--honey-gold) !important;
    }

/* --- 3. HERO SECTION (UPDATED FOR SLIDESHOW) --- */
.hero-section {
    position: relative;
    height: 90vh;
    width: 100%;
    overflow: hidden; /* Clips images that zoom out */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-color: #000; /* Fallback color */
}

/* The Overlay */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4); /* Darken factor */
    z-index: 2; /* Sits above images, below text */
}

/* The Content */
.hero-content {
    position: relative;
    z-index: 3; /* Highest priority */
    max-width: 800px;
    padding: 20px;
}

/* --- BACKGROUND SLIDESHOW LOGIC --- */
.hero-slideshow {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 1; /* Lowest priority */
    padding: 0;
    margin: 0;
    list-style: none;
}

    .hero-slideshow li {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        opacity: 0;
        z-index: 0;
        animation: imageAnimation 32s linear infinite; /* 24s total loop */
    }

        /* --- THE IMAGES --- */

        /* Image 1: Mountains (Starts immediately) */
        .hero-slideshow li:nth-child(1) {
            background-image: url('/honey-images/min-wall-center compressed.jpg');
        }

        /* Image 2: Bees/Hive (Delay 6s) */
        .hero-slideshow li:nth-child(2) {
            background-image: url('/honey-images/pexels.jpg');
            animation-delay: 8s;
        }

        /* Image 3: Honey Jar (Delay 12s) */
        .hero-slideshow li:nth-child(3) {
            background-image: url('/honey-images/Bijenpollen.png');
            animation-delay: 16s;
        }

        /* Image 4: Beekeeper (Delay 18s) */
        .hero-slideshow li:nth-child(4) {
            background-image: url('/honey-images/flyingBees.jpg');
            animation-delay: 24s;
        }

/* --- THE KEYFRAMES (Fade In + Zoom Out) --- */
@keyframes imageAnimation {
    0% {
        opacity: 0;
        animation-timing-function: ease-in;
        transform: scale(1.1); /* Start slightly zoomed in */
    }

    4% {
        opacity: 1;
        animation-timing-function: ease-out;
    }

    25% {
        opacity: 1;
    }

    29% {
        opacity: 0;
        transform: scale(1); /* End normal size */
    }

    100% {
        opacity: 0
    }
}

/* --- 4. CARDS & SECTIONS --- */
.section-padding {
    /* Vertical only: the shorthand "80px 0" also zeroed the side padding of a .container, so a row inside
       it stuck out past the screen on phones. */
    padding-top: 80px;
    padding-bottom: 80px;
}

.feature-card {
    border: none;
    background: white;
    border-radius: 20px;
    padding: 40px 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
    height: 100%;
}

    .feature-card:hover {
        transform: translateY(-10px);
    }

.icon-box {
    width: 80px;
    height: 80px;
    background-color: #fff4d1;
    color: var(--honey-gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 20px;
}
/* --- 5. ANIMATIONS & EFFECTS --- */

/* The Background: A subtle hexagon pattern for the whole page */
body {
    background-color: var(--cream-bg);
    background-image: 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='%23f8b400' 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");
}

/* Scroll Reveal: Elements start hidden and 'pop' up */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

    .reveal.active {
        opacity: 1;
        transform: translateY(0);
    }

/* Hero Title Animation */
@keyframes slideDownFade {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-down {
    animation: slideDownFade 1s ease-out forwards;
}

/* Product Card Hover: 3D Lift Effect */
.product-card {
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), box-shadow 0.4s ease;
    border: none;
    overflow: hidden;
}

    .product-card:hover {
        transform: translateY(-15px) scale(1.02);
        box-shadow: 0 20px 40px rgba(217, 145, 0, 0.2);
    }

    .product-card img {
        transition: transform 0.5s ease;
    }

    .product-card:hover img {
        transform: scale(1.1); /* Zoom image slightly */
    }

/* Section Backgrounds: Soft gradient for the "Why Choose Us" section */
.bg-gradient-nature {
    background: linear-gradient(135deg, #fffbf2 0%, #fff4e6 100%);
    position: relative;
    overflow: hidden;
}

/* Floating particle effect for fun */
.floating-icon {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@media (scripting: none) {
    .reveal {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Make all Blazor Validation Messages Red */
.validation-message {
    color: #dc3545; /* Bootstrap Danger Red */
    font-size: 0.875rem; /* Optional: Make it slightly smaller */
    margin-top: 0.25rem;
    list-style-type: none; /* Removes bullet points if they appear */
}

/* On phones a .row.g-5 would stick out 0.75rem past its container and scroll the page sideways. */
@media (max-width: 575.98px) {
    .row.g-5 {
        --bs-gutter-x: 1.5rem;
    }
}

/* ===== Accessibility (WCAG 2.1 AA) ===== */
:root {
    --text-amber-on-light: #8a5a00;
}

/* Amber TEXT on a light surface: #ffc107 on white is 1.6:1; this darker amber is 5.9:1.
   Icons, spinners and anything on a dark or photo section (they carry .text-white / .bg-dark) keep the bright amber. */
.text-warning {
    color: var(--text-amber-on-light) !important;
}

i.text-warning,
.bi.text-warning,
.spinner-border.text-warning,
.text-white .text-warning,
.bg-dark .text-warning,
footer .text-warning {
    color: #ffc107 !important;
}

/* White on the amber button is 1.6:1; dark text on it is about 11:1. */
.btn.btn-warning,
.btn.btn-warning.text-white {
    color: #212529 !important;
}

/* h1-h5 get a dark colour near the top of this file, which made headings inside dark sections invisible (1:1). */
.text-white :is(h1, h2, h3, h4, h5, h6),
.bg-dark :is(h1, h2, h3, h4, h5, h6) {
    color: inherit;
}

/* Bootstrap's grey (#6c757d) is 3.3:1 on the dark footer; this one is 7.6:1. */
footer .text-secondary,
footer .text-muted {
    color: #adb5bd !important;
}

/* Skip link: off-screen until it takes keyboard focus. */
.skip-link {
    position: fixed;
    top: -100px;
    left: 8px;
    z-index: 3000;
    padding: 0.5rem 1rem;
    background: #fff;
    color: #1a1a1a;
    border: 2px solid #1a1a1a;
    border-radius: 0.25rem;
    font-weight: 600;
    text-decoration: none;
}

.skip-link:focus {
    top: 8px;
}

/* Blazor moves focus to the page's h1 after navigation (and the skip link to <main>); neither is interactive, so no ring. */
h1[tabindex="-1"]:focus,
main[tabindex="-1"]:focus {
    outline: none;
}

/* Dashboard stat cards: Bootstrap's text-white-50 (white at 50%) and white-on-yellow/cyan measured 1.3 to 2.3:1. */
.card.bg-primary .card-title.text-white-50,
.card.bg-success .card-title.text-white-50,
.card.bg-danger .card-title.text-white-50 {
    color: #fff !important;
}

.card.bg-warning.text-white,
.card.bg-info.text-white,
.card.bg-warning .card-title.text-white-50,
.card.bg-info .card-title.text-white-50 {
    color: #212529 !important;
}

/* #0d6efd is 4.24:1 on the light-grey card headers; this blue is 5.9:1. */
.text-primary {
    color: #0a58ca !important;
}

/* #6c757d is 4.45:1 on the light-grey page background; this grey is 6.6:1. */
.btn-outline-secondary {
    --bs-btn-color: #565e64;
    --bs-btn-border-color: #565e64;
    --bs-btn-hover-bg: #565e64;
    --bs-btn-hover-border-color: #565e64;
    --bs-btn-active-bg: #565e64;
    --bs-btn-active-border-color: #565e64;
}

/* White on a yellow or cyan header (e.g. the certificate upload card) is 1.6:1 and 1.9:1; dark text is over 10:1. */
.bg-warning.text-white,
.bg-info.text-white {
    color: #212529 !important;
}

/* Headings that were <h6> (body font) and became <h2>/<h3> with class .h6 to fix the heading order must not pick up
   the serif that the h1-h5 rule gives them. */
:is(h1, h2, h3, h4, h5).h6 {
    font-family: inherit;
}

/* ===== UX polish ===== */

/* Hero text sits on a photograph; a soft shadow keeps it readable wherever the photo is light. */
.hero-content h1,
.hero-content p {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.55);
}

/* Cart: on a phone the five-column table needed sideways scrolling to reach the quantity, total and remove controls. */
@media (max-width: 767.98px) {
    .cart-table,
    .cart-table tbody {
        display: block;
    }

    .cart-table thead {
        display: none;
    }

    .cart-table tr {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas: "product remove" "qty total";
        gap: 0.5rem 1rem;
        align-items: center;
        padding: 1rem;
    }

    .cart-table td {
        display: block;
        padding: 0 !important;
    }

    .cart-table td:nth-child(1) { grid-area: product; }
    .cart-table td:nth-child(2) { display: none; }
    .cart-table td:nth-child(3) { grid-area: qty; }
    .cart-table td:nth-child(4) { grid-area: total; text-align: right; }
    .cart-table td:nth-child(5) { grid-area: remove; text-align: right; }
}