/*
Theme Name: Theme Websites
Theme URI: https://aimaze.nl/
Author: AIMAZE
Author URI: https://aimaze.nl/
Description: A modern, playful news theme with warm aesthetics and excellent readability.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: theme-websites
Tags: news, magazine, blog, responsive, custom-colors, custom-menu
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 7.4
*/

/* ==========================================================================
   CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
    /* Typography */
    --font-display: 'Outfit', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 6px 16px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.12);

    /* Spacing & Sizing */
    --radius: 12px;
    --radius-sm: 8px;
    --radius-pill: 20px;
    --radius-full: 50%;
    --navbar-height: 72px;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-bounce: 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    --transition-smooth: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 4vw, 2.25rem); }
h3 { font-size: clamp(1.25rem, 3vw, 1.75rem); }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p { margin-bottom: 1rem; }
p:last-child { margin-bottom: 0; }

/* ==========================================================================
   LINKS
   ========================================================================== */

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover,
a:focus { color: var(--color-accent-hover); }

a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

/* ==========================================================================
   IMAGES & MEDIA
   ========================================================================== */

img,
picture,
video,
canvas,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

img { object-fit: cover; }

figure { margin: 0; }

figcaption {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    margin-top: 0.5rem;
}

/* ==========================================================================
   LAYOUT CONTAINERS
   ========================================================================== */

.container {
    width: 100%;
    max-width: 1400px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.container-narrow {
    max-width: 800px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

.container-wide {
    max-width: 1600px;
    margin-inline: auto;
    padding-inline: 1.5rem;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: all var(--transition-bounce);
}

.btn:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.btn svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

/* Primary Button */
.btn-primary {
    color: #fff;
    background-color: var(--color-accent);
}

.btn-primary:hover {
    color: #fff;
    background-color: var(--color-accent-hover);
    transform: scale(1.05);
    box-shadow: 0 4px 20px rgba(232, 93, 4, 0.35);
}

/* Secondary/Outline Button */
.btn-secondary {
    color: var(--color-accent);
    background-color: var(--color-accent-light);
    border: 1px solid transparent;
}

.btn-secondary:hover {
    color: var(--color-accent-hover);
    border-color: var(--color-accent);
}

/* Ghost Button */
.btn-ghost {
    color: var(--color-text);
    background-color: transparent;
}

.btn-ghost:hover {
    color: var(--color-accent);
    background-color: var(--color-accent-light);
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ==========================================================================
   FORM ELEMENTS
   ========================================================================== */

input,
textarea,
select,
button {
    font-family: inherit;
    font-size: inherit;
}

input[type="text"],
input[type="email"],
input[type="search"],
input[type="password"],
input[type="url"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 0.875rem 1.25rem;
    font-size: 0.9375rem;
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    outline: none;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

input:focus,
textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px var(--color-accent-light);
}

input::placeholder,
textarea::placeholder { color: var(--color-text-muted); }

textarea {
    border-radius: var(--radius);
    resize: vertical;
    min-height: 120px;
}

/* Search Input */
.search-input {
    padding-left: 3rem;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%237A756E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'%3E%3C/circle%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'%3E%3C/line%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 1rem center;
}

/* ==========================================================================
   CARDS & SURFACES
   ========================================================================== */

.card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: transform var(--transition-bounce), box-shadow var(--transition-base), border-color var(--transition-fast);
}

.card:hover {
    border-color: transparent;
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.card-body { padding: 1.25rem; }

.card-image {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16 / 10;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover .card-image img { transform: scale(1.05); }

/* ==========================================================================
   BADGES & LABELS
   ========================================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.875rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: var(--radius-pill);
    transition: transform var(--transition-bounce);
}

.badge:hover { transform: scale(1.05); }

.badge-primary {
    color: #fff;
    background-color: var(--color-accent);
}

.badge-light {
    color: var(--color-accent);
    background-color: var(--color-accent-light);
}

.badge-dark {
    color: #fff;
    background-color: var(--color-dark);
}

/* Category Badge (alias) */
.article-category,
.category-badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fff;
    background-color: var(--color-accent);
    border-radius: var(--radius-pill);
}

/* ==========================================================================
   META & BYLINES
   ========================================================================== */

.meta,
.article-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.meta span,
.article-meta span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.meta svg,
.article-meta svg {
    width: 0.875rem;
    height: 0.875rem;
    opacity: 0.7;
}

/* Author Avatar */
.avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-full);
    overflow: hidden;
    border: 2px solid var(--color-accent-light);
    transition: all var(--transition-bounce);
}

.avatar:hover {
    border-color: var(--color-accent);
    transform: scale(1.08);
}

.avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.avatar-sm { width: 2rem; height: 2rem; }
.avatar-lg { width: 3.5rem; height: 3.5rem; }
.avatar-xl { width: 5rem; height: 5rem; }

/* ==========================================================================
   BREADCRUMBS
   ========================================================================== */

.breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.breadcrumb a {
    color: var(--color-text-muted);
    transition: color var(--transition-fast);
}

.breadcrumb a:hover { color: var(--color-accent); }

.breadcrumb-separator { color: var(--color-border); }

/* Hide breadcrumb and title on single pages while keeping their layout space. */
body.page .breadcrumbs,
body.page .page-header {
    visibility: hidden;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.page-link:hover {
    color: var(--color-accent);
    border-color: var(--color-accent);
    background-color: var(--color-accent-light);
}

.page-link.active {
    color: #fff;
    background-color: var(--color-accent);
    border-color: var(--color-accent);
}

.page-link.disabled {
    opacity: 0.5;
    pointer-events: none;
}

/* ==========================================================================
   TAGS
   ========================================================================== */

a.tag,
span.tag,
.tags-cloud .tag,
.tag-link {
    display: inline-block;
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-pill);
    transition: all var(--transition-fast);
}

a.tag:hover,
span.tag:hover,
.tags-cloud .tag:hover,
.tag-link:hover {
    color: var(--color-accent);
    background-color: var(--color-accent-light);
    border-color: var(--color-accent);
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* ==========================================================================
   SOCIAL ICONS
   ========================================================================== */

.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    color: var(--color-text);
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-full);
    transition: all var(--transition-bounce);
}

