/*
Theme Name:  RBXGuides Theme
Theme URI:   https://rbxguides.online
Author:      RBXGuides
Author URI:  https://rbxguides.online
Description: A Roblox-themed fansite WordPress theme that auto-populates 20 articles, pages, and navigation on activation. No setup required.
Version:     1.0.0
Requires at least: 5.8
Tested up to: 6.7
Requires PHP: 7.4
License:     GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rbxmod
Tags:        gaming, custom-colors, custom-menu, featured-images, full-width-template, two-columns
*/

/* ==========================================================================
   CSS CUSTOM PROPERTIES (Design Tokens)
   ========================================================================== */
:root {
    /* Brand colors */
    --rbx-red:       #E02020;
    --rbx-red-dark:  #B01818;
    --rbx-red-light: #FF4444;
    --rbx-blue:      #0066CC;
    --rbx-blue-dark: #004A99;
    --rbx-blue-light:#4499FF;
    --rbx-white:     #FFFFFF;

    /* Dark backgrounds */
    --rbx-dark:      #111111;
    --rbx-dark-alt:  #1A1A2E;
    --rbx-mid:       #222244;
    --rbx-mid-light: #2A2A4A;

    /* Text */
    --rbx-text:      #CCCCDD;
    --rbx-text-dim:  #888899;
    --rbx-text-bright:#EEEEFF;
    --rbx-border:    #333355;
    --rbx-border-light:#44446A;

    /* Functional */
    --rbx-link:      #4499FF;
    --rbx-link-hover:#E02020;
    --rbx-success:   #22CC66;
    --rbx-warning:   #FFAA00;

    /* Typography */
    --font-heading:  'Segoe UI', 'Arial Black', Arial, sans-serif;
    --font-body:     'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-mono:     'Consolas', 'Courier New', Courier, monospace;

    /* Layout */
    --container-max: 1200px;
    --sidebar-w:     300px;
    --gap:           24px;
    --gap-sm:        12px;
    --gap-lg:        48px;
    --radius:        6px;
    --radius-lg:     12px;
    --radius-xl:     20px;

    /* Animation */
    --transition:    0.25s ease;
    --transition-slow: 0.4s ease;

    /* Shadows */
    --shadow-sm:     0 2px 8px rgba(0,0,0,0.4);
    --shadow-md:     0 4px 16px rgba(0,0,0,0.5);
    --shadow-lg:     0 8px 32px rgba(0,0,0,0.6);
    --shadow-glow-red:  0 0 20px rgba(224,32,32,0.3);
    --shadow-glow-blue: 0 0 20px rgba(0,102,204,0.3);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    background-color: var(--rbx-dark);
    color: var(--rbx-text);
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   TYPOGRAPHY
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--rbx-white);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 0.6em;
    letter-spacing: -0.01em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.75rem); }
h2 { font-size: clamp(1.4rem,  3vw, 2.0rem);  }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem);}
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; }
h6 { font-size: 0.95rem; }

p {
    margin-bottom: 1.25em;
    color: var(--rbx-text);
}

a {
    color: var(--rbx-link);
    text-decoration: none;
    transition: color var(--transition);
}
a:hover {
    color: var(--rbx-link-hover);
    text-decoration: underline;
}
a:focus-visible {
    outline: 2px solid var(--rbx-red);
    outline-offset: 3px;
    border-radius: 2px;
}

strong, b { color: var(--rbx-white); font-weight: 700; }
em, i { font-style: italic; }

ul, ol {
    padding-left: 1.5em;
    margin-bottom: 1.25em;
}
ul li, ol li { margin-bottom: 0.3em; }

blockquote {
    border-left: 4px solid var(--rbx-red);
    padding: 0.75em 1.25em;
    margin: 1.5em 0;
    background: var(--rbx-dark-alt);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--rbx-text-bright);
}

