/* ============================================
   THE PICKY PATIENT THEME - CUSTOM LAYOUT
   ============================================ */

/* ===== CSS VARIABLES ===== */
:root {
    --color-primary: #9a74db;
    --color-sidebar: #5f4c62;
    --color-text: #1f2937;
    --color-text-light: #6b7280;
    --color-background: #f3f4f6;
    --color-white: #ffffff;
    --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* ===== RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-background);
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ===== HERO HEADER ===== */
.site-hero {
    position: relative;
    height: 350px;
    background-image: url('../images/header-bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

/* Dark overlay for better text readability */
.site-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.site-hero-content {
    position: relative;
    z-index: 2;
    padding: 2rem;
    max-width: 900px;
}

/* To use a custom background image from Ghost settings, add this class to your Ghost settings:
   Upload a cover image in Settings → General → Publication cover
   Or replace the URL above with your own image */

.site-title-large {
    font-size: 4rem;
    font-weight: 700;
    color: var(--color-white);
    text-shadow: 
        -2px -2px 0 #000,
        2px -2px 0 #000,
        -2px 2px 0 #000,
        2px 2px 0 #000,
        0 0 10px rgba(0,0,0,0.5);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.site-logo-image {
    max-height: 100px;
    margin: 0 auto;
    filter: drop-shadow(0 0 10px rgba(0,0,0,0.8));
}

.site-subtitle {
    font-size: 1.5rem;
    color: var(--color-white);
    text-shadow: 
        -1px -1px 0 #000,
        1px -1px 0 #000,
        -1px 1px 0 #000,
        1px 1px 0 #000,
        0 0 8px rgba(0,0,0,0.7);
    line-height: 1.4;
    max-width: 700px;
    margin: 0 auto;
}

/* ===== NAVIGATION BAR ===== */
.site-nav {
    background: #5f4c62;
    padding: 1rem 0;
}

.site-nav-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: center;
}

/* Target the UL that Ghost's {{navigation}} helper creates */
.site-nav-content ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.site-nav-content li {
    margin: 0;
}

.site-nav a {
    color: var(--color-white);
    font-weight: 500;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    transition: background 0.2s;
    display: block;
}

.site-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
    border-radius: 4px;
}

/* ===== MAIN CONTAINER WITH SIDEBAR ===== */
.site-container {
    display: flex;
    max-width: 1400px;
    margin: 0 auto;
    min-height: calc(100vh - 500px);
}

/* ===== LEFT SIDEBAR ===== */
.site-sidebar {
    width: 260px;
    background: var(--color-sidebar);
    color: var(--color-white);
    padding: 2rem 1.5rem;
    flex-shrink: 0;
}

.sidebar-section {
    margin-bottom: 2rem;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
}

.sidebar-posts {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-post-link {
    color: var(--color-white);
    padding: 0.5rem;
    border-radius: 4px;
    transition: background 0.2s;
    display: block;
}

.sidebar-post-link:hover {
    background: rgba(255, 255, 255, 0.1);
    text-decoration: none;
}

/* ===== MAIN CONTENT AREA ===== */
.site-main {
    flex: 1;
    background: var(--color-white);
    padding: 3rem;
}

/* ===== HOMEPAGE STYLES ===== */
.welcome-section {
    margin-bottom: 3rem;
}

.welcome-section h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
    text-align: center;
}

.video-placeholder {
    background: var(--color-background);
    padding: 4rem 2rem;
    text-align: center;
    border-radius: 8px;
    color: var(--color-text-light);
    font-style: italic;
    margin-bottom: 3rem;
    min-height: 200px; /* Add this */
    max-height: 400px; /* Add this */
}

.post-feed {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.post-card {
    background: var(--color-white);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: box-shadow 0.2s;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.post-card-content {
    padding: 2rem;
}

.post-card-title {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.post-card-title a {
    color: var(--color-text);
}

.post-card-excerpt {
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.7;
}

.post-card-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.875rem;
    color: var(--color-text-light);
    align-items: center;
}

/* ===== SINGLE POST STYLES ===== */
.post-header {
    margin-bottom: 2rem;
}

.post-title {
    font-size: 2.5rem;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.featured-post {
    border: 2px solid var(--color-primary);
    background: linear-gradient(135deg, rgba(154, 116, 219, 0.05) 0%, transparent 100%);
    margin-bottom: 3rem; /* Add this line */
}
.featured-badge {
    display: inline-block;
    background: var(--color-primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.post-feature-image {
    margin: 2rem 0;
    border-radius: 8px;
    overflow: hidden;
}

.post-content {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-text);
}

.post-content h2,
.post-content h3 {
    margin: 2rem 0 1rem;
    color: var(--color-text);
}

.post-content p {
    margin-bottom: 1.5rem;
}

.post-content img {
    margin: 2rem auto;
    border-radius: 8px;
}

.post-content blockquote {
    border-left: 4px solid var(--color-primary);
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: var(--color-text-light);
}

.post-content code {
    background: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.9em;
}

.post-content pre {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 2rem 0;
}

.post-content pre code {
    background: none;
    padding: 0;
}

/* ===== POST FOOTER ===== */
.post-footer {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.post-tags {
    margin-bottom: 2rem;
}

.post-tag {
    display: inline-block;
    background: #f3f4f6;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    margin: 0.25rem;
    font-size: 0.875rem;
    color: var(--color-text);
}

.author-card {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: #f9fafb;
    border-radius: 8px;
}

.author-profile-image,
.author-card-image {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
}

/* ===== PAGE STYLES ===== */
.page-header {
    margin-bottom: 2rem;
}

.page-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-text);
}

.page-content {
    font-size: 1.125rem;
    line-height: 1.8;
}

.page-content h2,
.page-content h3 {
    margin: 2rem 0 1rem;
}

.page-content p {
    margin-bottom: 1.5rem;
}

/* ===== ERROR PAGE ===== */
.error-content {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.error-container {
    text-align: center;
    padding: 2rem;
}

.error-code {
    font-size: 6rem;
    font-weight: 700;
    color: var(--color-primary);
}

.error-description {
    font-size: 1.5rem;
    color: var(--color-text-light);
    margin: 1rem 0 2rem;
}

.error-link {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: white;
    border-radius: 6px;
    font-weight: 500;
}

/* ===== FOOTER ===== */
.site-footer {
    background: var(--color-sidebar);
    color: var(--color-white);
    padding: 2rem;
    text-align: center;
    margin-top: 0;
}

.site-footer-content {
    max-width: 1400px;
    margin: 0 auto;
}

/* ===== PAGINATION ===== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb;
}

.pagination a {
    padding: 0.5rem 1rem;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 4px;
    font-weight: 500;
}

.pagination a:hover {
    text-decoration: none;
    opacity: 0.9;
}

.pagination .page-number {
    padding: 0.5rem 1rem;
}

/* ===== GHOST CARD WIDTHS (REQUIRED) ===== */
.kg-width-wide {
    width: 100%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.kg-width-full {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

/* Ghost gallery card styles */
.kg-gallery-container {
    display: flex;
    flex-direction: column;
    max-width: 1200px;
    margin: 2rem auto;
}

.kg-gallery-row {
    display: flex;
    flex-direction: row;
    justify-content: center;
    gap: 0.5rem;
}

.kg-gallery-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 968px) {
    .site-container {
        flex-direction: column;
    }
    
    .site-sidebar {
        width: 100%;
        order: 2;
    }
    
    .site-main {
        order: 1;
        padding: 2rem;
    }
    
    .site-title-large {
        font-size: 2.5rem;
    }
    
    .site-subtitle {
        font-size: 1.125rem;
    }
    
    .site-hero {
        height: 250px;
    }
    
    .site-nav-content {
        gap: 1rem;
        padding: 1rem;
        flex-wrap: wrap;
    }
}

@media (max-width: 640px) {
    .site-title-large {
        font-size: 2rem;
    }
    
    .site-subtitle {
        font-size: 1rem;
    }
    
    .site-main {
        padding: 1.5rem;
    }
    
    .post-title {
        font-size: 1.875rem;
    }
    
    .site-nav-content {
        gap: 0.5rem;
    }
    
    .site-nav a {
        font-size: 0.875rem;
        padding: 0.4rem 0.75rem;
    }

    /* ===== VIDEOS PAGE STYLES ===== */
.videos-page {
    max-width: 100%;
}

.videos-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
}

.videos-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.videos-description {
    font-size: 1.125rem;
    color: var(--color-text-light);
}

/* Video Grid Layout */
.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

/* Individual Video Card */
.video-card {
    background: var(--color-white);
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}

.video-card-link {
    display: block;
    color: inherit;
    text-decoration: none;
}

/* Video Thumbnail */
.video-thumbnail {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* 16:9 aspect ratio */
    background: #f3f4f6;
    overflow: hidden;
}

.video-thumbnail img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-placeholder {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--color-sidebar) 0%, var(--color-primary) 100%);
    color: white;
}

/* Play Button Overlay */
.video-play-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0.9;
    transition: opacity 0.2s, transform 0.2s;
    pointer-events: none;
}

.video-card:hover .video-play-overlay {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.1);
}

.video-play-overlay svg {
    margin-left: 4px; /* Slight offset to center the play triangle */
}

/* Video Card Content */
.video-card-content {
    padding: 1.5rem;
}

.video-card-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--color-text);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;  /* Add this line */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card-excerpt {
    font-size: 0.9375rem;
    color: var(--color-text-light);
    margin-bottom: 1rem;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;  /* Add this line */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.video-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: var(--color-text-light);
}

.video-duration {
    font-weight: 500;
}

/* Empty State */
.videos-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-light);
    font-size: 1.125rem;
}

