/*
Theme Name: Roteirize Blog
Theme URI: https://roteirize.ai
Author: pivi.codes
Author URI: https://pivi.codes
Description: Blog theme for Roteirize.ai — aligned with the portal design. Glassmorphism style, Outfit font, purple/green palette.
Version: 1.0.0
License: Proprietary
Text Domain: roteirize-blog
*/

/* =========================================
   CSS Custom Properties (from Brand Guide)
   ========================================= */

:root {
    /* Primary (Purple) */
    --color-primary-50: #faf5ff;
    --color-primary-100: #f3e8ff;
    --color-primary-200: #e9d5ff;
    --color-primary-300: #d8b4fe;
    --color-primary-400: #a855f7;
    --color-primary-500: #6d25c4;
    --color-primary-600: #5b1fa3;
    --color-primary-700: #4c1d85;
    --color-primary-800: #34125d;
    --color-primary-900: #210b3b;

    /* Secondary (Lime Green) */
    --color-secondary-50: #f7fee7;
    --color-secondary-300: #bef264;
    --color-secondary-500: #7cc425;
    --color-secondary-700: #4d7c0f;

    /* Semantic */
    --color-success: #22c55e;
    --color-warning: #e1952b;
    --color-danger: #f43f5e;

    /* Gradients */
    --gradient-hero: linear-gradient(360deg, #34125d 0%, #a071d9 100%);
    --gradient-dark: linear-gradient(360deg, #220246 0%, #380475 100%);

    /* Typography */
    --font-family: 'Outfit', sans-serif;

    /* Glassmorphism */
    --glass-bg: rgba(109, 37, 196, 0.08);
    --glass-border: rgba(160, 113, 217, 0.2);
    --glass-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Layout */
    --content-width: 780px;
    --wide-width: 1200px;
}

/* =========================================
   Reset & Base
   ========================================= */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-family);
    font-weight: 400;
    line-height: 1.7;
    color: #1a1a2e;
    background: #f8f6fc;
    overflow-x: hidden;
}

a {
    color: var(--color-primary-500);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

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

/* =========================================
   Typography
   ========================================= */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family);
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-primary-800);
}

h1 { font-size: 2.25rem; margin-bottom: 1rem; }
h2 { font-size: 1.75rem; margin-bottom: 0.875rem; margin-top: 2rem; }
h3 { font-size: 1.375rem; margin-bottom: 0.75rem; margin-top: 1.5rem; }
h4 { font-size: 1.125rem; margin-bottom: 0.625rem; }

p {
    margin-bottom: 1.25rem;
}

blockquote {
    border-left: 4px solid var(--color-primary-500);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    background: var(--glass-bg);
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: var(--color-primary-700);
}

code {
    background: var(--color-primary-50);
    border: 1px solid var(--color-primary-200);
    border-radius: 4px;
    padding: 0.15em 0.4em;
    font-size: 0.875em;
}

pre {
    background: var(--color-primary-900);
    color: #e9d5ff;
    padding: 1.25rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

pre code {
    background: none;
    border: none;
    padding: 0;
    color: inherit;
    font-size: 0.875rem;
}

ul, ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.375rem;
}

/* =========================================
   Header
   ========================================= */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(52, 18, 93, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(160, 113, 217, 0.15);
}

.site-header .container {
    max-width: var(--wide-width);
    margin: 0 auto;
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #fff;
    font-weight: 700;
    font-size: 1.25rem;
}

.site-logo img {
    height: 24px;
    width: auto;
    max-width: 120px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.site-nav a {
    color: rgba(255, 255, 255, 0.8);
    font-weight: 500;
    font-size: 0.9rem;
    transition: color 0.2s;
}

.site-nav a:hover {
    color: #fff;
}

.nav-cta {
    background: var(--color-secondary-500) !important;
    color: #fff !important;
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background 0.2s;
}

.nav-cta:hover {
    background: var(--color-secondary-700) !important;
}

/* =========================================
   Hero / Page Header
   ========================================= */

.page-hero {
    background: var(--gradient-hero);
    padding: 4rem 1.5rem 3rem;
    text-align: center;
}

.page-hero h1 {
    color: #fff;
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.page-hero .subtitle {
    color: rgba(255, 255, 255, 0.75);
    font-size: 1.1rem;
}

/* =========================================
   Layout
   ========================================= */

.site-main {
    max-width: var(--content-width);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
}

.site-main.wide {
    max-width: var(--wide-width);
}

/* =========================================
   Post Cards (Blog Listing)
   ========================================= */

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.post-card {
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--glass-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-hero);
}

.post-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(109, 37, 196, 0.15);
}

