/*:root {
    --brand-main: #B48F8C;
    --brand-accent-light: #9E8F83;
    --brand-shade-light: #e9cac5;
    --brand-accent-dark: #7B5E5E;
    --brand-shade-dark: #543A4B;
}
*/

/* ---------------------------------------------------------------------------
   Base
   --------------------------------------------------------------------------- */
html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.my-container {
    flex: 1 0 auto;
    box-sizing: border-box;
    width: 100%;
    max-width: 2400px;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 5rem !important;
    padding-right: 5rem !important;
}

footer {
    flex-shrink: 0;
}

/* ---------------------------------------------------------------------------
   Header / Navbar / Footer
   --------------------------------------------------------------------------- */
.footer {
    background: #e9cac5;
    color: #000;
    font-size: 1rem;
}

    .footer, .footer * {
        color: #000 !important;
    }

        .footer a {
            color: #000;
            text-decoration: none;
            transition: color 0.2s;
        }

            .footer a:hover {
                color: #f3e8e7;
                text-decoration: underline;
            }

.navbar, .header-navbar, header, .header {
    background: #e9cac5;
    color: #000;
}

    .navbar .navbar-brand,
    .navbar .nav-link,
    .header-navbar .navbar-brand,
    .header-navbar .nav-link {
        color: #000;
        text-decoration: none;
        transition: color 0.2s;
        font-size: 1.1rem;
    }

        .navbar .nav-link:hover,
        .header-navbar .nav-link:hover {
            color: #000 !important;
            text-decoration: underline;
        }

.navbar-toggler {
    border-color: #e9cac5 !important;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(0,0,0,1)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E") !important;
}

/* ---------------------------------------------------------------------------
   Home / Quick cards / Utilities
   --------------------------------------------------------------------------- */
.home-header {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding-left: 2rem;
    background: none !important;
}
.home-header-img { width: 100%; height: auto; display: block; object-fit: contain; }

.home-header-text {
    color: #000;
    padding: 2rem 3rem;
    border-radius: 12px;
    text-align: center;
    width: 100%;
    max-width: none;
    box-sizing: border-box;
}

.home-cta-btn { margin-top: 1.5rem; font-size: 1.2rem; }

.admin-navbar { background-color: #d32f2f !important; }
.loggedin-navbar { background-color: #7d6237; color: white; }

/* membership navbar colors */
.silver-navbar {
    background-color: #9E9E9E !important; /* silver */
    color: #fff;
}

    .silver-navbar .navbar-brand,
    .silver-navbar .nav-link {
        color: #fff;
        text-decoration: none;
    }

        .silver-navbar .nav-link:hover {
            color: #e9cac5 !important;
            text-decoration: underline;
        }

.gold-navbar {
    background-color: #D4AF37 !important; /* gold */
    color: #000; /* dark text often reads well on gold; change to #fff if you prefer */
}

    .gold-navbar .navbar-brand,
    .gold-navbar .nav-link {
        color: #000;
        text-decoration: none;
    }

        .gold-navbar .nav-link:hover {
            color: #111 !important;
            text-decoration: underline;
        }


.home-quick-access {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 2rem 0;
}

.quick-card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 1.2rem;
    text-decoration: none;
    color: #222;
    transition: box-shadow 0.2s;
    min-width: 300px;
}
.quick-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.15); }

.quick-card-icon { font-size: 2.5rem; }
.quick-card-icon img {
width: 1em;       /* 1em == current font-size of .quick-card-icon (2.5rem now) */
    height: 1em;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}
.quick-card-arrow { margin-left: auto; font-size: 1.5rem; }

/* lists, news cards */
.news-list, .activities-list, .partners-logos { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.news-card, .activity-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.07);
    padding: 1rem 1.5rem;
    flex: 1 1 300px;
    min-width: 250px;
}

/* ---------------------------------------------------------------------------
   Dog / Pedigree specific
   --------------------------------------------------------------------------- */
