/*
Theme Name: GeneratePress Card Blog Child
Template: generatepress
Description: Card-based blog layout child theme for GeneratePress, Montessori Home Start theme.
Version: 1.2
Author: Custom
*/

/* ---------- Brand accent color ----------
   Change this one value to re-theme the whole site's accent color. */
:root {
    --accent: #d9713f;
    --accent-light: #fbe9df;
}

/* ---------- Site header text (optional light branding touch) ---------- */
.site-title a {
    letter-spacing: -0.01em;
}

/* ---------- Card grid layout ---------- */
.card-blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    margin: 2rem auto;
    max-width: 1200px;
}

/* Featured (first) post spans full width, larger card */
.card-blog-grid .card-post.is-featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 0;
    border-radius: 24px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    height: auto;
}

.card-blog-grid .card-post.is-featured .card-thumb {
    height: 100%;
    min-height: 220px;
}

.card-blog-grid .card-post.is-featured .card-body {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Individual card */
.card-post {
    background: #ffffff;
    border: none;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    height: 340px;
}

.card-post:hover {
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.09);
    transform: translateY(-2px);
}

.card-thumb {
    display: block;
    width: 100%;
    flex: 1 1 50%;
    background-color: #f1efe8;
    background-size: cover;
    background-position: center;
}

.card-thumb.no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a9a394;
    font-size: 13px;
}

.card-body {
    padding: 0.9rem 1rem 1rem;
    flex: 1 1 50%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
}

.card-category {
    display: inline-flex !important;
    width: fit-content !important;
    max-width: fit-content !important;
    align-self: flex-start !important;
    font-size: 10px;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-light);
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: 8px;
    white-space: nowrap;
}

/* Category-specific badge colors. Match these class names to your actual
   WordPress category slugs — edit or add rules as needed. */
.card-category.cat-ages-0-3 {
    color: #3b6d11;
    background: #eaf3de;
}

.card-category.cat-ages-3-6 {
    color: #185fa5;
    background: #e6f1fb;
}

.card-category.cat-theory {
    color: #854f0b;
    background: #faeeda;
}

/* ---------- Activities dropdown menu ---------- */
.main-navigation ul li.menu-item-has-children > a::after,
.main-navigation ul li.page_item_has_children > a::after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 6px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg);
    margin-left: 6px;
    vertical-align: middle;
}

.main-navigation ul ul {
    background: #ffffff;
    border: 1px solid #e7e3da;
    border-radius: 8px;
    padding: 6px 0;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
}

.main-navigation ul ul li a {
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
}

.card-title {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    margin: 0 0 5px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-title a {
    color: #2c2c2a;
    text-decoration: none;
}

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

.card-excerpt {
    font-size: 12px;
    color: #6b6a63;
    line-height: 1.5;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-meta {
    font-size: 11.5px;
    color: #a9a394;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    row-gap: 4px;
    column-gap: 7px;
}

.card-meta span {
    white-space: nowrap;
}

.card-post.is-featured .card-title {
    font-size: 20px;
    -webkit-line-clamp: 2;
}

.card-post.is-featured .card-excerpt {
    font-size: 13.5px;
    -webkit-line-clamp: 3;
}

/* Responsive: stack featured card on small screens */
@media (max-width: 700px) {
    .card-blog-grid .card-post.is-featured {
        grid-template-columns: 1fr;
    }
    .card-blog-grid .card-post.is-featured .card-thumb {
        min-height: 200px;
    }
}

/* Pagination spacing and styling */
.card-blog-grid + .navigation {
    margin-top: 1rem;
}

.navigation .nav-links,
.navigation .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.navigation .page-numbers {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 10px !important;
    border-radius: 999px !important;
    background: #ffffff !important;
    color: #6b6a63 !important;
    font-size: 13px !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04) !important;
    transition: background 0.15s ease, color 0.15s ease !important;
}

.navigation .page-numbers.dots {
    box-shadow: none !important;
    background: transparent !important;
}

.navigation .page-numbers.current {
    background: var(--accent) !important;
    color: #ffffff !important;
    box-shadow: none !important;
}

.navigation .page-numbers:hover {
    background: var(--accent-light) !important;
    color: var(--accent) !important;
}

.navigation .page-numbers.current:hover {
    background: var(--accent) !important;
    color: #ffffff !important;
}

/* ---------- Single post page ---------- */
.single-post-card {
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    margin: 2rem auto;
    max-width: 800px;
}

.single-post-thumb {
    width: 100%;
    height: 320px;
    background-size: cover;
    background-position: center;
    background-color: #f1efe8;
}

.single-post-body {
    padding: 2rem 2.25rem 2.5rem;
}

.single-post-title {
    font-size: 32px;
    font-weight: 700;
    line-height: 1.3;
    color: #2c2c2a;
    margin: 12px 0 12px;
}

.single-post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    column-gap: 8px;
    row-gap: 4px;
    font-size: 13px;
    color: #a9a394;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f1efe8;
}

