@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@400;500;600;700&family=Playfair+Display:wght@600;700&display=swap');

:root {
  --purple: #32105f;
  --deep-purple: #1b0835;
  --gold: #e9b949;
  --light-gold: #fff4d5;
  --white: #ffffff;
  --dark: #171321;
  --muted: #706b78;
  --light: #faf9fc;
  --border: #ece8f2;
  --shadow: 0 15px 45px rgba(35, 14, 62, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  font-family: 'DM Sans', sans-serif;
  color: var(--dark);
  background: var(--white);
  line-height: 1.6;
}

img {
  display: block;
  width: 100%;
  max-width: 100%;
  object-fit: cover;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.container {
  width: min(1140px, 90%);
  margin-inline: auto;
}

/* =========================
   LOADER
========================= */

.loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 12px;
  color: var(--gold);
  background: var(--deep-purple);
  transition: opacity 0.6s ease, visibility 0.6s ease;
}

.loader.hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.loader-ring {
  width: 45px;
  height: 45px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: rotate 1s linear infinite;
}

@keyframes rotate {
  to {
    transform: rotate(360deg);
  }
}

/* =========================
   HEADER AND NAVIGATION
========================= */

.header {
  position: fixed;
  top: 0;
  z-index: 1000;
  width: 100%;
  padding: 17px 0;
  color: var(--white);
  transition: padding 0.3s ease, background 0.3s ease,
    box-shadow 0.3s ease;
}

.header.scrolled {
  padding: 10px 0;
  background: var(--deep-purple);
  box-shadow: 0 5px 25px rgba(0, 0, 0, 0.15);
}

.nav-wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  letter-spacing: 0.8px;
}

.logo img {
  width: 45px;
  height: 45px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  object-fit: cover;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 25px;
  margin-left: auto;
}

.nav-link {
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.88rem;
  transition: color 0.3s ease;
}

.nav-link:hover,
.nav-link.active {
  color: var(--gold);
}

.nav-button,
.primary-button,
.gold-button,
.outline-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 13px 20px;
  border-radius: 4px;
  font-size: 0.87rem;
  font-weight: 700;
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease,
    border-color 0.3s ease;
}

.nav-button,
.primary-button,
.gold-button {
  color: var(--deep-purple);
  background: var(--gold);
}

.nav-button:hover,
.primary-button:hover,
.gold-button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(233, 185, 73, 0.25);
}

.outline-button {
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.65);
}

.outline-button:hover {
  color: var(--gold);
  border-color: var(--gold);
}

.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  padding: 0;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 4px;
  outline: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
}

.menu-toggle:hover,
.menu-toggle:focus {
  color: var(--gold);
  border-color: var(--gold);
}

/* =========================
   HERO SLIDER
========================= */

.hero {
  position: relative;
  min-height: 720px;
  overflow: hidden;
  color: var(--white);
  background: var(--deep-purple);
}

.hero-slider {
  position: relative;
  min-height: 720px;
}

.hero-slide {
  position: absolute;
  inset: 0;
  min-height: 720px;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.8s ease, visibility 0.8s ease;
}

.hero-slide.active {
  position: relative;
  opacity: 1;
  visibility: visible;
}

.slide-image {
  position: absolute;
  inset: 0;
  background: var(--deep-purple);
}

.slide-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  opacity: 0.38;
}

.slide-image::after {
  position: absolute;
  inset: 0;
  content: '';
  background: linear-gradient(
    90deg,
    rgba(27, 8, 53, 0.96),
    rgba(27, 8, 53, 0.5),
    rgba(27, 8, 53, 0.25)
  );
}

.slide-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  min-height: 720px;
  max-width: 1140px;
  margin-inline: auto;
  padding-inline: 5%;
}

