/*
 * CIEMER Theme – Main Stylesheet
 * Colores corporativos: #192959 (navy) | #27348B (blue) | #00AACA (teal)
 */

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

:root {
  --navy:      #192959;
  --blue:      #27348B;
  --teal:      #00AACA;
  --teal-dark: #0090AC;
  --gray:      #e0e0e0;
  --light:     #f5f5f5;
  --text:      #222;
  --muted:     #777;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Kanit', sans-serif;
  font-weight: 300;
  color: var(--text);
  background: #ddd;
  font-size: 15px;
  line-height: 1.65;
}

a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--teal); }
img { max-width: 100%; display: block; }

/* ── WRAPPER ── */
.site-wrapper {
  max-width: 1100px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 40px rgba(0,0,0,0.18);
}

/* ─────────────────────────────────────────
   TOP BAR
───────────────────────────────────────── */
.top-bar {
  background: var(--navy);
  padding: 5px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar-left {
  display: flex;
  gap: 16px;
  align-items: center;
}
.top-bar-left a {
  color: rgba(255,255,255,0.55);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.4px;
  transition: color 0.2s;
}
.top-bar-left a:hover { color: var(--teal); }
.top-bar-sep { color: rgba(255,255,255,0.2); font-size: 10px; }
.top-bar-social {
  display: flex;
  gap: 6px;
  align-items: center;
}
.top-bar-social a {
  color: rgba(255,255,255,0.5);
  width: 26px;
  height: 26px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 3px;
  transition: all 0.2s;
}
.top-bar-social a:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}
.top-bar-social svg { width: 14px; height: 14px; fill: currentColor; }

/* ─────────────────────────────────────────
   HEADER
───────────────────────────────────────── */
.site-header {
  background: #fff;
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 3px solid var(--teal);
}
.site-logo { display: flex; align-items: center; text-decoration: none; }
.site-logo img { height: 50px; width: auto; }

/* ── NAV ── */
.primary-nav {
  display: flex;
  align-items: stretch;
}
.nav-item { position: relative; }
.nav-item > a {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: var(--navy);
  padding: 10px 13px;
  border-bottom: 3px solid transparent;
  transition: all 0.2s;
  white-space: nowrap;
}
.nav-item > a:hover,
.nav-item > a.active {
  color: var(--teal);
  border-bottom-color: var(--teal);
}
.nav-arrow {
  display: inline-block;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  margin-top: 1px;
  transition: transform 0.2s;
}
.nav-item:hover .nav-arrow { transform: rotate(180deg); }
.nav-dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: #fff;
  border-top: 3px solid var(--teal);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 200px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: all 0.2s ease;
}
.nav-item:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.nav-dropdown a {
  display: block;
  padding: 10px 16px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--navy);
  border-bottom: 1px solid var(--gray);
  transition: all 0.15s;
  white-space: nowrap;
}
.nav-dropdown a:last-child { border-bottom: none; }
.nav-dropdown a:hover {
  background: var(--light);
  color: var(--teal);
  padding-left: 22px;
}

/* Mobile nav toggle */
.mobile-nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.mobile-nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--navy);
  transition: all 0.2s;
}
.mobile-nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px,5px); }
.mobile-nav-toggle.open span:nth-child(2) { opacity: 0; }
.mobile-nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px,-5px); }

/* ─────────────────────────────────────────
   HERO
───────────────────────────────────────── */
.hero {
  position: relative;
  width: 100%;
  height: 380px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(160deg, rgba(25,41,89,0.88) 0%, rgba(0,170,202,0.5) 100%),
    url('https://images.unsplash.com/photo-1530026405186-ed1f139313f8?w=1100&q=80') center/cover no-repeat;
}
.hero-content { position: relative; z-index: 2; text-align: center; }
.hero-logo-box {
  background: rgba(255,255,255,0.96);
  border: 3px solid var(--teal);
  border-radius: 10px;
  padding: 22px 40px;
  display: inline-block;
}
.hero-logo-box img { height: 66px; width: auto; margin: 0 auto 10px; display: block; }
.hero-logo-line {
  width: 100%;
  height: 3px;
  background: var(--teal);
  margin: 10px 0 8px;
}
.hero-logo-sub {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: var(--muted);
}

