/* Article / Guide page styles - works with loftguard-main.css */

:root {
  --light-orange: #FFA35A;
  --dark-orange: #CC3D00;
  --secondary-brown: #7A5555;
  --footer-dark: #1A0A0A;
  --max-width: 1120px;
  --shadow: 0 10px 30px rgba(58, 25, 25, 0.08);
}

body.article-page {
  background: var(--off-white);
  color: var(--brown);
  font-size: 18px;
  line-height: 1.7;
}

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

a {
  color: var(--dark-orange);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
a:hover,
a:focus {
  color: var(--orange);
}

.article-hero {
  background: var(--brown);
  color: var(--white);
  padding: 70px 20px 78px;
}
.hero-inner {
  width: min(100%, var(--max-width));
  margin: 0 auto;
}
.category {
  display: inline-block;
  margin-bottom: 15px;
  color: var(--light-orange);
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 15px;
}
.article-hero h1 {
  max-width: 900px;
  margin-bottom: 20px;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.5px;
  line-height: 1.15;
  color: #fff;
}
.article-hero h2 {
  color: #fff;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-top: 0;
}
.hero-intro {
  max-width: 820px;
  margin: 0;
  color: #fff;
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  line-height: 1.55;
}

main {
  width: min(100% - 40px, var(--max-width));
  margin: 0 auto;
  padding: 55px 0 75px;
}

article {
  background: var(--white);
  box-shadow: var(--shadow);
  border-radius: 12px;
  overflow: hidden;
}

.article-content {
  padding: clamp(28px, 5vw, 70px);
}
.article-content h2 {
  color: var(--brown);
  font-size: clamp(2rem, 4vw, 2.8rem);
  margin: 55px 0 18px;
  line-height: 1.15;
}
.article-content h2:first-child {
  margin-top: 0;
}
.article-content h3 {
  color: var(--dark-orange);
  font-size: 1.55rem;
  margin: 32px 0 10px;
}
.article-content p {
  margin: 0 0 20px;
}
.article-content ul,
.article-content ol {
  padding-left: 25px;
  margin: 10px 0 28px;
}
.article-content li {
  margin-bottom: 9px;
}

.sources-section {
  margin-top: 55px;
  padding: 28px 30px;
  background: var(--light-gray);
  border-left: 5px solid var(--orange);
  border-radius: 8px;
}
.sources-section h2 {
  margin-top: 0;
}

.article-image-placeholder {
  margin: 42px 0;
  overflow: hidden;
  border-radius: 10px;
  background: var(--light-gray);
}
.article-image-placeholder img {
  display: block;
  width: 100%;
  height: auto;
}
.article-image-placeholder figcaption {
  padding: 13px 18px;
  color: var(--secondary-brown);
  font-size: 0.95rem;
  line-height: 1.45;
}
figcaption {
  margin-top: 9px;
  color: var(--secondary-brown);
  font-size: 0.95rem;
  font-style: italic;
}

.notice-box,
.advice-box {
  margin: 30px 0;
  padding: 25px 28px;
  border-left: 6px solid var(--orange);
  background: var(--light-gray);
  border-radius: 7px;
}
.notice-box strong,
.advice-box strong {
  color: var(--brown);
}
.warning-box {
  margin: 30px 0;
  padding: 25px 28px;
  border-left: 6px solid var(--dark-orange);
  background: #fff3ec;
  border-radius: 7px;
}

.comparison-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  margin: 30px 0;
}
.comparison-card {
  padding: 25px;
  border: 1px solid #e3d8d2;
  border-top: 5px solid var(--orange);
  border-radius: 8px;
  background: var(--off-white);
}
.comparison-card h3 {
  margin-top: 0;
}

.faq {
  margin: 18px 0;
  padding: 22px 25px;
  border: 1px solid #e3d8d2;
  border-radius: 8px;
  background: var(--off-white);
}
.faq h3 {
  margin: 0 0 9px;
  color: var(--brown);
  font-size: 1.3rem;
}

.cta {
  margin-top: 55px;
  padding: clamp(30px, 5vw, 55px);
  background: var(--brown);
  color: var(--white);
  border-radius: 10px;
  text-align: center;
}
.cta h2 {
  color: var(--white);
  margin-top: 0;
}
.cta p {
  max-width: 750px;
  margin-left: auto;
  margin-right: auto;
}
.cta-button {
  display: inline-block;
  margin-top: 12px;
  padding: 14px 26px;
  border-radius: 6px;
  background: var(--orange);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
  border: 2px solid var(--orange);
}
.cta-button:hover,
.cta-button:focus {
  background: var(--light-orange);
  border-color: var(--light-orange);
  color: var(--brown);
}

footer {
  background: var(--footer-dark);
  color: var(--white);
  padding: 35px 20px;
}
.footer-inner {
  width: min(100%, var(--max-width));
  margin: 0 auto;
  text-align: center;
}
.footer-inner p {
  margin: 5px 0;
}
.footer-inner a {
  color: var(--light-orange);
}

/* Reveal animations (from guide) */
@media (prefers-reduced-motion: no-preference) {
  .article-content > section,
  .article-content > figure,
  .article-content > .sources-section {
    opacity: 0;
    transform: translate3d(0, 55px, 0) scale(.985);
    filter: blur(2px);
    transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .9s cubic-bezier(.22,1,.36,1), filter .8s ease;
  }
  .article-content > section.reveal,
  .article-content > figure.reveal,
  .article-content > .sources-section.reveal {
    opacity: 1;
    transform: translate3d(0,0,0) scale(1);
    filter: blur(0);
  }
  .article-content h2 {
    opacity: 0;
    transform: translate3d(0, 25px, 0);
    transition: opacity .65s ease, transform .7s cubic-bezier(.22,1,.36,1);
  }
  .article-content h2.reveal-heading {
    opacity: 1;
    transform: translate3d(0,0,0);
  }
  .cta {
    transform: translateY(35px);
    opacity: .85;
    transition: transform .8s cubic-bezier(.22,1,.36,1), opacity .8s ease;
  }
  .cta.reveal {
    transform: translateY(0);
    opacity: 1;
  }
}

@media (max-width: 720px) {
  body.article-page { font-size: 17px; }
  .article-hero { padding: 48px 14px 55px; }
  main { width: min(100% - 20px, var(--max-width)); padding-top: 25px; }
  .article-content { padding: 25px 20px; }
  .comparison-grid { grid-template-columns: 1fr; }
}

/* ===== Critical overrides so main homepage styles don't break the article page ===== */

body.article-page .article-hero .hero-inner {
  display: block !important;
  width: min(100%, var(--max-width));
  margin: 0 auto;
  gap: 0;
  align-items: initial;
}

body.article-page .article-hero h1,
body.article-page .article-hero h2 {
  color: #fff !important;
  display: block;
  width: 100%;
}

body.article-page .article-hero h1 {
  max-width: 900px;
  margin-bottom: 12px;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  letter-spacing: -0.5px;
  line-height: 1.1;
}

body.article-page .article-hero h2 {
  font-size: clamp(1.4rem, 3vw, 2rem);
  font-weight: 600;
  margin: 0 0 1.25rem;
  color: rgba(255,255,255,0.9) !important;
}

body.article-page .hero-intro {
  max-width: 820px;
  margin: 0;
  color: #fff;
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  line-height: 1.55;
}

/* Ensure navbar on article pages still works with main styles */
body.article-page #navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

/* Push hero below fixed nav */
body.article-page .article-hero {
  padding-top: 110px;
}

@media (max-width: 900px) {
  body.article-page .article-hero {
    padding-top: 90px;
  }
}