.social-icon:hover {
    color: #fff;
    background-color: var(--color-accent);
    border-color: var(--color-accent);
    transform: translateY(-3px);
}

.social-icon svg {
    width: 1.125rem;
    height: 1.125rem;
}

/* ==========================================================================
   UTILITY CLASSES
   ========================================================================== */

/* Visually Hidden (Accessible) */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Text Alignment */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

/* Text Colors */
.text-muted { color: var(--color-text-muted); }
.text-accent { color: var(--color-accent); }
.text-white { color: #fff; }

/* Background Colors */
.bg-surface { background-color: var(--color-surface); }
.bg-accent-light { background-color: var(--color-accent-light); }
.bg-dark { background-color: var(--color-dark); }

/* Display */
.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }
.d-grid { display: grid; }

/* Flex Utilities */
.flex-center {
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.gap-3 { gap: 1.5rem; }
.gap-4 { gap: 2rem; }

/* Spacing */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* ==========================================================================
   WORDPRESS SPECIFIC
   ========================================================================== */

/* Alignments */
.alignleft {
    float: left;
    margin-right: 1.5rem;
    margin-bottom: 1rem;
}

.alignright {
    float: right;
    margin-left: 1.5rem;
    margin-bottom: 1rem;
}

.aligncenter {
    display: block;
    margin-inline: auto;
}

.alignwide { max-width: 1200px; }
.alignfull { max-width: 100%; }

/* WordPress Captions */
.wp-caption {
    max-width: 100%;
    margin-bottom: 1rem;
}

.wp-caption-text {
    font-size: 0.875rem;
    color: var(--color-text-muted);
    padding-top: 0.5rem;
}

/* WordPress Gallery */
.gallery {
    display: grid;
    gap: 1rem;
}

.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }

/* Screen Reader Text */
.screen-reader-text {
    clip: rect(1px, 1px, 1px, 1px);
    position: absolute !important;
    height: 1px;
    width: 1px;
    overflow: hidden;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--color-surface);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    clip: auto !important;
    color: var(--color-text);
    display: block;
    font-size: 0.875rem;
    font-weight: 600;
    height: auto;
    left: 0.25rem;
    line-height: normal;
    padding: 1rem;
    text-decoration: none;
    top: 0.25rem;
    width: auto;
    z-index: 100000;
}

/* Skip Link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--color-accent);
    color: #fff;
    padding: 0.5rem 1rem;
    z-index: 9999;
    transition: top var(--transition-fast);
}

.skip-link:focus { top: 0; }

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */

@media (max-width: 1200px) {
    .container { padding-inline: 1.25rem; }
}

@media (max-width: 900px) {
    :root { --navbar-height: 64px; }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.5rem; }

    .container,
    .container-narrow { padding-inline: 1rem; }

    .d-md-none { display: none; }
    .d-md-block { display: block; }
}

@media (max-width: 600px) {
    html { font-size: 15px; }

    .btn { padding: 0.625rem 1.25rem; }

    .d-sm-none { display: none; }
    .d-sm-block { display: block; }

    .gallery-columns-3,
    .gallery-columns-4 { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   PRINT STYLES
   ========================================================================== */

@media print {
    *,
    *::before,
    *::after {
        background: transparent !important;
        color: #000 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited { text-decoration: underline; }

    a[href]::after { content: " (" attr(href) ")"; }

    img { page-break-inside: avoid; }

    h2, h3 { page-break-after: avoid; }

    .no-print { display: none !important; }
}