/*
Theme Name: EndlaCraft
*/

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

:root {
    --primary-color: #E7DFC6;
    --secondary-color: #8b7355;
    --txt: #344e5c;
    --cream: #f5f1e8;
    --dark: #1a1a1a;
    --overlay: rgba(0, 0, 0, 0.4);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--txt);
    background-color: var(--primary-color);
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    opacity: 0.8;
}

img {
    max-width: 100%;
    height: auto;
}

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


/* Header Styles */
.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: 75px;
    background-color: rgba(231, 223, 198, 0.4);
    display: flex;
    align-items: center;
}

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

.site-logo {
    height: 60px;
    display: flex;
    align-items: center;
}

.site-logo img {
    display: block;
}

.main-navigation ul, .footer-links ul {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-navigation a {
    font-size: 16px;
    color: var(--txt);
    transition: opacity 0.3s ease;
}

.main-navigation a:hover {
    opacity: 0.7;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--txt);
    font-size: 24px;
    cursor: pointer;
}

/* Hero Section */
.hero-section {
    position: relative;
    height: 70vh;
    min-height: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--overlay);
}

.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    padding: 20px;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 400;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-family: 'Playfair Display', Georgia, serif;
}

.hero-subtitle {
    font-size: 2rem;
    font-weight: 300;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-family: 'Playfair Display', Georgia, serif;
}

/* Footer */
.site-footer {
    background-color: #483F35;
    color: var(--cream);
    margin-top: 80px;
    height: 75px;
    display: flex;
    align-items: center;
}

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.footer-info {
    font-size: 14px;
    display: flex;
    align-items: center;
    height: 100%;
}

.footer-info p {
    margin: 0; 
}

.footer-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.footer-links a {
    color: var(--cream);
    font-size: 14px;
    transition: opacity 0.3s ease;
}

.footer-links a:hover {
    opacity: 0.7;
}

.social-links {
    display: flex;
    gap: 15px;
    align-items: center;
}

.social-links a {
    color: var(--cream);
    font-size: 24px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: #4a6fa5;
}

/* Responsive Design */
@media (max-width: 968px) {
    .content-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.5rem;
    }
}

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

    .site-logo {
        height: 44px;
    }

    .site-logo img,
    .custom-logo {
        max-height: 44px;
        width: auto;
    }

    .site-branding {
        padding-left: 20px;
    }

    .menu-toggle {
        display: block;
        width: 48px;
        height: 48px;
        margin-right: 8px;
        font-size: 20px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .main-navigation {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        background-color: rgba(231, 223, 198, 0.4);
        padding: 14px 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    }
    
    .main-navigation.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateY(0);
    }
    
    .main-navigation ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0 20px;
    }

    .main-navigation li {
        width: 100%;
    }

    .main-navigation a {
        display: block;
        width: 100%;
        font-size: 22px;
        font-weight: 500;
        padding: 10px 0;
    }

    .site-footer {
        height: auto;
        min-height: 75px;
        padding: 20px 0;
    }

    .footer-info {
        height: auto;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 10px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1.2rem;
    }
    
    .content-text {
        padding: 40px 30px;
    }
}

/* Posts Grid */
.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    margin: 40px 0;
}

.posts-grid article {
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.posts-grid article:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
}

.posts-grid .post-thumbnail {
    margin: 0;
}

.posts-grid .post-thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.posts-grid .entry-header,
.posts-grid .entry-content,
.posts-grid .entry-footer {
    padding: 20px;
}

.posts-grid .entry-title {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.posts-grid .entry-meta {
    font-size: 0.875rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* 404 Page */
.error404 #page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.error404 #content.site-content {
    flex: 1;
    display: flex;
}

.error404 #primary.site-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 95px 20px 20px;
}

.error404 #primary.site-main h1 {
    margin: 0;
}

/* Standard Pages */
.page:not(.home) #page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.page:not(.home) #content.site-content {
    flex: 1;
    display: flex;
}

.page:not(.home) #primary.site-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 95px 20px 170px;
}

.page:not(.home) #primary .container {
    width: 100%;
}

.page:not(.home) #primary .entry-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.page:not(.home) .site-footer {
    margin-top: 0;
}

.entry-content {
    line-height: 1.8;
}

.entry-footer {
    border-top: 1px solid #e0e0e0;
    padding-top: 1rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.entry-footer span {
    margin-right: 1rem;
}

/* Page Header */
.page-header {
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--primary-color);
}

.page-title {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.archive-description {
    margin-top: 1rem;
    color: var(--secondary-color);
}

/* Post Navigation */
.posts-navigation,
.post-navigation {
    margin: 60px 0;
    padding: 30px 0;
    border-top: 1px solid #e0e0e0;
}

.nav-links {
    display: flex;
    justify-content: space-between;
    gap: 20px;
}

.nav-previous a,
.nav-next a {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    border-radius: 4px;
    transition: background-color 0.3s ease;
}

.nav-previous a:hover,
.nav-next a:hover {
    background-color: var(--secondary-color);
}

/* Error 404 */
.error-404 {
    text-align: center;
    padding: 60px 20px;
}

.error-404 .page-title {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.helpful-links {
    margin-top: 40px;
    text-align: left;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.helpful-links h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.helpful-links ul {
    list-style: disc;
    padding-left: 20px;
}

.helpful-links li {
    margin-bottom: 0.5rem;
}

/* Search Form */
.search-form {
    display: flex;
    max-width: 600px;
    margin: 30px auto;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 12px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 4px 0 0 4px;
    font-size: 16px;
}

.search-form button {
    padding: 12px 30px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

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

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

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

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

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