/* MindfulPrintables.com Calming, Accessible, Mobile-Responsive Stylesheet */
:root {
    --bg-primary: #0b1120;
    --bg-secondary: #111827;
    --bg-card: #1e293b;
    --bg-elevated: #334155;
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --accent-primary: #0d9488;
    --accent-secondary: #4f46e5;
    --accent-emerald: #10b981;
    --border-subtle: rgba(255, 255, 255, 0.09);
    --border-accent: rgba(45, 212, 191, 0.28);
    --radius-lg: 16px;
    --radius-md: 12px;
    --radius-sm: 8px;
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.45), 0 8px 10px -6px rgba(0, 0, 0, 0.35);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.32);
}

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

html {
    height: 100%;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.65;
    padding-bottom: 0;
    overflow-x: hidden;
}

body.show-ads {
    padding-bottom: 84px;
}

/* Important: Keep horizontal padding only on .container so vertical spacing on main/sections is never zeroed out */
.container {
    width: 100%;
    max-width: 1240px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 24px;
    padding-right: 24px;
}

main {
    flex: 1 0 auto;
    width: 100%;
    padding-top: 28px;
    padding-bottom: 80px;
}

a {
    color: #2dd4bf;
    text-decoration: none;
    transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}
a:hover {
    color: #5eead4;
}

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

.svg-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

.skip-link {
    position: absolute;
    top: -60px;
    left: 12px;
    background: var(--accent-primary);
    color: #fff;
    padding: 8px 16px;
    border-radius: 6px;
    z-index: 999;
    font-weight: 600;
}
.skip-link:focus {
    top: 12px;
    color: #fff;
}

/* Header & Navigation */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    width: 100%;
    background: rgba(11, 17, 32, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-soft);
    flex-shrink: 0;
}

.nav-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    padding-top: 12px;
    padding-bottom: 12px;
    gap: 20px;
    flex-wrap: nowrap;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    font-weight: 800;
    font-size: 1.2rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    flex-shrink: 0;
}
.brand-logo:hover {
    color: #fff;
}

.brand-emblem-svg {
    width: 42px;
    height: 42px;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 10px rgba(13, 148, 136, 0.35));
}

.brand-wordmark {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
}

.brand-wordmark small {
    font-size: 0.66rem;
    font-weight: 600;
    color: #5eead4;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-top: 2px;
}

.header-Collapse-Wrap {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    flex: 1;
    min-width: 0;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 600;
    flex-wrap: nowrap;
}

.nav-links a {
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    white-space: nowrap;
    transition: all 0.2s ease;
}
.nav-links a:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}
.nav-links a.active {
    color: #5eead4;
    background: rgba(13, 148, 136, 0.14);
    border-color: rgba(45, 212, 191, 0.28);
}

.quota-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(16, 185, 129, 0.12);
    border: 1px solid rgba(16, 185, 129, 0.35);
    color: #34d399;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}

.quota-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 8px #10b981;
    flex-shrink: 0;
}

/* Mobile Hamburger Menu Toggle Button (Hidden on Desktop) */
.mobile-menu-toggle {
    display: none;
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
}
.mobile-menu-toggle:hover {
    background: var(--bg-elevated);
    border-color: rgba(45, 212, 191, 0.45);
}

/* AdSense Placement Containers: Hidden by default before AdSense approval unless body.show-ads is active */
.ad-slot-wrapper {
    display: none;
    margin: 18px auto;
    text-align: center;
    max-width: 100%;
    overflow: hidden;
}
body.show-ads .ad-slot-wrapper {
    display: block;
}

