:root {
    /* Heirloom Curator Palette */
    --primary: #570000;
    --on-primary: #ffffff;
    --primary-container: #800000;
    --secondary: #825426;
    --background: #fff8f2;
    --surface: #fff8f2;
    --surface-variant: #e9e1d9;
    --surface-container-high: #efe7de;
    --on-background: #1e1b16;
    --outline: #8e706c;
    --outline-variant: #e2bfb9;
    --on-surface: #1e1b16;
    --surface-container-low: #faf2e9;
    --surface-container-lowest: #ffffff;
    
    /* Legacy / Compatibility */
    --vintage-rust: #570000;
    --rust-subtle: #efe7de;
    --vintage-cream: #fff8f2;
    --vintage-paper: #fff8f2;
}

.text-primary {
    color: var(--primary) !important;
}

.text-secondary {
    color: var(--secondary) !important;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--background);
    color: var(--on-background);
}

a {
    color: var(--secondary);
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: var(--primary);
}

h1, h2, h3, h4, h5, h6, .serif {
    font-family: 'Noto Serif', serif;
}

.navbar {
    border-bottom: 1px solid rgba(166, 99, 75, 0.1);
    padding: 1.5rem 0;
}

.navbar-collapse {
    justify-content: flex-end !important;
}

.navbar-brand {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--vintage-rust) !important;
}

.navbar-brand .logo-img {
    max-height: 50px;
    width: auto;
}

.nav-link {
    font-size: 0.85rem;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--vintage-dark);
    margin: 0 0.75rem;
    text-align: center;
    line-height: 1.2;
    display: inline-block;
    white-space: nowrap; /* Force single line as requested */
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--vintage-rust);
}

/* Vintage Crochet Leaflets & Books */
.bg-vintage-paper {
    background-color: var(--vintage-paper);
}

.leaflet-card img {
    aspect-ratio: 3/4;
    object-fit: cover;
    width: 100%;
    max-height: 350px;
    margin-bottom: 1rem;
}

.leaflet-card {
    background: white;
    padding: 0.75rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.leaflet-card h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.leaflet-card h3 a {
    text-decoration: none;
    color: var(--vintage-dark);
}

.leaflet-card h3 a:hover {
    color: var(--vintage-rust);
}

/* Pattern Categories */
.category-link {
    display: block;
    padding: 0.25rem 0;
    color: var(--vintage-dark);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.85rem;
    line-height: 1.2;
    transition: color 0.3s ease;
}

.category-link:hover {
    color: var(--vintage-rust);
    text-decoration: underline;
}

/* Newsletter Signup */
.newsletter-input {
    padding: 0.75rem 1rem;
    border: 1px solid rgba(166, 99, 75, 0.2);
    border-radius: 4px;
    background-color: transparent;
}

.newsletter-input:focus {
    border-color: var(--vintage-rust);
    box-shadow: none;
    outline: none;
}

/* Homepage Content Section */
.homepage-image-wrapper {
    z-index: 1;
}

.decorative-border {
    z-index: -1;
    margin: 15px;
    border-color: var(--vintage-rust) !important;
}

.homepage-feature-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hover-rust:hover {
    color: var(--vintage-rust) !important;
}

.social-icons a {
    transition: color 0.3s ease;
}

.social-icons a:hover {
    color: var(--vintage-rust) !important;
}

/* Base Form Styling overrides if needed */
/* Dropdown Menu UI Refinement */
.dropdown-menu {
    background-color: var(--vintage-paper);
    border: 1px solid rgba(166, 99, 75, 0.1);
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    animation: fadeIn 0.3s ease;
}

.dropdown-item {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--vintage-dark);
    padding: 0.6rem 1.5rem;
    transition: all 0.2s ease;
}

.dropdown-item:hover, .dropdown-item:focus {
    background-color: var(--vintage-rust);
    color: white !important;
}

.dropdown-toggle::after {
    vertical-align: middle;
    margin-left: 0.5em;
    opacity: 0.5;
}

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

/* Search UI */
.search-expand-wrapper {
    max-height: 0;
    transition: max-height 0.3s ease-out, opacity 0.2s ease-out;
    opacity: 0;
    visibility: hidden;
    background-color: white;
    overflow: hidden;
    position: relative;
    z-index: 1050;
}

@media (max-width: 991.98px) {
    .search-expand-wrapper {
        display: none !important;
    }
}

