:root {
  /* Fluid scaling base: using a calculation where 1rem grows with viewport */
  /* Logic: at 1440px wide, we want 1rem = 16px. */
  /* 16 / 1440 * 100 = 1.111vw */
  --fluid-base: 1.1111vw;

  --bg-color: #ffffff;
  --card-bg: #F5F5F5;
  --text-primary: #111111;
  --text-secondary: #555555;
  --accent-color: #ff3333;

  /* Converting previous px values to rem for relative scaling */
  --gap: 1rem;
  /* previously 16px */
  --radius: 0.75rem;
  /* previously 12px */

  /* User wants: 1400px screen -> 1200px content.
     1200/16 = 75rem. 
     So max-width becomes 75rem.
  */
  --max-width: 75rem;
}

html {
  font-size: var(--fluid-base);
}

/* Cap scaling for huge screens so content doesn't exceed ~1400px */
/* Calculation: 75rem (width) * 18.67px = ~1400px. This occurs at ~1680px viewport. */
@media (min-width: 1680px) {
  html {
    font-size: 18.67px;
  }
}

/* Fallback for smaller screens to stop it becoming microscopic */
@media (max-width: 768px) {
  html {
    /* Lock to a more standard size on mobile so text is legible */
    font-size: 16px;
  }
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-primary);
  line-height: 1.5;
  padding: 1.25rem;
  /* 20px */
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  width: 100%;
}

header,
section {
  margin-bottom: 3.75rem;
  /* 60px */
}

.section-label {
  font-size: 0.875rem;
  color: var(--accent-color);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
  /* 12px */
  display: block;
  font-weight: 600;
}

h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
  /* 24px */
  letter-spacing: -0.02em;
}

/* Grid System */
.grid {
  display: grid;
  gap: var(--gap);
  grid-template-columns: repeat(1, 1fr);
}

.grid-halves {
  grid-template-columns: repeat(1, 1fr);
}

@media (min-width: 600px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .grid-halves {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Force 2 columns for halves even on large screens */
  .grid-halves {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Card Styles */
.card {
  background-color: var(--card-bg);
  border-radius: var(--radius);
  padding: 1.5rem;
  /* 24px */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 12.5rem;
  /* 200px */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  overflow: hidden;
  position: relative;
}

.card:hover {
  transform: translateY(-0.125rem);
  /* -2px */
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

/* Spans utilities */
.col-span-full {
  grid-column: 1 / -1;
}

.col-span-2 {
  grid-column: span 1;
}

@media (min-width: 900px) {
  .col-span-2 {
    grid-column: span 2;
  }
}

/* Height utilities */
.h-large {
  min-height: 25rem;
  /* 400px */
}

.h-medium {
  min-height: 15.625rem;
  /* 250px */
}

/* Typography in cards */
.card h3 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
  /* 8px */
}

.card p {
  color: var(--text-secondary);
  font-size: 1rem;
}

/* Video Section Specifics */
.video-card {
  padding: 0;
  background: transparent;
  box-shadow: none;
  border: none;
  aspect-ratio: 9/16;
  height: auto;
}

.video-card:hover {
  transform: none;
  box-shadow: none;
}

.video-card video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: var(--radius);
}

/* Image Section Specifics */
.image-card {
  padding: 0;
  background: transparent;
  overflow: hidden;
}

.image-card img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius);
}


/* Tile Image Specifics */
.tile-image-container {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: var(--radius);
  position: relative;
  /* Ensure it stays within card */
  display: flex;
  /* Fixes potential extra space */
}

.tile-image-container img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Changed from cover to contain */
  display: block;
}


.blend-mode {
  aspect-ratio: 1 / 1;
  min-height: 0 !important;
  /* Force override */
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  position: relative;
}

.blend-mode .tile-image-container {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
}

.blend-mode img {
  mix-blend-mode: multiply;
  opacity: 0.9;
  width: 100%;
  height: 100%;
  object-fit: contain;
  /* Changed from cover to contain */
  display: block;
}