/* ─────────────────────────────────────────
   CONTENT-TYPE STRIP
───────────────────────────────────────── */
.content-strip {
  background: var(--navy);
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}
.content-strip a {
  color: rgba(255,255,255,0.65);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 10px 16px;
  border-right: 1px solid rgba(255,255,255,0.08);
  transition: all 0.2s;
  display: flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.content-strip a:last-child { border-right: none; }
.content-strip a:hover,
.content-strip a.active {
  background: var(--teal);
  color: #fff;
}
.strip-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal);
  flex-shrink: 0;
}
.content-strip a:hover .strip-dot,
.content-strip a.active .strip-dot { background: #fff; }

/* ─────────────────────────────────────────
   MAIN LAYOUT
───────────────────────────────────────── */
.main-layout { display: flex; }
.main-content {
  flex: 1;
  min-width: 0;
  padding: 28px 26px;
  border-right: 1px solid var(--gray);
}
.sidebar {
  width: 272px;
  flex-shrink: 0;
  padding: 28px 18px;
  background: #fafafa;
}

/* ─────────────────────────────────────────
   SECTION HEADERS
───────────────────────────────────────── */
.section-hd {
  display: flex;
  align-items: stretch;
  margin-bottom: 18px;
}
.section-hd-label {
  background: var(--navy);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  padding: 6px 14px;
  white-space: nowrap;
}
.section-hd-line {
  flex: 1;
  border-bottom: 2px solid var(--navy);
  align-self: flex-end;
}

/* ─────────────────────────────────────────
   WELCOME BLOCK
───────────────────────────────────────── */
.welcome-block { margin-bottom: 32px; }
.welcome-block p { font-size: 14px; line-height: 1.8; color: #333; }

/* ─────────────────────────────────────────
   TAG CLOUD
───────────────────────────────────────── */
.topics-section { margin-bottom: 32px; }
.tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-cloud a {
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  border: 1.5px solid var(--blue);
  color: var(--blue);
  padding: 3px 10px;
  border-radius: 2px;
  transition: all 0.18s;
}
.tag-cloud a:hover {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}

/* ─────────────────────────────────────────
   ARTICLE CARDS
───────────────────────────────────────── */
.articles-section { margin-bottom: 28px; }
.articles-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}
.article-card {
  border: 1px solid var(--gray);
  overflow: hidden;
  transition: box-shadow 0.2s, transform 0.2s;
}
.article-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  transform: translateY(-2px);
}
.article-card img,
.article-card-img {
  width: 100%;
  height: 130px;
  object-fit: cover;
  display: block;
}
.article-card-body { padding: 11px 12px; }
.article-card-cat {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 4px;
}
.article-card-cat a { color: inherit; }
.article-card-cat a:hover { color: var(--navy); }
.article-card-title {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 6px;
}
.article-card-title a { color: inherit; }
.article-card-title a:hover { color: var(--teal); }
.article-card-date { font-size: 10.5px; color: var(--muted); font-weight: 300; }

/* Featured article list */
.article-featured {
  display: flex;
  gap: 14px;
  border: 1px solid var(--gray);
  padding: 12px;
  margin-bottom: 10px;
  transition: box-shadow 0.2s;
}
.article-featured:hover { box-shadow: 0 3px 12px rgba(0,0,0,0.08); }
.article-featured img {
  width: 108px;
  height: 78px;
  object-fit: cover;
  flex-shrink: 0;
}
.article-featured-placeholder {
  width: 108px;
  height: 78px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--navy), var(--teal));
}
.article-featured-body { flex: 1; }
.article-featured-cat {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 4px;
}
.article-featured-cat a { color: inherit; }
.article-featured-cat a:hover { color: var(--navy); }
.article-featured-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
  margin-bottom: 4px;
}
.article-featured-title a { color: inherit; }
.article-featured-title a:hover { color: var(--teal); }
.article-featured-meta { font-size: 10.5px; color: var(--muted); }
.article-featured-excerpt {
  font-size: 11.5px;
  color: #555;
  line-height: 1.5;
  margin-top: 4px;
}

/* Single post */
.single-title {
  font-size: 26px;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.3;
  margin-bottom: 10px;
}
.single-meta {
  font-size: 11px;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 20px;
}
.single-content {
  font-size: 14.5px;
  line-height: 1.85;
  color: #333;
}
.single-content h2,
.single-content h3,
.single-content h4 {
  font-weight: 700;
  color: var(--navy);
  margin: 28px 0 12px;
}
.single-content h2 { font-size: 20px; }
.single-content h3 { font-size: 17px; }
.single-content p { margin-bottom: 16px; }
.single-content img { margin: 20px 0; max-width: 100%; border-radius: 2px; }
.single-content a { color: var(--teal); font-weight: 600; }
.single-content a:hover { color: var(--navy); }
.single-content ul,
.single-content ol { padding-left: 24px; margin-bottom: 16px; }
.single-content li { margin-bottom: 6px; }
.single-content blockquote {
  border-left: 4px solid var(--teal);
  padding: 12px 20px;
  background: var(--light);
  margin: 20px 0;
  font-style: italic;
}