.search-expand-wrapper.show {
    max-height: 120px; /* Reduced for smoother transition */
    opacity: 1;
    visibility: visible;
    border-bottom: 2px solid var(--vintage-rust);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

/* Adjust navbar spacing for medium screens to prevent overflow */
@media (min-width: 992px) and (max-width: 1300px) {
    .nav-link {
        margin: 0 0.2rem;
        font-size: 0.7rem;
    }
}

.search-container {
    position: relative;
    z-index: 100;
}

.search-container input[type="search"],
.search-container input[type="text"] {
    background-color: var(--vintage-paper);
    border: 1px solid rgba(166, 99, 75, 0.2);
    border-radius: 4px;
    padding: 0.8rem 6rem 0.8rem 3.5rem; /* Increased right and left padding */
    font-size: 1rem;
    width: 100%;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.search-container input:focus {
    outline: none;
    border-color: var(--vintage-rust);
    box-shadow: 0 0 0 3px rgba(166, 99, 75, 0.1);
}

.search-container::before {
    content: '\F52A'; /* Bootstrap Icon Search code */
    font-family: 'bootstrap-icons' !important;
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--vintage-rust);
    font-size: 1.2rem;
    opacity: 0.6;
    pointer-events: none;
    z-index: 5;
}

/* Specific styling for mobile search inside offcanvas */
.mobile-search-wrapper .search-container input {
    border-radius: 50px; /* Modern rounded look for mobile */
    background-color: white;
}

#searchToggle {
    cursor: pointer;
    transition: transform 0.2s ease;
}

#searchToggle:hover {
    transform: scale(1.1);
}

/* Offcanvas & Mobile Nav */
.offcanvas {
    width: 300px !important;
}

.border-rust-subtle {
    border-color: rgba(166, 99, 75, 0.1) !important;
}

.text-rust {
    color: var(--vintage-rust);
}

.mobile-nav-block {
    width: 100%;
}

@media (max-width: 991.98px) {
    .offcanvas-body .navbar-nav {
        flex-direction: column;
        align-items: flex-start !important;
    }
    
    .offcanvas-body .nav-link {
        margin: 0.5rem 0;
        width: 100%;
        text-align: left;
        padding: 0.5rem 0;
        font-size: 1rem;
    }
    
    .offcanvas-body .dropdown-menu {
        position: static;
        float: none;
        background: transparent;
        border: none;
        box-shadow: none;
        padding-left: 1rem;
    }
}

/* Hide Drupal default block title and labels for search */
.search-container h2,
.search-container label {
    display: none;
}

.search-container .form-actions {
    position: absolute;
    right: 8px; /* Slightly more inside */
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
}