/* Mobile adjustments */
/* Mobile adjustments */
@media (max-width: 768px) {
  /* Consolidated in lower media query block */
}

/* B2B Horizontal Card */
.card-horizontal {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  /* Stretch to fill height */
  justify-content: space-between;
  text-align: left;
  padding: 0;
  /* Remove padding to let image touch edges */
  min-height: 250px;
  overflow: hidden;
}

.card-horizontal .content {
  flex: 1;
  padding: 3rem;
  /* Add padding back to content */
  padding-right: 2rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card-horizontal h3 {
  font-weight: 800;
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  text-transform: uppercase;
}

.card-horizontal p {
  text-transform: uppercase;
  font-size: 1rem;
  line-height: 1.4;
  color: var(--text-primary);
}

.card-horizontal .image-container {
  flex: 0 0 40%;
  /* Fixed 40% width */
  max-width: 40%;
  display: flex;
}

.card-horizontal img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  /* Cover entire area */
  display: block;
}

/* Section 4-7 Hero Images with Overlay */
.hero-image-container {
  position: relative;
  height: 22rem;
  /* Reduced by ~1/3 from 32rem */
  padding: 0;
  overflow: hidden;
  border-radius: var(--radius);
}

.hero-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Utility to mirror image */
.mirror-x {
  transform: scaleX(-1);
}

.hero-overlay {
  position: absolute;
  top: 50%;
  right: 0;
  transform: translateY(-50%);
  width: 33.333%;
  height: 50%;
  background-color: #ffffff;
  border-top-left-radius: var(--radius);
  border-bottom-left-radius: var(--radius);
  display: flex;
  justify-content: flex-end;
  /* Align flex content to right */
  align-items: center;
  z-index: 10;
  box-shadow: -0.5rem 0 1rem rgba(0, 0, 0, 0.1);
  padding-right: 2rem;
  /* Add spacing from edge */
  padding-left: 1rem;
}

.hero-overlay h3 {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 800;
  text-transform: uppercase;
  color: var(--text-primary);
  text-align: right;
  /* Text alignment right */
  line-height: 1.1;
  /* Tighter line height for multi-line text */
}

/* Mobile adjust for overlay */
/* Mobile adjustments */
@media (max-width: 768px) {
  h2 {
    font-size: 1.5rem;
  }

  .card {
    padding: 1rem;
  }

  .card-horizontal {
    flex-direction: column;
    /* Content first, Image second (Below) */
    text-align: center !important;
    align-items: stretch !important;
    height: auto;
    min-height: auto;
  }

  .card-horizontal .content {
    text-align: center;
    align-items: center;
    padding: 2rem 1.5rem;
  }

  .card-horizontal .image-container {
    max-width: 100%;
    flex: none;
    width: 100%;
    height: auto;
    /* Allow height to adapt */
    min-height: 250px;
    /* Minimum height */
    padding-bottom: 2rem;
    /* Add some bottom spacing */
  }

  .card-horizontal img {
    width: 100%;
    height: 100%;
    max-height: 300px;
    /* Limit max height */
    object-fit: contain !important;
    /* Force full visibility */
    object-position: center;
  }

  .hero-image-container.card {
    background: transparent;
    /* Remove card background from container */
    box-shadow: none;
    /* Remove shadow */
    padding: 0;
    /* Remove padding */
    height: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    /* Space between image-card and text-card */
    min-height: auto;
    /* Override card min-height */
  }

  .hero-image-container img {
    height: 250px;
    width: 100%;
    object-position: left center;
    border-radius: var(--radius);
    /* Full radius for image */
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
    /* Optional: give image some depth */
  }

  .hero-overlay {
    position: static;
    /* Stack naturally */
    transform: none !important;
    width: 100%;
    height: auto;
    background-color: var(--card-bg);
    /* Look like a standard card */
    color: var(--text-primary);
    border-radius: var(--radius);
    /* Full radius for text card */
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    /* Center text */
    align-items: center;
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1);
    /* Match card shadow */
  }

  .hero-overlay h3 {
    font-size: 1.5rem;
    text-align: center;
    width: 100%;
    color: var(--text-primary);
  }

  /* Special case for Section 8 Mobile Alignment */
  #section-8 .hero-image-container img {
    object-position: right center;
  }

  /* Fix for Logo in Hero Overlay (Section 1) */
  #section-1 .hero-overlay img {
    height: auto !important;
    width: auto !important;
    max-width: 80% !important;
    max-height: 80% !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    object-position: center !important;
  }

  /* Section 1 Overlay White Background on Mobile */
  #section-1 .hero-overlay {
    background-color: #ffffff !important;
    /* Ensure logo isn't cut off by padding if large */
    overflow: visible;
  }

  /* Catalogue Section Mobile */
  .catalogue-container {
    flex-direction: column-reverse;
    /* Image TOP, Text BOTTOM */
    gap: 2rem;
    padding: 3rem 1rem;
    align-items: center !important;
    /* Force centering of flex items */
  }

  .catalogue-text {
    align-items: center !important;
    text-align: center !important;
    margin-bottom: 0;
    width: 100%;
  }

  .catalogue-text h2 {
    font-size: 2rem;
    /* Resize text for mobile */
    text-align: center;
  }

  .catalogue-image-wrapper {
    margin-bottom: 0;
    width: 100%;
    display: flex;
    justify-content: center;
    /* Ensure visibility overrides any animation states */
    opacity: 1 !important;
    transform: none !important;
  }

  .catalogue-image-wrapper img {
    max-width: 80%;
    height: auto;
    margin: 0 auto;
    /* Ensure visibility */
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2) !important;
    /* Restore shadow if needed */
  }

  .section-catalogue {
    padding: 0;
    height: auto;
    min-height: auto;
  }
}