.eyebrow,
.section-label {
  display: inline-block;
  margin-bottom: 15px;
  color: var(--gold);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.eyebrow i {
  margin-right: 5px;
}

.hero h1,
h2 {
  font-family: 'Playfair Display', serif;
  line-height: 1.15;
}

.hero h1 {
  max-width: 700px;
  font-size: clamp(2.7rem, 6vw, 5rem);
}

.hero h1 span,
h2 span {
  color: var(--gold);
}

.hero p {
  max-width: 570px;
  margin: 22px 0 30px;
  color: rgba(255, 255, 255, 0.8);
  font-size: 1.08rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.slider-controls {
  position: absolute;
  bottom: 38px;
  left: 50%;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 14px;
  transform: translateX(-50%);
}

.slider-controls button {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  padding: 0;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  outline: none;
  background: transparent;
}

.slider-controls button:hover,
.slider-controls button:focus {
  color: var(--gold);
  border-color: var(--gold);
}

.slider-dots {
  display: flex;
  gap: 7px;
}

.dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.dot.active {
  width: 25px;
  border-radius: 10px;
  background: var(--gold);
}

/* =========================
   TRUST BAR AND SECTIONS
========================= */

.trust-bar {
  padding: 22px 0;
  background: var(--gold);
}

.trust-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.trust-grid div {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  font-size: 0.9rem;
  font-weight: 700;
}

.trust-grid i {
  font-size: 1.35rem;
}

.section {
  padding: 100px 0;
}

.about-grid,
.contact-grid,
.lumos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 80px;
}

.about-visual {
  position: relative;
  max-width: 460px;
}

.about-image-main {
  height: 500px;
  overflow: hidden;
  border-radius: 5px;
}

.about-image-main img {
  height: 100%;
}

.experience-card {
  position: absolute;
  right: -35px;
  bottom: 35px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 20px;
  color: var(--white);
  background: var(--purple);
  box-shadow: var(--shadow);
}

.experience-card strong {
  color: var(--gold);
  font-size: 2rem;
}

.experience-card span {
  font-size: 0.8rem;
  line-height: 1.3;
}

h2 {
  margin-bottom: 18px;
  font-size: clamp(2rem, 4vw, 3.3rem);
}

.about-content p,
.section-heading p,
.contact-content > p {
  margin-bottom: 15px;
  color: var(--muted);
}

.about-list {
  display: grid;
  gap: 10px;
  margin: 25px 0 30px;
  font-weight: 600;
}

.about-list i {
  margin-right: 8px;
  color: var(--gold);
}

.services-section,
.contact-section {
  background: var(--light);
}

.section-heading {
  max-width: 650px;
  margin: 0 auto 45px;
  text-align: center;
}

/* =========================
   SERVICES
========================= */

.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.service-card {
  padding: 30px 25px;
  background: var(--white);
  border-bottom: 3px solid transparent;
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, border-color 0.3s ease;
}

.service-card:hover {
  border-bottom-color: var(--gold);
  transform: translateY(-8px);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 57px;
  height: 57px;
  margin-bottom: 22px;
  color: var(--gold);
  background: var(--light-gold);
  font-size: 1.7rem;
}

.service-card h3 {
  margin-bottom: 10px;
}

.service-card p {
  min-height: 95px;
  color: var(--muted);
  font-size: 0.9rem;
}

.service-card a {
  color: var(--purple);
  font-size: 0.85rem;
  font-weight: 700;
}

/* =========================
   PRODUCTS
========================= */

.products-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.product-card {
  position: relative;
  height: 390px;
  overflow: hidden;
  border-radius: 5px;
  background: var(--deep-purple);
}

.product-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transition: transform 0.5s ease;
}

.product-card:hover img {
  transform: scale(1.08);
}

.product-card::after {
  position: absolute;
  inset: 35% 0 0;
  content: '';
  background: linear-gradient(transparent, rgba(27, 8, 53, 0.9));
}

.product-overlay {
  position: absolute;
  right: 25px;
  bottom: 25px;
  left: 25px;
  z-index: 2;
  color: var(--white);
}

.product-overlay p {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.9rem;
}

/* =========================
   LUMOS AND CTA
========================= */

.lumos-section,
.cta-section {
  color: var(--white);
  background: var(--purple);
}

.lumos-content p {
  max-width: 530px;
  color: rgba(255, 255, 255, 0.75);
}

.light-label {
  color: var(--gold);
}

.payment-options {
  display: flex;
  flex-wrap: wrap;
  gap: 15px;
  margin: 28px 0;
}

.payment-options div {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 20px;
  border: 1px solid rgba(255, 255, 255, 0.25);
}

.payment-options strong {
  color: var(--gold);
  font-size: 1.6rem;
}

.payment-options span {
  font-size: 0.8rem;
}

.lumos-image {
  max-width: 400px;
  margin-left: auto;
  overflow: hidden;
  border-radius: 5px;
}

.lumos-image img {
  aspect-ratio: 4 / 5;
  object-position: center;
}

.cta-section {
  text-align: center;
  background: linear-gradient(120deg, var(--deep-purple), var(--purple));
}

.cta-content p {
  margin: 0 auto 25px;
  color: rgba(255, 255, 255, 0.75);
}

/* =========================
   CONTACT
========================= */

.contact-grid {
  align-items: start;
}

.contact-info {
  display: grid;
  gap: 20px;
  margin-top: 30px;
}

.contact-item {
  display: flex;
  gap: 15px;
}

.contact-item > i {
  color: var(--gold);
  font-size: 1.5rem;
}

