/*
Theme Name: AdminRA
Theme URI: https://adminra.com
Author: AdminRA
Author URI: https://adminra.com
Description: Tema independiente para AdminRA. Header y footer via WPCode. Soporte completo Gutenberg. Sin dependencia de Divi.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.9
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: adminra
*/

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

:root {
  /* Colors */
  --ra-red: #E63946;
  --ra-red-dark: #B82D38;
  --ra-red-light: #FF6B6B;
  --ra-red-glow: rgba(230, 57, 70, 0.6);
  --ra-red-subtle: rgba(230, 57, 70, 0.08);
  --ra-black: #0A0A0B;
  --ra-black-soft: #1A1A1D;
  --ra-gray-dark: #2D2D30;
  --ra-gray-mid: #4A4A4F;
  --ra-gray-light: #8A8A8F;
  --ra-off-white: #F5F5F7;
  --ra-white-soft: #F8F9FA;
  --ra-white: #FFFFFF;
  --ra-light-gray: #E0E0E0;

  /* Glass */
  --ra-glass-bg: rgba(255, 255, 255, 0.03);
  --ra-glass-border: rgba(255, 255, 255, 0.08);
  --ra-glass-bg-hover: rgba(255, 255, 255, 0.06);

  /* Typography */
  --ra-font-display: 'Roboto', sans-serif;
  --ra-font-body: 'Plus Jakarta Sans', sans-serif;

  /* Spacing */
  --ra-radius: 16px;
  --ra-radius-sm: 10px;
  --ra-radius-lg: 24px;

  /* Easing */
  --ra-ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ra-ease-spring: cubic-bezier(0.25, 1, 0.5, 1);
  --ra-ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  font-family: var(--ra-font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ra-white);
  background-color: var(--ra-black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: inherit;
  text-decoration: none;
}

/* ============================================
   MAIN CONTENT WRAPPER
   ============================================ */
.adminra-page-content {
  min-height: 100vh;
}

/* ============================================
   BLOG PAGE FIXES
   ============================================ */

/* Force hero and CTA text visible (override IntersectionObserver) */
.ra-blog-hero .ra-reveal,
.ra-blog-cta .ra-reveal,
.ra-blog-cta-buttons.ra-reveal {
  opacity: 1 !important;
  transform: translateY(0) !important;
  transition: none !important;
}

/* Blog Page Heading Colors */
.ra-blog-page .ra-blog-hero h1 {
  color: #fff !important;
}
.ra-blog-page .ra-blog-cta h2 {
  color: #fff !important;
}

/* ============================================
   SINGLE POST STYLES
   ============================================ */

/* Hero Section */
.ra-single-hero {
  position: relative;
  padding: 120px 0 60px;
  text-align: center;
  overflow: hidden;
}
.ra-single-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(230,57,70,0.05), transparent 60%);
  pointer-events: none;
}
.ra-single-hero-inner {
  position: relative;
  z-index: 2;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 32px;
}
.ra-single-hero .ra-category-badge {
  display: inline-block;
  padding: 6px 18px;
  border: 1px solid rgba(230,57,70,0.3);
  border-radius: 20px;
  color: var(--ra-red);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 20px;
}
.ra-single-hero .ra-post-meta-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}
.ra-single-hero .ra-post-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 14px;
}
.ra-single-hero .ra-post-meta-item svg {
  width: 14px;
  height: 14px;
}
.ra-single-hero h1 {
  font-family: var(--ra-font-display);
  font-size: clamp(2rem, 5vw, 3.2rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin: 0 0 24px;
}
.ra-single-hero .ra-author-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.ra-single-hero .ra-author-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}
.ra-single-hero .ra-author-info {
  text-align: left;
}
.ra-single-hero .ra-author-name {
  display: block;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}
.ra-single-hero .ra-author-role {
  display: block;
  color: rgba(255,255,255,0.4);
  font-size: 12px;
}

