/* === A&J PERSONAL COLLECTIONS – UNIFIED CSS RESET & THEME === */

/* === COLOR PALETTE ===
   Reference list of every color used across the site. Values are hardcoded
   throughout the file below rather than using var() everywhere yet - this
   block is the "what colors exist and what are they for" reference. */
:root {
    --color-charcoal: #3F3A36;      /* Primary text, nav background, buttons */
    --color-gold: #D2A85C;          /* Brand accent - borders, links, active states */
    --color-rose: #D8A7B1;          /* Secondary accent - active pills, New ribbon */
    --color-cream: #F5F4F2;         /* Main page background */
    --color-cream-warm: #F3EAE1;    /* Header background, hover states */
    --color-cream-light: #FDFBF7;   /* Card/panel backgrounds */
    --color-pink-light: #EACFCF;    /* Borders, dividers */
    --color-white: #FFFFFF;
    --color-text-muted: #6A645F;    /* Secondary/quieter text */
    --color-text-secondary: #555555;
    --color-taupe: #A89F91;         /* Price text, muted borders */
    --color-skeleton: #F0EEEA;      /* Loading placeholder base */
    --color-skeleton-highlight: #F7F5F2; /* Loading placeholder shimmer */
}

/* === GLOBAL MOBILE-SAFE RESET === */
*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

img {
    max-width: 100%;
    height: auto;
}

/* === BASE STYLING === */
body {
    margin: 0;
    font-family: 'Tahoma', sans-serif;
    background-color: #F5F4F2;
    color: #3F3A36;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

p, li, td, th, .tagline {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* === INTRO SECTION === */
.intro {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
    flex-wrap: wrap;
}

.intro-text {
    flex: 1;
    min-width: 280px;
}

/* === HEADER & HERO === */
.hero-banner {
    width: 100%;
    margin: 0;
    padding: 0;
    background: none;
}

.hero-banner .banner-img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0;
    padding: 0;
    object-fit: cover;
}

.logo {
    max-width: 180px;
    margin-bottom: 20px;
}

/* === PAGE HEADING === */
.page-heading {
    text-align: center;
    padding: 40px 20px;
    background-color: #EACFCF;
    width: 100%;
}

.page-heading h1 {
    font-size: 2em;
    margin: 0 0 10px 0;
}

.page-heading .tagline {
    font-size: 1em;
    color: #6A645F;
    margin: 0;
}

.page-heading .affiliate-note {
    font-size: 0.8em;
    color: #8A8378;
    font-style: italic;
    margin: 10px 0 0 0;
}

/* === SUBSCRIBE BANNER === */
.subscribe-banner {
    background-color: #3F3A36;
    color: #F5F4F2;
    text-align: center;
    padding: 10px 44px;
    font-size: 14px;
    position: relative;
    line-height: 1.4;
}

.subscribe-banner p {
    margin: 0;
}

.subscribe-banner a {
    color: #D2A85C;
    font-weight: bold;
    text-decoration: underline;
}

.subscribe-banner a:hover {
    color: #D8A7B1;
}

#dismiss-banner-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #F5F4F2;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 4px 10px;
}

#dismiss-banner-btn:hover {
    color: #D2A85C;
}

/* === NAVIGATION BAR === */
nav.topnav {
    background-color: #3F3A36;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    padding: 12px 24px;
    gap: 20px;
}

nav.topnav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

nav.topnav li {
    display: inline-block;
}

nav.topnav a {
    display: inline-block;
    padding: 8px 16px;
    background-color: #3F3A36;
    border: 2px solid #D2A85C;
    border-radius: 999px;
    text-decoration: none;
    color: #F5F4F2;
    font-size: 14px;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
    flex-shrink: 0;
}

nav.topnav a:hover,
nav.topnav a:focus {
    background-color: #D2A85C;
    color: #3F3A36;
}

nav.topnav a.active {
    background-color: #D8A7B1;
    color: #3F3A36;
    border-color: #D8A7B1;
}

