/*
Theme Name: Ward Lehmann
Theme URI: https://wardlehmann.com
Author: Custom Theme
Description: Custom WordPress theme for Ward Lehmann, author of "Ideas People." Navy and teal design with Bootstrap 4.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: wardlehmann
*/

/* ================================
   Custom Color Variables
   ================================ */
:root {
    --navy: #022B3A;
    --teal: #1F7A8C;
    --light-blue: #BFDBF7;
    --pale-blue: #E1E5F2;
    --white: #FFFFFF;
}

/* ================================
   General Styles
   ================================ */
body {
    font-family: Georgia, 'Times New Roman', Times, serif;
    font-weight: 400;
    color: #333;
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6,
.navbar-brand,
.display-1, .display-2, .display-3, .display-4 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    letter-spacing: -0.5px;
}

p, .lead {
    font-weight: 400;
}

.lead {
    font-size: 1.125rem;
    line-height: 1.7;
}

/* ================================
   Navigation
   ================================ */
.bg-navy {
    background-color: var(--navy) !important;
}

.navbar-dark .navbar-brand {
    color: var(--white);
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.navbar-dark .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9);
    padding: 0.5rem 0.75rem;
    font-family: 'Lato', sans-serif;
    font-weight: 400;
    font-size: 0.875rem;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.navbar-dark .navbar-nav .nav-link:hover {
    color: var(--white);
}

/* Active nav state — set by Bootstrap Walker (active class) and WordPress (current-menu-item) */
.navbar-dark .navbar-nav .nav-item.active > .nav-link,
.navbar-dark .navbar-nav .nav-item.current-menu-item > .nav-link,
.navbar-dark .navbar-nav .nav-item.current_page_item > .nav-link {
    color: var(--white);
    font-weight: 500;
    border-bottom: 2px solid var(--teal);
}

/* ================================
   Two-row navbar layout (desktop)
   Brand centered on row 1,
   nav links centered on row 2.
   ================================ */
@media (min-width: 1200px) {
    .navbar > .container {
        flex-wrap: wrap;
        padding-top: 0.75rem;
        padding-bottom: 0;
    }

    .navbar-dark .navbar-brand {
        flex: 0 0 100%;
        text-align: center;
        margin-bottom: 0.25rem;
        font-size: 1.6rem;
    }

    .navbar-collapse {
        flex-basis: 100%;
        border-top: 1px solid rgba(255, 255, 255, 0.15);
    }

    .navbar-dark .navbar-nav {
        justify-content: center;
        width: 100%;
        padding: 0.25rem 0;
        flex-wrap: nowrap;
    }
}

/* ================================
   Hero Section
   ================================ */
.hero-section {
    background: linear-gradient(135deg, var(--pale-blue) 0%, var(--white) 100%);
    min-height: 500px;
    padding: 3rem 0 !important;
}

.book-cover-wrapper {
    position: relative;
    display: inline-block;
    max-width: 350px;
}

