/*
Theme Name: SavvySoloCook
Description: A custom WordPress theme for recipe blogs - optimized for WP Recipe Maker and Rank Math SEO
Author: SavvySoloCook
Version: 1.0
*/

/* SavvySoloCook Color Palette */
:root {
    --coral-primary: #FF6B47;
    --coral-secondary: #E85D35;
    --teal-primary: #2C6E6B;
    --teal-secondary: #3D8B85;
    --cream: #F5EBD7;
    --warm-gold: #D4AF37;
    --earth-brown: #8B4513;
    --dark-text: #2c3e50;
    --light-gray: #f8f9fa;
    --white: #ffffff;
}

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

body {
    font-family: Georgia, 'Times New Roman', serif;
    line-height: 1.7;
    color: var(--dark-text);
    background-color: var(--cream);
}

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

/* Header Styles */
.site-header {
    background: linear-gradient(135deg, var(--white) 0%, var(--cream) 100%);
    box-shadow: 0 2px 8px rgba(44, 110, 107, 0.1);
    padding: 1.5rem 0;
    border-bottom: 3px solid var(--coral-primary);
}

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

.header-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.header-search {
    min-width: 300px;
}

.header-search .search-form {
    display: flex;
    margin-bottom: 0;
}

.header-search .search-form input[type="search"] {
    flex: 1;
    padding: 0.5rem 0.75rem;
    border: 2px solid var(--teal-primary);
    border-radius: 25px 0 0 25px;
    border-right: none;
    font-family: Georgia, serif;
    font-size: 0.9rem;
    background: var(--white);
    color: var(--dark-text);
}

.header-search .search-form input[type="search"]:focus {
    outline: none;
    border-color: var(--coral-primary);
}

.header-search .search-form button,
.header-search .search-form input[type="submit"] {
    background: var(--coral-primary);
    border: 2px solid var(--coral-primary);
    border-radius: 0 25px 25px 0;
    color: var(--white);
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.header-search .search-form button:hover,
.header-search .search-form input[type="submit"]:hover {
    background: var(--coral-secondary);
    border-color: var(--coral-secondary);
}

.site-title {
    font-size: 2.2rem;
    font-weight: bold;
    color: var(--teal-primary);
    text-decoration: none;
    font-family: 'Lobster', cursive;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.site-title:hover {
    color: var(--coral-primary);
    transition: color 0.3s ease;
}

.site-description {
    color: var(--earth-brown);
    font-style: italic;
    margin-top: 0.25rem;
    font-size: 0.9rem;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.main-navigation a {
    text-decoration: none;
    color: var(--teal-primary);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.9rem;
}

.main-navigation a:hover {
    background-color: var(--coral-primary);
    color: var(--white);
    transform: translateY(-2px);
}

/* Main Content */
.site-main {
    padding: 3rem 0;
    min-height: 60vh;
    background-color: var(--white);
}

/* Recipe Card Grid */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.recipe-card {
    background: var(--white);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(44, 110, 107, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--cream);
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(255, 107, 71, 0.2);
}

.recipe-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.recipe-card-content {
    padding: 1.5rem;
}

.recipe-meta {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    color: var(--earth-brown);
}

.recipe-meta span {
    background-color: var(--cream);
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    border: 1px solid var(--coral-primary);
}

/* Post Styles */
.post {
    margin-bottom: 3rem;
    padding: 2rem;
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(44, 110, 107, 0.08);
    border-left: 4px solid var(--coral-primary);
}

.post:last-child {
    border-bottom: none;
}

.post-title {
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: var(--teal-primary);
    font-family: Georgia, serif;
    line-height: 1.3;
}

.post-title a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

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

.post-meta {
    color: var(--earth-brown);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--cream);
    border-radius: 8px;
    border-left: 3px solid var(--warm-gold);
}

.post-meta a {
    color: var(--teal-primary);
    text-decoration: none;
}

.post-meta a:hover {
    color: var(--coral-primary);
}

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

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

.post-content h2,
.post-content h3,
.post-content h4 {
    margin: 2rem 0 1rem 0;
    color: var(--teal-primary);
    font-family: Georgia, serif;
}

.post-content h2 {
    font-size: 1.8rem;
    border-bottom: 2px solid var(--coral-primary);
    padding-bottom: 0.5rem;
}

.post-content h3 {
    font-size: 1.5rem;
    color: var(--earth-brown);
}

/* Recipe Card Specific Styles */
.wp-block-group.recipe-card {
    background: linear-gradient(135deg, var(--cream) 0%, var(--white) 100%);
    border: 2px solid var(--coral-primary);
    padding: 2rem;
    margin: 2rem 0;
}

/* Recipe Maker Plugin Support */
.wp-recipe-maker-container {
    background: var(--white);
    border: 2px solid var(--coral-primary);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    box-shadow: 0 4px 15px rgba(255, 107, 71, 0.1);
}

/* Footer */
.site-footer {
    background: linear-gradient(135deg, var(--teal-primary) 0%, var(--teal-secondary) 100%);
    color: var(--cream);
    text-align: center;
    padding: 3rem 0;
    margin-top: 3rem;
    position: relative;
}

.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--coral-primary), var(--warm-gold), var(--coral-primary));
}

