/*
Theme Name: Fundación Rosa Luxemburgo
Theme URI: https://www.rosaluxemburgo.org
Description: Tema WordPress moderno y limpio inspirado en Sporting Cristal con hero video, mobile-first y modo oscuro.
Version: 1.0.0
Author: Fundación Rosa Luxemburgo
Author URI: https://www.rosaluxemburgo.org
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: rosa-luxemburgo
Tags: modern, clean, hero-video, mobile-first, dark-mode, responsive, accessibility
*/

/* CSS Variables - Root */
:root {
  --primary-color: #000000;
  --secondary-color: #ff6b35;
  --accent-color: #ff4500;
  --text-dark: #000000;
  --text-light: #666666;
  --bg-light: #ffffff;
  --bg-dark: #ffffff;
  --bg-secondary: #f8f8f8;
  --border-color: #e0e0e0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 12px;
  --border-radius-lg: 20px;
}

/* Dark Mode Variables */
[data-theme="dark"] {
  --primary-color: #ffffff;
  --secondary-color: #ff8c42;
  --accent-color: #ff6b35;
  --text-dark: #ffffff;
  --text-light: #cccccc;
  --bg-light: #1a1a1a;
  --bg-dark: #000000;
  --bg-secondary: #2a2a2a;
  --border-color: #404040;
}

/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Helvetica Neue', 'Helvetica', 'Arial', sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background-color: var(--bg-light);
  transition: var(--transition);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

h1 { font-size: 2.4rem; line-height: 1.15; letter-spacing: -0.01em; }
h2 { font-size: 2rem; line-height: 1.2; letter-spacing: -0.008em; }
h3 { font-size: 1.6rem; line-height: 1.25; }
h4 { font-size: 1.35rem; line-height: 1.3; }
h5 { font-size: 1.15rem; line-height: 1.35; }
h6 { font-size: 1rem; line-height: 1.4; }

p {
  margin: 0 0 1.25rem;
  color: var(--text-light);
  font-size: 1.05rem;
  line-height: 1.7;
}

.content p,
.single-content p,
.page-content p {
  max-width: 72ch;
}

.single-content,
.page-content {
  font-size: 1.05rem;
  line-height: 1.75;
  letter-spacing: -0.002em;
}

.single-content h1,
.single-content h2,
.single-content h3,
.single-content h4,
.single-content h5,
.single-content h6,
.page-content h1,
.page-content h2,
.page-content h3,
.page-content h4,
.page-content h5,
.page-content h6 {
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.single-content h2,
.page-content h2 {
  font-size: 1.9rem;
}

.single-content h3,
.page-content h3 {
  font-size: 1.45rem;
}

.single-content blockquote,
.page-content b.related-posts {
  margin: 3rem 0 0;
  padding: 2.5rem 0 0;
  border-top: 1px solid var(--border-color);
}

.single-content blockquote,
.page-content blockquote {
  background: var(--bg-secondary);
  color: var(--text-dark);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.single-content blockquote p:last-child,
.page-content blockquote p:last-child {
  margin-bottom: 0;
}

.single-content ul,
.single-content ol,
.page-content ul,
.page-content ol {
  margin: 1.25rem 0 1.5rem 1.5rem;
  padding-left: 0.5rem;
  line-height: 1.7;
}

.single-content li + li,
.page-content li + li {
  margin-top: 0.35rem;
}

.single-content figure,
.page-content figure {
  margin: 2rem 0;
}

.single-content figcaption,
.page-content figcaption {
  text-align: center;
  color: var(--text-light);
  margin-top: 0.5rem;
  font-size: 0.95rem;
}

.featured-image-img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 25px;
  box-shadow: var(--shadow-md);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--secondary-color);
  text-decoration: underline;
}

/* Header Styles */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  transition: var(--transition);
}

/* Admin bar adjustment */
.admin-bar .header {
  top: 32px;
}

@media screen and (max-width: 782px) {
  .admin-bar .header {
    top: 46px;
  }
}

[data-theme="dark"] .header {
  background: rgba(26, 26, 26, 0.95);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

/* Logo */
.logo {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-dark);
  text-decoration: none;
}

.logo-img {
  height: 44px;
  width: auto;
  display: block;
  border-radius: 0 !important;
}

.logo-dark {
  display: none;
}

[data-theme="dark"] .logo-light {
  display: none;
}

[data-theme="dark"] .logo-dark {
  display: block;
}

.nav {
  display: none;
}

.logo img {
  height: 40px;
  width: auto;
  margin-right: 0.5rem;
  border-radius: 0 !important;
  box-shadow: none;
}

.logo img:hover {
  transform: none;
}