/* Responsive Design */
@media (max-width: 968px) {
    .videos-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 640px) {
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .videos-title {
        font-size: 2rem;
    }
    
    .video-card-content {
        padding: 1.25rem;
    }
}

/* ===== WRITINGS PAGE STYLES (Classic Blog) ===== */
.writings-page {
    max-width: 100%;
}

.writings-header {
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e5e7eb;
}

.writings-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--color-text);
    margin-bottom: 0.5rem;
}

.writings-description {
    font-size: 1.125rem;
    color: var(--color-text-light);
}

/* Classic Blog List */
.writings-list {
    display: flex;
    flex-direction: column;
}

/* Individual Post */
.writing-post {
    margin-bottom: 3rem;
}

.writing-post-title {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

.writing-post-title a {
    color: var(--color-text);
    text-decoration: none;
}

.writing-post-title a:hover {
    color: var(--color-primary);
}

/* Post Meta */
.writing-post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    color: var(--color-text-light);
    margin-bottom: 1.5rem;
}

.post-author {
    font-weight: 500;
}

.meta-separator {
    color: #d1d5db;
}

/* Post Image */
.writing-post-image {
    margin-bottom: 1.5rem;
}

.writing-post-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Post Excerpt */
.writing-post-excerpt {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--color-text);
    margin-bottom: 1.25rem;
}

