/*
 Theme Name: RCAD PRO Child Theme
 Theme URI: https://recursoscad.com
 Description: Tema hijo profesional para Orbital con optimización SEO avanzada, AdSense, Schema.org, lazy loading, descargas DWG, bbPress y navegación inteligente.
 Author: Nico + Lulú
 Author URI: https://recursoscad.com
 Template: orbital
 Version: 1.7.6
*/

/* ============================================
   VARIABLES CSS GLOBALES (inyectadas dinámicamente)
   ============================================ */

:root {
  --rcad-primary: #0066cc;
  --rcad-secondary: #333333;
  --rcad-accent: #ff6600;
  --rcad-bg: #ffffff;
  --rcad-text: #333333;
  --rcad-link: #0066cc;
  --rcad-link-hover: #004499;
  --rcad-button-bg: #0066cc;
  --rcad-button-text: #ffffff;
}

/* ============================================
   ESTILOS BASE RCAD PRO
   ============================================ */

.rcad-topbar {
  background-color: #000000;
  color: #ffffff;
  padding: 10px 0;
  font-size: 14px;
  position: relative;
  z-index: 9999;
}

.rcad-topbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.rcad-topbar-left,
.rcad-topbar-right {
  display: flex;
  gap: 20px;
  align-items: center;
}

.rcad-topbar a {
  color: #ffffff;
  text-decoration: none;
  transition: color 0.3s ease;
}

.rcad-topbar a:hover {
  color: var(--rcad-primary);
}

.rcad-topbar-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: 2px solid var(--rcad-primary);
}

/* Login Modal */
.rcad-login-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 99999;
  align-items: center;
  justify-content: center;
}

.rcad-login-modal.active {
  display: flex;
}

.rcad-login-modal-content {
  background: #ffffff;
  padding: 40px;
  border-radius: 8px;
  max-width: 450px;
  width: 90%;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.rcad-login-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  font-size: 24px;
  color: #999;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  width: 30px;
  height: 30px;
  line-height: 1;
}

.rcad-login-modal-close:hover {
  color: #333;
}

.rcad-login-modal h3 {
  margin-top: 0;
  margin-bottom: 20px;
  color: var(--rcad-text);
}

.rcad-login-modal .login-form input[type="text"],
.rcad-login-modal .login-form input[type="password"] {
  width: 100%;
  padding: 12px;
  margin-bottom: 15px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 14px;
}

.rcad-login-modal .login-form input[type="submit"] {
  width: 100%;
  padding: 12px;
  background-color: var(--rcad-button-bg);
  color: var(--rcad-button-text);
  border: none;
  border-radius: 4px;
  font-size: 16px;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.rcad-login-modal .login-form input[type="submit"]:hover {
  opacity: 0.9;
}

.rcad-login-modal-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  border-bottom: 2px solid #eee;
}

.rcad-login-modal-tab {
  padding: 10px 20px;
  cursor: pointer;
  border: none;
  background: none;
  color: #666;
  font-size: 15px;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
}

.rcad-login-modal-tab.active {
  color: var(--rcad-primary);
  border-bottom-color: var(--rcad-primary);
}

.rcad-login-modal-register-info {
  text-align: center;
  padding: 20px;
  background-color: #f9f9f9;
  border-radius: 4px;
}

.rcad-login-modal-register-info a {
  color: var(--rcad-link);
  text-decoration: none;
}

.rcad-login-modal-register-info a:hover {
  color: var(--rcad-link-hover);
}

/* Tags RCAD */
.rcad-tags {
  margin: 30px 0;
  padding: 20px 0;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
}

.rcad-tags a {
  display: inline-block;
  padding: 6px 14px;
  margin: 4px;
  background-color: #f3f3f3;
  color: var(--rcad-text);
  border-radius: 4px;
  text-decoration: none;
  font-size: 13px;
  transition: all 0.3s ease;
}

.rcad-tags a:hover {
  background-color: var(--rcad-primary);
  color: #ffffff;
}

/* Anuncios RCAD */
.rcad-ad-block {
  margin: 24px 0;
  padding: 20px;
  background-color: #f9f9f9;
  border: 1px solid #eee;
  border-radius: 4px;
  text-align: center;
}

.rcad-ad-label {
  font-size: 11px;
  color: #999;
  text-transform: uppercase;
  margin-bottom: 12px;
  letter-spacing: 0.5px;
}

/* Tabs RCAD */
.rcad-tabs {
  background-color: var(--rcad-primary);
  padding: 12px 0;
  margin: 20px 0;
  border-radius: 4px;
  overflow-x: auto;
}

.rcad-tabs-inner {
  display: flex;
  gap: 4px;
  padding: 0 20px;
  flex-wrap: wrap;
}