/* Breadcrumb */
.ra-breadcrumb-wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 20px;
}
.ra-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: rgba(255,255,255,0.4);
  flex-wrap: wrap;
}
.ra-breadcrumb a {
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  transition: color 0.2s;
}
.ra-breadcrumb a:hover {
  color: var(--ra-red);
}
.ra-breadcrumb svg {
  width: 12px;
  height: 12px;
  opacity: 0.4;
}
.ra-breadcrumb-current {
  color: rgba(255,255,255,0.7);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 300px;
}

/* Featured Image */
.ra-featured-wrap {
  max-width: 900px;
  margin: 0 auto 40px;
  padding: 0 24px;
}
.ra-featured-img {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 16px 48px rgba(0,0,0,0.4);
}
.ra-featured-img img {
  width: 100%;
  height: auto;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

/* Content + Sidebar Grid */
.ra-post-content-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px 60px;
}
.ra-post-content-grid {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
}

/* Article Content */
.ra-article {
  min-width: 0;
}
.ra-article-content {
  color: rgba(255,255,255,0.8);
  font-family: var(--ra-font-body);
  font-size: 17px;
  line-height: 1.8;
}
.ra-article-content h1,
.ra-article-content h2,
.ra-article-content h3,
.ra-article-content h4,
.ra-article-content h5,
.ra-article-content h6 {
  font-family: var(--ra-font-display);
  color: #fff;
  letter-spacing: -0.02em;
  margin-top: 48px;
  margin-bottom: 20px;
}
.ra-article-content h2 {
  font-size: 1.8rem;
  font-weight: 700;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.ra-article-content h3 {
  font-size: 1.4rem;
  font-weight: 600;
}
.ra-article-content p {
  color: rgba(255,255,255,0.75);
  margin-bottom: 24px;
  font-size: 17px;
  line-height: 1.8;
}
.ra-article-content a {
  color: var(--ra-red);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.2s ease;
}
.ra-article-content a:hover {
  color: #ff4d5a;
}
.ra-article-content ul,
.ra-article-content ol {
  color: rgba(255,255,255,0.75);
  padding-left: 24px;
  margin-bottom: 24px;
}
.ra-article-content li {
  margin-bottom: 10px;
  line-height: 1.7;
}
.ra-article-content ul li::marker {
  color: var(--ra-red);
}
.ra-article-content ol li::marker {
  color: var(--ra-red);
  font-weight: 600;
}
.ra-article-content blockquote {
  border-left: 3px solid var(--ra-red);
  background: rgba(230,57,70,0.06);
  padding: 24px 28px;
  margin: 32px 0;
  border-radius: 0 12px 12px 0;
}
.ra-article-content blockquote p {
  font-style: italic;
  font-size: 18px;
  color: rgba(255,255,255,0.85);
  margin-bottom: 0;
}
.ra-article-content pre,
.ra-article-content code {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  color: var(--ra-red);
}
.ra-article-content pre {
  padding: 24px;
  margin: 32px 0;
  overflow-x: auto;
  font-size: 14px;
  line-height: 1.6;
}
.ra-article-content code {
  padding: 3px 8px;
  font-size: 0.9em;
  border-radius: 6px;
}
.ra-article-content img {
  border-radius: 14px;
  margin: 32px 0;
  max-width: 100%;
  height: auto;
}
.ra-article-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 32px 0;
}
.ra-article-content th,
.ra-article-content td {
  padding: 12px 16px;
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.75);
}
.ra-article-content th {
  background: rgba(230,57,70,0.1);
  color: #fff;
  font-weight: 600;
}
.ra-article-content hr {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin: 48px 0;
}

/* Tags */
.ra-tags-section {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
  margin-top: 40px;
}
.ra-tag {
  display: inline-block;
  padding: 4px 14px;
  border: 1px solid rgba(230,57,70,0.3);
  border-radius: 20px;
  color: var(--ra-red);
  font-size: 12px;
  text-decoration: none;
  transition: all 0.2s;
}
.ra-tag:hover {
  background: var(--ra-red);
  color: #fff;
}