.footer-content p {
    margin-bottom: 0.5rem;
    font-size: 1rem;
}

.site-footer a {
    color: var(--warm-gold);
    text-decoration: none;
}

.site-footer a:hover {
    color: var(--coral-primary);
    transition: color 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .header-right {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .header-search {
        min-width: 100%;
        order: 2;
    }
    
    .main-navigation {
        order: 1;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
}

/* Layout */
.content-area {
    display: flex;
    gap: 3rem;
    align-items: flex-start;
}

.has-sidebar .content-area {
    flex-direction: row;
}

.has-sidebar .content-area > :first-child {
    flex: 2;
}

/* Sidebar Styles */
.sidebar {
    flex: 1;
    max-width: 350px;
}

.widget {
    background: linear-gradient(135deg, var(--white) 0%, var(--cream) 100%);
    padding: 2rem;
    margin-bottom: 2rem;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(44, 110, 107, 0.08);
    border: 1px solid var(--coral-primary);
    border-width: 1px 1px 1px 4px;
}

.widget-title {
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    color: var(--teal-primary);
    border-bottom: 2px solid var(--coral-primary);
    padding-bottom: 0.75rem;
    font-family: Georgia, serif;
    position: relative;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--warm-gold);
}

.widget ul {
    list-style: none;
}

.widget ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--cream);
    transition: padding-left 0.3s ease;
}

.widget ul li:hover {
    padding-left: 10px;
}

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

.widget a {
    color: var(--earth-brown);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.widget a:hover {
    color: var(--coral-primary);
    text-decoration: underline;
}

/* Recipe Categories Widget */
.widget.recipe-categories {
    background: linear-gradient(135deg, var(--coral-primary) 0%, var(--coral-secondary) 100%);
    color: var(--white);
}

.widget.recipe-categories .widget-title {
    color: var(--white);
    border-bottom-color: var(--warm-gold);
}

.widget.recipe-categories a {
    color: var(--cream);
}

.widget.recipe-categories a:hover {
    color: var(--warm-gold);
}

/* Comments */
.comments-area {
    margin-top: 4rem;
    padding: 2rem;
    background: linear-gradient(135deg, var(--cream) 0%, var(--white) 100%);
    border-radius: 15px;
    border: 2px solid var(--teal-primary);
}

.comments-title {
    color: var(--teal-primary);
    font-family: Georgia, serif;
    font-size: 1.8rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--coral-primary);
    padding-bottom: 0.5rem;
}

.comment-list {
    list-style: none;
    padding: 0;
}

.comment {
    background: var(--white);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--warm-gold);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-meta {
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--earth-brown);
}

.comment-author {
    font-weight: bold;
    color: var(--teal-primary);
}

.comment-content p {
    margin-bottom: 1rem;
}

.reply {
    margin-left: 2rem;
    margin-top: 1rem;
}

/* Comment Form */
.comment-respond {
    background: var(--white);
    padding: 2rem;
    border-radius: 12px;
    border: 2px solid var(--coral-primary);
    margin-top: 2rem;
}

.comment-reply-title {
    color: var(--teal-primary);
    font-family: Georgia, serif;
    margin-bottom: 1.5rem;
}

.comment-form p {
    margin-bottom: 1rem;
}

.comment-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--earth-brown);
    font-weight: 600;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--cream);
    border-radius: 8px;
    font-family: Georgia, serif;
    transition: border-color 0.3s ease;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--coral-primary);
}

.comment-form textarea {
    height: 120px;
    resize: vertical;
}

