:root {
  --bg-color: #102A43;
  --card-bg: #243B53;
  --text-main: #FFFFFF;
  --text-muted: #D9E2EC;
  --primary: #FF9F1C;
  --primary-glow: rgba(255, 159, 28, 0.5);
  --secondary: #FFFFFF;
  --accent: #F0F4F8;
  --font-family: 'Outfit', sans-serif;
  --transition: all 0.3s ease;
  --container-width: 1200px;
  --border: rgba(255, 255, 255, 0.1);
  --white: #FFFFFF;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  background-color: var(--bg-color);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden;
}

.container {
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

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

.btn {
  display: inline-block;
  padding: 12px 30px;
  border-radius: 50px;
  font-weight: 500;
  transition: var(--transition);
  cursor: pointer;
  font-size: 1rem;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px var(--primary-glow);
}

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

.btn-outline:hover {
  background: rgba(59, 130, 246, 0.1);
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.85rem;
}

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

.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 0;
  z-index: 1000;
  background: rgba(16, 42, 67, 0.7);
  backdrop-filter: blur(12px);
  transition: padding 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}

.header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--primary) 50%, transparent 100%);
}

.header.scrolled {
  padding: 10px 0;
  background: rgba(16, 42, 67, 0.9);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-img {
  height: 50px;
}

.nav-list {
  display: flex;
  list-style: none;
  gap: 30px;
}

.nav-link {
  color: var(--text-muted);
  transition: var(--transition);
  font-weight: 500;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--primary);
  color: var(--white);
  line-height: 1;
}

.nav-link.btn-primary:hover {
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px var(--primary-glow);
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
}

.nav-item {
  position: relative;
}

.dropdown-toggle {
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
}

.dropdown-toggle i {
  font-size: 0.7rem;
  transition: transform 0.3s ease;
}

.dropdown-toggle.open i {
  transform: rotate(180deg);
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 8px;
  min-width: 220px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
  z-index: 100;
}

