/* SERPjacker CMS v3 - Design 07: Magazine Classic */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-body, serif);
  line-height: 1.6;
  background-color: var(--color-light, #ffffff);
  color: var(--color-dark, #333333);
}

a {
  color: var(--color-accent, #c0392b);
  text-decoration: none;
  transition: color 0.3s ease;
}

a:hover {
  color: var(--color-dark, #333333);
}

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

h1, h2, h3, h4 {
  font-family: var(--font-heading, serif);
  font-weight: bold;
  margin-bottom: 0.5em;
}

/* LAYOUT */
.container {
  max-width: var(--max-width, 1200px);
  margin: 0 auto;
  padding: 0 15px;
}

/* HEADER */
.site-header {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-muted, #eeeeee);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.site-logo img {
  max-height: 50px;
}

.site-logo .logo-text {
  font-family: var(--font-logo, serif);
  font-size: var(--logo-font-size, 2rem);
  font-weight: var(--logo-font-weight, bold);
  color: var(--color-dark, #333333);
}

/* NAV */
.main-nav {
  display: none; /* Hidden on mobile */
}

.nav-list {
  list-style: none;
  display: flex;
}

.nav-item a {
  padding: 0.5rem 1rem;
  text-transform: uppercase;
  font-weight: bold;
  color: var(--color-dark, #333333);
}

.nav-item a:hover {
  color: var(--color-accent, #c0392b);
}

.nav-item.active a {
  color: var(--color-accent, #c0392b);
  border-bottom: 2px solid var(--color-accent, #c0392b);
}

/* DROPDOWN */
.has-dropdown {
  position: relative;
}

.dropdown {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  background-color: var(--color-light, #ffffff);
  border: 1px solid var(--color-muted, #eeeeee);
  border-radius: var(--border-radius, 4px);
  list-style: none;
  min-width: 200px;
  z-index: 1000;
}

.has-dropdown:hover .dropdown {
  display: block;
}

.dropdown li a {
  padding: 0.75rem 1.5rem;
  display: block;
  white-space: nowrap;
}

.dropdown li a:hover {
  background-color: var(--color-muted, #eeeeee);
}

.dropdown-divider {
  height: 1px;
  background-color: var(--color-muted, #eeeeee);
  margin: 0.5rem 0;
}

/* HAMBURGER */
.menu-toggle {
  display: block; /* Visible on mobile */
  cursor: pointer;
  background: none;
  border: none;
  width: 30px;
  height: 22px;
  position: relative;
  z-index: 1001;
}

.menu-toggle span {
  display: block;
  position: absolute;
  height: 3px;
  width: 100%;
  background: var(--color-dark, #333333);
  border-radius: 3px;
  opacity: 1;
  left: 0;
  transform: rotate(0deg);
  transition: .25s ease-in-out;
}

.menu-toggle span:nth-child(1) { top: 0px; }
.menu-toggle span:nth-child(2) { top: 9px; }
.menu-toggle span:nth-child(3) { top: 18px; }

.menu-toggle.active span:nth-child(1) {
  top: 9px;
  transform: rotate(135deg);
}

.menu-toggle.active span:nth-child(2) { opacity: 0; left: -30px; }

.menu-toggle.active span:nth-child(3) {
  top: 9px;
  transform: rotate(-135deg);
}

/* MOBILE NAV */
.mobile-nav-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  opacity: 0;
  visibility: hidden;
  transition: opacity .35s, visibility .35s;
  z-index: 998;
}

.mobile-nav-overlay.active {
  opacity: 1;
  visibility: visible;
}

.mobile-nav {
  position: fixed;
  top: 0;
  right: -280px; /* Start off-screen */
  width: 280px;
  height: 100%;
  background: var(--color-light, #ffffff);
  padding: 2rem;
  transition: right 0.3s ease-in-out;
  z-index: 999;
}

.mobile-nav.active {
  right: 0;
}

.mobile-nav .nav-list {
  flex-direction: column;
}

.mobile-nav .nav-item a {
  display: block;
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-muted, #eeeeee);
}

.mobile-nav .dropdown {
  position: static;
  display: none;
  border: none;
  background: #f9f9f9;
  padding-left: 1rem;
}

.mobile-nav .has-dropdown:hover .dropdown {
    display: block;
}

.mobile-nav .dropdown li a {
  padding: 0.5rem 0;
}

/* MAIN */
.site-main {
  padding: 2rem 0;
}

/* BREADCRUMBS */
.breadcrumbs {
  margin-bottom: 1.5rem;
  font-size: 0.9em;
  color: var(--color-muted, #95a5a6);
}

.breadcrumbs a {
  color: var(--color-muted, #95a5a6);
}

.breadcrumbs a:hover {
  color: var(--color-accent, #c0392b);
}

.breadcrumbs .sep {
  margin: 0 0.5em;
}

/* FEATURED GRID */
.featured-grid {
  margin-bottom: 2rem;
}

.featured-main {
  position: relative;
}

.featured-card {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius, 4px);
}

.featured-image img {
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.featured-card:hover .featured-image img {
  transform: scale(1.05);
}

.featured-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 2rem;
  background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
  color: var(--color-light, #ffffff);
}

.featured-category {
  font-family: var(--font-body, serif);
  font-variant: small-caps;
  font-size: 1rem;
  font-weight: bold;
  color: var(--color-light, #ffffff);
  margin-bottom: 0.5rem;
}

.featured-title {
  font-size: 1.5rem;
  line-height: 1.2;
}

.featured-main .featured-title {
  font-size: 2rem;
}

.featured-excerpt {
  display: none; /* Hidden on mobile */
}

/* CATEGORY SECTIONS */
.category-section {
  margin-bottom: 2rem;
  padding-top: 1.5rem;
  border-top: 5px solid var(--color-dark, #333333);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.5rem;
}

.section-title {
  font-family: var(--font-heading, serif);
  font-size: 1.8rem;
}

.see-all {
  font-family: var(--font-body, serif);
  font-variant: small-caps;
  font-weight: bold;
}

/* POST CARDS */
.posts-grid {
  display: grid;
  gap: 1.5rem;
}

.post-card {
  background: var(--color-light, #ffffff);
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.post-card:hover {
  /* No hover effect needed for this layout */
}

.post-card-image {
  flex: 0 0 100px;
}

.post-card-image img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: var(--border-radius, 4px);
}

.post-card-body {
  flex: 1;
}

.post-card-title {
  font-size: 1.1rem;
  font-weight: bold;
  margin-bottom: 0.25rem;
}

.post-card-excerpt {
  font-size: 0.9rem;
  color: var(--color-muted, #7f8c8d);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-date {
  font-size: 0.8rem;
  color: var(--color-muted, #95a5a6);
  margin-top: 0.5rem;
  font-family: var(--font-body, serif);
  font-variant: small-caps;
}

/* SINGLE POST */
.single-post.has-sidebar { /* Styles applied via media query */ }
.single-post.sidebar-left { /* Styles applied via media query */ }
.single-post.sidebar-left .sidebar { /* Styles applied via media query */ }

.post-header {
  margin-bottom: 2rem;
  text-align: center;
}

.post-category {
  font-family: var(--font-body, serif);
  font-variant: small-caps;
  font-weight: bold;
  font-size: 1.1rem;
  color: var(--color-accent, #c0392b);
  margin-bottom: 0.5rem;
}

.post-title {
  font-size: 2.5rem;
  line-height: 1.1;
  margin-bottom: 1rem;
}

.post-date {
  font-size: 0.9rem;
  color: var(--color-muted, #95a5a6);
}

.post-featured-image {
  margin-bottom: 2rem;
}

.post-featured-image img {
  width: 100%;
  border-radius: var(--border-radius, 4px);
}

.post-body {
  font-size: 1.1rem;
  line-height: 1.8;
}

.post-body h2, .post-body h3 {
  margin-top: 2em;
  margin-bottom: 1em;
  padding-bottom: 0.3em;
  border-bottom: 1px solid var(--color-muted, #eeeeee);
}

.post-body p {
  margin-bottom: 1.5em;
}

.post-body ul, .post-body ol {
  margin-bottom: 1.5em;
  padding-left: 1.5em;
}

.post-body img {
  margin: 2em 0;
}

/* TAGS */
.post-tags {
  margin: 2rem 0;
}

.tag {
  display: inline-block;
  background: var(--color-muted, #eeeeee);
  color: var(--color-dark, #333333);
  padding: 0.3rem 0.8rem;
  margin-right: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: var(--border-radius, 4px);
  font-size: 0.8rem;
  font-family: var(--font-body, serif);
  font-variant: small-caps;
}

.tag:hover {
  background: var(--color-accent, #c0392b);
  color: var(--color-light, #ffffff);
}

/* INTERNAL LINKS */
.internal-links {
  background: #f9f9f9;
  padding: 1.5rem;
  margin: 2rem 0;
  border-left: 4px solid var(--color-accent, #c0392b);
}

.internal-links h3 {
  margin-top: 0;
  margin-bottom: 1rem;
}

.internal-links ul {
  list-style: none;
  padding: 0;
}

.internal-links li a {
  padding: 0.25rem 0;
  display: block;
}

/* SIDEBAR */
.sidebar {
  margin-top: 2rem;
}

.sidebar-widget {
  margin-bottom: 2rem;
  padding: 1.5rem;
  background: #f9f9f9;
}

.sidebar-widget h3 {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-dark, #333333);
}

.widget-related .related-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.widget-related .related-item img {
  width: 60px;
  height: 60px;
  object-fit: cover;
  border-radius: var(--border-radius, 4px);
}

.widget-related .related-item span {
  font-weight: bold;
  font-size: 0.9rem;
}

.widget-categories ul {
  list-style: none;
  padding: 0;
}

.widget-categories li {
  border-bottom: 1px solid var(--color-muted, #eeeeee);
}

.widget-categories a {
  display: block;
  padding: 0.5rem 0;
}

.widget-banner img {
  width: 100%;
}

/* STATIC PAGE */
.static-page .page-title {
  font-size: 2.5rem;
  margin-bottom: 2rem;
  border-bottom: 5px solid var(--color-dark, #333333);
  padding-bottom: 0.5rem;
}

.page-body {
  font-size: 1.1rem;
  line-height: 1.8;
}

.page-body h2 {
  font-size: 1.8rem;
  margin-top: 2em;
}

.page-body p {
  margin-bottom: 1.5em;
}

/* CATEGORY PAGE */
.category-header {
  text-align: center;
  padding: 2rem 0;
  margin-bottom: 2rem;
  border-top: 5px solid var(--color-dark, #333333);
  border-bottom: 5px solid var(--color-dark, #333333);
}

.category-title {
  font-size: 3rem;
  font-variant: small-caps;
}

.category-description {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 1rem auto 0;
  color: var(--color-muted, #7f8c8d);
}

/* BANNERS */
.banner {
  margin: 2rem 0;
}

.banner img {
  width: 100%;
}

/* ENTITY */
.entity-hero {
  padding: 3rem 1rem;
  text-align: center;
  background-color: var(--color-dark, #333333);
  color: var(--color-light, #ffffff);
}

.entity-title { font-size: 2.5rem; }
.entity-subtitle { font-size: 1.2rem; color: var(--color-muted, #eeeeee); }

.sections-grid {
  display: grid;
  gap: 1.5rem;
  padding: 2rem 0;
}

.section-card {
  border: 1px solid var(--color-muted, #eeeeee);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
}

.section-card:hover {
  border-color: var(--color-accent, #c0392b);
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.section-card h2 { font-size: 1.5rem; }
.section-desc { color: var(--color-muted, #7f8c8d); }

/* LOCAL */
.local-hero {
  padding: 3rem 1rem;
  text-align: center;
  background-color: var(--color-accent, #c0392b);
  color: var(--color-light, #ffffff);
}

.hero-title { font-size: 2.5rem; }
.hero-subtitle { font-size: 1.2rem; margin-bottom: 1.5rem; }
.hero-cta { margin-top: 1.5rem; }

.btn {
  padding: 0.8rem 1.5rem;
  border-radius: var(--border-radius, 4px);
  font-weight: bold;
  display: inline-block;
}

.btn-primary {
  background-color: var(--color-dark, #333333);
  color: var(--color-light, #ffffff);
}

.btn-primary:hover {
  background-color: #000;
  color: var(--color-light, #ffffff);
}

.local-services, .local-locations, .local-blog {
  padding: 2rem 0;
  border-top: 5px solid var(--color-dark, #333333);
}

.services-grid, .locations-grid {
  display: grid;
  gap: 1.5rem;
}

.service-card {
  border: 1px solid var(--color-muted, #eeeeee);
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.service-card:hover {
  border-left: 5px solid var(--color-accent, #c0392b);
}

.service-card h3 { font-size: 1.3rem; margin-top: 0; }

.location-link {
  display: block;
  padding: 1rem;
  background: #f9f9f9;
  text-align: center;
  font-weight: bold;
  transition: all 0.3s ease;
}

.location-link:hover {
  background: var(--color-accent, #c0392b);
  color: var(--color-light, #ffffff);
}

/* TILES */
.tiles-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr 1fr;
}

.tile-card {
  position: relative;
  overflow: hidden;
}

.tile-card:hover .tile-image img {
  transform: scale(1.1);
}

.tile-image img {
  transition: transform 0.4s ease;
}

.tile-body {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem;
  background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
  color: var(--color-light, #ffffff);
}

.tile-title { font-size: 1.1rem; font-weight: bold; }
.tile-excerpt { font-size: 0.8rem; display: none; }

/* FOOTER */
.site-footer {
  padding-top: 3rem;
  font-size: 0.9rem;
}

.footer-bg-light { background: #f9f9f9; color: var(--color-dark, #333333); }
.footer-bg-accent { background: var(--color-accent, #c0392b); color: var(--color-light, #ffffff); }
.footer-bg-dark { background: var(--color-dark, #333333); color: var(--color-light, #ffffff); }

.footer-inner {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.footer-cols-4 {
  display: grid;
  gap: 2rem;
}

.footer-col h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
  font-variant: small-caps;
}

.footer-bg-dark .footer-col h3 {
  color: var(--color-light, #ffffff);
}

ul.footer-links, ul.footer-posts {
  list-style: none;
  padding: 0;
}

ul.footer-links li, ul.footer-posts li {
  margin-bottom: 0.5rem;
}

.footer-links a, .footer-posts a {
  color: var(--color-muted, #7f8c8d);
}

.footer-bg-light .footer-links a, .footer-bg-light .footer-posts a {
  color: var(--color-dark, #333333);
}

.footer-links a:hover, .footer-posts a:hover {
  color: var(--color-accent, #c0392b);
}

.footer-about a {
  color: var(--color-accent, #c0392b);
  font-weight: bold;
}

.footer-bottom {
  padding: 1.5rem 0;
  text-align: center;
  border-top: 1px solid rgba(0,0,0,0.1);
}

.footer-bg-light .footer-bottom {
  border-top-color: var(--color-muted, #eeeeee);
}

/* RESPONSIVE */
@media (min-width: 768px) {
  .menu-toggle { display: none; }
  .main-nav { display: block; }

  .featured-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 1.5rem;
    grid-template-areas:
      "main side1"
      "main side2";
  }
  .featured-main { grid-area: main; }
  .featured-excerpt { display: block; margin-top: 1rem; }

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

  .post-card {
    flex-direction: column;
  }
  .post-card-image {
    flex: auto;
  }
  .post-card-image img {
    width: 100%;
    height: 200px;
  }

  .single-post.has-sidebar {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 3rem;
  }
  .single-post.sidebar-left {
    grid-template-columns: 300px 1fr;
  }
  .single-post.sidebar-left .sidebar {
    grid-row: 1;
  }
  .sidebar { margin-top: 0; }

  .sections-grid, .services-grid {
    grid-template-columns: 1fr 1fr;
  }

  .locations-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .tiles-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .tile-excerpt { display: block; }

  .footer-cols-4 {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (min-width: 1024px) {
  .posts-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .single-post.has-sidebar {
    grid-template-columns: 1fr 350px;
  }
  .single-post.sidebar-left {
    grid-template-columns: 350px 1fr;
  }

  .sections-grid, .services-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .locations-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== Single-post variant extras ===== */
.internal-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}
.internal-link-card {
    border: 1px solid var(--color-muted);
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: box-shadow 0.3s ease;
}
.internal-link-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.internal-link-card a {
    display: block;
    text-decoration: none;
    color: var(--color-dark);
}
.internal-link-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}
.internal-link-card h4 {
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    margin: 0;
}
.related-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.related-list {
    list-style: none;
    padding: 0;
}
.related-list li {
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--color-muted);
}
.related-list li:last-child {
    border-bottom: none;
}
.related-list a {
    font-family: var(--font-heading);
    font-size: 0.95rem;
}

/* Variant D: post-cover (full-width hero image) */
.post-cover {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
    margin-bottom: 2rem;
}
.post-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-cover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.7));
    color: white;
    padding: 3rem 2rem 2rem;
}
.post-cover-overlay .post-title {
    color: white;
}
.post-cover-overlay .post-category a {
    color: var(--color-accent);
}
.post-subtitle {
    font-size: 1.1rem;
    font-style: italic;
    color: #666;
    margin-top: 0.5rem;
}

@media (min-width: 768px) {
    .internal-links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* ===== Variant C: Header extras ===== */
.page-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
.header-brand {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.header-navigation {
    display: flex;
    align-items: center;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.navigation-strip {
    border-bottom: 1px solid var(--color-muted);
    padding: 0.5rem 0;
}
.mobile-nav-container {
    padding: 1.5rem;
}

/* Variant C: Footer extras */
.footer-disclaimer {
    font-size: 0.8rem;
    color: #999;
    margin-top: 1rem;
}
.footer-info {
    font-size: 0.9rem;
    line-height: 1.8;
}

