/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: 'Lora', Georgia, serif;
    color: #333;
    line-height: 1.7;
    background-color: #fff;
    overflow-x: hidden;
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 500;
    letter-spacing: 3px;
    color: #333;
}

.logo a {
    color: inherit;
    text-decoration: none;
}

.nav {
    display: flex;
    gap: 40px;
}

.nav a {
    text-decoration: none;
    color: #666;
    font-weight: 400;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    padding: 8px 12px;
    border-radius: 4px;
}

.nav a:hover {
    color: #333;
}

/* Hero Section */
.hero {
    padding: 35px 0;
    text-align: center;
}

.hero-title {
    font-family: 'Lavishly Yours', cursive;
    font-size: 3rem;
    font-weight: 400;
    color: #333;
    margin-bottom: 15px;
}

.hero-subtitle {
    color: #777;
    font-size: 1rem;
    margin-top: 6px;
}

.underline {
    width: 200px;
    height: 2px;
    background: linear-gradient(90deg, #4db8a8, #3da195);
    margin: 0 auto;
}

/* Endorsement Banner */
.endorsement-banner {
    background: linear-gradient(135deg, #f8fffe 0%, #f0f9f8 100%);
    border-top: 1px solid #e8f4f2;
    border-bottom: 1px solid #e8f4f2;
    padding: 50px 0;
    margin: 0;
}

.endorsement-content {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
}

.quote-icon {
    width: 48px;
    height: 48px;
    color: #4db8a8;
    opacity: 0.3;
    position: absolute;
    top: -10px;
    left: -15px;
}

.endorsement-quote {
    margin: 0;
    padding: 0 0 0 50px;
}

.endorsement-quote p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
    font-style: italic;
    margin-bottom: 20px;
}

.endorsement-author {
    display: flex;
    align-items: center;
    gap: 15px;
    font-style: normal;
    padding-left: 30px;
    border-left: 3px solid #4db8a8;
}

.author-photo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #4db8a8;
    flex-shrink: 0;
}

.author-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.endorsement-author strong {
    font-size: 1.05rem;
    color: #333;
    font-weight: 600;
}

.endorsement-author span {
    font-size: 0.95rem;
    color: #666;
}

.endorsement-author em {
    font-style: italic;
}

/* Main Content */
.main-content {
    padding: 40px 0 80px;
}

.book-intro {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 40px;
    margin-bottom: 60px;
}