.post-card-thumbnail {
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.post-card-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-card-thumbnail img {
    transform: scale(1.03);
}

.post-card-content {
    padding: 1.25rem 1.5rem 1.5rem;
}

.post-card-meta {
    font-size: 0.8rem;
    color: var(--color-primary-400);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.post-card-title {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    line-height: 1.35;
}

.post-card-title a {
    color: var(--color-primary-800);
}

.post-card-title a:hover {
    color: var(--color-primary-500);
}

.post-card-excerpt {
    font-size: 0.9rem;
    color: #555;
    line-height: 1.6;
}

/* =========================================
   Single Post
   ========================================= */

.single-post-header {
    background: var(--gradient-hero);
    padding: 4rem 1.5rem 3rem;
    text-align: center;
}

.single-post-header h1 {
    color: #fff;
    font-size: 2.25rem;
    max-width: var(--content-width);
    margin: 0 auto 0.75rem;
}

.single-post-meta {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.post-content {
    background: #fff;
    border-radius: 12px;
    padding: 2.5rem;
    margin-top: -1.5rem;
    position: relative;
    box-shadow: var(--glass-shadow);
    border: 1px solid var(--glass-border);
}

.post-content h2 {
    color: var(--color-primary-700);
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary-100);
}

.post-content a {
    color: var(--color-primary-500);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.post-content a:hover {
    color: var(--color-secondary-500);
}

/* CTA Box inside post */
.post-cta {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    text-align: center;
}

.post-cta .btn {
    display: inline-block;
    background: var(--color-secondary-500);
    color: #fff;
    padding: 0.75rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    margin-top: 0.75rem;
    transition: background 0.2s;
}

.post-cta .btn:hover {
    background: var(--color-secondary-700);
    color: #fff;
    text-decoration: none;
}

/* =========================================
   Sidebar / Widgets
   ========================================= */

.widget {
    background: #fff;
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.widget-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--color-primary-700);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--color-primary-100);
}

/* =========================================
   Footer
   ========================================= */

.site-footer {
    background: var(--color-primary-900);
    color: rgba(255, 255, 255, 0.7);
    padding: 2.5rem 1.5rem;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.875rem;
}

.site-footer a {
    color: var(--color-secondary-500);
}

.site-footer a:hover {
    color: var(--color-secondary-300);
}

/* =========================================
   Pagination
   ========================================= */

.pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.pagination a {
    background: #fff;
    border: 1px solid var(--glass-border);
    color: var(--color-primary-700);
}

.pagination a:hover {
    background: var(--color-primary-50);
    border-color: var(--color-primary-300);
}

.pagination .current {
    background: var(--color-primary-500);
    color: #fff;
    border: 1px solid var(--color-primary-500);
}

/* =========================================
   Responsive
   ========================================= */

@media (max-width: 768px) {
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.375rem; }

    .page-hero {
        padding: 2.5rem 1rem 2rem;
    }

    .page-hero h1,
    .single-post-header h1 {
        font-size: 1.5rem;
    }

    .page-hero .subtitle {
        font-size: 0.95rem;
    }

    .site-header .container {
        padding: 0.75rem 1rem;
    }

    .site-logo {
        flex: 1;
    }

    .site-logo span {
        display: none;
    }

    .site-nav a:not(.nav-cta) {
        display: none;
    }

    .site-nav {
        gap: 0.75rem;
        flex-shrink: 0;
        margin-left: auto;
    }

    .nav-cta {
        font-size: 0.8rem;
        padding: 0.4rem 1rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .post-content {
        padding: 1.5rem;
        margin-top: -1rem;
    }

    .site-main {
        padding: 1.5rem 1rem;
    }

    .single-post-header {
        padding: 2.5rem 1rem 2rem;
    }
}

/* =========================================
   WordPress Utilities
   ========================================= */

.aligncenter {
    display: block;
    margin: 1.5rem auto;
}

.alignleft {
    float: left;
    margin: 0 1.5rem 1rem 0;
}

.alignright {
    float: right;
    margin: 0 0 1rem 1.5rem;
}

.wp-caption {
    max-width: 100%;
    margin-bottom: 1.5rem;
}

.wp-caption-text {
    font-size: 0.8rem;
    color: #888;
    text-align: center;
    margin-top: 0.5rem;
}

.screen-reader-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(1px, 1px, 1px, 1px);
}
