/*
Theme Name: DataHost Blog
Theme URI: https://datahostonline.com
Author: DataHost Online
Author URI: https://datahostonline.com
Description: Tema de blog personalizado para DataHost Online. Diseñado para artículos sobre hosting, dominios, servidores y tecnología web, con un diseño limpio, rápido y orientado a conversión.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: datahost-blog
Tags: blog, one-column, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ==========================================================================
   Reset & base
   ========================================================================== */
* { box-sizing: border-box; }

:root{
  /* Paleta de datahostonline.com */
  --dh-primary: #102a36;      /* navy — texto de marca, enlaces */
  --dh-primary-dark: #0b1d35; /* navy oscuro — hover */
  --dh-ink: #0b1521;          /* casi negro — títulos, header/footer */
  --dh-cta: #d8b45a;          /* dorado — botones principales (como "Diagnóstico gratis") */
  --dh-cta-dark: #c49f45;     /* dorado oscuro — hover de botones */
  --dh-lime: #d9f98a;         /* verde lima — acentos y highlights */
  --dh-body: #50646d;
  --dh-muted: #627680;
  --dh-border: #d9e6eb;
  --dh-bg: #ffffff;
  --dh-bg-soft: #f2f6f7;
  --dh-radius: 10px;
  --dh-max-width: 1140px;
  --dh-font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

body {
  margin: 0;
  font-family: var(--dh-font);
  color: var(--dh-body);
  background: var(--dh-bg);
  line-height: 1.65;
  font-size: 17px;
}

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

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

h1, h2, h3, h4, h5, h6 {
  color: var(--dh-ink);
  line-height: 1.25;
  font-weight: 700;
  margin: 0 0 .6em;
}

h1 { font-size: 2.4rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1.2em; }

ul, ol { padding-left: 1.4em; }

.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(1px,1px,1px,1px);
}

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

/* ==========================================================================
   Top bar
   ========================================================================== */
.dh-topbar {
  background: var(--dh-ink);
  color: #a6bdc6;
  font-size: .85rem;
}
.dh-topbar .container { display: flex; justify-content: space-between; align-items: center; padding-top: 8px; padding-bottom: 8px; }
.dh-topbar a { color: #a6bdc6; }
.dh-topbar a:hover { color: var(--dh-lime); }

/* ==========================================================================
   Header
   ========================================================================== */
.dh-header {
  border-bottom: 1px solid var(--dh-border);
  background: var(--dh-bg);
  position: sticky;
  top: 0;
  z-index: 50;
}

.dh-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0;
  gap: 24px;
}

.dh-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--dh-ink);
}
.dh-logo:hover { text-decoration: none; color: var(--dh-ink); }
.dh-logo img { max-height: 40px; }
.dh-logo .dh-logo-dot { color: var(--dh-cta); }

.dh-nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--dh-border);
  border-radius: 8px;
  padding: 8px 10px;
  cursor: pointer;
}

.dh-primary-nav ul {
  list-style: none;
  display: flex;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.dh-primary-nav a {
  color: var(--dh-body);
  font-weight: 600;
  font-size: .95rem;
}
.dh-primary-nav a:hover { color: var(--dh-primary); text-decoration: none; }

.dh-header-cta {
  background: var(--dh-cta);
  color: var(--dh-ink) !important;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: .9rem;
  white-space: nowrap;
}
.dh-header-cta:hover { background: var(--dh-cta-dark); color: var(--dh-ink) !important; text-decoration: none; }

/* ==========================================================================
   Hero (front page)
   ========================================================================== */
.dh-hero {
  background: var(--dh-ink);
  color: #fff;
  padding: 64px 0;
}
.dh-hero h1 { color: #fff; font-size: 2.6rem; max-width: 720px; }
.dh-hero p { color: #a6bdc6; font-size: 1.15rem; max-width: 620px; }
.dh-hero .dh-btn { margin-top: 8px; }

.dh-btn {
  display: inline-block;
  background: var(--dh-cta);
  color: var(--dh-ink) !important;
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: 700;
}
.dh-btn:hover { text-decoration: none; background: var(--dh-cta-dark); }

/* ==========================================================================
   Layout
   ========================================================================== */
.dh-layout {
  display: grid;
  grid-template-columns: 2.2fr 1fr;
  gap: 48px;
  padding: 48px 0;
}

.dh-section-title {
  font-size: 1.5rem;
  margin-bottom: 24px;
  border-left: 4px solid var(--dh-lime);
  padding-left: 12px;
}

/* ==========================================================================
   Post cards / archive grid
   ========================================================================== */
.dh-post-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}

.dh-card {
  background: var(--dh-bg);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: box-shadow .2s ease, transform .2s ease;
}
.dh-card:hover { box-shadow: 0 12px 24px rgba(16,24,40,.08); transform: translateY(-2px); }

.dh-card-thumb {
  aspect-ratio: 16/9;
  background: var(--dh-bg-soft);
  overflow: hidden;
}
.dh-card-thumb img { width: 100%; height: 100%; object-fit: cover; }

.dh-card-body { padding: 18px 20px 22px; flex: 1; display: flex; flex-direction: column; }

.dh-cat-badge {
  display: inline-block;
  background: rgba(216,180,90,.16);
  color: var(--dh-ink);
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  width: fit-content;
}

.dh-card h2, .dh-card h3 { font-size: 1.15rem; margin-bottom: 8px; }
.dh-card h2 a, .dh-card h3 a { color: var(--dh-ink); }
.dh-card h2 a:hover, .dh-card h3 a:hover { color: var(--dh-primary); text-decoration: none; }

.dh-excerpt { color: var(--dh-muted); font-size: .93rem; margin-bottom: 14px; }

.dh-meta {
  font-size: .82rem;
  color: var(--dh-muted);
  margin-top: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}
.dh-meta a { color: var(--dh-muted); }

.dh-featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 0;
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  overflow: hidden;
}
.dh-featured .dh-card-thumb { aspect-ratio: auto; height: 100%; }
.dh-featured .dh-card-body { padding: 28px 30px; justify-content: center; }
.dh-featured h2 { font-size: 1.6rem; }

/* ==========================================================================
   Single post
   ========================================================================== */
.dh-post-header { margin-bottom: 24px; }
.dh-post-header h1 { font-size: 2.1rem; }
.dh-post-thumb { border-radius: var(--dh-radius); overflow: hidden; margin-bottom: 28px; }

.dh-post-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--dh-muted);
  font-size: .9rem;
  margin-bottom: 20px;
}
.dh-post-meta img.avatar { width: 32px; height: 32px; border-radius: 50%; }