.ad-label {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.ad-placeholder-box {
    background: radial-gradient(circle at 50% 50%, rgba(30, 41, 59, 0.75), rgba(15, 23, 42, 0.9));
    border: 1px dashed rgba(148, 163, 184, 0.35);
    border-radius: var(--radius-md);
    padding: 16px;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 92px;
}

.ad-placeholder-box strong {
    color: #f8fafc;
    font-size: 0.88rem;
}
.ad-placeholder-box span {
    font-size: 0.76rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Hero & Generator Studio */
.hero-section {
    padding: 40px 0 20px;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, rgba(13, 148, 136, 0.18), transparent 70%);
    flex-shrink: 0;
}

.hero-title {
    font-size: clamp(1.75rem, 3.8vw, 2.85rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.18;
    margin-bottom: 14px;
}

.gradient-text {
    background: linear-gradient(90deg, #2dd4bf, #818cf8, #f472b6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    color: var(--text-secondary);
    max-width: 780px;
    margin: 0 auto 28px;
    font-size: 1.02rem;
}

.generator-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-lg);
    padding: 28px;
    max-width: 1020px;
    margin: 0 auto;
    box-shadow: var(--shadow-xl);
    text-align: left;
}

.prompt-input-row {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.prompt-textarea {
    flex: 1 1 480px;
    min-height: 64px;
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    color: #fff;
    font-size: 1rem;
    font-family: inherit;
    resize: vertical;
}
.prompt-textarea:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.25);
}

.btn-primary {
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-md);
    padding: 12px 24px;
    font-weight: 700;
    font-size: 0.96rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    transition: transform 0.15s, opacity 0.2s;
}
.btn-primary:hover {
    transform: translateY(-1px);
    opacity: 0.95;
    color: #fff;
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 10px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    cursor: pointer;
    transition: background 0.2s;
}
.btn-secondary:hover {
    background: var(--bg-elevated);
    color: #fff;
}

.generator-controls {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    align-items: end;
}

.control-group label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
    margin-bottom: 6px;
    font-weight: 600;
}

.control-select, .control-input {
    width: 100%;
    min-height: 44px;
    background: var(--bg-primary);
    color: var(--text-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-size: 0.9rem;
    font-family: inherit;
}
.control-select:focus, .control-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.22);
}

.quick-modifiers {
    margin-top: 18px;
    padding: 12px 16px;
    background: rgba(15, 23, 42, 0.65);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.modifier-chip {
    background: rgba(13, 148, 136, 0.14);
    border: 1px solid rgba(45, 212, 191, 0.32);
    color: #99f6e4;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all 0.15s;
}
.modifier-chip:hover {
    background: var(--accent-primary);
    color: #fff;
}

/* Filter Tabs & Search Bar */
.toolbar-section {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 12px 0 24px;
    flex-wrap: wrap;
}

.category-tabs {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.cat-tab {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    padding: 9px 16px;
    min-height: 42px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.cat-tab.active, .cat-tab:hover {
    background: var(--accent-primary);
    color: #fff;
    border-color: var(--accent-primary);
}

.search-box {
    flex: 1 1 240px;
    max-width: 340px;
    min-height: 44px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 999px;
    padding: 9px 18px;
    color: #fff;
    font-size: 0.9rem;
}
.search-box:focus {
    outline: none;
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.22);
}

/* Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(285px, 1fr));
    gap: 22px;
}

.art-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.art-card:hover {
    transform: translateY(-3px);
    border-color: rgba(45, 212, 191, 0.5);
    box-shadow: var(--shadow-soft);
}

.art-thumb-wrap {
    position: relative;
    aspect-ratio: 4 / 3;
    background: #0f172a;
    overflow: hidden;
    cursor: pointer;
    display: block;
}

.art-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s;
}
.art-card:hover .art-thumb-wrap img {
    transform: scale(1.04);
}

.art-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(11, 17, 32, 0.85);
    backdrop-filter: blur(6px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: #99f6e4;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.art-body {
    padding: 18px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.art-title {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 6px;
    color: #f8fafc;
    line-height: 1.35;
}

.art-prompt-snippet {
    font-size: 0.82rem;
    color: var(--text-muted);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 14px;
    flex: 1;
}

.art-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    flex-wrap: wrap;
}

/* Modals */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(3, 7, 18, 0.88);
    backdrop-filter: blur(8px);
    z-index: 500;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    overflow-y: auto;
}
.modal-backdrop.open {
    display: flex;
}

.modal-window {
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-lg);
    max-width: 1040px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    padding: 24px;
    box-shadow: var(--shadow-xl);
}

.studio-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
}

.canvas-preview-container {
    background: #050811;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 320px;
}

#studioCanvas {
    max-width: 100%;
    max-height: 460px;
    border-radius: 8px;
}