.rcad-tabs a {
  color: #000000;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 3px;
  font-size: 14px;
  font-weight: 500;
  transition: background-color 0.3s ease;
  white-space: nowrap;
}

.rcad-tabs a:hover {
  background-color: rgba(255, 255, 255, 0.2);
}

.rcad-tabs a.active {
  background-color: rgba(0, 0, 0, 0.2);
}

/* Interlinks RCAD */
.rcad-interlinks {
  margin: 40px 0;
  padding: 30px 0;
  border-top: 2px solid #eee;
}

.rcad-interlinks h3 {
  font-size: 22px;
  margin-bottom: 20px;
  color: var(--rcad-text);
}

.rcad-interlinks-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
}

.rcad-interlink-card {
  border: 1px solid #eee;
  border-radius: 6px;
  overflow: hidden;
  transition: all 0.3s ease;
  background: #ffffff;
}

.rcad-interlink-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transform: translateY(-4px);
}

.rcad-interlink-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.rcad-interlink-content {
  padding: 16px;
}

.rcad-interlink-category {
  font-size: 12px;
  color: var(--rcad-primary);
  text-transform: uppercase;
  margin-bottom: 8px;
  font-weight: 600;
}

.rcad-interlink-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--rcad-text);
  margin: 0;
  line-height: 1.4;
}

.rcad-interlink-card a {
  text-decoration: none;
  color: inherit;
}

/* CTA Comentarios */
.rcad-cta-comments {
  background: linear-gradient(135deg, var(--rcad-primary) 0%, var(--rcad-secondary) 100%);
  color: #ffffff;
  padding: 40px;
  border-radius: 8px;
  margin: 40px 0;
  text-align: center;
}

.rcad-cta-comments h3 {
  font-size: 24px;
  margin-bottom: 16px;
  color: #ffffff;
}

.rcad-cta-comments p {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 12px;
  opacity: 0.95;
}

.rcad-cta-stats {
  display: flex;
  justify-content: center;
  gap: 30px;
  margin: 20px 0;
  flex-wrap: wrap;
}

.rcad-cta-stat {
  font-size: 14px;
}

.rcad-cta-stat strong {
  display: block;
  font-size: 28px;
  margin-bottom: 4px;
}

.rcad-cta-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
  flex-wrap: wrap;
}

.rcad-cta-button {
  display: inline-block;
  padding: 12px 24px;
  background-color: #ffffff;
  color: var(--rcad-primary);
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  transition: all 0.3s ease;
}

.rcad-cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.rcad-cta-button.secondary {
  background-color: transparent;
  border: 2px solid #ffffff;
  color: #ffffff;
}

.rcad-cta-logged-in {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-bottom: 20px;
}

.rcad-cta-avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 3px solid #ffffff;
}

/* Category Overview */
.rcad-category-overview {
  background-color: #f9f9f9;
  padding: 30px;
  border-radius: 8px;
  margin: 30px 0;
}

.rcad-category-overview h3 {
  font-size: 20px;
  margin-bottom: 16px;
  color: var(--rcad-text);
}

.rcad-category-overview-intro {
  font-size: 16px;
  line-height: 1.6;
  margin-bottom: 20px;
  color: var(--rcad-text);
}

.rcad-category-topics {
  margin-bottom: 20px;
}

.rcad-category-topics h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--rcad-secondary);
}

.rcad-category-topics ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.rcad-category-topics li {
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
}

.rcad-category-topics li:before {
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--rcad-primary);
}

.rcad-category-glossary {
  margin-top: 20px;
}

.rcad-category-glossary h4 {
  font-size: 16px;
  margin-bottom: 10px;
  color: var(--rcad-secondary);
}

.rcad-category-glossary-terms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.rcad-category-glossary-term {
  background-color: #ffffff;
  padding: 6px 12px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--rcad-text);
  border: 1px solid #e0e0e0;
}

/* Category SEO Bottom */
.rcad-category-seo-bottom {
  margin: 40px 0;
  padding: 30px;
  background-color: #ffffff;
  border: 1px solid #eee;
  border-radius: 8px;
}

.rcad-category-seo-bottom h2 {
  color: var(--rcad-text);
  margin-bottom: 20px;
}

/* Responsive */
@media (max-width: 768px) {
  .rcad-topbar-inner {
    flex-direction: column;
    gap: 10px;
  }

  .rcad-interlinks-grid {
    grid-template-columns: 1fr;
  }

  .rcad-cta-stats {
    flex-direction: column;
    gap: 15px;
  }

  .rcad-cta-buttons {
    flex-direction: column;
  }

  .rcad-tabs-inner {
    flex-wrap: nowrap;
  }

  .rcad-login-modal-content {
    padding: 30px 20px;
  }
}
