/* style.css */
/*
Theme Name: Habitual Miscarriage
Text Domain: habitual-miscarriage
*/
:root {
  --primary: #2D3748;
  --secondary: #805AD5;
  --bg: #FFFFFF;
  --white: #ffffff;
  --section-pad: clamp(4rem, 8vw, 8rem);
  --shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background: var(--bg); color: var(--primary); line-height: 1.8; overflow-x: hidden; }
.container { max-width: 1000px; margin: 0 auto; padding: 0 clamp(1rem, 5vw, 2rem); }

/* N-C Header */
.site-header { position: sticky; top: 0; left: 0; width: 100%; background: rgba(255,255,255,0.95); z-index: 1000; box-shadow: 0 4px 6px -1px rgba(0,0,0,0.05); }
.header-inner { display: flex; justify-content: space-between; align-items: center; padding: 1.5rem 0; gap: clamp(1rem, 5vw, 4rem); }
.logo { display: inline-flex; justify-content: center; align-items: center; font-size: clamp(1.2rem, 5vw, 2rem); font-weight: bold; color: var(--primary); text-decoration: none; white-space: normal; flex-shrink: 0; min-height: 1em; min-width: 100px; }
.logo span { color: var(--secondary); font-weight: normal; margin-left: 5px; }

.nav-toggle { display: flex; align-items: center; background: none; border: none; font-size: 2rem; cursor: pointer; color: var(--primary); z-index: 2100; flex-shrink: 0; }
.main-nav { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background: var(--bg); z-index: 2000; transform: translateY(-100%); transition: transform 0.5s cubic-bezier(0.77, 0, 0.175, 1); visibility: hidden; display: flex; align-items: center; justify-content: center; }
body.menu-open .main-nav { transform: translateY(0); visibility: visible; }
.main-nav ul { list-style: none; text-align: center; display: flex; flex-direction: column; gap: 3rem; }
.main-nav a { text-decoration: none; color: var(--primary); font-size: clamp(2rem, 5vw, 4rem); font-weight: bold; transition: color 0.3s; }
.main-nav a:hover { color: var(--secondary); }

.site-main { min-height: 80vh; display: flex; flex-direction: column; }

/* Typography */
h1, h2, h3 { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; word-break: break-word; font-weight: bold; color: var(--primary); }
h1 { font-size: clamp(2.5rem, 8vw, 5rem); line-height: 1.1; margin-bottom: 1.5rem; }
h2 { font-size: clamp(1.8rem, 5vw, 3rem); margin-top: clamp(3rem, 6vw, 5rem); margin-bottom: 2rem; }
h3 { font-size: clamp(1.2rem, 4vw, 2rem); margin-bottom: 1rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; padding: 1.2rem 2.5rem; background: var(--secondary); color: var(--white); text-decoration: none; font-size: 1.1rem; border-radius: 50px; transition: 0.3s; font-weight: bold; box-shadow: var(--shadow); }
.btn:hover { background: #6b46c1; transform: translateY(-3px); box-shadow: 0 15px 30px -5px rgba(128,90,213,0.3); }

/* V-A / D-C Layout */
.section { padding: var(--section-pad) 0; position: relative; }

/* H-C Type-Only */
.hero-type { padding: calc(var(--section-pad) * 1.5) 0; text-align: center; max-width: 900px; margin: 0 auto; }
.hero-type p { font-size: clamp(1.2rem, 4vw, 1.6rem); margin: 2rem auto; color: #4A5568; max-width: 800px; }

/* F-D Text Block */
.manifest-block { max-width: 800px; margin: 0 auto; font-size: clamp(1.5rem, 4vw, 2.5rem); line-height: 1.4; text-align: center; color: var(--primary); }

/* C-C Overlay Cards */
.posts-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem; margin-top: 3rem; }
@media (max-width: 1024px) { .posts-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 768px) { .posts-grid { grid-template-columns: minmax(0, 1fr); } }

.card-overlay { position: relative; display: flex; flex-direction: column; justify-content: flex-end; height: clamp(280px, 40vw, 400px); border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); text-decoration: none; transition: 0.3s; }
.card-overlay:hover { transform: translateY(-5px); box-shadow: 0 20px 40px -10px rgba(0,0,0,0.15); }
.card-overlay .thumb { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; z-index: 0; transition: transform 0.5s ease; }
.card-overlay:hover .thumb { transform: scale(1.05); }
.card-overlay::after { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to top, rgba(45,55,72,0.9) 0%, rgba(45,55,72,0.1) 100%); z-index: 1; pointer-events: none; }
.card-overlay .content { position: relative; z-index: 2; padding: 2rem; color: var(--white); text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.card-overlay h3 { color: var(--white); margin-bottom: 0.5rem; font-size: 1.4rem; }

/* U-B Methodology */
.methodology-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
@media (max-width: 768px) { .methodology-grid { grid-template-columns: 1fr; gap: 2rem; } }

/* FT-D CTA Footer */
.footer-cta { background: var(--bg); color: var(--primary); text-align: center; padding: clamp(4rem, 8vw, 8rem) 1rem; border-top: 1px solid #EDF2F7; }
.footer-cta h2 { margin-top: 0; margin-bottom: 1.5rem; }
.footer-cta p { color: #4A5568; margin-bottom: 2rem; max-width: 600px; margin-left: auto; margin-right: auto; }
.site-footer { background: var(--primary); padding: 4rem 0; color: var(--white); }
.footer-inner { display: flex; flex-direction: column; align-items: center; gap: 2rem; text-align: center; }
.footer-logo { font-size: clamp(1.5rem, 5vw, 2.5rem); font-weight: 900; color: var(--white); text-decoration: none; overflow-wrap: anywhere; }
.footer-inner ul { list-style: none; display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.footer-inner a { color: var(--white); text-decoration: none; opacity: 0.8; transition: opacity 0.3s; }
.footer-inner a:hover { opacity: 1; color: var(--secondary); }

/* Pagination */
.pagination { display: flex; justify-content: center; align-items: center; gap: 1rem; margin: 4rem 0; }
.pagination .page-numbers { display: flex; align-items: center; justify-content: center; min-width: 45px; height: 45px; text-decoration: none; border-radius: 50px; color: var(--primary); background: var(--bg); box-shadow: var(--shadow); transition: 0.3s; font-weight: bold; }
.pagination .page-numbers.current { background: var(--secondary); color: var(--white); box-shadow: 0 10px 20px rgba(128,90,213,0.2); }
.pagination .page-numbers:hover:not(.current):not(.dots) { transform: translateY(-3px); }
.pagination .page-numbers.dots { box-shadow: none; background: transparent; }

/* Content Protocol */
.post-content { max-width: 800px; margin: 0 auto; padding: var(--section-pad) 0; }
.post-content h2, .post-content h3 { color: var(--primary); padding-bottom: 1rem; }
.post-content ul, .post-content ol { padding-left: 2rem; margin-bottom: 2rem; }
.post-content li { margin-bottom: 1rem; color: #4A5568; }
.post-content p { margin-bottom: 2rem; color: #4A5568; font-size: 1.1rem; }
.post-content table { width: 100%; border-collapse: collapse; margin-bottom: 2rem; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.post-content th, .post-content td { padding: 1.2rem; text-align: left; }
.post-content th { background: #EDF2F7; color: var(--primary); }
.post-content td { background: var(--white); border-bottom: 1px solid #EDF2F7; color: #4A5568; }