.single-post-meta span {
    white-space: nowrap;
}

.single-post-content {
    font-size: 16px;
    line-height: 1.8;
    color: #3f3e3a;
}

.single-post-content p {
    margin: 0 0 1.4em;
}

.single-post-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: #2c2c2a;
    margin: 1.8em 0 0.7em;
}

.single-post-content h3 {
    font-size: 20px;
    font-weight: 600;
    color: #2c2c2a;
    margin: 1.6em 0 0.6em;
}

.single-post-content a {
    color: var(--accent);
    text-decoration: underline;
}

.single-post-content a:hover {
    color: #2c2c2a;
}

.single-post-content strong {
    color: #2c2c2a;
}

.single-post-content img {
    border-radius: 16px;
    height: auto;
    max-width: 100%;
}

.single-post-content ul,
.single-post-content ol {
    margin: 0 0 1.4em;
    padding-left: 1.4em;
}

.single-post-content li {
    margin-bottom: 0.5em;
}

.single-post-content blockquote {
    border-left: 3px solid var(--accent);
    background: var(--accent-light);
    padding: 1rem 1.4rem;
    border-radius: 0 12px 12px 0;
    margin: 1.6em 0;
    font-style: italic;
    color: #4a4a45;
}

.single-post-recent {
    max-width: 800px;
    margin: 0 auto 3rem;
}

.single-post-recent-title {
    font-size: 20px;
    font-weight: 700;
    color: #2c2c2a;
    margin: 0 0 1.1rem;
}

/* Horizontal list layout for recent articles */
.recent-list {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 3px 14px rgba(0, 0, 0, 0.05);
    padding: 0.5rem;
}

.recent-list-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 0.85rem 0.75rem;
    text-decoration: none;
    border-bottom: 1px solid #f1efe8;
}

.recent-list-item:last-child {
    border-bottom: none;
}

.recent-list-thumb {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    min-width: 64px;
    border-radius: 12px;
    background-color: #f1efe8;
    background-size: cover;
    background-position: center;
}

.recent-list-thumb.no-image {
    color: #a9a394;
    font-size: 10px;
    text-align: center;
    line-height: 1.3;
}

.recent-list-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
}

.recent-list-category {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--accent);
}

.recent-list-title {
    font-weight: 600;
    font-size: 14px;
    color: #2c2c2a;
    margin: 3px 0 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recent-list-meta {
    font-size: 11.5px;
    color: #a9a394;
}

@media (max-width: 500px) {
    .recent-list-title {
        white-space: normal;
    }
}

@media (max-width: 600px) {
    .single-post-body {
        padding: 1.5rem 1.25rem 2rem;
    }
    .single-post-title {
        font-size: 24px;
    }
    .single-post-thumb {
        height: 200px;
    }
}

/* ---------- Square corners override ----------
   Forces every rounded element in this theme (cards, badges, buttons,
   pagination, dropdown menu, images, etc.) to sharp corners. */
* {
    border-radius: 0 !important;
}

/* Prevent any element from causing horizontal scroll on small screens */
html,
body {
    overflow-x: hidden;
    max-width: 100%;
}

.card-blog-grid,
.card-post,
.card-body,
.card-category {
    box-sizing: border-box;
    max-width: 100%;
}

@media (max-width: 768px) {
    /* Shrink the logo so it doesn't dominate the screen */
    .site-logo img,
    .custom-logo {
        max-height: 50px;
        width: auto;
        height: auto;
    }

    /* Give the card grid breathing room on the sides */
    .card-blog-grid {
        padding: 0 1rem;
        gap: 16px;
    }

    /* Remove the default grey background box behind the mobile menu icon */
    .main-navigation .menu-toggle,
    button.menu-toggle,
    .mobile-menu-control-wrapper .menu-toggle {
        background: transparent;
        box-shadow: none;
        border: none;
    }
}
