/*
Theme Name: MiPolítico
Theme URI: https://mipolitico.com
Author: MiPolítico Team
Author URI: https://mipolitico.com
Description: Portal de perfiles políticos mundiales al estilo Wikipedia. Permite subir y consultar políticos, partidos, países, obras, actos, errores y más.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: mipolitico
Tags: portal, politicos, wikipedia, noticias, responsive
*/

/* ============================================
   VARIABLES CSS
   ============================================ */
:root {
  --primary: #1a73e8;
  --primary-dark: #1557b0;
  --secondary: #34a853;
  --accent: #ea4335;
  --bg: #f0f2f5;
  --bg-white: #ffffff;
  --bg-card: #ffffff;
  --text: #202124;
  --text-light: #5f6368;
  --text-muted: #80868b;
  --border: #dadce0;
  --border-light: #e8eaed;
  --shadow: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.1), 0 2px 4px rgba(0,0,0,0.06);
  --shadow-lg: 0 10px 25px rgba(0,0,0,0.1), 0 6px 10px rgba(0,0,0,0.08);
  --radius: 8px;
  --radius-lg: 12px;
  --header-height: 64px;
  --sidebar-width: 280px;
  --transition: all 0.2s ease;
  --font-main: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --font-heading: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  --max-width: 1400px;
}

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

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

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

a {
  color: var(--primary);
  text-decoration: none;
  transition: var(--transition);
}

a:hover {
  color: var(--primary-dark);
  text-decoration: underline;
}

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

ul, ol {
  list-style: none;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text);
}

h1 { font-size: 2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; }

p { margin-bottom: 1rem; }

/* ============================================
   HEADER / TOPBAR
   ============================================ */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-height);
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  box-shadow: var(--shadow);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  gap: 1rem;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.site-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.site-logo:hover {
  text-decoration: none;
  color: var(--primary);
}

.site-logo .logo-icon {
  width: 36px;
  height: 36px;
  background: var(--primary);
  color: white;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
}

.site-logo .logo-text span {
  color: var(--primary);
}

/* Hamburger Menu */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text);
  margin: 6px 0;
  transition: var(--transition);
}

.hamburger.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}
.hamburger.active span:nth-child(2) {
  opacity: 0;
}
.hamburger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* Search Bar */
.header-search {
  position: relative;
  flex: 0 1 280px;
}

.header-search form {
  display: flex;
  width: 100%;
}

.header-search input[type="search"] {
  width: 100%;
  height: 40px;
  padding: 0 40px 0 16px;
  border: 1px solid var(--border);
  border-radius: 24px;
  font-size: 0.9rem;
  font-family: var(--font-main);
  background: var(--bg);
  transition: var(--transition);
  outline: none;
}

.header-search input[type="search"]:focus {
  border-color: var(--primary);
  background: var(--bg-white);
  box-shadow: 0 0 0 2px rgba(26,115,232,0.15);
}

.header-search .search-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.header-search .search-btn:hover {
  background: var(--primary-dark);
}

.search-suggestions {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  display: none;
  z-index: 1001;
  max-height: 400px;
  overflow-y: auto;
  margin-top: 4px;
}

.search-suggestions.active {
  display: block;
}

.search-suggestion-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  cursor: pointer;
  transition: var(--transition);
  border-bottom: 1px solid var(--border-light);
}

.search-suggestion-item:last-child {
  border-bottom: none;
}

.search-suggestion-item:hover {
  background: var(--bg);
}

.search-suggestion-item img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.search-suggestion-item .suggestion-info h4 {
  font-size: 0.9rem;
  margin-bottom: 2px;
}

.search-suggestion-item .suggestion-info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

/* Header Right */
.header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.btn-upload {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}

.btn-upload:hover {
  background: var(--primary-dark);
  text-decoration: none;
  color: white;
}

.header-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  color: var(--text-light);
  cursor: pointer;
  transition: var(--transition);
  border: none;
  font-size: 1rem;
}

.header-icon:hover {
  background: var(--border-light);
  color: var(--primary);
}

/* ============================================
   MAIN NAVIGATION
   ============================================ */
.main-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  z-index: 999;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.main-nav::-webkit-scrollbar {
  height: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1rem;
  gap: 0;
  white-space: nowrap;
}

.nav-item {
  position: relative;
}

.nav-item a {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  color: var(--text-light);
  font-size: 0.88rem;
  font-weight: 500;
  transition: var(--transition);
  border-bottom: 3px solid transparent;
}

