/*
Theme Name: M.E. Nesser Theme
Theme URI: https://menesser.com/
Author: Created by Jonathan Silva
Author URI: https://menesser.com/
Description: A custom WordPress theme designed to match the M.E. Nesser author website.
Version: 1.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: menesser
Tags: custom, author, blog
*/

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background: #ffffff; /* Changed to white background to match the other site */
    min-height: 100vh;
}

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

/* Hide Uncategorized category */
.cat-item-1, /* WordPress default category ID */
a[href*="category/uncategorized"],
.post-categories a[href*="category/uncategorized"] {
    display: none !important;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1.5rem;
}

a {
    color: #DC143C;
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: #FFD700;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 2px solid #FFD700;
    z-index: 1000;
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo .logo-text {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5rem;
    font-weight: 700;
    color: #DC143C;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin: 0;
    display: block;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #1a1a1a;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover {
    color: #FFD700;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #FFD700, #FFC107);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #1a1a1a;
    margin: 3px 0;
    transition: 0.3s;
}

/* Main Content Area */
.site-content {
    padding-top: 80px; /* To account for fixed navbar */
    min-height: 70vh;
    background: white; /* Ensure white background for all content */
}

.content-area {
    background: white;
    padding: 3rem 0 1rem 0; /* Reduced bottom padding */
    margin-top: 0; /* Ensure no gap at the top */
}

.page-header {
    text-align: center;
    margin-bottom: 3rem;
}

.page-title {
    font-family: 'Playfair Display', serif;
    font-size: 3rem;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.title-decoration {
    width: 80px;
    height: 4px;
    background: linear-gradient(135deg, #FFD700, #FFC107);
    margin: 0 auto 1.5rem;
    border-radius: 2px;
}

/* Blog Styles */
.blog-posts-grid {
    display: grid;
    grid-template-columns: 1fr; /* Start with single column (mobile first) */
    gap: 2rem;
    max-width: 100%;
    margin: 0 auto;
}

/* Desktop: Two columns for larger screens */
@media (min-width: 769px) {
    .blog-posts-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.blog-post {
    margin-bottom: 2rem;
    background: rgba(255, 253, 240, 0.85); /* Semi-transparent background */
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1),
                0 0 15px rgba(255, 215, 0, 0.5); /* Yellow glow */
    transition: all 0.3s ease;
    backdrop-filter: blur(10px); /* Glassmorphism blur effect */
    -webkit-backdrop-filter: blur(10px); /* For Safari */
    border: 1px solid rgba(255, 215, 0, 0.3); /* Subtle border */
    width: 100%;
    display: flex;
    flex-direction: column;
    padding-bottom: 0; /* Ensure no extra padding at bottom */
    margin-bottom: 1.5rem; /* Reduced from 2rem */
    position: relative; /* For pseudo-elements */
}

.blog-post::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 15px;
    pointer-events: none; /* Don't block interactions */
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1); /* Inner highlight */
    z-index: 1;
}

.blog-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15),
                0 0 20px rgba(255, 215, 0, 0.7); /* Enhanced glow on hover */
}

/* Special styling for the latest post */
.latest-post {
    background: rgba(255, 253, 240, 0.9); /* Slightly more opaque */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15),
                0 0 20px rgba(220, 20, 60, 0.6); /* Red glow */
    border: 1px solid rgba(220, 20, 60, 0.3); /* Subtle red border */
}

.latest-post:hover {
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2),
                0 0 25px rgba(220, 20, 60, 0.8); /* Enhanced red glow on hover */
}

.blog-post:hover {
    transform: translateY(-5px);
}

