/*
Theme Name: Coloring Book
Author: AntiGravity
Version: 1.3
*/

body {
    font-family: 'Sarabun', sans-serif;
    margin: 0;
    padding: 0;
    background: #f0f8ff;
    color: #333;
}

a {
    text-decoration: none;
    color: #0073aa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.site-header {
    background: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-title {
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 24px;
    font-weight: bold;
}

.site-logo img {
    border-radius: 50%;
}

.site-logo a {
    color: #333;
    text-decoration: none;
    background: linear-gradient(45deg, #ff6b6b, #feca57, #48dbfb, #ff9ff3);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Header Search */
.header-search form {
    display: flex;
    align-items: center;
    background: #f5f5f5;
    border-radius: 20px;
    padding: 5px 15px;
    border: 1px solid #eee;
}

.header-search input {
    border: none;
    background: transparent;
    padding: 8px;
    outline: none;
    font-size: 14px;
    width: 200px;
}

.header-search button {
    background: none;
    border: none;
    cursor: pointer;
    color: #666;
    padding: 5px;
}

.header-search button:hover {
    color: #2979ff;
}

/* Navigation */
.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 25px;
}

.main-navigation a {
    color: #555;
    font-weight: 600;
    font-size: 16px;
    transition: color 0.3s;
}

.main-navigation a:hover {
    color: #2979ff;
}

/* Hero Section */
.hero-section {
    text-align: center;
    padding: 60px 20px;
    background: linear-gradient(135deg, #81d4fa 0%, #29b6f6 100%);
    color: #fff;
    border-radius: 0 0 50% 50% / 20px;
    margin-bottom: 40px;
}

.hero-section h1 {
    font-size: 42px;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

/* Info Box */
.info-box {
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 30px;
    text-align: center;
    font-size: 18px;
    color: #0277bd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Category Grid (Homepage) - STRICT GRID LAYOUT */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, 70px);
    /* Fixed 70px columns */
    gap: 20px;
    /* Space between items */
    margin-bottom: 40px;
    background: #f0f8ff;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    justify-content: center;
}

.cat-item {
    width: 70px;
    height: 70px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ddd;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;

    /* Center image */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 5px;
    box-sizing: border-box;
}

.cat-item:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    z-index: 2;
    border-color: #4fc3f7;
}

.cat-item img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.cat-item span {
    display: none !important;
}

/* Updates Grid (Homepage & Archive) */
.updates-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.update-item {
    background: #fff;
    border: none;
    border-radius: 12px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: block;
    text-decoration: none;
    color: inherit;
    min-width: 0;
    /* Fix for Grid Item sizing issues */
}

.update-item a {
    display: block;
    /* Ensure anchor fills the card */
    text-decoration: none;
    color: inherit;
}

.update-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(79, 195, 247, 0.3);
}

.update-item img {
    width: 100%;
    height: 250px;
    object-fit: contain;
    margin-bottom: 10px;
    border-radius: 8px;
    background: #fff;
    border: 1px solid #eee;
    padding: 10px;
    box-sizing: border-box;
    /* Important so padding stays inside width/height */
}

.update-item h3 {
    font-size: 16px;
    margin: 10px 0 5px;
    color: #333;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.update-item .date {
    font-size: 12px;
    color: #999;
    margin: 0;
}

/* Section Title */
.section-title {
    font-size: 28px;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
    background: linear-gradient(135deg, #4fc3f7, #2979ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Single Post */
article {
    background: #fff;
    padding: 40px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
}

article h1 {
    font-size: 32px;
    margin-bottom: 20px;
    color: #333;
    background: linear-gradient(135deg, #4fc3f7, #2979ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.post-meta {
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e3f2fd;
    color: #999;
    font-size: 14px;
}

.entry-content {
    line-height: 1.8;
    color: #444;
}

.entry-content img {
    max-width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* Coloring Guide (Blue Theme) */
.coloring-guide {
    margin-top: 60px;
    padding: 40px;
    background: #f0f8ff;
    /* AliceBlue */
    border-radius: 20px;
    border: 1px solid #e1f5fe;
}

.coloring-guide h2 {
    font-size: 26px !important;
    margin-bottom: 40px !important;
    text-align: center;
    color: #0277bd;
    /* Darker Blue */
    background: none;
    -webkit-text-fill-color: initial;
    font-weight: 700;
    padding-left: 0;
    border-left: none;
    line-height: 1.2;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.guide-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.guide-step {
    background: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(179, 229, 252, 0.4);
    /* Light Blue Shadow */
    text-align: left;
    position: relative;
    border: 1px solid #e1f5fe;
    transition: transform 0.3s;
}

.guide-step:hover {
    transform: translateY(-5px);
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #4fc3f7, #0288d1);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    margin: 0 0 15px 0;
    box-shadow: 0 4px 8px rgba(2, 136, 209, 0.3);
}

.guide-step h3 {
    color: #0277bd;
    margin-bottom: 10px;
    font-size: 18px;
}

.guide-step p {
    color: #546e7a;
    font-size: 14px;
    line-height: 1.6;
    margin: 0;
}

/* Tips Section */
.guide-tips {
    background: #e1f5fe;
    /* Very Light Blue */
    padding: 30px;
    border-radius: 15px;
    border: 1px solid #81d4fa;
    margin-top: 40px;
    position: relative;
}

.guide-tips h3 {
    color: #0277bd;
    margin-top: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.guide-tips ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 15px;
}

.guide-tips li {
    position: relative;
    padding-left: 30px;
    color: #455a64;
    line-height: 1.6;
}

.guide-tips li::before {
    content: '★';
    /* Star icon */
    color: #ffca28;
    /* Amber */
    font-weight: bold;
    position: absolute;
    left: 12px;
    top: 10px;
}

/* Breadcrumb - Simple UI */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 0;
    margin-bottom: 20px;
    font-size: 14px;
    color: #666;
    border-bottom: 1px solid #eee;
}

.breadcrumb a {
    color: #555;
    transition: color 0.2s;
    display: flex;
    align-items: center;
    gap: 4px;
    font-weight: 500;
}

.breadcrumb a:hover {
    color: #2979ff;
}

.breadcrumb .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    line-height: 16px;
}

.breadcrumb .separator {
    color: #ccc;
    font-size: 12px;
}

.breadcrumb .current {
    color: #999;
    font-weight: normal;
}

/* Pagination */
.pagination {
    margin-top: 50px;
    text-align: center;
    display: flex;
    justify-content: center;
    align-items: center;
}

.pagination ul.page-numbers,
.pagination .nav-links {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    border: none;
    background: transparent;
    box-shadow: none;
}

.pagination li {
    display: inline-block;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
}

.pagination a.page-numbers,
.pagination span.page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 5px;
    /* Allow wider for Next/Prev text */
    border-radius: 8px;
    /* Slightly rounded square is more modern than circle for text */
    background: #fff;
    color: #555;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: all 0.2s;
    text-decoration: none;
    border: 1px solid #e0e0e0;
}

.pagination .page-numbers.current {
    background: linear-gradient(135deg, #4fc3f7, #2979ff);
    color: #fff;
    border-color: transparent;
    transform: scale(1.05);
    box-shadow: 0 4px 10px rgba(41, 121, 255, 0.3);
}

.pagination a.page-numbers:hover {
    background: #f5f5f5;
    color: #2979ff;
    border-color: #2979ff;
    transform: translateY(-2px);
}

.pagination .page-numbers.dots {
    background: transparent;
    box-shadow: none;
    border: none;
    cursor: default;
    color: #999;
}

.pagination .screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    -webkit-clip-path: inset(50%);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}




/* Footer */
.site-footer {
    background: linear-gradient(135deg, #4fc3f7 0%, #29b6f6 100%);
    color: #fff;
    padding: 50px 0 0;
    margin-top: 60px;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
}

.footer-widgets {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    color: #fff;
    font-size: 20px;
    margin-bottom: 20px;
    border-bottom: 3px solid #fff;
    padding-bottom: 12px;
}

.footer-col p {
    line-height: 1.8;
    font-size: 14px;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #fff;
    transition: all 0.3s;
    font-size: 14px;
    padding: 5px 0;
    display: inline-block;
}

.footer-col ul li a:hover {
    transform: translateX(5px);
    color: #e1f5fe;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.3);
    padding: 25px 0;
    text-align: center;
}

.footer-bottom p {
    margin: 0;
    font-size: 14px;
    color: #fff;
}

/* Category Archive Grid Override */
.category-archive-grid {
    grid-template-columns: repeat(6, 1fr) !important;
    gap: 20px;
}

/* Responsive */
@media (max-width: 1200px) {
    .category-archive-grid {
        grid-template-columns: repeat(4, 1fr) !important;
    }
}

@media (max-width: 1024px) {
    .updates-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .footer-widgets {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .header-inner {
        flex-direction: column;
        gap: 15px;
    }

    .main-navigation ul {
        flex-wrap: wrap;
        justify-content: center;
    }

    .updates-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-widgets {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .guide-steps {
        grid-template-columns: 1fr;
    }

    .guide-tips ul {
        grid-template-columns: 1fr;
    }

    article {
        padding: 25px;
    }

    .coloring-guide {
        padding: 25px;
    }

    .category-archive-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}