.nav-item a:hover,
.nav-item a.active {
  color: var(--primary);
  text-decoration: none;
  border-bottom-color: var(--primary);
  background: rgba(26,115,232,0.04);
}

.nav-item .nav-icon {
  font-size: 1rem;
}

/* Dropdown */
.nav-item .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 220px;
  display: none;
  z-index: 1000;
  padding: 8px 0;
}

.nav-item:hover .dropdown {
  display: block;
}

.dropdown a {
  display: block;
  padding: 8px 16px;
  font-size: 0.85rem;
  border-bottom: none;
}

.dropdown a:hover {
  background: var(--bg);
}

/* ============================================
   LAYOUT
   ============================================ */
.site-content {
  margin-top: calc(var(--header-height) + 48px);
  padding: 1.5rem;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 1.5rem;
  align-items: start;
}

.main-content {
  min-width: 0;
}

/* ============================================
   HERO / BANNER
   ============================================ */
.hero-banner {
  background: linear-gradient(135deg, #1a73e8 0%, #1557b0 50%, #0d47a1 100%);
  color: white;
  border-radius: var(--radius-lg);
  padding: 3rem 2.5rem;
  margin-bottom: 1.5rem;
  position: relative;
  overflow: hidden;
}

.hero-banner::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: rgba(255,255,255,0.05);
  border-radius: 50%;
}

.hero-banner::after {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 300px;
  height: 300px;
  background: rgba(255,255,255,0.03);
  border-radius: 50%;
}

.hero-banner h1 {
  color: white;
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}

.hero-banner p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  position: relative;
  z-index: 1;
  margin-bottom: 1.5rem;
}

.hero-stats {
  display: flex;
  gap: 2rem;
  position: relative;
  z-index: 1;
  flex-wrap: wrap;
}

.hero-stat {
  text-align: center;
}

.hero-stat .stat-number {
  font-size: 1.8rem;
  font-weight: 700;
  display: block;
}

.hero-stat .stat-label {
  font-size: 0.85rem;
  opacity: 0.8;
}

/* ============================================
   CARDS
   ============================================ */
.card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-light);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.card-header h2 {
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-header h2 .card-icon {
  font-size: 1.2rem;
}

.card-body {
  padding: 1rem 1.25rem;
}

.card-footer {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border-light);
  text-align: center;
}

.card-footer a {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ============================================
   SECTION TITLES
   ============================================ */
.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.section-title h2 {
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-title .view-all {
  font-size: 0.85rem;
  font-weight: 500;
}

/* ============================================
   POLITICIAN GRID
   ============================================ */
.politician-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 1rem;
}

.politician-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
  text-align: center;
}

.politician-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.politician-card .card-image {
  width: 100%;
  height: 180px;
  overflow: hidden;
  background: var(--bg);
  position: relative;
}

.politician-card .card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.politician-card:hover .card-image img {
  transform: scale(1.05);
}

.politician-card .card-image .country-badge {
  position: absolute;
  top: 8px;
  left: 8px;
  background: rgba(0,0,0,0.7);
  color: white;
  padding: 2px 8px;
  border-radius: 12px;
  font-size: 0.7rem;
  font-weight: 500;
}

.politician-card .card-image .status-dot {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid white;
}

.politician-card .card-image .status-dot.active {
  background: var(--secondary);
}

.politician-card .card-image .status-dot.inactive {
  background: var(--text-muted);
}

.politician-card .card-info {
  padding: 1rem;
}

.politician-card .card-info h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.politician-card .card-info h3 a {
  color: var(--text);
}

.politician-card .card-info h3 a:hover {
  color: var(--primary);
  text-decoration: none;
}

.politician-card .card-info .party-name {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.politician-card .card-info .card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  justify-content: center;
}

.tag {
  display: inline-block;
  padding: 2px 8px;
  font-size: 0.7rem;
  border-radius: 12px;
  font-weight: 500;
}

