/* =============================================================================
   RANKRIX THEME — GLOBAL STYLES
   Galactic fixed background, content layout, base typography.
   ========================================================================== */

/* ----------------------------------------------------------------------------
   FIXED GALACTIC BACKGROUND
   The image is set on body::before so content scrolls over it. Using a fixed
   pseudo-element instead of background-attachment:fixed gives better mobile
   support (iOS Safari ignores background-attachment:fixed).
---------------------------------------------------------------------------- */
body {
    position: relative;
    min-height: 100vh;
    background-color: #000;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -2;
    background-image: var(--rkx-bg-image, url('../images/Galactic.jpg'));
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-color: #000;
    pointer-events: none;
}

/* Optional dark overlay on top of the background image to keep text readable
   when the user uploads a brighter image via the customizer. */
body::after {
    content: '';
    position: fixed;
    inset: 0;
    z-index: -1;
    background-color: var(--rkx-bg-overlay, rgba(0,0,0,0));
    pointer-events: none;
}

/* ----------------------------------------------------------------------------
   CONTENT WRAPPERS
---------------------------------------------------------------------------- */
.rkx-site {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.rkx-main {
    flex: 1 0 auto;
    width: 100%;
    padding: 120px 20px 80px;
}

@media (min-width: 768px) {
    .rkx-main { padding: 140px 32px 100px; }
}

@media (min-width: 1280px) {
    .rkx-main { padding: 160px 48px 120px; }
}

.rkx-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.rkx-container--narrow {
    max-width: 760px;
}

/* ----------------------------------------------------------------------------
   TYPOGRAPHY
---------------------------------------------------------------------------- */
.rkx-main h1,
.rkx-main h2,
.rkx-main h3,
.rkx-main h4,
.rkx-main h5,
.rkx-main h6 {
    font-family: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #ffffff;
    line-height: 1.2;
    margin: 0 0 0.6em;
}

.rkx-main h1 { font-size: clamp(2rem, 4.5vw, 3.5rem); }
.rkx-main h2 { font-size: clamp(1.6rem, 3.2vw, 2.4rem); }
.rkx-main h3 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); }
.rkx-main h4 { font-size: 1.2rem; }
.rkx-main h5 { font-size: 1.05rem; }
.rkx-main h6 { font-size: 0.95rem; }

.rkx-main p {
    color: rgba(255,255,255,0.78);
    font-size: 1rem;
    line-height: 1.7;
    margin: 0 0 1.2em;
}

.rkx-main a {
    color: #818cf8;
    border-bottom: 1px solid rgba(129,140,248,0.3);
    transition: color 200ms ease, border-color 200ms ease;
}
.rkx-main a:hover {
    color: #ffffff;
    border-bottom-color: #ffffff;
}

.rkx-main ul,
.rkx-main ol {
    color: rgba(255,255,255,0.78);
    padding-left: 1.4em;
    margin: 0 0 1.2em;
    line-height: 1.7;
}
.rkx-main li { margin-bottom: 0.4em; }

.rkx-main blockquote {
    border-left: 3px solid #1D24CA;
    padding: 0.4em 0 0.4em 1.2em;
    margin: 1.6em 0;
    color: rgba(255,255,255,0.85);
    font-style: italic;
    font-size: 1.05rem;
}

.rkx-main code {
    font-family: 'JetBrains Mono', ui-monospace, Menlo, Consolas, monospace;
    background: rgba(255,255,255,0.08);
    color: #818cf8;
    padding: 2px 6px;
    border-radius: 2px;
    font-size: 0.9em;
}
.rkx-main pre {
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 2px;
    padding: 16px;
    overflow-x: auto;
    margin: 1.4em 0;
}
.rkx-main pre code {
    background: transparent;
    color: #e5e7eb;
    padding: 0;
}

.rkx-main img,
.rkx-main figure {
    margin: 1.6em auto;
    border-radius: 2px;
}

/* ----------------------------------------------------------------------------
   POST / ARCHIVE CARDS
---------------------------------------------------------------------------- */
.rkx-post {
    background: rgba(0,0,0,0.42);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 2px;
    padding: 32px;
    margin-bottom: 28px;
    transition: border-color 300ms ease, transform 300ms ease;
}
.rkx-post:hover {
    border-color: rgba(29,36,202,0.4);
    transform: translateY(-2px);
}