code {
    font-family: var(--font-mono);
    background: var(--rbx-mid);
    border: 1px solid var(--rbx-border);
    border-radius: var(--radius);
    padding: 0.15em 0.45em;
    font-size: 0.875em;
    color: var(--rbx-blue-light);
}

pre {
    font-family: var(--font-mono);
    background: var(--rbx-mid);
    border: 1px solid var(--rbx-border);
    border-radius: var(--radius-lg);
    padding: 1.25em 1.5em;
    overflow-x: auto;
    margin: 1.5em 0;
    font-size: 0.875em;
    line-height: 1.6;
}
pre code {
    background: none;
    border: none;
    padding: 0;
    font-size: inherit;
}

hr {
    border: none;
    border-top: 1px solid var(--rbx-border);
    margin: 2em 0;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1.5em;
}
th, td {
    padding: 0.65em 1em;
    border: 1px solid var(--rbx-border);
    text-align: left;
}
th {
    background: var(--rbx-mid);
    color: var(--rbx-white);
    font-family: var(--font-heading);
}
tr:nth-child(even) td { background: rgba(255,255,255,0.03); }

/* ==========================================================================
   LAYOUT
   ========================================================================== */
.rbx-container {
    max-width: var(--container-max);
    margin-left: auto;
    margin-right: auto;
    padding-left: var(--gap);
    padding-right: var(--gap);
    width: 100%;
}

.rbx-main {
    flex: 1;
    padding-top: calc(var(--gap) * 2);
    padding-bottom: calc(var(--gap) * 3);
}

.rbx-main-full {
    padding-top: 0;
}

.rbx-layout-two-col {
    display: grid;
    grid-template-columns: 1fr var(--sidebar-w);
    gap: calc(var(--gap) * 2);
    align-items: start;
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.rbx-skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    background: var(--rbx-red);
    color: var(--rbx-white);
    padding: 0.5em 1em;
    z-index: 9999;
    font-weight: 700;
}
.rbx-skip-link:focus { top: 0; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.rbx-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.65em 1.5em;
    border-radius: var(--radius);
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    transition: all var(--transition);
    cursor: pointer;
    border: 2px solid transparent;
    text-decoration: none;
    white-space: nowrap;
}
.rbx-btn:hover { text-decoration: none; }
.rbx-btn:focus-visible { outline: 2px solid var(--rbx-white); outline-offset: 3px; }

.rbx-btn-primary {
    background: var(--rbx-red);
    color: var(--rbx-white);
    border-color: var(--rbx-red);
}
.rbx-btn-primary:hover {
    background: var(--rbx-red-dark);
    border-color: var(--rbx-red-dark);
    color: var(--rbx-white);
    box-shadow: var(--shadow-glow-red);
    transform: translateY(-1px);
}

.rbx-btn-secondary {
    background: var(--rbx-blue);
    color: var(--rbx-white);
    border-color: var(--rbx-blue);
}
.rbx-btn-secondary:hover {
    background: var(--rbx-blue-dark);
    border-color: var(--rbx-blue-dark);
    color: var(--rbx-white);
    box-shadow: var(--shadow-glow-blue);
    transform: translateY(-1px);
}

.rbx-btn-outline {
    background: transparent;
    color: var(--rbx-red);
    border-color: var(--rbx-red);
}
.rbx-btn-outline:hover {
    background: var(--rbx-red);
    color: var(--rbx-white);
}

/* ==========================================================================
   CARDS
   ========================================================================== */