.dog-card { min-width: 320px; max-width: 100%; min-height: 320px; height: 320px; display: flex; flex-direction: column; }
.dog-card-body { height: 100%; min-height: 0; }
.dog-card-info { width: 50%; padding: 1.5rem; min-width: 0; }
.dog-card-img { width: 50%; height: 100%; display: flex; align-items: center; justify-content: center; background: #f8f9fa; }

.dog-card-img-inner { width: 100%; height: 100%; object-fit: cover; border-top-right-radius: .375rem; border-bottom-right-radius: .375rem; }

/* Dog details page images */
.dog-favorite-img { width: 100%; max-width: 100%; max-height: 50vh; object-fit: contain; }

/* Container for the gallery rows (legacy) */
.dog-gallery-row {
    max-height: 50vh;
    overflow-y: auto;
    margin-left: 0;
    margin-right: 0;
}
.dog-gallery-row img { max-height: 48vh; object-fit: contain; }

/* ---------------------------------------------------------------------------
   New responsive gallery grid (uniform thumbnail boxes)
   - 10 columns on desktop (>=1200px)
   - 6 columns on tablet (768px - 1199.98px)
   - 3 columns on mobile (<768px)
   --------------------------------------------------------------------------- */
.dog-gallery-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(3, 1fr); /* mobile default */
    align-items: start;
    margin: 0;
    padding: 0;
    list-style: none;
}

.dog-gallery-item { display: block; }

/* thumbnail box uses consistent aspect and max-height so cells stay uniform */
.dog-gallery-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    aspect-ratio: 4 / 3;
    max-height: 160px;
    background: #f8f9fa;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.03) inset;
}
.dog-gallery-thumb:focus { outline: 3px solid rgba(13,110,253,0.15); outline-offset: 2px; }

/* image inside the fixed box — preserve whole image */
.dog-gallery-thumb .dog-gallery-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    border-radius: 8px;
    outline: none;
}

/* hover / focus */
.dog-gallery-thumb:hover,
.dog-gallery-thumb:focus-within {
    transform: translateY(-2px);
    z-index: 2;
}
.dog-gallery-thumb:hover .dog-gallery-img,
.dog-gallery-thumb:focus-within .dog-gallery-img {
    transform: scale(1.02);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}

/* overlay zoom icon */
.dog-gallery-thumb .img-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.12s ease;
    color: #007bff;
    font-size: 1.6rem;
    text-shadow: 0 1px 2px rgba(255,255,255,0.6);
}
.dog-gallery-thumb:hover .img-overlay,
.dog-gallery-thumb:focus-within .img-overlay { opacity: 1; }

/* Tablet: 6 columns */
@media (min-width: 768px) and (max-width: 1199.98px) {
    .dog-gallery-grid { grid-template-columns: repeat(6, 1fr); }
    .dog-gallery-thumb { max-height: 140px; }
}

/* Desktop: 10 columns */
@media (min-width: 1200px) {
    .dog-gallery-grid { grid-template-columns: repeat(10, 1fr); }
    .dog-gallery-thumb { max-height: 140px; }
}

/* Small mobile: square thumbnails */
@media (max-width: 575.98px) {
    .dog-gallery-thumb { aspect-ratio: 1 / 1; max-height: 110px; }
    .dog-gallery-row { overflow-y: visible; }
}
/* ---------------------------------------------------------------------------
   Slider mobile 
   --------------------------------------------------------------------------- */
.dog-slider {
    position: relative;
    overflow: hidden;
}

    .dog-slider .dog-slide-img {
        transition: opacity 250ms ease-in-out;
        /* display handled in markup/JS; keep object-fit for consistent sizing */
        object-fit: contain;
    }

    .dog-slider .dog-slide-arrow {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 20;
        width: 44px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0;
        border: none;
        opacity: 0.95;
    }

        .dog-slider .dog-slide-arrow:focus {
            outline: none;
            box-shadow: 0 0 0 0.25rem rgba(13,110,253,0.25); /* bootstrap focus ring */
        }

    .dog-slider #dogSlidePrev {
        left: 12px;
    }

    .dog-slider #dogSlideNext {
        right: 12px;
    }