/* SEO Guide & FAQ Cards */
.seo-guide-section {
    margin-top: 48px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px 28px;
    box-shadow: var(--shadow-soft);
}

.seo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.seo-card {
    background: rgba(11, 17, 32, 0.75);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 22px;
}

.seo-card h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: #5eead4;
}

.seo-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
}

/* Legal & Policy Page Styling */
.legal-document {
    max-width: 960px;
    margin: 0 auto;
}

.legal-header-banner {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 20px;
    margin-bottom: 24px;
}

.legal-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 10px;
    font-size: 0.84rem;
    color: var(--text-muted);
}

.legal-content {
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 18px;
    font-size: 0.96rem;
    line-height: 1.72;
}

.legal-content h2 {
    color: #f8fafc;
    font-size: 1.24rem;
    font-weight: 700;
    margin-top: 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.legal-content h3 {
    color: #5eead4;
    font-size: 1.04rem;
    font-weight: 600;
    margin-top: 4px;
}

.legal-content ul, .legal-content ol {
    padding-left: 22px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.legal-callout {
    background: rgba(13, 148, 136, 0.1);
    border: 1px solid var(--border-accent);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    color: var(--text-primary);
    font-size: 0.92rem;
}

/* Breadcrumbs */
.breadcrumb-nav {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

/* Sticky Bottom AdSense Anchor: Hidden until AdSense is active or preview mode is enabled */
.sticky-ad-footer {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.96);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.35);
    padding: 6px 12px;
    z-index: 200;
    align-items: center;
    justify-content: center;
    text-align: center;
}
body.show-ads .sticky-ad-footer {
    display: flex;
}

/* Site Footer: Harmonious full-width surface anchored to bottom of viewport without double-border boxing */
.site-footer {
    margin-top: auto;
    padding: 40px 0 32px;
    background: linear-gradient(180deg, rgba(17, 24, 39, 0.92) 0%, rgba(11, 17, 32, 0.98) 100%);
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.88rem;
    width: 100%;
    flex-shrink: 0;
}

.footer-card-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
}

.footer-brand-col {
    display: flex;
    align-items: center;
    gap: 14px;
    max-width: 560px;
}

.footer-links-nav {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.footer-links-nav a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.86rem;
    padding: 6px 11px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}
.footer-links-nav a:hover {
    color: #5eead4;
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 1080px) {
    .studio-layout {
        grid-template-columns: 1fr;
    }
    .mobile-menu-toggle {
        display: inline-flex;
    }
    .nav-bar {
        flex-wrap: wrap;
        justify-content: space-between;
        position: relative;
    }
    .header-Collapse-Wrap {
        display: none;
        width: 100%;
        flex-basis: 100%;
        flex-direction: column;
        align-items: stretch;
        background: var(--bg-secondary);
        border: 1px solid var(--border-subtle);
        border-radius: var(--radius-md);
        padding: 16px;
        margin-top: 6px;
        gap: 14px;
        box-shadow: var(--shadow-xl);
    }
    .header-Collapse-Wrap.open {
        display: flex;
    }
    .nav-links {
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 6px;
    }
    .nav-links a {
        width: 100%;
        padding: 10px 14px;
        border-radius: var(--radius-sm);
        background: rgba(15, 23, 42, 0.45);
    }
    .quota-pill {
        justify-content: center;
        width: 100%;
    }
    .search-box {
        max-width: 100%;
    }
}

@media (max-width: 640px) {
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }
    main {
        padding-top: 20px;
        padding-bottom: 56px;
    }
    .generator-card {
        padding: 20px 16px;
    }
    .btn-primary {
        width: 100%;
    }
    .gallery-grid {
        grid-template-columns: 1fr;
    }
    .seo-guide-section {
        padding: 24px 16px;
    }
    .footer-card-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }
    .footer-links-nav {
        margin-left: -10px;
    }
}

@media print {
    .site-header, .ad-slot-wrapper, .sticky-ad-footer, .site-footer, .btn-secondary, .btn-primary {
        display: none !important;
    }
    body {
        background: #ffffff !important;
        color: #000000 !important;
        padding: 0 !important;
        min-height: auto !important;
        display: block !important;
    }
}