.search-container input[type="submit"] {
    background-color: var(--vintage-rust);
    color: white;
    border: none;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.search-container input[type="submit"]:hover {
    opacity: 0.9;
}

.hero-section {
    height: 600px;
    background: linear-gradient(rgba(0,0,0,0.2), rgba(0,0,0,0.2)), url('https://picsum.photos/seed/hero/1920/1080');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    color: white;
}

.hero-title {
    font-size: 4.5rem;
    font-weight: 700;
    line-height: 1.1;
}

.hero-title span {
    font-style: italic;
    font-weight: 400;
}

.btn-vintage {
    background-color: var(--vintage-rust);
    color: white;
    border-radius: 2px;
    padding: 1rem 2rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 500;
    border: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.btn-vintage:hover {
    background-color: #8e5440;
    color: white;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.title-underline {
    width: 80px;
    height: 4px;
    background-color: var(--vintage-rust);
    margin: 0 auto 3rem;
}

.pattern-card {
    background: white;
    border: 1px solid rgba(166, 99, 75, 0.05);
    border-radius: 8px;
    padding: 1rem;
    height: 100%;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pattern-card .text-center {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.pattern-card .btn-outline-vintage {
    margin-top: auto;
}

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

.pattern-card img,
.pattern-img {
    aspect-ratio: 4/3;
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 1.5rem;
    width: 100%;
}

.btn-outline-vintage {
    border: 1px solid rgba(166, 99, 75, 0.2);
    color: var(--vintage-rust);
    background-color: rgba(166, 99, 75, 0.05);
    width: 100%;
    padding: 0.75rem;
    text-transform: uppercase;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
}

.btn-outline-vintage:hover {
    background-color: var(--vintage-rust);
    color: white;
}

.bg-vintage-paper {
    background-color: var(--vintage-paper);
}

.leaflet-card {
    background: white;
    padding: 0.75rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    height: 100%;
}

.leaflet-img {
    aspect-ratio: 3/4;
    object-fit: cover;
    width: 100%;
    margin-bottom: 1rem;
}

.category-link {
    font-size: 0.85rem;
    color: var(--vintage-dark);
    text-decoration: none;
    display: block;
    padding: 0.25rem 0;
}

.category-link:hover {
    color: var(--vintage-rust);
    text-decoration: underline;
}

.newsletter-input {
    padding: 0.85rem 1rem;
    border: 1px solid rgba(166, 99, 75, 0.2);
    border-radius: 4px;
    background-color: white;
    font-size: 0.95rem;
    color: var(--vintage-dark);
}

.newsletter-input:focus {
    border-color: var(--vintage-rust);
    box-shadow: 0 0 0 0.25rem rgba(166, 99, 75, 0.1);
    outline: none;
}

footer {
    border-top: 1px solid rgba(166, 99, 75, 0.1);
    padding: 4rem 0;
}

.social-icons i {
    font-size: 1.2rem;
    margin: 0 0.75rem;
    cursor: pointer;
    transition: color 0.2s;
}

.social-icons i:hover {
    color: var(--vintage-rust);
}

/* Heirloom Curator Redesign: Centered Editorial */
.pattern-container-wide {
    max-width: 1100px; /* Reduced for better reading width */
    margin: 0 auto;
    padding: 2rem;
}

.pattern-header-centered {
    max-width: 800px;
    margin: 0 auto;
}

.pattern-breadcrumb-archive {
    font-size: 0.85rem;
    color: var(--secondary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.pattern-breadcrumb-archive a {
    color: var(--secondary);
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 600;
}

.pattern-breadcrumb-archive a:hover {
    color: var(--primary);
}

.pattern-title-huge {
    font-family: 'Noto Serif', serif;
    font-size: 3.5rem;
    line-height: 1.15;
    color: var(--primary);
    font-weight: 700;
}

.pattern-hero-editorial {
    padding-bottom: 4rem;
}

.pattern-editorial-image-frame {
    background: #ffffff;
    padding: 1.5rem; /* Elegant uniform border */
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(87, 0, 0, 0.05), 0 1px 3px rgba(0,0,0,0.02);
    border: 1px solid rgba(139, 90, 43, 0.1);
    max-width: 100%;
    display: inline-block; /* Wraps tightly around the image */
}

.pattern-editorial-image-frame img {
    border-radius: 2px;
    max-width: 100%;
    height: auto;
    max-height: 550px;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

.spec-bento-card {
    background-color: var(--surface-container-high);
    border-radius: 12px;
    padding: 2.5rem 2rem;
    box-shadow: 0 4px 20px rgba(0,0,0,0.02);
}

.spec-bento-title {
    font-family: 'Noto Serif', serif;
    font-size: 1.5rem;
    color: var(--secondary);
    font-style: italic;
    margin-bottom: 2rem;
}

.spec-grid-item-label {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--outline);
    margin-bottom: 0.5rem;
    display: block;
    letter-spacing: 0.05em;
}

.spec-grid-item-value {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 500;
    color: var(--on-surface);
    font-size: 1.1rem;
}

.editorial-layout {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 4rem;
}

.sidebar-nav-sticky {
    grid-column: span 3;
    position: sticky;
    top: 100px;
    height: fit-content;
}

.sidebar-nav-sticky h4 {
    font-size: 1.1rem;
    line-height: 1.2;
}

.main-instruction-area {
    grid-column: span 9;
}

.instruction-section-title {
    font-family: 'Noto Serif', serif;
    font-size: 2.5rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2.5rem;
}

.instruction-section-title::after {
    content: '';
    height: 1px;
    background: var(--outline-variant);
    flex-grow: 1;
    opacity: 0.4;
}

.row-block {
    margin-bottom: 2.5rem;
}

.row-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.2em;
    color: var(--secondary);
    margin-bottom: 0.75rem;
    display: block;
}

.row-content {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.25rem;
    line-height: 1.6;
    color: var(--on-surface);
}

.pattern-instructions-editorial p {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--on-surface);
    margin-bottom: 2rem;
}

.pattern-instructions-editorial h2, 
.pattern-instructions-editorial h3 {
    font-family: 'Noto Serif', serif;
    color: var(--primary);
    margin-top: 3rem;
    margin-bottom: 1.5rem;
}

.pattern-instructions-editorial b, 
.pattern-instructions-editorial strong {
    color: var(--primary);
    font-weight: 700;
}

/* Material symbols simulation with icons */
.instruction-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary);
    display: inline-block;
    margin-top: 0.5rem;
}

.bg-gradient-maroon {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-container) 100%) !important;
    border: none !important;
    color: white !important;
}

.btn-surface-container {
    background-color: var(--surface-container-high) !important;
    color: var(--primary) !important;
    border: none !important;
    font-weight: 600;
}

@media (max-width: 1024px) {
    .pattern-hero-asymmetric, .editorial-layout {
        display: block;
    }
    .pattern-hero-text, .pattern-hero-visual, .sidebar-nav-sticky, .main-instruction-area {
        width: 100%;
        margin-bottom: 2rem;
    }
    .pattern-title-huge {
        font-size: 2.5rem;
    }
}

/* Sidebar Patterns List Styling */
.sidebar-patterns-list {
    display: flex;
    flex-direction: column;
}

.sidebar-patterns-list a {
    display: block;
    color: var(--secondary);
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 0.4rem 0;
    line-height: 1.4;
    position: relative;
    padding-left: 1.5rem;
    font-weight: 500;
}

.sidebar-patterns-list a::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--outline-variant);
    position: absolute;
    left: 0;
    top: 0.75rem;
    transition: all 0.3s ease;
}

