:root {
  --font-primary: 'Roboto', sans-serif;
  --font-secondary: 'Archivo Black', sans-serif;

  /* Monochrome Neumorphism Palette */
  --color-base-bg: #F0F1F5;
  --color-element-bg: #E9EAEE;
  --color-text-body: #3A3B3C;
  --color-text-heading: #1C1E21;
  --color-text-light: #FFFFFF;
  --color-text-subtle: #606770;
  --color-text-on-accent: #FFFFFF;

  --color-shadow-light: #FFFFFF;
  --color-shadow-dark: #D1D3D7;
  --color-shadow-darker-inset: #BEBEBE;

  --color-accent: #007AFF; /* Primary interactive color */
  --color-accent-dark: #0056b3;
  --color-accent-light-bg: #e6f2ff;

  /* Neumorphic Shadows */
  --neumorphic-shadow-outer: 6px 6px 12px var(--color-shadow-dark), -6px -6px 12px var(--color-shadow-light);
  --neumorphic-shadow-outer-hover: 8px 8px 16px var(--color-shadow-dark), -8px -8px 16px var(--color-shadow-light);
  --neumorphic-shadow-inner: inset 4px 4px 8px var(--color-shadow-darker-inset), inset -4px -4px 8px var(--color-shadow-light);
  --neumorphic-shadow-inner-strong: inset 6px 6px 10px var(--color-shadow-darker-inset), inset -6px -6px 10px var(--color-shadow-light);
  
  /* Specific shadow for colored/accent buttons to maintain neumorphic feel */
  --neumorphic-shadow-button-accent: 3px 3px 6px color-mix(in srgb, var(--color-accent) 70%, black), 
                                    -3px -3px 6px color-mix(in srgb, var(--color-accent) 70%, white);
  --neumorphic-shadow-button-accent-pressed: inset 2px 2px 4px color-mix(in srgb, var(--color-accent) 60%, black), 
                                           inset -2px -2px 4px color-mix(in srgb, var(--color-accent) 60%, white);


  /* Borders & Radius */
  --border-radius-soft: 8px;
  --border-radius-medium: 12px;
  --border-radius-large: 15px;
  --border-subtle: 1px solid var(--color-shadow-dark);

  /* Transitions */
  --transition-fast: 0.2s ease-in-out;
  --transition-smooth: 0.3s ease-in-out;

  /* Spacing */
  --spacing-xs: 0.25rem;  /* 4px */
  --spacing-sm: 0.5rem;   /* 8px */
  --spacing-md: 1rem;     /* 16px */
  --spacing-lg: 1.5rem;   /* 24px */
  --spacing-xl: 2rem;     /* 32px */
  --spacing-xxl: 3rem;    /* 48px */

  /* Header and Footer Heights (Approximate, adjust as needed) */
  --header-height: 70px; 
  --footer-height: 250px; /* Approximate footer height for 100vh calculations */
}

/* BASIC RESET & GLOBAL STYLES */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-primary);
  background-color: var(--color-base-bg);
  color: var(--color-text-body);
  line-height: 1.7;
  font-size: 1rem; /* Base font size for rem calculations */
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: 0px !important;
}

/* TYPOGRAPHY */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-secondary);
  color: var(--color-text-heading);
  margin-bottom: var(--spacing-md);
  line-height: 1.3;
  font-weight: 700; /* Archivo Black is inherently bold */
  text-rendering: optimizeLegibility;
}

h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); } /* Adaptive H1 */
h2 { font-size: clamp(2rem, 4vw, 2.75rem); } /* Adaptive H2 */
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2.5vw, 1.5rem); }
h5 { font-size: clamp(1rem, 2vw, 1.25rem); }

p {
  margin-bottom: var(--spacing-md);
  max-width: 75ch; /* Improve readability */
}

a {
  color: var(--color-accent);
  text-decoration: none;
  transition: color var(--transition-fast), background-color var(--transition-fast);
}
a:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

img, svg {
  max-width: 100%;
  height: auto;
  display: block;
  vertical-align: middle;
}

/* UTILITY CLASSES */
.text-center { text-align: center; }
.section-title {
  text-align: center;
  margin-bottom: var(--spacing-xl) !important; /* Override Bootstrap if needed */
  color: var(--color-text-heading);
  text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}
