/* ===================================================
   Independent Pathways Care Ltd — Main Stylesheet
   =================================================== */

/* --- CSS Custom Properties --- */
:root {
  --color-primary: #2a6041;
  --color-primary-light: #3a7d56;
  --color-primary-dark: #1e4a31;
  --color-secondary: #d4a55a;
  --color-secondary-light: #e8c88a;
  --color-accent: #4a90a4;
  --color-bg: #faf8f5;
  --color-bg-alt: #f0ece6;
  --color-bg-dark: #2c2c2c;
  --color-text: #3a3a3a;
  --color-text-light: #6b6b6b;
  --color-text-on-dark: #f0ece6;
  --color-white: #ffffff;
  --color-border: #ddd5c9;
  --color-success: #2a6041;
  --color-error: #c0392b;
  --font-heading: 'Georgia', 'Times New Roman', serif;
  --font-body: 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1200px;
  --header-height: 80px;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);
  --transition: 0.3s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-primary);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover,
a:focus {
  color: var(--color-primary-light);
  text-decoration: underline;
}

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  color: var(--color-primary-dark);
  line-height: 1.3;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.4rem; }
h4 { font-size: 1.15rem; }

p {
  margin-bottom: 1em;
}

/* --- Accessibility --- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

:focus-visible {
  outline: 3px solid var(--color-secondary);
  outline-offset: 2px;
}

/* Skip to content */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  z-index: 10000;
  font-weight: 600;
}

.skip-link:focus {
  top: 1rem;
  text-decoration: none;
  color: var(--color-white);
}

/* --- Container --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ===================================================
   HEADER & NAVIGATION
   =================================================== */
.site-header {
  background: var(--color-white);
  border-bottom: 3px solid var(--color-secondary);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-height);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo img {
  height: 70px;
  width: auto;
}

/* Main navigation */
.main-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.main-nav a {
  display: block;
  padding: 0.5rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--color-text);
  border-radius: var(--radius);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}

.main-nav a:hover,
.main-nav a:focus,
.main-nav a.active {
  background: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
}

/* Dropdown */
.has-dropdown {
  position: relative;
}

.has-dropdown > a::after {
  content: ' ▾';
  font-size: 0.7em;
}

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--color-white);
  min-width: 220px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all var(--transition);
  z-index: 100;
  padding: 0.5rem 0;
}

.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown a {
  padding: 0.6rem 1.2rem;
  border-radius: 0;
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--color-primary-dark);
  border-radius: 2px;
  transition: var(--transition);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* Phone bar */
.phone-bar {
  background: var(--color-primary-dark);
  color: var(--color-text-on-dark);
  font-size: 0.85rem;
  padding: 0.35rem 0;
  text-align: right;
}

.phone-bar a {
  color: var(--color-secondary-light);
  font-weight: 600;
}

.phone-bar a:hover {
  color: var(--color-white);
}

/* ===================================================
   HERO SECTION
   =================================================== */
.hero {
  background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-accent) 100%);
  color: var(--color-white);
  padding: 5rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  background: rgba(255,255,255,0.04);
  border-radius: 50%;
}

