/*
Theme Name: Digital Family
Theme URI: https://digitalfamily.mx
Description: Micrositio interno de Digital Family — blog y espacio de aprendizaje.
Version: 1.0
Author: Digital Family
Author URI: https://digitalfamily.mx
*/

/* ─── Variables ──────────────────────────────────────────────────── */
:root {
  --gradient: linear-gradient(90deg, #fbb03b 0%, #ed1c24 100%);
  --text-dark: #4A4A4A;
  --text-light: #7A7A7A;
  --footer-bg: #61615E;
  --footer-bottom: #F4F3EF;
  --font-main: 'Montserrat', sans-serif;
  --font-body: 'Open Sans', Arial, sans-serif;
  --header-h: 80px;
}

/* ─── Reset / Base ───────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

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

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-main);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-dark);
}

p { margin-bottom: 1em; }

a { text-decoration: none; color: inherit; transition: color .3s; }

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

ul { list-style: none; }

/* ─── Layout ─────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

.main-content {
  margin-top: var(--header-h);
  min-height: calc(100vh - var(--header-h) - 220px);
}

/* ─── Header ─────────────────────────────────────────────────────── */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-h);
  background: var(--gradient);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .12);
}

/* WordPress custom_logo outputs <a class="custom-logo-link"><img class="custom-logo"></a> */
.site-header .custom-logo-link img,
.site-header .header-logo img {
  height: 46px;
  width: auto;
}

.site-header .site-title-text {
  color: #fff;
  font-family: var(--font-main);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: .5px;
}

.btn-back {
  color: #fff;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  padding: 8px 20px;
  border: 2px solid rgba(255, 255, 255, .65);
  border-radius: 25px;
  white-space: nowrap;
}

.btn-back:hover {
  background: rgba(255, 255, 255, .15);
  border-color: #fff;
  color: #fff;
}

/* ─── Site intro logo (blog home) ────────────────────────────────── */
.site-intro {
  text-align: center;
  padding: 44px 24px 20px;
}

.site-intro-logo-wrap {
  display: inline-block;
}

.site-intro-logo-wrap svg {
  height: 70px;
  width: auto;
  display: block;
}

/* ─── Category nav (blog listing only) ───────────────────────────── */
.cat-nav {
  background: #F4F3EF;
  border-bottom: 1px solid rgba(0, 0, 0, .06);
}

.cat-nav .menu {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
  padding: 14px 24px;
  max-width: 1100px;
  margin: 0 auto;
}

.cat-nav .menu li a {
  display: block;
  color: var(--text-light);
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 20px;
  border: 1px solid transparent;
  text-transform: uppercase;
  letter-spacing: .5px;
  transition: all .3s;
}

.cat-nav .menu li a:hover,
.cat-nav .menu li.current-menu-item a {
  border-color: #ed1c24;
  color: #ed1c24;
}

/* ─── Page banner ────────────────────────────────────────────────── */
.page-banner {
  background: #F4F3EF;
  padding: 36px 24px;
  border-bottom: 1px solid rgba(0, 0, 0, .05);
}

.page-banner h1 {
  font-size: 30px;
  font-weight: 700;
}

.page-banner .accent-line {
  width: 50px;
  height: 4px;
  background: var(--gradient);
  border-radius: 2px;
  margin-top: 12px;
}

/* ─── Posts grid ─────────────────────────────────────────────────── */
.posts-section { padding: 40px 0 60px; }

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 28px;
}

/* ─── Post card ──────────────────────────────────────────────────── */
.post-card {
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .07);
  transition: transform .3s, box-shadow .3s;
  display: flex;
  flex-direction: column;
}

.post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .12);
}

.post-card .card-thumb img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

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