.section-bg {
  background-color: var(--color-element-bg);
}
.parallax-bg {
  background-attachment: fixed;
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}
@media (max-width: 768px) {
  .parallax-bg {
    background-attachment: scroll; /* Disable parallax on mobile for performance */
  }
}

/* GLOBAL COMPONENT STYLES */

/* Buttons */
.btn, button, input[type="submit"], input[type="button"] {
  display: inline-block;
  font-family: var(--font-primary);
  font-weight: bold;
  text-align: center;
  vertical-align: middle;
  cursor: pointer;
  user-select: none;
  border: none;
  padding: var(--spacing-sm) var(--spacing-lg); /* Default padding */
  font-size: 1rem;
  border-radius: var(--border-radius-medium);
  transition: all var(--transition-fast);
  text-decoration: none !important; /* Ensure no underline from a:hover */
  line-height: 1.5; /* Align with Bootstrap */
}

/* Primary Button Style (Using Accent Color) */
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-text-on-accent);
  box-shadow: var(--neumorphic-shadow-button-accent);
}
.btn-primary:hover {
  background-color: var(--color-accent-dark);
  color: var(--color-text-on-accent);
  transform: translateY(-2px);
  box-shadow: 4px 4px 8px color-mix(in srgb, var(--color-accent) 60%, black), 
              -4px -4px 8px color-mix(in srgb, var(--color-accent) 60%, white);
}
.btn-primary:active, .btn-primary:focus {
  background-color: var(--color-accent-dark) !important; /* BS override */
  color: var(--color-text-on-accent) !important;
  box-shadow: var(--neumorphic-shadow-button-accent-pressed) !important; /* BS override */
  transform: translateY(1px);
}

/* Outline Button Style */
.btn-outline-primary {
  background-color: transparent;
  color: var(--color-accent);
  border: 2px solid var(--color-accent); /* Make border visible */
  box-shadow: none; /* Neumorphic shadows might look odd on outlines */
}
.btn-outline-primary:hover {
  background-color: var(--color-accent);
  color: var(--color-text-on-accent);
  border-color: var(--color-accent);
  box-shadow: var(--neumorphic-shadow-button-accent); /* Add shadow on hover */
}
.btn-outline-primary:active, .btn-outline-primary:focus {
  background-color: var(--color-accent-dark) !important;
  color: var(--color-text-on-accent) !important;
  border-color: var(--color-accent-dark) !important;
  box-shadow: var(--neumorphic-shadow-button-accent-pressed) !important;
}

.btn-outline-secondary {
  background-color: transparent;
  color: var(--color-text-subtle);
  border: 2px solid var(--color-text-subtle);
  box-shadow: none;
}
.btn-outline-secondary:hover {
  background-color: var(--color-text-subtle);
  color: var(--color-base-bg);
  border-color: var(--color-text-subtle);
  box-shadow: 3px 3px 6px color-mix(in srgb, var(--color-text-subtle) 70%, black), 
              -3px -3px 6px color-mix(in srgb, var(--color-text-subtle) 70%, white);
}


/* Forms (Neumorphic) */
.neumorphic-form .form-control,
.neumorphic-form .form-select {
  background-color: var(--color-base-bg);
  border: none;
  border-radius: var(--border-radius-medium);
  padding: var(--spacing-sm) var(--spacing-lg); /* Consistent padding */
  box-shadow: var(--neumorphic-shadow-inner);
  color: var(--color-text-body);
  transition: box-shadow var(--transition-smooth), background-color var(--transition-smooth);
  font-size: 0.95rem;
  min-height: calc(1.5em + 1rem + 2px); /* BS default form control height */
}
.neumorphic-form .form-control:focus,
.neumorphic-form .form-select:focus {
  background-color: var(--color-element-bg);
  box-shadow: var(--neumorphic-shadow-inner-strong), 0 0 0 0.2rem color-mix(in srgb, var(--color-accent) 25%, transparent);
  outline: none;
  border: none; /* Ensure no default browser border on focus */
}
.neumorphic-form .form-label {
  font-weight: bold;
  color: var(--color-text-subtle);
  margin-bottom: var(--spacing-sm);
  font-size: 0.9rem;
}
.form-check-input { /* Neumorphic Toggle Switch Base */
    box-shadow: var(--neumorphic-shadow-inner);
    border: none;
    background-color: var(--color-element-bg);
}
.form-check-input:checked {
    background-color: var(--color-accent);
    box-shadow: 2px 2px 4px color-mix(in srgb, var(--color-accent) 70%, black), 
                -2px -2px 4px color-mix(in srgb, var(--color-accent) 70%, white);
}
.form-check-input:focus {
    box-shadow: var(--neumorphic-shadow-inner), 0 0 0 0.2rem color-mix(in srgb, var(--color-accent) 25%, transparent);
}