/* Share Section */
.ra-share-section {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 24px 0;
  border-top: 1px solid rgba(255,255,255,0.08);
  margin-top: 40px;
}
.ra-share-label {
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  font-weight: 500;
}
.ra-share-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  transition: all 0.2s ease;
}
.ra-share-btn:hover {
  background: var(--ra-red);
  border-color: var(--ra-red);
  color: #fff;
  transform: translateY(-2px);
}
.ra-share-btn svg {
  width: 18px;
  height: 18px;
}

/* Sidebar */
.ra-post-sidebar {
  position: relative;
}
.ra-post-sidebar-inner {
  position: sticky;
  top: 100px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}
.ra-sidebar-card {
  background: var(--ra-glass-bg);
  border: 1px solid var(--ra-glass-border);
  border-radius: var(--ra-radius);
  padding: 24px;
}
.ra-sidebar-card h4 {
  color: #fff;
  font-family: var(--ra-font-body);
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.ra-sidebar-card h4 svg {
  width: 18px;
  height: 18px;
  color: var(--ra-red);
}

/* TOC */
.ra-toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.ra-toc-list li {
  margin: 0;
}
.ra-toc-list a {
  display: block;
  color: rgba(255,255,255,0.5);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.4;
  padding: 6px 0 6px 12px;
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}
.ra-toc-list a:hover {
  color: rgba(255,255,255,0.9);
  border-left-color: rgba(230,57,70,0.4);
}
.ra-toc-list a.active {
  color: var(--ra-red);
  border-left-color: var(--ra-red);
  font-weight: 600;
}
.ra-toc-list .ra-toc-h3 {
  padding-left: 24px;
  font-size: 12px;
}

/* Sidebar Posts */
.ra-sidebar-post {
  display: flex;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  text-decoration: none;
}
.ra-sidebar-post:last-child {
  border-bottom: none;
}
.ra-sidebar-post-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
}
.ra-sidebar-post-info {
  flex: 1;
  min-width: 0;
}
.ra-sidebar-post-title {
  color: rgba(255,255,255,0.8);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.3;
  margin: 0 0 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s;
}
.ra-sidebar-post:hover .ra-sidebar-post-title {
  color: var(--ra-red);
}
.ra-sidebar-post-date {
  color: rgba(255,255,255,0.35);
  font-size: 11px;
}

/* Post CTA */
.ra-post-cta {
  text-align: center;
  padding: 64px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.ra-post-cta-badge {
  display: inline-block;
  padding: 6px 20px;
  border: 1px solid rgba(230,57,70,0.3);
  border-radius: 20px;
  color: var(--ra-red);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 16px;
}
.ra-post-cta h3 {
  color: rgba(255,255,255,0.85);
  font-size: 28px;
  font-weight: 300;
  margin: 0 0 12px;
}
.ra-post-cta p {
  color: rgba(255,255,255,0.5);
  font-size: 16px;
  margin: 0 0 28px;
}
.ra-post-cta-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}
.ra-post-cta-buttons a {
  padding: 12px 32px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.2s;
}
.ra-cta-primary {
  background: var(--ra-red);
  color: #fff;
}
.ra-cta-primary:hover {
  background: var(--ra-red-dark);
  transform: translateY(-1px);
}
.ra-cta-secondary {
  background: transparent;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.ra-cta-secondary:hover {
  border-color: rgba(255,255,255,0.5);
}

/* ============================================
   ARCHIVE / INDEX / SEARCH
   ============================================ */
.ra-archive-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 140px 24px 80px;
}
.ra-archive-header {
  text-align: center;
  margin-bottom: 48px;
}
.ra-archive-header h1 {
  font-family: var(--ra-font-display);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  margin-bottom: 12px;
}
.ra-archive-header p {
  color: rgba(255,255,255,0.5);
  font-size: 18px;
}
.ra-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.ra-post-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: var(--ra-radius);
  overflow: hidden;
  transition: transform 0.3s var(--ra-ease-out), box-shadow 0.3s ease;
}
.ra-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 48px rgba(0,0,0,0.3);
}
.ra-post-card-img {
  aspect-ratio: 16/10;
  overflow: hidden;
}
.ra-post-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s var(--ra-ease-out);
}
.ra-post-card:hover .ra-post-card-img img {
  transform: scale(1.05);
}
.ra-post-card-body {
  padding: 24px;
}
.ra-post-card-meta {
  color: rgba(255,255,255,0.4);
  font-size: 12px;
  margin-bottom: 8px;
}
.ra-post-card-title {
  font-family: var(--ra-font-display);
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  margin: 0 0 12px;
  line-height: 1.3;
}
.ra-post-card-title a {
  color: inherit;
  text-decoration: none;
}
.ra-post-card-excerpt {
  color: rgba(255,255,255,0.55);
  font-size: 14px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 16px;
}
.ra-post-card-link {
  color: var(--ra-red);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s;
}
.ra-post-card-link:hover {
  color: #ff4d5a;
}

