/**
 * The Home End LMS - Exact Brand Identity & Stylesheet
 * Synchronised directly with thehomeend.co.uk design system.
 * British English conventions used throughout.
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Roboto:wght@400;500;700;800;900&display=swap');

:root {
  /* The Home End Official Palette */
  --brand-navy: #122232;
  --brand-orange: #FF6633;
  --brand-green: #46C273;
  --brand-light: #FFEAD5;
  --brand-text: #7A7A7A;

  --background: #ffffff;
  --foreground: #122232;
  --primary: #FF6633;
  --primary-hover: #e65c2e;
  --secondary: #122232;
  --secondary-hover: #0d1a26;
  --accent: #46C273;
  --border: rgba(18, 34, 50, 0.1);
  --glass-bg: rgba(255, 255, 255, 0.9);

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --font-heading: 'Roboto', 'Inter', sans-serif;
}

/* Global Reset & Typography */
* {
  box-sizing: border-box;
}

body {
  background-color: var(--background);
  color: var(--foreground);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4, h5, h6 {
  line-height: 1.2;
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--brand-navy);
  font-family: var(--font-heading);
}

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

a:hover {
  color: var(--primary-hover);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
  width: 100%;
}

/* Hello Elementor Overrides */
.page-template-elementor_header_footer .entry-header {
  display: none !important;
}

.page-template-elementor_header_footer .site-main,
.page-template-elementor_header_footer .page-content {
  padding: 0 !important;
  margin: 0 !important;
  max-width: 100% !important;
}

