/*
Theme Name: Living with Neuroautoimmune diseases
Theme URI: http://example.com/living-with-neuroautoimmune
Author: Antigravity
Description: A professional, empathetic, and accessible WordPress theme for educating the public about neurological autoimmune disorders.
Version: 1.0.0
Text Domain: living-neuro
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

:root {
    --primary-color: #0d3b4c;
    /* Deep Teal - Trust */
    --secondary-color: #6a4c93;
    /* Soft Purple - Neurology/Empathy */
    --accent-color: #f7941d;
    /* Warm Orange - Action/Awareness */
    --text-color: #333333;
    --bg-light: #f9fbfb;
    --bg-white: #ffffff;
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
    margin: 0;
    overflow-x: hidden;
    /* Prevent horizontal scroll caused by animations off-screen or sizing */
    width: 100%;
}

.text-center {
    text-align: center;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--primary-color);
    margin-top: 1.5em;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

.site-header {
    position: sticky;
    top: 0;
    background-color: var(--bg-white);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 10px 0;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

.site-header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 10%;
    padding-right: 5%;

    @media (max-width: 768px) {
        padding-left: 5%;
    }
}

.site-logo-wrap {
    display: flex;
    align-items: center;
    gap: 15px;
}

.site-logo-wrap .custom-logo,
.site-logo-wrap .custom-logo-link img {
    max-height: 108px !important;
    width: auto !important;
    height: auto !important;
    display: block;
}

.site-logo-placeholder {
    width: 40px;
    height: 40px;
    background: var(--primary-color);
    border-radius: 8px;
    opacity: 0.1;
}

.site-branding .site-title {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.1;
}

.site-branding .site-title a {
    color: var(--primary-color);
}

.site-description {
    margin: 0;
    font-size: 0.85rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: #888;
}

/* Hero Enhanced */
.hero-section {
    position: relative;
    height: 80vh;
    min-height: 600px;
    display: flex;
    align-items: center;
    background-size: cover;
    color: #fff;
    background-position: center center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(13, 59, 76, 0.9) 0%, rgba(13, 59, 76, 0.4) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin-left: 10%;
    animation: fadeInUp 1s ease-out;

    @media (max-width: 768px) {
        margin-left: 5%;
    }
}

.hero-tagline {
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 20px;
    display: block;
}

.hero-title {
    color: #fff;
    font-size: 4rem;
    margin: 0 0 20px 0;
    line-height: 1.1;
    font-weight: 800;
}

