@font-face {
    font-family: 'GBBO Headline';
    src: url('../fonts/gbbo.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'GBBO Body';
    src: url('../fonts/aafdd021-88d4-41d8-8e15-fe91f83e4b17.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'Futura PT W01 Medium';
    src: url('../fonts/6650716f-e079-48f1-861d-00f498c16e8e.woff2') format('woff2');
    font-weight: normal;
    font-style: normal;
}

:root {
    --gbbo-blue: #197b9f;
    --gbbo-pink: #c73d67;
    --gbbo-light-cream: #f4f2ed;
    --gbbo-dark-text: #4a4a4a;
    --gbbo-grey-background: #d3d2cb;
    --gbbo-white: #ffffff;

    --font-heading: 'GBBO Headline', sans-serif;
    --font-body: 'GBBO Body', sans-serif;
    --font-medium: 'Futura PT W01 Medium', sans-serif;
    --font-script: 'GBBO Body', cursive;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 104px;
    /* Offset for fixed header - Desktop (Header 104px) */
}

@media (max-width: 991.98px) {
    html {
        scroll-padding-top: 80px;
        /* Offset for fixed header - Mobile (Header 80px) */
    }
}

html {
    height: 100%;
}

body {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    padding-top: 104px;
    /* Desktop Header Height */
    background-color: var(--gbbo-light-cream);
    font-family: var(--font-body);
    font-size: 18px;
    line-height: 1.4;
    color: var(--gbbo-dark-text);
}

.text-muted,
.text-secondary {
    color: #4a4a4a !important;
    /* Matches var(--gbbo-dark-text) for much better contrast */
}

.main-content {
    flex: 1 0 auto;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: normal;
    text-transform: uppercase;
    color: var(--gbbo-pink);
    margin-top: 0;
}

h1 {
    font-size: 22px;
    line-height: 35px;
    margin-bottom: 0;
}

h2 {
    font-size: 24px;
    line-height: 26px;
    margin-bottom: 20px;
}

h3 {
    font-size: 18px;
    margin-top: 15px;
    margin-bottom: 5px;
}

h4 {
    font-size: 18px;
    margin-top: 30px;
    margin-bottom: 0;
}

p {
    margin-top: 0;
    margin-bottom: 20px;
    line-height: 1.4;
}

a {
    font-family: var(--font-medium);
    font-weight: normal;
    color: var(--gbbo-pink);
    text-decoration: none;
}

a:hover {
    color: var(--gbbo-pink-hover);
}

strong {
    font-family: var(--font-medium);
    font-weight: normal;
}

.text-script {
    font-family: var(--font-script);
}

/* Navbar */
.navbar {
    background-color: var(--gbbo-white);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-family: var(--font-medium);
    font-weight: normal;
    padding-top: 10px;
    padding-bottom: 10px;
    text-transform: uppercase;
    align-items: stretch;
}

.navbar .container {
    display: flex;
    align-items: stretch;
}

.navbar-brand {
    font-weight: normal;
    font-family: var(--font-medium);
    color: var(--gbbo-dark-text) !important;
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: -0.5px;
    display: flex;
    align-items: center;
    padding: 10px 0;
    margin-right: 20px;
    height: auto;
}

.navbar-brand img {
    height: 83px;
    width: auto;
    object-fit: contain;
    aspect-ratio: 180 / 83;
    /* Prevents layout shift */
}

.navbar-collapse {
    align-items: stretch;
}

.navbar-toggler {
    border: none;
}

.navbar-toggler:focus,
.navbar-toggler:active,
.navbar-toggler-icon:focus {
    outline: none !important;
    box-shadow: none !important;
}

/* Navbar Nav - Desktop Styles */
@media (min-width: 992px) {
    .navbar-nav {
        display: flex;
        flex-direction: row;
        flex-wrap: nowrap;
        justify-content: flex-end;
        list-style-type: none;
        margin: 0;
        padding: 0;
        width: 100%;
        height: 100%;
        align-items: stretch;
    }

    .nav-item {
        flex-grow: 0;
        position: relative;
        text-align: center;
        transition: background .25s ease;
        margin: 0;
        display: flex;
        align-items: stretch;
    }

    .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        color: #666666 !important;
        font-family: var(--font-body);
        font-weight: 300;
        text-transform: uppercase;
        font-size: 14px;
        line-height: 1.4;
        padding: 0 12px !important;
        height: auto;
        width: 100%;
        transition: background-color .25s ease;
        text-decoration: none;
        outline-offset: -3px;
    }
}

/* Navbar Nav - Mobile Styles (Default Bootstrap behavior + custom tweaks) */
@media (max-width: 991.98px) {
    .navbar-brand img {
        max-height: 60px;
    }

    body {
        padding-top: 80px;
        /* Mobile Header Height */
    }

    .navbar-nav {
        padding: 10px 0;
        flex-direction: column;
        /* Stack items vertically */
        align-items: flex-start;
        /* Align items to the left */
        background-color: var(--gbbo-white);
        /* Add background for collapsed menu */
    }

    .nav-item {
        text-align: left;
        width: 100%;
        display: block;
        /* Allow items to stack */
    }

    .nav-link {
        color: #666666 !important;
        font-family: var(--font-body);
        /* Changed to GBBO Book */
        font-weight: 300;
        text-transform: uppercase;
        font-size: 16px;
        /* Slightly larger for easier reading */
        line-height: 1.5;
        padding: 15px 20px !important;
        /* Larger touch target */
        display: block;
        /* Ensure it takes full width */
        width: 100%;
    }

    /* Dropdown specific styles for mobile */
    .nav-item.dropdown .dropdown-menu {
        position: static;
        /* Allow dropdown to flow in document */
        float: none;
        width: 100%;
        margin-top: 0;
        border-top: 1px solid var(--gbbo-grey-background);
        border-radius: 0;
        box-shadow: none;
        background-color: var(--gbbo-light-cream);
        /* Lighter background for dropdown in mobile */
    }

    .nav-item.dropdown .dropdown-toggle {
        padding-right: 15px !important;
        /* Adjust padding for dropdown arrow */
    }

    .dropdown-item {
        padding-left: 30px !important;
        /* Indent dropdown items */
    }
}

.nav-item:hover {
    background-color: var(--gbbo-grey-hover);
}

/* Dropdown Menu Styling */
.dropdown-menu {
    border-radius: 0;
    border: none;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    padding: 0;
    margin: 0;
    background-color: var(--gbbo-white);
}

.dropdown-item {
    color: #666666 !important;
    font-family: var(--font-body);
    /* Changed to GBBO Book */
    font-weight: 300;
    text-transform: uppercase;
    font-size: 14px;
    line-height: 1.4;
    padding: 12px 20px;
    transition: background-color .25s ease;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: var(--gbbo-grey-background);
    color: #666666 !important;
}

.dropdown-divider {
    margin: 0;
    border-top: 1px solid var(--gbbo-grey-background);
}

.btn {
    border-radius: 0;
    font-weight: normal;
    font-family: var(--font-medium);
    /* Changed to GBBO Heavy */
    padding: 0.8rem 1.5rem;
    transition: all 0.3s ease;
    text-transform: uppercase;
    border-width: 2px;
    border-style: solid;
    box-shadow: inset 0 0 0 4px var(--gbbo-light-cream);
}

.btn-primary {
    background-color: var(--gbbo-pink);
    border-color: var(--gbbo-pink);
    color: var(--gbbo-white);
}

.btn-primary:hover {
    background-color: var(--gbbo-pink-hover);
    border-color: var(--gbbo-pink-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--gbbo-pink);
    border-color: var(--gbbo-pink);
    color: var(--gbbo-white);
}

.btn-secondary:hover {
    background-color: var(--gbbo-pink-hover);
    border-color: var(--gbbo-pink-hover);
    transform: translateY(-2px);
}

.btn-success {
    background-color: var(--gbbo-grey-background);
    border-color: var(--gbbo-grey-background);
    color: var(--gbbo-dark-text);
}

.btn-success:hover {
    background-color: var(--gbbo-grey-hover);
    border-color: var(--gbbo-grey-hover);
    color: var(--gbbo-dark-text);
    transform: translateY(-2px);
}

/* Bunting Decoration */
.bunting-container {
    width: 100%;
    overflow: hidden;
    position: relative;
    top: 0px;
    z-index: 100;
}

@media (max-width: 767px) {
    .bunting-container {
        top: 0px;
    }

    .hero {
        margin-top: -30px;
    }

    .hero .container {
        width: 85%;
        /* Constrain width on mobile to fit view */
    }

    .btn-login-hero {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
}

/* Hero Section */
.hero {
    background: var(--gbbo-white);
    padding: 5rem 0;
    text-align: center;
    border-bottom: none;
    position: relative;
    margin-top: -50px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    color: var(--gbbo-pink);
    text-shadow: 2px 2px 0px rgba(0, 0, 0, 0.1);
}

.hero .lead {
    font-family: var(--font-script);
    font-size: 1.8rem;
    color: var(--gbbo-blue);
    font-weight: normal;
}

/* Cards */
.card {
    border: 1px solid var(--gbbo-grey-background);
    border-radius: 0;
    box-shadow: 0 5px 15px -3px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
}

.card-header {
    background-color: var(--gbbo-pink);
    color: var(--gbbo-white);
    font-family: var(--font-medium);
    font-weight: normal;
    border-bottom: none;
}

.card-img-top {
    border-bottom: 4px solid var(--gbbo-blue);
}

/* Inputs */
.form-control {
    border-radius: 0;
    padding: 0.75rem;
    border: 1px solid var(--gbbo-grey-background);
}

.form-control:focus {
    border-color: var(--gbbo-pink);
    box-shadow: none;
}

/* Footer */
footer {
    background-color: var(--gbbo-white);
    border-top: 1px solid var(--gbbo-grey-background);
    color: var(--gbbo-dark-text);
    padding: 2rem 0;
    font-family: var(--font-body);
    margin-top: auto;
}

footer a {
    color: var(--gbbo-dark-text);
    text-decoration: underline;
}

footer a:hover {
    color: var(--gbbo-pink-hover);
}

/* Sections */
.section {
    padding: 5rem 0;
}

h2 {
    font-family: var(--font-heading);
    color: var(--gbbo-pink);
    margin-bottom: 2rem;
    position: relative;
    display: inline-block;
}

h2::after {
    display: none !important;
}

h2.no-separator::after {
    display: none !important;
}

/* Charity Section Styles */
.section-block {
    padding: 80px 0;
}

.charity-bg {
    background-color: var(--gbbo-light-cream);
}

.heading {
    font-size: 2.5rem;
    font-weight: normal;
    font-family: var(--font-heading);
    color: var(--gbbo-pink);
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.contact-excerpt {
    color: var(--gbbo-pink);
}

#contact-feedback {
    min-height: 20px;
    margin-bottom: 20px;
}

.alert {
    animation: fadeIn 0.5s ease-in-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.charity-excerpt {
    margin-bottom: 30px;
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--gbbo-dark-text);
}

.charity-wrapper {
    margin-bottom: 30px;
}

.charity-wrapper .photo-item {
    height: 350px;
    /* Enforce same size container */
}

.charity-wrapper .photo-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* Constrain by height if wide, by width if tall */
    object-position: center;
}

@media (max-width: 767px) {
    .charity-wrapper .photo-item {
        height: auto !important;
        aspect-ratio: 16 / 9;
        /* Prevent CLS on mobile */
    }

    .charity-wrapper .photo-item img {
        height: 100% !important;
        /* Changed from auto to fill aspect container */
        object-fit: cover !important;
        /* Changed from contain to cover */
    }
}

.photo-item {
    position: relative;
    overflow: hidden;
    border-radius: 0;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.photo-item img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.photo-item:hover img {
    transform: scale(1.05);
}

.layer {
    position: absolute;
    top: 0;
    left: 0;
}

.wh100 {
    width: 100%;
    height: 100%;
}

.hidden-black-overlay {
    background: rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.photo-item:hover .hidden-black-overlay {
    opacity: 1;
}

.hidden-link {
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.photo-item:hover .hidden-link {
    opacity: 1;
}

.alignment {
    display: table;
    width: 100%;
    height: 100%;
}

.v-align {
    display: table-cell;
    vertical-align: middle;
}

.center-middle {
    text-align: center;
}

.charity-button {
    display: inline-block;
    padding: 10px 25px;
    background-color: var(--gbbo-pink);
    color: var(--gbbo-white);
    text-decoration: none;
    border-radius: 0;
    font-weight: normal;
    font-family: var(--font-medium);
    transition: background-color 0.3s ease;
    text-transform: uppercase;
    border-width: 2px;
    border-style: solid;
    border-color: var(--gbbo-pink);
    box-shadow: inset 0 0 0 4px var(--gbbo-light-cream);
}

.charity-button:hover {
    background-color: var(--gbbo-pink-hover);
    color: var(--gbbo-white);
}

.charity-button.small {
    padding: 8px 20px;
    font-size: 0.9rem;
}

.charity-button.v-small {
    padding: 4px 12px;
    font-size: 0.75rem;
    box-shadow: inset 0 0 0 2px var(--gbbo-light-cream);
    max-width: 30%;
    width: 100%;
    margin: 0 auto;
}

.ratred {
    color: var(--gbbo-pink);
    font-weight: normal;
    font-family: var(--font-medium);
}

/* Sponsor Card Styling */
.sponsor-card {
    background: var(--gbbo-white);
    padding: 15px;
    border-radius: 8px;
    /* Added some rounding to match modern feel */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
    height: 100%;
    width: 100%;
    /* Make card fill height of flex container */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    /* Distribute content vertically */
}

.sponsor-card .cardTitleText {
    margin-top: 0;
    margin-bottom: 1.5rem;
    min-height: 3rem;
    /* Handle potential two-line titles */
    display: flex;
    align-items: center;
    justify-content: center;
}

.sponsor-card .photo-item {
    box-shadow: none;
    margin-bottom: 1rem;
    height: 180px;
    /* Increased height for logo container */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-grow: 1;
}

.sponsor-card .photo-item img {
    height: 100%;
    width: 100%;
    max-width: 100%;
    object-fit: contain;
}

/* New Hero Section Styles from GBBO style.css */
.homepage-wrap {
    margin-left: auto;
    margin-right: auto;
    max-width: 1024px;
    /* Matches content-wrapper max-width */
    padding-right: env(safe-area-inset-right);
    padding-left: env(safe-area-inset-left);
}

.column-reverse {
    display: flex;
    flex-direction: column-reverse;
    flex-flow: column-reverse nowrap;
}

.column-reverse>* {
    flex: 1 auto;
}

.paternoster {
    width: 100%;
    height: 450px;
    /* Fixed height for desktop */
    overflow: hidden;
    margin-bottom: 40px;
    position: relative;
}

.paternoster .content-wrapper {
    position: relative;
}

.paternoster .slide-container {
    margin: 0;
    height: 450px;
    position: relative;
    overflow: hidden;
}

.paternoster .slide-container article {
    position: absolute;
    width: 100%;
    height: 450px;
    overflow: hidden;
    top: 100%;
    /* Initially off-screen */
}

.paternoster .slide-container article:first-child {
    top: 0;
    /* First slide visible */
}

.paternoster .slide-container article a {
    width: 100%;
    height: 100%;
    display: block;
    outline-offset: -3px;
}

.paternoster .slide-container article img {
    position: relative;
    margin-bottom: -4px;
    width: 100%;
    height: auto;
    top: 50%;
    transform: translateY(-50%);
    transition: all .4s ease;
}

.paternoster .slide-container article a:hover img {
    transform: translateY(-50%) scale(1.05);
}

.entry-title {
    background-color: var(--gbbo-blue);
    /* Use GBBO blue */
    color: var(--gbbo-white);
    bottom: 45px;
    min-height: 45px;
    font-size: 32px;
    line-height: 35px;
    left: 50%;
    margin: 0;
    max-width: 740px;
    padding: 11px 0 9px;
    text-align: center;
    transform: translateX(-50%);
    width: 100%;
    position: absolute;
}

.entry-title:before {
    content: "";
    display: block;
    background-color: transparent;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    border: 2px solid var(--gbbo-blue);
    /* Use GBBO blue */
    transition: all .25s ease;
}

.featured-post a:focus .entry-title:before,
.featured-post a:hover .entry-title:before {
    left: -6px;
    top: -6px;
    right: -6px;
    bottom: -6px;
}

.featured-post a:focus .image-container img,
.featured-post a:hover .image-container img {
    transform: translateY(-50%) scale(1.1);
}

/* Paternoster Controls (simplified, as JS is not implemented) */
.paternoster .controls {
    display: none;
    /* Hide controls for now, as JS is not implemented */
}

/* Featured Recipes Section */
.featured-recipes {
    margin-top: 30px;
    padding-bottom: 70px;
}

.featured-recipes__header {
    background-color: var(--gbbo-white);
    width: 100%;
    max-width: 740px;
    margin: 0 auto 10px;
    padding: 3px;
    border: 2px solid var(--gbbo-pink);
    /* Use GBBO pink */
    transform: translateY(-36px);
}

.featured-recipes__header__title {
    background-color: var(--gbbo-pink);
    /* Use GBBO pink */
    margin: 0;
    padding: 18px;
    color: var(--gbbo-white);
    font-size: 22px;
    line-height: 26px;
    text-align: center;
    text-transform: uppercase;
}

.featured-recipes__contentTitle {
    margin: 0 0 40px;
    position: relative;
    text-align: center;
}

.featured-recipes__contentTitle span {
    display: inline-block;
    background-color: var(--gbbo-light-cream);
    padding: 0 30px;
    position: relative;
    z-index: 1;
    color: var(--gbbo-pink);
    /* Use GBBO pink */
    font-family: var(--font-medium);
    /* Use GBBO Heavy */
    font-size: 22px;
    line-height: 26px;
    text-transform: uppercase;
}

.recipes-loop__grid {
    display: flex;
    flex-wrap: wrap;
    margin-right: -4px;
    /* Adjust for padding */
    margin-left: -4px;
    /* Adjust for padding */
}

.recipes-loop__item {
    flex: 0 0 33.3333%;
    /* 3 columns on desktop */
    max-width: 33.3333%;
    padding-right: 4px;
    padding-left: 4px;
    margin-bottom: 30px;
    position: relative;
}

.recipes-loop__item__link {
    display: block;
    text-decoration: none;
}

.recipes-loop__item__image {
    margin: 0;
    position: relative;
    overflow: hidden;
    z-index: 10;
}

.recipes-loop__item__image img {
    width: 100%;
    height: auto;
    transition: all .4s ease-in-out;
}

.recipes-loop__item__content {
    background-color: var(--gbbo-white);
    margin: -30px 10px 0;
    padding: 20px 10px 12px;
    position: relative;
    z-index: 15;
}

.recipes-loop__item__content:after {
    content: "";
    display: block;
    border: 2px solid var(--gbbo-white);
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 10;
    transition: all .15s ease-in-out;
}

.recipes-loop__item__content h5 {
    margin: 0 0 15px;
    color: var(--gbbo-blue);
    /* Use GBBO blue */
    font-size: 17px;
    line-height: 22px;
    text-align: center;
}

.recipes-loop__item:hover .recipes-loop__item__content:after {
    top: -6px;
    right: -6px;
    bottom: -6px;
    left: -6px;
}

.recipes-loop__item:hover .recipes-loop__item__image img {
    transform: scale(1.1);
}

/* Featured Promo Section */
.featured-promo {
    position: relative;
}

.featured-promo .content-wrapper {
    position: relative;
}

.featured-promo-title {
    background-color: var(--gbbo-blue);
    /* Use GBBO blue */
    color: var(--gbbo-white);
    bottom: 40px;
    min-height: 45px;
    font-size: 30px;
    line-height: 35px;
    font-weight: normal;
    font-family: var(--font-body);
    /* Use GBBO Book */
    text-transform: uppercase;
    margin: 0 auto;
    left: 0;
    right: 0;
    padding: 11px 0 9px;
    text-align: center;
    width: 80%;
    position: absolute;
}

.featured-promo .image-container {
    height: 340px;
    overflow: hidden;
}

.featured-promo .image-container img {
    position: relative;
    transition: all .25s ease;
}

.featured-promo a {
    color: inherit;
    display: block;
}

.featured-promo a .featured-promo-title:before {
    content: "";
    display: block;
    background-color: transparent;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    border: 2px solid var(--gbbo-blue);
    /* Use GBBO blue */
    transition: all .25s ease;
}

.featured-promo a:focus .featured-promo-title:before,
.featured-promo a:hover .featured-promo-title:before {
    left: -6px;
    top: -6px;
    right: -6px;
    bottom: -6px;
}

.featured-promo a:focus .image-container img,
.featured-promo a:hover .image-container img {
    top: 0;
    transform: scale(1.05);
}

/* Featured Bakes (Your Bakes) Section */
.featured-bakes {
    margin-bottom: 0;
}

.featured-bakes .content-wrapper {
    padding: 0;
    /* Remove padding from content-wrapper for this section */
}

.featured-bakes .featured-title {
    border: 2px solid var(--gbbo-pink);
    /* Use GBBO pink */
    color: var(--gbbo-white);
    margin: 40px auto;
    text-align: center;
    width: 740px;
    /* Fixed width from GBBO style.css */
}

.featured-bakes .featured-title h2 {
    background-color: var(--gbbo-pink);
    /* Use GBBO pink */
    font-size: 22px;
    line-height: 58px;
    margin: 4px;
}

.featured-bakes .article-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.featured-bakes .featured-block {
    position: relative;
    float: left;
    /* Keep float for older browser compatibility if needed, but flex is better */
    color: var(--gbbo-blue);
    /* Use GBBO blue */
    flex: 0 0 33.3333%;
    /* 3 columns */
    max-width: 33.3333%;
}

.featured-bakes .featured-block>a {
    display: inline-block;
    width: 100%;
    height: 100%;
    color: inherit;
}

.featured-bakes .featured-block .image-container {
    margin-bottom: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.featured-bakes .featured-block .image-container img {
    height: 100%;
    width: 100%;
    /* Ensure image fills container */
    object-fit: cover;
    /* Cover container */
    position: relative;
    transition: transform .4s ease;
}

.featured-bakes .featured-block .details {
    background-color: var(--gbbo-white);
    width: 80%;
    margin: 0 auto;
    position: absolute;
    bottom: -30px;
    left: 0;
    right: 0;
    padding: 10px;
    text-align: center;
    min-height: 60px;
    display: flex;
    justify-content: center;
    flex-direction: column;
    text-transform: uppercase;
}

.featured-bakes .featured-block .details h3 {
    margin-top: 0;
    font-size: 20px;
    height: auto;
    text-transform: uppercase;
    margin-bottom: 0;
}

.featured-bakes .featured-block .details:before {
    content: "";
    display: block;
    background-color: transparent;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: auto;
    border: 2px solid var(--gbbo-white);
    transition: all .25s ease;
}

.featured-bakes .featured-block>a:focus .details:before,
.featured-bakes .featured-block>a:hover .details:before {
    left: -6px;
    top: -6px;
    right: -6px;
    bottom: -6px;
}

.featured-bakes .featured-block>a:focus .image-container img,
.featured-bakes .featured-block>a:hover .image-container img {
    transform: scale(1.1);
}

/* Masonry Gallery */
.gallery-masonry {
    column-count: 2;
    column-gap: 1rem;
    width: 100%;
}

.gallery-item {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    break-inside: avoid-column;
    transform: translateZ(0);
    contain: layout style;
    /* Stricter isolation */
    background: #f8f8f8;
    border-radius: 8px;
    overflow: hidden;
}

/* Gallery Preview Utility */
.gallery-preview-link {
    transition: transform 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.gallery-preview-link:hover {
    transform: translateY(-5px);
}

.gallery-preview-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(199, 61, 103, 0.85);
    /* GBBO Pink */
    color: white;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 2;
}

.gallery-preview-overlay i {
    font-size: 1.5rem;
}

.gallery-preview-overlay span {
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gallery-preview-link:hover .gallery-preview-overlay {
    opacity: 1;
}

/* Video Poster Placeholder */
.video-poster-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #2a2a2a;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.video-poster-overlay {
    text-align: center;
    color: white;
}

.video-poster-overlay i {
    font-size: 2.5rem;
    display: block;
    margin-bottom: 5px;
    color: var(--gbbo-pink);
}

.video-poster-overlay span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-body);
}

.gallery-item a,
.gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 8px;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.03);
}

@media (min-width: 768px) {
    .gallery-masonry {
        column-count: 3;
    }
}

@media (min-width: 992px) {
    .gallery-masonry {
        column-count: 4;
    }
}


/* Timeline / Event Story Styles (Global) */
.timeline-section {
    padding: 60px 0;
    position: relative;
    background-color: var(--gbbo-white);
}

.timeline-row {
    display: flex;
    align-items: center;
    margin-bottom: 80px;
    gap: 40px;
}

.timeline-image-col,
.timeline-text-col {
    flex: 1;
    width: 50%;
}

.timeline-image-col img {
    border-radius: 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
    margin: 0 auto;
}

.timeline-date {
    width: 60px;
    height: 60px;
    background-color: var(--gbbo-pink);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gbbo-white);
    font-family: var(--font-medium);
    font-size: 0.7rem;
    font-weight: bold;
    flex-shrink: 0;
    text-align: center;
    line-height: 1.2;
    margin-right: 1.5rem;
}