/* Search Form */
.search-form {
    display: flex;
    margin-bottom: 2rem;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid var(--teal-primary);
    border-radius: 25px 0 0 25px;
    border-right: none;
    font-family: Georgia, serif;
}

.search-form button {
    background: var(--coral-primary);
    border: 2px solid var(--coral-primary);
    border-radius: 0 25px 25px 0;
    color: var(--white);
    padding: 0.75rem 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-form button:hover {
    background: var(--coral-secondary);
    border-color: var(--coral-secondary);
}

/* Post Navigation */
.nav-links {
    display: flex;
    justify-content: space-between;
    margin: 3rem 0;
    gap: 2rem;
}

.nav-previous,
.nav-next {
    flex: 1;
    text-align: center;
}

.nav-previous a,
.nav-next a {
    display: block;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--teal-primary) 0%, var(--teal-secondary) 100%);
    color: var(--white);
    text-decoration: none;
    border-radius: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(44, 110, 107, 0.2);
}

.nav-previous a:hover,
.nav-next a:hover {
    background: linear-gradient(135deg, var(--coral-primary) 0%, var(--coral-secondary) 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 107, 71, 0.3);
}

.nav-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.nav-subtitle {
    font-size: 0.9rem;
    opacity: 0.9;
}

.nav-next {
    text-align: right;
}

.nav-previous:hover .nav-title,
.nav-next:hover .nav-title {
    color: var(--white);
}

/* Pagination */
.pagination {
    text-align: center;
    margin: 3rem 0;
}

.page-numbers {
    display: inline-block;
    padding: 0.75rem 1.25rem;
    margin: 0 0.25rem;
    text-decoration: none;
    background: linear-gradient(135deg, var(--cream) 0%, var(--white) 100%);
    border: 2px solid var(--teal-primary);
    border-radius: 25px;
    color: var(--teal-primary);
    font-weight: 600;
    transition: all 0.3s ease;
}

.page-numbers.current,
.page-numbers:hover {
    background: linear-gradient(135deg, var(--coral-primary) 0%, var(--coral-secondary) 100%);
    color: var(--white);
    border-color: var(--coral-primary);
    transform: translateY(-2px);
}

/* Header Scroll Effect */
.site-header.scrolled {
    background: rgba(245, 235, 215, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(44, 110, 107, 0.2);
}

/* Error 404 Page */
.error-404 {
    padding: 4rem 0;
    text-align: center;
    background: linear-gradient(135deg, var(--cream) 0%, var(--white) 100%);
    border-radius: 15px;
    margin: 2rem 0;
}

.error-404 h1 {
    font-size: 4rem;
    color: var(--coral-primary);
    margin-bottom: 1rem;
    font-family: Georgia, serif;
}

.error-404 h3 {
    margin: 2rem 0 1rem 0;
    color: var(--teal-primary);
    font-family: Georgia, serif;
}

.error-404 ul {
    list-style: none;
    text-align: left;
    display: inline-block;
}

.error-404 ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--cream);
}

.error-404 ul a {
    color: var(--earth-brown);
    text-decoration: none;
    transition: color 0.3s ease;
}

.error-404 ul a:hover {
    color: var(--coral-primary);
}

/* Recipe Rating Stars */
.recipe-rating {
    margin: 1rem 0;
}

.recipe-rating .stars {
    color: var(--warm-gold);
    font-size: 1.2rem;
}

/* Ingredient List Styling */
.recipe-ingredients {
    background: linear-gradient(135deg, var(--cream) 0%, var(--white) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 4px solid var(--coral-primary);
    margin: 1.5rem 0;
}

.recipe-ingredients h3 {
    color: var(--teal-primary);
    margin-bottom: 1rem;
    font-family: Georgia, serif;
}

.recipe-ingredients ul {
    list-style: none;
    padding: 0;
}

.recipe-ingredients li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--cream);
    position: relative;
    padding-left: 1.5rem;
}