.sidebar-patterns-list a:hover {
    color: var(--primary);
    transform: translateX(4px);
}

.sidebar-patterns-list a:hover::before {
    background: var(--primary);
}

.sidebar-patterns-list p {
    margin-bottom: 0;
}

.sidebar-patterns-list br {
    display: none;
}

/* Dynamic Category Grid Styling - Matched to original patterncategories View */
.block-content-basic .category-link {
    font-size: 0.85rem;
    color: var(--secondary);
    text-decoration: none;
    display: block;
    padding: 0.1rem 0;
    transition: color 0.3s ease;
    font-weight: 400;
    line-height: 1.4;
}

.block-content-basic .category-link:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* Pattern Summary Card Grid */
.pattern-grid-wrapper {
    margin-top: 4rem;
}

.pattern-card {
    background: var(--surface-container-lowest);
    border: 1px solid var(--outline-variant);
    border-radius: 4px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
    text-decoration: none !important;
}

.pattern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(87, 0, 0, 0.08);
    border-color: var(--secondary);
}

.pattern-card .card-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    background: var(--surface-variant);
}

.pattern-card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.pattern-card:hover .card-image img {
    transform: scale(1.08);
}

.pattern-card .card-body {
    padding: 1rem;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--surface-container-lowest);
}

.pattern-card .card-title {
    font-family: var(--font-headline);
    font-size: 1rem;
    color: var(--secondary);
    margin: 0;
    line-height: 1.4;
    font-weight: 500;
}

.pattern-card:hover .card-title {
    color: var(--primary);
}

.node--type-pattern-summary .node-content {
    line-height: 1.8;
    color: var(--on-surface);
    font-size: 1.05rem;
}

.node--type-pattern-summary .node-content p {
    margin-bottom: 1.5rem;
}

/* Modern Legacy Gallery Grid */
.legacy-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  margin: 3rem 0;
}

@media (min-width: 576px) {
  .legacy-gallery-grid { grid-template-columns: repeat(4, 1fr); }
}

@media (min-width: 992px) {
  .legacy-gallery-grid { grid-template-columns: repeat(5, 1fr); }
}

@media (min-width: 1200px) {
  .legacy-gallery-grid { grid-template-columns: repeat(7, 1fr); gap: 1.5rem; }
}

.legacy-gallery-item {
  background: #ffffff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px rgba(0,0,0,0.05), 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.3s ease;
  height: 100%;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(139, 90, 43, 0.15);
}

.legacy-gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 20px rgba(0,0,0,0.1);
  border-color: #DDB868;
}

.legacy-gallery-item .gallery-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  background-color: #fdfcfaf0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-bottom: 1px solid rgba(0,0,0,0.05);
}

.legacy-gallery-item .gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  border: none !important; /* Override legacy inline borders */
  padding: 0 !important;
}

.legacy-gallery-item:hover .gallery-image img {
  transform: scale(1.08);
}

.legacy-gallery-item .gallery-title {
  padding: 1rem 0.75rem;
  text-align: center;
  flex-grow: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  line-height: 1.4;
  margin: 0;
  font-weight: 600;
  font-family: var(--font-body, 'Inter', sans-serif);
}

.legacy-gallery-item .gallery-title a {
  color: #5A3E2B;
  text-decoration: none;
  transition: color 0.2s;
}

.legacy-gallery-item .gallery-title a:hover {
  color: #DDB868;
}