.timeline-text-col p {
    color: var(--gbbo-dark-text);
    text-align: left;
}

/* Alternating Layout */
.timeline-row:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-row:nth-child(even) .timeline-text-col {
    text-align: right;
}

.timeline-row:nth-child(even) .timeline-text-col p {
    text-align: right;
}

.timeline-row:nth-child(even) .timeline-header {
    flex-direction: row-reverse;
}

.timeline-row:nth-child(even) .timeline-date {
    margin-right: 0;
    margin-left: 1.5rem;
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline-row {
        flex-direction: column !important;
        gap: 20px;
        margin-bottom: 50px;
    }

    .timeline-image-col,
    .timeline-text-col {
        width: 100%;
        flex: auto;
    }

    .timeline-image-col img {
        height: 250px;
    }

    .timeline-header {
        justify-content: flex-start;
    }
}

/* Responsive Adjustments (from GBBO style.css) */
@media (max-width: 37.49em) {

    /* Mobile */
    .homepage-wrap {
        padding: 0 20px;
    }

    .paternoster {
        height: auto;
        margin-bottom: 0;
    }

    .paternoster .slide-container {
        height: auto;
    }

    .paternoster .slide-container article {
        height: auto;
        margin-bottom: 20px;
        position: relative;
        top: 0 !important;
        /* Override absolute positioning for stacking */
    }

    .paternoster .slide-container article img {
        transform: none;
        /* Reset transform */
        width: 100%;
        min-height: 0;
    }

    .entry-title {
        bottom: 0;
        font-size: 18px;
        line-height: 18px;
        min-height: auto;
        position: relative;



        .entry-title:before {
            left: 0;
            top: 0;
            right: 0;
            bottom: 0;
        }

        .featured-recipes .recipes-loop__grid {
            display: block;
            /* Stack items */
        }

        .recipes-loop__item {
            flex: 0 0 100%;
            max-width: 100%;
        }

        .featured-promo .image-container {
            height: 200px;
            /* Adjust height for mobile */
        }

        .featured-promo-title {
            bottom: 0;
            font-size: 18px;
            line-height: 18px;
            min-height: auto;
            position: relative;
            transform: none;
            width: auto;
            max-width: none;
            left: auto;
            right: auto;
        }

        .featured-bakes .featured-title {
            width: auto;
            margin: 20px;
        }

        .featured-bakes .featured-block {
            flex: 0 0 100%;
            max-width: 100%;
        }

        .featured-bakes .featured-block .details {
            bottom: -20px;
            min-height: auto;
        }
    }
}