.tag.corrupt { background: #fce4ec; color: #c62828; }
.tag.reformist { background: #e8f5e9; color: #2e7d32; }
.tag.controversial { background: #fff3e0; color: #e65100; }
.tag.popular { background: #e3f2fd; color: #1565c0; }
.tag.democrat { background: #e8eaf6; color: #283593; }
.tag.republican { background: #fce4ec; color: #b71c1c; }

/* ============================================
   NEWS / ARTICLES LIST
   ============================================ */
.news-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.news-item {
  display: flex;
  gap: 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1rem;
  transition: var(--transition);
}

.news-item:hover {
  box-shadow: var(--shadow);
}

.news-item .news-image {
  width: 120px;
  height: 90px;
  border-radius: var(--radius);
  overflow: hidden;
  flex-shrink: 0;
}

.news-item .news-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.news-item .news-content {
  flex: 1;
  min-width: 0;
}

.news-item .news-content .news-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.news-item .news-content .news-category {
  background: var(--primary);
  color: white;
  padding: 1px 8px;
  border-radius: 10px;
  font-size: 0.7rem;
  font-weight: 500;
}

.news-item .news-content h3 {
  font-size: 0.95rem;
  margin-bottom: 4px;
}

.news-item .news-content h3 a {
  color: var(--text);
}

.news-item .news-content h3 a:hover {
  color: var(--primary);
  text-decoration: none;
}

.news-item .news-content p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ============================================
   SIDEBAR
   ============================================ */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.sidebar .widget {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.sidebar .widget-header {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border-light);
  font-weight: 600;
  font-size: 0.95rem;
  display: flex;
  align-items: center;
  gap: 8px;
}

.sidebar .widget-body {
  padding: 1rem 1.25rem;
}

/* Top Politicians Widget */
.top-politician {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border-light);
}

.top-politician:last-child {
  border-bottom: none;
}

.top-politician .rank {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 24px;
}

.top-politician img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.top-politician .info h4 {
  font-size: 0.85rem;
  margin-bottom: 2px;
}

.top-politician .info p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0;
}

/* Trending Topics */
.trending-list li {
  padding: 6px 0;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  gap: 8px;
}

.trending-list li:last-child {
  border-bottom: none;
}

.trending-list .trend-number {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-muted);
  width: 20px;
}

.trending-list .trend-tag {
  font-size: 0.8rem;
}

.trending-list .trend-count {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Countries Widget */
.country-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.country-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border-radius: var(--radius);
  transition: var(--transition);
  cursor: pointer;
  font-size: 0.85rem;
}

.country-item:hover {
  background: var(--bg);
  text-decoration: none;
}

.country-item .flag {
  font-size: 1.2rem;
}

/* ============================================
   UPLOAD FORM / MODAL
   ============================================ */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.modal-overlay.active {
  display: flex;
}

.modal {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 720px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--shadow-lg);
}

.modal-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--border-light);
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  background: var(--bg-white);
  z-index: 1;
}

.modal-header h2 {
  font-size: 1.2rem;
}

.modal-close {
  width: 32px;
  height: 32px;
  border: none;
  background: var(--bg);
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--border);
}

.modal-body {
  padding: 1.5rem;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.form-group .required {
  color: var(--accent);
}

.form-group input[type="text"],
.form-group input[type="date"],
.form-group input[type="url"],
.form-group input[type="number"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-family: var(--font-main);
  transition: var(--transition);
  outline: none;
  background: var(--bg-white);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(26,115,232,0.15);
}

.form-group textarea {
  min-height: 100px;
  resize: vertical;
}

.form-group .form-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

/* Photo Upload */
.photo-upload {
  border: 2px dashed var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
  cursor: pointer;
  transition: var(--transition);
}

.photo-upload:hover {
  border-color: var(--primary);
  background: rgba(26,115,232,0.02);
}

.photo-upload .upload-icon {
  font-size: 2.5rem;
  margin-bottom: 0.5rem;
}

.photo-upload p {
  font-size: 0.85rem;
  color: var(--text-light);
  margin: 0;
}

.photo-upload .upload-hint {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 4px;
}

.photo-preview {
  display: none;
  margin-top: 1rem;
  position: relative;
  display: inline-block;
}

.photo-preview img {
  width: 150px;
  height: 150px;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 2px solid var(--border);
}

.photo-preview .remove-photo {
  position: absolute;
  top: -8px;
  right: -8px;
  width: 24px;
  height: 24px;
  background: var(--accent);
  color: white;
  border: 2px solid white;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
}

/* Tags Input */
.tags-input {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 42px;
  cursor: text;
  transition: var(--transition);
}

.tags-input:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(26,115,232,0.15);
}

.tags-input .tag-item {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: var(--bg);
  border-radius: 12px;
  font-size: 0.8rem;
}

.tags-input .tag-item .remove-tag {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1;
}

.tags-input .tag-item .remove-tag:hover {
  color: var(--accent);
}

