
:root {
  --dp-orange: #ed6538;
  --dp-ink: #202124;
  --dp-muted: #6b7076;
  --dp-soft: #f5f4f1;
  --dp-line: #deddd8;
  --dp-dark: #17191b;
  --dp-cream: #f7eee6;
}

body.home { background: var(--dp-soft); color: var(--dp-ink); }

/* ColorMag Pro 5 header: retain the real logo and match the magazine mock-up. */
body.home .cm-header .cm-main-header .cm-row { display: flex; align-items: center; justify-content: space-between; gap: 34px; padding-block: 20px; }
body.home .cm-site-branding { flex: 1 1 auto; }
body.home .cm-site-branding .custom-logo-link {
  display: inline-flex;
  width: auto;
  height: auto;
  align-items: baseline;
  background: none;
  color: var(--dp-ink) !important;
  font: 700 35px/1 Georgia, serif;
  text-decoration: none;
}
body.home .cm-site-branding .custom-logo-link::before { content: "Dogsportal"; }
body.home .cm-site-branding .custom-logo-link::after { content: ".it"; color: var(--dp-orange); }
body.home .cm-site-branding .custom-logo-link img { display: none !important; }
body.home.wp-custom-logo .cm-site-title { display: none; }

/* Article header: the graphical logo already contains the publication name. */
body.single-post .cm-site-title { display: none; }
body.home .cm-site-description { max-width: 560px; margin-left: auto; color: var(--dp-muted) !important; font: 400 13px/1.45 Arial, sans-serif !important; text-align: right; }
body.home #cm-primary-nav,
body.home #cm-primary-nav .inner-wrap,
body.home #mega-menu-wrap-primary,
body.home #mega-menu-primary { background: var(--dp-dark) !important; }
body.home #cm-primary-nav { width: 100% !important; border: 0 !important; overflow: visible !important; }
body.home #cm-primary-nav .inner-wrap {
  width: min(1180px, calc(100% - 40px)) !important;
  max-width: none !important;
  margin-inline: auto !important;
  padding-inline: 0 !important;
}
body.home .cm-home-icon { display: none !important; }
body.home #mega-menu-wrap-primary { width: 100% !important; }
body.home #mega-menu-primary { display: flex !important; width: 100% !important; min-height: 52px !important; align-items: center !important; justify-content: center !important; gap: 2px; }
body.home #mega-menu-primary > li.mega-menu-item { flex: 0 1 auto; display: flex !important; align-items: stretch !important; }
body.home #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item > a.mega-menu-link {
  background: transparent !important;
  color: #fff !important;
  display: flex !important;
  min-height: 52px !important;
  align-items: center !important;
  padding: 0 14px !important;
  font: 800 12px/1.2 Arial, sans-serif !important;
  letter-spacing: .03em;
}
body.home #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item:last-child { margin-left: 0 !important; }
body.home #mega-menu-wrap-primary #mega-menu-primary > li.mega-menu-item:last-child > a.mega-menu-link {
  background: var(--dp-orange) !important;
}
body.home #colophon, body.home .footer-socket-wrapper { background: var(--dp-dark); color: #ddd; }
body.home #colophon a, body.home .footer-socket-wrapper a { color: #bbb; }

/* Desktop footer: turn the sponsor and legal area into a clean magazine ending. */
body.home .advertisement_above_footer {
  margin-top: 56px;
  padding: 34px 20px;
  background: #fff;
  border-top: 1px solid var(--dp-line);
}
body.home .advertisement_above_footer .inner-wrap { width: min(1180px, 100%); margin-inline: auto; }
body.home .advertisement_above_footer figure {
  max-width: 760px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  align-items: center;
  gap: 28px;
}
body.home .advertisement_above_footer figure img { width: 170px; max-height: 125px; object-fit: contain; }
body.home .advertisement_above_footer figcaption { margin: 0; color: var(--dp-ink); font: 700 20px/1.35 Georgia, serif; text-align: left; }

body.home #cm-footer,
body.home #cm-footer .cm-footer-cols,
body.home #cm-footer .cm-footer-bar { background: var(--dp-dark) !important; color: #d6d7d8 !important; }
body.home #cm-footer .cm-footer-cols { display: none; }
body.home #cm-footer .cm-footer-bar { padding: 42px 0 30px; border-top: 6px solid var(--dp-orange); }
body.home #cm-footer .cm-container { width: min(1180px, calc(100% - 40px)); max-width: none; margin-inline: auto; }
body.home #cm-footer .cm-footer-bar-area {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr);
  gap: 56px;
  align-items: start;
}
body.home #cm-footer .cm-footer-bar__2 { grid-column: 1; grid-row: 1; color: #bfc2c4; font-size: 13px; line-height: 1.75; }
body.home #cm-footer .cm-footer-bar__2::before {
  content: "";
  display: block;
  width: 230px;
  height: 96px;
  margin: 0 auto 22px;
  border-top: 4px solid var(--dp-orange);
  border-radius: 4px;
  background: #fff url("logos/dogsportal.svg") center/185px auto no-repeat;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}