.topnav-socials {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.topnav-socials a {
    display: inline-flex;
    line-height: 0;
}

.topnav-socials img {
    height: 20px;
    width: 20px;
    opacity: 0.9;
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
}

.topnav-socials a:hover img,
.topnav-socials a:focus img {
    opacity: 1;
    transform: scale(1.1);
}

/* === MODAL POP-OUT STYLES (Mobile-Optimized & Scroll-Protected) === */
.guidelines-trigger-btn {
    background-color: #FDFBF7;
    color: #D2A85C;
    border: 2px solid #D2A85C;
    padding: 8px 16px;
    font-size: 14px;
    font-weight: bold;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.guidelines-trigger-btn:hover {
    background-color: #F3EAE1;
}

.guidelines-modal-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(63, 58, 54, 0.5);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

.guidelines-modal-backdrop.is-active {
    display: flex;
    opacity: 1;
}

.guidelines-modal-content {
    background-color: #FFFFFF;
    border: 2px solid #D2A85C;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    padding: 24px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transform: translateY(-20px);
    transition: transform 0.3s ease-out;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.guidelines-modal-backdrop.is-active .guidelines-modal-content {
    transform: translateY(0);
}

.guidelines-modal-close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 2rem;
    color: #3F3A36;
    cursor: pointer;
    line-height: 1;
    padding: 8px;
    transition: color 0.2s ease;
}

.guidelines-modal-close:hover {
    color: #D2A85C;
}

.guidelines-modal-header {
    color: #D2A85C;
    font-size: 1.3rem;
    margin: 0 0 16px 0;
    padding-right: 24px;
    text-align: center;
    font-weight: bold;
}

.guidelines-modal-body {
    max-height: calc(100vh - 160px);
    overflow-y: auto;
    padding-right: 12px;
    padding-bottom: 12px;
    -webkit-overflow-scrolling: touch;
    box-sizing: border-box;
}

.guidelines-modal-body::-webkit-scrollbar {
    width: 6px;
}
.guidelines-modal-body::-webkit-scrollbar-track {
    background: #FDFBF7;
}
.guidelines-modal-body::-webkit-scrollbar-thumb {
    background: #D2A85C;
    border-radius: 99px;
}

.guidelines-modal-body p {
    font-size: 0.95rem;
    color: #3F3A36;
    line-height: 1.6;
    margin: 0 0 16px 0;
}

.guidelines-modal-body p:last-child {
    margin-bottom: 0;
}

.product-price {
    font-size: 14px;
    color: #A89F91;
    margin-bottom: 8px;
    font-weight: 600;
}

/* === BUTTONS === */
.button {
    padding: 8px 18px;
    font-size: 13px;
    font-weight: bold;
    color: #F5F4F2;
    background-color: #3F3A36;
    border: 2px solid #D2A85C;
    border-radius: 999px;
    text-decoration: none;
    transition: 0.3s ease all;
    cursor: pointer;
}

.button:hover {
    background-color: #D8A7B1;
    color: #3F3A36;
}

.button.secondary {
    background-color: transparent;
    color: #3F3A36;
}

/* === FOOTER === */
footer {
    background-color: #3F3A36;
    color: #F5F4F2;
    text-align: center;
    padding: 30px 20px;
    font-size: 14px;
}

footer a {
    color: #D2A85C;
    text-decoration: none;
}

footer a:hover {
    color: #F5F4F2;
}

.footer-main {
    margin: 0 auto;
    max-width: 900px;
    line-height: 1.6;
}

.footer-icon {
    height: 20px;
    vertical-align: middle;
    margin: 0 5px;
    opacity: 0.9;
}

/* === BACK TO TOP BUTTON === */
#backToTopBtn {
    display: none; /* JS shows this once you've scrolled past 100px */
    margin: 40px auto;
    padding: 8px 16px;
    background-color: #3F3A36;
    border: 2px solid #D2A85C;
    border-radius: 999px;
    text-decoration: none;
    color: #F5F4F2;
    font-size: 14px;
    font-family: inherit;
    font-weight: normal;
    cursor: pointer;
    text-align: center;
    user-select: none;
    transition: all 0.2s ease-in-out;
}

#backToTopBtn:hover,
#backToTopBtn:focus {
    background-color: #D2A85C;
    color: #3F3A36;
    outline: none;
}