.contact-item strong {
  color: var(--purple);
}

.contact-item p {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.9rem;
}

.contact-item a:hover {
  color: var(--purple);
}

.contact-form {
  padding: 35px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.form-group {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}

.form-group label {
  color: var(--purple);
  font-size: 0.83rem;
  font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 13px 14px;
  color: var(--dark);
  border: 1px solid var(--border);
  outline: 0;
  background: var(--light);
  resize: vertical;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
}

/* =========================
   FOOTER
========================= */

.footer {
  padding-top: 60px;
  color: rgba(255, 255, 255, 0.75);
  background: var(--deep-purple);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 50px;
  padding-bottom: 50px;
}

.footer-brand .logo {
  margin-bottom: 18px;
  color: var(--white);
}

.footer-brand p {
  max-width: 300px;
  font-size: 0.9rem;
}

.footer-column {
  display: grid;
  align-content: start;
  gap: 10px;
  font-size: 0.88rem;
}

.footer-column h3 {
  margin-bottom: 8px;
  color: var(--gold);
  font-size: 1rem;
}

.footer-column a:hover {
  color: var(--gold);
}

.footer-bottom {
  padding: 18px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
}

/* =========================
   FLOATING WHATSAPP BUTTON
========================= */

.whatsapp-button {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 50;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  color: var(--white);
  border-radius: 50%;
  background: #25d366;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  font-size: 1.7rem;
  transition: transform 0.3s ease;
}

.whatsapp-button:hover {
  color: var(--white);
  transform: scale(1.08);
}

/* =========================
   SCROLL REVEAL
========================= */

/*
  Both .visible and .show are supported.
  This prevents a class-name mismatch
  between CSS and main.js from hiding content.
*/

.reveal {
  opacity: 0;
  visibility: hidden;
  transform: translateY(30px);
  transition:
    opacity 0.8s ease,
    visibility 0.8s ease,
    transform 0.8s ease;
}

.reveal.visible,
.reveal.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* If JavaScript is disabled, content remains visible */
.no-js .reveal {
  opacity: 1;
  visibility: visible;
  transform: none;
}

/* =========================
   TABLET
========================= */

@media (max-width: 900px) {
  .nav-menu {
    position: absolute;
    top: 78px;
    right: 5%;
    left: 5%;
    display: none;
    padding: 20px;
    background: var(--deep-purple);
    box-shadow: var(--shadow);
  }

  .nav-menu.show,
  .nav-menu.open {
    display: grid;
    gap: 18px;
  }

  .nav-link {
    display: block;
    padding: 4px 0;
  }

  .nav-button {
    display: none;
  }

  .menu-toggle {
    display: grid;
    place-items: center;
  }

  .trust-grid,
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .about-grid,
  .contact-grid,
  .lumos-grid {
    gap: 45px;
  }

  .services-grid {
    gap: 15px;
  }
}

/* =========================
   MOBILE
========================= */

@media (max-width: 650px) {
  .container {
    width: min(92%, 1140px);
  }

  .hero,
  .hero-slider,
  .hero-slide,
  .slide-content {
    min-height: 700px;
  }

  .slide-content {
    padding-inline: 4%;
  }

  .slide-image img {
    width: 100%;
    height: 100%;
    object-position: center;
  }

  .slide-image::after {
    background: linear-gradient(
      90deg,
      rgba(27, 8, 53, 0.92),
      rgba(27, 8, 53, 0.48)
    );
  }

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

  .hero p {
    font-size: 0.95rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
    width: 100%;
    max-width: 280px;
  }

  .hero-actions a {
    width: 100%;
  }

  .slider-controls {
    bottom: 25px;
  }

  .trust-grid,
  .services-grid,
  .products-grid,
  .footer-grid,
  .about-grid,
  .contact-grid,
  .lumos-grid {
    grid-template-columns: 1fr;
  }

  .trust-grid {
    gap: 14px;
  }

  .trust-grid div {
    justify-content: flex-start;
  }

  .section {
    padding: 70px 0;
  }

  .section-heading {
    margin-bottom: 35px;
  }

  .about-visual {
    margin: 0 auto;
  }

  .about-image-main {
    height: 390px;
  }

  .experience-card {
    right: 12px;
    bottom: 20px;
  }

  .products-grid {
    gap: 18px;
  }

  .product-card {
    height: 350px;
  }

  .lumos-image {
    margin: 0 auto;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form {
    padding: 25px 20px;
  }

  .footer-grid {
    gap: 30px;
  }

  .whatsapp-button {
    right: 16px;
    bottom: 16px;
    width: 50px;
    height: 50px;
    font-size: 1.5rem;
  }
}

/* =========================
   ACCESSIBILITY
========================= */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal.visible,
  .reveal.show {
    opacity: 1;
    visibility: visible;
    transform: none;
  }
}

/* =========================
   SOLAR TRAINING & PARTNERSHIPS
   Google Forms links are configured in index.html.
========================= */
.training-section,
.partnership-section { scroll-margin-top: 100px; }
.training-section { background: var(--white); }
.training-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.training-grid > *, .partnership-grid > * { min-width: 0; }
.training-section .section-label,
.partnership-section .section-label { color: var(--purple); font-size: .875rem; }
.training-copy h2 span,
.partnership-heading h2 span { color: var(--purple); }
.training-copy > p { color: var(--muted); margin-bottom: 20px; }
.training-copy .training-audience { padding-left: 18px; border-left: 3px solid var(--gold); color: var(--dark); margin: 24px 0 28px; }
.training-panel { background: var(--deep-purple); color: var(--white); padding: 38px; border-radius: 6px; border-top: 4px solid var(--gold); }
.training-panel-label { color: var(--gold); font-size: .875rem; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; }
.training-panel > h3 { margin: 10px 0 26px; font-size: 1.5rem; line-height: 1.35; }
.training-topics { list-style: none; }
.training-topics li { display: flex; gap: 18px; padding: 22px 0; border-top: 1px solid rgba(255,255,255,.16); }
.training-topics li:last-child { padding-bottom: 0; }
.topic-number { color: var(--gold); font-size: .875rem; font-weight: 700; padding-top: 3px; flex: 0 0 24px; }
.training-topics h4 { font-size: 1.0625rem; margin-bottom: 6px; }
.training-topics p { color: #d7cfdf; font-size: 1rem; }
.opportunity-button { min-height: 48px; font-size: 1rem; text-align: center; }
.opportunity-button:focus-visible { outline: 3px solid var(--purple); outline-offset: 5px; }
.training-copy .opportunity-note,
.opportunity-note { margin: 12px 0 0; max-width: 390px; font-size: .875rem; line-height: 1.6; color: var(--muted); }
.partnership-section { background: var(--light); border-top: 1px solid var(--border); }
.partnership-heading { max-width: 760px; }
.partnership-heading > p { max-width: 650px; margin-inline: auto; }
.partnership-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.partnership-card { display: flex; flex-direction: column; padding: 30px; background: var(--white); border: 1px solid var(--border); border-radius: 6px; }
.partnership-icon { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 24px; color: var(--purple); background: var(--light-gold); font-size: 1.6rem; border-radius: 4px; }
.partnership-card h3 { color: var(--purple); font-size: 1.1875rem; line-height: 1.4; margin-bottom: 12px; }
.partnership-card p { color: var(--muted); margin-bottom: 24px; font-size: 1rem; }
.partnership-detail { border-top: 1px solid var(--border); padding-top: 18px; margin-top: auto; color: var(--purple); font-size: .875rem; font-weight: 700; }
.partnership-registration { display: flex; align-items: center; justify-content: space-between; gap: 32px; margin-top: 30px; padding: 34px; color: var(--white); background: var(--purple); border-radius: 6px; }
.partnership-registration h3 { font-size: 1.25rem; margin-bottom: 8px; }
.partnership-registration > div:first-child { max-width: 570px; }
.partnership-registration p { color: #ded6e9; }
.partnership-action { flex: 0 0 270px; }
.partnership-action .opportunity-button { width: 100%; }
.partnership-action .opportunity-note { text-align: center; }
.partnership-action .opportunity-button:focus-visible { outline-color: var(--gold); }
/* Keep the expanded navigation comfortable before the existing mobile menu. */
@media (min-width: 901px) {
  .nav-menu { gap: 18px; }
  .nav-wrapper { gap: 20px; }
  .nav-link { white-space: nowrap; }
}
@media (min-width: 901px) and (max-width: 1150px) {
  .nav-button { display: none; }
  .nav-menu { gap: 16px; }
}
@media (max-width: 1000px) {
  .training-grid { gap: 32px; }
  .training-panel, .partnership-card { padding: 26px; }
  .partnership-grid { gap: 16px; }
}
@media (max-width: 800px) {
  .training-grid, .partnership-grid { grid-template-columns: 1fr; }
  .training-grid { gap: 36px; }
  .partnership-registration { flex-direction: column; align-items: flex-start; }
  .partnership-action { flex: auto; width: 100%; max-width: 390px; }
}
@media (max-width: 480px) {
  .training-panel, .partnership-card, .partnership-registration { padding: 24px; }
  .training-copy .opportunity-button { width: 100%; }
  .training-topics li { gap: 12px; }
}