.rbx-card {
    background: var(--rbx-dark-alt);
    border: 1px solid var(--rbx-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.rbx-card:hover {
    transform: translateY(-5px);
    border-color: var(--rbx-red);
    box-shadow: var(--shadow-md), var(--shadow-glow-red);
}

.rbx-card-thumbnail-link { display: block; overflow: hidden; }
.rbx-card-thumbnail {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    transition: transform var(--transition-slow);
}
.rbx-card:hover .rbx-card-thumbnail { transform: scale(1.04); }

.rbx-card-body { padding: var(--gap); }

.rbx-card-meta {
    display: flex;
    align-items: center;
    gap: 0.5em;
    font-size: 0.78rem;
    color: var(--rbx-text-dim);
    margin-bottom: 0.6em;
    flex-wrap: wrap;
}

.rbx-cat-link {
    color: var(--rbx-red);
    font-weight: 700;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.rbx-cat-link:hover { color: var(--rbx-red-light); }

.rbx-card-title {
    font-size: 1.05rem;
    margin-bottom: 0.6em;
    line-height: 1.3;
}
.rbx-card-title a { color: var(--rbx-white); }
.rbx-card-title a:hover { color: var(--rbx-red); text-decoration: none; }

.rbx-card-excerpt {
    color: var(--rbx-text-dim);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1.25em;
}

.rbx-card-read-more { font-size: 0.8rem; padding: 0.5em 1.1em; }

/* ==========================================================================
   POSTS GRID
   ========================================================================== */
.rbx-posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: calc(var(--gap) * 1.25);
}

/* ==========================================================================
   SECTION HEADER
   ========================================================================== */
.rbx-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--gap);
    padding-bottom: var(--gap-sm);
    border-bottom: 2px solid var(--rbx-border);
}

.rbx-section-title {
    font-size: 1.5rem;
    margin: 0;
    position: relative;
    padding-left: 1rem;
}
.rbx-section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.15em;
    bottom: 0.15em;
    width: 4px;
    background: var(--rbx-red);
    border-radius: 2px;
}

.rbx-view-all {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--rbx-blue-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}
.rbx-view-all:hover { color: var(--rbx-red); }

/* ==========================================================================
   CATEGORY BADGES & PILLS
   ========================================================================== */
.rbx-cat-badge {
    display: inline-block;
    padding: 0.2em 0.65em;
    background: var(--rbx-red);
    color: var(--rbx-white);
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: var(--radius);
    margin-right: 0.35em;
    margin-bottom: 0.35em;
}
.rbx-cat-badge:hover {
    background: var(--rbx-red-dark);
    color: var(--rbx-white);
    text-decoration: none;
}

/* ==========================================================================
   PAGINATION
   ========================================================================== */
.rbx-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5em;
    padding: var(--gap) 0;
    flex-wrap: wrap;
}
.rbx-pagination a,
.rbx-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5em;
    height: 2.5em;
    padding: 0 0.75em;
    border: 1px solid var(--rbx-border);
    border-radius: var(--radius);
    font-weight: 700;
    font-size: 0.875rem;
    transition: all var(--transition);
}
.rbx-pagination a { color: var(--rbx-text); }
.rbx-pagination a:hover {
    border-color: var(--rbx-red);
    color: var(--rbx-red);
    text-decoration: none;
}
.rbx-pagination .current {
    background: var(--rbx-red);
    border-color: var(--rbx-red);
    color: var(--rbx-white);
}

/* ==========================================================================
   ENTRY CONTENT (post body)
   ========================================================================== */
.entry-content {
    color: var(--rbx-text);
    font-size: 1.05rem;
    line-height: 1.8;
}
.entry-content h2,
.entry-content h3,
.entry-content h4 { margin-top: 1.75em; }
.entry-content > *:first-child { margin-top: 0; }
.entry-content img {
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin: 1.5em auto;
}
.entry-content ul li::marker { color: var(--rbx-red); }
.entry-content ol li::marker { color: var(--rbx-blue-light); font-weight: 700; }

/* ==========================================================================
   ALIGNMENT CLASSES (WordPress block editor)
   ========================================================================== */
.alignleft  { float: left;  margin-right: var(--gap); margin-bottom: var(--gap-sm); }
.alignright { float: right; margin-left:  var(--gap); margin-bottom: var(--gap-sm); }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.alignwide  { max-width: calc(var(--container-max) + 80px); margin-left: auto; margin-right: auto; }
.alignfull  { max-width: 100vw; margin-left: calc(50% - 50vw); }