body.home #cm-footer .cm-footer-bar__2 p { margin: 0 0 11px; }
body.home #cm-footer .cm-footer-bar__1 { grid-column: 2; grid-row: 1; }
body.home #cm-footer .cm-footer-menu ul {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 22px;
  margin: 20px 0 0;
  padding: 0;
}
body.home #cm-footer .cm-footer-menu li { margin: 0; padding: 0; list-style: none; border: 0; }
body.home #cm-footer a { color: #eef0f1 !important; text-decoration: none; }
body.home #cm-footer a:hover { color: var(--dp-orange) !important; }
body.home #cm-footer .cm-social-icons { margin-bottom: 16px; }

.dp-magazine-home { background: var(--dp-soft); color: var(--dp-ink); padding-top: 1px; }
.dp-magazine-home *, .dp-magazine-home *::before, .dp-magazine-home *::after { box-sizing: border-box; }
.dp-magazine-shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.dp-magazine-home a { color: inherit; text-decoration: none; }
.dp-magazine-kicker { color: var(--dp-orange); font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.dp-magazine-meta { color: var(--dp-muted); font-size: 12px; }

.dp-magazine-hero { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(280px, .9fr); gap: 18px; padding-top: 28px; }
.dp-magazine-lead, .dp-magazine-side-card { position: relative; isolation: isolate; overflow: hidden; background: #303638; color: #fff; }
.dp-magazine-lead { min-height: 430px; padding: 42px; display: flex; flex-direction: column; justify-content: flex-end; }
.dp-magazine-side { display: grid; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dp-magazine-side-card { min-height: 206px; padding: 24px; display: flex; flex-direction: column; justify-content: flex-end; border-top: 5px solid var(--dp-orange); }
.dp-magazine-cover { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; }
.dp-magazine-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 20%, rgba(12,15,16,.88) 100%); }
.dp-magazine-lead h1 { margin: 10px 0; color: #fff; font: 700 clamp(31px, 4vw, 46px)/1.04 Georgia, serif; }
.dp-magazine-side-card h2 { margin: 8px 0; color: #fff; font: 700 22px/1.15 Georgia, serif; }
.dp-magazine-hero .dp-magazine-meta { color: #e0e2e2; }

.dp-magazine-ticker { margin: 18px 0 38px; display: grid; grid-template-columns: auto minmax(0, 1fr); background: #fff; border: 1px solid var(--dp-line); }
.dp-magazine-ticker strong { padding: 13px 16px; background: var(--dp-orange); color: #fff; }
.dp-magazine-ticker a { padding: 13px 16px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.dp-magazine-section { margin-top: 42px; }
.dp-magazine-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 18px; padding-bottom: 9px; border-bottom: 3px solid var(--dp-ink); }
.dp-magazine-heading h2 { margin: 0; font: 700 28px/1.1 Georgia, serif; }
.dp-magazine-heading a { color: var(--dp-orange); font-size: 12px; font-weight: 800; }
.dp-magazine-news-grid { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 28px; }
.dp-magazine-feature { overflow: hidden; background: #fff; }
.dp-magazine-feature img { display: block; width: 100%; height: 265px; object-fit: cover; }
.dp-magazine-feature-copy { padding: 22px; }
.dp-magazine-feature h3 { margin: 8px 0; font: 700 29px/1.12 Georgia, serif; }
.dp-magazine-list article { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 16px; margin-bottom: 16px; padding-bottom: 16px; border-bottom: 1px solid var(--dp-line); }
.dp-magazine-list img { width: 130px; height: 92px; object-fit: cover; background: #9aa0a0; }
.dp-magazine-list h3 { margin: 5px 0; font: 700 18px/1.2 Georgia, serif; }

.dp-magazine-rubrics { margin-top: 48px; padding: 38px 0 44px; background: var(--dp-dark); color: #fff; }
.dp-magazine-rubrics .dp-magazine-heading { border-color: #fff; }
.dp-magazine-rubrics .dp-magazine-heading h2 { color: #fff; }
.dp-magazine-rubric-grid { display: grid; grid-template-columns: 1.2fr repeat(3, 1fr); gap: 14px; }
.dp-magazine-rubric { min-height: 235px; padding: 22px; display: flex; flex-direction: column; justify-content: flex-end; background: #2d3032; border-top: 6px solid var(--dp-orange); }
.dp-magazine-rubric h3 { margin: 8px 0; color: #fff; font: 700 22px/1.1 Georgia, serif; }
.dp-magazine-rubric p { margin-bottom: 0; color: #d6d7d8; font-size: 13px; line-height: 1.5; }

.dp-magazine-adoptions { margin-top: 48px; }
.dp-magazine-adoptions .dp-magazine-heading { align-items: center; }
.dp-magazine-adoptions .dp-magazine-heading h2 { margin-top: 3px; }
.dp-magazine-adoption-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.dp-magazine-adoption-grid article { overflow: hidden; background: #fff; border-bottom: 4px solid var(--dp-orange); }
.dp-magazine-adoption-image { display: block; height: 190px; background: #353b3d; }
.dp-magazine-adoption-image img { width: 100%; height: 100%; object-fit: cover; }
.dp-magazine-adoption-copy { padding: 18px; }
.dp-magazine-adoption-copy h3 { margin: 7px 0 0; font: 700 21px/1.18 Georgia, serif; }

.dp-magazine-lower { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(270px, .85fr); gap: 32px; padding-bottom: 70px; }
.dp-magazine-guide-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.dp-magazine-guide { min-height: 170px; padding: 20px; background: #fff; border-top: 4px solid var(--dp-orange); }
.dp-magazine-guide h3 { margin: 8px 0; font: 700 20px/1.18 Georgia, serif; }
.dp-magazine-academy { padding: 25px; background: var(--dp-cream); border: 1px solid #ead7c8; }
.dp-magazine-academy-logo { display: block; width: min(240px, 100%); height: 92px; margin: 0 auto 15px; object-fit: contain; mix-blend-mode: multiply; }
.dp-magazine-academy h2 { margin-top: 0; font: 700 26px/1.1 Georgia, serif; }
.dp-magazine-events { margin-top: 18px; border-top: 1px solid #dfcbbb; }
.dp-magazine-events article { padding: 17px 0; border-bottom: 1px solid #dfcbbb; }
.dp-magazine-events time { display: block; margin-bottom: 5px; color: var(--dp-orange); font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.dp-magazine-events h3 { margin: 0; font: 700 18px/1.2 Georgia, serif; }
.dp-magazine-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.dp-magazine-chips a { padding: 8px 10px; background: #fff; border: 1px solid var(--dp-line); font-size: 12px; }
.dp-magazine-empty { min-height: 90px; background: linear-gradient(135deg, #5e6668, #303638); }

@media (max-width: 900px) {
  .dp-magazine-hero, .dp-magazine-news-grid, .dp-magazine-lower { grid-template-columns: 1fr; }
  .dp-magazine-side { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: none; }
  .dp-magazine-rubric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dp-magazine-adoption-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  body.home .cm-header .cm-main-header .cm-row {
    justify-content: center;
    gap: 12px;
    padding-block: 12px;
    text-align: center;
  }
  body.home .cm-site-branding {
    display: flex;
    flex: 1 1 100%;
    width: 100%;
    justify-content: center;
  }
  body.home .cm-site-branding .custom-logo-link { margin-inline: auto; font-size: 30px; }
  body.home .cm-site-description { display: none; }
  body.home #cm-primary-nav { background: #fff !important; }
  body.home #cm-primary-nav .inner-wrap { width: 100% !important; }
  .dp-magazine-shell { width: min(100% - 28px, 1180px); }
  .dp-magazine-hero { padding-top: 14px; }
  .dp-magazine-lead { min-height: 360px; padding: 24px; }
  .dp-magazine-side { grid-template-columns: 1fr; }
  .dp-magazine-side-card { min-height: 190px; }
  .dp-magazine-news-grid, .dp-magazine-guide-grid, .dp-magazine-rubric-grid, .dp-magazine-adoption-grid { grid-template-columns: 1fr; }
  .dp-magazine-rubrics { margin-top: 34px; }
  .dp-magazine-list article { grid-template-columns: 105px minmax(0, 1fr); gap: 12px; }
  .dp-magazine-list img { width: 105px; height: 82px; }
  .dp-magazine-heading { align-items: center; }
  body.home .advertisement_above_footer { margin-top: 34px; padding: 28px 16px; }
  body.home .advertisement_above_footer figure { grid-template-columns: 1fr; gap: 14px; text-align: center; }
  body.home .advertisement_above_footer figure img { margin-inline: auto; }
  body.home .advertisement_above_footer figcaption { text-align: center; font-size: 18px; }
  body.home #cm-footer .cm-container { width: min(100% - 32px, 1180px); }
  body.home #cm-footer .cm-footer-bar-area { grid-template-columns: 1fr; gap: 28px; }
  body.home #cm-footer .cm-footer-bar__2, body.home #cm-footer .cm-footer-bar__1 { grid-column: 1; grid-row: auto; }
  body.home #cm-footer .cm-footer-menu ul { grid-template-columns: 1fr; }
}
