/* ============================================================
   AgroSolar — styles.css
   Mobile-first, Vanilla CSS, RTL Hebrew
   ============================================================ */

/* ── CSS Variables ─────────────────────────────────────────── */
:root {
  --color-primary: #1a3a2a;
  --color-accent: #E8A020;
  --color-bg: #ffffff;
  --color-bg-alt: #f7f5f0;
  --color-text: #1a1a1a;
  --color-text-secondary: #666666;
  --color-border: #e5e5e5;

  --font-family: 'Heebo', sans-serif;
  --font-size-base: 18px;
  --line-height: 1.6;

  --max-width: 1100px;
  --section-padding: 80px 24px;
  --section-padding-mobile: 56px 20px;
}

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

html {
  scroll-behavior: smooth;
  font-size: var(--font-size-base);
}

body {
  font-family: var(--font-family);
  font-size: var(--font-size-base);
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  direction: rtl;
  text-align: right;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

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

ul, ol {
  list-style: none;
}

/* ── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
}

h1 {
  font-size: 36px;
  font-weight: 900;
}

h2 {
  font-size: 28px;
  font-weight: 700;
}

h3 {
  font-size: 22px;
  font-weight: 700;
}

p {
  font-size: 17px;
  line-height: var(--line-height);
}

@media (min-width: 768px) {
  h1 { font-size: 46px; }
  h2 { font-size: 34px; }
  h3 { font-size: 24px; }
  p  { font-size: var(--font-size-base); }
}

@media (min-width: 1024px) {
  h1 { font-size: 56px; }
  h2 { font-size: 40px; }
}

/* ── Layout helpers ─────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 20px;
}

@media (min-width: 768px) {
  .container {
    padding-inline: 24px;
  }
}

/* ── CTA Button ─────────────────────────────────────────────── */
.cta-button {
  display: inline-block;
  background-color: var(--color-accent);
  color: #1a1a1a;
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: 700;
  padding: 18px 32px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  min-height: 48px;
  transition: background-color 200ms ease, transform 200ms ease;
  line-height: 1.3;
  text-align: center;
}

.cta-button:hover,
.cta-button:focus-visible {
  background-color: #c8881a;
  transform: translateY(-2px);
}

.cta-button:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
}

.cta-button:disabled {
  opacity: 0.65;
  cursor: not-allowed;
  transform: none;
}

@media (min-width: 768px) {
  .cta-button {
    font-size: 20px;
    padding: 18px 40px;
  }
}

/* ── Section shared ─────────────────────────────────────────── */
section {
  padding: var(--section-padding-mobile);
}

@media (min-width: 768px) {
  section {
    padding: var(--section-padding);
  }
}

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 600px;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  background-color: var(--color-primary);
}

@media (min-width: 1024px) {
  .hero {
    height: 90vh;
  }
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(26, 58, 42, 0.65);
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: #ffffff;
  padding: 24px 20px;
  max-width: 860px;
  width: 100%;
}

.hero__title {
  color: #ffffff;
  margin-bottom: 24px;
}

.hero__title .accent {
  color: var(--color-accent);
}

.hero__subtitle {
  font-size: 19px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 40px;
  max-width: 640px;
  margin-inline: auto;
  margin-bottom: 40px;
  line-height: 1.6;
}

@media (min-width: 768px) {
  .hero__content {
    padding: 32px 24px;
  }

  .hero__subtitle {
    font-size: 22px;
  }
}

/* ============================================================
   TAGLINE SECTION (4.2)
   ============================================================ */
.tagline {
  background-color: var(--color-bg);
  text-align: center;
}

.tagline__inner {
  max-width: 800px;
  margin-inline: auto;
}

.tagline h2 {
  color: var(--color-primary);
  font-weight: 700;
}

/* ============================================================
   VALUE PROPS (4.3)
   ============================================================ */
.value-props {
  background-color: var(--color-bg-alt);
}

.value-props__heading {
  text-align: center;
  color: var(--color-primary);
  margin-bottom: 48px;
}

.value-props__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .value-props__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
  }
}

.value-card {
  background: var(--color-bg);
  padding: 40px 32px;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  text-align: right;
}

.value-card__icon {
  font-size: 72px;
  line-height: 1;
  margin-bottom: 20px;
  display: block;
}

