/*
Theme Name: Coloriage à Imprimer
Theme URI: https://coloriageaimprimer.net/
Description: coloriage gratuit à imprimer
Author: Cloriageaimprimer.net
Template: coloriageaimprimer.net
Version: 1.0.2026
Text Domain: coloriageaimprimer.net
*/
/* =========================================================
   1. VARIABLES & RESET
   ========================================================= */

:root {
    --ca-blue: #2468e8;
    --ca-blue-dark: #174da9;
    --ca-text: #172033;
    --ca-muted: #6b7280;
    --ca-border: #e5e7eb;
    --ca-bg: #fff;
    --ca-soft: #f7f9fc;
    --ca-radius: 14px;
    --ca-width: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ca-bg);
    color: var(--ca-text);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI",
        Roboto, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
}

a {
    color: var(--ca-blue-dark);
    text-decoration: none;
}

a:hover {
    color: var(--ca-blue);
    text-decoration: underline;
}

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

button,
input {
    font: inherit;
}

/* =========================================================
   2. HEADER & NAVIGATION
   ========================================================= */

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--ca-border);
}

.ca-header-inner,
.ca-container,
.ca-footer-inner {
    width: min(var(--ca-width), calc(100% - 36px));
    margin-inline: auto;
}

.ca-header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    gap: 24px;
}

.ca-brand {
    color: #164a9d;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    white-space: nowrap;
}

.ca-brand:hover {
    text-decoration: none;
}

.ca-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.ca-nav a {
    padding: 8px 12px;
    border-radius: 9px;
    color: #394150;
    font-size: 14px;
}

.ca-nav a:hover {
    background: #f0f5ff;
    text-decoration: none;
}

.ca-search {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 250px;
    overflow: hidden;
    border: 1px solid #ddd;
    border-radius: 10px;
}

.ca-search input[type="search"] {
    width: 100%;
    min-width: 0;
    padding: 9px 11px;
    border: 0;
    outline: 0;
    font-size: 13px;
}

.ca-search button {
    padding: 8px 12px;
    border: 0;
    background: #fff;
    color: #5f6673;
    cursor: pointer;
}

.ca-mobile-search,
.ca-menu-toggle {
    display: none;
}

/* =========================================================
   3. HERO SECTION
   ========================================================= */

.ca-hero {
    margin: 18px 0 24px;
    padding: 22px 20px;
    border: 1px solid #dce8e8;
    border-radius: 14px;
    background: linear-gradient(110deg, #eef6ff, #effcf4);
    text-align: center;
}

.ca-hero h1 {
    margin: 0 0 4px;
    color: #24446e;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.25;
    letter-spacing: -0.6px;
}

.ca-hero p {
    margin: 0 auto 14px;
    color: #454b55;
    font-size: 15px;
}

.ca-actions {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* =========================================================
   4. BUTTONS
   ========================================================= */

.ca-btn {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    padding: 10px 16px;
    border: 1px solid var(--ca-blue);
    border-radius: 9px;
    background: var(--ca-blue);
    color: #fff;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
}

.ca-btn:hover {
    background: var(--ca-blue-dark);
    color: #fff;
    text-decoration: none;
}

.ca-btn--light {
    border-color: #d1d5db;
    background: #fff;
    color: #303845;
}

.ca-btn--light:hover {
    background: #f7faff;
    color: #174da9;
}

/* =========================================================
   5. SECTIONS & SECTION HEADINGS
   ========================================================= */

.ca-section {
    margin: 22px 0 26px;
}

.ca-section-heading {
    margin: 0 0 10px;
    color: #85827d;
    font-size: 14px;
    font-weight: 750;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

/* =========================================================
   6. CATEGORY GRID
   ========================================================= */

.ca-category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.ca-category-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 108px;
    padding: 13px 8px;
    border: 1px solid var(--ca-border);
    border-radius: 12px;
    background: #fff;
    color: #111827;
    text-align: center;
    transition: transform 0.15s, border-color 0.15s;
}

.ca-category-card:hover {
    transform: translateY(-2px);
    border-color: #b7ccf6;
    text-decoration: none;
}

.ca-category-icon {
    margin-bottom: 5px;
    font-size: 29px;
    line-height: 1.25;
}

.ca-category-name {
    color: #151922;
    font-size: 14px;
    font-weight: 650;
}

.ca-category-count {
    margin-top: 1px;
    color: #777;
    font-size: 12px;
}

/* =========================================================
   7. COLORING CARD GRID
   ========================================================= */

.ca-card-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ca-coloring-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--ca-border);
    border-radius: 12px;
    background: #fff;
    transition: box-shadow 0.15s, transform 0.15s;
}

.ca-coloring-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 18px #1720330d;
}

.ca-card-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 154px;
    overflow: hidden;
    background: #fafafa;
}

.ca-card-image img {
    width: 100%;
    height: 100%;
    padding: 10px;
    object-fit: contain;
}

.ca-placeholder {
    font-size: 54px;
    line-height: 1;
}

.ca-card-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
    font-size: 13px;
}

.ca-card-title {
    overflow: hidden;
    color: #111827;
    font-weight: 550;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ca-download-icon {
    display: inline-flex;
    flex: none;
    padding: 2px;
    color: #1558bf;
}

/* =========================================================
   8. FOOTER
   ========================================================= */

.ca-footer {
    margin-top: 26px;
    padding: 16px 14px;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: #fff;
}

.ca-footer-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 24px;
}