/* SECTION 10: Catalogue */
.section-catalogue {
  background-color: #D30000;
  /* Distinctive red */
  color: #ffffff;
  padding: 0;
  /* It might be valid to remove padding if using inner container, but let's keep some or make it full width bar */
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  /* For animation spill */
  position: relative;
  min-height: 400px;
  /* Adjust as needed */
  border-radius: var(--radius);
  /* Added rounded corners */
}

/* We need a specific inner grid/flex for this section */
.catalogue-container {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 4rem;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem;
}

.catalogue-text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  /* Align text and button left */
}

.catalogue-text h2 {
  font-size: 3rem;
  line-height: 1.2;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 1rem;
}

.catalogue-text .sub-line {
  display: block;
  width: 100px;
  height: 4px;
  background-color: #ffffff;
  margin-bottom: 1.5rem;
}

/* Button Styles */
.btn-catalogue {
  display: inline-block;
  background-color: #ffffff;
  color: #D30000;
  font-weight: 800;
  text-transform: uppercase;
  text-decoration: none;
  padding: 1rem 2rem;
  border-radius: 2rem;
  /* Pill shape */
  margin-top: 1.5rem;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  /* Animation */
  opacity: 0;
  transform: translateY(20px);
  animation: fade-up-btn 0.8s ease-out 0.5s forwards;
}

.btn-catalogue:hover {
  transform: translateY(-3px) scale(1.05);
  /* Slight lift and scale */
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
}

@keyframes fade-up-btn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.catalogue-image-wrapper {
  position: relative;
  /* Optional: add perspective for 3D feel */
  perspective: 1000px;
}

.catalogue-image-wrapper img {
  max-width: 400px;
  /* Adjust size */
  width: 100%;
  height: auto;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
  /* Initial State */
  transform: rotate(0deg);
  /* Animation */
  animation: rotate-left 1.5s ease-out forwards;
  background: white;
  /* Simulate white border if image doesn't have it */
  padding: 10px;
  /* White border effect */
}

@keyframes rotate-left {
  0% {
    transform: rotate(0deg) scale(0.9) translateY(50px);
    opacity: 0;
  }

  100% {
    transform: rotate(-8deg) scale(1) translateY(0);
    opacity: 1;
  }
}