.rkx-post-meta {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(255,255,255,0.45);
    margin-bottom: 14px;
}
.rkx-post-meta a { color: #818cf8; border: none; }

.rkx-post-title {
    margin: 0 0 14px;
    font-size: clamp(1.4rem, 2.6vw, 2rem);
}
.rkx-post-title a {
    color: #ffffff;
    border: none;
    text-decoration: none;
}
.rkx-post-title a:hover { color: #818cf8; }

.rkx-post-excerpt {
    color: rgba(255,255,255,0.72);
    margin-bottom: 18px;
}

.rkx-read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #1D24CA;
    color: #fff !important;
    border: 1px solid rgba(29,36,202,0.55);
    padding: 10px 18px;
    border-radius: 2px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background 180ms ease, box-shadow 180ms ease, gap 180ms ease;
}
.rkx-read-more:hover {
    background: #2d35e0;
    box-shadow: 0 0 18px rgba(29,36,202,0.45);
    gap: 12px;
    color: #fff !important;
}

/* ----------------------------------------------------------------------------
   PAGINATION
---------------------------------------------------------------------------- */
.rkx-pagination {
    margin-top: 40px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
}
.rkx-pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    color: rgba(255,255,255,0.72);
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 2px;
    font-size: 13px;
    font-weight: 500;
    text-decoration: none;
    transition: all 180ms ease;
}
.rkx-pagination .page-numbers:hover,
.rkx-pagination .page-numbers.current {
    color: #fff;
    background: #1D24CA;
    border-color: rgba(29,36,202,0.55);
}

/* ----------------------------------------------------------------------------
   404 / NOT FOUND
---------------------------------------------------------------------------- */
.rkx-404 {
    text-align: center;
    padding: 60px 20px;
}
.rkx-404-code {
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: clamp(5rem, 14vw, 9rem);
    font-weight: 700;
    line-height: 1;
    background: linear-gradient(135deg, #1D24CA 0%, #818cf8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0 0 24px;
}

/* ----------------------------------------------------------------------------
   SEARCH FORM
---------------------------------------------------------------------------- */
.rkx-search-form {
    display: flex;
    gap: 8px;
    max-width: 540px;
    margin: 20px auto;
}
.rkx-search-form input[type="search"] {
    flex: 1;
    height: 44px;
    padding: 0 14px;
    background: rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 2px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: border-color 180ms ease;
}
.rkx-search-form input[type="search"]::placeholder { color: rgba(255,255,255,0.4); }
.rkx-search-form input[type="search"]:focus { border-color: #1D24CA; }
.rkx-search-form button {
    height: 44px;
    padding: 0 20px;
    background: #1D24CA;
    color: #fff;
    border: 1px solid rgba(29,36,202,0.55);
    border-radius: 2px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms ease;
}
.rkx-search-form button:hover { background: #2d35e0; }

/* ----------------------------------------------------------------------------
   COMMENTS
---------------------------------------------------------------------------- */
.rkx-comments {
    margin-top: 50px;
    background: rgba(0,0,0,0.42);
    backdrop-filter: blur(20px) saturate(1.4);
    -webkit-backdrop-filter: blur(20px) saturate(1.4);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 2px;
    padding: 32px;
}
.rkx-comments h2 { margin-top: 0; }
.rkx-comments .comment-list { list-style: none; padding: 0; }
.rkx-comments .comment-body {
    padding: 16px 0;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}
.rkx-comments .comment-meta { font-size: 13px; color: rgba(255,255,255,0.5); margin-bottom: 8px; }

.rkx-comments .comment-form input,
.rkx-comments .comment-form textarea {
    width: 100%;
    background: rgba(0,0,0,0.45);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 2px;
    padding: 10px 14px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    margin-bottom: 12px;
    transition: border-color 180ms ease;
}
.rkx-comments .comment-form input:focus,
.rkx-comments .comment-form textarea:focus {
    outline: none;
    border-color: #1D24CA;
}
.rkx-comments .comment-form textarea { min-height: 130px; resize: vertical; }
.rkx-comments .comment-form .submit {
    background: #1D24CA;
    color: #fff;
    border: 1px solid rgba(29,36,202,0.55);
    padding: 10px 22px;
    border-radius: 2px;
    font-weight: 600;
    cursor: pointer;
    transition: background 180ms ease;
}
.rkx-comments .comment-form .submit:hover { background: #2d35e0; }

/* ----------------------------------------------------------------------------
   ELEMENTOR COMPATIBILITY
   Make Elementor sections inherit the transparent galactic look.
---------------------------------------------------------------------------- */
.elementor-section, .e-con, .elementor-widget-wrap { color: #ffffff; }
.elementor-heading-title { color: inherit; }
.elementor-widget-text-editor p { color: rgba(255,255,255,0.78); }

/* Elementor's default page padding can collide with our fixed header — push
   the first section down on Elementor-built pages. */
body.elementor-page .rkx-main { padding-top: 100px; }

/* When using "Elementor Canvas" or "Elementor Full Width", let Elementor handle
   the whole layout — just keep the header/footer pills visible above. */
.elementor-template-canvas .rkx-main,
.elementor-template-full-width .rkx-main { padding: 0; }