/* Pattern Redesign: Image Floated Left Layout */
.pattern-container-full {
    max-width: 1600px;
    margin: 0 auto;
}

.pattern-image-float-left {
    float: left;
    margin-right: 1.5rem !important; /* Adding spacing */
    margin-bottom: 1.5rem !important;
}

@media (max-width: 768px) {
    .pattern-image-float-left {
        float: none;
        display: block;
        margin-right: 0 !important;
        margin-bottom: 2rem !important;
    }
}

.pattern-image-float-left img {
    width: auto;
    height: auto;
    max-width: 100%;
    object-fit: contain;
    border: 1px solid rgba(139, 90, 43, 0.15); /* Subtle border matching the aesthetic */
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Print & PDF Layout Optimizations */
@media print {
    /* Hide headers, footers, sidebars, and extra blocks entirely */
    header#header, 
    footer, 
    .region-sidebar-first, 
    .region-sidebar-second,
    .region-footer,
    .region-bottom,
    #block-freevintagecrochet-patterncategories,
    #block-freevintagecrochet-crochetpatterncategoryblock,
    .block-views-blockpattern-categories-block-1,
    .newsletter-icontact-section,
    .site-footer,
    nav {
        display: none !important;
    }
    
    /* Ensure the main content takes full width without margins */
    main, .region-content, .pattern-container-full, body {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 !important;
        padding: 0 !important;
    }
    
    /* Specifically hide the things in the node we tagged */
    .d-print-none {
        display: none !important;
    }
    
    /* Prevent page breaks inside the instructions if possible */
    .pattern-instructions-editorial {
        page-break-inside: auto;
    }
}

/* Premium Editorial Typography for Pattern Instructions */
.pattern-instructions-editorial {
    font-family: 'Noto Serif', serif;
    font-size: 1.15rem;
    line-height: 1.85;
    color: #2c2925;
}

.pattern-instructions-editorial p {
    margin-bottom: 1.5rem;
}

/* Highlight row instructions (e.g. "1st Row:") */
.pattern-instructions-editorial b, 
.pattern-instructions-editorial strong {
    color: var(--secondary);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    letter-spacing: 0.3px;
}

/* Beautiful Drop Cap for the first paragraph of instructions */
.pattern-instructions-editorial > div:first-of-type > p:first-of-type::first-letter,
.pattern-instructions-editorial > p:first-of-type::first-letter {
    float: left;
    font-size: 3.8rem;
    line-height: 0.8;
    padding-top: 0.2rem;
    padding-right: 0.6rem;
    color: var(--primary);
    font-family: 'Noto Serif', serif;
    font-weight: 700;
}

/* Premium Editorial Table Styling (for old material tables) */
.pattern-instructions-editorial table {
    width: 100% !important;
    max-width: 800px;
    margin: 2.5rem 0;
    border-collapse: collapse;
    background-color: #fffaf0; /* Light vintage cream */
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(139, 90, 43, 0.08);
    border: 1px solid rgba(139, 90, 43, 0.2) !important;
}

.pattern-instructions-editorial table tbody tr td,
.pattern-instructions-editorial table tbody tr th {
    padding: 1.25rem 1.5rem !important;
    border: 1px solid rgba(139, 90, 43, 0.1) !important;
    text-align: left;
    vertical-align: top;
    color: #4a4a4a;
}

/* Style the first row as a header if it contains bold text */
.pattern-instructions-editorial table tr:first-child td b,
.pattern-instructions-editorial table tr:first-child td strong {
    font-family: 'Outfit', sans-serif;
    font-size: 1.1rem;
    color: #8B5A2B;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Subtle striping for rows */
.pattern-instructions-editorial table tr:nth-child(even) {
    background-color: rgba(139, 90, 43, 0.03);
}

/* Handle the weird empty "or" / "and" rows elegantly */
.pattern-instructions-editorial table td[colspan="3"] {
    text-align: center !important;
    background-color: transparent !important;
    font-style: italic;
    color: #8B5A2B;
    border: none !important;
    padding: 0.75rem !important;
    opacity: 0.8;
}

/* ==========================================
   Premium Split-Screen Authentication Layout
   ========================================== */

.auth-split-layout {
    display: flex;
    min-height: 100vh;
    width: 100vw;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Left Side - Visual Background */
.auth-visual-side {
    display: none;
    position: relative;
    background-color: var(--primary);
    background-image: url('../../../sites/default/files/images/star82_granny.jpg'); /* Use a nice vintage pattern */
    background-size: cover;
    background-position: center;
}

@media (min-width: 992px) {
    .auth-visual-side {
        display: flex;
        flex: 1 1 50%;
        align-items: center;
        justify-content: center;
    }
}

.auth-visual-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 248, 242, 0.92) 0%, rgba(239, 231, 222, 0.92) 100%);
    z-index: 1;
}