/* Slightly smaller arrows on very small screens */
@media (max-width: 360px) {
    .dog-slider .dog-slide-arrow {
        width: 36px;
        height: 36px;
    }

        .dog-slider .dog-slide-arrow i {
            font-size: 1.05rem;
        }
}


 /* ---------------------------------------------------------------------------
   Pedigree table styles
   --------------------------------------------------------------------------- */
.pedigree-table td { min-width: 120px; background: #fff; padding: 0; border: 2px solid #444; vertical-align: top; }
.pedigree-table td.male { background: #e6f0fa; }
.pedigree-table td.female { background: #fae6f0; }

.dog-cell { display: flex; flex-direction: column; align-items: stretch; justify-content: stretch; height: 100%; min-height: 120px; text-align: center; gap: 0; }
.dog-cell img {
    border-radius: 6px;
    margin-bottom: 4px;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.dog-image { flex: 0 0 50%; width: 100%; height: 50%; display: flex; align-items: center; justify-content: center; }
.dog-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    margin: 0;
    max-width: 100%;
    max-height: 100%;
}

/* dog info */
.dog-info {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0 0 0;
    min-width: 0;
    word-break: break-word;
    height: 50%;
    font-size: 1.5rem;
}

.dog-cell abbr { border-bottom: 1px dotted #888; cursor: help; margin-right: 2px; font-weight: bold; color: #2a4d7a; }

/* dog-cell variants */
.dog-cell.empty { background: #fafafa; min-height: 80px; }
.dog-cell.male { background: #dbf1f0; }
.dog-cell.female { background: #f3ddf6; }

/* full-height pedigree table */
.pedigree-table, .pedigree-table tr, .pedigree-table td { height: 100%; }

/* improved responsive table layout */
.pedigree-table { width: 100%; max-width: 100%; height: 100vh; max-height: 100vh; overflow-y: auto; display: table; table-layout: fixed; }
.pedigree-table tr { height: auto; } /* 8 rows: 100vh / 8 = 12.5vh per row */
.pedigree-table td { vertical-align: middle; padding: 0.2em; font-size: 1.1vw; }

/* dog-cell large adjustments */
.dog-cell-large .dog-image { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; }
.dog-cell-large .dog-image img { width: 100%; height: 100%; object-fit: contain; max-height: 400px; }


/* ---------------------------------------------------------------------------
   Pedigree grid (moved from inline DogDetail styles)
   --------------------------------------------------------------------------- */
.pedigree-grid {
    display: grid;
    grid-template-columns: 300px 300px auto;
    gap: 12px;
    align-items: start;
    margin: 1rem 0;
}

.pedigree-dog {
    padding: 12px;
    display: flex;
    height: 100%;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    grid-row: span 2; /* span both sire & dam rows */
    border-radius: 4px;
}

.pedigree-mid {
    padding: 8px;
    border-radius: 4px;
    text-align: center;
}

.pedigree-sire {
    height: 100%;
}
.pedigree-dam {
    height: 100%;
}
/* yellow */

.pedigree-photo {
    max-width: 160px;
    max-height: 160px;
    width: auto;
    height: auto;
    object-fit: cover;
    border: 4px solid rgba(255,255,255,0.6);
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
    margin-bottom: 8px;
    border-radius: 6px;
}

.grandparents {
    display: flex;
    flex-direction: column;
    gap: 8px;
    height: 100%;
}

.gp-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 12px;
    border-radius: 4px;
    min-height: 72px;
    color: #222;
}

.gp-label {
    font-weight: 600;
    margin-bottom: 6px;
    font-size: .95rem;
}

.gp-item.gp-dam {
    height: 50%;
}
.gp-item.gp-sire {
    height: 50%;
}

/* Tablet: */
@media (max-width: 767.98px) {
    .pedigree-grid {
        grid-template-columns: 1fr 1fr 1fr;
        grid-auto-rows: auto;
    }

        /* Keep current dog in column 1 spanning two rows */
        .pedigree-grid > .pedigree-dog {
            grid-column: 1;
            grid-row: 1 / span 2;
        }

        /* Sire (top middle) and its parents (top right) */
        .pedigree-grid > .pedigree-mid.pedigree-sire {
            grid-column: 2;
            grid-row: 1;
        }

        .pedigree-grid > .grandparents.grandparents-sire {
            grid-column: 3;
            grid-row: 1;
        }

        /* Dam (middle bottom) -> column 2, row 2 */
        .pedigree-grid > .pedigree-mid.pedigree-dam {
            grid-column: 2;
            grid-row: 2;
        }

        /* Dam's parents -> column 3, row 2 */
        .pedigree-grid > .grandparents.grandparents-dam {
            grid-column: 3;
            grid-row: 2;
        }
 
}
@media (max-width: 500px) {
    .pedigree-grid {
        grid-template-columns: 1fr !important;
        grid-auto-rows: auto !important;
        grid-auto-flow: row !important;
    }

        /* Reset any pinned placements applied earlier (direct-child and nested) */
        .pedigree-grid .pedigree-dog,
        .pedigree-grid .pedigree-mid,
        .pedigree-grid .grandparents,
        .pedigree-grid > .pedigree-dog,
        .pedigree-grid > .pedigree-mid,
        .pedigree-grid > .grandparents {
            grid-column: auto !important;
            grid-row: auto !important;
            width: 100% !important;
        }

        /* Ensure the dog block doesn't force a row span */
        .pedigree-grid .pedigree-dog {
            grid-row: auto !important;
        }

    /* Optional: tighten spacing for stacked layout */
    .pedigree-grid {
        gap: 0.5rem !important;
    }

}



/* ---------------------------------------------------------------------------
   News sidebar / stripe cards / admin tabs
   --------------------------------------------------------------------------- */
.news-sidebar { background: #F4F6F5; border-radius: 8px; padding: 1.5rem; color: #281E2F; box-shadow: 0 2px 8px rgba(40,30,47,0.07); }
.news-sidebar h6 { color: #B03D52; margin-top: 1.5rem; margin-bottom: 0.5rem; font-weight: 600; letter-spacing: 0.5px; }
.news-sidebar a { color: #817B87; text-decoration: none; transition: color 0.2s; }
.news-sidebar a:hover, .news-sidebar a:focus { color: #B03D52; text-decoration: underline; }
.news-sidebar .form-control { border: 1px solid #B48F8C; background: #F4F6F5; color: #281E2F; }
.news-sidebar .btn-link { color: #B03D52; font-weight: 600; padding-left: 0; }

.stripe-style-card {
    padding: 34px 36px 28px 36px;
    background: #fff;
    margin-bottom: 1.5rem;
    text-align: center;
    max-width: 312px;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: box-shadow 0.2s, border-color 0.2s;
    height: 100%;
}
.stripe-style-card .card-title { font-size: 1.5rem; font-weight: 600; color: #1a1a1a; margin-bottom: 0.5rem; letter-spacing: -0.01em; text-align: center; width: 100%; }
.stripe-style-card .card-text { color: #6b7c93; font-size: 1rem; margin-bottom: 4.6rem; }
.stripe-style-card .feature-list { list-style: none; padding: 0; margin: 1.5rem 0; text-align: left; width: 100%; font-size: 0.9rem; }
.stripe-style-card .btn-stripe { background: #e9cac5; border: #e9cac5; color: #000; font-weight: 600; border-radius: 5px; padding: 0.75rem 1.5rem; font-size: 1rem; width: 100%; height: 44px; margin-top: 1rem; margin-bottom: 0.5rem; }
        
/* admin nav */
.admin-nav { border-bottom: 2px solid #e5c3c1; background: #f8f9fa; padding-left: 0; margin-bottom: 2rem; flex-wrap: wrap; }
.admin-nav .nav-item { margin-bottom: -2px; }
.admin-nav .nav-link {
    border: 1px solid transparent;
    border-radius: 0.25rem 0.25rem 0 0;
    background: none;
    color: #333;
    padding: 0.75rem 1.5rem;
    margin-right: 2px;
    font-weight: 500;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.admin-nav .nav-link.active,
.admin-nav .nav-link:focus,
.admin-nav .nav-link:hover {
    background: #fff;
    color: #d2691e;
    border-color: #e5c3c1 #e5c3c1 #fff;
    border-bottom: 2px solid #fff;
    z-index: 2;
}
.admin-nav .nav-link:not(.active):hover { background: #f3e8e7; color: #a0522d; }

/* ---------------------------------------------------------------------------
   Layout responsive tweaks
   --------------------------------------------------------------------------- */
@media (max-width: 900px) {
    /* Mobile: keep quick access sticky but add side padding and prevent overflow */
    .home-quick-access {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1050;
        background: rgba(255,255,255,0.92) !important;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
        padding: 0.5rem 0.75rem;      /* <-- add horizontal padding here */
        margin: 0 !important;
        border-radius: 1rem 1rem 0 0;
        display: flex !important;
        flex-direction: row !important;
        justify-content: space-around;
        align-items: center;
        gap: 0.5rem;                 /* a little extra gap so cards don't touch edges */
        width: 100%;                 /* use 100% + box-sizing to include padding */
        max-width: 100%;
        box-sizing: border-box;      /* ensure padding is included inside width */
        background: rgba(255,255,255,0.83) !important; /* keep original translucency */
    }

    /* keep quick-card spacing compact but allow the padding to create the inset */
    .quick-card {
        min-width: 0;
        flex: 1 1 0;
        margin: 0 0.25rem;
        padding: 0.75rem 0.5rem;
        font-size: 1rem;
        border-radius: 0.75rem;
        box-shadow: none;
        text-align: center;
        justify-content: center;
        align-items: center;
        gap: 0.25rem;
        display: flex;
        background: rgba(255,255,255,0) !important;
    }
}

@media (max-width: 767.98px) {
    .stripe-table-mobile-center { display: flex; justify-content: center; width: 100%; }
    .col-md-4 { display: flex; flex-direction: column; align-items: flex-start; }
    .stripe-style-card { margin-left: auto; margin-right: auto; }
    .dog-card { min-width: 100%; height: auto; min-height: 220px; flex-direction: column; }
    .dog-card-body { flex-direction: column !important; height: auto; }
    .dog-card-info, .dog-card-img { width: 100%; padding: 1rem; height: auto; }
    .dog-card-img-inner { border-radius: 0 0 .375rem .375rem; height: 180px; object-fit: cover; }
    .home-header { width: 100vw !important; min-width: 100vw !important; margin-left: -50vw; left: 50%; position: relative; padding-left: 0 !important; }
    .home-header-img { width: 100vw !important; height: auto !important; border-radius: 0 !important; }
}

@media (min-width: 768px) {
    .row.g-0.align-items-stretch { display: flex; flex-wrap: nowrap; align-items: stretch; }
    .col-md-4 { display: flex; flex-direction: column; align-items: stretch; }
    .stripe-style-card { align-self: flex-start; margin-left: 0; margin-right: 0; }
    .col-md-4, .col-md-8 { display: flex !important; flex-direction: column; height: auto !important; min-height: 100%; }
    .col-md-8 { max-width: 66.666667%; flex: 0 0 66.666667%; }
    .stripe-table-mobile-center { margin-left: -100px !important; padding-left: 0 !important; width: calc(100% + 40px) !important; }
    .dog-gallery-thumb .img-overlay { opacity: 0.7; font-size: 2.5rem; }
    .dog-gallery-thumb:active .dog-gallery-img { transform: scale(1.03); box-shadow: 0 0 8px #007bff55; }
}

/* small phones */
@media (max-width: 575.98px) {
    .dog-gallery-thumb { aspect-ratio: 1 / 1; max-height: 110px; }
    .dog-gallery-row { overflow-y: visible; }
    .pedigree-table, .pedigree-table tr, .pedigree-table td { height: auto !important; table-layout: auto !important; }
    .pedigree-vertical .pedigree-row .pedigree-cell, .pedigree-vertical .pedigree-row .dog-cell, .dog-cell, .dog-cell-large { height: auto !important; min-height: 12vh; }
    .pedigree-vertical .pedigree-row:last-child .pedigree-cell, .pedigree-vertical .pedigree-row:last-child .dog-cell { min-height: 10vh; }
    .dog-info { height: auto !important; }
    .pedigree-table td, .dog-cell, .dog-cell-large, .dog-info, .dog-cell abbr { font-size: 0.85rem !important; }
    .dog-image img { max-height: 6vh !important; }
    h3 { padding-left: 3rem; }
    .stripe-style-card .card-title { padding-left: 0 !important; padding-right: 0 !important; text-align: center; width: 100%; }
    .pedigree-vertical { flex: 1 0 auto; min-height: 0; height: auto; }
    .pedigree-vertical .pedigree-row:last-child .dog-cell img, .pedigree-vertical .pedigree-row:last-child .dog-image img { max-height: 2.5vh !important; max-width: 20vw !important; width: auto !important; height: auto !important; margin-left: auto; margin-right: auto; display: block; }
    .dog-cell img { max-width: 100% !important; width: 100% !important; height: auto !important; display: block; margin-left: auto; margin-right: auto; }
    .pedigree-dog-container { display: none !important; }
}

/* ---------------------------------------------------------------------------
   Small housekeeping: reduce repetition and maintain compatibility
   - Duplicate/near-duplicate rules consolidated above.
   - Keep selectors used by views intact (class names preserved).
   --------------------------------------------------------------------------- */

/* === Small UX fixes & overrides for Home / News / Quick-cards ===
   Tweak the --news-thumb-size / --quick-icon-size values to taste.
*/
:root {
    --news-thumb-size: 160px;
    --quick-icon-size: 2.5rem;
    --mobile-quick-padding: 0.9rem;
}

/* Quick card icon image sizing (keeps PNG same size as emoji) */
.quick-card-icon { font-size: var(--quick-icon-size); }
.quick-card-icon img {
    width: 2.5em;
    height: 2.5em;
    object-fit: contain;
    display: inline-block;
    vertical-align: middle;
}

/* Prevent .my-container huge side padding on small viewports */
@media (max-width: 900px) {
    .my-container {
        padding-left: 0.75rem !important;
        padding-right: 0.75rem !important;
        max-width: 100vw;
        box-sizing: border-box;
    }
}

/* Sticky quick-access: inset padding, prevent overflow, respect safe-area */
@media (max-width: 900px) {
    .home-quick-access {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 1050;
        padding: 0.5rem calc(var(--mobile-quick-padding)) env(safe-area-inset-bottom, 0.5rem);
        box-sizing: border-box;
        width: 100%;
        max-width: 100%;
        display: flex !important;
        gap: 0.5rem;
        justify-content: space-around;
        align-items: center;
        background: rgba(255,255,255,0.9) !important;
        box-shadow: 0 -2px 12px rgba(0,0,0,0.08);
        border-radius: 1rem 1rem 0 0;
    }

    .home-quick-access .quick-card {
        min-width: 0;
        flex: 1 1 0;
        margin: 0 0.25rem;
        padding: 0.6rem 0.5rem;
        box-sizing: border-box;
        background: transparent !important;
        flex-direction: column;
        text-align: center;
        gap: 0.25rem;
    }

    .home-quick-access .quick-card-icon {
        font-size: 1.6rem;
    }
        
    .home-quick-access .quick-card-icon img {
        width: 1.9rem;
        height: 1.9rem;
    }

    .home-quick-access .quick-card span:last-child {
        font-size: 0.9rem;
        line-height: 1.2;
    }

    .home-quick-access .quick-card-arrow {
        display: none;
    }
}

/* News cards: horizontal layout with fixed thumbnail on desktop/tablet */
.news-card {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    box-sizing: border-box;
    padding: 1rem 1.25rem; /* preserve existing spacing */
}

/* Reverse variant keeps the image on the right */
.news-card.reverse { flex-direction: row-reverse; }

/* Fixed thumbnail size and cropping for consistent cards */
.news-card-img {
    width: var(--news-thumb-size);
    height: var(--news-thumb-size);
    flex: 0 0 var(--news-thumb-size);
    object-fit: cover;
    border-radius: 8px;
    display: block;
    max-width: none; /* ensure not overridden by other rules */
}

/* Ensure content area shrinks correctly */
.news-card-content {
    flex: 1 1 auto;
    min-width: 0;
}
.news-card-title {
    font-size: 1.9rem;
    font-weight: 500;
}
.news-card-link {
    font-size: 1.5rem;
}
@media (max-width: 900px) {
    .news-card {
        display: block;
        padding: 0;
    }
    .news-card-img {
        width: 100% !important;
        height: auto !important;
        flex: none !important;
        border-radius: 0.75rem 0.75rem 0 0;
        object-fit: cover;
    }
    .news-card-content {
        padding: 0.75rem 1rem;
    }
}

/* Safety: ensure news images never overflow their container */
.news-card img.news-card-img,
.news-card img {
    display: block;
    max-width: 100%;
    height: auto;
    box-sizing: border-box;
}

/* Place at the end of the file to override Bootstrap .btn-primary */
.btn-primary {
    color: #000;
    background-color: #e9cac5;
    border-color: #e9cac5;
}

    .btn-primary:hover,
    .btn-primary:focus {
        color: #000;
        background-color: #d9bfb9; /* slightly darker on hover */
        border-color: #d9bfb9;
    }

    .btn-primary:active,
    .btn-primary.active,
    .show > .btn-primary.dropdown-toggle {
        color: #000;
        background-color: #cfaea9;
        border-color: #cfaea9;
    }

    .btn-primary.disabled,
    .btn-primary:disabled {
        color: #000;
        background-color: #e9cac5;
        border-color: #e9cac5;
        opacity: 0.65;
    }

    .btn-primary:focus {
        box-shadow: 0 0 0 0.25rem rgba(233,202,197,0.35);
    }
/* Keep outline appearance but use CCPedigrees brand color */
.btn-outline-primary {
    color: #e9cac5;
    background-color: transparent;
    border-color: #e9cac5;
}

    .btn-outline-primary:hover,
    .btn-outline-primary:focus {
        color: #000;
        background-color: #e9cac5;
        border-color: #e9cac5;
        text-decoration: none;
    }

    .btn-outline-primary:active,
    .btn-outline-primary.active,
    .show > .btn-outline-primary.dropdown-toggle {
        color: #000;
        background-color: #cfaea9; /* slightly darker active */
        border-color: #cfaea9;
    }

    .btn-outline-primary.disabled,
    .btn-outline-primary:disabled {
        color: #e9cac5;
        background-color: transparent;
        border-color: #e9cac5;
        opacity: 0.65;
    }

    .btn-outline-primary:focus {
        box-shadow: 0 0 0 0.25rem rgba(233,202,197,0.25);
    }
/* Cookie consent banner - fixed to bottom */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background-color: #f8f4f3;
    border-top: 1px solid #d6b8b5;
    padding: 0.75rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    box-shadow: 0 -2px 6px rgba(0,0,0,0.1);
}