/* ============================================
   factura.lamaritec.ro — Compact Premium
   LA MARITEC SRL
   ============================================ */

:root {
  --blue: #1e5fa8;
  --blue-dark: #0f2f54;
  --blue-deeper: #0a1f3a;
  --blue-glow: rgba(30, 95, 168, 0.15);
  --orange: #ff7a00;
  --orange-hover: #e56e00;
  --orange-glow: rgba(255, 122, 0, 0.2);
  --green-bg: #dcfce7;
  --green-border: #86efac;
  --yellow-bg: #fef3c7;
  --yellow-border: #fde68a;
  --red: #dc2626;
  --red-bg: #fee2e2;
  --red-border: #fecaca;
  --info-bg: #dbeafe;
  --info-border: #93c5fd;
  --gray: #64748b;
  --gray-light: #f1f5f9;
  --gray-border: #e2e8f0;
  --text: #1e293b;
  --text-light: #475569;
  --shadow: 0 2px 16px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.04);
  --shadow-hover: 0 8px 28px rgba(0,0,0,0.1), 0 2px 6px rgba(0,0,0,0.05);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }

body {
  overflow-x: hidden;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: #f8fafc;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.reveal { opacity: 0; transform: translateY(20px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ============ HEADER ============ */
.header {
  background: var(--blue);
  box-shadow: 0 2px 12px rgba(0,0,0,0.18);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0.5rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
}

.header-spacer {}

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

.header-logo-img {
  height: 42px;
  width: auto;
}

.header-back {
  color: rgba(255,255,255,0.78);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  justify-self: end;
  padding: 0.3rem 0.6rem;
  min-height: 44px;
  border-radius: 6px;
  transition: all 0.2s;
}

.header-back:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

/* ============ HERO (compact) ============ */
.hero {
  background: linear-gradient(160deg, var(--blue-dark) 0%, var(--blue) 60%, #2a7fd4 100%);
  padding: 2rem 1.5rem 2.8rem;
  text-align: center;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -15%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255,255,255,0.035) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.hero-content { position: relative; z-index: 1; }

.hero h1 {
  font-size: 2rem;
  font-weight: 900;
  margin-bottom: 0.35rem;
  letter-spacing: -0.5px;
  line-height: 1.15;
}

.hero p {
  font-size: 0.95rem;
  opacity: 0.8;
  font-weight: 400;
}

/* ============ STATS ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  max-width: 1100px;
  margin: -1.5rem auto 1.5rem;
  padding: 0 1.5rem;
  position: relative;
  z-index: 10;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 1rem 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
  transition: transform 0.25s, box-shadow 0.25s;
}

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

.stat-icon { font-size: 1.4rem; flex-shrink: 0; }

.stat-value {
  font-size: 1.5rem;
  font-weight: 900;
  color: var(--blue);
  line-height: 1.1;
  letter-spacing: -0.3px;
}

.stat-label {
  font-size: 0.7rem;
  color: var(--gray);
  font-weight: 500;
  margin-top: 0.1rem;
}

/* ============ MAIN DUO (form + chart) ============ */
.main-duo {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
  align-items: start;
}

.form-card {
  background: #fff;
  border-radius: 16px;
  padding: 1.75rem 1.75rem 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
}

.form-card h2 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.1rem;
  text-align: center;
}

.form-group { margin-bottom: 0.9rem; }

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

.form-group input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  font-size: 16px;
  border: 1.5px solid var(--gray-border);
  border-radius: 8px;
  background: #fafbfc;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
  font-family: inherit;
}

.form-group input:focus {
  outline: none;
  border-color: var(--blue);
  background: #fff;
  box-shadow: 0 0 0 3px var(--blue-glow);
}

.form-group input::placeholder { color: #94a3b8; }
.form-group .input-error { border-color: var(--red); }

.form-error {
  font-size: 0.72rem;
  color: var(--red);
  margin-top: 0.3rem;
  display: none;
  font-weight: 500;
}

.form-error.visible { display: block; }

.submit-btn {
  width: 100%;
  padding: 0.75rem;
  min-height: 48px;
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  background: var(--orange);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.5rem;
  font-family: inherit;
  box-shadow: 0 3px 12px var(--orange-glow);
}

.submit-btn:hover:not(:disabled) {
  background: var(--orange-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 122, 0, 0.3);
}

.submit-btn:active:not(:disabled) { transform: translateY(0); }
.submit-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; box-shadow: none; }
.submit-btn svg { width: 16px; height: 16px; }

.submit-hint {
  text-align: center;
  font-size: 0.68rem;
  color: var(--gray);
  margin-top: 0.6rem;
}

.spinner {
  display: inline-block;
  width: 16px;
  height: 16px;
  border: 2.5px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.6s linear infinite;
}

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