@media (max-width: 600px) {
  .catalogue-text {
    align-items: center;
    /* Center on mobile */
  }
}

/* SECTION Contact */
.section-contact {
  background-color: #111111;
  color: #ffffff;
  padding: 4rem 2rem;
  text-align: center;
  border-radius: var(--radius);
  margin-bottom: 0;
  /* Last section */
}

.contact-container {
  max-width: 800px;
  margin: 0 auto;
}

.section-contact h2 {
  font-size: 2.5rem;
  margin-bottom: 3rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #ffffff;
}

.contact-details {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  font-size: 1.5rem;
}

.contact-item h3 {
  font-size: 1.25rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
}

.section-contact a {
  color: #ffffff;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.section-contact a:hover {
  color: var(--accent-color);
}

/* SECTION 10: Metrics (High Margin & Complaints) */
.grid-metrics {
  display: grid;
  grid-template-columns: 3fr 1fr;
  /* 3/4 and 1/4 */
  gap: var(--gap);
}

.card-metric {
  border-radius: var(--radius);
  padding: 3rem;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  /* Changed from center to top align */
  min-height: 400px;
}

.card-black {
  background-color: #000000;
  color: #ffffff;
}

.card-red {
  background-color: #D30000;
  color: #ffffff;
  padding: 2.5rem;
  /* Slightly reduced padding for more space */
  justify-content: flex-start;
  /* Ensure top alignment */
  align-items: flex-start;
  /* Ensure left alignment */
  text-align: left;
}

.card-metric.card-red h3 {
  font-size: 1.5rem;
  /* Increased from 1.3rem */
  margin-top: 0;
  line-height: 1.2;
  margin-bottom: 2rem;
  /* Add space before icon/bottom */
}

.card-red .big-number {
  font-size: 3.5rem;
  /* Slightly smaller for narrow card */
}