/* === CONTACT FORM GRID === */
.form-grid {
    display: grid;
    gap: 1.2rem;
    max-width: 600px;
    margin: auto;
}

.form-grid label {
    display: block;
    font-weight: 500;
}

.form-grid input,
.form-grid select,
.form-grid textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    margin-top: 0.3rem;
    box-sizing: border-box;
}

textarea {
    resize: vertical;
    min-height: 80px;
    line-height: 1.4;
}

/* === CONTACT FORM === */
section.contact-form {
    max-width: 700px;
    margin: 40px auto;
    padding: 20px;
    font-family: Tahoma, sans-serif;
}

/* === AFFILIATE CATALOG GRID & CARD SYSTEM === */
.affiliate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 15px;
    justify-items: center;
}

.grid-card {
    background-color: #FFFFFF;
    border: 2px solid #D2A85C;
    border-radius: 12px;
    width: 100%;
    max-width: 190px;
    height: 320px; /* Fixed, not min-height - every card is identical no matter what the title length is */
    box-sizing: border-box;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
	position: relative; /* Allows absolute positioning of the ribbon */
    overflow: hidden;   /* Clips the diagonal edges of the ribbon so they don't stick out of the card */
}

.grid-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
}

.card-inner {
    border: 1px solid #F5F4F2;
    border-radius: 8px;
    padding: 6px;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    box-sizing: border-box;
    overflow: hidden; /* Guarantees content can never push the fixed card height */
}

.card-image-box {
    width: 100%;
    aspect-ratio: 1 / 1; /* Every source photo is a perfect 1080x1080 square, so match it exactly - no cropping, no letterboxing */
    flex-shrink: 0; /* Image always keeps its full square size, only the title area flexes */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #FFFFFF;
    border-radius: 6px;
}

.card-image-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Safe now - box and image share the same 1:1 ratio, so this never crops anything */
}

