/* ========================================
   PAGE TEMPLATES - HERO & WYSIWYG CONTENT
======================================== */

/* ========== HERO IMAGE SECTION ========== */
.dg-page-hero {
  position: relative;
  min-height: 400px;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  padding: 5rem 0 4rem;
  margin-bottom: 0;
}

.dg-page-hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(24, 24, 27, 0.85) 0%, rgba(39, 39, 42, 0.75) 100%);
  z-index: 1;
}

.dg-page-hero .container-xl {
  position: relative;
  z-index: 2;
}

.breadcrumb-hero {
  background: transparent;
  padding: 0;
  margin-bottom: 1.5rem;
}

.breadcrumb-hero .breadcrumb-item {
  color: rgba(255, 255, 255, 0.7);
}

.breadcrumb-hero .breadcrumb-item a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb-hero .breadcrumb-item a:hover {
  color: var(--dg-gold);
}

.breadcrumb-hero .breadcrumb-item + .breadcrumb-item::before {
  color: rgba(255, 255, 255, 0.5);
  content: "›";
}

.breadcrumb-hero .breadcrumb-item.active {
  color: var(--dg-white);
}

.dg-page-hero .dg-hero-title {
  font-family: var(--dg-font-serif);
  font-size: clamp(2rem, 4vw, 3.25rem);
  font-weight: 700;
  color: var(--dg-white);
  line-height: 1.12;
  margin-bottom: 1rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  max-width: 22ch;
  text-wrap: balance;
}

.dg-page-hero .dg-hero-subtitle {
  font-family: var(--dg-font-sans);
  font-size: clamp(1.0625rem, 1.4vw, 1.25rem);
  font-style: normal;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.7;
  margin-bottom: 0;
  max-width: 65ch;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  text-wrap: pretty;
}

.dg-section-with-hero {
  padding-top: 4rem;
}

/* ========== WYSIWYG CONTENT FORMATTING ========== */
.dg-wysiwyg-content {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--dg-gray-900);
}

/* Headings */
.dg-wysiwyg-content h1,
.dg-wysiwyg-content h2,
.dg-wysiwyg-content h3,
.dg-wysiwyg-content h4,
.dg-wysiwyg-content h5,
.dg-wysiwyg-content h6 {
  font-weight: 700;
  color: var(--dg-dark);
  line-height: 1.3;
  margin-top: 2rem;
  margin-bottom: 1rem;
  text-wrap: balance;
}

.dg-wysiwyg-content h1:first-child,
.dg-wysiwyg-content h2:first-child,
.dg-wysiwyg-content h3:first-child {
  margin-top: 0;
}

.dg-wysiwyg-content h1 {
  font-family: var(--dg-font-serif);
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
}

.dg-wysiwyg-content h2 {
  font-family: var(--dg-font-serif);
  font-size: 2rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(201, 169, 97, 0.28);
  margin-top: 3rem;
}

.dg-wysiwyg-content h3 {
  font-size: 1.5rem;
  color: #1F2937;
}

.dg-wysiwyg-content h4 {
  font-size: 1.25rem;
  color: #374151;
}

.dg-wysiwyg-content h5 {
  font-size: 1.125rem;
}

.dg-wysiwyg-content h6 {
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #6B7280;
}

/* Paragraphs */
.dg-wysiwyg-content p {
  margin-bottom: 1.5rem;
  text-align: start;
  max-width: 75ch;
}

.dg-wysiwyg-content li {
  max-width: 75ch;
}

.dg-wysiwyg-content p:last-child {
  margin-bottom: 0;
}

.dg-wysiwyg-content p.lead {
  font-size: 1.25rem;
  font-weight: 500;
  color: #1F2937;
  margin-bottom: 2rem;
}

/* Lists */
.dg-wysiwyg-content ul,
.dg-wysiwyg-content ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.dg-wysiwyg-content ul li,
.dg-wysiwyg-content ol li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
}