@media (min-width: 37.5em) and (max-width: 47.99em) {

    /* Tablet */
    .homepage-wrap {
        padding: 0 20px;
    }

    .paternoster,
    .paternoster .slide-container,
    .paternoster .slide-container article {
        height: 250px;
        /* Adjust height for tablet */
    }

    .entry-title {
        font-size: 1.5em;
        width: 80%;
    }

    .featured-recipes .recipes-loop__item {
        flex: 0 0 50%;
        /* 2 columns on tablet */
        max-width: 50%;
    }

    .featured-bakes .featured-block {
        flex: 0 0 50%;
        /* 2 columns on tablet */
        max-width: 50%;
    }
}

@media (min-width: 48em) and (max-width: 63.99em) {

    /* Small Desktop */
    .featured-promo .image-container {
        height: 250px;
    }
}

@media screen and (max-width: 767px) {

    /* General Mobile/Tablet adjustments */
    .recipes-loop__item__bakerImage {
        width: 40px;
        right: 12px;
    }

    .recipes-loop__item .thumbnail-baker img {
        width: 60px;
        right: 12px;
    }

    .recipes-loop__banner {
        margin: 0 0 30px;
        padding: 30px 0;
    }

    .recipes-loop__banner--hasLink {
        padding-bottom: 52px;
    }

    .recipes-loop__banner--hasLink .recipes-loop__banner__content {
        padding-bottom: 35px;
    }

    .recipes-loop__banner__content {
        margin: 0 10px;
        padding: 15px 10px;
    }

    .recipes-loop__banner__title {
        font-size: 20px;
        line-height: 26px;
    }

    .recipes-loop__banner__button {
        width: auto;
        padding: 10px;
        transform: translate(-50%, 50%);
        min-width: 240px;
    }

    .featured-recipes__header {
        max-width: 100%;
        margin-bottom: 0;
        transform: translateY(-30px);
    }

    .featured-recipes__header__title {
        padding: 10px;
        font-size: 18px;
        line-height: 24px;
    }

    .featured-recipes__contentTitle {
        margin: 0 -30px 20px;
    }

    .featured-recipes__contentTitle span {
        padding: 0 12px;
        font-size: 18px;
        line-height: 26px;
    }

    .featured-recipes .recipes-loop__banner {
        width: calc(100% + 60px);
        margin-left: -30px;
    }

    .featured-recipes .recipes-loop__banner__button {
        max-width: none;
    }

    .featured-bakes .featured-block {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

@media screen and (max-width: 1024px) {

    /* General adjustments for smaller screens */
    .homepage-wrap {
        padding-right: 15px;
        padding-left: 15px;
    }

    .paternoster {
        width: calc(100% + 30px);
        margin-right: -15px;
        margin-left: -15px;
        padding-bottom: 30px;
    }

    .featured-recipes {
        width: calc(100% + 30px);
        margin-right: -15px;
        margin-left: -15px;
        padding-right: 30px;
        padding-left: 30px;
    }

    .featured-bakes .featured-title {
        width: 100%;
        margin: 0 0 25px;
    }

    .featured-bakes .featured-title h2 {
        padding: 10px;
        font-size: 18px;
        line-height: 24px;
    }
}

@media screen and (min-width: 701px) and (max-width:1023px) {
    .featured-recipes .recipes-loop__item {
        flex: 0 0 50%;
        max-width: 50%;
    }
}

@media screen and (max-width: 700px) {
    .featured-recipes .recipes-loop__item {
        flex: 0 0 100%;
        width: calc(100% - 60px);
        max-width: 100%;
    }
}

/* Clean styles for action icons (edit, delete, etc) */
.btn-icon {
    border: none !important;
    box-shadow: none !important;
    background: transparent !important;
    padding: 2px 5px !important;
    font-size: 1.1rem;
    transition: transform 0.2s ease, color 0.2s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.btn-icon:hover {
    transform: scale(1.2);
    background: transparent !important;
}

.btn-icon:focus {
    outline: none !important;
    box-shadow: none !important;
}

.btn-icon:disabled {
    opacity: 0.5;
    transform: none;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.loading-spinner {
    width: 3rem;
    height: 3rem;
    border: 0.25em solid var(--gbbo-pink);
    border-right-color: transparent;
    border-radius: 50%;
    animation: spinner-border .75s linear infinite;
    margin-bottom: 1rem;
}

.loading-text {
    font-family: var(--font-medium);
    color: var(--gbbo-pink);
    font-size: 1.2rem;
    text-transform: uppercase;
}

.upload-progress-container {
    width: 80%;
    max-width: 400px;
    margin-top: 1rem;
}

/* Previews & Gallery */
.admin-image-preview {
    max-width: 150px;
    max-height: 120px;
    object-fit: contain;
    background: #f8f9fa;
    border: 1px solid var(--gbbo-blue);
    border-radius: 6px;
    display: block;
    margin-bottom: 12px;
}

.admin-gallery-img {
    height: 120px;
    width: auto;
    max-width: 100%;
    object-fit: contain;
    background: #f8f9fa;
    display: block;
    margin: 0 auto;
}

.admin-image-preview-sm {
    width: 60px;
    height: 60px;
    object-fit: contain;
    background: #f8f9fa;
    border: 1px solid var(--gbbo-blue);
    border-radius: 4px;
}

/* Gallery Previews */
.gallery-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
}

.gallery-preview-item {
    position: relative;
    width: 100px;
    height: 100px;
    overflow: hidden;
    border: 1px solid var(--gbbo-blue);
    border-radius: 6px;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-preview-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.file-error-msg {
    color: var(--gbbo-pink);
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
}

/* Gallery Video Preview */
.video-preview-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.video-play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(199, 61, 103, 0.8);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    pointer-events: none;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.video-preview-container:hover .video-play-icon {
    background: var(--gbbo-pink);
    transform: translate(-50%, -50%) scale(1.1);
}