/* ==========================================
   1. Global Variables & Reset
   ========================================== */
:root {
  /* Default fonts: Open Sans for body/paragraphs, Montserrat for headings & heroes */
  --fe-font: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --fe-font-heading: "Montserrat", "Helvetica Neue", Arial, sans-serif;

  /* Example override if needed:
  --fe-font: "Lato", "Open Sans", Arial, sans-serif;
  --fe-font-heading: "Playfair Display", "Montserrat", Georgia, serif;
  */

  /* Heading sizes */
  --fe-h1-size: clamp(18px, 3.5vw, 21px);
  --fe-hero-h1-size: clamp(18px, 4vw, 28px);

  /* Type sizing & rhythm */
  --fe-text-size: 16px;
  --fe-leading: 1.6;
  --fe-tracking-heading: -0.015em;

  /* Core palette & tokens */
  --fe-dark: #222222;
  --fe-dark-hover: #333333;
  --fe-accent: #4a6b82;
  --fe-bg-light: #f9f9f9;
  --fe-border: #e2e2e2;
  --fe-text: #333333;
  --fe-text-muted: #666666;
  --fe-radius: 6px;

  /* Body margin */
  --fe-body-margin: 1px 1px 1px 1px; /* top right bottom left */
  --fe-body-margin-mobile: var(--fe-body-margin);

  /* Section inner padding */
  --fe-section-py: 30px; /* change to adjust global section padding */
  --fe-section-px: 30px; /* change to adjust global section padding */
  --fe-section-py-mobile: 40px;
  --fe-section-px-mobile: var(--fe-section-px);

  /* Grid & sizable media card tokens */
  --fe-grid-gap: 24px;
  --fe-card-bg: #ffffff;
  --fe-card-border: #e5e7eb;
  --fe-card-padding: 24px;
  --fe-card-radius: var(--fe-radius, 8px);
  --fe-card-width: auto;
  --fe-card-max-width: none;
  --fe-card-media-height: auto;
  --fe-card-media-ratio: 16 / 10;
  --fe-card-media-fit: cover;
  --fe-card-media-zoom: 1.03;

  /* Single-switch shimmer controls */
  --fe-shimmer-hue: 45deg;       /* 45deg = warm gold, 215deg = cool silver/platinum */
  --fe-shimmer-sat: 65%;        /* Higher for rich gold, low (10-14%) for true platinum */
  --fe-shimmer-strength: 18%;   /* Tint intensity */

  /* Derived palette tokens */
  --fe-shimmer-tint: hsl(var(--fe-shimmer-hue) var(--fe-shimmer-sat) 78%);
  --fe-shimmer-base: color-mix(in srgb, #ffffff calc(100% - var(--fe-shimmer-strength)), var(--fe-shimmer-tint));
  --fe-shimmer-mid: color-mix(in srgb, #ffffff calc(100% - calc(var(--fe-shimmer-strength) * 1.4)), var(--fe-shimmer-tint));
  --fe-shimmer-highlight: #ffffff;
  --fe-shimmer-deep: color-mix(in srgb, #ffffff calc(100% - calc(var(--fe-shimmer-strength) * 1.8)), var(--fe-shimmer-tint));
  --fe-shimmer-border: color-mix(in srgb, var(--fe-shimmer-base) 75%, #000000 12%);

  /* Standard image fade */
  --fe-edge-fade: 18%;
}

/* Body margin
   Example 1: Per-page inline override on
   <body class="fe-bg-gold-shimmer" style="--fe-body-margin: 24px; --fe-body-margin-mobile: 12px;">

   Example 2: Asymmetric top/bottom or left/right margin:
   <body class="fe-bg-gold-shimmer" style="--fe-body-margin: 20px 32px;">
*/
body {
  margin: var(--fe-body-margin);
}

@media (max-width: 768px) {
  body {
    margin: var(--fe-body-margin-mobile);
  }
}

.fe-page {
  min-height: 100vh;
}

.fe-bg-alt {
  background-color: var(--fe-bg-light);
}

.fe-section,
.fe-section *,
.fe-section *::before,
.fe-section *::after,
.fe-hero-quarter,
.fe-hero-quarter * {
  box-sizing: border-box;
}

.fe-section {
  padding: var(--fe-section-py) var(--fe-section-px);
  font-family: var(--fe-font, "Open Sans", sans-serif);
  font-size: var(--fe-text-size, 16px);
  line-height: var(--fe-leading, 1.6);
  color: var(--fe-text);
  background-color: #ffffff;
}

@media (max-width: 768px) {
  .fe-section {
    padding: var(--fe-section-py-mobile) var(--fe-section-px-mobile);
  }
}

/* Optional Quick Padding Presets */
.fe-section-py-none {
  --fe-section-py: 0px;
  --fe-section-py-mobile: 0px;
}

.fe-section-py-sm {
  --fe-section-py: 10px;
  --fe-section-py-mobile: 5px;
}

.fe-section-py-lg {
  --fe-section-py: 90px;
  --fe-section-py-mobile: 56px;
}

/* Soft light gray contrast background inside a section */
.fe-section.fe-bg-alt {
  background-color: var(--fe-bg-light);
}

/* ==========================================
   Typography & H1 Sizing Rules
   Example: Per-section or per-hero override:
   <section class="fe-hero fe-hero-half" style="--fe-hero-h1-size: clamp(32px, 5vw, 52px); --fe-font-heading: 'Raleway', sans-serif; --fe-font: 'Roboto', sans-serif;">
     <div class="fe-hero-content">
       <h1>Boutique Eyewear in Austin</h1>
       <p>Handcrafted frames and personalized vision care.</p>
     </div>
   </section>

   Example: Single <h1> inline override:
   <h1 style="--fe-h1-size: 32px;">Downtown Austin Location</h1>
   ========================================== */

/* Paragraphs & general copy default to Open Sans */
p,
.fe-section,
.fe-accordion-body,
.fe-split-media-row,
.fe-btn {
  font-family: var(--fe-font);
}

.fe-section,
.fe-accordion-body,
.fe-split-media-row {
  font-size: var(--fe-text-size);
  line-height: var(--fe-leading);
  color: var(--fe-text);
}

/* Section H1 */
h1,
.fe-section h1 {
  font-family: var(--fe-font-heading);
  font-size: var(--fe-h1-size);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: var(--fe-tracking-heading);
  margin: 0 0 16px 0;
}

/* Headings and Hero text default to Montserrat */
h1,
h2,
h3,
h4,
h5,
h6,
.fe-hero,
.fe-hero-quarter,
.fe-hero-content,
.fe-accordion-header,
.fe-split-media-row h3 {
  font-family: var(--fe-font-heading);
}

.fe-hero h1,
.fe-hero-quarter h1,
.fe-section h1,
.fe-section h2,
.fe-section h3,
.fe-accordion-header,
.fe-split-media-row h3 {
  letter-spacing: var(--fe-tracking-heading);
}

/* Keep hero paragraphs/subtitles readable in Open Sans while hero titles use Montserrat */
.fe-hero p,
.fe-hero-quarter p {
  font-family: var(--fe-font);
  letter-spacing: normal;
}

/* ==========================================
   Shimmer Background System (Gold, Platinum & Custom)
   ========================================== */

/* Core shimmer background (works on .fe-section, .fe-page, or body) */
.fe-shimmer,
.fe-bg-gold,
.fe-bg-platinum {
  background: linear-gradient(
    120deg,
    var(--fe-shimmer-base) 0%,
    var(--fe-shimmer-mid) 30%,
    var(--fe-shimmer-highlight) 50%,
    var(--fe-shimmer-deep) 70%,
    var(--fe-shimmer-base) 100%
  ) var(--fe-shimmer-base);
  background-size: 250% 250%;
  animation: fe-shimmer-move 12s ease-in-out infinite;
}

/* Gold preset */
.fe-shimmer-gold,
.fe-bg-gold {
  --fe-shimmer-hue: 45deg;
  --fe-shimmer-sat: 65%;
  --fe-shimmer-strength: 18%;
  --fe-shimmer-tint: hsl(var(--fe-shimmer-hue) var(--fe-shimmer-sat) 78%);
  --fe-shimmer-base: color-mix(in srgb, #ffffff calc(100% - var(--fe-shimmer-strength)), var(--fe-shimmer-tint));
  --fe-shimmer-mid: color-mix(in srgb, #ffffff calc(100% - calc(var(--fe-shimmer-strength) * 1.4)), var(--fe-shimmer-tint));
  --fe-shimmer-highlight: #ffffff;
  --fe-shimmer-deep: color-mix(in srgb, #ffffff calc(100% - calc(var(--fe-shimmer-strength) * 1.8)), var(--fe-shimmer-tint));
  --fe-shimmer-border: color-mix(in srgb, var(--fe-shimmer-base) 75%, #000000 12%);
}

/* True cool platinum preset (low saturation, silver-slate sheen) */
.fe-shimmer-platinum,
.fe-bg-platinum,
.fe-section.fe-shimmer-platinum,
.fe-section.fe-bg-platinum {
  --fe-shimmer-hue: 215deg;
  --fe-shimmer-sat: 12%;
  --fe-shimmer-strength: 22%;
  --fe-shimmer-tint: hsl(var(--fe-shimmer-hue) var(--fe-shimmer-sat) 76%);
  --fe-shimmer-base: color-mix(in srgb, #ffffff calc(100% - var(--fe-shimmer-strength)), var(--fe-shimmer-tint));
  --fe-shimmer-mid: color-mix(in srgb, #ffffff calc(100% - calc(var(--fe-shimmer-strength) * 1.4)), var(--fe-shimmer-tint));
  --fe-shimmer-highlight: #ffffff;
  --fe-shimmer-deep: color-mix(in srgb, #ffffff calc(100% - calc(var(--fe-shimmer-strength) * 1.8)), var(--fe-shimmer-tint));
  --fe-shimmer-border: color-mix(in srgb, var(--fe-shimmer-base) 75%, #000000 14%);
}

/* Subtle top/bottom borders when applied to a section */
.fe-section.fe-shimmer,
.fe-section.fe-bg-gold,
.fe-section.fe-bg-platinum,
.fe-section.fe-shimmer-platinum {
  border-top: 1px solid var(--fe-shimmer-border);
  border-bottom: 1px solid var(--fe-shimmer-border);
}

/* Let inner sections show a full-page shimmer background */
.fe-page.fe-shimmer .fe-section,
.fe-page.fe-bg-gold .fe-section,
.fe-page.fe-bg-platinum .fe-section,
.fe-page.fe-shimmer-platinum .fe-section,
body.fe-shimmer .fe-section,
body.fe-bg-gold .fe-section,
body.fe-bg-platinum .fe-section,
body.fe-shimmer-platinum .fe-section {
  background-color: transparent;
}

/* Keep .fe-bg-alt contrast bands intact inside shimmer wrappers */
.fe-page[class*="shimmer"] .fe-section.fe-bg-alt,
.fe-page[class*="bg-"] .fe-section.fe-bg-alt,
body[class*="shimmer"] .fe-section.fe-bg-alt,
body[class*="bg-"] .fe-section.fe-bg-alt {
  background-color: var(--fe-bg-light);
}

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

@media (prefers-reduced-motion: reduce) {
  .fe-shimmer,
  .fe-bg-gold,
  .fe-bg-platinum,
  .fe-shimmer-platinum {
    animation: none;
    background-position: 50% 50%;
  }
}

.fe-container {
  max-width: 1400px; /* Increase (e.g., 1400px) for wider content, decrease (e.g., 1000px) for bigger side margins */
  margin: 0 auto;    /* Centers the container on desktop */
  padding: 0 20px;   /* Minimum left/right breathing room on smaller screens */
}

/* ==========================================
   2. Adjustable Hero Component (Height, Color & Overlay)
   ========================================== */
/* Full-viewport edge-to-edge hero image (no overlay) */

.fe-hero.fe-hero-full {
  --fe-hero-full-offset: 110px; /* Increase/decrease until bottom edge sits right at viewport bottom */
  --fe-hero-bg-position: center 35%;
  --fe-hero-top-padding: 40px;

  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  padding-top: var(--fe-hero-top-padding);
  padding-bottom: 64px;

  height: calc(100vh - var(--fe-hero-full-offset));
  height: calc(100svh - var(--fe-hero-full-offset));
  min-height: 520px; /* Prevents squishing on very short landscape windows */
  width: 100vw;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  border-radius: 0;
  background-color: transparent;
  background-size: cover;
  background-position: var(--fe-hero-bg-position);
  background-repeat: no-repeat;
  background-blend-mode: normal;
  filter: none;
}

.fe-hero.fe-hero-full::before,
.fe-hero.fe-hero-full::after {
  content: none;
  display: none;
  background: none;
}

/* Dark grey typography with a subtle light halo for crisp legibility over bright photo areas */
.fe-hero.fe-hero-full h1 {
  color: #222222;
  text-shadow: 0 1px 10px rgba(255, 255, 255, 0.75);
}

.fe-hero.fe-hero-full p {
  color: #333333;
  font-weight: 600;
  text-shadow: 0 1px 8px rgba(255, 255, 255, 0.8);
}

/* Tunable frosted glass container for .fe-hero-full */
.fe-hero.fe-hero-full .fe-hero-content {
  --fe-frost-bg: rgba(255, 255, 255, 0.35);   /* Opacity: 0.45 (sheer) to 0.88 (milky) */
  --fe-frost-blur: 4px;                        /* Blur: 4px (subtle) to 20px (heavy frost) */
  --fe-frost-border: rgba(255, 255, 255, 0.75); /* Edge highlight */
  --fe-frost-shadow: 0 12px 32px rgba(0, 0, 0, 0.14);

  background-color: var(--fe-frost-bg);
  backdrop-filter: blur(var(--fe-frost-blur)) saturate(140%);
  -webkit-backdrop-filter: blur(var(--fe-frost-blur)) saturate(140%);
  padding: 26px 36px;
  border-radius: 14px;
  border: 1px solid var(--fe-frost-border);
  box-shadow: var(--fe-frost-shadow);
  max-width: 860px;
}

.fe-hero.fe-hero-full h1 {
  color: #1d1d1f;
  text-shadow: none;
}

.fe-hero.fe-hero-full p {
  color: #333333;
  font-weight: 600;
  text-shadow: none;
}

@media (max-width: 640px) {
  .fe-hero.fe-hero-full .fe-hero-content {
    padding: 22px 20px;
    margin: 0 16px;
  }
}

/* Ensure .fe-hero-full acts as the positioning anchor */
.fe-hero.fe-hero-full {
  position: relative;
}

/* Smooth anchor scrolling across the page */
html {
  scroll-behavior: smooth;
}

/* Subtle bottom scroll-down indicator */
.fe-hero-scroll {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #ffffff;
  text-decoration: none;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.75);
  opacity: 0.92;
  animation: feScrollBounce 2.2s infinite ease-in-out;
}

.fe-hero-scroll:hover,
.fe-hero-scroll:focus {
  opacity: 1;
  color: #ffffff;
}

.fe-hero-scroll svg {
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.65));
}

@keyframes feScrollBounce {
  0%, 100% {
    transform: translate(-50%, 0);
  }
  50% {
    transform: translate(-50%, 7px);
  }
}

/* Respect reduced-motion accessibility settings */
@media (prefers-reduced-motion: reduce) {
  .fe-hero-scroll {
    animation: none;
  }
}

/*------------------------------------*/

/* Optional subtle text shadow so white text stays crisp without a dark photo overlay */
.fe-hero.fe-hero-full h1,
.fe-hero.fe-hero-full p {
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.55);
}

.fe-hero,
.fe-hero-quarter {
  --fe-hero-height: 25vh;
  --fe-hero-bg: var(--fe-dark); /* Default solid dark background */
  --fe-hero-color: #ffffff;
  --fe-hero-overlay: transparent; /* Transparent by default for solid colors */

  position: relative;
  min-height: var(--fe-hero-height);
  padding: 20px 20px; /* top right bottom left */
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: var(--fe-hero-bg);
  background-size: cover;
  background-position: center;
  color: var(--fe-hero-color);
  font-family: var(--fe-font);
}

/* Automatically apply a dark tint ONLY when a background-image is set */
.fe-hero[style*="background-image"],
.fe-hero-quarter[style*="background-image"] {
  --fe-hero-overlay: rgba(0, 0, 0, 0.55);
}

/* Height Preset Modifiers */
.fe-hero-small   { --fe-hero-height: 10vh; }
.fe-hero-quarter { --fe-hero-height: 25vh; }
.fe-hero-third   { --fe-hero-height: 35vh; }
.fe-hero-half    { --fe-hero-height: 50vh; }
.fe-hero-tall    { --fe-hero-height: 75vh; }
.fe-hero-full    { --fe-hero-height: 100vh; }

/* Solid Background Color Presets */
.fe-hero-dark   { --fe-hero-bg: var(--fe-dark); --fe-hero-color: #ffffff; }
.fe-hero-accent { --fe-hero-bg: var(--fe-accent); --fe-hero-color: #ffffff; }
.fe-hero-light  { --fe-hero-bg: var(--fe-bg-light); --fe-hero-color: var(--fe-dark); }

/* Configurable Tint Overlay */
.fe-hero::before,
.fe-hero-quarter::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--fe-hero-overlay);
  z-index: 1;
}

/* Overlay Modifiers (for use with background images) */
.fe-overlay-none   { --fe-hero-overlay: transparent !important; }
.fe-overlay-light  { --fe-hero-overlay: rgba(0, 0, 0, 0.30) !important; }
.fe-overlay-dark   { --fe-hero-overlay: rgba(0, 0, 0, 0.75) !important; }
.fe-overlay-accent { --fe-hero-overlay: rgba(74, 107, 130, 0.75) !important; }

.fe-hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.fe-hero p,
.fe-hero-quarter p {
  font-size: 16px;
  opacity: 0.9;
  margin: 0;
  line-height: 1.5;
}

.fe-hero h1,
.fe-hero-quarter h1 {
  font-family: var(--fe-font-heading);
  font-size: var(--fe-hero-h1-size);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: var(--fe-tracking-heading);
  margin: 0 0 10px 0;
}

/* ==========================================
   3. Flexible 1, 2, 3, or 4 Column Grid & Sizable Media Cards
   ========================================== */
.fe-grid {
  display: grid;
  grid-template-columns: 1fr; /* Default: 1 column */
  gap: var(--fe-grid-gap);
  align-items: stretch;
}

/* Explicit Column Modifiers */
.fe-cols-1 { grid-template-columns: 1fr; }
.fe-cols-2 { grid-template-columns: repeat(2, 1fr); }
.fe-cols-3 { grid-template-columns: repeat(3, 1fr); }
.fe-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive Collapse Rules */
@media (max-width: 991px) {
  .fe-cols-4,
  .fe-cols-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .fe-cols-4,
  .fe-cols-3,
  .fe-cols-2 {
    grid-template-columns: 1fr;
  }
}

/* Base Card */
.fe-card {
  position: relative;
  background-color: var(--fe-card-bg);
  border: 1px solid var(--fe-card-border);
  border-radius: var(--fe-card-radius);
  padding: var(--fe-card-padding);
  font-family: var(--fe-font, "Open Sans", sans-serif);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

/* Sizable Flush Media Card (.fe-card-media)
   Works inside .fe-grid OR as a standalone/featured card */
.fe-card.fe-card-media {
  width: var(--fe-card-width, auto);
  max-width: var(--fe-card-max-width, none);
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Whole-Card Navigation (.fe-card-link)
   Example 1: Only the image is a link:
   <div class="fe-card fe-card-media">
     <a href="/eyeglasses-summary.php" class="fe-card-media-link">
       <img src="/images-fe/eyewear/frames.jpg" alt="Eyeglasses">
     </a>
     <div class="fe-card-body">
       <h3>Eyeglasses</h3>
       <p>Only clicking the image above navigates.</p>
     </div>
   </div>

   Example 2: Entire card is a link:
   <div class="fe-card fe-card-media">
     <a href="/eyeglasses-summary.php" class="fe-card-media-link fe-card-link">
       <img src="/images-fe/eyewear/frames.jpg" alt="Eyeglasses">
     </a>
     <div class="fe-card-body">
       <h3>Eyeglasses</h3>
       <p>Clicking the image, heading, or anywhere on this card navigates.</p>
     </div>
   </div>

   Example 3: Whole card is a link via heading, plus a separate button:
   <div class="fe-card fe-card-media">
     <div class="fe-card-media-link">
       <img src="/images-fe/eyewear/frames.jpg" alt="Eyeglasses">
     </div>
     <div class="fe-card-body">
       <h3><a href="/eyeglasses-summary.php" class="fe-card-link">Eyeglasses</a></h3>
       <p>Clicking the card goes to Eyeglasses; clicking the button below goes to Appointments.</p>
       <div class="fe-btn-group">
         <a href="/schedule-appointment.php" class="fe-btn fe-btn-outline fe-btn-sm">Book Fitting</a>
       </div>
     </div>
   </div>
*/
.fe-card-link {
  position: static;
  color: inherit;
  text-decoration: none;
}

.fe-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
}

.fe-card:has(.fe-card-link):hover,
.fe-card:has(.fe-card-link):focus-within {
  transform: translateY(-2px);
  border-color: var(--fe-accent, #4a6b82);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.fe-card:has(.fe-card-link):hover .fe-card-media-link > img,
.fe-card:has(.fe-card-link):hover > img,
.fe-card:has(.fe-card-link):focus-within .fe-card-media-link > img,
.fe-card:has(.fe-card-link):focus-within > img {
  transform: scale(var(--fe-card-media-zoom, 1.03));
}

.fe-card .fe-btn,
.fe-card a:not(.fe-card-link) {
  position: relative;
  z-index: 2;
}

/* Clickable & flush card media */
.fe-card-media-link {
  display: block;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
}

.fe-card-media > img,
.fe-card-media-link > img {
  display: block;
  width: 100%;
  height: var(--fe-card-media-height, auto);
  aspect-ratio: var(--fe-card-media-ratio);
  object-fit: var(--fe-card-media-fit, cover);
  margin: 0;
  transition: transform 0.35s ease;
}

/* When an explicit media height is set, let height govern instead of aspect-ratio */
.fe-card-media[style*="--fe-card-media-height"] > img,
.fe-card-media[style*="--fe-card-media-height"] .fe-card-media-link > img,
.fe-card-media.fe-card-media-sm > img,
.fe-card-media.fe-card-media-sm .fe-card-media-link > img,
.fe-card-media.fe-card-media-md > img,
.fe-card-media.fe-card-media-md .fe-card-media-link > img,
.fe-card-media.fe-card-media-lg > img,
.fe-card-media.fe-card-media-lg .fe-card-media-link > img {
  height: var(--fe-card-media-height);
  aspect-ratio: auto;
}

/* Optional Card & Media Size Presets */
.fe-card-media.fe-card-sm {
  --fe-card-padding: 16px;
  --fe-card-media-ratio: 4 / 3;
}

.fe-card-media.fe-card-lg {
  --fe-card-padding: 32px;
  --fe-card-media-ratio: 16 / 9;
}

.fe-card-media.fe-card-media-sm { --fe-card-media-height: 150px; }
.fe-card-media.fe-card-media-md { --fe-card-media-height: 220px; }
.fe-card-media.fe-card-media-lg { --fe-card-media-height: 320px; }

/* Optional Centered Standalone Card Helper */
.fe-card-media.fe-card-centered {
  margin-left: auto;
  margin-right: auto;
}

.fe-card-media-link:hover > img,
.fe-card-media-link:focus-visible > img {
  transform: scale(var(--fe-card-media-zoom));
}

.fe-card-media .fe-card-body {
  padding: var(--fe-card-padding);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.fe-card-media .fe-card-body h3 {
  font-family: var(--fe-font-heading, "Montserrat", sans-serif);
  margin-top: 0;
  margin-bottom: 10px;
}

.fe-card-media .fe-card-body p {
  margin-top: 0;
  margin-bottom: 14px;
}

.fe-card-media .fe-card-body p:last-child {
  margin-bottom: 0;
}

/* Pushes .fe-btn-group to the bottom of equal-height cards */
.fe-card-media .fe-card-body .fe-btn-group {
  margin-top: auto;
  padding-top: 6px;
}

/* ==========================================
   4. Split Section: Left Image + Right Accordion
   ========================================== */
.fe-split-accordion {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 45px;
  align-items: start;
}

.fe-split-media {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fe-split-media img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: var(--fe-radius);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  object-fit: cover;
}

.fe-split-media-row {
  background: #ffffff;
  border: 1px solid var(--fe-border);
  border-radius: var(--fe-radius);
  padding: 20px;
}

.fe-split-media-row h3 {
  margin: 0 0 8px 0;
  font-size: 18px;
  color: var(--fe-dark);
}

.fe-split-media-row p {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fe-text-muted);
}

.fe-accordion-header {
  margin: 0 0 20px 0;
  font-size: 26px;
  color: var(--fe-dark);
}

.fe-accordion-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fe-accordion-item {
  border: 1px solid var(--fe-border);
  border-radius: var(--fe-radius);
  background-color: #ffffff;
  overflow: hidden;
}

.fe-accordion-item summary {
  list-style: none;
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--fe-dark);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background-color 0.2s ease;
}

.fe-accordion-item summary::-webkit-details-marker {
  display: none;
}

.fe-accordion-item summary:hover {
  background-color: var(--fe-bg-light);
}

.fe-accordion-item summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--fe-accent);
  border-bottom: 2px solid var(--fe-accent);
  transform: rotate(45deg);
  transition: transform 0.25s ease;
  flex-shrink: 0;
  margin-left: 12px;
  margin-top: -3px;
}

.fe-accordion-item[open] summary::after {
  transform: rotate(-135deg);
  margin-top: 3px;
}

.fe-accordion-item[open] summary {
  border-bottom: 1px solid var(--fe-border);
  background-color: var(--fe-bg-light);
}

/* Optional Static / Non-Accordion Mode */
.fe-split-static .fe-accordion-item,
.fe-accordion-static .fe-accordion-item {
  background-color: #ffffff;
}

.fe-split-static .fe-accordion-item > :not(summary),
.fe-accordion-static .fe-accordion-item > :not(summary) {
  display: block !important;
}

.fe-split-static .fe-accordion-item summary,
.fe-accordion-static .fe-accordion-item summary {
  cursor: default;
  pointer-events: none;
  background-color: var(--fe-bg-light);
  border-bottom: 1px solid var(--fe-border);
}

.fe-split-static .fe-accordion-item summary:hover,
.fe-accordion-static .fe-accordion-item summary:hover {
  background-color: var(--fe-bg-light);
}

.fe-split-static .fe-accordion-item summary::after,
.fe-accordion-static .fe-accordion-item summary::after {
  display: none;
  content: none;
}

.fe-accordion-static-row {
  border: 1px solid var(--fe-border);
  border-radius: var(--fe-radius);
  background-color: #ffffff;
  overflow: hidden;
}

.fe-accordion-static-header {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  color: var(--fe-dark);
  background-color: var(--fe-bg-light);
  border-bottom: 1px solid var(--fe-border);
}

.fe-accordion-body {
  padding: 16px 20px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--fe-text-muted);
}

.fe-accordion-body p {
  margin: 0;
}

@media (max-width: 820px) {
  .fe-split-accordion {
    grid-template-columns: 1fr;
    gap: 30px;
  }
}

/* ==========================================
   5. Reusable Link Buttons (3 Visual Styles)
   Usage:
   <div class="fe-btn-group">
     <a href="/appointments.php" class="fe-btn fe-btn-accent">Book Appointment</a>
     <a href="/eyewear.php" class="fe-btn fe-btn-outline">Browse Frames</a>
     <a href="/dry-eye.php" class="fe-btn fe-btn-primary fe-btn-sm">Learn More</a>
   </div>
   ========================================== */
.fe-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  font-family: var(--fe-font);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.3px;
  text-decoration: none;
  border-radius: var(--fe-radius);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.fe-btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.fe-btn:active {
  transform: translateY(0);
}

.fe-btn-primary {
  background-color: var(--fe-dark);
  border-color: var(--fe-dark);
  color: #ffffff;
}

.fe-btn-primary:hover {
  background-color: var(--fe-dark-hover);
  border-color: var(--fe-dark-hover);
  color: #ffffff;
}

.fe-btn-accent {
  background-color: var(--fe-accent);
  border-color: var(--fe-accent);
  color: #ffffff;
}

.fe-btn-accent:hover {
  background-color: color-mix(in srgb, var(--fe-accent) 85%, #000000);
  border-color: color-mix(in srgb, var(--fe-accent) 85%, #000000);
  color: #ffffff;
}

.fe-btn-outline {
  background-color: transparent;
  border-color: var(--fe-dark);
  color: var(--fe-dark);
}

.fe-btn-outline:hover {
  background-color: var(--fe-dark);
  color: #ffffff;
}

.fe-hero:not(.fe-hero-light) .fe-btn-outline,
.fe-hero-quarter:not(.fe-hero-light) .fe-btn-outline {
  border-color: #ffffff;
  color: #ffffff;
}

.fe-hero:not(.fe-hero-light) .fe-btn-outline:hover,
.fe-hero-quarter:not(.fe-hero-light) .fe-btn-outline:hover {
  background-color: #ffffff;
  color: var(--fe-dark);
}

.fe-btn-sm {
  padding: 8px 16px;
  font-size: 13px;
}

.fe-btn-lg {
  padding: 15px 30px;
  font-size: 16px;
}

.fe-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}

/* Center a button or button group inside a card (or any container) */
.fe-btn-group.fe-btn-center,
.fe-card-body .fe-btn-group.fe-btn-center {
  justify-content: center;
}

/* Optional: Center a single .fe-btn directly without wrapping in .fe-btn-group */
.fe-card-body > .fe-btn.fe-btn-center {
  align-self: center;
  margin-top: auto;
}


.fe-hero-content .fe-btn-group {
  justify-content: center;
}

/* ==========================================
   6. Optional Image Edge Fades (Opt-In)
   Default images remain unmasked unless a modifier class is added.
   ========================================== */

/* 1. Gentle oval/elliptical vignette feather */
img.fe-img-soft,
.fe-img-soft img,
.fe-split-media.fe-img-soft img {
  box-shadow: none;
  -webkit-mask-image: radial-gradient(
    ellipse 94% 94% at 50% 50%,
    #000000 72%,
    rgba(0, 0, 0, 0.4) 90%,
    transparent 100%
  );
  mask-image: radial-gradient(
    ellipse 94% 94% at 50% 50%,
    #000000 72%,
    rgba(0, 0, 0, 0.4) 90%,
    transparent 100%
  );
}

/* 2. All four edges softened together */
img.fe-img-feather,
.fe-img-feather img,
.fe-split-media.fe-img-feather img {
  box-shadow: none;
  -webkit-mask-image:
    linear-gradient(to right, transparent 0%, #000 var(--fe-edge-fade), #000 calc(100% - var(--fe-edge-fade)), transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 var(--fe-edge-fade), #000 calc(100% - var(--fe-edge-fade)), transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image:
    linear-gradient(to right, transparent 0%, #000 var(--fe-edge-fade), #000 calc(100% - var(--fe-edge-fade)), transparent 100%),
    linear-gradient(to bottom, transparent 0%, #000 var(--fe-edge-fade), #000 calc(100% - var(--fe-edge-fade)), transparent 100%);
  mask-composite: intersect;
}

/* 3. Top Edge Fade */
img.fe-img-fade-top,
.fe-img-fade-top img,
.fe-split-media.fe-img-fade-top img {
  box-shadow: none;
  -webkit-mask-image: linear-gradient(to top, #000000 calc(100% - var(--fe-edge-fade)), transparent 100%);
  mask-image: linear-gradient(to top, #000000 calc(100% - var(--fe-edge-fade)), transparent 100%);
}

/* 4. Bottom Edge Fade */
img.fe-img-fade-bottom,
.fe-img-fade-bottom img,
.fe-split-media.fe-img-fade-bottom img {
  box-shadow: none;
  -webkit-mask-image: linear-gradient(to bottom, #000000 calc(100% - var(--fe-edge-fade)), transparent 100%);
  mask-image: linear-gradient(to bottom, #000000 calc(100% - var(--fe-edge-fade)), transparent 100%);
}

/* 5. Left Edge Fade */
img.fe-img-fade-left,
.fe-img-fade-left img,
.fe-split-media.fe-img-fade-left img {
  box-shadow: none;
  -webkit-mask-image: linear-gradient(to left, #000000 calc(100% - var(--fe-edge-fade)), transparent 100%);
  mask-image: linear-gradient(to left, #000000 calc(100% - var(--fe-edge-fade)), transparent 100%);
}

/* 6. Right Edge Fade */
img.fe-img-fade-right,
.fe-img-fade-right img,
.fe-split-media.fe-img-fade-right img {
  box-shadow: none;
  -webkit-mask-image: linear-gradient(to right, #000000 calc(100% - var(--fe-edge-fade)), transparent 100%);
  mask-image: linear-gradient(to right, #000000 calc(100% - var(--fe-edge-fade)), transparent 100%);
}

/* 7. Two-Axis Combinations (Top + Bottom, or Left + Right) */
img.fe-img-fade-y,
.fe-img-fade-y img,
.fe-split-media.fe-img-fade-y img {
  box-shadow: none;
  -webkit-mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000000 var(--fe-edge-fade),
    #000000 calc(100% - var(--fe-edge-fade)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to bottom,
    transparent 0%,
    #000000 var(--fe-edge-fade),
    #000000 calc(100% - var(--fe-edge-fade)),
    transparent 100%
  );
}

img.fe-img-fade-x,
.fe-img-fade-x img,
.fe-split-media.fe-img-fade-x img {
  box-shadow: none;
  -webkit-mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000000 var(--fe-edge-fade),
    #000000 calc(100% - var(--fe-edge-fade)),
    transparent 100%
  );
  mask-image: linear-gradient(
    to right,
    transparent 0%,
    #000000 var(--fe-edge-fade),
    #000000 calc(100% - var(--fe-edge-fade)),
    transparent 100%
  );
}

/* ==========================================
   7. Back to Top Button (Mobile & Desktop)
   ========================================== */
.fe-back-to-top {
  position: fixed;
  bottom: 25px;
  right: 20px;
  z-index: 999;
  width: 42px;
  height: 42px;
  background-color: #333333;
  color: #ffffff;
  border: 1px solid #444;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease, background-color 0.2s ease, transform 0.2s ease;
}

.fe-back-to-top.is-visible {
  opacity: 1;
  visibility: visible;
}

.fe-back-to-top:hover {
  background-color: #222222;
  transform: translateY(-2px);
}


/* ==========================================================================
   FORM LAYOUT & INPUT ALIGNMENT
   ========================================================================== */

.fe-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.fe-form-field {
  display: flex;
  flex-direction: column;
}

.fe-form-field.fe-form-full {
  grid-column: 1 / -1;
}

.fe-form-field label {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--fe-text);
}

.fe-form-field .form-control {
  width: 100%;
  box-sizing: border-box;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 14px;
  color: var(--fe-text);
  background-color: #ffffff;
  border: 1px solid #d0d5dd;
  border-radius: var(--fe-radius);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fe-form-field .form-control:focus {
  outline: none;
  border-color: var(--fe-accent);
  box-shadow: 0 0 0 3px rgba(74, 107, 130, 0.15);
}

.fe-form-field .form-control:disabled {
  background-color: #f4f5f7;
  color: var(--fe-text-muted);
  cursor: not-allowed;
}

.fe-form-field textarea.form-control {
  resize: vertical;
  min-height: 104px;
}

.fe-form-footer {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 4px;
}

.fe-form-field .help-block {
  font-size: 12px;
  color: #b42318;
  margin-top: 4px;
}

@media (max-width: 640px) {
  .fe-form-grid {
    grid-template-columns: 1fr;
  }
}