.tags-input input {
  border: none;
  outline: none;
  font-size: 0.85rem;
  font-family: var(--font-main);
  flex: 1;
  min-width: 100px;
  padding: 2px;
}

/* Form Actions */
.form-actions {
  display: flex;
  gap: 1rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 1px solid var(--border-light);
  margin-top: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 500;
  font-family: var(--font-main);
  cursor: pointer;
  transition: var(--transition);
  border: none;
}

.btn-primary {
  background: var(--primary);
  color: white;
}

.btn-primary:hover {
  background: var(--primary-dark);
  text-decoration: none;
  color: white;
}

.btn-secondary {
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background: var(--border-light);
  text-decoration: none;
}

.btn-danger {
  background: var(--accent);
  color: white;
}

.btn-danger:hover {
  background: #d33426;
  text-decoration: none;
  color: white;
}

/* ============================================
   SINGLE PROFILE PAGE
   ============================================ */
.profile-header {
  display: flex;
  gap: 2rem;
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  margin-bottom: 1.5rem;
}

.profile-photo {
  width: 200px;
  height: 200px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex-shrink: 0;
  border: 3px solid var(--border-light);
}

.profile-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-info h1 {
  margin-bottom: 0.5rem;
}

.profile-info .profile-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-bottom: 1rem;
  font-size: 0.9rem;
  color: var(--text-light);
}

.profile-info .profile-meta span {
  display: flex;
  align-items: center;
  gap: 4px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1rem;
}

.profile-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
}

/* Profile Content Tabs */
.profile-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--border-light);
  margin-bottom: 1.5rem;
  overflow-x: auto;
}

.profile-tab {
  padding: 12px 20px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-light);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: var(--transition);
  white-space: nowrap;
  background: none;
  border-top: none;
  border-left: none;
  border-right: none;
  font-family: var(--font-main);
}

.profile-tab:hover {
  color: var(--primary);
}

.profile-tab.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Timeline */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 8px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--border);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-light);
}

.timeline-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--primary);
  border: 2px solid var(--bg-white);
}