.card-title {
    font-size: 13px;
    font-weight: bold;
    color: #3F3A36;
    margin: 10px 0 0 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Safety net only - fits almost every real title in full; guarantees the fixed card height can never be broken by an outlier */
    -webkit-box-orient: vertical;
}
/* Diagonal "New" Product Ribbon */
.ribbon-new {
    position: absolute;
    top: 12px;
    right: -24px;
    background-color: #D8A7B1; /* Cohesive brand rose color */
    color: #3F3A36;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 0;
    width: 85px;
    text-align: center;
    transform: rotate(45deg);
    z-index: 5;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* === SKELETON LOADING STATE (shown briefly while products.json fetches) === */
.skeleton-card {
    cursor: default;
    pointer-events: none;
}

.skeleton-box {
    background: linear-gradient(90deg, #F0EEEA 25%, #F7F5F2 37%, #F0EEEA 63%);
    background-size: 400% 100%;
    animation: skeleton-shimmer 1.4s ease infinite;
    border-radius: 6px;
}

.skeleton-image {
    width: 100%;
    aspect-ratio: 1 / 1;
}

.skeleton-line {
    height: 13px;
    margin-top: 10px;
    width: 100%;
}

.skeleton-line.short {
    width: 60%;
    margin-top: 8px;
}

@keyframes skeleton-shimmer {
    0% { background-position: 100% 50%; }
    100% { background-position: 0 50%; }
}

@media (prefers-reduced-motion: reduce) {
    .skeleton-box {
        animation: none;
        background: #F0EEEA;
    }
}

/* === DYNAMIC MODAL DETAIL OVERLAY === */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(63, 58, 54, 0.6);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}

.expanded-card {
    background-color: #FFFFFF;
    border: 2px solid #D2A85C;
    border-radius: 12px;
    width: min(94vw, 760px);
    min-height: 420px;
    height: auto;
    box-sizing: border-box;
    padding: 15px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    text-align: center;
}

.expanded-inner {
    border: 2px solid #F5F4F2;
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 14px;
    box-sizing: border-box;
}

.expanded-top-row {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 20px;
}

.expanded-image-box {
    flex: 1;
    min-width: 0;
    max-height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 6px;
    background-color: #F5F4F2;
}

.expanded-image-box img {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 600px;
    object-fit: contain;
    border-radius: 4px;
}

.expanded-text-col {
    width: 230px;
    flex-shrink: 0;
    text-align: left;
}

.expanded-title {
    font-size: 16px;
    font-weight: bold;
    color: #3F3A36;
    margin: 10px 0 5px;
    overflow-wrap: break-word;
    word-break: break-word;
}

.expanded-desc {
    font-size: 12px;
    line-height: 1.4;
    color: #6A645F;
    height: 90px;
    overflow-y: auto;
    margin: 0 0 10px 0;
    text-align: justify;
    overflow-wrap: break-word;
    word-break: break-word;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 12px;
    font-size: 20px;
    color: #3F3A36;
    cursor: pointer;
    background: none;
    border: none;
    font-weight: bold;
    z-index: 10;
}

.close-btn:hover {
    color: #D8A7B1;
}

.modal-link-button {
    display: block;
    width: 80%;
    max-width: 200px;
    margin: 12px auto 4px auto;
    box-sizing: border-box;
    text-align: center;
}

.modal-code-box {
    display: none;
    background-color: #F5F4F2;
    border: 1px dashed #D2A85C;
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
    font-size: 14px;
    font-weight: bold;
    color: #3F3A36;
}

.modal-code-highlight {
    color: #D2A85C;
    text-transform: uppercase;
    font-size: 15px;
    letter-spacing: 1px;
}

/* === DYNAMIC CATALOG SIDEBAR & GRID LAYOUT === */
.catalog-layout {
    display: flex;
    gap: 20px;
    max-width: 1350px;
    margin: 40px auto;
    padding: 0 20px;
}

.catalog-sidebar {
    flex: 0 0 180px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: -webkit-sticky;
    position: sticky;
    top: 40px;
    align-self: flex-start;
    max-height: calc(100vh - 80px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #D2A85C transparent;
}

.catalog-sidebar::-webkit-scrollbar {
    width: 4px;
}

.catalog-sidebar::-webkit-scrollbar-thumb {
    background-color: #D2A85C;
    border-radius: 4px;
}

.catalog-sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.category-nav-btn {
    background: none;
    border: none;
    text-align: left;
    padding: 12px 15px;
    font-size: 14px;
    font-family: inherit;
    color: #3F3A36;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease-in-out;
    width: 100%;
    text-transform: capitalize;
}

.category-nav-btn:hover {
    background-color: #F3EAE1;
    color: #D2A85C;
}

.category-nav-btn.active {
    background-color: #D8A7B1;
    color: #3F3A36;
    font-weight: bold;
}

.category-filter-toggle {
    display: none; /* Only shown on mobile - see the 768px media query */
}

.catalog-content {
    flex: 1;
    min-width: 0; /* Without this, flexbox lets the grid inside overflow past the container instead of shrinking to fit */
}

/* === HERO BANNER: 3-COLUMN COLLAGE === */
.hero-collage {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  height: 480px;
  width: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.hero-image-wrapper {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.hero-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.85);
  transition: transform 0.4s ease, filter 0.4s ease;
}

.hero-image-wrapper img:hover {
  transform: scale(1.04);
  filter: brightness(0.95);
}

.hero-overlay-text {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: #FFFFFF;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  width: 90%;
  max-width: 600px;
}

.hero-overlay-text h1 {
  font-size: 2.8rem;
  margin: 0 0 12px 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 700;
}

.hero-overlay-text p {
  font-size: 1.2rem;
  margin: 0;
  font-weight: 400;
  opacity: 0.95;
}

/* === HERO BANNER: SPLIT-SCREEN === */
.hero-split {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background-color: #F3EAE1;
  padding: 50px;
  border-radius: 12px;
  margin-bottom: 40px;
}

.hero-split-text {
  flex: 1;
  max-width: 500px;
}

.hero-split-text h3 {
  font-size: 2.8rem;
  color: #3F3A36;
  margin: 0 0 15px 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  font-weight: 700;
}

.hero-split-text p {
  font-size: 1.2rem;
  color: #555555;
  line-height: 1.6;
  margin: 0;
}

.hero-split-image {
  flex-shrink: 0;
  width: 380px;
  height: 380px;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
  position: relative;
}

.hero-split-image a {
  display: block;
  position: relative;
  width: 100%;
  height: 100%;
  text-decoration: none;
}

.hero-split-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease-in-out;
}

.hero-split-image a:hover img,
.hero-split-image a:focus img {
  transform: scale(1.04);
}

.featured-product-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 18px 16px 14px;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0));
  color: #FDFBF7;
}