/* LAYOUT COMPONENTS */

/* Header */
.site-header {
  /* position: sticky; top: 0; z-index: 1030; Already handled by .sticky-top from Bootstrap */
  background-color: var(--color-base-bg);
  padding: var(--spacing-xs) 0; /* Reduced padding */
  box-shadow: var(--neumorphic-shadow-outer);
  min-height: var(--header-height);
}
.site-header .navbar {
  padding-top: var(--spacing-xs);
  padding-bottom: var(--spacing-xs);
}
.site-header .navbar-brand {
  font-family: var(--font-secondary);
  font-size: 1.8rem;
  color: var(--color-text-heading) !important;
}
.site-header .nav-link {
  font-family: var(--font-primary);
  font-weight: 500;
  color: var(--color-text-body) !important;
  padding: var(--spacing-sm) var(--spacing-md) !important; /* Override BS */
  margin: 0 var(--spacing-xs);
  border-radius: var(--border-radius-soft);
  transition: all var(--transition-smooth);
}
.site-header .nav-link:hover,
.site-header .nav-link.active {
  color: var(--color-accent) !important;
  background-color: var(--color-element-bg);
  box-shadow: var(--neumorphic-shadow-inner);
}
.navbar-toggler { /* Neumorphic Toggler */
    border: none;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-soft);
    background-color: var(--color-element-bg);
    box-shadow: var(--neumorphic-shadow-outer);
}
.navbar-toggler:focus {
    box-shadow: var(--neumorphic-shadow-inner);
}
.navbar-toggler-icon {
   background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(var(--bs-emphasis-color-rgb), 0.75)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important; /* Use Bootstrap's variable for icon color if possible */
}

/* Footer */
.site-footer {
  background-color: var(--color-element-bg);
  color: var(--color-text-subtle);
  padding: var(--spacing-xl) 0 var(--spacing-md) 0;
  text-align: center;
  box-shadow: inset 0 5px 10px -5px var(--color-shadow-darker-inset); /* Top inset shadow */
}
.site-footer h5 {
  font-family: var(--font-secondary);
  color: var(--color-text-heading);
  margin-bottom: var(--spacing-md);
}
.site-footer a {
  color: var(--color-text-body);
}
.site-footer a:hover {
  color: var(--color-accent);
  text-decoration: underline;
}
.site-footer .list-unstyled li {
  margin-bottom: var(--spacing-sm);
}
.site-footer .social-links {
    margin-top: var(--spacing-md);
    margin-bottom: var(--spacing-md);
}
.site-footer .social-links a {
  padding: var(--spacing-xs) var(--spacing-sm);
  margin: 0 var(--spacing-xs);
  border-radius: var(--border-radius-soft);
  transition: all var(--transition-fast);
}
.site-footer .social-links a:hover {
  background-color: var(--color-base-bg);
  box-shadow: var(--neumorphic-shadow-inner);
  text-decoration: none;
}
.site-footer .copyright {
  margin-top: var(--spacing-lg);
  padding-top: var(--spacing-lg);
  border-top: 1px solid var(--color-shadow-dark);
  font-size: 0.875rem;
}

/* SECTION-SPECIFIC STYLES */

/* Hero Section */
.hero-section {
  display: flex;
  align-items: center;
  justify-content: center; /* Ensures content is centered horizontally too */
  text-align: center;
  padding: var(--spacing-xxl) var(--spacing-md); /* Natural height based on content */
  color: var(--color-text-light); /* This is VITAL */
  position: relative; /* For overlay and parallax content */
  /* background-image with linear-gradient is applied inline */
}
.hero-section .hero-title {
  color: var(--color-text-light); /* Explicitly white */
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7);
  margin-bottom: var(--spacing-lg);
}
.hero-section .hero-subtitle {
  color: var(--color-text-light); /* Explicitly white */
  text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.6);
  max-width: 65ch;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: var(--spacing-xl);
}