.value-card h3 {
  color: var(--color-primary);
  margin-bottom: 12px;
}

.value-card p {
  color: var(--color-text-secondary);
}

/* ============================================================
   HOW IT WORKS (4.4)
   ============================================================ */
.how-it-works {
  background-color: var(--color-bg);
}

.how-it-works__heading {
  text-align: center;
  color: var(--color-primary);
  margin-bottom: 48px;
}

.steps {
  display: flex;
  flex-direction: column;
  gap: 32px;
  max-width: 860px;
  margin-inline: auto;
  position: relative;
}

@media (min-width: 768px) {
  .steps {
    flex-direction: row;
    align-items: flex-start;
    gap: 16px;
  }
}

.step {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
  flex: 1;
  position: relative;
}

@media (min-width: 768px) {
  .step {
    align-items: center;
    text-align: center;
  }
  /* connector line between steps */
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 28px;
    left: -8px;
    width: 16px;
    height: 2px;
    background: var(--color-border);
  }
}

.step__number {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #ffffff;
  font-size: 24px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step h3 {
  color: var(--color-primary);
  margin-bottom: 4px;
}

.step p {
  color: var(--color-text-secondary);
  font-size: 17px;
}

/* ============================================================
   FAQ (4.5)
   ============================================================ */
.faq {
  background-color: var(--color-bg-alt);
}

.faq__heading {
  text-align: center;
  color: var(--color-primary);
  margin-bottom: 8px;
}

.faq__subheading {
  text-align: center;
  font-size: 18px;
  color: var(--color-text-secondary);
  font-style: italic;
  margin-bottom: 40px;
}

.faq__list {
  max-width: 800px;
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* accordion */
details.faq-item {
  background: var(--color-bg);
  border-radius: 12px;
  padding: 0;
  transition: box-shadow 200ms ease;
}

details.faq-item:hover {
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

details.faq-item summary {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-primary);
  cursor: pointer;
  padding: 24px 28px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  border-radius: 12px;
  user-select: none;
  -webkit-user-select: none;
}

/* Hide native marker */
details.faq-item summary::marker,
details.faq-item summary::-webkit-details-marker {
  display: none;
}

/* + / − icon on the left side (RTL = end of row visually on left) */
details.faq-item summary::after {
  content: '+';
  font-size: 24px;
  font-weight: 400;
  color: var(--color-accent);
  flex-shrink: 0;
  line-height: 1;
  margin-right: auto;
  margin-left: 0;
}

details[open].faq-item summary::after {
  content: '−';
}

details.faq-item summary:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: -3px;
  border-radius: 12px;
}

.faq-item__body {
  padding: 0 28px 24px;
  font-size: 17px;
  line-height: 1.7;
  color: var(--color-text);
  border-top: 1px solid var(--color-border);
  padding-top: 16px;
}

.faq-item__body p + p {
  margin-top: 12px;
}

.faq-item__body strong {
  font-weight: 700;
  color: var(--color-primary);
}

@media (min-width: 768px) {
  details.faq-item summary {
    font-size: 20px;
  }
}

/* ============================================================
   FORM SECTION (4.6)
   ============================================================ */
.form-section {
  background-color: var(--color-primary);
  padding: 64px 20px;
}

@media (min-width: 768px) {
  .form-section {
    padding: 100px 24px;
  }
}

.form-section__heading {
  color: #ffffff;
  text-align: center;
  margin-bottom: 16px;
}

.form-section__sub {
  color: rgba(255, 255, 255, 0.85);
  text-align: center;
  font-size: 18px;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 48px;
  line-height: 1.6;
}

.form-section__sub strong {
  font-weight: 700;
}

/* Form card */
.form-card {
  background: var(--color-bg);
  border-radius: 16px;
  padding: 36px 24px;
  max-width: 560px;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .form-card {
    padding: 48px 40px;
  }
}

/* Form fields */
.form-field {
  margin-bottom: 24px;
}

.form-field label,
.form-field legend {
  display: block;
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text);
  margin-bottom: 8px;
}

.form-field fieldset {
  border: none;
  padding: 0;
}

