/*
Theme Name: RudeFolks
Theme URI: https://rudefolks.com
Author: Softstar
Author URI: https://rudefolks.com
Description: Custom theme for RudeFolks.com — a community blog for sharing stories and photos of rude encounters. Fully customizable via Appearance > Customize (colors, logo, scrolling banner, layout).
Version: 1.1.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: rudefolks
Tags: blog, custom-colors, custom-logo, custom-menu, threaded-comments, translation-ready

RudeFolks WordPress Theme, (C) Softstar
RudeFolks is distributed under the terms of the GNU GPL v2 or later.
*/

/* ==========================================================================
   Base
   ========================================================================== */
:root{
  --rf-bg:#12100f;
  --rf-surface:#1b1918;
  --rf-surface-alt:#242120;
  --rf-text:#f2ede8;
  --rf-text-muted:#b8b0a9;
  --rf-accent:#e63946;
  --rf-accent-dark:#b3212c;
  --rf-border:#332d2b;
  --rf-radius:10px;
  --rf-font-heading: Georgia, 'Times New Roman', serif;
  --rf-font-body: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --rf-banner-speed: 35s;
  --rf-max-width: 1180px;
}

*{box-sizing:border-box;}
html{-webkit-text-size-adjust:100%;}
body{
  margin:0;
  background:var(--rf-bg);
  color:var(--rf-text);
  font-family:var(--rf-font-body);
  line-height:1.6;
}
img{max-width:100%;height:auto;display:block;}
a{color:var(--rf-accent);text-decoration:none;}
a:hover{text-decoration:underline;}
h1,h2,h3,h4,h5{font-family:var(--rf-font-heading);line-height:1.25;margin:0 0 .5em;}
.rf-wrap{max-width:var(--rf-max-width);margin:0 auto;padding:0 20px;}
.screen-reader-text{position:absolute!important;left:-9999px;}
.rf-btn{
  display:inline-block;background:var(--rf-accent);color:#fff;border:none;
  padding:.7em 1.4em;border-radius:6px;font-weight:600;cursor:pointer;font-size:.95rem;
}
.rf-btn:hover{background:var(--rf-accent-dark);text-decoration:none;color:#fff;}
.rf-btn.rf-btn-outline{background:transparent;border:2px solid var(--rf-accent);color:var(--rf-accent);}

/* ==========================================================================
   Header / Nav ribbon
   ========================================================================== */
.rf-header{background:#000;border-bottom:3px solid var(--rf-accent);position:relative;}
.rf-header-inner{display:flex;align-items:center;justify-content:space-between;padding:14px 20px;flex-wrap:wrap;gap:10px;}
.rf-logo{font-family:var(--rf-font-heading);font-size:1.8rem;font-weight:bold;color:#fff;letter-spacing:1px;}
.rf-logo span{color:var(--rf-accent);}
.rf-logo img{max-height:52px;}
.rf-primary-nav ul{list-style:none;display:flex;gap:6px;margin:0;padding:0;flex-wrap:wrap;}
.rf-primary-nav a{
  display:block;color:#f2ede8;padding:10px 14px;border-radius:6px;font-weight:600;
  text-transform:uppercase;font-size:.82rem;letter-spacing:.5px;
}
.rf-primary-nav a:hover, .rf-primary-nav .current-menu-item > a{background:var(--rf-accent);color:#fff;text-decoration:none;}
.rf-header-actions{display:flex;gap:8px;align-items:center;}
.rf-menu-toggle{display:none;background:none;border:2px solid var(--rf-accent);color:#fff;padding:8px 12px;border-radius:6px;font-size:1rem;cursor:pointer;}

@media (max-width:820px){
  .rf-menu-toggle{display:inline-block;}
  .rf-primary-nav{display:none;width:100%;order:3;}
  .rf-primary-nav.is-open{display:block;}
  .rf-primary-nav ul{flex-direction:column;}
}

/* ==========================================================================
   Scrolling latest-posts banner
   ========================================================================== */
.rf-banner{
  background:var(--rf-accent);color:#fff;overflow:hidden;position:relative;
  border-bottom:1px solid var(--rf-accent-dark);
}
.rf-banner-label{
  position:absolute;left:0;top:0;bottom:0;display:flex;align-items:center;
  background:#000;color:#fff;padding:0 16px;font-weight:700;text-transform:uppercase;
  font-size:.75rem;letter-spacing:1px;z-index:2;
}
.rf-banner-track-wrap{overflow:hidden;padding-left:150px;}
.rf-banner-track{
  display:flex;white-space:nowrap;width:max-content;
  animation:rf-scroll var(--rf-banner-speed) linear infinite;
}
.rf-banner-track-wrap:hover .rf-banner-track{animation-play-state:paused;}
.rf-banner-item{display:inline-flex;align-items:center;gap:8px;padding:10px 32px;font-size:.9rem;font-weight:600;color:#fff;border-right:1px solid rgba(255,255,255,.35);}
.rf-banner-item:hover{text-decoration:underline;color:#fff;}
@keyframes rf-scroll{
  from{transform:translateX(0);}
  to{transform:translateX(-50%);}
}
@media (prefers-reduced-motion: reduce){
  .rf-banner-track{animation:none;}
  .rf-banner-track-wrap{overflow-x:auto;}
}
@media (max-width:600px){
  .rf-banner-label{position:static;display:block;}
  .rf-banner-track-wrap{padding-left:0;}
}

/* ==========================================================================
   Layout / content
   ========================================================================== */
.rf-main{padding:40px 0;min-height:50vh;}

.rf-home-top{display:grid;grid-template-columns:1fr 320px;gap:28px;align-items:start;}
.rf-hero{padding:60px 40px;text-align:center;background:radial-gradient(circle at top, #241f1e, #12100f 70%);border-radius:var(--rf-radius);}
.rf-hero h1{font-size:2.6rem;color:#fff;}
.rf-hero p{color:var(--rf-text-muted);max-width:640px;margin:14px auto 24px;}

.rf-spotlight{
  background:linear-gradient(160deg, var(--rf-surface), var(--rf-surface-alt));
  border:2px solid var(--rf-accent);border-radius:var(--rf-radius);
  overflow:hidden;align-self:start;
}
.rf-spotlight-badge{
  background:var(--rf-accent);color:#fff;font-weight:700;text-transform:uppercase;
  font-size:.75rem;letter-spacing:.6px;padding:10px 14px;text-align:center;
}
.rf-spotlight-body{padding:16px;}
/*
 * The original picture is always served and the frame does the sizing. Putting
 * the ratio on the image itself means one rule covers the live spotlight and the
 * settings preview, and "Original" simply resolves to the file's own ratio.
 */
.rf-spotlight-thumb{display:block;border-radius:8px;overflow:hidden;margin-bottom:10px;}
.rf-spotlight-thumb img,.rf-spotlight-img{display:block;width:100%;height:auto;aspect-ratio:var(--rf-spotlight-ratio,4/3);object-fit:cover;}
.rf-spotlight-body h3{font-size:1.05rem;margin-bottom:6px;}
.rf-spotlight-body h3 a{color:#fff;}
.rf-spotlight-body p{color:var(--rf-text-muted);font-size:.88rem;margin-bottom:12px;}
.rf-spotlight-empty p{color:var(--rf-text-muted);font-size:.85rem;text-align:center;margin:0;}

@media (max-width:820px){
  .rf-home-top{grid-template-columns:1fr;}
  .rf-spotlight{order:-1;}
  .rf-hero{padding:40px 20px;}
}

.rf-post-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:24px;margin-top:30px;}
.rf-card{background:var(--rf-surface);border:1px solid var(--rf-border);border-radius:var(--rf-radius);overflow:hidden;}
.rf-card-thumb{aspect-ratio:16/10;background:var(--rf-surface-alt);overflow:hidden;}
.rf-card-thumb img{width:100%;height:100%;object-fit:cover;}
.rf-card-body{padding:16px;}
.rf-card h3{font-size:1.1rem;margin-bottom:6px;}
.rf-card h3 a{color:#fff;}
.rf-card .rf-meta{color:var(--rf-text-muted);font-size:.8rem;margin-bottom:8px;}
.rf-card p{color:var(--rf-text-muted);font-size:.92rem;}

.rf-single article{max-width:760px;margin:0 auto;}
.rf-single .rf-post-thumb{margin-bottom:20px;border-radius:var(--rf-radius);overflow:hidden;}
.rf-single h1{font-size:2rem;color:#fff;}
.rf-single .rf-meta{color:var(--rf-text-muted);margin-bottom:20px;font-size:.9rem;}
.rf-flag-box{margin-top:36px;padding:16px;border:1px dashed var(--rf-border);border-radius:var(--rf-radius);text-align:center;}
.rf-flag-box p{color:var(--rf-text-muted);margin-bottom:10px;font-size:.85rem;}
.rf-flag-msg{margin-top:10px;font-size:.85rem;}

.rf-sidebar-widget, .widget{background:var(--rf-surface);border:1px solid var(--rf-border);border-radius:var(--rf-radius);padding:18px;margin-bottom:20px;}

.rf-footer{background:#000;color:var(--rf-text-muted);padding:30px 0;margin-top:40px;border-top:3px solid var(--rf-accent);}
.rf-footer-inner{display:flex;justify-content:space-between;flex-wrap:wrap;gap:14px;font-size:.85rem;}
.rf-footer-nav ul{list-style:none;display:flex;gap:16px;margin:0;padding:0;flex-wrap:wrap;}
.rf-footer-nav a{color:var(--rf-text-muted);}
.rf-footer-nav a:hover{color:var(--rf-accent);}

/* Forms (newsletter / UM / comments) */
input[type=text], input[type=email], input[type=password], input[type=url], textarea, select{
  width:100%;padding:10px 12px;border-radius:6px;border:1px solid var(--rf-border);
  background:var(--rf-surface-alt);color:var(--rf-text);font-size:.95rem;
}
form p{margin-bottom:14px;}
.rf-form-msg{padding:10px 14px;border-radius:6px;margin-bottom:14px;font-size:.9rem;}
.rf-form-msg.success{background:#1f3d24;color:#a9e6b0;}
.rf-form-msg.error{background:#3d1f22;color:#f2acac;}

.rf-download-list{list-style:none;margin:20px 0;padding:0;}
.rf-download-list li{background:var(--rf-surface);border:1px solid var(--rf-border);border-radius:8px;padding:14px 16px;margin-bottom:10px;display:flex;justify-content:space-between;align-items:center;gap:12px;}

/* ==========================================================================
   Submit feedback + story summary
   ========================================================================== */
.rf-submit-feedback{
  padding:18px 20px;border-radius:var(--rf-radius);margin-bottom:20px;
}
.rf-submit-feedback.rf-submit-feedback--success{
  background:#1f3d24;border:1px solid #2c5a35;color:#d9f5dc;
}
.rf-submit-feedback.rf-submit-feedback--success h2{
  color:#fff;margin-bottom:6px;font-size:1.4rem;
}
.rf-submit-feedback.rf-submit-feedback--success p{margin:0;color:#bfe6c6;}
.rf-submit-feedback.rf-submit-feedback--error{
  background:#3d1f22;border:1px solid #5a2c31;color:#f2acac;
}
.rf-submit-summary{
  background:linear-gradient(170deg, var(--rf-surface), var(--rf-surface-alt));
  border:1px solid var(--rf-border);border-radius:var(--rf-radius);
  padding:24px;margin-bottom:24px;
}
.rf-submit-summary-thumb{
  border-radius:8px;overflow:hidden;margin-bottom:16px;aspect-ratio:16/10;
}
.rf-submit-summary-thumb img{width:100%;height:100%;object-fit:cover;}
.rf-submit-summary-title{color:#fff;font-size:1.5rem;margin-bottom:4px;}
.rf-submit-summary-meta{color:var(--rf-accent);font-size:.85rem;text-transform:uppercase;letter-spacing:.5px;margin-bottom:14px;}
.rf-submit-summary-body{color:var(--rf-text-muted);font-size:.97rem;}
.rf-submit-summary-body p:first-child{margin-top:0;}
.rf-submit-summary-status{
  display:inline-block;background:#3a2f12;color:#f2d97e;border:1px solid #57491d;
  padding:6px 12px;border-radius:6px;font-size:.82rem;margin-top:18px;
}
.rf-submit-again{margin-top:20px;}

/* ==========================================================================
   My Stories (account tab)
   ========================================================================== */
.rf-my-stories h3{color:#fff;margin-bottom:16px;}
.rf-my-stories-list{list-style:none;margin:0 0 20px;padding:0;}
.rf-my-story{
  background:var(--rf-surface);border:1px solid var(--rf-border);border-radius:var(--rf-radius);
  padding:16px;margin-bottom:12px;
}
.rf-my-story-top{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;flex-wrap:wrap;}
.rf-my-story-title{color:#fff;font-size:1.05rem;margin:0;}
.rf-my-story-status{
  flex:none;font-size:.75rem;font-weight:700;text-transform:uppercase;letter-spacing:.5px;
  padding:4px 10px;border-radius:999px;background:var(--rf-surface-alt);color:var(--rf-text-muted);
  border:1px solid var(--rf-border);
}
.rf-my-story-status--publish{background:#1f3d24;color:#a9e6b0;border-color:#2c5a35;}
.rf-my-story-status--pending{background:#3a2f12;color:#f2d97e;border-color:#57491d;}
.rf-my-story-status--future{background:#1f2f4d;color:#9dc2ef;border-color:#2c456a;}
.rf-my-story-meta{color:var(--rf-text-muted);font-size:.82rem;margin:8px 0 12px;}
.rf-my-story-meta span+span::before{content:"\2022";margin:0 7px;color:var(--rf-border);}
.rf-my-story-link{margin-top:8px;}
.rf-my-stories--empty{
  background:var(--rf-surface);border:1px dashed var(--rf-border);border-radius:var(--rf-radius);
  padding:28px;text-align:center;
}
.rf-my-stories--empty p{color:var(--rf-text-muted);margin-top:0;}