/* Page Hero Mini (for subpages like about, contact) */
.page-hero-mini {
    padding: var(--spacing-xl) var(--spacing-md);
    text-align: center;
    color: var(--color-text-light);
    position: relative;
    /* background-image with linear-gradient is applied inline */
}
.page-hero-mini h1 {
    color: var(--color-text-light);
    text-shadow: 1px 1px 3px rgba(0,0,0,0.6);
}
.page-hero-mini .lead {
     color: var(--color-text-light);
     text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}


/* Cards (Generic styling for .info-card, .blog-card, etc.) */
.card, .info-card, .testimonial-card, .blog-card, .resource-card, .feature-box {
  background-color: var(--color-base-bg);
  border-radius: var(--border-radius-large);
  padding: var(--spacing-lg);
  box-shadow: var(--neumorphic-shadow-outer);
  transition: all var(--transition-smooth);
  height: 100%; /* For Bootstrap column equal height */
  display: flex;
  flex-direction: column;
  /* align-items: center; /* Centers block items like card-image if not full width */
  text-align: center; /* Centers text and inline/inline-block children */
}
.card:hover, .info-card:hover, .blog-card:hover, .resource-card:hover, .feature-box:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: var(--neumorphic-shadow-outer-hover);
}
.card-content, .card-body { /* Assuming card-body is used similarly */
  flex-grow: 1; /* Allows content to fill space, useful for footer buttons */
  display: flex;
  flex-direction: column;
  justify-content: space-between; /* Pushes button to bottom if card-link is last child */
  align-items: center; /* Center content horizontally */
  text-align: center;
  width: 100%; /* Ensure content takes full width for alignment */
}
.card-content p, .card-body p {
    max-width: 100%; /* Override general p max-width if needed within cards */
    margin-left: auto;
    margin-right: auto;
}
.card-title {
  margin-bottom: var(--spacing-md);
}

/* Card Images */
.card-image {
  width: 100%; /* Make container full width of card padding */
  height: 200px; /* Example fixed height for consistency */
  border-radius: var(--border-radius-medium);
  overflow: hidden;
  margin-bottom: var(--spacing-lg); /* Space between image and content */
  margin-left: auto; /* Center block if card itself is not flexing items center */
  margin-right: auto;
  display: flex; /* For centering the image if it's smaller, though object-fit:cover helps */
  justify-content: center;
  align-items: center;
}
.card-image img, .testimonial-avatar {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block; /* remove extra space below image */
  border-radius: var(--border-radius-medium); /* if img itself should be rounded */
}
.testimonial-avatar {
    width: 100px; /* Specific size for avatars */
    height: 100px;
    border-radius: 50%;
    margin: 0 auto var(--spacing-lg) auto; /* Center and provide bottom margin */
    box-shadow: var(--neumorphic-shadow-outer);
}
.card-icon, .feature-icon {
    width: 70px; /* Standard size for these icons */
    height: 70px;
    padding: var(--spacing-sm);
    border-radius: var(--border-radius-medium);
    background-color: var(--color-element-bg);
    box-shadow: var(--neumorphic-shadow-inner);
    margin: 0 auto var(--spacing-md) auto; /* Center and provide bottom margin */
    display: flex;
    justify-content: center;
    align-items: center;
}
.feature-box { /* Ensure feature-box specific content is centered */
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}


/* "Read More" Links */
.card .btn-outline-primary, .card .btn-sm { /* Specific to card read more buttons */
  margin-top: auto; /* Pushes button to the bottom if card is flex column */
  padding: var(--spacing-xs) var(--spacing-md);
  font-size: 0.9rem;
}
.disabled-link {
    pointer-events: none;
    opacity: 0.65;
}

