/* ============================================
   PREMIUM SHARED STYLES
   ============================================ */

:root {
  /* Brand Colors from gravityplumbingandheating.ca */
  --g-primary: #DB0545;
  /* Brand Purple/Magenta */
  --g-primary-dark: #A01B5B;
  /* Darker Purple */
  --g-dark: #000000;
  /* Pure Black */
  --g-light-bg: #ffffff;
  /* White sections */
  --g-border: #e0e0e0;
  --g-text: #444444;
  --g-muted: #666666;

  /* Gradients matching main site */
  --g-gradient-light: linear-gradient(135deg, #DB0545 0%, #A01B5B 100%);
  --g-gradient-dark: linear-gradient(135deg, #A01B5B 0%, #DB0545 100%);
}

/* Service Areas Grid Redesign */
.city-card-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.25rem;
  margin-top: 2.5rem;
}

.city-card {
  background: white;
  border: 1px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 1.75rem 1.25rem;
  text-decoration: none;
  color: var(--g-dark);
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  height: 100%;
}

.city-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 30px rgba(0, 0, 0, 0.12);
  border-color: var(--g-primary);
  background: white;
}

.city-card h3 {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  font-weight: 800;
  color: var(--g-dark);
  transition: color 0.3s;
}

.city-card p {
  font-size: 0.825rem;
  color: var(--g-muted);
  margin: 0;
  line-height: 1.4;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.city-card .card-arrow {
  margin-top: 1.25rem;
  font-size: 1.25rem;
  color: var(--g-primary);
  transition: transform 0.3s;
  opacity: 0.7;
}

.city-card:hover .card-arrow {
  transform: translateX(5px);
  opacity: 1;
}

/* Responsive adjustments for the grid */
@media (max-width: 1200px) {
  .city-card-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}

@media (max-width: 992px) {
  .city-card-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .city-card-grid {
    grid-template-columns: repeat(2, 1fr);
    padding: 0 1rem;
  }
}

@media (max-width: 480px) {
  .city-card-grid {
    grid-template-columns: 1fr;
  }
}

/* Robust Dropdown Toggle */
.nav-dropdown.active .nav-dropdown-menu,
.mobile-dropdown.active .mobile-dropdown-menu {
  display: block !important;
  max-height: 1000px !important;
  opacity: 1 !important;
  visibility: visible !important;
  padding: 1rem 0 !important;
}

.nav-dropdown-menu {
  display: none;
  transition: all 0.3s ease;
}

/* ============================================
   BLOG HUB STYLES
   ============================================ */

/* Blog Controls */
.blog-controls {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
  margin-bottom: 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  align-items: center;
  justify-content: space-between;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.blog-search-wrapper {
  flex: 1;
  min-width: 300px;
  position: relative;
}

.blog-search-input {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.5rem;
  border: 1px solid var(--g-border);
  border-radius: 8px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.blog-search-input:focus {
  border-color: var(--g-primary);
  outline: none;
}

.blog-search-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--g-muted);
}

.blog-filters {
  display: flex;
  gap: 1rem;
  align-items: center;
}

.blog-category-select {
  padding: 0.75rem 2rem 0.75rem 1rem;
  border: 1px solid var(--g-border);
  border-radius: 8px;
  font-size: 0.95rem;
  cursor: pointer;
  background-color: white;
}

.view-toggles {
  display: flex;
  gap: 0.5rem;
  background: var(--g-light-bg);
  padding: 0.25rem;
  border-radius: 8px;
}

.view-btn {
  padding: 0.5rem;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 6px;
  color: var(--g-muted);
  transition: all 0.2s;
}

.view-btn.active {
  background: white;
  color: var(--g-primary);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Blog Grid Layout */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

.blog-card {
  background: white;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transition: transform 0.3s, box-shadow 0.3s;
  display: flex;
  flex-direction: column;
}

.blog-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

.blog-card-image {
  position: relative;
  height: 220px;
  overflow: hidden;
}

.blog-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

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

.blog-card-category {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: rgba(255, 255, 255, 0.95);
  padding: 0.25rem 0.75rem;
  border-radius: 50px;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--g-primary);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blog-card-content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.blog-meta {
  font-size: 0.85rem;
  color: var(--g-muted);
  margin-bottom: 0.5rem;
}

.blog-card-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
  line-height: 1.4;
}

.blog-card-title a {
  color: var(--g-dark);
  text-decoration: none;
  transition: color 0.2s;
}

.blog-card-title a:hover {
  color: var(--g-primary);
}

.blog-card-excerpt {
  font-size: 0.95rem;
  color: var(--g-text);
  margin-bottom: 1.5rem;
  line-height: 1.6;
  flex: 1;
}

.blog-read-more {
  display: inline-flex;
  align-items: center;
  color: var(--g-primary);
  font-weight: 600;
  text-decoration: none;
  font-size: 0.9rem;
}

/* List View Overrides */
.blog-list {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.blog-list .blog-card {
  flex-direction: row;
  height: 200px;
}

.blog-list .blog-card-image {
  flex: 0 0 300px;
  height: 100%;
}

.blog-list .blog-card-content {
  justify-content: center;
}

@media (max-width: 768px) {
  .blog-list .blog-card {
    flex-direction: column;
    height: auto;
  }

  .blog-list .blog-card-image {
    flex: 0 0 200px;
    height: 200px;
    width: 100%;
  }

  .blog-controls {
    flex-direction: column;
    align-items: stretch;
  }

  .blog-filters {
    flex-wrap: wrap;
  }

  .view-toggles {
    display: none;
    /* Hide list view toggle on mobile */
  }
}

/* ============================================================================
   INTERNAL LINKING SECTION
   ============================================================================ */
.interlinking-section {
  border-top: 1px solid #e5e7eb;
}
.interlinking-group h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: #1a1a2e;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #0066cc;
  display: inline-block;
}
.interlinking-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.interlinking-links a {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  background: #fff;
  border: 1px solid #dee2e6;
  border-radius: 6px;
  color: #0066cc;
  text-decoration: none;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}
.interlinking-links a:hover {
  background: #0066cc;
  color: #fff;
  border-color: #0066cc;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0,102,204,0.2);
}
.interlinking-links strong {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  background: #0066cc;
  color: #fff;
  border-radius: 6px;
  font-size: 0.9rem;
  font-weight: 500;
}