.dh-content { font-size: 1.05rem; }
.dh-content h2 { margin-top: 1.6em; }
.dh-content h3 { margin-top: 1.4em; }
.dh-content blockquote {
  margin: 1.6em 0;
  padding: 4px 20px;
  border-left: 4px solid var(--dh-lime);
  background: var(--dh-bg-soft);
  color: var(--dh-body);
  font-style: italic;
}
.dh-content pre {
  background: var(--dh-ink);
  color: #e2e8f0;
  padding: 16px 18px;
  border-radius: 8px;
  overflow-x: auto;
  font-size: .88rem;
}
.dh-content code {
  background: var(--dh-bg-soft);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: .9em;
}
.dh-content pre code { background: none; padding: 0; }
.dh-content img { border-radius: 8px; margin: 1.2em 0; }
.dh-content table { width: 100%; border-collapse: collapse; margin: 1.4em 0; }
.dh-content table th, .dh-content table td { border: 1px solid var(--dh-border); padding: 10px 12px; text-align: left; }
.dh-content table th { background: var(--dh-bg-soft); }

.dh-tags { margin: 30px 0; display: flex; flex-wrap: wrap; gap: 8px; }
.dh-tags a {
  background: var(--dh-bg-soft);
  border: 1px solid var(--dh-border);
  color: var(--dh-body);
  font-size: .82rem;
  padding: 5px 12px;
  border-radius: 999px;
}
.dh-tags a:hover { border-color: var(--dh-primary); color: var(--dh-primary); text-decoration: none; }