.post-card .card-cat {
  display: inline-block;
  background: var(--gradient);
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.post-card h2 {
  font-size: 17px;
  margin-bottom: 10px;
  flex: 1;
}

.post-card h2 a { color: var(--text-dark); }
.post-card h2 a:hover { color: #ed1c24; }

.post-card .card-excerpt {
  font-size: 14px;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 0;
}

.post-card .post-meta {
  font-size: 12px;
  color: var(--text-light);
  margin-bottom: 8px;
}

/* No posts message */
.no-posts {
  padding: 60px 20px;
  text-align: center;
  color: var(--text-light);
}

/* ─── Single post ────────────────────────────────────────────────── */
.single-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 50px 24px 70px;
}

.single-wrap h1.entry-title {
  font-size: 34px;
  line-height: 1.2;
  margin-bottom: 16px;
}

.single-wrap .post-meta {
  font-size: 13px;
  color: var(--text-light);
  margin-bottom: 28px;
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.single-wrap .entry-thumbnail {
  border-radius: 12px;
  overflow: hidden;
  margin-bottom: 32px;
}

.single-wrap .entry-thumbnail img {
  width: 100%;
  max-height: 460px;
  object-fit: cover;
}

.entry-content p { font-size: 17px; line-height: 1.75; }

.entry-content h2,
.entry-content h3 { margin: 1.6em 0 .5em; }

.entry-content img { border-radius: 8px; margin: 20px 0; }

.entry-content a { color: #ed1c24; }
.entry-content a:hover { text-decoration: underline; }

.entry-content ul,
.entry-content ol {
  padding-left: 1.4em;
  margin-bottom: 1em;
}

.entry-content ul { list-style: disc; }
.entry-content ol { list-style: decimal; }

.btn-back-post {
  display: inline-block;
  margin-top: 44px;
  color: var(--text-light);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 22px;
  border: 1px solid #ddd;
  border-radius: 25px;
  transition: all .3s;
}

.btn-back-post:hover {
  border-color: #ed1c24;
  color: #ed1c24;
}

/* ─── Static page ────────────────────────────────────────────────── */
.page-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 50px 24px 70px;
}

.page-wrap h1.entry-title { font-size: 32px; margin-bottom: 28px; }

/* ─── Comments ───────────────────────────────────────────────────── */
#comments {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 24px 60px;
  border-top: 1px solid #eee;
}

#comments h2#comments-title { font-size: 20px; margin-bottom: 24px; }

.commentlist { padding-left: 0; }

.comment-body {
  padding: 16px;
  background: #f8f8f8;
  border-radius: 10px;
  margin-bottom: 14px;
  font-size: 15px;
}

.comment-body .fn { font-weight: 700; }

.comment-body .reply { text-align: right; margin-top: 8px; }

.children { margin-left: 28px; }

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 15px;
  margin-top: 6px;
  margin-bottom: 16px;
}

.comment-form input[type="submit"] {
  background: var(--gradient);
  color: #fff;
  border: none;
  cursor: pointer;
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 15px;
  padding: 11px 30px;
  border-radius: 25px;
  transition: opacity .3s;
}

.comment-form input[type="submit"]:hover { opacity: .85; }

/* ─── Footer ─────────────────────────────────────────────────────── */
.site-footer {
  background: var(--footer-bg);
  color: #fff;
  margin-top: 60px;
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 40px;
  max-width: 1100px;
  margin: 0 auto;
  flex-wrap: wrap;
}

.footer-brand .custom-logo-link img,
.footer-brand .footer-logo img {
  height: 52px;
  width: auto;
}

.footer-brand .site-title-text {
  color: #fff;
  font-family: var(--font-main);
  font-size: 18px;
  font-weight: 700;
}

.footer-tagline {
  font-size: 13px;
  color: rgba(255, 255, 255, .65);
  margin-top: 8px;
}

.btn-back-footer {
  color: #fff;
  font-family: var(--font-main);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border: 2px solid rgba(255, 255, 255, .5);
  border-radius: 25px;
  white-space: nowrap;
  transition: all .3s;
}

.btn-back-footer:hover {
  background: rgba(255, 255, 255, .12);
  border-color: #fff;
  color: #fff;
}

.footer-bottom {
  background: var(--footer-bottom);
  text-align: center;
  padding: 14px 20px;
  font-size: 12px;
  color: var(--text-light);
  border-top: 1px solid rgba(0, 0, 0, .05);
}

/* ─── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .site-header { padding: 0 20px; }

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

  .single-wrap h1.entry-title { font-size: 26px; }

  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
  }
}

@media (max-width: 480px) {
  .btn-back .label { display: none; }
}