.form-field input[type="text"],
.form-field input[type="tel"] {
  width: 100%;
  height: 56px;
  font-family: var(--font-family);
  font-size: 18px;
  padding: 16px;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 200ms ease, box-shadow 200ms ease;
  direction: rtl;
  text-align: right;
  -webkit-appearance: none;
  appearance: none;
}

.form-field input[type="text"]:focus,
.form-field input[type="tel"]:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(232, 160, 32, 0.2);
}

.form-field input[type="text"]::placeholder,
.form-field input[type="tel"]::placeholder {
  color: #aaaaaa;
}

/* Field hint */
.field-hint {
  font-size: 14px;
  color: var(--color-text-secondary);
  margin-bottom: 12px;
  line-height: 1.5;
}

/* Radio cards */
.radio-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

@media (min-width: 480px) {
  .radio-cards {
    flex-direction: row;
    gap: 12px;
  }
}

label.radio-card {
  flex: 1;
  cursor: pointer;
  position: relative;
}

label.radio-card input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

label.radio-card span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 12px 16px;
  border: 2px solid var(--color-border);
  border-radius: 8px;
  font-size: 17px;
  font-weight: 500;
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 200ms ease, background-color 200ms ease;
  text-align: center;
}

label.radio-card:hover span {
  border-color: var(--color-primary);
}

label.radio-card input[type="radio"]:checked ~ span {
  border-color: var(--color-primary);
  background-color: #e8f0eb;
  color: var(--color-primary);
  font-weight: 700;
}

label.radio-card input[type="radio"]:focus-visible ~ span {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}

/* Error messages */
.error-message {
  display: block;
  font-size: 14px;
  color: #c0392b;
  margin-top: 6px;
  min-height: 20px;
}

/* Form-level error */
.form-error {
  background: #fdf0ee;
  border: 1px solid #e74c3c;
  border-radius: 8px;
  padding: 14px 16px;
  font-size: 16px;
  color: #c0392b;
  margin-top: 16px;
  line-height: 1.5;
}

/* Submit button */
#submit-btn {
  width: 100%;
  margin-top: 8px;
  font-size: 18px;
}

@media (min-width: 768px) {
  #submit-btn {
    font-size: 20px;
  }
}

/* Success message */
.form-success {
  background: var(--color-bg);
  border-radius: 16px;
  padding: 48px 32px;
  max-width: 560px;
  margin-inline: auto;
  text-align: center;
  color: var(--color-text);
}

.form-success h3 {
  font-size: 28px;
  color: var(--color-primary);
  margin-bottom: 16px;
}

.form-success p {
  font-size: 18px;
  margin-bottom: 12px;
  line-height: 1.6;
}

.form-success a {
  color: var(--color-primary);
  font-weight: 700;
  text-decoration: underline;
}

/* ============================================================
   FOOTER (4.7)
   ============================================================ */
footer {
  background-color: var(--color-primary);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 48px 24px;
  text-align: center;
}

.footer__profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  overflow: hidden;
  margin-inline: auto;
  margin-bottom: 20px;
  border: 3px solid rgba(255, 255, 255, 0.2);
}

.footer__profile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.footer__name {
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 4px;
}

.footer__role {
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  margin-bottom: 16px;
}

.footer__contact {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.footer__phone {
  color: #ffffff;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.footer__phone:hover {
  color: var(--color-accent);
}

.footer__wa-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background-color: #25D366;
  border-radius: 50%;
  flex-shrink: 0;
  transition: opacity 200ms ease;
}

.footer__wa-link:hover {
  opacity: 0.85;
}

.footer__wa-link svg {
  width: 22px;
  height: 22px;
}

.footer__copy {
  color: rgba(255, 255, 255, 0.45);
  font-size: 14px;
}

/* ============================================================
   WHATSAPP FLOAT BUTTON (3.3 / 6.4)
   ============================================================ */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  left: 24px;
  z-index: 1000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #25D366;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  opacity: 0;
  pointer-events: none;
  transition: opacity 300ms ease, transform 200ms ease;
}

.whatsapp-float.visible {
  opacity: 1;
  pointer-events: auto;
}

.whatsapp-float:hover {
  transform: scale(1.08);
}

.whatsapp-float svg {
  width: 32px;
  height: 32px;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }

  html {
    scroll-behavior: auto;
  }
}

/* ============================================================
   UTILITY
   ============================================================ */
[hidden] {
  display: none !important;
}