/* Mobile Navigation */
.mobile-nav {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.header-social {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-right: 0.25rem;
}

.header-social .social-icon {
  color: var(--text-dark);
  opacity: 0.8;
  transition: var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 32px;
  width: 32px;
  border-radius: 50%;
}

.header-social .social-icon:hover {
  color: var(--secondary-color);
  opacity: 1;
}

.hamburger {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.75rem;
  position: relative;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  transition: var(--transition);
  z-index: 1001;
}

.hamburger:hover {
  background: rgba(0,0,0,0.04);
}

.hamburger span {
  display: block;
  width: 26px;
  height: 3px;
  background: var(--text-dark);
  transition: var(--transition);
  border-radius: 3px;
  position: relative;
  transform-origin: center;
  opacity: 1;
}

.hamburger span:nth-child(1),
.hamburger span:nth-child(2),
.hamburger span:nth-child(3) {
  transform: translateY(0) rotate(0);
}

.hamburger.active span:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
  background: var(--text-dark);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
  background: var(--text-dark);
}

.hamburger.active {
  background: none;
}

/* Search Button */
.search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-dark);
  font-size: 1.2rem;
}

/* Dark Mode Toggle */
.theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--text-dark);
  font-size: 1.2rem;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  width: 40px;
  height: 40px;
}