.hero-description {
    font-size: 1.4rem;
    opacity: 0.95;
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

.button-secondary {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid #fff;
    backdrop-filter: blur(10px);
}


.section-intro {
    padding: 50px 0;
    background: linear-gradient(180deg, #fff 0%, var(--bg-light) 100%);
    text-align: center;
}

/* Scientific Focus - Dark Contrast Section */
.section-education {
    background-color: var(--primary-color);
    padding: 100px 0;
    color: #fff;
}

.section-education .section-title {
    color: #fff;
    margin-top: 0;
}

.section-education .section-subtitle {
    color: rgba(255, 255, 255, 0.8);
}

.section-education .section-link {
    color: var(--accent-color);
}

.section-education .section-link:hover {
    color: #fff;
}

.section-education .disorder-card {
    background: #fff;
    color: var(--text-color);
    border-radius: 12px;
    overflow: hidden;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.section-stories {
    padding: 100px 0 0 0;
    /* Fully flush bottom */
    background: var(--bg-white);
    margin-bottom: 0;
}

.intro-title {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 30px;
    font-weight: 800;
}

.intro-content {
    max-width: 850px;
    margin: 0 auto;
    font-size: 1.25rem;
    line-height: 1.8;
    color: #444;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.8rem;
    color: var(--primary-color);
    margin: 0;
}

.section-subtitle {
    font-size: 1.2rem;
    color: #666;
    margin: 10px 0 0 0;
}

.section-link {
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: underline;
}

/* Cards */
.disorder-card {
    background: #fff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(13, 59, 76, 0.08);
}

.disorder-card .card-image {
    height: 220px;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
}

.disorder-card .card-body {
    padding: 24px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.disorder-card h3 {
    margin: 0 0 15px 0;
    font-size: 1.6rem;
    color: var(--primary-color);
}

.disorder-card .excerpt {
    font-size: 0.95rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    min-height: 6.4em;
    /* Ensures consistent height for ~4 lines */
}

.disorder-card .button,
.featured-story .button {
    width: 100%;
    display: block;
    text-align: center;
    border-radius: 12px;
    box-sizing: border-box;
    margin-top: auto;
    background: var(--primary-color);
}

.disorder-card .button:hover,
.featured-story .button:hover {
    background: #061e27;
    /* Even darker shade for hover */
    transform: scale(1.02);
}

/* Stories Section */
.section-stories {

    padding: 100px 0;
    background: #fff;
}

.section-stories-header {
    margin-bottom: 60px;

}

.section-stories-header h2 {
    margin-top: 0;
}

.section-stories-header p {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 15px 0 0;
}

.stories-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.section-cta {
    margin-top: 140px;
    text-align: center;
}

.section-stories .section-cta .button {
    background: var(--primary-color);
}

.section-stories .section-cta .button:hover {
    background: #061e27;
}

.story-testimonial-card {
    background: var(--primary-color);
    padding: 40px;
    border-radius: 24px;
    box-shadow: 0 15px 45px rgba(13, 59, 76, 0.15);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    text-align: center;
}

.story-testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(106, 76, 147, 0.1);
}

.quote-icon {
    margin-bottom: 30px;
}

.testimonial-content {
    flex-grow: 1;
    font-size: 1.05rem;
    font-style: italic;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    margin-bottom: 25px;
}

.testimonial-content p {
    margin: 0;
}

.storyteller-name {
    margin: 0 0 15px 0;
    font-size: 1.25rem;
    color: #fff;
    font-weight: 700;
}

.read-more-link {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.read-more-link:hover {
    color: #fff;
}

/* Mobile adjustments */
@media (max-width: 1024px) {
    .stories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stories-grid {
        grid-template-columns: 1fr;
    }

    .section-stories {
        padding: 60px 0;
        border-radius: 0;
    }
}

.horizontal-card {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 60px;
    align-items: center;
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(106, 76, 147, 0.05);
    margin-bottom: 60px;
    padding: 0;
    border: 1px solid rgba(106, 76, 147, 0.05);
    animation: fadeInUp 1s ease-out both;
}

.horizontal-card .story-image {
    height: 100%;
    min-height: 400px;
}

.horizontal-card .story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.horizontal-card .story-text {
    padding: 60px;
}

.story-image-placeholder {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.story-image-placeholder::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(13, 59, 76, 0.4);
    /* Dark teal overlay */
}

.placeholder-text {
    position: relative;
    z-index: 1;
    color: #fff;
    font-weight: 700;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.horizontal-card .story-text h2 {
    margin: 15px 0 20px;
    font-size: 2.2rem;
    line-height: 1.2;
}

.horizontal-card .story-text h2 a {
    color: var(--primary-color);
}

.horizontal-card .story-tag {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.horizontal-card .story-excerpt {
    margin-bottom: 30px;
    color: #555;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* Mobile adjustments for horizontal cards */
/* Mobile adjustments for horizontal cards */
@media (max-width: 992px) {
    .horizontal-card {
        display: flex;
        flex-direction: column;
        height: auto;
        gap: 0;
    }

    .horizontal-card .story-image {
        width: 100%;
        height: 250px;
        /* Reduced fixed height to ensure it remains visible without taking up too much screen */
        min-height: 250px;
        flex-shrink: 0;
    }

    .horizontal-card .story-text {
        padding: 30px;
        width: 100%;
        box-sizing: border-box;
        /* Ensure padding doesn't cause overflow */
    }
}

/* Footer */
.site-footer {
    background: var(--primary-color);
    color: #fff;
    padding: 80px 0 40px;
}

.site-footer h3 {
    color: #fff;
    margin-top: 0;
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #fff;
}

.footer-links .menu-item-login,
.footer-links .menu-item-logout {
    display: none !important;
}

.site-info {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.8rem;
    text-align: center;
}

/* Content */
.main-content,
.site-main {

    padding-bottom: 80px;
}

.home .main-content,
.home .site-main,
.home article {
    padding-bottom: 0 !important;
    margin-bottom: 0 !important;
}

/* Menus */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
}

/* Burger Menu Trigger - Hidden by default */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-color);
    cursor: pointer;
    padding: 10px;
}

@media (max-width: 900px) {
    .menu-toggle {
        display: block;
        margin-left: auto;
    }

    .main-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #fff;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        z-index: 9999;
    }

    .main-navigation.toggled {
        display: block;
        animation: fadeInUp 0.3s ease-out;
    }

    .main-navigation ul {
        display: flex;
        flex-direction: column;
        padding: 20px;
        text-align: center;
        gap: 15px;
        margin: 0;
    }
}


.main-navigation a {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 1px;
    color: var(--primary-color);
}

/* Active Menu Highlights */
.main-navigation [class*="current-menu-"]>a,
.main-navigation [class*="current-page-"]>a,
.main-navigation [class*="current_page_"]>a,
.main-navigation [class*="current-post-"]>a,
.main-navigation .active>a {
    color: var(--accent-color) !important;
}

/* Discussion Area & Comments */
.comments-area {
    margin-top: 80px;
    padding-top: 60px;
    border-top: 1px solid rgba(13, 59, 76, 0.1);
}

/* Story Layout Grid */
.story-layout-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 80px;
    align-items: start;
}

@media (max-width: 992px) {
    .story-layout-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }
}

.story-sidebar-column {
    position: sticky;
    top: 120px;
    /* Account for sticky header */
}

.story-sidebar-column .reflection-panel {
    margin-top: 0;
    padding: 30px;
    background: #fdfdfd;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(13, 59, 76, 0.05);
}

.story-sidebar-column .resource-pill-list {
    margin-bottom: 30px !important;
}

.story-sidebar-column .section-link {
    display: block;
    margin-top: 20px;
    font-weight: 700;
}

.comments-title {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 40px;
}

.comment-list {
    list-style: none;
    padding: 0;
    margin-bottom: 60px;
}

.comment-list .comment-body {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(13, 59, 76, 0.05);
    margin-bottom: 30px;
    position: relative;
    border: 1px solid rgba(13, 59, 76, 0.05);
}

.comment-author vcard {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
}

.comment-author .avatar {
    border-radius: 50%;
    border: 2px solid var(--secondary-color);
}

.comment-author .fn {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.1rem;
}

.comment-metadata {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
}

.comment-content {
    line-height: 1.8;
    color: #444;
}

.comment-list .children {
    list-style: none;
    padding-left: 50px;
    border-left: 2px solid rgba(106, 76, 147, 0.1);
}

.reply {
    margin-top: 15px;
    text-align: right;
}

.comment-reply-link {
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Comment Form */
#reply-title {
    font-size: 1.6rem;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.comment-form p {
    margin-bottom: 20px;
}

.comment-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.comment-form textarea,
.comment-form input[type="text"],
.comment-form input[type="email"] {
    width: 100%;
    padding: 15px;
    border-radius: 12px;
    border: 1px solid rgba(13, 59, 76, 0.1);
    background: #fff;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
}

.comment-form textarea:focus,
.comment-form input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(106, 76, 147, 0.1);
}

/* Login/Logout Special Styling */
.menu-item-login a,
.menu-item-logout a {
    background: var(--primary-color);
    color: #fff !important;
    padding: 8px 18px !important;
    border-radius: 50px;
    transition: background 0.3s ease, transform 0.2s ease !important;
    font-size: 0.75rem !important;
    line-height: 1 !important;
    display: inline-block;
    vertical-align: middle;
}

.menu-item-login a:hover,
.menu-item-logout a:hover {
    background: var(--secondary-color);
    transform: scale(1.05);
    color: #fff !important;
}

/* Post Grid Enhancements */
.post-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.post-grid article {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-grid article:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

/* Category Specific Styles */
.category-education .post-content {
    border-left: 4px solid var(--accent-color);
}

.category-stories .post-content {
    border-left: 4px solid var(--secondary-color);
}

/* Buttons */
.button,
button,
input[type="submit"] {
    display: inline-block;
    padding: 12px 24px;
    background: var(--secondary-color);
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
    box-sizing: border-box;
}

.button:hover {
    background: var(--primary-color);
    color: #fff;
    transform: scale(1.05);
}

/* Accessibility & Readability */
.content-body p {
    margin-bottom: 1.8em;
}

.content-body blockquote {
    font-style: italic;
    border-left: 4px solid var(--secondary-color);
    padding-left: 20px;
    margin: 30px 0;
    color: #555;
    background: #fdfdfd;
    padding-top: 10px;
    padding-bottom: 1px;
}

/* Hero Sections */
.hero-section,
.archive-hero,
.community-hero {
    position: relative;
    overflow: hidden;
    padding: 60px 0 0 0;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 140%;
    height: 140%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

/* Custom Post Type Cards */
.disorder-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.disorder-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.12);
}

.disorder-card .card-image img {
    transition: transform 0.6s ease;
}

.disorder-card:hover .card-image img {
    transform: scale(1.08);
}

/* Story Entry Layout */
.story-entry {
    background: #fff;
    padding: 30px;
    border-radius: 20px;
    transition: background 0.3s ease;
}

.story-entry:hover {
    background: #fcfcfc;
}

/* Tool Cards */
.tool-card {
    transition: all 0.3s ease;
}

.tool-card:hover {
    border-top: 5px solid var(--secondary-color);
}

/* Typography polish */
.site-title a {
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 1.8rem;

    @media (max-width: 768px) {
        font-size: 1.2rem;
    }
}

/* Community Feed */
.discussion-item {
    transition: background 0.2s ease;
}

.discussion-item:hover {
    background: #fafafa;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Disorder Pages Spacing Fixes --- */

/* 1. Reset Global Main Padding so Hero touches header */
.post-type-archive-disorder .site-main,
.single-disorder .site-main {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
}

/* 2. Archive: More space Top, Less space Bottom */
.post-type-archive-disorder .main-content {

    padding-bottom: 120px;
}

.post-type-archive-disorder .archive-grid {
    padding-bottom: 0;
}

/* 3. Single: More space Top, Less space Bottom */
.single-disorder .disorder-layout {
    margin-top: 100px;
    margin-bottom: 60px;
}

/* Disorder Detail Layout */
.single-disorder .site-main {
    /* Kept for legacy override, but handled above */
    padding-top: 0;
}

.disorder-hero {
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 120px 0;
    text-align: center;
}

.disorder-hero-tag {
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    color: var(--accent-color);
    font-weight: bold;
}

.disorder-hero-title {
    color: #fff;
    font-size: 3.5rem;
    margin: 10px 0;
}

.disorder-layout {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 50px;
    margin-top: 40px;
}

.medical-section {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02);
    margin-bottom: 40px;
}

.medical-section h2 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-top: 0;
}

