/* ══════════════════════════════════════════
   Home Page
   ══════════════════════════════════════════ */

/* ── Shared utilities ── */
.required-star { color: var(--red-alert); }
.eye-hidden--off { display: none; }

/* ── Hero Section ── */
.hero-section {
  position: relative;
  min-height: 480px;
  background: var(--nav-dark);
  display: flex;
  align-items: stretch;
  overflow: visible;
  padding-bottom: 40px;
}

.hero-section .hero-bg {
  position: absolute;
  inset: 0;
  background: var(--nav-dark) url("/static/images/hero-bg.04d42f1dd7eb.jpg") center/cover no-repeat;
}

.hero-section .hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to right, rgba(0,5,37,0.85) 0%, rgba(0,5,37,0.6) 40%, rgba(0,5,37,0.2) 70%, rgba(0,5,37,0) 100%);
}

.hero-inner {
  position: relative;
  z-index: var(--z-hero-content, 2);
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 92px 64px 0;
  box-sizing: border-box;
  overflow: visible;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 40px;
}

.hero-content {
  flex: 1 0 0;
  min-width: 425px;
  max-width: 425px;
  color: #fff;
  display: flex;
  flex-direction: column;
  gap: 40px;
  padding-top: 48px;
}

.hero-signin-container {
  flex: 1 0 0;
  min-width: 428px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 110px;
}

.hero-content .title-block {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.hero-content h1 {
  font-size: 64px;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
  color: var(--baby-blue);
}

.hero-content p {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.5;
  margin: 0;
  color: var(--baby-blue);
  max-width: 370px;
}

.hero-content .button-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.hero-content .not-member {
  font-size: 22px;
  font-weight: 700;
  margin: 0;
  color: #fff;
}

.btn-register-hero {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 10px 24px;
  background: var(--cloud);
  color: var(--primary);
  border: none;
  border-radius: 28.6px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  line-height: 1.25;
  align-self: flex-start;
}

.btn-register-hero:hover {
  background: #fff;
  color: var(--primary);
  text-decoration: none;
}

/* ── Responsive hero ── */
@media (max-width: 1200px) {
  .hero-signin-container { padding-right: 0; }
}

@media (max-width: 991px) {
  .hero-inner {
    padding: 40px 24px 0;
    flex-direction: column;
    gap: 24px;
  }
  .hero-content {
    min-width: 0;
    max-width: 100%;
    padding-top: 0;
  }
  .hero-signin-container {
    min-width: 0;
    width: 100%;
    justify-content: center;
    padding-right: 0;
  }
  .hero-content h1 { font-size: 48px; }
  .hero-content .not-member { font-size: 18px; }
}

@media (max-width: 768px) {
  .home-why-register .home-container { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 575px) {
  .hero-content h1 { font-size: 36px; }
}

/* ── Login Card ── */
.login-card {
  background: #fff;
  border-radius: 24px;
  width: 428px;
  min-width: 428px;
  padding: 40px;
  box-shadow: -2px 7px 68.2px -3px rgba(0,0,0,0.25);
  border: 1px solid rgba(0,0,0,0.06);
  position: relative;
  z-index: var(--z-card, 10);
  box-sizing: border-box;
  overflow: hidden;
}

@media (max-width: 991px) {
  .login-card { width: 100%; min-width: 0; }
}

/* Reset Bootstrap margins inside login card */
.login-card *, .login-card *::before, .login-card *::after { box-sizing: border-box; }
.login-card h1,.login-card h2,.login-card h3,.login-card h4,.login-card h5,
.login-card p,.login-card ul,.login-card ol,.login-card form,.login-card fieldset,
.login-card div:not(.login-field-error):not(.login-message) { margin: 0; padding: 0; }

.login-card h2 { font-size: 30px; font-weight: 700; color: var(--primary); line-height: 1.25; margin-bottom: 40px; }

.login-card .login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-bottom: 24px;
}

.login-card .login-inputs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.login-card .form-group { display: flex; flex-direction: column; gap: 8px; }
.login-card .form-label { display: block; font-size: 16px; font-weight: 700; color: var(--blue-gray); line-height: 1.5; }

.login-card .form-input {
  display: block;
  width: 100%;
  height: 47px;
  padding: 8px 12px;
  border: none;
  border-radius: 5px;
  font-size: 14px;
  font-family: inherit;
  color: var(--nav-dark);
  background: var(--baby-blue);
  transition: background-color 0.2s;
  box-sizing: border-box;
  line-height: normal;
}

.login-card .form-input::placeholder { color: var(--slate); }
.login-card .form-input:hover { background: #e5e7f0; }
.login-card .form-input:focus {
  outline: none;
  background: #e5e7f0;
  box-shadow: 0 0 0 2px var(--blue-light);
}

/* Error state */
.login-card .form-input.rymodal-input-error {
  border: 1px solid var(--red-alert);
}
.login-card .form-input.rymodal-input-error:focus {
  box-shadow: 0 0 0 2px var(--red-alert);
}

/* Inline field error */
.login-field-error {
  display: none;
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--red-alert);
  line-height: 1.5;
  margin-top: 4px;
}

.password-wrapper { position: relative; }

.show-pass {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-light);
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  display: flex;
  align-items: center;
}