.auth-visual-content {
    position: relative;
    z-index: 2;
    max-width: 500px;
    padding: 2rem;
}

.auth-visual-content h1 {
    /* Removed text shadow for cleaner light mode look */
}

.auth-logo {
    max-height: 80px;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.2));
}

/* Right Side - Form Container */
.auth-form-side {
    flex: 1 1 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

@media (min-width: 992px) {
    .auth-form-side {
        flex: 1 1 50%;
        padding: 4rem;
    }
}

.auth-form-container {
    width: 100%;
    max-width: 450px;
}

/* Glassmorphism/Premium Card for the Login Form */
.auth-form-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    padding: 3rem;
    box-shadow: 0 10px 40px rgba(139, 90, 43, 0.1);
    border: 1px solid rgba(139, 90, 43, 0.1);
}

.auth-form-card h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

/* Form Element Styling */
.auth-form-wrapper .form-item {
    margin-bottom: 1.5rem;
}

.auth-form-wrapper label {
    font-weight: 600;
    color: var(--on-surface);
    margin-bottom: 0.5rem;
    display: inline-block;
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 0.9rem;
}

.auth-form-wrapper input[type="text"],
.auth-form-wrapper input[type="email"],
.auth-form-wrapper input[type="password"] {
    width: 100%;
    padding: 0.85rem 1rem;
    border-radius: 6px;
    border: 1px solid var(--outline-variant);
    background-color: var(--surface-container-lowest);
    color: var(--on-surface);
    transition: all 0.3s ease;
    font-size: 1rem;
}

.auth-form-wrapper input[type="text"]:focus,
.auth-form-wrapper input[type="email"]:focus,
.auth-form-wrapper input[type="password"]:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(87, 0, 0, 0.1);
    outline: none;
}

.auth-form-wrapper input[type="submit"],
.auth-form-wrapper button.button {
    width: 100%;
    padding: 0.85rem;
    background-color: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    margin-top: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.auth-form-wrapper input[type="submit"]:hover,
.auth-form-wrapper button.button:hover {
    background-color: var(--primary-container);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(87, 0, 0, 0.2);
}

/* Fix links inside the form (forgot password, create account) */
.auth-form-wrapper .item-list ul {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0 0 0;
    text-align: center;
}

.auth-form-wrapper .item-list ul li {
    margin-bottom: 0.5rem;
}

.auth-form-wrapper .item-list ul li a {
    color: var(--secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-form-wrapper .item-list ul li a:hover {
    text-decoration: underline;
}

/* System messages on the login page */
.auth-messages .messages {
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Editorial Menu Reference Block */
.premium-menu-block {
    background: transparent;
    padding: 2.5rem 0;
    margin: 3rem auto;
    max-width: 800px;
    position: relative;
    border-top: 1px solid var(--outline-variant);
    border-bottom: 1px solid var(--outline-variant);
}

.premium-menu-block::before,
.premium-menu-block::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    border-top: 1px solid var(--outline-variant);
}

.premium-menu-block::before {
    top: 3px;
}

.premium-menu-block::after {
    bottom: 3px;
}

.premium-menu-title {
    color: var(--primary);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2.5rem;
    letter-spacing: 0.05em;
    font-style: italic;
    position: relative;
}

.premium-menu-container ul.menu {
    list-style: none;
    padding-left: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    margin-bottom: 0;
}

.premium-menu-container ul.menu li {
    margin: 0;
    display: flex;
    align-items: center;
}

/* Add an elegant dot separator between links */
.premium-menu-container ul.menu li:not(:last-child)::after {
    content: '•';
    color: var(--outline-variant);
    margin: 0 1.5rem;
    font-size: 1.2rem;
}

.premium-menu-container ul.menu li a {
    display: inline-block;
    color: var(--on-surface);
    text-decoration: none;
    font-size: 1.15rem;
    font-family: 'Noto Serif', serif;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
    position: relative;
}

.premium-menu-container ul.menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 1px;
    background-color: var(--primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.premium-menu-container ul.menu li a:hover {
    color: var(--primary);
}

.premium-menu-container ul.menu li a:hover::after {
    width: 100%;
}