.featured-product-title {
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 4px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.featured-product-cta {
  font-size: 0.78rem;
  font-weight: 600;
  color: #D2A85C;
  margin: 0;
}

/* === RESPONSIVE LAYOUTS === */
@media (max-width: 768px) {
    .subscribe-banner {
        font-size: 12px;
        padding: 8px 36px;
    }

    #dismiss-banner-btn {
        font-size: 18px;
        right: 4px;
    }

    .catalog-layout {
        flex-direction: column;
        gap: 20px;
        position: relative; /* anchors the floating category panel below */
    }

    .affiliate-grid {
        grid-template-columns: repeat(2, 1fr); /* Exactly 2 cards across, not auto-calculated */
        gap: 18px;
        max-width: 100%;
        margin: 20px auto;
        padding: 0 15px;
    }

    .grid-card {
        width: 100%;
        max-width: 190px;
        height: 320px;
    }

    .catalog-sidebar {
        flex: auto;
        flex-direction: column; /* same vertical list as desktop, not a new mobile layout */
        border: 1px solid #EACFCF;
        border-radius: 10px;

        /* Floats above the page instead of pushing content down when opened */
        position: absolute;
        top: 60px; /* sits just below the toggle button */
        left: 0;
        right: 0;
        z-index: 50;
        max-height: 320px;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        background-color: #FDFBF7;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);

        /* Collapsed by default - JS toggles .is-open to expand it */
        display: none;
    }

    .catalog-sidebar.is-open {
        display: flex;
    }

    .sidebar-title {
        display: none;
    }

    .category-nav-btn {
        width: 100%;
        border-bottom: 1px solid #F3EAE1;
    }

    .category-filter-toggle {
        display: flex; /* hidden on desktop, see base rule */
        width: 100%;
        align-items: center;
        justify-content: space-between;
        padding: 12px 18px;
        margin-bottom: 10px;
        background-color: #FDFBF7;
        border: 1.5px solid #D2A85C;
        border-radius: 10px;
        color: #3F3A36;
        font-size: 15px;
        font-weight: bold;
        cursor: pointer;
    }

    .category-filter-toggle .chevron {
        transition: transform 0.2s ease-in-out;
    }

    .category-filter-toggle.is-open .chevron {
        transform: rotate(180deg);
    }

    nav.topnav {
        flex-wrap: wrap;
        justify-content: center;
        row-gap: 10px;
        padding: 14px 10px;
    }

    nav.topnav ul {
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }

    nav.topnav a {
        padding: 10px 18px; /* extra breathing room so text never crowds the pill border */
    }

    .topnav-socials {
        margin-top: 2px;
    }

    .guidelines-trigger-btn {
        margin: 0;
    }

    .intro {
        flex-direction: column;
        padding: 20px;
    }

    .intro-text {
        width: 100%;
        text-align: center;
    }

    .hero-collage {
        grid-template-columns: repeat(2, 1fr);
        height: 520px;
    }
    
    .hero-collage .hero-image-wrapper:nth-child(3) {
        display: none;
    }
    
    .hero-overlay-text h1 {
        font-size: 2rem;
    }
    
    .hero-overlay-text p {
        font-size: 1rem;
    }

    .hero-split {
        flex-direction: column-reverse;
        text-align: center;
        gap: 25px;
        padding: 30px 20px;
    }
    
    .hero-split-text {
        max-width: 100%;
    }
    
    .hero-split-image {
        width: 100%;
        max-width: 320px;
        height: 320px;
    }

    .main-content {
        padding: 20px;
        margin: 20px auto;
    }
}

