/*
Theme Name: EduEdgeNow Minimal
Theme URI: https://eduedgenow.com/
Author: Your Name
Description: A simple, minimal, SEO-friendly theme for flooring and home guides with a settings page.
Version: 1.4
Text Domain: eduedgenow
*/

:root {
    --primary-color: #0f766e;
    --accent-color: #f97316;
    --background-color: #f9fafb;
    --text-color: #111827;
    --muted-text-color: #6b7280;
    --border-color: #e5e7eb;
    --max-width: 1100px;
    --radius-lg: 12px;
}

html {
    box-sizing: border-box;
    scroll-behavior: smooth;
    max-width: 100%;
    overflow-x: hidden;
}

*, *:before, *:after {
    box-sizing: inherit;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
    max-width: 100%;
    overflow-x: hidden;
}

/* Layout */

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    max-width: 100%;
    overflow-x: hidden;
}

.site-main {
    flex: 1;
    max-width: 100%;
    overflow-x: hidden;
}

/* Top bar */

.top-bar {
    background: #ffffff;
    border-bottom: 1px solid var(--border-color);
}

.top-bar-inner {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.site-branding {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 0;
}

.site-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.site-title a {
    text-decoration: none;
    color: var(--primary-color);
    word-break: break-word;
}

.site-description {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted-text-color);
}

.site-logo img {
    max-height: 48px;
    width: auto;
}

/* Navigation */

.nav-toggle {
    display: none; /* always keep hidden so primary menu is visible at all sizes */
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 0.3rem 0.6rem;
    font-size: 0.8rem;
    cursor: pointer;
}

.primary-nav, .footer-nav {
    font-size: 0.9rem;
}

.primary-nav {
    width: auto;
}

.primary-nav ul,
.footer-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.primary-nav a,
.footer-nav a {
    text-decoration: none;
    color: var(--muted-text-color);
    padding-bottom: 0.15rem;
    border-bottom: 2px solid transparent;
}

.primary-nav a:hover,
.footer-nav a:hover,
.primary-nav .current-menu-item > a,
.footer-nav .current-menu-item > a {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Hero */

.hero {
    background: linear-gradient(135deg, rgba(15,118,110,0.08), rgba(249,115,22,0.08));
    border-bottom: 1px solid var(--border-color);
}

.hero-inner {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 3rem 1rem 2.5rem;
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1.3fr);
    gap: 2.5rem;
    align-items: center;
}

.hero-content h1 {
    font-size: clamp(2rem, 3vw, 2.6rem);
    margin: 0 0 0.75rem;
}