.recipe-ingredients li:before {
    content: "â€¢";
    color: var(--coral-primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Instructions Styling */
.recipe-instructions {
    background: var(--white);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid var(--teal-primary);
    margin: 1.5rem 0;
}

.recipe-instructions h3 {
    color: var(--teal-primary);
    margin-bottom: 1rem;
    font-family: Georgia, serif;
}

.recipe-instructions ol {
    counter-reset: step-counter;
    list-style: none;
    padding: 0;
}

.recipe-instructions li {
    counter-increment: step-counter;
    margin-bottom: 1.5rem;
    padding-left: 3rem;
    position: relative;
    line-height: 1.7;
}

.recipe-instructions li:before {
    content: counter(step-counter);
    position: absolute;
    left: 0;
    top: 0;
    background: var(--coral-primary);
    color: var(--white);
    width: 2rem;
    height: 2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mt-2 {
    margin-top: 1rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.btn {
    display: inline-block;
    background: linear-gradient(135deg, var(--coral-primary) 0%, var(--coral-secondary) 100%);
    color: var(--white);
    padding: 1rem 2rem;
    text-decoration: none;
    border-radius: 25px;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 15px rgba(255, 107, 71, 0.3);
}

.btn:hover {
    background: linear-gradient(135deg, var(--teal-primary) 0%, var(--teal-secondary) 100%);
    color: var(--white);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(44, 110, 107, 0.3);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--teal-primary) 0%, var(--teal-secondary) 100%);
    box-shadow: 0 4px 15px rgba(44, 110, 107, 0.3);
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--warm-gold) 0%, #B8860B 100%);
}

/* Screen Reader Text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
}

/* Google Font Import */
@import url('https://fonts.googleapis.com/css2?family=Lobster&display=swap');

/* Recipe Schema Support */
.recipe-schema {
    display: none;
}

/* Print Styles for Recipes */
@media print {
    .site-header,
    .site-footer,
    .sidebar,
    .comments-area {
        display: none;
    }
    
    .recipe-ingredients,
    .recipe-instructions {
        break-inside: avoid;
    }
}

/* Responsive Design Updates */
@media (max-width: 768px) {
    .content-area {
        flex-direction: column;
    }
    
    .sidebar {
        max-width: 100%;
    }
    
    .nav-links {
        flex-direction: column;
    }
    
    .nav-next {
        text-align: left;
    }
    
    .error-404 h1 {
        font-size: 2.5rem;
    }
    
    .recipe-grid {
        grid-template-columns: 1fr;
    }
    
    .main-navigation ul {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .header-content {
        flex-direction: column;
        gap: 1.5rem;
    }
    
    .site-title {
        font-size: 1.8rem;
    }
    
    .post-title {
        font-size: 1.8rem;
    }
    
    .recipe-instructions li {
        padding-left: 2.5rem;
    }
    
    .recipe-instructions li:before {
        width: 1.5rem;
        height: 1.5rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .site-header {
        padding: 1rem 0;
    }
    
    .site-title {
        font-size: 1.5rem;
    }
    
    .post {
        padding: 1.5rem;
    }
    
    .widget {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
    }
}

/* About Page Styling - FIXED */
.about-section {
    background: var(--white);
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(44, 110, 107, 0.1);
    border-left: 4px solid var(--coral-primary);
    padding: 3rem 2rem;
    margin: 3rem auto;
    max-width: 1000px;
    line-height: 1.8;
}

.about-intro {
    display: flex;
    align-items: flex-start;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.about-photo {
    flex-shrink: 0; /* Prevents the photo container from shrinking */
    min-width: 300px; /* Ensures minimum width */
    max-width: 380px; /* Maximum width */
}

.about-photo img {
    width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 2px solid var(--cream);
    object-fit: cover;
}

.about-text {
    flex: 1;
    color: var(--dark-text);
    font-size: 1.05rem;
    min-width: 0; /* Allows text to shrink properly */
}

.about-heading {
    color: var(--teal-primary);
    font-family: Georgia, serif;
    font-size: 2rem;
    border-bottom: 3px solid var(--warm-gold);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 1.2rem;
}

.about-body {
    border-top: 2px solid var(--cream);
    padding-top: 2rem;
    font-size: 1.05rem;
    color: var(--dark-text);
}

.about-body p {
    margin-bottom: 1.5rem;
}

/* Responsive Layout for About Section */
@media (max-width: 900px) {
    .about-intro {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .about-photo {
        min-width: auto;
        max-width: 100%;
        width: 100%;
        max-width: 400px; /* Limit max width on mobile */
    }

    .about-text {
        text-align: left; /* Keep text left-aligned even when centered container */
    }

    .about-heading {
        font-size: 1.7rem;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .about-section {
        padding: 2rem 1.5rem;
        margin: 2rem auto;
    }
    
    .about-photo {
        max-width: 300px;
    }
    
    .about-heading {
        font-size: 1.5rem;
    }
    
    .about-text,
    .about-body {
        font-size: 1rem;
    }
}