.dg-wysiwyg-content ul ul,
.dg-wysiwyg-content ol ol,
.dg-wysiwyg-content ul ol,
.dg-wysiwyg-content ol ul {
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* Links */
.dg-wysiwyg-content a {
  color: var(--dg-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  border-bottom: 1px solid transparent;
}

.dg-wysiwyg-content a:hover {
  color: var(--dg-primary-dark);
  border-bottom-color: var(--dg-primary-dark);
}

/* Images */
.dg-wysiwyg-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
  margin: 2rem 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.dg-wysiwyg-content img.alignleft {
  float: left;
  margin: 0.5rem 2rem 1.5rem 0;
  max-width: 50%;
}

.dg-wysiwyg-content img.alignright {
  float: right;
  margin: 0.5rem 0 1.5rem 2rem;
  max-width: 50%;
}

.dg-wysiwyg-content img.aligncenter {
  display: block;
  margin-left: auto;
  margin-right: auto;
}

/* Blockquotes */
.dg-wysiwyg-content blockquote {
  border-left: 4px solid var(--dg-primary);
  padding: 1.5rem 2rem;
  margin: 2rem 0;
  background: #F9FAFB;
  border-radius: 0 0.5rem 0.5rem 0;
  font-size: 1.125rem;
  font-style: italic;
  color: #4B5563;
}

.dg-wysiwyg-content blockquote p {
  margin-bottom: 0.5rem;
}

.dg-wysiwyg-content blockquote p:last-child {
  margin-bottom: 0;
}

.dg-wysiwyg-content blockquote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.9375rem;
  font-style: normal;
  color: #6B7280;
  font-weight: 600;
}

.dg-wysiwyg-content blockquote cite::before {
  content: "— ";
}

/* Tables */
.dg-wysiwyg-content table {
  width: 100%;
  margin: 2rem 0;
  border-collapse: collapse;
  border: 1px solid #E5E7EB;
  border-radius: 0.5rem;
  overflow: hidden;
}

/* Media inside WYSIWYG */
.dg-wysiwyg-content img,
.dg-wysiwyg-content iframe,
.dg-wysiwyg-content video {
  max-width: 100%;
}

.dg-wysiwyg-content {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.dg-wysiwyg-content table thead {
  background: linear-gradient(135deg, #F9FAFB 0%, #F3F4F6 100%);
}

.dg-wysiwyg-content table th {
  padding: 1rem;
  text-align: left;
  font-weight: 700;
  color: var(--dg-dark);
  border-bottom: 2px solid var(--dg-gold);
  font-size: 0.9375rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.dg-wysiwyg-content table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #E5E7EB;
  color: #374151;
}

.dg-wysiwyg-content table tbody tr:last-child td {
  border-bottom: none;
}

.dg-wysiwyg-content table tbody tr:hover {
  background: #F9FAFB;
}

/* Horizontal Rules */
.dg-wysiwyg-content hr {
  border: none;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--dg-gold) 50%, transparent 100%);
  margin: 3rem 0;
}

/* Code */
.dg-wysiwyg-content code {
  background: #F3F4F6;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-size: 0.9em;
  color: #D97706;
  font-family: 'Courier New', monospace;
}

.dg-wysiwyg-content pre {
  background: #1F2937;
  color: #F3F4F6;
  padding: 1.5rem;
  border-radius: 0.5rem;
  overflow-x: auto;
  margin: 2rem 0;
}

.dg-wysiwyg-content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

/* Strong & Em */
.dg-wysiwyg-content strong,
.dg-wysiwyg-content b {
  font-weight: 700;
  color: var(--dg-dark);
}

.dg-wysiwyg-content em,
.dg-wysiwyg-content i {
  font-style: italic;
}

/* Small Text */
.dg-wysiwyg-content small {
  font-size: 0.875rem;
  color: #6B7280;
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
  .dg-page-hero {
    min-height: 350px;
    padding: 4rem 0 3rem;
  }
  
  .dg-page-hero .dg-hero-title {
    font-size: clamp(1.875rem, 4.2vw, 2.5rem);
  }
  
  .dg-page-hero .dg-hero-subtitle {
    font-size: 1.0625rem;
  }
  
  .dg-wysiwyg-content {
    font-size: 1rem;
  }
  
  .dg-wysiwyg-content h1 {
    font-size: 2rem;
  }
  
  .dg-wysiwyg-content h2 {
    font-size: 1.75rem;
  }
  
  .dg-wysiwyg-content h3 {
    font-size: 1.375rem;
  }
}

@media (max-width: 767.98px) {
  .dg-page-hero {
    min-height: 300px;
    padding: 3rem 0 2.5rem;
  }
  
  .dg-page-hero .dg-hero-title {
    font-size: 2rem;
  }
  
  .dg-page-hero .dg-hero-subtitle {
    font-size: 1rem;
  }
  
  .dg-section-with-hero {
    padding-top: 3rem;
  }
  
  .dg-wysiwyg-content img.alignleft,
  .dg-wysiwyg-content img.alignright {
    float: none;
    max-width: 100%;
    margin: 1.5rem 0;
  }
  
  .dg-wysiwyg-content p {
    text-align: left;
  }
  
  .dg-wysiwyg-content table {
    font-size: 0.875rem;
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
  
  .dg-wysiwyg-content table th,
  .dg-wysiwyg-content table td {
    padding: 0.625rem;
  }
  
  .dg-wysiwyg-content blockquote {
    padding: 1rem 1.5rem;
    font-size: 1rem;
  }
}