.hero-content p {
    margin: 0 0 1.25rem;
    color: var(--muted-text-color);
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

.hero-badge {
    font-size: 0.75rem;
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    background: #fff;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    border-radius: 999px;
    padding: 0.55rem 1.1rem;
    font-size: 0.9rem;
    background: var(--primary-color);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
}

.btn-primary:hover {
    opacity: 0.92;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border-radius: 999px;
    padding: 0.55rem 1rem;
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    background: #fff;
    text-decoration: none;
    color: var(--muted-text-color);
}

.hero-sidebox {
    background: rgba(255, 255, 255, 0.9);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(229,231,235,0.9);
    padding: 1.25rem;
    backdrop-filter: blur(8px);
}

.hero-sidebox h3 {
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.hero-sidebox ul {
    margin: 0;
    padding-left: 1rem;
    font-size: 0.85rem;
    color: var(--muted-text-color);
}

/* Content */

.site-content {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.content-with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 0.9fr);
    gap: 2rem;
}

/* Post list */

.section-title {
    font-size: 1.1rem;
    margin: 0 0 1rem;
}

.post-list {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1rem;
}

.post-card {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 1rem;
    padding: 0.85rem;
    border-radius: var(--radius-lg);
    background: #ffffff;
    border: 1px solid var(--border-color);
}

.post-card-thumb img {
    width: 100%;
    height: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: 10px;
}

.post-card-body {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.post-card-meta {
    font-size: 0.75rem;
    color: var(--muted-text-color);
}

.post-card-title {
    font-size: 1rem;
    margin: 0;
}

.post-card-title a {
    color: var(--text-color);
    text-decoration: none;
}

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

.post-card-excerpt {
    font-size: 0.85rem;
    color: var(--muted-text-color);
}

/* Single / page */

.single-header,
.page-header {
    margin-bottom: 1.5rem;
}

.single-header h1,
.page-header h1 {
    margin-bottom: 0.5rem;
    font-size: 1.6rem;
}

.single-meta {
    font-size: 0.8rem;
    color: var(--muted-text-color);
    margin-bottom: 1rem;
}

.single-featured {
    margin-bottom: 1.5rem;
}

.single-featured img {
    width: 100%;
    border-radius: var(--radius-lg);
}

.single .single-content,
.page .page-content {
    position: relative;
    max-width: 100%;
    overflow-x: hidden;
}

/* Gutenberg wide / full alignment should never overflow */
.single .single-content .alignwide,
.single .single-content .alignfull,
.page .page-content .alignwide,
.page .page-content .alignfull {
    max-width: 100%;
    margin-left: auto !important;
    margin-right: auto !important;
}

/* Media & tables inside posts: responsive */
.single-content img,
.single-content iframe,
.single-content video,
.single-content table,
.page-content img,
.page-content iframe,
.page-content video,
.page-content table {
    max-width: 100%;
    height: auto;
}

.single-content table,
.page-content table {
    display: block;
    width: 100%;
    overflow-x: auto;
}

/* Long words / URLs: wrap instead of causing horizontal scroll */
.single-content,
.single-content p,
.single-content li,
.page-content,
.page-content p,
.page-content li {
    word-wrap: break-word;
    overflow-wrap: anywhere;
}

/* Code blocks scroll inside themselves */
.single-content pre,
.single-content code,
.page-content pre,
.page-content code {
    max-width: 100%;
    overflow-x: auto;
}

/* Sidebar */

.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.widget {
    background: #ffffff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-color);
    padding: 1rem;
}

.widget-title {
    font-size: 0.95rem;
    margin-top: 0;
    margin-bottom: 0.75rem;
}

/* Ad blocks */

.ad-block {
    border-radius: 10px;
    border: 1px dashed var(--border-color);
    padding: 0.75rem;
    font-size: 0.8rem;
    background: #f9fafb;
    max-width: 100%;
    overflow-x: auto;
}

.ad-block label {
    font-weight: 600;
    display: block;
    margin-bottom: 0.4rem;
    color: var(--muted-text-color);
}

.ad-block iframe,
.ad-block img {
    max-width: 100%;
}

/* Related posts */

.related-posts {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

.related-posts-title {
    font-size: 1rem;
    margin: 0 0 0.75rem;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
}

.related-post-card {
    background: #ffffff;
    border-radius: 999px;
    border: 1px solid var(--border-color);
    padding: 0.6rem 0.9rem;
    font-size: 0.85rem;
}

.related-post-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.related-post-title {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-color);
}

.related-post-meta {
    font-size: 0.75rem;
    color: var(--muted-text-color);
}

.related-post-card:hover .related-post-title {
    color: var(--primary-color);
}

/* Bottom bar (footer) */

.site-footer {
    border-top: 1px solid var(--border-color);
    background: #ffffff;
    padding: 1.25rem 1rem;
    margin-top: auto;
}

.footer-inner {
    max-width: var(--max-width);
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
    justify-content: space-between;
}

.footer-copy {
    font-size: 0.8rem;
    color: var(--muted-text-color);
}

/* Pagination */

.pagination {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.pagination .page-numbers {
    display: inline-block;
    margin-right: 0.35rem;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    border: 1px solid transparent;
    text-decoration: none;
    color: var(--muted-text-color);
}

.pagination .current,
.pagination .page-numbers:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* Small elements */

a {
    color: var(--primary-color);
}

a:hover {
    color: #0b4f49;
}

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

/* Wider layout + better use of space on desktop */

@media (min-width: 1200px) {
    :root {
        --max-width: 1280px;
    }
}

/* 2-column post grid on homepage for large screens */

@media (min-width: 1024px) {
    .home .post-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* Responsive tweaks */

@media (max-width: 1024px) {
    .hero-inner {
        gap: 2rem;
    }

    .content-with-sidebar {
        grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    }

    .related-posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .hero-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .post-card {
        grid-template-columns: minmax(0, 1fr);
    }

    .content-with-sidebar {
        grid-template-columns: minmax(0, 1fr);
    }

    .top-bar-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .related-posts-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}
