/*
Theme Name: CIOPS Theme
Theme URI: https://ciopsformacion.es
Author: CIOPS Formación
Description: Tema profesional para CIOPS Formación — Academia Policía Local CV. Integra todas las herramientas nativas sin iframes, con SEO optimizado.
Version: 1.0
Text Domain: ciops-theme
*/

/* =============================================
   VARIABLES GLOBALES — Paleta navy + gold
   ============================================= */
:root {
  --navy:   #0a0f2e;
  --navy2:  #0f1c3f;
  --navy3:  #1a2c5b;
  --gold:   #C9A84C;
  --gold2:  #E8C96A;
  --gold3:  #F5DFA0;
  --white:  #ffffff;
  --text2:  rgba(255,255,255,0.65);
  --text3:  rgba(255,255,255,0.35);
  --bg-dark: #07091f;
}

/* =============================================
   RESET Y BASE
   ============================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--navy);
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }

/* =============================================
   NAVBAR PRINCIPAL
   ============================================= */
.ciops-navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 48px;
  background: rgba(10,15,46,0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201,168,76,0.18);
  transition: padding 0.3s;
}
.ciops-navbar.scrolled { padding: 10px 48px; }

.ciops-nav-logo img { height: 46px; width: auto; }

.ciops-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}
.ciops-nav-links a {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text2);
  transition: color 0.2s;
}
.ciops-nav-links a:hover,
.ciops-nav-links a.current { color: var(--gold2); }

.ciops-nav-cta {
  background: linear-gradient(135deg, var(--gold), var(--gold2)) !important;
  color: #000 !important;
  font-weight: 800 !important;
  padding: 9px 22px;
  border-radius: 22px;
}

/* Burger menú móvil */
.ciops-nav-burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 4px;
}
.ciops-nav-burger span {
  width: 22px; height: 2px;
  background: var(--gold2);
  border-radius: 2px;
  transition: all 0.3s;
  display: block;
}

/* Menú móvil desplegado */
.ciops-mobile-menu {
  display: none;
  position: fixed;
  top: 74px; left: 0; right: 0;
  background: rgba(7,9,31,0.98);
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(201,168,76,0.15);
  padding: 20px 24px;
  z-index: 999;
  flex-direction: column;
  gap: 4px;
}
.ciops-mobile-menu.open { display: flex; }
.ciops-mobile-menu a {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text2);
  padding: 12px 16px;
  border-radius: 10px;
  transition: all 0.2s;
}
.ciops-mobile-menu a:hover { background: rgba(201,168,76,0.08); color: var(--gold2); }

/* =============================================
   CONTENIDO PRINCIPAL (páginas estándar)
   ============================================= */
.ciops-main {
  margin-top: 74px;
  min-height: calc(100vh - 74px - 80px);
}

/* =============================================
   HERO PÁGINAS INTERNAS (novedades, etc.)
   ============================================= */
.ciops-page-hero {
  padding: 60px 48px 48px;
  background: linear-gradient(160deg, var(--navy) 0%, var(--bg-dark) 100%);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.ciops-page-hero::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 50%, rgba(201,168,76,0.07) 0%, transparent 70%);
}
.ciops-page-hero-label {
  display: inline-block;
  font-size: 10px; font-weight: 700;
  letter-spacing: 3px; text-transform: uppercase;
  color: var(--gold2);
  margin-bottom: 12px;
  position: relative;
}
.ciops-page-hero h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(28px, 4vw, 50px);
  font-weight: 900;
  line-height: 1.1;
  position: relative;
}
.ciops-page-hero h1 span { color: var(--gold2); }
.ciops-page-hero p {
  font-size: 15px;
  color: var(--text2);
  max-width: 560px;
  margin: 14px auto 0;
  line-height: 1.7;
  position: relative;
}

/* =============================================
   SECCIÓN NOVEDADES / BLOG
   ============================================= */
.ciops-blog-section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

/* Grid de artículos */
.ciops-posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
  margin-top: 40px;
}

/* Card de artículo */
.ciops-post-card {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 18px;
  overflow: hidden;
  transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
  display: flex;
  flex-direction: column;
}
.ciops-post-card:hover {
  transform: translateY(-5px);
  border-color: rgba(201,168,76,0.35);
  box-shadow: 0 20px 50px rgba(0,0,0,0.4);
}
.ciops-post-card-thumb {
  height: 180px;
  background: linear-gradient(135deg, var(--navy2), var(--navy3));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.ciops-post-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.ciops-post-card-thumb .ciops-post-date {
  position: absolute;
  bottom: 12px; left: 14px;
  font-size: 10px; font-weight: 700;
  letter-spacing: 1px;
  background: rgba(0,0,0,0.6);
  border: 1px solid rgba(201,168,76,0.3);
  color: var(--gold2);
  padding: 4px 10px;
  border-radius: 8px;
}
.ciops-post-card-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.ciops-post-card-cat {
  font-size: 10px; font-weight: 700;
  letter-spacing: 1.5px; text-transform: uppercase;
  color: var(--gold2);
  margin-bottom: 8px;
}
.ciops-post-card-title {
  font-family: 'Syne', sans-serif;
  font-size: 16px; font-weight: 800;
  line-height: 1.3;
  margin-bottom: 10px;
  color: var(--white);
}
.ciops-post-card-excerpt {
  font-size: 13px; color: var(--text2);
  line-height: 1.65; flex: 1;
  margin-bottom: 18px;
}
.ciops-post-card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px; font-weight: 700;
  letter-spacing: 0.5px;
  color: var(--gold2);
  transition: gap 0.2s;
}
.ciops-post-card-link:hover { gap: 10px; }
.ciops-post-card-link svg { width: 14px; height: 14px; }