.card-metric h3 {
  font-size: 2.5rem;
  font-weight: 800;
  text-transform: uppercase;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.card-metric p {
  font-size: 1.125rem;
  line-height: 1.6;
  color: #e0e0e0;
  max-width: 600px;
  /* Limit width for reading on the wide card */
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 2;
}

.card-metric .big-number {
  font-size: 4rem;
  font-weight: 800;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.metric-corner-svg {
  position: absolute;
  bottom: 0;
  right: 3rem;
  /* Match card padding */
  width: 40%;
  /* Adjust based on SVG natural size */
  max-width: 300px;
  height: auto;
  z-index: 1;
  pointer-events: none;
  /* Let clicks pass through */
}

.card-metric.card-red .metric-corner-svg {
  width: 60%;
  /* 1.5x larger */
  max-width: 450px;
}

@media (max-width: 900px) {
  .grid-metrics {
    grid-template-columns: 1fr;
    /* Stack on smaller screens */
  }

  .metric-corner-svg {
    width: 30%;
    opacity: 0.5;
    /* Fade out a bit if it overlaps text on mobile */
  }
}

@media (max-width: 600px) {
  .section-contact {
    padding: 3rem 1rem;
  }

  .section-contact h2 {
    font-size: 2rem;
  }

  .contact-details {
    font-size: 1.2rem;
  }

  .card-metric h3 {
    font-size: 1.8rem;
  }

  .card-metric .big-number {
    font-size: 3rem;
  }
}

/* ANIMATIONS & INTERACTIONS */

/* Base Reveal State */
.reveal {
  opacity: 0;
  transform: translateY(30px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.5, 0.0, 0.0, 1.0);
  will-change: opacity, transform;
}

/* Active State (Triggered by JS) */
.reveal.active {
  opacity: 1;
  transform: translateY(0) scale(1.0);
}

/* Directional Reveals */
.reveal-left {
  opacity: 0;
  transform: translateX(-50px);
  transition: all 1s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(50px);
  transition: all 1s cubic-bezier(0.5, 0, 0, 1);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Fix for Hero Overlay Vertical Centering with Animation */
.hero-overlay.reveal-right {
  transform: translateY(-50%) translateX(50px);
}

.hero-overlay.reveal-right.active {
  transform: translateY(-50%) translateX(0);
}

/* Stagger Delays */
.delay-100 {
  transition-delay: 0.1s;
}

.delay-200 {
  transition-delay: 0.2s;
}

.delay-300 {
  transition-delay: 0.3s;
}

.delay-400 {
  transition-delay: 0.4s;
}

.delay-500 {
  transition-delay: 0.5s;
}

/* Enhanced Hover Effects */
.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.btn-catalogue {
  animation: pulse-glow 2s infinite;
}

@keyframes pulse-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(211, 0, 0, 0.4);
  }

  70% {
    box-shadow: 0 0 0 10px rgba(211, 0, 0, 0);
  }

  100% {
    box-shadow: 0 0 0 0 rgba(211, 0, 0, 0);
  }
}

.contact-logo {
  width: 200px;
  padding: 2rem;
  display: inline-block;
  margin: 0 auto;
}

/* USER REQUEST UPDATES */

/* 1. Desktop: Reduce white overlay width in sections 1 & 5 */
@media (min-width: 900px) {
  .hero-overlay {
    width: 25%;
    /* Reduced from 33.333% */
  }
}

/* 2. Mobile: Increase spacing between logo and 'Contact' */
@media (max-width: 600px) {
  .contact-logo {
    margin-bottom: 3rem !important;
    /* Increased spacing */
  }
}

/* 3. Dark Mode Fix: Keep tile images on gray/light background */
/* We force the card background to stay light even if user overrides or system prefs change */
.card.blend-mode {
  background-color: var(--card-bg) !important;
}

/* Ensure var(--card-bg) is #F5F5F5 and not overridden by dark mode media queries if any exist later */
@media (prefers-color-scheme: dark) {
  .card.blend-mode {
    background-color: #F5F5F5 !important;
  }
}


/* ROUND 3 ADJUSTMENTS */

/* Hero Overlay Auto Width (Desktop) */
@media (min-width: 900px) {
  .hero-overlay {
    width: auto !important;
    /* Override previous fixed width */
    max-width: 60%;
    /* Allow it to grow but not too much */
    padding-left: 3rem;
    /* More breathing room */
  }
}

/* Section 11 Black Card Text Width */
@media (min-width: 900px) {
  .card-metric.card-black p {
    max-width: 50%;
  }
}

/* Section 11 Red Card Number */
.card-metric.card-red .big-number {
  font-size: 3rem !important;
  /* Reduced from 3.5rem/4rem by approx 15% */
  white-space: nowrap;
  /* Prevent breaking */
}


/* ROUND 4 ADJUSTMENTS - Section 1 Desktop Overlay */
@media (min-width: 900px) {
  #section-1 .hero-overlay {
    padding-left: 1.5rem !important;
    /* Reduced from 3rem */
    padding-right: 1.5rem !important;
    width: fit-content !important;
  }
}

/* ROUND 4 ADJUSTMENTS - Mobile Hero Gaps & Styling */
@media (max-width: 768px) {

  /* Remove gap between image and title card */
  .hero-image-container.card {
    gap: 0 !important;
  }

  /* Flatten bottom of image so it connects to card */
  .hero-image-container img {
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }

  /* Flatten top of overlay card so it connects to image */
  .hero-overlay {
    border-top-left-radius: 0 !important;
    border-top-right-radius: 0 !important;

    /* Force white background as requested */
    background-color: #ffffff !important;

    /* Ensure text is visible if on white */
    color: #000000 !important;

    /* Remove shadow from the overlay itself to merge better */
    box-shadow: none !important;

    /* Add a subtle bottom shadow to the whole unit if desired, or keep as is */
    /* Currently relies on container shadow or flat design */
  }

  /* Ensure title text is black on the white bg */
  .hero-overlay h3 {
    color: #000000 !important;
  }
}


/* ROUND 5 FIXES */