.hero h1 {
  color: var(--color-white);
  font-size: 2.8rem;
  margin-bottom: 0.75rem;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.hero p {
  font-size: 1.2rem;
  opacity: 0.92;
  max-width: 800px;
  margin: 0 auto 2rem;
}

.hero-sm {
  padding: 3rem 0;
}

.hero-sm h1 {
  font-size: 2.2rem;
}

/* ===================================================
   BUTTONS
   =================================================== */
.btn {
  display: inline-block;
  padding: 0.85rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: var(--radius);
  text-decoration: none;
  cursor: pointer;
  transition: all var(--transition);
  border: 2px solid transparent;
  text-align: center;
}

.btn-primary {
  background: var(--color-secondary);
  color: var(--color-primary-dark);
  border-color: var(--color-secondary);
}

.btn-primary:hover,
.btn-primary:focus {
  background: var(--color-secondary-light);
  color: var(--color-primary-dark);
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

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

.btn-outline:hover,
.btn-outline:focus {
  background: var(--color-white);
  color: var(--color-primary-dark);
  text-decoration: none;
  transform: translateY(-2px);
}

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

.btn-outline-dark:hover,
.btn-outline-dark:focus {
  background: var(--color-primary);
  color: var(--color-white);
  text-decoration: none;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===================================================
   SECTIONS
   =================================================== */
.section {
  padding: 4rem 0;
}

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

.section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.section-header p {
  max-width: 650px;
  margin: 0 auto;
  color: var(--color-text-light);
  font-size: 1.1rem;
}

/* ===================================================
   CARDS
   =================================================== */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.card {
  background: var(--color-white);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
  border-top: 4px solid var(--color-secondary);
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.card h3 {
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--color-text-light);
  font-size: 0.95rem;
}

.card .btn {
  margin-top: 1rem;
}

/* ===================================================
   FEATURES / VALUES
   =================================================== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}

.value-item {
  text-align: center;
  padding: 1.5rem;
}

.value-icon {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
}

.value-item h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.value-item p {
  color: var(--color-text-light);
  font-size: 0.92rem;
}

/* ===================================================
   TWO-COLUMN LAYOUT
   =================================================== */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.two-col-text h2 {
  margin-bottom: 1rem;
}

.two-col-text ul {
  margin: 1rem 0 1.5rem 1.25rem;
  list-style: disc;
}

.two-col-text ul li {
  margin-bottom: 0.5rem;
  color: var(--color-text-light);
}

.two-col-image {
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.two-col-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: var(--radius);
}

/* ===================================================
   CTA BANNER
   =================================================== */
.cta-banner {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 3.5rem 0;
  text-align: center;
}

.cta-banner h2 {
  color: var(--color-white);
  margin-bottom: 0.75rem;
}

.cta-banner p {
  opacity: 0.92;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

/* ===================================================
   TESTIMONIAL
   =================================================== */
.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.testimonial {
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border-left: 4px solid var(--color-secondary);
}

.testimonial blockquote {
  font-style: italic;
  color: var(--color-text);
  margin-bottom: 1rem;
  line-height: 1.8;
}

.testimonial cite {
  font-style: normal;
  font-weight: 600;
  color: var(--color-primary-dark);
  font-size: 0.9rem;
}

/* ===================================================
   FORMS
   =================================================== */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--color-text);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--color-text);
  background: var(--color-white);
  transition: border-color var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: 0 0 0 3px rgba(42, 96, 65, 0.15);
}

.form-group textarea {
  min-height: 140px;
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 0.75rem;
}

.contact-info-card {
  background: var(--color-white);
  padding: 2rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.contact-info-card h3 {
  margin-bottom: 1rem;
}

.contact-info-card p {
  margin-bottom: 0.75rem;
}

.contact-info-card strong {
  color: var(--color-primary-dark);
}

/* ===================================================
   CONTENT PAGES (Privacy, Cookie, Accessibility)
   =================================================== */
.content-page {
  padding: 3rem 0;
}

.content-page h2 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

.content-page h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.content-page ul,
.content-page ol {
  margin: 1rem 0 1.5rem 1.5rem;
}

.content-page ul {
  list-style: disc;
}

.content-page ol {
  list-style: decimal;
}

.content-page li {
  margin-bottom: 0.4rem;
  color: var(--color-text-light);
}

/* ===================================================
   CAREERS
   =================================================== */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.benefit-item {
  background: var(--color-white);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-align: center;
  box-shadow: var(--shadow);
}

.benefit-item .benefit-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.benefit-item h4 {
  margin-bottom: 0.4rem;
}

.benefit-item p {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

/* ===================================================
   FOOTER
   =================================================== */
.site-footer {
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  padding: 3rem 0 1.5rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col h4 {
  color: var(--color-secondary);
  margin-bottom: 1rem;
  font-size: 1.05rem;
}

.footer-col p {
  font-size: 0.9rem;
  color: rgba(240, 236, 230, 0.8);
  line-height: 1.7;
}

.footer-col ul li {
  margin-bottom: 0.4rem;
}

.footer-col a {
  color: rgba(240, 236, 230, 0.8);
  font-size: 0.9rem;
}

.footer-col a:hover {
  color: var(--color-secondary-light);
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: rgba(240, 236, 230, 0.6);
}

.footer-bottom a {
  color: rgba(240, 236, 230, 0.6);
}

.footer-bottom a:hover {
  color: var(--color-secondary-light);
}

/* ===================================================
   COOKIE BANNER
   =================================================== */
.cookie-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--color-bg-dark);
  color: var(--color-text-on-dark);
  padding: 1.25rem;
  z-index: 9999;
  box-shadow: 0 -4px 20px rgba(0,0,0,0.2);
}

.cookie-banner.show {
  display: block;
}

.cookie-banner-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.cookie-banner p {
  flex: 1;
  margin: 0;
  font-size: 0.9rem;
}

.cookie-banner a {
  color: var(--color-secondary-light);
}

.cookie-btn-group {
  display: flex;
  gap: 0.75rem;
}

.cookie-btn {
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
}

.cookie-accept {
  background: var(--color-secondary);
  color: var(--color-primary-dark);
}

.cookie-accept:hover {
  background: var(--color-secondary-light);
}

.cookie-decline {
  background: transparent;
  color: var(--color-text-on-dark);
  border: 1px solid rgba(255,255,255,0.3);
}

.cookie-decline:hover {
  border-color: var(--color-white);
}

/* ===================================================
   RESPONSIVE
   =================================================== */
@media (max-width: 992px) {
  .two-col {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .two-col-image {
    min-height: 200px;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 70px;
  }

  h1 { font-size: 1.9rem; }
  h2 { font-size: 1.5rem; }

  .hero { padding: 3rem 0; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1.05rem; }
  .hero-sm { padding: 2rem 0; }

  .section { padding: 2.5rem 0; }

  /* Mobile nav */
  .nav-toggle {
    display: flex;
  }

  .main-nav {
    position: fixed;
    top: var(--header-height);
    right: -100%;
    width: 280px;
    height: calc(100vh - var(--header-height));
    background: var(--color-white);
    box-shadow: var(--shadow-lg);
    transition: right var(--transition);
    overflow-y: auto;
    padding: 1rem 0;
    z-index: 999;
  }

  .main-nav.open {
    right: 0;
  }

  .main-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .main-nav a {
    padding: 0.75rem 1.5rem;
    border-radius: 0;
  }

  .dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    background: var(--color-bg-alt);
    padding: 0;
  }

  .dropdown a {
    padding-left: 2.5rem;
  }

  .has-dropdown > a::after {
    content: '';
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  .cookie-banner-inner {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .logo img { height: 45px; }

  .btn { padding: 0.7rem 1.5rem; font-size: 0.9rem; }
  .btn-group { flex-direction: column; align-items: center; }

  .hero h1 { font-size: 1.7rem; }

  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* --- Print --- */
@media print {
  .site-header,
  .cookie-banner,
  .cta-banner,
  .site-footer {
    display: none;
  }

  body {
    color: #000;
    background: #fff;
  }

  a {
    color: #000;
    text-decoration: underline;
  }
}