/* ─────────────────────────────────────────
   SIDEBAR
───────────────────────────────────────── */
.sidebar-widget { margin-bottom: 26px; }
.sidebar .section-hd { margin-bottom: 14px; }
.sidebar-search {
  display: flex;
  border: 1px solid var(--gray);
  overflow: hidden;
}
.sidebar-search input {
  flex: 1;
  padding: 8px 10px;
  border: none;
  font-family: 'Kanit', sans-serif;
  font-size: 12.5px;
  font-weight: 300;
  outline: none;
  background: #fff;
}
.sidebar-search button {
  background: var(--navy);
  border: none;
  color: #fff;
  padding: 0 12px;
  cursor: pointer;
  transition: background 0.2s;
}
.sidebar-search button:hover { background: var(--teal); }
.sidebar-search button svg { width: 14px; height: 14px; fill: currentColor; }
.sidebar .tag-cloud a { font-size: 9.5px; padding: 2px 8px; }
.year-list { list-style: none; }
.year-list li { border-bottom: 1px solid var(--gray); }
.year-list li:last-child { border-bottom: none; }
.year-list a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 4px;
  font-size: 12.5px;
  font-weight: 400;
  color: var(--text);
  transition: all 0.15s;
}
.year-list a:hover { color: var(--teal); padding-left: 10px; }
.year-list a span {
  background: var(--navy);
  color: #fff;
  font-size: 9.5px;
  padding: 1px 7px;
  border-radius: 2px;
  font-weight: 600;
}
.sidebar-cta {
  background: var(--navy);
  padding: 16px;
  border-top: 3px solid var(--teal);
}
.sidebar-cta h4 {
  font-size: 11px;
  letter-spacing: 1.2px;
  text-transform: uppercase;
  margin-bottom: 8px;
  color: var(--teal);
}
.sidebar-cta p {
  font-size: 11.5px;
  font-weight: 300;
  line-height: 1.6;
  color: rgba(255,255,255,0.75);
}
.sidebar-cta a.btn {
  display: inline-block;
  margin-top: 10px;
  background: var(--teal);
  color: #fff;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  padding: 7px 14px;
  border-radius: 2px;
  transition: background 0.2s;
}
.sidebar-cta a.btn:hover { background: var(--teal-dark); }

/* ─────────────────────────────────────────
   FOOTER
───────────────────────────────────────── */
.site-footer {
  background: var(--navy);
  color: rgba(255,255,255,0.65);
  padding: 36px 24px 16px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 28px;
}
.footer-col h4 {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.8px;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer-col p,
.footer-col li { font-size: 12px; font-weight: 300; line-height: 1.9; }
.footer-col ul { list-style: none; }
.footer-col a { color: rgba(255,255,255,0.6); transition: color 0.2s; }
.footer-col a:hover { color: var(--teal); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding-top: 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 10.5px;
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  color: rgba(255,255,255,0.4);
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 3px;
  transition: all 0.2s;
}
.footer-social a:hover { background: rgba(255,255,255,0.1); color: var(--teal); }
.footer-social svg { width: 14px; height: 14px; fill: currentColor; }

/* ─────────────────────────────────────────
   RESPONSIVE
───────────────────────────────────────── */
@media (max-width: 900px) {
  .primary-nav { display: none; flex-direction: column; width: 100%; }
  .primary-nav.open { display: flex; }
  .mobile-nav-toggle { display: flex; }
  .site-header { flex-wrap: wrap; gap: 10px; }
  .nav-item { width: 100%; }
  .nav-item > a { border-bottom: 1px solid var(--gray); border-left: 3px solid transparent; padding: 12px 16px; }
  .nav-item > a:hover,
  .nav-item > a.active { border-left-color: var(--teal); border-bottom-color: var(--gray); color: var(--teal); }
  .nav-dropdown {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border-top: none;
    display: none;
    background: var(--light);
  }
  .nav-item.open .nav-dropdown { display: block; }
  .articles-grid { grid-template-columns: 1fr 1fr; }
  .main-layout { flex-direction: column; }
  .sidebar { width: 100%; border-top: 1px solid var(--gray); }
  .footer-grid { grid-template-columns: 1fr; }
  .top-bar-left { display: none; }
}
@media (max-width: 500px) {
  .articles-grid { grid-template-columns: 1fr; }
  .hero { height: 260px; }
  .hero-logo-box { padding: 16px 20px; }
  .footer-bottom { flex-direction: column; gap: 12px; }
}

/* ─────────────────────────────────────────
   WP CORE ALIGNMENTS
───────────────────────────────────────── */
.alignleft  { float: left; margin: 0 24px 16px 0; }
.alignright { float: right; margin: 0 0 16px 24px; }
.aligncenter { display: block; margin: 20px auto; }
.alignwide  { margin-left: -26px; margin-right: -26px; }
.alignfull  { margin-left: -26px; margin-right: -272px; }

/* Pagination */
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--gray);
  font-size: 12px;
  color: var(--navy);
  border-radius: 2px;
  transition: all 0.15s;
}
.page-numbers:hover,
.page-numbers.current {
  background: var(--teal);
  border-color: var(--teal);
  color: #fff;
}