.book-cover-img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-cover-wrapper a:hover .book-cover-img {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

/* WordPress auto-generates a wrapping <img> without the class, so also target wp-post-image */
.book-cover-wrapper img {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-cover-wrapper a:hover img {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.2);
}

.text-navy {
    color: var(--navy) !important;
}

.text-teal {
    color: var(--teal) !important;
}

.book-description p {
    line-height: 1.8;
    font-size: 1rem;
    color: #555;
}

.book-info {
    font-size: 0.95rem;
}

/* ================================
   Buttons
   ================================ */
.btn-primary {
    background-color: var(--teal);
    border-color: var(--teal);
    color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus {
    background-color: var(--navy);
    border-color: var(--navy);
    color: var(--white);
}

.btn-outline-primary {
    color: var(--teal);
    border-color: var(--teal);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--teal);
    border-color: var(--teal);
    color: var(--white);
}

.btn {
    border-radius: 5px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
}

/* ================================
   Footer
   ================================ */
.footer {
    background-color: var(--navy) !important;
    border-top: 4px solid var(--teal);
}

.footer h5 {
    color: var(--white);
    font-size: 1.25rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    margin-bottom: 0.5rem;
    letter-spacing: 0.3px;
}

.footer p {
    color: rgba(255, 255, 255, 0.8);
    font-family: 'Lato', sans-serif;
    font-weight: 300;
}

/* ================================
   Content Pages (Prose)
   ================================ */
.prose {
    max-width: 800px;
    margin: 3rem auto;
    padding: 2rem 1.5rem;
}

.prose h1 {
    color: var(--navy);
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    border-bottom: 3px solid var(--teal);
    padding-bottom: 0.5rem;
}

.prose h2 {
    color: var(--teal);
    font-size: 2rem;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.prose h3 {
    color: var(--navy);
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.prose p {
    margin-bottom: 1.2rem;
    line-height: 1.8;
    color: #555;
}

.prose a {
    color: var(--teal);
    text-decoration: underline;
}

.prose a:hover {
    color: var(--navy);
}

.prose ul,
.prose ol {
    margin: 1rem 0;
    padding-left: 2rem;
}

.prose li {
    margin-bottom: 0.5rem;
    line-height: 1.7;
}

.prose img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* ================================
   Ideas Page — Quote Blocks
   ================================ */

/*
 * Styles for the WordPress Quote block on the Ideas page.
 * Each quote the author adds using the Quote block will automatically
 * get this card-style treatment — no custom code needed.
 */
.ideas-quotes .wp-block-quote {
    background: #f8fafb;
    border-left: 4px solid var(--teal);
    border-radius: 4px;
    padding: 1.5rem 1.75rem 1.25rem;
    margin: 0 0 1.5rem 0;
    position: relative;
}

.ideas-quotes .wp-block-quote::before {
    content: '\201C';
    font-size: 4rem;
    line-height: 1;
    color: var(--teal);
    opacity: 0.25;
    position: absolute;
    top: 0.25rem;
    left: 1rem;
    font-family: Georgia, serif;
}

.ideas-quotes .wp-block-quote p {
    font-style: italic;
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 0.75rem;
}

.ideas-quotes .wp-block-quote cite,
.ideas-quotes .wp-block-quote .wp-element-caption {
    display: block;
    font-style: normal;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--navy);
    letter-spacing: 0.02em;
}

/* ================================
   About Page
   ================================ */
.about-content p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 1.2rem;
}

.about-content a {
    color: var(--teal);
    text-decoration: underline;
}

.about-content a:hover {
    color: var(--navy);
}

/* ================================
   Forms
   ================================ */
.form-control:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 0.2rem rgba(31, 122, 140, 0.25);
}

label {
    color: var(--navy);
    font-weight: 500;
}

/* ================================
   Responsive Adjustments
   ================================ */
@media (max-width: 768px) {
    .hero-section {
        padding: 2rem 0 !important;
    }

    .display-4 {
        font-size: 2rem;
    }

    .book-cover-wrapper {
        max-width: 250px;
    }

    .prose {
        padding: 1.5rem 1rem;
    }

    .prose h1 {
        font-size: 2rem;
    }
}

/* ================================
   Utility Classes
   ================================ */
.bg-pale-blue {
    background-color: var(--pale-blue);
}

.bg-light-blue {
    background-color: var(--light-blue);
}

.border-teal {
    border-color: var(--teal) !important;
}

/* ================================
   Reviews Page
   ================================ */
.review-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    border-left: 4px solid var(--teal);
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.review-stars {
    font-size: 1.1rem;
}

.review-title {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.25rem;
}

.review-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #555;
}

.review-meta {
    border-top: 1px solid #eee;
    padding-top: 0.75rem;
    font-size: 0.875rem;
}

.badge-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
}

/* ================================
   Recipes Page
   ================================ */

/* H2 = recipe name — matches original Bootstrap .h2 size */
.recipe-content h2 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: var(--teal);
    font-size: 2rem;
    margin-bottom: 1rem;
    margin-top: 2rem;
}

.recipe-content h2:first-child {
    margin-top: 0;
}

/* H3 = section labels like "Ingredients:" — matches original Bootstrap .h4 size */
.recipe-content h3 {
    color: var(--navy);
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 1.5rem;
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* When H3 is immediately followed by a list, merge them into one card —
   replicating the original .ingredients div that wrapped both heading and list */
.recipe-content h3:has(+ ul),
.recipe-content h3:has(+ ol) {
    background-color: var(--pale-blue);
    border-left: 4px solid var(--teal);
    border-radius: 8px 8px 0 0;
    padding: 1.5rem 1.5rem 0 1.5rem;
    margin-bottom: 0;
}

.recipe-content h3 + ul,
.recipe-content h3 + ol {
    border-radius: 0 0 8px 8px;
    margin-top: 0;
    padding-top: 1rem;
}

/* Description paragraph — matches original Bootstrap .lead */
.recipe-content p {
    font-size: 1.25rem;
    font-weight: 300;
    line-height: 1.7;
    color: #555;
    margin-bottom: 1.5rem;
}

/* Bulleted list = ingredient list, styled like the old design */
.recipe-content ul {
    list-style: none;
    padding: 1.5rem;
    margin: 0 0 1rem 0;
    background-color: var(--pale-blue);
    border-left: 4px solid var(--teal);
    border-radius: 8px;
}

.recipe-content ul li {
    position: relative;
    padding: 0.875rem 0 0.875rem 1.75rem;
    font-size: 1.125rem;
    color: #2c3e50;
    font-weight: 500;
    border-bottom: 1px solid rgba(31, 122, 140, 0.2);
}

.recipe-content ul li:first-child {
    padding-top: 0;
}

.recipe-content ul li:last-child {
    border-bottom: none;
}

/* Teal check-circle icon via Font Awesome unicode */
.recipe-content ul li::before {
    content: '\f058';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--teal);
    position: absolute;
    left: 0;
    top: 0.9rem;
    font-size: 1rem;
}