.theme-toggle:hover {
  transform: scale(1.1);
  background: var(--bg-secondary);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

/* Mobile Menu */
.mobile-menu {
  position: fixed;
  top: 88px;
  left: 0;
  width: 100%;
  height: calc(100vh - 88px);
  background: var(--bg-light);
  transition: transform 0.35s ease, opacity 0.35s ease, visibility 0.35s ease;
  overflow-y: auto;
  z-index: 1500;
  padding: 2rem 1.5rem 3rem;
  box-shadow: 0 10px 30px rgba(0,0,0,0.12);
  transform: translateY(-24px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.admin-bar .mobile-menu {
  top: 120px;
  height: calc(100vh - 120px);
}

@media screen and (max-width: 782px) {
  .admin-bar .mobile-menu {
    top: 134px;
    height: calc(100vh - 134px);
  }
}

.mobile-menu.active {
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 1.25rem;
}

.mobile-menu li {
  margin: 0;
}

.mobile-menu > ul > li > a {
  display: inline-block;
  padding: 0.25rem 0;
  color: var(--secondary-color);
  font-weight: 700;
  border-radius: 0;
  transition: var(--transition);
  border: none;
  box-shadow: none;
}

.mobile-menu > ul > li > a:hover {
  background: none;
  color: var(--secondary-color);
  text-decoration: none;
}

@media (min-width: 768px) {
  .mobile-menu ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .mobile-menu ul {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.mobile-menu ul ul {
  padding: 0.35rem 0 0 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-menu ul ul li {
  margin: 0;
  display: block;
}

.mobile-menu ul ul li a {
  display: block;
  font-weight: 500;
  color: var(--text-light);
  padding: 0.1rem 0;
  width: 100%;
}

.mobile-menu ul ul li a:hover {
  color: var(--secondary-color);
}

.single-share {
  position: sticky;
  top: 140px;
  align-self: flex-start;
  display: grid;
  gap: 0.6rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.single-layout {
  display: block;
}

.single-shell {
  display: grid;
  grid-template-columns: 80px 1fr;
  gap: 1.5rem;
  max-width: 960px;
  margin: 0 auto;
  padding: 4rem 1.5rem;
}

.single-post {
  background: var(--bg-light);
  border: 1px solid var(--border-color);
  border-radius: 25px;
  box-shadow: var(--shadow-md);
  padding: 2.25rem;
}

.single-breadcrumbs {
  font-size: 0.95rem;
  color: var(--text-light);
  margin-bottom: 1rem;
}

.single-breadcrumbs a {
  color: var(--text-light);
}

.single-breadcrumbs a:hover {
  color: var(--secondary-color);
}

.single-share .share-label {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-light);
  font-size: 0.8rem;
}

.share-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--border-color);
  font-size: 0;
  color: var(--text-light);
  background: transparent;
  transition: var(--transition);
  padding: 0;
}

.share-button:hover {
  background: var(--secondary-color);
  border-color: var(--secondary-color);
  color: #fff;
}

.share-button svg {
  width: 18px;
  height: 18px;
  display: block;
}

.single-header {
  margin-bottom: 1.5rem;
}

.featured-image {
  margin-bottom: 1.5rem;
}

.single-meta {
  display: grid;
  gap: 0.5rem;
}

.single-title {
  font-size: 2.3rem;
  line-height: 1.2;
}

.single-excerpt {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--text-light);
  margin: 0.5rem 0 1.25rem;
}

.single-info {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
  color: var(--text-light);
  font-size: 0.95rem;
}

.single-tags a {
  display: inline-block;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-dark);
  font-size: 0.85rem;
}

.single-content img {
  max-width: 100%;
  height: auto;
  border-radius: 25px;
  margin: 1.5rem 0;
}

.single-content iframe,
.single-content .wp-block-embed__wrapper iframe,
.single-content figure iframe {
  width: 100%;
  border: none;
  border-radius: 25px;
  overflow: hidden;
}

.single-content figure {
  margin: 2rem 0;
}

.single-content figcaption {
  text-align: center;
  color: var(--text-light);
  font-size: 0.95rem;
  margin-top: 0.5rem;
}

.single-footer {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.author-bio {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
}

.author-avatar img {
  border-radius: 50%;
}

.post-navigation {
  margin-top: 1.5rem;
}

@media (max-width: 900px) {
  .single-shell {
    grid-template-columns: 1fr;
  }
  
  .single-share {
    position: relative;
    top: auto;
    order: 2;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.5rem;
  }
}

/* Hero Section */
.hero {
  position: relative;
  height: 100vh;
  min-height: 600px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 70px;
}

.admin-bar .hero {
  margin-top: 102px;
}

@media screen and (max-width: 782px) {
  .admin-bar .hero {
    margin-top: 116px;
  }
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(255, 107, 53, 0.6) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  color: white;
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
}

.hero-button {
  display: inline-block;
  padding: 1rem 2rem;
  background: var(--accent-color);
  color: white;
  text-decoration: none;
  border-radius: var(--border-radius);
  font-weight: 600;
  transition: var(--transition);
  border: none;
  cursor: pointer;
}

.hero-button:hover {
  background: var(--secondary-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  text-decoration: none;
  color: white;
}

/* Content Area */
.content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem;
}

.section {
  margin-bottom: 4rem;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 2.5rem;
  color: var(--primary-color);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-bottom: 3rem;
}

.card {
  background: var(--bg-light);
  border-radius: 25px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
  border: 1px solid var(--border-color);
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 25px 25px 0 0;
}

.card-content {
  padding: 1.5rem;
}

.card-title {
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--text-dark);
}

.card-excerpt {
  color: var(--text-light);
  margin-bottom: 1rem;
}

.card-link {
  color: var(--primary-color);
  font-weight: 600;
  text-decoration: none;
}

.card-link:hover {
  color: var(--secondary-color);
}

/* Images */
img {
  max-width: 100%;
  height: auto;
  border-radius: 25px;
  transition: var(--transition);
}

img:hover {
  transform: scale(1.02);
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  padding: 3rem 2rem 1rem;
  border-top: 1px solid var(--border-color);
}

.footer-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

@media (min-width: 1200px) {
  .footer-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.footer-col h3 {
  margin-bottom: 1rem;
  color: var(--secondary-color);
  font-size: 1.05rem;
}

.footer-col p {
  color: var(--text-light);
  margin-bottom: 1rem;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  list-style: none;
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: var(--text-dark);
  text-decoration: none;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--secondary-color);
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.footer-social a {
  color: var(--text-dark);
  transition: var(--transition);
}

.footer-social a:hover {
  color: var(--secondary-color);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-light);
}

.back-to-top {
  position: fixed;
  right: 1.5rem;
  bottom: 1.5rem;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: none;
  background: var(--secondary-color);
  color: #fff;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: var(--transition);
  z-index: 1600;
}

.back-to-top.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top svg {
  stroke: currentColor;
}

[data-theme="dark"] .back-to-top {
  background: #fff;
  color: #000;
  box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

[data-theme="dark"] .back-to-top:hover {
  background: var(--secondary-color);
  color: #fff;
}

/* Search Modal */
.search-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(6px);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}

.search-modal.active {
  display: flex;
}

.search-container {
  background: var(--bg-light);
  padding: 1.75rem;
  border-radius: 18px;
  width: min(560px, 92%);
  position: relative;
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
  border: 1px solid var(--border-color);
}

.search-container form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: center;
}

.search-container input[type="search"],
.search-container input[type="text"] {
  width: 100%;
  padding: 0.9rem 1rem;
  border: 1.5px solid var(--border-color);
  border-radius: 12px;
  font-size: 1rem;
  background: var(--bg-secondary);
  color: var(--text-dark);
  transition: var(--transition);
}

.search-container input[type="search"]:focus,
.search-container input[type="text"]:focus {
  outline: 2px solid var(--secondary-color);
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 4px rgba(255, 107, 53, 0.18);
}

.search-container input[type="submit"],
.search-container button[type="submit"] {
  padding: 0.9rem 1.4rem;
  border-radius: 12px;
  border: none;
  background: var(--secondary-color);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.search-container input[type="submit"]:hover,
.search-container button[type="submit"]:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.search-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.3rem;
  cursor: pointer;
  color: var(--text-light);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: var(--transition);
}

.search-close:hover {
  background: var(--bg-secondary);
  color: var(--text-dark);
}

/* Responsive Design */
@media (min-width: 768px) {
  .desktop-nav {
    display: none;
  }
  
  .mobile-nav {
    display: flex;
  }
  
  .hero-title {
    font-size: 4rem;
  }
  
  .hero-subtitle {
    font-size: 1.5rem;
  }
}

@media (max-width: 767px) {
  .desktop-nav {
    display: none;
  }
  
  .mobile-nav {
    display: flex;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .content {
    padding: 2rem 1rem;
  }
  
  .header-container {
    padding: 1rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus styles */
a:focus,
button:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* Screen reader only */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