/* Global Reset & Overflow Protection */
html, body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Exact Header Styles - Strictly 100% Full Width */
header.site-header,
.site-header,
.site-header:not(.dynamic-header),
.site-header.header-full-width {
  width: 100% !important;
  max-width: 100% !important;
  position: relative !important;
  z-index: 50 !important;
  display: block !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.top-bar {
  background-color: var(--brand-orange);
  height: 25px;
  width: 100%;
}

.main-bar {
  background-color: var(--brand-light);
  height: 135px;
  width: 100%;
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  position: relative;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 2rem;
}

.logo-container {
  position: absolute;
  top: -25px; /* Overlaps into the orange top bar */
  left: 20px;
  z-index: 10;
}

.logo-container img {
  width: 145px;
  height: auto;
  display: block;
}

.primary-nav {
  margin-left: 190px;
  display: flex;
  gap: 2.25rem;
}

.primary-nav .nav-item {
  color: var(--brand-navy);
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}

.primary-nav .nav-item:hover {
  color: var(--brand-orange);
}

.header-actions {
  display: flex;
  align-items: center;
}

.sub-bar {
  background-color: var(--brand-navy);
  height: 40px;
  width: 100%;
  display: flex;
  align-items: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sub-nav-container {
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  justify-content: center;
  gap: 3.5rem;
}

.sub-nav-container a {
  color: #ffffff;
  font-family: var(--font-heading);
  font-size: 14px;
  font-weight: 400;
  transition: opacity 0.2s;
}

.sub-nav-container a:hover {
  opacity: 0.8;
  color: var(--brand-orange);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.75rem;
  border-radius: 6px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  font-size: 1rem;
  line-height: 1.25;
  text-decoration: none;
  font-family: var(--font-heading);
}

.btn-primary {
  background-color: var(--brand-orange);
  color: #fff !important;
  box-shadow: 0 4px 14px 0 rgba(255, 102, 51, 0.39);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(255, 102, 51, 0.5);
  color: #fff !important;
}

.btn-accent {
  background-color: var(--brand-green);
  color: #ffffff !important;
}

.btn-accent:hover {
  background-color: #3bb262;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(70, 194, 115, 0.4);
  color: #ffffff !important;
}

.btn-secondary {
  background-color: var(--brand-navy);
  color: #fff !important;
}

.btn-secondary:hover {
  background-color: #0d1a26;
  transform: translateY(-2px);
  color: #fff !important;
}

.btn-outline {
  background: transparent;
  color: var(--brand-navy) !important;
  border: 1.5px solid var(--border);
}

.btn-outline:hover {
  border-color: var(--brand-orange);
  color: var(--brand-orange) !important;
}

/* Hero Section */
.hero-section {
  position: relative;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--brand-navy);
  text-align: center;
  padding: 5.5rem 2rem 6rem;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 900px;
  width: 100%;
}

.hero-title {
  color: #ffffff;
  font-size: clamp(2.25rem, 4vw, 3.25rem);
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.25rem;
}

.hero-subtitle {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.hero-description {
  color: #cbd5e1;
  font-size: 1.05rem;
  font-weight: 400;
  margin-bottom: 2.5rem;
  opacity: 0.95;
  line-height: 1.6;
}

.hero-buttons {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

/* Features / Onboarding Section (Cream Background) */
.features-section {
  background-color: var(--brand-light);
  padding: 6rem 0;
  border-bottom: 1px solid var(--border);
}

.features-title {
  text-align: center;
  font-size: 2.5rem;
  margin-bottom: 1rem;
  color: var(--brand-navy);
}

.features-subtitle {
  text-align: center;
  font-size: 1.15rem;
  color: var(--brand-text);
  max-width: 650px;
  margin: 0 auto 4rem;
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  width: 100%;
}

.feature-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 3rem 2rem;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(255, 102, 51, 0.15);
  border-color: rgba(255, 102, 51, 0.5);
}

.feature-icon {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 70px;
  height: 70px;
  margin: 0 auto 1.5rem;
  background-color: rgba(255, 102, 51, 0.1);
  border-radius: 50%;
  color: var(--brand-orange);
  transition: transform 0.3s ease, background-color 0.3s ease;
}

.feature-card:hover .feature-icon {
  transform: scale(1.1);
  background-color: var(--brand-orange);
  color: #ffffff;
}

.feature-icon svg {
  width: 32px;
  height: 32px;
}

.feature-heading {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 1px;
  color: var(--brand-navy);
  margin-bottom: 1rem;
}

.feature-text {
  color: var(--brand-text);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
}

/* Programmes & Courses Section */
.courses-section {
  padding: 6rem 0;
  background-color: #ffffff;
}

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

.section-title {
  font-size: 2.25rem;
  color: var(--brand-navy);
  margin-bottom: 0.75rem;
}

.section-desc {
  font-size: 1.1rem;
  color: var(--brand-text);
  max-width: 600px;
  margin: 0 auto;
}

/* Support Section */
.support-section {
  padding: 5rem 0 6rem;
  background-color: var(--background);
}

.support-card {
  background: #ffffff;
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 3.5rem 2rem;
  text-align: center;
  box-shadow: 0 4px 12px rgba(18, 34, 50, 0.06);
  max-width: 800px;
  margin: 0 auto;
}

.support-card h3 {
  font-size: 1.75rem;
  color: var(--brand-navy);
  margin-bottom: 1rem;
}

.support-card p {
  color: var(--brand-text);
  font-size: 1.05rem;
  max-width: 580px;
  margin: 0 auto 2rem;
  line-height: 1.6;
}

/* Site Footer - Strictly 100% Full Width */
footer.site-footer,
.site-footer,
.site-footer:not(.dynamic-footer),
.site-footer.footer-full-width {
  width: 100% !important;
  max-width: 100% !important;
  background-color: var(--brand-navy) !important;
  color: #ffffff !important;
  padding: 4.5rem 0 2.5rem !important;
  margin: 0 !important;
  margin-top: auto !important;
  box-sizing: border-box !important;
  display: block !important;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3.5rem;
  margin-bottom: 3rem;
}

.footer-logo {
  font-size: 2rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 1rem;
}

.footer-description {
  color: #cbd5e1;
  max-width: 480px;
  line-height: 1.6;
  font-size: 0.95rem;
  margin: 0;
}

.footer-links h3 {
  font-size: 1.15rem;
  color: #ffffff;
  margin-bottom: 1.25rem;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 0.75rem;
}

.footer-links a {
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--brand-orange);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 2rem;
  text-align: center;
  color: #94a3b8;
  font-size: 0.85rem;
}

/* LearnDash Focus Mode Customisation */
.learndash-wrapper .ld-focus-header {
  background-color: var(--brand-navy) !important;
  color: #ffffff !important;
}

.learndash-wrapper .ld-focus-header a {
  color: #ffffff !important;
}

.learndash-wrapper .ld-progress-bar-percentage {
  background-color: var(--brand-orange) !important;
}

.learndash-wrapper .ld-button:not(.ld-button-reverse) {
  background-color: var(--brand-orange) !important;
  border-radius: 6px !important;
  box-shadow: 0 4px 14px 0 rgba(255, 102, 51, 0.39) !important;
}

/* Responsive adjustments */
@media (max-width: 900px) {
  .logo-container {
    position: static;
    top: 0;
    margin-bottom: 1rem;
  }
  .main-bar {
    height: auto;
    padding: 1.5rem 0;
  }
  .header-container {
    flex-direction: column;
    gap: 1rem;
  }
  .primary-nav {
    margin-left: 0;
    flex-wrap: wrap;
    justify-content: center;
  }
  .sub-bar {
    display: none;
  }
  .footer-grid {
    grid-template-columns: 1fr;
  }
}