.dh-share { display: flex; gap: 10px; margin: 24px 0; }
.dh-share a {
  border: 1px solid var(--dh-border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: .85rem;
  color: var(--dh-body);
}
.dh-share a:hover { border-color: var(--dh-primary); color: var(--dh-primary); text-decoration: none; }

.dh-author-box {
  display: flex;
  gap: 18px;
  background: var(--dh-bg-soft);
  border-radius: var(--dh-radius);
  padding: 24px;
  margin: 36px 0;
}
.dh-author-box img { width: 64px; height: 64px; border-radius: 50%; }
.dh-author-box h4 { margin-bottom: 4px; }
.dh-author-box p { margin: 0; color: var(--dh-muted); font-size: .92rem; }

.dh-related { margin: 48px 0; }

.dh-cta-box {
  background: linear-gradient(135deg, var(--dh-ink), var(--dh-primary));
  color: #fff;
  border-radius: var(--dh-radius);
  padding: 28px 26px;
  margin: 40px 0;
}
.dh-cta-box h3 { color: #fff; margin-bottom: 8px; }
.dh-cta-box p { color: #a6bdc6; font-size: .92rem; }

/* ==========================================================================
   Pagination
   ========================================================================== */
.dh-pagination {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 40px;
}
.dh-pagination a, .dh-pagination span {
  border: 1px solid var(--dh-border);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: .9rem;
  color: var(--dh-body);
}
.dh-pagination a:hover { border-color: var(--dh-primary); color: var(--dh-primary); text-decoration: none; }
.dh-pagination .current { background: var(--dh-primary); color: #fff; border-color: var(--dh-primary); }

/* ==========================================================================
   Sidebar / widgets
   ========================================================================== */
.dh-widget {
  background: var(--dh-bg);
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 22px;
  margin-bottom: 28px;
}
.dh-widget h3 {
  font-size: 1.05rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--dh-bg-soft);
}
.dh-widget ul { list-style: none; padding: 0; margin: 0; }
.dh-widget li { padding: 8px 0; border-bottom: 1px solid var(--dh-bg-soft); }
.dh-widget li:last-child { border-bottom: none; }
.dh-widget li a { color: var(--dh-body); }
.dh-widget li a:hover { color: var(--dh-primary); text-decoration: none; }

.dh-search-form { display: flex; gap: 8px; }
.dh-search-form input[type="search"] {
  flex: 1;
  border: 1px solid var(--dh-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: .92rem;
}
.dh-search-form button {
  background: var(--dh-primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 0 16px;
  cursor: pointer;
  font-weight: 700;
}
.dh-search-form button:hover { background: var(--dh-primary-dark); }

.dh-sidebar-cta {
  background: var(--dh-bg-soft);
  border: 1px dashed var(--dh-cta);
  border-radius: var(--dh-radius);
  padding: 22px;
  text-align: center;
  margin-bottom: 28px;
}
.dh-sidebar-cta h3 { font-size: 1.05rem; }
.dh-sidebar-cta .dh-btn { margin-top: 10px; }

/* ==========================================================================
   Comments
   ========================================================================== */
.dh-comments { margin-top: 48px; }
.comment-list { list-style: none; margin: 0; padding: 0; }
.comment-list .children { list-style: none; padding-left: 40px; }
.comment-body {
  border: 1px solid var(--dh-border);
  border-radius: var(--dh-radius);
  padding: 18px 20px;
  margin-bottom: 16px;
}
.comment-author { font-weight: 700; color: var(--dh-ink); }
.comment-meta { font-size: .82rem; color: var(--dh-muted); margin-bottom: 8px; }
.comment-reply-link {
  font-size: .82rem;
  border: 1px solid var(--dh-border);
  border-radius: 6px;
  padding: 3px 10px;
}
.comment-form input, .comment-form textarea {
  width: 100%;
  border: 1px solid var(--dh-border);
  border-radius: 8px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: .95rem;
  margin-bottom: 12px;
}
.comment-form textarea { min-height: 120px; }
.comment-form .form-submit input {
  width: auto;
  background: var(--dh-primary);
  color: #fff;
  border: none;
  font-weight: 700;
  cursor: pointer;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.dh-footer {
  background: var(--dh-ink);
  color: #a6bdc6;
  margin-top: 60px;
  padding: 56px 0 28px;
}
.dh-footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.dh-footer h4 { color: #fff; font-size: 1rem; margin-bottom: 16px; }
.dh-footer p { color: #94a3b8; font-size: .9rem; }
.dh-footer ul { list-style: none; padding: 0; margin: 0; }
.dh-footer li { margin-bottom: 10px; }
.dh-footer a { color: #a6bdc6; font-size: .9rem; }
.dh-footer a:hover { color: var(--dh-lime); text-decoration: none; }
.dh-footer-bottom {
  border-top: 1px solid #1a2e3d;
  padding-top: 20px;
  display: flex;
  justify-content: space-between;
  font-size: .85rem;
  color: #627680;
}

/* ==========================================================================
   Misc
   ========================================================================== */
.dh-breadcrumbs { font-size: .85rem; color: var(--dh-muted); margin-bottom: 18px; }
.dh-breadcrumbs a { color: var(--dh-muted); }

.dh-page-title { margin-bottom: 8px; }
.dh-page-desc { color: var(--dh-muted); margin-bottom: 32px; }

.alignwide { max-width: 900px; }
.alignfull { width: 100%; max-width: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .dh-layout { grid-template-columns: 1fr; }
  .dh-post-grid { grid-template-columns: 1fr; }
  .dh-featured { grid-template-columns: 1fr; }
  .dh-footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  body { font-size: 16px; }
  .dh-hero h1 { font-size: 1.9rem; }
  .dh-nav-toggle { display: inline-flex; }
  .dh-primary-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--dh-bg);
    border-bottom: 1px solid var(--dh-border);
    padding: 16px 24px;
  }
  .dh-primary-nav.is-open { display: block; }
  .dh-primary-nav ul { flex-direction: column; gap: 4px; }
  .dh-primary-nav li { padding: 10px 0; border-bottom: 1px solid var(--dh-bg-soft); }
  .dh-header-cta { display: none; }
  .dh-footer-grid { grid-template-columns: 1fr; }
  .dh-footer-bottom { flex-direction: column; gap: 8px; }
}
