/* ==========================================================================
   Talynex V97 – Professional polish & consistency layer
   Loaded last to refine spacing, typography, CTAs and mobile feel without
   breaking existing component styles.
   ========================================================================== */

:root {
  --section-pad-y: clamp(3.5rem, 6vw, 5.75rem);
  --section-pad-y-sm: clamp(2.75rem, 5vw, 3.75rem);
  --card-radius: 20px;
  --btn-radius: 12px;
  --focus-ring: 0 0 0 3px rgba(12, 99, 221, 0.35);
}

/* ---- Vertical rhythm ---- */
.section {
  padding-top: var(--section-pad-y) !important;
  padding-bottom: var(--section-pad-y) !important;
}
.section.soft,
.section.dark {
  padding-top: var(--section-pad-y) !important;
  padding-bottom: var(--section-pad-y) !important;
}

/* ---- Typography breathing room ---- */
h1, .hero h1 {
  letter-spacing: -0.02em;
  line-height: 1.15;
}
h2 {
  letter-spacing: -0.015em;
  line-height: 1.22;
  margin-bottom: 0.65em;
}
h3 {
  line-height: 1.3;
}
p {
  line-height: 1.7;
}
.eyebrow {
  margin-bottom: 0.85rem;
}

/* ---- Buttons – consistent, premium feel ---- */
.btn {
  border-radius: var(--btn-radius);
  padding: 0.85rem 1.35rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}
