/*
Theme Name: ColorWisp Kids
Theme URI: https://colorwisp.com
Author: Antigravity AI
Description: Легка, надшвидка та яскрава дитяча тема для сайту безкоштовних розмальовок з функцією друку А4 та закладеним захистом.
Version: 1.0.0
Text Domain: colorwisp
*/

:root {
    --primary-color: #ff6b6b;
    --primary-hover: #ff5252;
    --secondary-color: #4ecdc4;
    --accent-color: #ffe66d;
    --bg-light: #f8f9fa;
    --text-dark: #2d3436;
    --text-muted: #636e72;
    --border-radius: 16px;
    --box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.6;
    background-image: radial-gradient(#e0f2fe 1px, transparent 1px);
    background-size: 24px 24px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: var(--transition);
}

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

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

/* Header */
.site-header {
    background: #ffffff;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 0;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.site-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-logo span {
    color: var(--secondary-color);
}

.search-form {
    display: flex;
    flex: 1;
    max-width: 450px;
    position: relative;
}

.search-form input[type="text"] {
    width: 100%;
    padding: 12px 20px;
    padding-right: 50px;
    border: 2px solid #edf2f7;
    border-radius: 30px;
    font-size: 0.95rem;
    outline: none;
    transition: var(--transition);
    background: #f7fafc;
}

.search-form input[type="text"]:focus {
    border-color: var(--secondary-color);
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(78, 205, 196, 0.15);
}

.search-form button {
    position: absolute;
    right: 6px;
    top: 6px;
    bottom: 6px;
    width: 40px;
    border: none;
    background: var(--secondary-color);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.search-form button:hover {
    transform: scale(1.05);
}

/* Navigation */
.main-nav {
    display: flex;
    gap: 15px;
}

.main-nav a {
    font-weight: 600;
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--text-dark);
}

.main-nav a:hover {
    background: rgba(78, 205, 196, 0.1);
    color: var(--secondary-color);
}

/* Cards & Grids */
.page-title {
    font-size: 2rem;
    margin: 30px 0 20px;
    text-align: center;
    color: var(--text-dark);
}

.coloring-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 25px;
    margin: 30px 0 50px;
}

.coloring-card {
    background: #ffffff;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.coloring-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
    border-color: var(--secondary-color);
}

.coloring-card-img {
    aspect-ratio: 3/4;
    overflow: hidden;
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.coloring-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.coloring-card:hover .coloring-card-img img {
    transform: scale(1.04);
}

.coloring-card-body {
    padding: 15px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}

.coloring-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-top: auto;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-weight: 700;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
    text-align: center;
    flex: 1;
}

.btn-primary {
    background: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

.btn-secondary {
    background: var(--secondary-color);
    color: #ffffff;
}

.btn-secondary:hover {
    background: #3dbdb4;
    color: #ffffff;
}

.btn-print {
    background: #10b981;
    color: #ffffff;
}

.btn-print:hover {
    background: #059669;
    color: #ffffff;
}

/* Single Page */
.single-coloring-container {
    background: #ffffff;
    border-radius: var(--border-radius);
    padding: 30px;
    margin: 30px 0;
    box-shadow: var(--box-shadow);
}

.single-header {
    text-align: center;
    margin-bottom: 25px;
}

.single-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.single-main-action {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 20px 0 30px;
    flex-wrap: wrap;
}

.single-image-box {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    border: 2px solid #e2e8f0;
    border-radius: var(--border-radius);
    padding: 20px;
    background: #ffffff;
}

.single-image-box img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Categories Grid */
.category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin: 20px 0 30px;
}

.category-pill {
    background: #ffffff;
    padding: 8px 18px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    box-shadow: 0 2px 8px rgba(0,0,0,0.04);
    border: 1px solid #e2e8f0;
}

.category-pill:hover {
    background: var(--secondary-color);
    color: #ffffff;
    border-color: var(--secondary-color);
}

/* Footer */
.site-footer {
    background: #2d3436;
    color: #dfe6e9;
    padding: 40px 0 20px;
    margin-top: 60px;
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    border-bottom: 1px solid #636e72;
    padding-bottom: 20px;
    margin-bottom: 20px;
}

/* Printable A4 Modal / Print Styles */
@media print {
    body * {
        visibility: hidden;
    }
    .single-image-box, .single-image-box img {
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
        width: 100% !important;
        max-width: 100% !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
    }
}