/* Numbered list = instructions */
.recipe-content ol {
    padding-left: 1.5rem;
    margin-bottom: 1rem;
}

.recipe-content ol li {
    padding: 0.4rem 0;
    line-height: 1.7;
    color: #555;
}

.recipe-image {
    max-width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.recipe-image:hover {
    transform: scale(1.02);
}

@media (max-width: 768px) {
    .recipe-content {
        text-align: left;
    }

    .recipe-image {
        max-width: 300px;
        margin: 0 auto;
    }
}

/* ================================
   Discussion Questions Page
   ================================ */

/* Each H3 in the editor becomes a styled question */
.discussion-content h3 {
    padding: 1.25rem 0;
    border-bottom: 1px solid rgba(31, 122, 140, 0.15);
    color: var(--navy);
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1.35rem;
    line-height: 1.5;
    letter-spacing: -0.3px;
    margin-top: 0;
    margin-bottom: 0;
    transition: padding-left 0.3s ease;
}

.discussion-content h3::before {
    content: '\f4ad';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--teal);
    font-size: 1rem;
    margin-right: 0.75rem;
    opacity: 0.7;
}

.discussion-content h3:last-of-type {
    border-bottom: none;
}

.discussion-content h3:hover {
    padding-left: 1rem;
}

.discussion-content p {
    line-height: 1.8;
    color: #555;
    margin-bottom: 1rem;
}

@media (max-width: 768px) {
    .discussion-content {
        margin-bottom: 2rem;
    }

    .discussion-content h3 {
        font-size: 1.2rem;
    }
}

/* ================================
   Contact Form 7 Styling
   ================================ */
.wpcf7-form p {
    margin-bottom: 1rem;
}

.wpcf7-form label {
    display: block;
    color: var(--navy);
    font-weight: 500;
    margin-bottom: 0.4rem;
}

.wpcf7-form input[type="text"],
.wpcf7-form input[type="email"],
.wpcf7-form textarea {
    width: 100%;
    padding: 0.5rem 0.75rem;
    font-size: 1rem;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    color: #495057;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
    font-family: 'Lato', sans-serif;
}

.wpcf7-form input[type="text"]:focus,
.wpcf7-form input[type="email"]:focus,
.wpcf7-form textarea:focus {
    border-color: var(--teal);
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(31, 122, 140, 0.25);
}

.wpcf7-form input[type="submit"],
.wpcf7-submit {
    background-color: var(--teal);
    border: 1px solid var(--teal);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size: 1.1rem;
    border-radius: 5px;
    cursor: pointer;
    width: 100%;
    transition: all 0.3s ease;
    letter-spacing: 0.3px;
}

.wpcf7-form input[type="submit"]:hover,
.wpcf7-submit:hover {
    background-color: var(--navy);
    border-color: var(--navy);
}

.wpcf7 .wpcf7-not-valid-tip {
    color: #dc3545;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

.wpcf7 .wpcf7-response-output {
    margin: 1rem 0 0;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    font-size: 0.95rem;
}

.wpcf7 .wpcf7-mail-sent-ok {
    border: 2px solid #28a745;
    color: #155724;
    background-color: #d4edda;
}

.wpcf7 .wpcf7-mail-sent-ng,
.wpcf7 .wpcf7-spam-blocked,
.wpcf7 .wpcf7-validation-errors {
    border: 2px solid #dc3545;
    color: #721c24;
    background-color: #f8d7da;
}

/* ================================
   WordPress Block Editor Overrides
   ================================ */
.entry-content img,
.about-content img,
.prose img {
    max-width: 100%;
    height: auto;
}

.alignleft {
    float: left;
    margin: 0.5rem 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0.5rem 0 1rem 1.5rem;
}

.aligncenter {
    display: block;
    margin-left: auto;
    margin-right: auto;
}

/* Fix WordPress adding extra margin to images in hero */
.book-cover-wrapper .wp-post-image {
    display: block;
    margin: 0 auto;
}