.dropdown-menu.open {
  display: block;
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu a {
  display: block;
  padding: 10px 16px;
  color: var(--text-main);
  text-decoration: none;
  border-radius: 8px;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.dropdown-menu a:hover {
  background: rgba(255, 159, 28, 0.1);
  color: var(--primary);
}

.main {
  padding: 120px 0 60px;
  min-height: calc(100vh - 300px);
}

.blog-header {
  text-align: center;
  margin-bottom: 50px;
}

.page-title {
  color: var(--primary);
  font-size: 2.5rem;
  margin-bottom: 10px;
}

.page-subtitle {
  color: var(--text-muted);
  margin-bottom: 25px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 30px;
}

.blog-card {
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  cursor: pointer;
}

.blog-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

.blog-card-image {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
}

.blog-card-content {
  padding: 25px;
}

.blog-card-date {
  color: var(--primary);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 10px;
}

.blog-card-title {
  color: var(--white);
  font-size: 1.3rem;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.3;
}

.blog-card-excerpt {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.blog-card-author {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 15px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.9rem;
}

.article-card {
  max-width: 900px;
  margin: 0 auto;
  background: var(--card-bg);
  border-radius: 20px;
  padding: 40px;
}

.article-header {
  margin-bottom: 25px;
}

.article-title-input {
  width: 100%;
  font-size: 2rem;
  font-weight: 600;
  color: var(--white);
  border: none;
  background: transparent;
  padding: 15px 0;
  border-bottom: 2px solid var(--border);
  margin-bottom: 20px;
  font-family: var(--font-family);
}

.article-title-input:focus {
  outline: none;
  border-bottom-color: var(--primary);
}

.article-meta {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.meta-input {
  padding: 12px 18px;
  border: 2px solid var(--border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.05);
  color: var(--white);
  font-family: var(--font-family);
}

.meta-input:focus {
  outline: none;
  border-color: var(--primary);
}

.article-image-upload {
  cursor: pointer;
  margin-bottom: 25px;
  border-radius: 12px;
  overflow: hidden;
}

.article-image-upload input {
  display: none;
}

.image-preview-container {
  width: 100%;
  height: 280px;
  background: rgba(255, 255, 255, 0.05);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed var(--border);
  border-radius: 12px;
  transition: all 0.3s;
}

.image-preview-container:hover {
  border-color: var(--primary);
}

.upload-placeholder {
  text-align: center;
  color: var(--text-muted);
}

.upload-icon {
  font-size: 3rem;
  display: block;
  margin-bottom: 10px;
}

.article-content {
  margin-bottom: 25px;
}

#editor-container {
  min-height: 350px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 12px;
  padding: 20px;
  border: 2px solid var(--border);
}

#editor-container:focus-within {
  border-color: var(--primary);
}

.ql-toolbar {
  background: rgba(255, 255, 255, 0.1) !important;
  border: none !important;
  border-radius: 8px 8px 0 0 !important;
  position: sticky;
  top: 88px;
  z-index: 20;
  backdrop-filter: blur(12px);
}

.ql-container {
  border: none !important;
  font-family: var(--font-family) !important;
  font-size: 1rem !important;
}

.ql-editor {
  min-height: 280px;
  color: var(--white);
  line-height: 1.8;
}

.ql-editor.ql-blank::before {
  color: var(--text-muted);
  font-style: normal;
}

.ql-snow .ql-stroke {
  stroke: var(--text-muted);
}

.ql-snow .ql-fill {
  fill: var(--text-muted);
}

.ql-snow .ql-picker {
  color: var(--text-muted);
}

.ql-snow .ql-picker-options {
  background: var(--card-bg);
}

.ql-toolbar:hover,
.ql-container:hover {
  border-color: var(--primary) !important;
}

.article-actions {
  display: flex;
  gap: 15px;
  margin-top: 30px;
}

.article-detail {
  background: var(--card-bg);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  margin-bottom: 30px;
}

#vistaArticulo > .btn-outline,
#vistaDetalle > .btn-outline {
  display: inline-flex;
  align-items: center;
  margin-bottom: 28px;
}

.article-detail-image {
  width: 100%;
  height: 400px;
  background-size: cover;
  background-position: center;
}

.article-detail-content {
  padding: 40px;
}

.article-detail-title {
  color: var(--white);
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 20px;
}

.article-detail-meta {
  display: flex;
  gap: 25px;
  color: var(--text-muted);
  margin-bottom: 30px;
  padding-bottom: 25px;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.article-detail-body {
  color: var(--text-main);
  font-size: 1.05rem;
  line-height: 1.9;
}

.article-detail-body h1,
.article-detail-body h2,
.article-detail-body h3 {
  color: var(--white);
  margin: 25px 0 15px;
}

.article-detail-body p {
  margin-bottom: 15px;
}

.article-detail-body ul,
.article-detail-body ol {
  margin: 15px 0 15px 25px;
}

.article-detail-body li {
  margin-bottom: 8px;
}

.article-detail-body a {
  color: var(--primary);
}

.article-detail-body img {
  max-width: 100%;
  border-radius: 10px;
  margin: 20px 0;
}

.article-detail-body blockquote {
  border-left: 4px solid var(--primary);
  padding-left: 20px;
  margin: 20px 0;
  color: var(--text-muted);
  font-style: italic;
}

.article-detail-body pre {
  background: rgba(0, 0, 0, 0.3);
  padding: 15px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 15px 0;
}

.article-detail-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}

.empty-state-icon {
  font-size: 4rem;
  margin-bottom: 20px;
}

.alert {
  padding: 15px 20px;
  border-radius: 10px;
  margin-bottom: 25px;
}

.alert-success {
  background: rgba(34, 197, 94, 0.2);
  color: #22c55e;
  border: 1px solid #22c55e;
}

.alert-error {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  border: 1px solid #ef4444;
}

.footer {
  background: #0a1a2e;
  padding: 60px 0 20px;
  margin-top: 80px;
  position: relative;
}

.footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, rgba(0,0,0,0) 0%, var(--primary) 50%, rgba(0,0,0,0) 100%);
}

.footer-content-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 40px;
}

.footer-col h4 {
  color: var(--white);
  margin-bottom: 20px;
  font-size: 1.1rem;
}

.footer-desc {
  color: var(--text-muted);
  margin-top: 15px;
  line-height: 1.7;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-links a {
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--primary);
}

.footer-contact li {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-muted);
  margin-bottom: 15px;
}

.footer-social-icons {
  display: flex;
  gap: 15px;
}

.footer-social-icons a {
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: var(--transition);
}

.footer-social-icons a:hover {
  background: var(--primary);
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 20px;
  text-align: center;
  color: var(--text-muted);
}

.hidden {
  display: none;
}

.loading-state {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px;
  color: var(--text-muted);
}

.loading-state i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 15px;
}

@media (max-width: 992px) {
  .footer-content-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 768px) {
  .nav {
    display: none;
  }

  .nav.active {
    display: block;
    position: absolute;
    top: 80px;
    left: 0;
    width: 100%;
    background: var(--card-bg);
    padding: 20px;
  }

  .nav-list {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .mobile-menu-btn {
    display: block;
  }

  .dropdown-menu {
    position: static;
    transform: none;
    background: var(--bg-color);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 8px;
  }

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

  .article-meta {
    flex-direction: column;
  }

  .article-detail-image {
    height: 250px;
  }

  .article-detail-title {
    font-size: 1.6rem;
  }

  .article-detail-content {
    padding: 25px;
  }

  .footer-content-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .footer-social-icons {
    justify-content: center;
  }

  .article-card {
    padding: 25px;
  }
}