@media (max-width: 480px) {
    .hero-collage {
        grid-template-columns: 1fr;
    }
    
    .hero-collage .hero-image-wrapper:nth-child(2) {
        display: none;
    }

    .expanded-top-row {
        flex-direction: column;
        align-items: center;
    }

    .expanded-image-box {
        width: 100%;
    }

    .expanded-text-col {
        width: 100%;
        text-align: center;
    }
}
/* === MAIN CONTENT (Legal & Standard Pages) === */
.main-content {
    max-width: 800px;
    width: 90%;
    margin: 40px auto;
    padding: 30px;
    background-color: #FFFFFF;
    border: 2px solid #D2A85C;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    box-sizing: border-box;
}

.main-content section {
    margin-bottom: 30px;
}

.main-content h2, 
.main-content h3 {
    color: #3F3A36;
    border-bottom: 1px solid #EACFCF;
    padding-bottom: 8px;
    margin-top: 0;
    font-size: 1.4rem;
}

.main-content p, 
.main-content li {
    line-height: 1.7;
    color: #555555;
    font-size: 15px;
}

.main-content ul {
    padding-left: 20px;
    margin-bottom: 20px;
}

/* === NEWSLETTER SIGNUP SECTION === */
.newsletter-signup {
    text-align: center;
    background-color: #EACFCF; /* Soft pink background matching your page headers */
    padding: 40px 20px;
    margin: 40px 0 0 0; /* Sits nicely right above the footer */
    width: 100%;
    box-sizing: border-box;
}

.newsletter-signup h2 {
    font-size: 1.8em;
    margin: 0 0 10px 0;
    color: #3F3A36;
    font-weight: bold;
}

.newsletter-signup p {
    font-size: 1em;
    color: #6A645F;
    margin: 0 0 20px 0;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Updated container to stack the form fields row and the consent checkbox vertically */
.newsletter-form {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    max-width: 650px; /* Increased from 500px to allow enough room on a single line */
    margin: 0 auto;
}

/* This container keeps the inputs and button on one line */
.newsletter-form .form-fields {
    display: flex;
    flex-direction: row;
    width: 100%;
    gap: 10px;
    justify-content: center;
}

/* Target both text and email inputs */
.newsletter-form input[type="text"],
.newsletter-form input[type="email"] {
    flex: 1;
    min-width: 120px; /* Allows inputs to shrink slightly on smaller desktop screens */
    padding: 10px 20px;
    border: 2px solid #D2A85C;
    border-radius: 999px;
    font-size: 14px;
    outline: none;
    box-sizing: border-box;
}

/* Consent Checkbox Styling */
.newsletter-form .newsletter-consent {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    color: #6A645F;
}

.newsletter-form .newsletter-consent input[type="checkbox"] {
    cursor: pointer;
    margin: 0;
}

.newsletter-form .newsletter-consent label {
    cursor: pointer;
}

.newsletter-form .newsletter-consent a {
    color: #3F3A36;
    text-decoration: underline;
}

/* Mobile Responsiveness: Stacks inputs vertically on narrow screens */
@media (max-width: 580px) {
    .newsletter-form .form-fields {
        flex-direction: column;
        align-items: stretch;
    }
    
    .newsletter-form input[type="text"],
    .newsletter-form input[type="email"] {
        width: 100%;
    }
}
/* Smooth transition for the button */
.newsletter-form button.button {
    cursor: pointer;
    white-space: nowrap;
    padding: 10px 20px;
    border-radius: 999px;
    background-color: #3F3A36; /* Your dark brown color */
    color: #FFFFFF;
    border: none;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Hover state */
.newsletter-form button.button:hover {
    transform: translateY(-1px); /* Gently lifts the button */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15); /* Adds a soft shadow */
}

/* Active (click) state */
.newsletter-form button.button:active {
    transform: translateY(1px); /* Presses the button down slightly */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}