/* Pagination */
.ra-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 48px;
}
.ra-pagination a,
.ra-pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  height: 40px;
  padding: 0 12px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.6);
  border-radius: var(--ra-radius-sm);
  font-size: 14px;
  text-decoration: none;
  transition: all 0.3s ease;
}
.ra-pagination a:hover {
  background: rgba(230,57,70,0.2);
  border-color: rgba(230,57,70,0.4);
  color: #fff;
}
.ra-pagination .current {
  background: var(--ra-red);
  border-color: var(--ra-red);
  color: #fff;
}

/* ============================================
   404 PAGE
   ============================================ */
.ra-404-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 80vh;
  text-align: center;
  padding: 140px 24px 80px;
}
.ra-404-code {
  font-family: var(--ra-font-display);
  font-size: 120px;
  font-weight: 900;
  color: var(--ra-red);
  line-height: 1;
  margin-bottom: 16px;
  opacity: 0.3;
}
.ra-404-title {
  font-family: var(--ra-font-display);
  font-size: 2rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 12px;
}
.ra-404-text {
  color: rgba(255,255,255,0.5);
  font-size: 18px;
  margin-bottom: 32px;
  max-width: 500px;
}
.ra-404-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 32px;
  background: var(--ra-red);
  color: #fff;
  font-weight: 600;
  border-radius: var(--ra-radius-sm);
  text-decoration: none;
  transition: all 0.3s ease;
}
.ra-404-btn:hover {
  background: var(--ra-red-dark);
  transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .ra-post-content-grid {
    grid-template-columns: 1fr;
  }
  .ra-post-sidebar {
    order: -1;
  }
  .ra-post-sidebar-inner {
    position: static;
    max-height: none;
    overflow: visible;
  }
  .ra-archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .ra-archive-grid {
    grid-template-columns: 1fr;
  }
  .ra-single-hero h1 {
    font-size: 1.8rem;
  }
  .ra-featured-img img {
    max-height: 360px;
  }
  .ra-featured-wrap {
    padding: 0 16px;
  }
  .ra-article-content {
    font-size: 16px;
  }
  .ra-article-content h2 {
    font-size: 1.4rem;
  }
  .ra-article-content h3 {
    font-size: 1.2rem;
  }
  .ra-post-cta-buttons {
    flex-direction: column;
    align-items: center;
  }
}

@media (max-width: 479px) {
  .ra-single-hero {
    padding: 100px 0 40px;
  }
  .ra-single-hero h1 {
    font-size: 1.5rem;
  }
  .ra-breadcrumb-current {
    max-width: 150px;
  }
}