.timeline-item.law::before { background: var(--secondary); }
.timeline-item.controversy::before { background: var(--accent); }
.timeline-item.achievement::before { background: #fbbc04; }

.timeline-date {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.timeline-item h3 {
  font-size: 1rem;
  margin-bottom: 4px;
}

.timeline-item p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin: 0;
}

/* ============================================
   FOOTER
   ============================================ */
.site-footer {
  background: #1a1a2e;
  color: #e0e0e0;
  margin-top: 3rem;
}

.footer-top {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  padding: 3rem 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.footer-brand .footer-logo {
  font-size: 1.4rem;
  font-weight: 700;
  color: white;
  margin-bottom: 0.75rem;
}

.footer-brand p {
  font-size: 0.9rem;
  color: #9e9e9e;
  line-height: 1.6;
}

.footer-column h3 {
  color: white;
  font-size: 1rem;
  margin-bottom: 1rem;
}

.footer-column ul li {
  margin-bottom: 0.5rem;
}

.footer-column ul li a {
  color: #9e9e9e;
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-column ul li a:hover {
  color: white;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.8rem;
  color: #757575;
}

/* ============================================
   CATEGORIES / PAGES
   ============================================ */
.category-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.category-header .category-icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.category-header .category-icon.politicos { background: #e3f2fd; }
.category-header .category-icon.partidos { background: #fce4ec; }
.category-header .category-icon.paises { background: #e8f5e9; }
.category-header .category-icon.obras { background: #fff3e0; }
.category-header .category-icon.actos { background: #f3e5f5; }
.category-header .category-icon.errores { background: #ffebee; }
.category-header .category-icon.miserables { background: #212121; color: white; }

.filter-bar {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}

.filter-bar select {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-family: var(--font-main);
  background: var(--bg-white);
  cursor: pointer;
}

.filter-bar .results-count {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-left: auto;
}

/* Pagination */
.pagination {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-top: 2rem;
}

.pagination a,
.pagination span {
  padding: 8px 14px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  transition: var(--transition);
}

.pagination a {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
}

.pagination a:hover {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
  text-decoration: none;
}

.pagination .current {
  background: var(--primary);
  color: white;
  border: 1px solid var(--primary);
}

/* ============================================
   ABOUT PAGE
   ============================================ */
.about-hero {
  background: linear-gradient(135deg, #1a73e8, #0d47a1);
  color: white;
  padding: 3rem;
  border-radius: var(--radius-lg);
  margin-bottom: 2rem;
  text-align: center;
}

.about-hero h1 {
  color: white;
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.about-hero p {
  font-size: 1.1rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
}

.value-card .value-icon {
  font-size: 2rem;
  margin-bottom: 0.75rem;
}

.value-card h3 {
  margin-bottom: 0.5rem;
}

.value-card p {
  font-size: 0.9rem;
  color: var(--text-light);
}

/* ============================================
   LOADING STATES
   ============================================ */
.skeleton {
  background: linear-gradient(90deg, var(--border-light) 25%, var(--bg) 50%, var(--border-light) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: var(--radius);
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

.spinner {
  width: 40px;
  height: 40px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================
   NOTIFICATION / TOAST
   ============================================ */
.toast-container {
  position: fixed;
  top: calc(var(--header-height) + 16px);
  right: 16px;
  z-index: 3000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  background: var(--bg-white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  border-left: 4px solid var(--primary);
  min-width: 300px;
  max-width: 420px;
  animation: toast-in 0.3s ease;
}

.toast.success { border-left-color: var(--secondary); }
.toast.error { border-left-color: var(--accent); }
.toast.warning { border-left-color: #fbbc04; }

.toast .toast-icon {
  font-size: 1.2rem;
}

.toast .toast-message {
  flex: 1;
  font-size: 0.85rem;
}

.toast .toast-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 1rem;
}

@keyframes toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .content-wrapper {
    grid-template-columns: 1fr;
  }

  .sidebar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
  }

  .profile-header {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-info .profile-meta {
    justify-content: center;
  }

  .profile-tags {
    justify-content: center;
  }
}

@media (max-width: 768px) {
  :root {
    --header-height: 56px;
  }

  .hamburger {
    display: block;
  }

  .site-logo .logo-text {
    display: none;
  }

  .header-search {
    flex: 1 1 auto;
    max-width: 160px;
    min-width: 0;
  }

  .header-search input[type="search"] {
    padding: 0 36px 0 12px;
    font-size: 0.8rem;
  }

  .header-right {
    gap: 0.5rem;
  }

  .btn-upload span {
    display: none;
  }

  .btn-upload {
    padding: 8px;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    justify-content: center;
  }

  .main-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-white);
    z-index: 1000;
    display: none;
    overflow-y: auto;
    padding-top: calc(var(--header-height) + 1rem);
  }

  .main-nav.active {
    display: block;
  }

  .nav-list {
    flex-direction: column;
    padding: 1rem;
    gap: 0;
  }

  .nav-item a {
    padding: 14px 16px;
    width: 100%;
    border-bottom: 1px solid var(--border-light);
    border-left: 3px solid transparent;
  }

  .nav-item a:hover,
  .nav-item a.active {
    border-bottom-color: var(--border-light);
    border-left-color: var(--primary);
  }

  .nav-item .dropdown {
    position: static;
    box-shadow: none;
    border: none;
    display: none;
    padding-left: 1rem;
  }

  .nav-item.dropdown-active .dropdown {
    display: block;
  }

  .site-content {
    padding: 1rem;
    margin-top: calc(var(--header-height) + 48px);
  }

  .hero-banner {
    padding: 2rem 1.5rem;
  }

  .hero-banner h1 {
    font-size: 1.6rem;
  }

  .hero-stats {
    gap: 1rem;
  }

  .politician-grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  }

  .news-item {
    flex-direction: column;
  }

  .news-item .news-image {
    width: 100%;
    height: 160px;
  }

  .sidebar {
    grid-template-columns: 1fr;
  }

  .footer-top {
    grid-template-columns: 1fr;
    padding: 2rem 1.5rem;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .modal {
    max-height: 95vh;
    margin: 0.5rem;
  }

  .filter-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-bar .results-count {
    margin-left: 0;
  }

  .country-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .header-search {
    max-width: 110px;
  }

  .politician-grid {
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
  }

  .politician-card .card-image {
    height: 140px;
  }

  h1 { font-size: 1.5rem; }
  h2 { font-size: 1.3rem; }

  .hero-banner h1 {
    font-size: 1.4rem;
  }

  .hero-stat .stat-number {
    font-size: 1.4rem;
  }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.hidden { display: none !important; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Accessible focus */
:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Print */
@media print {
  .site-header, .main-nav, .sidebar, .site-footer, .profile-actions, .pagination {
    display: none !important;
  }
  .site-content {
    margin-top: 0;
  }
  .content-wrapper {
    grid-template-columns: 1fr;
  }
}