/* Read More Link */
.read-more {
    display: inline-block;
    color: var(--color-primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s;
}

.read-more:hover {
    color: var(--color-text);
}

/* Post Divider */
.post-divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 3rem 0 0 0;
}

.writing-post:last-child .post-divider {
    display: none;
}

/* Pagination */
.writings-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2rem 0;
    margin-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

.pagination-btn {
    padding: 0.75rem 1.5rem;
    background: var(--color-primary);
    color: var(--color-white);
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.2s;
}

.pagination-btn:hover {
    opacity: 0.9;
}

.pagination-info {
    color: var(--color-text-light);
    font-size: 0.9375rem;
}

/* Empty State */
.writings-empty {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--color-text-light);
    font-size: 1.125rem;
}

/* Responsive Design */
@media (max-width: 640px) {
    .writings-title {
        font-size: 2rem;
    }
    
    .writing-post-title {
        font-size: 1.5rem;
    }
    
    .writing-post-meta {
        flex-wrap: wrap;
        font-size: 0.875rem;
    }
    
    .writings-pagination {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pagination-btn {
        width: 100%;
        text-align: center;
    }
}
@media (max-width: 640px) {
    /* ... existing mobile styles ... */
    
    .welcome-section {
        margin-bottom: 2rem;
    }
    
    .video-placeholder {
        padding: 2rem 1rem;
        min-height: 150px;
    }
}

/* ===== IMPROVED LINK COLORS (Dark Purple) ===== */
.site-main a {
    color: #42235c; /* Dark purple for better contrast */
    text-decoration: underline;
}

.site-main a:hover {
    color: #7c44a7; /* Even darker on hover */
}

/* Exception: Card/title links don't need underlines */
.post-card-title a,
.video-card-link,
.writing-post-title a,
.video-card-title a {
    text-decoration: none;
    color: var(--color-text);
}

.post-card-title a:hover,
.writing-post-title a:hover,
.video-card-title a:hover {
    color: #7c44a7;
}

/* Read more links should be purple */
.read-more {
    color: #7c44a7;
    text-decoration: none;
}

.read-more:hover {
    color: #7c44a7;
    text-decoration: underline;
}

/* ===== GHOST MEMBERSHIP PORTAL OVERRIDES ===== */
.gh-portal-triggerbtn-wrapper,
.gh-portal-triggerbtn-container {
    background: transparent !important;
}

.gh-portal-triggerbtn-wrapper a,
.gh-portal-triggerbtn-container a,
.gh-portal-triggerbtn-wrapper button,
.gh-portal-triggerbtn-container button {
    color: #42235c !important; /* Dark purple */
    background: transparent !important;
    text-decoration: underline !important;
}

.gh-portal-triggerbtn-wrapper a:hover,
.gh-portal-triggerbtn-container a:hover,
.gh-portal-triggerbtn-wrapper button:hover,
.gh-portal-triggerbtn-container button:hover {
    color: #7c44a7 !important; /* Darker purple on hover */
}

/* Comments section styling */
.comments {
    margin-top: 3rem;
}

.comments a {
    color: #6b21a8 !important;
}

.comments a:hover {
    color: #581c87 !important;
}
/* ===== SIDEBAR USER/MEMBER AREA ===== */
.sidebar-user {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.sidebar-message {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9375rem;
    line-height: 1.5;
    margin-bottom: 0.5rem;
}

/* Member Profile (when logged in) */
.member-profile {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.member-avatar {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.member-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.member-avatar-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-primary);
    color: white;
    font-size: 1.5rem;
    font-weight: 600;
    text-transform: uppercase;
}

.member-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.member-name {
    color: white;
    font-weight: 600;
    font-size: 1rem;
    margin: 0;
}

.member-email {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin: 0;
}

/* Member Actions (buttons) */
.member-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.sidebar-btn {
    display: block;
    padding: 0.75rem 1rem;
    text-align: center;
    border-radius: 6px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    background: transparent;
}

.sidebar-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
}

.sidebar-btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.sidebar-btn-primary:hover {
    background: #7c3aed;
    border-color: #7c3aed;
}

/* Responsive adjustments */
@media (max-width: 968px) {
    .member-profile {
        align-items: center;
    }
}
}