.ca-footer h2 {
    margin: 0 0 4px;
    color: #111827;
    font-size: 13px;
}

.ca-footer ul {
    margin: 0;
    padding: 0;
    list-style: none;
}

.ca-footer li {
    font-size: 12px;
    line-height: 1.7;
}

.ca-footer-bottom {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px solid #eee;
    color: #7b8190;
    font-size: 12px;
}

/* =========================================================
   9. PAGE TITLES & INTRO
   ========================================================= */

.ca-page-title {
    margin: 24px 0 10px;
    font-size: clamp(26px, 3vw, 36px);
    line-height: 1.25;
    letter-spacing: -0.6px;
}

.ca-intro {
    margin: 0 0 20px;
    color: #626b78;
}

.ca-breadcrumbs {
    margin: 18px 0;
    color: #777;
    font-size: 13px;
}

/* =========================================================
   10. PAGINATION
   ========================================================= */

.ca-pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 7px;
    margin: 26px 0;
}

.ca-pagination .page-numbers {
    padding: 7px 12px;
    border: 1px solid var(--ca-border);
    border-radius: 8px;
}

.ca-pagination .current {
    border-color: var(--ca-blue);
    background: var(--ca-blue);
    color: #fff;
}

/* =========================================================
   11. SINGLE COLORING PAGE
   ========================================================= */

.ca-single-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 280px;
    align-items: start;
    gap: 26px;
}

.ca-single-image {
    padding: 16px;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: #fafafa;
    text-align: center;
}

.ca-single-image img {
    width: auto;
    max-height: 650px;
    object-fit: contain;
}

.ca-download-panel {
    padding: 16px;
    border: 1px solid var(--ca-border);
    border-radius: 14px;
    background: #fff;
}

.ca-download-panel h2 {
    margin: 0 0 10px;
    font-size: 18px;
}

.ca-download-panel .ca-btn {
    width: 100%;
    margin: 5px 0;
}

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

.ca-content h2,
.ca-content h3 {
    line-height: 1.3;
}

/* =========================================================
   12. EMPTY STATE
   ========================================================= */

.ca-empty {
    padding: 28px;
    border: 1px dashed #d7dce5;
    border-radius: 12px;
    color: #6b7280;
    text-align: center;
}

/* =========================================================
   13. GENERATEPRESS OVERRIDES
   ========================================================= */

.site-content,
.content-area,
.site-main {
    width: 100%;
}

.site.grid-container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.site-content .content-area {
    float: none;
    width: 100%;
}

.site-content .inside-article,
.site-content .inside-page-header {
    padding: 0;
    background: transparent;
}

.site-content .site-main {
    margin: 0;
}

.site-content .entry-header,
.site-content .entry-content,
.site-content .entry-summary {
    margin: 0;
}

.site-footer,
.site-header .inside-header,
.main-navigation {
    display: none !important;
}

.ca-custom-site {
    min-height: 70vh;
}

/* Accessible labels hidden visually */
.ca-hidden-label {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* =========================================================
   14. TABLET
   ========================================================= */

@media (max-width: 850px) {
    .ca-header-inner {
        flex-wrap: wrap;
        gap: 12px;
        padding: 12px 0;
    }

    .ca-nav {
        order: 3;
        flex-basis: 100%;
        overflow: auto;
        gap: 2px;
    }

    .ca-nav a {
        padding: 7px 9px;
        white-space: nowrap;
    }

    .ca-search {
        max-width: 220px;
        margin-left: auto;
    }

    .ca-category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .ca-card-image {
        height: 135px;
    }

    .ca-single-layout {
        grid-template-columns: 1fr;
    }

    .ca-download-panel {
        order: -1;
    }
}

/* =========================================================
   15. MOBILE
   ========================================================= */

@media (max-width: 560px) {
    .ca-header-inner,
    .ca-container,
    .ca-footer-inner {
        width: calc(100% - 24px);
    }

    .ca-header-inner {
        min-height: 0;
    }

    .ca-brand {
        font-size: 19px;
    }

    .ca-search {
        max-width: 145px;
    }

    .ca-search input[type="search"] {
        padding: 8px;
        font-size: 12px;
    }

    .ca-nav {
        gap: 0;
    }

    .ca-nav a {
        padding: 6px 8px;
        font-size: 12px;
    }

    .ca-hero {
        margin: 12px 0 20px;
        padding: 20px 12px;
    }

    .ca-hero p {
        font-size: 13px;
    }

    .ca-category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .ca-category-card {
        min-height: 100px;
    }

    .ca-card-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .ca-card-image {
        height: 120px;
    }

    .ca-card-bottom {
        padding: 8px;
        font-size: 12px;
    }

    .ca-footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 18px;
    }

    .ca-footer-grid > section:last-child {
        grid-column: 1 / -1;
    }

    .ca-page-title {
        margin-top: 20px;
    }

    .ca-single-image {
        padding: 8px;
    }
}

/* Kích thước logo website */
.ca-brand {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.ca-logo {
    display: block;
    width: 280px;       /* Chiều rộng logo */
    height: 60px;       /* Chiều cao logo */
    object-fit: contain;
}

/* Kích thước logo trên điện thoại */
@media (max-width: 560px) {
    .ca-logo {
        width: 160px;
        height: 40px;
    }
}