/* ============ RESULT (inside form card) ============ */
.result-area {
  margin-top: 1rem;
}

.result-card {
  border-radius: 10px;
  padding: 1rem 1.15rem;
  font-size: 0.85rem;
  line-height: 1.6;
  animation: fadeSlideIn 0.4s ease;
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  box-shadow: 0 1px 6px rgba(0,0,0,0.04);
}

@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-card .result-icon { font-size: 1.25rem; flex-shrink: 0; line-height: 1.4; }
.result-card .result-text { flex: 1; }
.result-card .result-text strong { font-weight: 700; }
.result-card .contact-line { margin-top: 0.4rem; font-size: 0.78rem; opacity: 0.82; }
.email-note { margin-top: 0.4rem; font-size: 0.74rem; opacity: 0.65; font-style: italic; }

.result-paid { background: var(--green-bg); border: 1px solid var(--green-border); color: #14532d; }
.result-partial { background: var(--yellow-bg); border: 1px solid var(--yellow-border); color: #78350f; }
.result-scheduled { background: var(--info-bg); border: 1px solid var(--info-border); color: #1e3a5f; }
.result-alert { background: var(--red-bg); border: 1px solid var(--red-border); color: #7f1d1d; }
.result-not-found { background: var(--gray-light); border: 1px solid var(--gray-border); color: var(--text-light); }
.result-error { background: var(--red-bg); border: 1px solid var(--red-border); color: #7f1d1d; }

/* ============ CTA CARD (sidebar, beside form) ============ */
.cta-card {
  background: linear-gradient(160deg, var(--blue-dark) 0%, var(--blue) 65%, #2874b5 100%);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(15, 47, 84, 0.2);
}

.cta-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -30%;
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(255, 122, 0, 0.1) 0%, transparent 65%);
  border-radius: 50%;
  pointer-events: none;
}

.cta-card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.cta-card h3 {
  color: #fff;
  font-size: 1.25rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
  letter-spacing: -0.3px;
  position: relative;
  z-index: 1;
}

.cta-card-subtitle {
  color: rgba(255,255,255,0.65);
  font-size: 0.78rem;
  font-weight: 400;
  margin-bottom: 1.25rem;
  position: relative;
  z-index: 1;
}

.cta-benefits-vertical {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-bottom: 1.5rem;
  position: relative;
  z-index: 1;
  width: 100%;
}

.cta-benefits-vertical li {
  color: rgba(255,255,255,0.92);
  font-size: 0.85rem;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  text-align: left;
}

.cta-benefits-vertical li strong {
  font-weight: 800;
  color: #fff;
}

.cta-check {
  width: 18px;
  height: 18px;
  color: #4ade80;
  flex-shrink: 0;
}

.cta-card-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.4rem;
  min-height: 48px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--blue-dark);
  background: var(--orange);
  border-radius: 10px;
  text-decoration: none;
  font-family: inherit;
  transition: all 0.25s ease;
  box-shadow: 0 4px 16px rgba(255, 122, 0, 0.35);
  white-space: nowrap;
  position: relative;
  z-index: 1;
}

.cta-card-btn:hover {
  background: #ffb347;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(255, 122, 0, 0.4);
}

.cta-card-btn:active {
  transform: translateY(0);
}

.cta-card-btn svg {
  transition: transform 0.2s;
}

.cta-card-btn:hover svg {
  transform: translateX(3px);
}

.chart-subtitle {
  text-align: center;
  font-size: 0.75rem;
  color: var(--gray);
  font-weight: 400;
  margin-bottom: 1rem;
}

/* ============ CHART (full-width below duo) ============ */
.chart-section {
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}

.chart-card-wide {
  background: #fff;
  border-radius: 16px;
  padding: 1.75rem 2rem 1.25rem;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
}

.chart-card-wide h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  text-align: center;
  margin-bottom: 0.15rem;
}

.chart-wrap-wide {
  position: relative;
  width: 100%;
  height: 300px;
}

.chart-wrap-wide canvas {
  width: 100% !important;
  height: 100% !important;
}

/* ============ FAQ ============ */
.faq-section {
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}

.faq-section h2 {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
}

.faq-item {
  background: #fff;
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  margin-bottom: 0.5rem;
  overflow: hidden;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.faq-item:hover {
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  border-color: #cbd5e1;
}

.faq-question {
  width: 100%;
  padding: 0.85rem 1.15rem;
  min-height: 48px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  font-family: inherit;
  line-height: 1.4;
  transition: color 0.2s;
}

.faq-question:hover { color: var(--blue); }

.faq-arrow {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  transition: transform 0.3s ease;
  color: var(--gray);
}

.faq-item.open .faq-arrow { transform: rotate(180deg); color: var(--blue); }

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-item.open .faq-answer {
  max-height: 200px;
  padding: 0 1.15rem 0.85rem;
}

.faq-answer p { font-size: 0.8rem; color: var(--text-light); line-height: 1.65; }
.faq-answer a { color: var(--blue); font-weight: 600; text-decoration: none; }
.faq-answer a:hover { text-decoration: underline; }

/* ============ CONTACT ============ */
.contact-section {
  max-width: 1100px;
  margin: 0 auto 2rem;
  padding: 0 1.5rem;
}

.contact-section h2 {
  text-align: center;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 1rem;
}

.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.contact-card {
  background: #fff;
  border-radius: 12px;
  padding: 1.25rem 1rem;
  min-height: 48px;
  text-align: center;
  box-shadow: var(--shadow);
  border: 1px solid rgba(0,0,0,0.04);
  text-decoration: none;
  color: var(--text);
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}

.contact-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: var(--blue);
}

.contact-icon { font-size: 1.6rem; margin-bottom: 0.4rem; }
.contact-label { font-size: 0.65rem; font-weight: 600; color: var(--gray); text-transform: uppercase; letter-spacing: 1px; margin-bottom: 0.2rem; }
.contact-value { font-size: 0.85rem; font-weight: 700; color: var(--blue); }

/* ============ FOOTER ============ */
.footer {
  background: var(--blue-deeper);
  color: #fff;
  margin-top: auto;
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 1.75rem 1.5rem 1.25rem;
  text-align: center;
}

.footer-company { font-size: 1rem; font-weight: 800; margin-bottom: 0.5rem; letter-spacing: 0.8px; }

.footer-details {
  font-size: 0.78rem;
  opacity: 0.72;
  margin-bottom: 0.35rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.4rem;
  align-items: center;
}

.footer-details a { color: #fff; text-decoration: none; transition: opacity 0.2s; }
.footer-details a:hover { opacity: 1; text-decoration: underline; }
.footer-sep { opacity: 0.3; }
.footer-address { font-size: 0.72rem; opacity: 0.48; margin-bottom: 0.75rem; }
.footer-copy { font-size: 0.65rem; opacity: 0.35; border-top: 1px solid rgba(255,255,255,0.08); padding-top: 0.75rem; }

/* ============ RESPONSIVE ============ */
@media (max-width: 820px) {
  .main-duo {
    grid-template-columns: 1fr;
    max-width: 520px;
  }

  .chart-wrap-wide { height: 240px; }

  .stats {
    max-width: 520px;
  }

  .contact-cards {
    grid-template-columns: 1fr;
    max-width: 340px;
    margin: 0 auto;
  }

  .cta-card {
    padding: 1.75rem 1.5rem;
  }

  .chart-section {
    max-width: 520px;
  }
}

@media (max-width: 600px) {
  .header-inner {
    grid-template-columns: auto 1fr auto;
    padding: 0.4rem 0.75rem;
    gap: 0.4rem;
  }

  .header-spacer { display: none; }
  .header-center { justify-self: center; }
  .header-logo-img { height: 32px; }
  .header-back { font-size: 0.7rem; padding: 0.25rem 0.4rem; }

  .hero { padding: 1.5rem 1rem 2rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero p { font-size: 0.85rem; }

  .stats {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    margin-top: -1.2rem;
    margin-bottom: 1rem;
    padding: 0 1rem;
  }

  .stat-card { padding: 0.75rem 0.75rem; }
  .stat-value { font-size: 1.3rem; }

  .main-duo { padding: 0 1rem; gap: 1rem; }
  .form-card { padding: 1.25rem; border-radius: 12px; }

  .chart-section { padding: 0 1rem; }
  .chart-card-wide { padding: 1.25rem 1rem 0.75rem; }
  .chart-wrap-wide { height: 200px; }

  .faq-section, .contact-section { padding: 0 1rem; }

  .cta-card { padding: 1.5rem 1.25rem; }
  .cta-card h3 { font-size: 1.1rem; }
  .cta-benefits-vertical li { font-size: 0.8rem; }
  .cta-card-btn { padding: 0.7rem 1.25rem; font-size: 0.85rem; }

  .footer-details { flex-direction: column; gap: 0.2rem; }
  .footer-sep { display: none; }
}

@media (max-width: 360px) {
  .hero h1 { font-size: 1.3rem; }
  .hero p { font-size: 0.8rem; }
  .stat-value { font-size: 1.15rem; }
  .form-card h2 { font-size: 0.95rem; }
  .cta-card h3 { font-size: 1rem; }
  .cta-card-subtitle { font-size: 0.72rem; }
  .cta-benefits-vertical li { font-size: 0.78rem; }
  .chart-card-wide h3 { font-size: 0.95rem; }
  .chart-wrap-wide { height: 180px; }
  .contact-value { font-size: 0.78rem; }
}