.border-accent h2 {
    border-color: var(--accent-color);
}

.border-secondary h2 {
    border-color: var(--secondary-color);
}

.medical-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.info-placeholder {
    background: var(--bg-light);
    padding: 20px;
    border-radius: 10px;
    font-style: italic;
}

.quick-facts-box {
    background: var(--primary-color);
    color: #fff;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.quick-facts-box h3 {
    color: #fff;
    margin-top: 0;
}

.quick-facts-list {
    list-style: none;
    padding: 0;
    font-size: 0.95rem;
}

.quick-facts-list li {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.related-resources-box {
    background: var(--bg-white);
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 15px;
}

.related-resources-box h3 {
    margin-top: 0;
}

/* Story Detail */
.story-hero {
    background: var(--bg-light);
    padding: 100px 0;
    text-align: center;
}

.story-header {
    text-align: center;
    margin-bottom: 50px;
}

.story-content-wrap {
    max-width: 1400px;
    margin: 0 auto;
    margin-top: 60px;
}

.reflection-panel {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 30px;
    margin-top: 60px;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.03);
    border-left: 5px solid var(--secondary-color);
}

.reflection-panel h3 {
    color: var(--secondary-color);
    margin-top: 0;
}

/* Archive Grids */
.archive-grid {
    padding-bottom: 60px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.disorders-archive-grid {
    grid-template-columns: repeat(3, 1fr);
}

.stories-archive-grid {
    display: block;
    margin-top: 60px;
}

.story-archive-card {
    background: #fff;
    border-radius: 30px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(106, 76, 147, 0.05);
    display: flex;
    flex-direction: column;
    border: 1px solid rgba(13, 59, 76, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
}

.story-archive-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 80px rgba(13, 59, 76, 0.1);
}

.story-archive-card .story-image {
    height: 300px;
    position: relative;
    overflow: hidden;
}

.story-archive-card .story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.story-archive-card .story-card-body {
    padding: 40px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.story-archive-card .story-tag {
    color: var(--secondary-color);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 15px;
    display: block;
}

.story-archive-card h2 {
    font-size: 1.8rem;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.story-archive-card h2 a {
    color: var(--primary-color);
}

.story-archive-card .story-excerpt {
    flex-grow: 1;
    margin-bottom: 30px;
    color: #555;
}

.archive-header {
    margin-bottom: 60px;
}

.archive-header h1 {
    font-size: 3rem;
}

.archive-title-tag {
    color: var(--accent-color);
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
}

/* Community Page */
.community-hero {
    background: var(--bg-white);
    padding: 80px 0;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.community-hero h1 {
    font-size: 3rem;
    color: var(--secondary-color);
    margin: 0;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 40px;
    margin-top: 60px;
}

.tool-card {
    background: #fff;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border-top: 5px solid var(--accent-color);
}

.tool-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.discussion-feed {
    margin-top: 80px;
    background: #fff;
    padding: 40px;
    border-radius: 25px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.02);
}

.discussion-item {
    padding: 20px;
    border-bottom: 1px solid #f0f0f0;
}

.discussion-item:last-child {
    border-bottom: none;
}

.discussion-meta {
    font-size: 0.85rem;
    color: #999;
}

/* Reveal Animations */
.reveal-section {
    opacity: 0;
    transform: translateY(40px);
    transition: all 1s cubic-bezier(0.165, 0.84, 0.44, 1);
    visibility: hidden;
}

.reveal-active {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
}

/* Specific reveal delays for children if needed */
.reveal-active .disorder-card,
.reveal-active .story-testimonial-card {
    animation: fadeInUp 0.8s ease backwards;
}

/* Parallax Container Utility */
.hero-section {
    background-attachment: fixed;
    /* Fallback for browsers without JS */
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
    will-change: background-position;
}

/* Resource Item */
.resource-item {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.03);
    border: 1px solid #f0f0f0;
}

.resource-item h3 {
    margin: 0 0 10px 0;
}

.resource-meta {
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
}

.resource-excerpt {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.resource-link {
    color: var(--primary-color);
    font-weight: bold;
    border-bottom: 2px solid var(--accent-color);
}

/* Contact Form 7 Styling */
.wpcf7-form {
    max-width: 800px;
    margin: 0 auto;
}

.wpcf7-form p {
    margin-bottom: 25px;
}

.wpcf7-form label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form input[type="tel"],
.wpcf7-form input[type="url"],
.wpcf7-form textarea,
.wpcf7-form select {
    width: 100%;
    padding: 15px 20px;
    border-radius: 15px;
    border: 1px solid rgba(13, 59, 76, 0.1);
    background: #fff;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.wpcf7-form input:focus,
.wpcf7-form textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 5px 20px rgba(106, 76, 147, 0.08);
    transform: translateY(-2px);
}

.wpcf7-form textarea {
    min-height: 180px;
    resize: vertical;
}

.wpcf7-submit {
    display: block;
    width: 100%;
    padding: 18px !important;
    font-size: 1.1rem !important;
    border-radius: 50px !important;
    background: var(--primary-color) !important;
    color: #fff !important;
    font-weight: 700 !important;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) !important;
    margin-top: 20px;
    border: none !important;
    cursor: pointer;
}

.wpcf7-submit:hover {
    background: var(--secondary-color) !important;
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(106, 76, 147, 0.2);
}

.wpcf7-response-output {
    margin: 30px 0 0 0 !important;
    padding: 15px 20px !important;
    border-radius: 12px !important;
    border: 2px solid transparent !important;
    font-weight: 600;
}

.wpcf7-mail-sent-ok {
    border-color: #46b450 !important;
    background: #f0f9f0;
}

.wpcf7-validation-errors {
    border-color: #f7e070 !important;
    background: #fffdf0;
}

/* Contact Page Specific */
.page-contact .site-main,
.page-contact-us .site-main {
    margin-top: 100px;
}

/* Homepage Contact CTA */
.home-contact-cta {
    background-color: var(--secondary-color);
    padding: 100px 0;
    color: #fff;
    text-align: center;
    position: relative;
    overflow: hidden;
    margin-top: 0;
    /* Align perfectly with section above */
}

.home-contact-cta::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.home-contact-cta h2 {
    color: #fff;
    font-size: 3rem;
    margin-bottom: 20px;
}

.home-contact-cta p {
    font-size: 1.25rem;
    margin-bottom: 40px;
    opacity: 0.9;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.home-contact-cta .button {
    background: #fff;
    color: var(--secondary-color);
    padding: 18px 40px;
    font-size: 1.1rem;
}

.home-contact-cta .button:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Responsive */
@media (max-width: 768px) {
    /* .site-header-inner styles removed to preserve flex layout */



    .post-hero {
        padding: 40px 0;
    }

    /* Mobile Logo & Title Reductions */
    .site-logo-wrap .custom-logo,
    .site-logo-wrap .custom-logo-link img {
        max-height: 40px !important;
        /* Slightly smaller logo image too just in case */
        width: auto;
    }

    .site-branding .site-title {
        font-size: 0.75rem;
        /* Much smaller text */
        line-height: 1.2;
        margin-top: 5px;
        /* Adjust alignment */
    }

    /* Ensure Single Column Layouts on Mobile with Explicit Spacing */
    .post-grid,
    .stories-grid,
    .disorders-archive-grid {
        display: flex;
        /* Fallback/Ensure vertical stacking if grid fails */
        flex-direction: column;
        gap: 50px !important;
        /* Increased gap */
    }

    .disorder-card,
    .story-testimonial-card {
        margin-bottom: 30px;
        /* Fallback spacing */
        width: 100%;
    }

    .post-hero h1 {
        font-size: 1.75rem;
    }

    .hero-section {
        height: auto;
        padding: 80px 0;
    }

    .hero-section h1 {
        font-size: 2.5rem !important;
    }

    .featured-story {
        grid-template-columns: 1fr !important;
        gap: 30px !important;
    }

    .story-image {
        aspect-ratio: 16/9 !important;
    }

    .featured-story {
        grid-template-columns: 1fr !important;
    }


}

@media (max-width: 1024px) {
    .disorders-archive-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .disorders-archive-grid {
        grid-template-columns: 1fr;
    }
}


.doctor-profile-header-right {
    display: flex;
    align-items: center;      /* Keeps image and text centered vertically */
    justify-content: flex-start; /* Aligns everything to the right side of the page */
    gap: 20px;                /* Space between text and image */
    text-align: left;        /* Aligns the text lines to the right */
    margin-bottom: 20px;
}

.doctor-circle-img {
    width: 90px;              /* Adjust size as needed */
    height: 90px;             /* Must match width for a perfect circle */
    border-radius: 50%;       /* Makes it a circle */
    object-fit: cover;        /* Ensures the face isn't stretched */
    border: 2px solid #f0f0f0;
    order: 2;                 /* Ensures image stays on the far right */
}

.doctor-title {
    margin: 0;
    line-height: 1.3;
}

.doctor-title span {
    font-size: 0.85em;
    font-weight: 400;
    color: #666;
}