/* =============================================
   ARTÍCULO INDIVIDUAL (single.php)
   ============================================= */
.ciops-single-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.ciops-single-wrap .ciops-single-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}
.ciops-single-wrap .ciops-single-cat {
  font-size: 10px; font-weight: 700;
  letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold2);
  background: rgba(201,168,76,0.08);
  border: 1px solid rgba(201,168,76,0.2);
  padding: 4px 12px; border-radius: 10px;
}
.ciops-single-wrap .ciops-single-date {
  font-size: 12px; color: var(--text2);
}
.ciops-single-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 20px;
}
.ciops-single-title span { color: var(--gold2); }
.ciops-single-thumb {
  width: 100%; border-radius: 16px;
  overflow: hidden; margin-bottom: 36px;
}
.ciops-single-thumb img { width: 100%; height: auto; display: block; }
.ciops-single-content {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text2);
}
.ciops-single-content h2 {
  font-family: 'Syne', sans-serif;
  font-size: 22px; font-weight: 800;
  color: var(--white);
  margin: 36px 0 12px;
}
.ciops-single-content h3 {
  font-size: 18px; font-weight: 700;
  color: var(--gold2);
  margin: 28px 0 10px;
}
.ciops-single-content p { margin-bottom: 18px; }
.ciops-single-content ul, .ciops-single-content ol {
  margin: 0 0 18px 24px;
}
.ciops-single-content li { margin-bottom: 8px; }
.ciops-single-content strong { color: var(--white); font-weight: 700; }
.ciops-single-content a { color: var(--gold2); border-bottom: 1px solid rgba(201,168,76,0.3); transition: border-color 0.2s; }
.ciops-single-content a:hover { border-color: var(--gold2); }
.ciops-single-content blockquote {
  border-left: 3px solid var(--gold);
  padding: 16px 20px;
  margin: 24px 0;
  background: rgba(201,168,76,0.05);
  border-radius: 0 12px 12px 0;
  color: var(--white);
  font-style: italic;
}
.ciops-single-content img {
  border-radius: 12px;
  margin: 20px 0;
}

/* Descarga de archivos adjuntos */
.ciops-file-download {
  display: flex;
  align-items: center;
  gap: 14px;
  background: rgba(201,168,76,0.06);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: 14px;
  padding: 16px 20px;
  margin: 14px 0;
  transition: background 0.2s, border-color 0.2s;
}
.ciops-file-download:hover { background: rgba(201,168,76,0.1); border-color: rgba(201,168,76,0.4); }
.ciops-file-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 20px;
}
.ciops-file-info { flex: 1; }
.ciops-file-name { font-size: 14px; font-weight: 700; color: var(--white); }
.ciops-file-size { font-size: 11px; color: var(--text2); margin-top: 2px; }
.ciops-file-btn {
  font-size: 11px; font-weight: 700;
  letter-spacing: 1px; text-transform: uppercase;
  color: #000;
  background: linear-gradient(135deg, var(--gold), var(--gold2));
  padding: 8px 16px; border-radius: 20px;
  flex-shrink: 0;
}

/* =============================================
   FOOTER
   ============================================= */
.ciops-footer {
  background: var(--bg-dark);
  border-top: 1px solid rgba(201,168,76,0.12);
  padding: 40px 48px 28px;
}
.ciops-footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}
.ciops-footer-logo img { height: 40px; width: auto; }
.ciops-footer-links {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
}
.ciops-footer-links a {
  font-size: 11px; font-weight: 600;
  letter-spacing: 1px; text-transform: uppercase;
  color: var(--text3);
  transition: color 0.2s;
}
.ciops-footer-links a:hover { color: var(--gold2); }
.ciops-footer-copy {
  font-size: 11px;
  color: var(--text3);
  text-align: center;
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.06);
  max-width: 1100px;
  margin-left: auto; margin-right: auto;
}

/* =============================================
   RESPONSIVE
   ============================================= */
@media (max-width: 768px) {
  .ciops-navbar { padding: 12px 20px; }
  .ciops-navbar.scrolled { padding: 8px 20px; }
  .ciops-nav-links { display: none; }
  .ciops-nav-burger { display: flex; }
  .ciops-footer { padding: 32px 20px 20px; }
  .ciops-footer-inner { flex-direction: column; align-items: flex-start; gap: 16px; }
  .ciops-page-hero { padding: 40px 20px 32px; }
  .ciops-blog-section { padding: 32px 16px 60px; }
  .ciops-single-wrap { padding: 32px 16px 60px; }
  .ciops-posts-grid { grid-template-columns: 1fr; }
}