/* Ensure blog post has no extra space at bottom */
.blog-post .post-content {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

/* Ensure the entry-content has no extra space */
.blog-post .entry-content {
    margin-bottom: 0.5rem !important;
    padding-bottom: 0 !important;
}

.post-thumbnail {
    height: 240px; /* Increased by 20% from 200px */
    overflow: hidden;
    text-align: center !important; /* Center the image container */
    display: flex !important; /* Use flexbox for better centering */
    align-items: center !important; /* Center vertically */
    justify-content: center !important; /* Center horizontally */
    background-color: #f8f8f8; /* Light background for empty space */
    margin: 0.5rem auto 0 auto !important; /* Reduced top margin from 1rem to 0.5rem */
    order: 2; /* Move image below text */
    width: 100%; /* Ensure full width */
    padding: 0; /* Remove any padding */
    position: relative; /* For absolute positioning of children if needed */
    margin-bottom: 0 !important; /* Remove bottom margin */
    border-bottom-left-radius: 12px; /* Match the blog post border radius */
    border-bottom-right-radius: 12px; /* Match the blog post border radius */
}

.post-thumbnail a {
    display: flex !important; /* Use flexbox for centering */
    width: 100%;
    height: 100%;
    justify-content: center !important; /* Center horizontally */
    align-items: center !important; /* Center vertically */
    text-align: center !important;
    margin: 0 !important; /* Remove any margin */
    padding: 0 !important; /* Remove any padding */
}

.post-thumbnail img {
    max-width: 100%;
    max-height: 100%;
    width: 100% !important; /* Fill the width of the container */
    height: 100% !important; /* Fill the height of the container */
    object-fit: cover !important; /* Cover the container while maintaining aspect ratio */
    object-position: center !important; /* Center the image */
    display: block !important; /* Ensure proper display */
    margin: 0 auto !important; /* Center the image */
    transition: transform 0.3s ease;
}

.blog-post:hover .post-thumbnail img {
    transform: scale(1.05);
}

.post-content {
    padding: 1rem 1.5rem 0 1.5rem; /* Reduced top padding from 1.5rem to 1rem */
    display: flex;
    flex-direction: column;
}

/* Limit text to approximately 4 lines by default, but allow expansion */
.post-content-full p {
    display: -webkit-box;
    -webkit-line-clamp: 4; /* Show 4 lines by default */
    -webkit-box-orient: vertical;
    overflow: visible; /* Allow content to expand */
    margin-bottom: 0.5rem;
}

.post-title {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.post-title a {
    color: #1a1a1a;
    transition: color 0.3s ease;
}

.post-title a:hover {
    color: #DC143C;
}

.post-meta {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem; /* Reduced from 1.5rem to 1rem */
    color: #666;
    font-size: 0.9rem;
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.post-content-full {
    margin-bottom: 1rem; /* Reduced from 1.5rem to 1rem */
    color: #444;
    line-height: 1.8;
    padding: 0 1rem;
    /* Remove max-height and overflow to allow content to expand */
}

/* Style for post content images */
.post-content-full img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 1rem auto;
}

/* Post content container */
.post-content {
    padding: 1rem; /* Further reduced padding from 1.5rem to 1rem */
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #DC143C;
    transition: all 0.3s ease;
}

.read-more:hover {
    gap: 0.8rem;
}

/* Single Post */
.single-post {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.single-post .post-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.single-post .post-meta {
    margin-bottom: 2rem;
}

.post-content p,
.post-content ul,
.post-content ol {
    margin-bottom: 1.5rem;
    color: #444;
    line-height: 1.8;
}

.post-content h2,
.post-content h3,
.post-content h4 {
    margin-top: 2.5rem;
    margin-bottom: 1.5rem;
}

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

.post-content blockquote {
    border-left: 4px solid #DC143C;
    padding-left: 1.5rem;
    margin: 2rem 0;
    font-style: italic;
    color: #555;
}

/* Comments */
.comments-area {
    margin-top: 4rem;
}

.comments-title {
    font-size: 1.8rem;
    margin-bottom: 2rem;
}

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

.comment {
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #eee;
}

.comment-author {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.comment-author img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
}

.comment-metadata {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 1rem;
}

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

.reply {
    font-weight: 600;
}

.comment-respond {
    margin-top: 3rem;
}

.comment-form {
    display: grid;
    gap: 1.5rem;
}

.comment-form-author,
.comment-form-email,
.comment-form-url {
    display: grid;
    gap: 0.5rem;
}

.comment-form input,
.comment-form textarea {
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: #DC143C;
}

.form-submit .submit {
    background: linear-gradient(135deg, #FFD700, #FFC107);
    color: #1a1a1a;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-submit .submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 215, 0, 0.3);
}

/* Sidebar */
.sidebar {
    padding: 2rem;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.widget {
    margin-bottom: 3rem;
}

.widget:last-child {
    margin-bottom: 0;
}

.widget-title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 0.8rem;
}

.widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(135deg, #FFD700, #FFC107);
    border-radius: 2px;
}

.widget ul {
    list-style: none;
}

.widget ul li {
    margin-bottom: 0.8rem;
    padding-bottom: 0.8rem;
    border-bottom: 1px solid #eee;
}

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

.widget ul li a {
    color: #444;
    transition: color 0.3s ease;
}

.widget ul li a:hover {
    color: #DC143C;
}

/* Search Form */
.search-form {
    display: flex;
    gap: 0.5rem;
}

.search-field {
    flex: 1;
    padding: 0.8rem;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.search-submit {
    background: linear-gradient(135deg, #FFD700, #FFC107);
    color: #1a1a1a;
    border: none;
    padding: 0.8rem 1.2rem;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-submit:hover {
    background: linear-gradient(135deg, #FFC107, #FFD700);
}

/* Footer */
.footer {
    background: #1a1a1a;
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 2.2rem;
    margin-bottom: 1rem;
    color: #DC143C;
    font-weight: 600;
}

.footer-brand p {
    color: #ccc;
    line-height: 1.6;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-section h4 {
    margin-bottom: 1rem;
    color: #DC143C;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #DC143C;
}

.footer-social {
    display: flex;
    gap: 1rem;
}

.footer-social a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.footer-social a:hover {
    background: #DC143C;
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #333;
    color: #999;
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 3rem;
}

.page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    color: #1a1a1a;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.page-numbers.current {
    background: linear-gradient(135deg, #FFD700, #FFC107);
    color: #1a1a1a;
}

.page-numbers:hover:not(.current) {
    background: #f5f5f5;
    transform: translateY(-2px);
}

.page-numbers.prev,
.page-numbers.next {
    width: auto;
    padding: 0 15px;
    border-radius: 20px;
    background-color: #f8f8f8;
    border: 1px solid #eaeaea;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

/* Navigation arrow styling */
.nav-arrow {
    color: #DC143C; /* Red color for arrows */
    font-size: 1.8rem; /* Larger size */
    font-weight: bold;
    display: inline-block;
    line-height: 1;
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.prev-arrow {
    margin-right: 5px;
}

.next-arrow {
    margin-left: 5px;
}

/* Hover effect for navigation arrows */
.page-numbers.prev:hover,
.page-numbers.next:hover {
    background-color: #f0f0f0;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.page-numbers.prev:hover .nav-arrow,
.page-numbers.next:hover .nav-arrow {
    transform: scale(1.2);
    transition: transform 0.2s ease;
    color: #FF0000; /* Brighter red on hover */
}

/* Ensure pagination is visible at the bottom of the page */
.pagination {
    margin: 3rem auto;
    padding-bottom: 2rem;
    clear: both;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Force WordPress navigation container to be visible */
.site-main nav.navigation {
    display: block !important;
    clear: both;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    width: 100%;
    float: none;
    overflow: visible;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    /* Make blog posts display in single column on mobile */
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .single-post {
        padding: 2rem;
    }
    
    /* Additional mobile optimizations */
    .page-title {
        font-size: 2.5rem;
    }
    
    .post-title {
        font-size: 1.6rem;
    }
    
    .post-content {
        padding: 1rem;
    }
    
    .post-thumbnail {
        height: 200px;
    }
}

/* Additional mobile breakpoint for very small screens */
@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .single-post .post-title {
        font-size: 1.8rem;
    }
    
    /* Ensure single column layout on very small screens */
    .blog-posts-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        padding: 0 10px;
    }
    
    .post-content {
        padding: 0.8rem;
    }
    
    .post-thumbnail {
        height: 180px;
    }
}

@media (max-width: 480px) {
    .page-title {
        font-size: 2rem;
    }
    
    .post-title {
        font-size: 1.5rem;
    }
    
    .single-post .post-title {
        font-size: 1.8rem;
    }
}