.show-pass:hover { color: var(--primary); }
.show-pass svg { width: 16px; height: 16px; display: block; }

.forgot-link {
  font-size: 16px;
  font-weight: 700;
  color: var(--primary);
  text-decoration: none;
  display: block;
  margin: 0;
}

.forgot-link:hover { text-decoration: underline; }

.btn-submit {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  height: 36px;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 28.6px;
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  line-height: 1.25;
  white-space: nowrap;
}

.btn-submit:hover { background: var(--dark-blue); }
.btn-submit:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-submit .spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
  margin-right: 8px;
  vertical-align: middle;
}

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

.not-registered { margin-top: 0; font-size: 16px; color: var(--dark-blue); }
.not-registered a { color: var(--primary); font-weight: 700; text-decoration: none; }
.not-registered a:hover { text-decoration: underline; }

/* ── Messages ── */
.login-message { padding: 10px 14px; border-radius: 6px; font-size: 14px; margin-bottom: 14px; display: none; }
.login-message.show { display: block; }
.login-message.success { background: #f0fdf4; border: 1px solid #bbf7d0; color: #166534; }
.login-message.error { background: #fef2f2; border: 1px solid #fecaca; color: #991b1b; }

/* ── Logged in state ── */
.logged-in-card { text-align: center; }
.logged-in-card h2 { color: var(--primary); font-size: 22px; margin-bottom: 8px; }
.logged-in-card p { color: var(--slate); margin-bottom: 20px; font-size: 14px; }
.logged-in-card .btn-dashboard { display: inline-block; padding: 12px 28px; background: var(--primary); color: #fff; border-radius: 28px; text-decoration: none; font-weight: 700; font-size: 15px; }
.logged-in-card .btn-dashboard:hover { background: var(--dark-blue); color: #fff; }

/* ── Why Register Section ── */
.home-why-register {
  background: #fff;
  padding: 96px 0 60px;
}

/* Shared page container — max-width 1440px centered with 64px gutters */
.home-container {
  max-width: 1440px;
  margin: 0 auto;
  padding-left: 64px;
  padding-right: 64px;
  box-sizing: border-box;
}

.home-why-register h2 {
  font-size: 30px;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 16px;
  line-height: 1.25;
}

.home-why-register .section-desc {
  font-size: 14px;
  color: var(--charcoal);
  margin-bottom: 40px;
  line-height: 1.5;
}

/* Feature cards grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  margin-bottom: 40px;
}

@media (max-width: 991px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .feature-grid { grid-template-columns: 1fr; } }

.feature-card {
  background: var(--baby-blue);
  border-radius: 24px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 324px;
  overflow: hidden;
  position: relative;
}

.feature-card .feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #DFE2ED;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
  flex-shrink: 0;
}

.feature-card .feature-icon svg { width: 24px; height: 24px; stroke: var(--primary); fill: none; stroke-width: 2; }
.feature-card h3 { font-size: 20px; font-weight: 700; color: var(--onyx); line-height: 1.25; margin: 0; }

.feature-card .card-illustration {
  position: absolute;
  bottom: 0;
  right: 20px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
}

.feature-card .card-illustration img { width: 100%; height: auto; object-fit: contain; display: block; }

/* Per-card illustration dimensions from Figma */
.feature-grid .feature-card:nth-child(1) .card-illustration { width: 179px; height: 170px; bottom: 0; }
.feature-grid .feature-card:nth-child(2) .card-illustration { width: 154px; height: 140px; }
.feature-grid .feature-card:nth-child(3) .card-illustration { top: 56.79%; right: 7.75%; bottom: 0; left: 44.7%; width: auto; height: auto; }
.feature-grid .feature-card:nth-child(3) .card-illustration img { width: auto; height: 100%; max-height: 100%; object-fit: contain; }
.feature-grid .feature-card:nth-child(4) .card-illustration { width: 289px; height: 169px; right: 0; }

/* More benefits button */
.home-btn-pill {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 10px 24px;
  background: var(--primary);
  color: #fff;
  border-radius: 28.6px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 700;
  border: none;
  line-height: 1.25;
  cursor: pointer;
}

.home-btn-pill:hover { background: var(--dark-blue); color: #fff; text-decoration: none; }

/* ── Help + FAQs Section ── */
.help-faqs {
  background: var(--cloud);
  padding: 64px 0;
}

.help-faqs .inner {
  display: flex;
  gap: 40px;
  align-items: flex-start;
}

@media (max-width: 991px) {
  .help-faqs { padding: 40px 0; }
  .help-faqs .inner { flex-direction: column; }
}

/* Contact card */
.contact-card {
  background: #fff;
  border-radius: 24px;
  padding: 40px;
  width: 538px;
  max-width: 100%;
  flex-shrink: 0;
  box-sizing: border-box;
}

.contact-card h2 { font-size: 30px; font-weight: 700; color: var(--primary); margin-bottom: 40px; line-height: 1.25; }
.contact-card .form-group { margin-bottom: 16px; }
.contact-card .form-label { display: block; font-size: 16px; font-weight: 700; color: var(--dark-blue); margin-bottom: 8px; }

.contact-card .form-input,
.contact-card textarea,
.contact-card select {
  width: 100%;
  height: 47px;
  padding: 8px 12px;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-family: inherit;
  color: var(--nav-dark);
  background: var(--baby-blue);
  box-sizing: border-box;
  transition: background 0.15s;
  outline: none;
}

.contact-card textarea { height: auto; min-height: 100px; resize: vertical; padding: 12px; }

.contact-card .form-input::placeholder,
.contact-card textarea::placeholder { color: var(--slate); }

/* Hover + focus with visible ring */
.contact-card .form-input:hover,
.contact-card textarea:hover,
.contact-card select:hover { background: #e5e7f0; }

.contact-card .form-input:focus,
.contact-card textarea:focus,
.contact-card select:focus {
  background: #e5e7f0;
  outline: none;
  box-shadow: 0 0 0 2px var(--blue-light);
}

/* Contact form errors */
.contact-field-error {
  display: none;
  font-size: 0.8rem;
  color: var(--red-alert);
  line-height: 1.5;
  margin-top: 4px;
}

.contact-card .form-input.rymodal-input-error,
.contact-card textarea.rymodal-input-error { border: 1px solid var(--red-alert); }
.contact-card .form-input.rymodal-input-error:focus,
.contact-card textarea.rymodal-input-error:focus { box-shadow: 0 0 0 2px var(--red-alert); }

.contact-card select {
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23000525' d='M1.41 0L6 4.59L10.59 0L12 1.41l-6 6l-6-6z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

/* FAQs panel */
.faqs-panel {
  flex: 1;
  min-width: 0;
  padding-top: 40px;
}

.faqs-panel h2 { font-size: 30px; font-weight: 700; color: var(--primary); margin-bottom: 40px; line-height: 1.25; }

.faq-items { display: flex; flex-direction: column; gap: 24px; }

.faq-item {
  border-bottom: 1px solid var(--slate);
  padding-bottom: 32px;
}

.faq-header {
  width: 100%;
  padding: 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  cursor: pointer;
  background: none;
  border: none;
  text-align: left;
  font-family: inherit;
}

/* M-4: faq-question replaces <h4> inside <button> */
.faq-question {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-dark);
  line-height: 1.25;
  flex: 1;
}

/* Toggle button: 36×36 circle */
.faq-item .faq-toggle {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--baby-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: background 0.15s;
}

.faq-item .faq-toggle:hover { background: #DFE2ED; }

.faq-item .faq-toggle svg {
  width: 12px;
  height: 12px;
  stroke: var(--primary);
  stroke-width: 2.5;
  stroke-linecap: round;
  fill: none;
}

.faq-item.open .faq-toggle .icon-plus { display: none; }
.faq-item .faq-toggle .icon-minus { display: none; }
.faq-item.open .faq-toggle .icon-minus { display: block; }

/* FAQ answer — JS sets maxHeight via scrollHeight, no CSS cap (M-7) */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-answer-inner { padding-top: 22px; }

.faq-answer p {
  font-size: 16px;
  font-weight: 400;
  color: var(--nav-dark);
  line-height: 1.5;
  margin: 0;
}

/* FAQ read-more wrapper */
.faq-readmore { margin-top: 40px; }

/* ── Print styles (M-8) ── */
@media print {
  .hero-section .hero-bg,
  .hero-signin-container { display: none; }
  .hero-content { color: #000; }
  .login-card, .contact-card { box-shadow: none; border: 1px solid #ccc; }
  .feature-card .card-illustration { display: none; }
  .home-btn-pill, .btn-register-hero { display: none; }
}