.btn-primary {
  box-shadow: 0 8px 22px rgba(6, 71, 185, 0.22);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(6, 71, 185, 0.3);
}
.btn-accent {
  box-shadow: 0 8px 22px rgba(244, 163, 0, 0.22);
}
.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(244, 163, 0, 0.3);
}
.btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ---- Cards ---- */
.card,
.project-detail-card,
.knowledge-card,
.result-card,
.service-card {
  border-radius: var(--card-radius);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover,
.project-detail-card:hover,
.knowledge-card:hover {
  transform: translateY(-3px);
}

/* ---- Sticky header refinement ---- */
.site-header {
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: rgba(4, 23, 53, 0.07);
}

/* ---- Estimator result area – clearer hierarchy ---- */
[data-solar-estimator] .result-card strong,
[data-solar-estimator] .result-value-visible {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
[data-solar-estimator] .btn-email-estimate {
  min-height: 48px;
}
[data-solar-estimator] .result-email-status[data-state="success"] {
  color: #0b5b36;
  font-weight: 600;
}
[data-solar-estimator] .result-email-status[data-state="error"] {
  color: #b42318;
  font-weight: 600;
}

/* ---- Toast refinement ---- */
.estimate-send-toast {
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(4, 23, 53, 0.18);
}

/* ---- Mobile refinements ---- */
@media (max-width: 768px) {
  .section {
    padding-top: var(--section-pad-y-sm) !important;
    padding-bottom: var(--section-pad-y-sm) !important;
  }
  .btn {
    padding: 0.8rem 1.15rem;
    width: 100%;
    max-width: 100%;
  }
  .btn + .btn {
    margin-top: 0.65rem;
  }
  /* Keep WhatsApp floating button from covering primary CTAs */
  .whatsapp {
    bottom: 1.25rem;
    right: 1.25rem;
  }
  [data-solar-estimator] .result-card strong,
  [data-solar-estimator] .result-value-visible {
    font-size: 1.2rem;
  }
}

/* ---- Dark mode polish ---- */
html[data-theme="dark"] .site-header {
  background: rgba(4, 23, 53, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.06);
}
html[data-theme="dark"] .card,
html[data-theme="dark"] .project-detail-card,
html[data-theme="dark"] .knowledge-card {
  background: rgba(8, 38, 92, 0.55);
  border-color: rgba(255, 255, 255, 0.08);
}

/* ---- Focus visibility for accessibility / professionalism ---- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

/* ---- Homepage trust strip ---- */
.trust-strip {
  background: var(--navy, #041735);
  color: #dce7f6;
  padding: 14px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.trust-strip-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 28px;
}
.trust-strip-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: #d7e4f5;
}
.trust-strip-item i {
  color: var(--gold, #ffbf22);
  font-size: 0.95rem;
}
.trust-strip-item a {
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255,255,255,.25);
}
.trust-strip-item a:hover {
  border-bottom-color: var(--gold, #ffbf22);
  color: var(--gold, #ffbf22);
}
@media (max-width: 700px) {
  .trust-strip-inner { gap: 10px 16px; justify-content: flex-start; }
  .trust-strip-item { font-size: 0.78rem; }
}

/* ---- Homepage FAQ ---- */
.faq-section .faq-list {
  display: grid;
  gap: 12px;
  max-width: 820px;
  margin: 0 auto;
}
.faq-item {
  border: 1px solid var(--line, #dce4ef);
  border-radius: 14px;
  background: #fff;
  overflow: hidden;
}
.faq-item summary {
  padding: 16px 18px;
  font-weight: 750;
  font-size: 0.98rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--ink, #12213a);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-size: 1.25rem;
  font-weight: 400;
  color: var(--blue, #0647b9);
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "–"; }
.faq-item p {
  margin: 0;
  padding: 0 18px 16px;
  color: var(--muted, #66758b);
  font-size: 0.92rem;
  line-height: 1.65;
}
.faq-item a { color: var(--blue, #0647b9); font-weight: 600; }
html[data-theme="dark"] .faq-item {
  background: rgba(8, 38, 92, 0.55);
  border-color: rgba(255,255,255,.08);
}
html[data-theme="dark"] .faq-item summary { color: #fff; }
html[data-theme="dark"] .faq-item p { color: #c5d4e8; }

/* Hero H2 titles (demoted slides) match H1 visual weight */
.hero-copy h2.hero-title {
  font-family: Manrope, Inter, sans-serif;
  font-weight: 800;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 12px 0 14px;
  color: #fff;
}
.hero-copy h2.hero-title span { color: var(--gold, #ffbf22); }

/* ---- Proof row under trust strip ---- */
.proof-row {
  background: #f3f6fb;
  border-bottom: 1px solid rgba(4, 23, 53, 0.06);
  padding: 18px 0;
}
.proof-row-inner {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px 20px;
  align-items: center;
}
.proof-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.proof-item strong {
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink, #12213a);
  letter-spacing: -0.01em;
}
.proof-item span {
  font-size: 0.8rem;
  color: var(--muted, #66758b);
  line-height: 1.45;
}
.proof-item-cta {
  align-items: flex-start;
}
.btn-sm {
  padding: 10px 16px !important;
  font-size: 0.86rem !important;
  min-height: 42px;
}
@media (max-width: 900px) {
  .proof-row-inner {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 560px) {
  .proof-row-inner {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .proof-item-cta .btn {
    width: 100%;
  }
}
html[data-theme="dark"] .proof-row {
  background: rgba(8, 38, 92, 0.35);
  border-bottom-color: rgba(255,255,255,0.06);
}
html[data-theme="dark"] .proof-item strong { color: #fff; }
html[data-theme="dark"] .proof-item span { color: #b8c9db; }

/* ---- Mobile sticky CTA ---- */
.mobile-sticky-cta {
  display: none;
}
@media (max-width: 768px) {
  .mobile-sticky-cta {
    display: flex;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 90;
    gap: 8px;
    padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    border-top: 1px solid rgba(4, 23, 53, 0.08);
    box-shadow: 0 -8px 28px rgba(4, 23, 53, 0.1);
  }
  .mobile-sticky-btn {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.9rem;
    text-decoration: none;
  }
  .mobile-sticky-estimate {
    background: linear-gradient(135deg, #0c63dd, #0647b9);
    color: #fff;
  }
  .mobile-sticky-wa {
    background: #25d366;
    color: #fff;
  }
  /* Keep floating WhatsApp from overlapping sticky bar */
  .whatsapp {
    bottom: 72px !important;
  }
  body {
    padding-bottom: 72px;
  }
  html[data-theme="dark"] .mobile-sticky-cta {
    background: rgba(4, 23, 53, 0.96);
    border-top-color: rgba(255,255,255,0.08);
  }
}

/* ---- Brand logos: consistent size & alignment ---- */
.brand-marquee-item {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 140px;
  height: 64px;
  padding: 10px 14px;
  box-sizing: border-box;
  background: #fff;
  border: 1px solid rgba(4, 23, 53, 0.06);
  border-radius: 12px;
}
.brand-marquee-item img {
  display: block;
  max-width: 100%;
  max-height: 36px;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: none;
  opacity: 0.92;
}
.brand-marquee-item:hover img {
  opacity: 1;
}
html[data-theme="dark"] .brand-marquee-item {
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.08);
}
html[data-theme="dark"] .brand-marquee-item img {
  /* Keep logos readable on dark without harsh invert on all */
  opacity: 0.95;
}

/* ---- Revert proof-row / sticky / boxed brands (user preference) ---- */
.proof-row { display: none !important; }
.mobile-sticky-cta { display: none !important; }
/* Restore simpler brand marquee items (no forced white boxes) */
.brand-marquee-item {
  width: auto !important;
  height: auto !important;
  padding: 0 18px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}
.brand-marquee-item img {
  max-height: 42px !important;
  opacity: 1 !important;
}
@media (max-width: 768px) {
  body { padding-bottom: 0 !important; }
  .whatsapp { bottom: 20px !important; }
}

/* User preference: hide trust strip */
.trust-strip{display:none!important;}