.intro-image img {
    width: 100%;
    max-width: 400px;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.intro-text {
    font-size: 1rem;
    color: #555;
}

.intro-text p {
    margin-bottom: 25px;
}

.intro-text em {
    font-style: italic;
}

/* Book Card */
.book-card {
    display: flex;
    align-items: center;
    gap: 30px;
    padding: 30px;
    margin-top: 30px;
    background: transparent;
}

.book-cover {
    width: 220px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 4px;
    background-color: #cecfca;
    padding: 8px;
}

.book-info h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.book-subtitle {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 20px;
}

.button-group {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.btn-preorder {
    display: inline-block;
    background: linear-gradient(135deg, #4db8a8, #3da195);
    color: #fff;
    padding: 12px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-preorder:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 161, 149, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, #888, #666);
}

.btn-secondary:hover {
    box-shadow: 0 6px 20px rgba(102, 102, 102, 0.3);
}

/* About the Book */
.about-book {
    margin-bottom: 60px;
}

.about-book h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 25px;
}

.about-book p {
    font-size: 1rem;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.8;
}

/* About Author Page */
.about-author {
    margin-bottom: 60px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.author-bio p {
    font-size: 1.1rem;
    color: #555;
    margin-bottom: 25px;
    line-height: 1.8;
}

/* Contact Form */
.contact-form-section {
    max-width: 600px;
    margin: 0 auto 60px;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 500;
    color: #333;
    font-size: 0.95rem;
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: 'Lora', Georgia, serif;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #4db8a8;
}

.form-group textarea {
    resize: vertical;
}

.btn-submit {
    background: linear-gradient(135deg, #4db8a8, #3da195);
    color: #fff;
    padding: 14px 40px;
    border: none;
    border-radius: 5px;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    align-self: flex-start;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 161, 149, 0.3);
}

/* Photo Gallery */
.photo-gallery {
    margin-bottom: 60px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.gallery-grid img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.gallery-grid img:hover {
    transform: scale(1.05);
}

/* CTA Section */
.cta-section {
    text-align: center;
    margin-bottom: 60px;
}

.cta-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.btn-preorder-large {
    display: inline-block;
    background: linear-gradient(135deg, #4db8a8, #3da195);
    color: #fff;
    padding: 18px 40px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    line-height: 1.5;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-preorder-large:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(61, 161, 149, 0.3);
}

.cta-text {
    margin-top: 20px;
    color: #666;
    font-size: 0.95rem;
}

/* Footer Content */
.footer-content {
    text-align: center;
    padding: 40px 0;
    border-top: 1px solid #e0e0e0;
}

.footer-content p {
    color: #555;
    font-size: 1rem;
}

.link {
    color: #4db8a8;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.link:hover {
    color: #3da195;
}

/* Footer */
.footer {
    background-color: #f5f5f5;
    padding: 30px 0;
    text-align: center;
    color: #666;
    font-size: 0.9rem;
}

/* Learning Products Page */
.learning-products {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

.product-card {
    background-color: #f9f9f9;
    padding: 35px;
    border-radius: 8px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.product-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.4rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.product-card p {
    font-size: 1rem;
    color: #555;
    line-height: 1.7;
    margin-bottom: 20px;
}

.product-card img.product-thumb {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.btn-learn {
    display: inline-block;
    background: linear-gradient(135deg, #4db8a8, #3da195);
    color: #fff;
    padding: 12px 28px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.btn-learn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(61, 161, 149, 0.3);
}

/* Blog Page */
.blog-list {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-bottom: 60px;
}

.blog-loading {
    text-align: center;
    color: #666;
    padding: 40px 0;
}

.post-card {
    background-color: #f9f9f9;
    padding: 35px;
    border-radius: 8px;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
}

.post-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    line-height: 1.3;
}

.post-meta {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.post-content {
    color: #555;
    line-height: 1.85;
}

.post-content a {
    color: #4db8a8;
    text-decoration: underline;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 6px;
    margin: 10px 0;
}

  .post-content pre {
    overflow: auto;
    background: #f1f3f5;
    padding: 12px;
    border-radius: 6px;
    white-space: pre-wrap; /* preserve newlines and wrap long lines */
    word-break: normal;
  }

/* Recent Blog Posts */
.recent-posts {
    margin: 60px 0;
}

.recent-posts h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: #333;
    margin-bottom: 24px;
}

.recent-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.recent-post-card {
    display: block;
    background: #f9f9f9;
    padding: 22px;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 3px 12px rgba(0,0,0,0.06);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.recent-post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0,0,0,0.10);
}

.recent-post-card h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    color: #333;
    margin-bottom: 8px;
}

.recent-post-card .post-date {
    color: #777;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.recent-post-card p {
    color: #555;
    font-size: 0.95rem;
    line-height: 1.6;
}

  .post-content blockquote {
    border-left: 3px solid #4db8a8;
    margin: 16px 0;
    padding: 8px 16px;
    color: #555;
    background: #f7fafa;
  }

  /* Post content element spacing and formatting */
  .post-content p {
    margin: 1em 0;
  }

  .post-content h1,
  .post-content h2,
  .post-content h3,
  .post-content h4,
  .post-content h5,
  .post-content h6 {
    margin: 1.2em 0 0.6em;
    font-family: 'Playfair Display', serif;
    color: #333;
  }

  .post-content ul,
  .post-content ol {
    padding-left: 1.4rem;
    margin: 0.8rem 0 1rem;
  }

  .post-content li {
    margin: 0.25rem 0;
  }

  .post-content hr {
    border: 0;
    border-top: 1px solid #e6e6e6;
    margin: 24px 0;
  }

  /* Tables */
  .post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
    font-size: 0.98rem;
  }

  .post-content thead th {
    background: #f3f6f6;
    color: #333;
  }

  .post-content th,
  .post-content td {
    border: 1px solid #e6e6e6;
    padding: 10px 12px;
    vertical-align: top;
  }

  /* Gutenberg table block support */
  .post-content .wp-block-table {
    overflow-x: auto;
  }
  .post-content .wp-block-table table {
    min-width: 600px; /* allow scrolling on small screens */
  }
  .post-content .wp-block-table.is-style-stripes tbody tr:nth-child(odd) {
    background: #fafcfc;
  }

  /* Figures and captions */
  .post-content figure {
    margin: 1.2rem 0;
  }
  .post-content figure img {
    display: block;
    margin: 0 auto;
  }
  .post-content figcaption {
    text-align: center;
    color: #777;
    font-size: 0.9rem;
    margin-top: 8px;
  }

  /* Code blocks */
  .post-content code {
    background: #f1f3f5;
    padding: 0.1rem 0.35rem;
    border-radius: 4px;
  }

  /* WordPress alignment helpers */
  .post-content .aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
  .post-content .alignleft {
    float: left;
    margin: 0.2rem 1rem 1rem 0;
  }
  .post-content .alignright {
    float: right;
    margin: 0.2rem 0 1rem 1rem;
  }
  /* Clear floats within article */
  .post-content::after {
    content: "";
    display: table;
    clear: both;
  }

  /* WordPress captions */
  .post-content .wp-caption {
    max-width: 100%;
    text-align: center;
    margin: 1rem auto;
  }
  .post-content .wp-caption img {
    margin: 0 auto;
  }
  .post-content .wp-caption-text {
    color: #777;
    font-size: 0.9rem;
    margin-top: 6px;
  }

  /* Preformatted/Verse blocks preserve newlines */
  .post-content .wp-block-preformatted,
  .post-content .wp-block-code,
  .post-content .wp-block-verse {
    white-space: pre-wrap;
  }

  /* Blog Index (static list) */
  .blog-index {
    margin-bottom: 60px;
  }
  .post-list {
    list-style: none;
    padding-left: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .post-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    border-bottom: 1px solid #eee;
    padding: 12px 0;
  }

  .post-list-item a {
    color: #333;
    text-decoration: none;
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
  }

  .post-list-item a:hover {
    color: #3da195;
  }

  .post-date {
    color: #777;
    font-size: 0.9rem;
    white-space: nowrap;
  }

  @media (max-width: 480px) {
    .post-list-item {
      flex-direction: column;
      align-items: flex-start;
    }
    .post-date {
      margin-top: 6px;
    }
  }

/* Responsive Design */
@media (max-width: 1024px) {
    .container {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .header {
        padding: 15px 0;
    }

    .header .container {
        flex-direction: column;
        gap: 15px;
    }

    .logo {
        font-size: 1.3rem;
        letter-spacing: 2px;
    }

    .nav {
        gap: 25px;
    }

    .nav a {
        font-size: 0.9rem;
    }

    .hero {
        padding: 30px 0;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .underline {
        width: 150px;
    }

    .main-content {
        padding: 30px 0 60px;
    }

    .book-intro {
        grid-template-columns: 1fr;
        gap: 30px;
    }

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

    .intro-image img {
        max-width: 100%;
        width: 100%;
    }

    .intro-text {
        font-size: 0.95rem;
    }

    .book-card {
        flex-direction: column;
        text-align: center;
        padding: 25px;
        gap: 20px;
    }

    .book-cover {
        width: 200px;
        margin: 0 auto;
        background-color: #cecfca;
        padding: 8px;
    }

    .book-info h3 {
        font-size: 1.3rem;
    }

    .about-book h2 {
        font-size: 1.5rem;
    }

    .about-book p {
        font-size: 0.95rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }

    .gallery-grid img {
        height: 200px;
    }

    .btn-preorder-large {
        font-size: 1rem;
        padding: 16px 35px;
    }

    .learning-products {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .product-card {
        padding: 30px;
    }

    .product-card h3 {
        font-size: 1.3rem;
    }

    .recent-posts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .endorsement-banner {
        padding: 40px 0;
    }

    .quote-icon {
        width: 40px;
        height: 40px;
        left: -10px;
    }

    .endorsement-quote {
        padding: 0 0 0 40px;
    }

    .endorsement-quote p {
        font-size: 1rem;
    }

    .endorsement-author {
        padding-left: 20px;
        gap: 12px;
    }

    .author-photo {
        width: 50px;
        height: 50px;
    }

    .endorsement-author strong {
        font-size: 1rem;
    }

    .endorsement-author span {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .logo {
        font-size: 1.1rem;
        letter-spacing: 1.5px;
    }

    .nav {
        gap: 20px;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav a {
        font-size: 0.85rem;
    }

    .hero {
        padding: 25px 0;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 1.4;
    }

    .underline {
        width: 120px;
    }

    .main-content {
        padding: 25px 0 50px;
    }

    .book-intro {
        gap: 25px;
    }

    .intro-text {
        font-size: 0.9rem;
    }

    .book-card {
        padding: 20px;
    }

    .book-cover {
        width: 170px;
        background-color: #cecfca;
        padding: 8px;
    }

    .book-info h3 {
        font-size: 1.2rem;
    }

    .book-subtitle {
        font-size: 0.85rem;
    }

    .btn-preorder {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .about-book {
        margin-bottom: 50px;
    }

    .about-book h2 {
        font-size: 1.4rem;
    }

    .about-book p {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .gallery-grid img {
        height: 280px;
    }

    .cta-section {
        margin-bottom: 50px;
    }

    .btn-preorder-large {
        font-size: 0.95rem;
        padding: 14px 30px;
    }

    .cta-text {
        font-size: 0.85rem;
        padding: 0 10px;
    }

    .footer-content {
        padding: 30px 0;
    }

    .footer-content p {
        font-size: 0.9rem;
    }

    .footer {
        padding: 25px 0;
        font-size: 0.8rem;
    }

    .product-card {
        padding: 25px;
    }

    .product-card h3 {
        font-size: 1.2rem;
    }

    .product-card p {
        font-size: 0.9rem;
    }

    .btn-learn {
        padding: 10px 25px;
        font-size: 0.9rem;
    }

    .endorsement-banner {
        padding: 30px 0;
    }

    .quote-icon {
        width: 32px;
        height: 32px;
        left: 0;
        top: -5px;
    }

    .endorsement-quote {
        padding: 0 0 0 15px;
    }

    .endorsement-quote p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    .endorsement-author {
        padding-left: 15px;
        gap: 10px;
    }

    .author-photo {
        width: 45px;
        height: 45px;
    }

    .endorsement-author strong {
        font-size: 0.95rem;
    }

    .endorsement-author span {
        font-size: 0.85rem;
    }
}
