/* Import Google Font - Poppins (Light, Regular, Bold) */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;700&display=swap');

:root {
  /* Brand Colors from Guidelines */
  --amore-purple: #662483;         /* Social Care secondary color */
  --amore-green: #a9c44e;          /* Primary Group brand color */
  --amore-green-dark: #8ba53a;
  --amore-purple-light: #f4edf7;
  --amore-dark-text: #4e4c4c;      /* Darker gray (minimum 4.5:1 contrast ratio against white/light backgrounds) */
  --amore-dark-heading: #201e1e;   /* Darker heading color for enhanced legibility */
  --amore-light-bg: #faf9fb;
  --amore-white: #ffffff;
  
  --font-primary: 'Poppins', sans-serif;
  --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

body {
  font-family: var(--font-primary);
  color: var(--amore-dark-text);
  background-color: var(--amore-white);
  line-height: 1.6;
  font-size: 0.95rem;
  font-weight: 400; /* Regular */
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-primary);
  color: var(--amore-dark-heading);
  font-weight: 700; /* Bold */
}

/* Colors Utilities */
.text-purple { color: var(--amore-purple) !important; }
.text-green { color: var(--amore-green) !important; }
.bg-purple { background-color: var(--amore-purple) !important; }
.bg-green { background-color: var(--amore-green) !important; }
.bg-purple-light { background-color: var(--amore-purple-light) !important; }
.bg-light-custom { background-color: var(--amore-light-bg) !important; }

/* Sticky Navbar Styling */
.navbar-custom {
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
  transition: var(--transition-smooth);
  padding: 15px 0;
}
.navbar-custom.scrolled {
  padding: 10px 0;
}
.navbar-custom .navbar-brand img {
  height: 50px;
  width: auto;
  object-fit: contain;
  transition: var(--transition-smooth);
}
.navbar-custom.scrolled .navbar-brand img {
  height: 42px;
}
.navbar-custom .nav-link {
  color: var(--amore-dark-heading) !important;
  font-weight: 400; /* Regular */
  font-size: 0.95rem;
  padding: 8px 16px !important;
  border-radius: 4px;
  transition: var(--transition-smooth);
}
.navbar-custom .nav-link:hover,
.navbar-custom .nav-link.active {
  color: var(--amore-purple) !important;
  background-color: var(--amore-purple-light);
}

/* Buttons */
.btn-amore-purple {
  background-color: var(--amore-purple);
  color: var(--amore-white);
  border: 2px solid var(--amore-purple);
  font-weight: 700; /* Bold */
  padding: 10px 24px;
  border-radius: 30px;
  transition: var(--transition-smooth);
}
.btn-amore-purple:hover {
  background-color: #7e2f9c; /* Lighter shade of purple */
  color: var(--amore-white);
  border-color: #7e2f9c;
}
.btn-amore-green {
  background-color: var(--amore-green);
  color: var(--amore-white);
  border: 2px solid var(--amore-green);
  font-weight: 700; /* Bold */
  padding: 10px 24px;
  border-radius: 30px;
  transition: var(--transition-smooth);
}
.btn-amore-green:hover {
  background-color: #b9d758; /* Lighter/softer shade of green */
  color: var(--amore-white);
  border-color: #b9d758;
}
.btn-amore-outline {
  background-color: transparent;
  color: var(--amore-purple);
  border: 2px solid var(--amore-purple);
  font-weight: 700; /* Bold */
  padding: 10px 24px;
  border-radius: 30px;
  transition: var(--transition-smooth);
}
.btn-amore-outline:hover {
  background-color: var(--amore-purple);
  color: var(--amore-white);
}

/* Hero Section */
.hero-section {
  background: url('../img/hero-banner.jpg') no-repeat center center;
  background-size: cover;
  min-height: 80vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding: 80px 0 130px 0; /* Increased bottom padding to prevent curve overlay on desktop */
}
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(rgba(102, 36, 131, 0.8), rgba(102, 36, 131, 0.45));
  z-index: 1;
}
.hero-curve-mask {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  height: 120px;
  background: var(--amore-white);
  clip-path: ellipse(70% 120px at 50% 120px);
  z-index: 2;
}
@media (max-width: 767.98px) {
  .hero-section {
    padding-bottom: 140px !important;
  }
  .hero-curve-mask {
    height: 75px !important;
    clip-path: ellipse(80% 75px at 50% 75px) !important;
  }
}
.z-index-3 {
  z-index: 3;
}
.relative {
  position: relative;
}