/* Force ALL text in Section 1 to be black */
#section-1,
#section-1 * {
  color: #000000 !important;
}

/* Disable video card hover animation */
.video-card:hover {
  transform: none !important;
  /* Reset shadow to default card shadow (usually --shadow-sm or --shadow-md) */
  /* Assuming --shadow-sm is the base state based on common practices, or just removing the extra shadow */
  box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.1) !important;
  /* Matches generic card base shadow often used */
}


/* ROUND 6 ADJUSTMENTS - Contact Logo Size */
@media (min-width: 900px) {
  .contact-logo {
    width: 400px !important;
    /* Doubled from original 200px */
    max-width: 100%;
    /* Ensure it doesn't overflow container */
  }
}


/* ROUND 7 FIXES - DARK MODE IMAGE VISIBILITY */

/* Force specific light gray background for blend-mode cards to ensure images remain visible */
/* This overrides any system dark mode or CSS variable changes */
.card.blend-mode,
.card.blend-mode:where([class]) {
  background-color: #f5f5f5 !important;
  /* Explicit light gray */
  color: #000000 !important;
  /* Force text black just in case, though usually images */
}

/* Ensure this applies inside media queries too */
@media (prefers-color-scheme: dark) {
  .card.blend-mode {
    background-color: #f5f5f5 !important;
  }
}


/* ROUND 8 FIXES - PREVENT HORIZONTAL SCROLL */

/* Force hide horizontal overflow on the entire page */
html,
body {
  overflow-x: hidden !important;
  width: 100%;
  position: relative;
  /* Ensure hidden overflow works */
}

/* Ensure no container exceeds layout width */
.container,
.grid,
section,
.reveal,
.card {
  max-width: 100vw !important;
  box-sizing: border-box;
  /* Ensure padding doesn't add to width */
}


/* ROUND 9 FIXES - RESTORE DESKTOP WIDTH */

/* Re-apply max-width limit for Desktop */
@media (min-width: 1440px) {

  .container,
  .grid,
  .section-catalogue {
    max-width: 1400px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    width: 100%;
    /* Ensure it takes available space up to max-width */
  }
}


/* ROUND 10 FIXES - IMAGE OPACITY */
/* Force 100% opacity for tile images */
.tile-image-container img {
  opacity: 1 !important;
}


/* ROUND 11 FIXES - SECTION 1 REDESIGN */

/* Centered Intro Text */
.intro-text-section {
  text-align: center;
  max-width: 900px;
  margin: 4rem auto;
  padding: 0 1.5rem;
}

.intro-text-section p.lead {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.intro-text-section p.sub {
  font-size: 1.125rem;
  color: #444;
  line-height: 1.6;
}

/* Black Feature Card */
.black-section-card {
  background-color: #000;
  color: #fff;
  padding: 4rem 2rem;
  border-radius: 32px !important;
  margin-bottom: 4rem;
}

.black-section-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

@media(min-width: 900px) {
  .black-section-grid {
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
  }
}

.black-section-card h3 {
  color: #fff;
  font-size: 2rem;
  margin-bottom: 1rem;
}

.black-section-card p {
  color: #ccc;
  font-size: 1.1rem;
}

.black-section-card li {
  color: #eee;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 1rem;
  font-size: 1.1rem;
}


/* ROUND 11 FIXES - BLACK CARD MOBILE & ICONS */
@media (max-width: 900px) {
  .black-section-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center !important;
  }

  .black-section-card li {
    flex-direction: column !important;
    /* Icon above text */
    text-align: center !important;
    justify-content: center !important;
    gap: 0.5rem !important;
    align-items: center !important;
  }

  .black-section-card li i {
    margin-bottom: 0;
    /* Remove bottom margin if row */
    min-width: 24px !important;
  }

  /* Center the line separator on mobile */
  .black-section-grid>div:nth-child(2) {
    border-left: none !important;
    border-top: 1px solid #333;
    padding-left: 0 !important;
    padding-top: 3rem;
  }
}