/* ==========================================================================
   Theme Information
   ========================================================================== */
/*
 Theme Name: My Custom Theme
 Theme URI: https://example.com
 Author: Your Name
 Author URI: https://example.com
 Description: A custom WordPress theme with shared header, footer, and sidebar, optimized for blog and static pages.
 Version: 1.0
*/

/* ==========================================================================
   Design System - Variables
   ========================================================================== */
:root {
    --main-bg-color: white;
    --main-text-color: black;
    --font-family: 'Roboto', Arial, sans-serif;
    --max-content-width: 800px;
    --padding-standard: 16px;
}

/* ==========================================================================
   Global Styles
   ========================================================================== */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-family);
    background-color: var(--main-bg-color);
    color: var(--main-text-color);
}

/* ==========================================================================
   Headers - Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    line-height: 1.3;
    font-weight: bold;
    font-family: var(--font-family);
    color: var(--main-text-color);
}

/* Header Size and Thickness */
h1 {
    font-size: 3rem; /* Largest header */
    font-weight: 800; /* Extra bold for emphasis */
    margin-bottom: 1rem;
}

h2 {
    font-size: 2.5rem; /* Slightly smaller */
    font-weight: 700; /* Bold */
    margin-bottom: 1rem;
}

h3 {
    font-size: 2rem; /* Moderate size */
    font-weight: 600; /* Semi-bold */
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.75rem; /* Smaller subheading */
    font-weight: 500; /* Medium weight */
    margin-bottom: 0.75rem;
}

h5 {
    font-size: 1.5rem; /* Supporting header */
    font-weight: 400; /* Normal weight */
    margin-bottom: 0.5rem;
}

h6 {
    font-size: 1.25rem; /* Smallest header */
    font-weight: 400; /* Normal weight */
    margin-bottom: 0.5rem;
}


/* ==========================================================================
   Header Components
   ========================================================================== */
   
header {
    top: 0;
    right: 0;
    left: 0;
    background-color: var(--main-bg-color);
    padding: var(--padding-standard);
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* Logo */
header .logo {
    margin-right: auto;  /* This pushes the menu items to the right */
    text-decoration: none;
    color: var(--main-text-color);
    font-size: 2.25rem;
    padding: 8px 12px;
    display: flex;
    align-items: center;
    transition: color 0.3s ease;
}

header .logo:hover {
    color: #666;
}

/* Header Navigation */
header .menu {
    display: flex;
    flex-direction: row;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: var(--padding-standard);
}

header .menu a {
    text-decoration: none;
    color: var(--main-text-color);
    padding: 8px 12px;
    font-weight: bold;
    display: block;
    white-space: nowrap;
    transition: color 0.3s ease;
}

header .menu a:hover {
    color: #666;
}

header .menu li {
    margin: 0;
    padding: 0;
    display: inline-block;
}

header .menu li a {
    text-decoration: none;
    color: var(--main-text-color);
    font-weight: bold;
    padding: 8px 12px;
    display: block;
    white-space: nowrap;
    transition: color 0.3s ease;
}

header .menu li a:hover {
    color: #666;
}

/* ==========================================================================
   Main Content Area
   ========================================================================== */
.content {
    margin-top: 60px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    max-width: var(--max-content-width);
    margin-left: auto;
    margin-right: auto;
    padding: var(--padding-standard);
    position: relative;
    z-index: 1;
}

.content h1 {
    text-align: center;
}

.content img {
    max-width: 100%;
    height: auto;
    margin-bottom: var(--padding-standard);
    border-radius: 10px;
}

.content p {
    text-align: justify;
    line-height: 1.6;
    margin-bottom: var(--padding-standard);
}

/* ==========================================================================
   Sidebar Components
   ========================================================================== */
.sidebar {
    position: fixed;
    top: 50%;
    right: var(--padding-standard);
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--padding-standard);
    background-color: transparent;
}