/* Testimonial Carousel */
#successStoriesCarousel .carousel-inner {
    padding: var(--spacing-md);
}
#successStoriesCarousel .testimonial-card {
    box-shadow: none; /* Shadow on carousel item, not inner card for cleaner look */
    padding: var(--spacing-md);
}
#successStoriesCarousel .carousel-item {
    padding: var(--spacing-sm); /* Padding for the item itself for shadow */
    background-color: var(--color-base-bg);
    border-radius: var(--border-radius-large);
    box-shadow: var(--neumorphic-shadow-outer);
}
.carousel-indicators [data-bs-target] {
    background-color: var(--color-text-subtle);
    border-radius: 50%;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    box-shadow: var(--neumorphic-shadow-inner);
    opacity: 0.7;
}
.carousel-indicators .active {
    background-color: var(--color-accent);
    box-shadow: 0 0 5px var(--color-accent);
    opacity: 1;
}
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: var(--border-radius-soft);
    padding: var(--spacing-lg); /* Larger clickable area */
    background-size: 50% 50%;
}

/* Specific Page Styling */
body[data-barba-namespace="success"] main > section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: calc(100vh - var(--header-height) - var(--footer-height));
  padding-top: var(--spacing-lg);
  padding-bottom: var(--spacing-lg);
}

body[data-barba-namespace="privacy"] main > section:first-of-type,
body[data-barba-namespace="terms"] main > section:first-of-type {
  padding-top: calc(var(--header-height) + var(--spacing-xl)) !important;
}
body[data-barba-namespace="privacy"] .container,
body[data-barba-namespace="terms"] .container {
    max-width: 800px; /* Improve readability for long text pages */
}
body[data-barba-namespace="privacy"] h2,
body[data-barba-namespace="terms"] h2 {
    margin-top: var(--spacing-xl);
    margin-bottom: var(--spacing-sm);
    font-size: 1.5rem; /* Slightly smaller for policy pages */
}
body[data-barba-namespace="privacy"] p,
body[data-barba-namespace="terms"] p,
body[data-barba-namespace="privacy"] li,
body[data-barba-namespace="terms"] li {
    font-size: 0.95rem;
    line-height: 1.8;
    max-width: none; /* Allow full width within constrained container */
}


/* ANIMATION STYLES */
.animate-on-scroll {
  opacity: 0;
  transform: translateY(40px); /* Slightly more noticeable translate */
  transition: opacity 0.7s cubic-bezier(0.645, 0.045, 0.355, 1), 
              transform 0.7s cubic-bezier(0.645, 0.045, 0.355, 1);
}
.animate-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Barba.js Page Transitions (Basic Fade) */
.barba-leave-active,
.barba-enter-active {
  transition: opacity var(--transition-smooth);
}
.barba-leave-to,
.barba-enter-from {
  opacity: 0;
  position: absolute; /* Avoid content jump */
  width: 100%;
}
.barba-enter-to {
    opacity: 1;
}

/* Cookie Consent Popup (Basic Styling from HTML, slightly enhanced) */
#cookieConsentPopup {
    font-family: var(--font-primary); /* Ensure consistent font */
    box-shadow: 0 -5px 15px rgba(0,0,0,0.1); /* Subtle top shadow */
}
#cookieConsentPopup p {
    margin-bottom: var(--spacing-md) !important; /* Ensure spacing from HTML */
    max-width: none; /* Override default p max-width */
}
#acceptCookieConsent { /* Style it like a neumorphic button */
    background-color: var(--color-accent);
    color: var(--color-text-on-accent);
    border: none;
    padding: var(--spacing-sm) var(--spacing-lg);
    border-radius: var(--border-radius-medium);
    cursor: pointer;
    font-weight: bold;
    box-shadow: var(--neumorphic-shadow-button-accent);
    transition: all var(--transition-fast);
}
#acceptCookieConsent:hover {
    background-color: var(--color-accent-dark);
    transform: translateY(-1px);
}
#acceptCookieConsent:active {
    box-shadow: var(--neumorphic-shadow-button-accent-pressed);
    transform: translateY(0px);
}

/* Ensure background images always cover and don't repeat */
[style*="background-image"] {
    background-size: cover !important;
    background-repeat: no-repeat !important;
    background-position: center center !important;
}

/* Ensure text on background images has sufficient contrast if not handled by inline linear-gradient */
.hero-section::before, .page-hero-mini::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* The linear-gradient is applied inline in HTML, this is a fallback or alternative */
    /* background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)); */
    z-index: 1; /* Ensure it's below text content */
}
.hero-section > .container, .page-hero-mini > .container {
    position: relative;
    z-index: 2; /* Ensure text is above overlay */
}