/* Regulator compliance logos */
.regulator-logo {
  max-height: 55px;
  width: auto;
  transition: var(--transition-smooth);
}
.regulator-logo:hover {
  transform: scale(1.05);
}
.regulator-logo-vertical {
  max-height: 70px;
  width: auto;
  object-fit: contain;
}
.xxs-text {
  font-size: 0.72rem;
}
.shadow-xs {
  box-shadow: 0 2px 8px rgba(0,0,0,0.02);
}

/* Info Cards & Features Grid */
.feature-card {
  background: var(--amore-white);
  border: 1px solid rgba(0,0,0,0.05);
  border-radius: 16px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.02);
  transition: var(--transition-smooth);
  height: 100%;
}
.feature-card p {
  font-weight: 400; /* Regular weight for contrast legibility */
}
.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 30px rgba(102, 36, 131, 0.1);
  border-color: var(--amore-purple-light);
}
.feature-icon-wrapper {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

/* Call to Action Bar & Overlap Layout */
.cta-section {
  position: relative;
  z-index: 10;
  margin-bottom: -80px; /* Overlaps footer section */
}
.cta-bar {
  background: linear-gradient(135deg, var(--amore-purple) 0%, #4a1960 100%);
  color: var(--amore-white);
  border-radius: 24px;
  padding: 60px 50px;
  overflow: hidden;
  box-shadow: 0 15px 40px rgba(102, 36, 131, 0.25);
}
.border-end-lg {
  border-right: 1px solid rgba(255, 255, 255, 0.15);
}
@media (max-width: 991.98px) {
  .border-end-lg {
    border-right: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.15);
    padding-bottom: 30px;
  }
}
.cta-bar p {
  font-weight: 400; /* Regular weight for contrast legibility */
}

/* Testimonials */
.testimonial-card {
  background-color: var(--amore-white);
  border-radius: 16px;
  padding: 24px 24px 20px 24px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.04);
  position: relative;
  border: 1px solid rgba(0,0,0,0.03);
  display: flex;
  flex-direction: column;
  height: auto;
  min-height: 230px;
  width: 360px;
}
.testimonial-card p {
  font-weight: 400;
  position: relative;
  z-index: 2;
  margin-top: 5px;
  margin-bottom: 12px !important;
}
.testimonial-card::before {
  content: "“";
  position: absolute;
  top: -12px;
  left: 20px;
  font-size: 4.5rem;
  color: rgba(169, 196, 78, 0.22);
  font-family: Georgia, serif;
  line-height: 1;
  z-index: 1;
  pointer-events: none;
}
.testimonial-user {
  display: flex;
  align-items: center;
  margin-top: auto;
  padding-top: 14px !important;
}
.testimonial-user img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  object-fit: cover;
  margin-right: 12px;
  border: 2px solid var(--amore-green);
}

/* Testimonial Scroller & Manual Navigation */
.testimonial-scroller-container {
  position: relative;
  width: 100%;
  padding: 0 35px; /* Added horizontal padding to give room for arrows */
}
.testimonial-scroller-wrapper {
  overflow-x: auto;
  width: 100%;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none; /* Hide scrollbar Firefox */
  cursor: grab;
  scroll-behavior: smooth;
  padding: 10px 0 20px 0; /* Vertical breathing room for cards drop-shadows */
}
.testimonial-scroller-wrapper:active {
  cursor: grabbing;
}
.testimonial-scroller-wrapper::-webkit-scrollbar {
  display: none; /* Hide scrollbar Chrome/Safari */
}
.testimonial-scroller {
  animation: scrollTestimonials 55s linear infinite;
  width: max-content;
  display: flex;
}
.testimonial-scroller-wrapper:active .testimonial-scroller,
.testimonial-scroller-wrapper:focus-within .testimonial-scroller,
.testimonial-scroller:hover,
.testimonial-scroller-wrapper.is-paused .testimonial-scroller {
  animation-play-state: paused;
}
@keyframes scrollTestimonials {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(calc(-360px * 7 - 1.5rem * 7)); /* Width of 7 cards + gap spacing */
  }
}