/* Sidebar Widgets */
.widget {
    margin-bottom: var(--padding-standard);
    padding: var(--padding-standard);
    background-color: #f9f9f9;
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.widget-title {
    font-weight: bold;
    margin-bottom: 8px;
    color: var(--main-text-color);
}

.sidebar a {
    text-decoration: none;
    color: var(--main-text-color);
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* ==========================================================================
   Footer Components
   ========================================================================== */
footer {
    margin-top: var(--padding-standard);
    text-align: center;
    background-color: var(--main-bg-color);
    padding: var(--padding-standard);
}

/* Footer Navigation */
footer .menu {
    display: flex;
    justify-content: center;
    gap: var(--padding-standard);
    margin: 0;
    padding: 0;
}

footer .menu a {
    text-decoration: none;
    color: var(--main-text-color);
    padding: 8px 12px;
    font-weight: bold;
    display: block;
    white-space: nowrap;
    transition: color 0.3s ease;
}

footer .menu a:hover {
    color: #666;
}


/* ==========================================================================
   Blog/Landing Page Components
   ========================================================================== */

/* Index page specific styles */
.home:not(.page) main {
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.home:not(.page) h2 {
    margin-bottom: 3.5rem;
}

article {
    background: white;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

article a {
    color: inherit !important;
    text-decoration: none;
}

article a:hover {
    color: #666 !important;
}

article h3 {
    margin-bottom: 1rem;
}

article h3 a {
    color: inherit;
    text-decoration: none;
}

.post-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.post-stats {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: #666;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.dot {
    font-size: 0.5rem;
    line-height: 1;
    vertical-align: middle;
}

main {
    max-width: 1000px;
    margin: 0 auto;
    padding: 2rem;
}

/* ==========================================================================
   About Page (.page-id-223) — refined, balanced with global layout
   ========================================================================== */
.page-id-223 .content {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  justify-content: center;
  gap: 3rem;
  max-width: 1000px;           /* aligns with other page sections */
  margin: 5.5rem auto;           /* gives it breathing room from header/footer */
  padding: 0 1.5rem;           /* subtle horizontal padding for consistency */
}

.page-id-223 .wp-block-image {
  flex: 0 0 32%;               /* moderate size for harmony */
  max-width: 32%;
  margin: 0;
}

.page-id-223 .wp-block-image img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);  /* subtle depth, matches minimalist tone */
}

.page-id-223 .bio-text {
  flex: 1;
  max-width: 60%;
  line-height: 1.65;
  font-size: 1rem;
}

.page-id-223 .bio-text h3,
.page-id-223 .bio-text h4 {
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .page-id-223 .content {
    max-width: 90%;
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .page-id-223 .content {
    flex-direction: column;
    align-items: center;
    margin: 2rem auto;
    padding: 0 1rem;
  }

  .page-id-223 .wp-block-image,
  .page-id-223 .bio-text {
    max-width: 100%;
  }

  .page-id-223 .wp-block-image {
    margin-bottom: 2rem;
  }
}


/* ==========================================================================
   Blog/Landing Page Components - NO LONGER ACTIVE!
   ========================================================================== */
   
 /* Single post specific styles */
.single-post main {
    min-height: calc(100vh - 60px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-top: 60px;
    max-width: 800px;
}

.single-post p {
  font-size: 16px; /* Base font size */
  line-height: 1.6; /* Comfortable line spacing */
  text-align: left; /* Align text to the left */
  margin: 1em 0; /* Space between paragraphs */
  hyphens: auto; /* Enable word breaking for narrow screens */
  word-spacing: 0.05em; /* Slightly spaced-out words */
  letter-spacing: 0.03em; /* Subtle letter spacing */
}

/* ==========================================================================
   About Page Styles (page-id-8)
   ========================================================================== */
.page-id-8 h1 {
    display: none;
}

/* UPDATED to avoid conflicting with the row layout above */
.page-id-8 .wp-block-image {
    margin: 0;           /* remove centering */
    /* removed: max-width: 300px; width: 100%; */
}

.page-id-8 .wp-block-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
}

.page-id-8 .wp-block-paragraph {
    max-width: 800px;
    margin: 1.5rem auto;
    line-height: 1.6;
}

.page-id-12 .content {
    max-width: 100%;
    overflow-x: hidden;
    padding: 0;
}

.page-id-12 .books-container {
    max-width: 1600px;
    width: 90%;
    margin: 0 auto;
    padding: 2rem;
}

.page-id-12 .book-layout {
    display: flex;
    gap: 2rem;
    align-items: center;
    margin-bottom: 4rem;
}

.page-id-12 .book-image {
    flex: 0 0 33.333%;
    max-width: 400px;
}

.page-id-12 .book-image figure {
    margin: 0;
}

.page-id-12 .book-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.page-id-12 .book-content {
    flex: 1;
    display: flex;           /* Added */
    flex-direction: column;  /* Added */
    justify-content: center; /* Added */
    min-height: 100%;       /* Added */
}



.page-id-12 .quotes-grid {
    display: none
}

/* .page-id-12 .quotes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
} 
*/

.page-id-12 .quote-box {
    text-align: center;
}

.page-id-12 .quote {
    font-size: 1.25rem;
    font-weight: 500;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.page-id-12 .outlet {
    font-size: 1rem;
    color: #666;
    font-style: italic;
}

.page-id-12 .button-container {
    text-align: center;
}

.page-id-12 .buy-button {
    background-color: red;
    color: white;
    padding: 12px 30px;
    border-radius: 25px;
    font-size: 16px;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.page-id-12 .buy-button:hover {
    background-color: #45a049;
}

/* Articles and Dissemination sections */
.page-id-12 .articles-section,
.page-id-12 .dissemination-section {
    max-width: 800px;
    margin: 4rem auto;
    padding: 0 2rem;
}

.page-id-12 .header-description {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto 2rem auto;  /* Bottom margin moved from h1 to here */
    padding: 0 2rem;
    text-align: left;
    width: 100%;
}

.page-id-12 h1 {
    max-width: 800px;
    margin: 0 auto 2rem auto;  /* Reset margins */
    padding: 0 2rem;          /* Match the padding of other sections */
    text-align: left;
    width: 100%;              /* Ensure full width within container */
}

.page-id-12 h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    text-align: left;     /* Left align h2 */
}

.page-id-12 .articles-section ul,
.page-id-12 .dissemination-section ul {
    list-style-type: none;
    padding: 0;
}

.page-id-12 .articles-section li,
.page-id-12 .dissemination-section li {
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

/* Mobile Styles for page-id-12 */
@media (max-width: 1024px) {
    .page-id-12 .quotes-grid {
        grid-template-columns: 1fr;
    }

    .page-id-12 .quote-box {
        display: none;
    }

    .page-id-12 .quotes-grid .quote-box:nth-child(2) {
        display: block;
    }
}

@media (max-width: 781px) {

    .page-id-12 .book-layout {
        flex-direction: column;
        align-items: center;
        gap: 0rem;  /* Reduced from 2rem */
        margin-bottom: 0px;
    }

    .page-id-12 .quotes-grid {
        gap: 0.5rem;  /* Reduced for quotes */
        margin-bottom: 1rem;
    }

    .page-id-12 .book-image {
        max-width: 300px;
        margin-bottom: 1rem;
    }

    .page-id-12 .button-container {
        margin-top: 1rem;
    }

    /* Reduce padding around the container */
    .page-id-12 .books-container {
        padding: 1rem;
        gap: 1rem;  /* Add gap control for container */
    }
}

/* ==========================================================================
   Lectures Page Styles - Minimalist Design
   ========================================================================== */
/* Reset default spacing */
.lectures-container * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.intro-text {
    margin-top: 2rem;
}

.lectures-container {
    max-width: 800px;
    margin: 80px auto;
}

/* Typography */
.page-title {
    font-size: 2.5rem;
    font-weight: 300;
    margin-bottom: 2rem;
    letter-spacing: -0.5px;
}

.intro-text {
    font-size: 1.2rem;
    line-height: 1.6;
    color: #444;
    margin-bottom: 4rem;
    font-weight: 300;
}

/* Lecture List */
/* Lecture List */
.lecture-list {
    display: grid;
    gap: 3rem;  /* Increased from 2rem to 3rem for more spacing */
    margin: 4rem 0;
}

.lecture-item {
    padding: 2rem;
    background: #f8f8f8;
    border-radius: 4px;
    transition: transform 0.2s ease;
}

.lecture-item:hover {
    transform: translateY(-2px);
}

.lecture-item h3 {
    font-size: 1.4rem;
    margin-bottom: 1rem;
    font-weight: 400;
}

.lecture-item p {
    color: #666;
    line-height: 1.5;
}

/* Schedule Section */
.schedule-section {
    margin: 4rem 0;
}

.schedule-list {
    margin-top: 2rem;
}

.schedule-item {
    display: flex;
    gap: 2rem;
    padding: 1.5rem 0;
    border-bottom: 1px solid #eee;
}

.date {
    font-family: monospace;
    color: #888;
}

.details {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* Testimonials */
.testimonials-minimal {
    margin: 4rem 0;
    padding: 4rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.testimonial {
    font-size: 1.2rem;
    line-height: 1.6;
    margin: 2rem 0;
}

.testimonial cite {
    display: block;
    margin-top: 1rem;
    font-size: 0.9rem;
    color: #666;
}

/* Contact Section */
.contact-minimal {
    text-align: center;
    margin: 4rem 0;
}

.minimal-button {
    display: inline-block;
    padding: 1rem 2rem;
    background: #000;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 1rem;
    transition: background 0.2s ease;
}

.minimal-button:hover {
    background: #333;
}

/* ==========================================================================
   Contact Page Styles (page-id-16)
   ========================================================================== */
.page-id-16 .site-main {
    display: flex;
    align-items: center;
    min-height: 100vh;
    padding: 40px 0;
}

.page-id-16 .modern-form {
    max-width: 800px;
    margin: auto;
    width: 100%;
}

/* Form Layout */
.page-id-16 .form-row {
    display: flex;
    gap: 40px;
    margin-bottom: 30px;
}

.page-id-16 .form-col {
    flex: 1;
    width: 50%;
}

/* Form Elements */
.page-id-16 .form-field {
    width: 100%;
    padding: 12px;
    margin-bottom: 20px;
    border: 4px solid #000;
    font-size: 16px;
    box-sizing: border-box;
}

/* Submit button container */
.page-id-16 .wpcf7-form p:last-child {
    text-align: right;
}

.page-id-16 .wpcf7-submit {
    background-color: #000;
    color: white;
    padding: 16px 32px;
    border: 4px solid #000;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 120px;
    text-transform: uppercase;
}

.page-id-16 .wpcf7-spinner {
    display: none;
}


/* ==========================================================================
   Responsive Design
   ========================================================================== */

/* Add this new media query for the scroll behavior */

@media (max-width: 1024px) {
    header {
        transition: transform 0.3s ease-in-out;
        z-index: 1000;
    }

    header.hidden {
        transform: translateY(-100%);
    }
}

@media (max-width: 768px) {
    /* Header Mobile Styles */
    header {
        height: auto;
        padding: 0;
    }

    header .menu {
        width: 100%;
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        gap: var(--padding-standard);
    }

    /* Sidebar Mobile Styles */
    .sidebar {
        position: static;
        transform: none;
        width: 100%;
        margin: var(--padding-standard) 0;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 2rem;
    }

    /* Content Mobile Styles */
    .content {
        padding-top: 40px;
    }

    /* About Page Mobile Styles */
    .page-id-8 .wp-block-image {
        max-width: 250px;
    }

    /* Contact Page Mobile Styles */
    .page-id-16 .form-row {
        flex-direction: column;
        gap: 20px;
    }

    .page-id-16 .form-col {
        width: 100%;
    }
}

@media (max-width: 781px) {
    /* Publications Page Mobile Styles */
    .page-id-12 .books {
        padding: 1rem;
    }
    
    .page-id-12 .main-columns {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }
    
    .page-id-12 .right-content {
        width: 100%;
    }
    
    .page-id-12 .section {
        display: none;
    }
    
    .page-id-12 .top-row .section:nth-child(2) {
        display: flex;
    }
}

@media (min-width: 769px) {
    .sidebar {
        display: flex;
    }
}

/* Blog Post Specific Styles */
/* Global blog layout */
.post-type-post main,
.blog main {
    margin-top: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    padding: var(--padding-standard);
}

/* Article styling */
.post-type-post article,
.blog article {
    margin-bottom: 4rem;
}

/* Meta information */
.post-type-post .post-meta,
.blog .post-meta {
    text-transform: uppercase;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

/* Title styling */
.post-type-post .post-title,
.blog .post-title {
    font-size: 2rem;
    margin-bottom: 1.5rem;
    color: #333;
}

/* Content area */
.post-type-post .post-content,
.blog .post-content {
    color: #333;
    line-height: 1.6;
    margin-bottom: 2rem;
}

/* Footer area */
.post-type-post .post-footer,
.blog .post-footer {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2rem;
}

/* Action buttons container */
.post-type-post .post-actions,
.blog .post-actions {
    display: flex;
    gap: 1rem;
}

/* Individual action buttons */
.post-type-post .action-button,
.blog .action-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #666;
}

/* Share button specific */
.post-type-post .share-button,
.blog .share-button {
    margin-left: auto;
}

/* Single Post Mobile Styles */
@media (max-width: 781px) {
    .single-post main {
        padding: 1rem;
    }
    
    .single-post .post-meta {
        display: none;
    }
}

/* Add this to your existing media query section */
@media (max-width: 768px) {
    /* Hide logo on mobile */
    header .logo {
        display: none;
    }

    /* Adjust header menu to take full width since logo is hidden */
    header .menu {
        width: 100%;
        justify-content: center;
    }
}