.testimonial-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background-color: var(--amore-white);
  color: var(--amore-purple);
  border: 2px solid var(--amore-purple);
  box-shadow: 0 6px 18px rgba(102, 36, 131, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  cursor: pointer;
  z-index: 10;
  transition: var(--transition-smooth);
}
.testimonial-nav-btn:hover {
  background-color: var(--amore-purple);
  color: var(--amore-white);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 8px 24px rgba(102, 36, 131, 0.35);
}
.testimonial-nav-prev {
  left: 0;
}
.testimonial-nav-next {
  right: 0;
}
@media (max-width: 768px) {
  .testimonial-scroller-container {
    padding: 0 20px;
  }
  .testimonial-card {
    width: 300px;
    padding: 20px 18px 16px 18px;
  }
  .testimonial-nav-prev {
    left: -5px;
  }
  .testimonial-nav-next {
    right: -5px;
  }
  .testimonial-nav-btn {
    width: 38px;
    height: 38px;
    font-size: 1.05rem;
    background-color: rgba(255, 255, 255, 0.95);
  }
}

/* Forms styling */
.form-control-custom {
  border: 2px solid #e1dbdb;
  border-radius: 8px;
  padding: 12px 18px;
  font-size: 0.95rem;
  transition: var(--transition-smooth);
}
.form-control-custom:focus {
  border-color: var(--amore-purple);
  box-shadow: 0 0 0 3px rgba(102, 36, 131, 0.15);
  outline: none;
}
/* Hyperlink styling inside consent check boxes */
.form-check-label a {
  color: var(--amore-green) !important;
  text-decoration: underline !important;
  transition: var(--transition-smooth);
  position: relative;
  z-index: 5;
  pointer-events: auto !important;
}
.form-check-label a:hover {
  color: var(--amore-purple) !important;
  text-decoration: underline !important;
}
.form-label-custom {
  font-weight: 600;
  color: var(--amore-dark-heading);
  margin-bottom: 8px;
}

/* Footer styling - Redesigned to Light Theme Layout */
.footer-custom {
  background-color: var(--amore-light-bg);
  color: var(--amore-dark-text);
  padding: 140px 0 30px 0; /* Expanded top padding to offset the overlapping CTA card */
  font-size: 0.95rem;      /* Increased slightly for better legibility */
  border-top: 1px solid rgba(0,0,0,0.05);
}
.footer-custom h5 {
  color: var(--amore-purple);
  margin-bottom: 25px;
  font-size: 1.05rem;
  font-weight: 700;
}
.footer-custom a {
  color: var(--amore-dark-text);
  text-decoration: none;
  font-weight: 500;        /* Medium weight to guarantee robust contrast against var(--amore-light-bg) */
  transition: var(--transition-smooth);
}
.footer-custom a:hover {
  color: var(--amore-purple); /* Changed from green-dark to brand purple for higher contrast and legibility */
  padding-left: 5px;
}
.footer-social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--amore-purple);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  color: var(--amore-white) !important;
  transition: var(--transition-smooth);
}
.footer-social-link:hover {
  background-color: var(--amore-green);
  transform: translateY(-3px);
}
.footer-cqc-box {
  background-color: #fdfcfd;
  border: 1px solid rgba(0,0,0,0.08);
  border-radius: 12px;
  padding: 20px;
  text-align: left;
  box-shadow: 0 4px 15px rgba(0,0,0,0.02);
}
.footer-cqc-rating {
  background-color: #f7f1f9;
  border-left: 4px solid var(--amore-purple);
  padding: 10px;
  border-radius: 4px;
}
.footer-custom img.filter-brightness {
  /* Logo color is maintained in light footer */
  height: 55px;
  width: auto;
  object-fit: contain;
}
.footer-logo-img {
  height: 55px !important;
  width: auto !important;
  object-fit: contain !important;
}

/* Accessibility Tool Sidebar */
.accessibility-sidebar {
  position: fixed;
  top: 0;
  left: -320px;
  width: 320px;
  height: 100vh;
  background-color: var(--amore-white);
  box-shadow: 5px 0 25px rgba(0,0,0,0.15);
  z-index: 2000;
  transition: var(--transition-smooth);
  padding: 30px 20px;
  overflow-y: auto;
}
.accessibility-sidebar.active {
  left: 0;
}
.accessibility-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0,0,0,0.4);
  z-index: 1999;
  display: none;
}
.accessibility-backdrop.active {
  display: block;
}

/* Accessibility Helper states */
body.high-contrast {
  background-color: #000000 !important;
  color: #ffffff !important;
}
body.high-contrast p, 
body.high-contrast span,
body.high-contrast li,
body.high-contrast label,
body.high-contrast small {
  color: #ffffff !important;
}
body.high-contrast h1,
body.high-contrast h2,
body.high-contrast h3,
body.high-contrast h4,
body.high-contrast h5,
body.high-contrast h6 {
  color: #ffff00 !important;
}
body.high-contrast a {
  color: #00ffff !important;
  text-decoration: underline !important;
}
body.high-contrast a:hover {
  color: #ffff00 !important;
}
body.high-contrast .btn {
  background-color: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
}
body.high-contrast .btn:hover {
  background-color: #ffffff !important;
  color: #000000 !important;
}
body.high-contrast .bg-purple-light,
body.high-contrast .bg-light-custom,
body.high-contrast .bg-white,
body.high-contrast .bg-purple,
body.high-contrast .bg-green,
body.high-contrast .cta-bar {
  background: #121212 !important;
  border: 1px solid #ffffff !important;
  color: #ffffff !important;
}
body.high-contrast .form-control,
body.high-contrast .form-select {
  background-color: #000000 !important;
  color: #ffffff !important;
  border: 2px solid #ffffff !important;
}

/* Focus Indicator Ring for Accessibility Navigation */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus {
  outline: 3px solid #ffaa00 !important;
  outline-offset: 2px !important;
}

/* Ensure text-muted is legible under standard settings too */
.text-muted {
  color: #555353 !important; /* Meets minimum contrast ratio */
}

body.large-text {
  font-size: 1.25rem !important;
}
body.large-text p,
body.large-text li,
body.large-text span,
body.large-text label,
body.large-text small {
  font-size: 1.25rem !important;
}
body.large-text h1 { font-size: 3rem !important; }
body.large-text h2 { font-size: 2.25rem !important; }
body.large-text h3 { font-size: 1.75rem !important; }

/* Cookie Banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #2d2b2b;
  color: var(--amore-white);
  padding: 20px 0;
  z-index: 1060;
  box-shadow: 0 -5px 25px rgba(0,0,0,0.15);
  transform: translateY(100%);
  transition: var(--transition-smooth);
}
.cookie-banner.show {
  transform: translateY(0);
}

.footer-bottom {
  border-top: 1px solid rgba(0,0,0,0.06);
  padding-top: 30px;
  margin-top: 50px;
  color: var(--amore-dark-text);
}

/* Mobile responsive inline button adjustment for role pages */
@media (max-width: 575.98px) {
  .role-cta-wrapper {
    display: flex !important;
    flex-direction: row !important;
    gap: 8px !important;
    width: 100% !important;
  }
  .role-cta-wrapper .btn {
    flex: 1 !important;
    padding: 10px 10px !important;
    font-size: 13px !important;
    text-align: center !important;
    white-space: nowrap !important;
  }
}

/* Force safe margin spacing on mobile screen edges */
@media (max-width: 767.98px) {
  .container, 
  .container-fluid {
    padding-left: 24px !important;
    padding-right: 24px !important;
  }
  
  /* Prevent aligned regulatory standard cards from scrunching on mobile */
  .regulator-card-wrapper .d-table,
  .regulator-card-wrapper .d-table-row,
  .regulator-card-wrapper .d-table-cell {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    padding: 0 !important;
  }
  .regulator-card-wrapper .d-table-cell img {
    margin: 0 auto 15px auto !important;
    display: block !important;
  }
}

/* Key Stats Layout Alignment Helper */
.stat-box {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: flex-start;
}
.stat-box h2 {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.stat-box p {
  min-height: 44px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  font-size: 0.88rem;
  line-height: 1.3;
}
@media (max-width: 575.98px) {
  .stat-box h2 {
    font-size: 2rem !important;
    min-height: 38px;
  }
  .stat-box p {
    font-size: 0.82rem;
    min-height: 36px;
  }
}

