/**
 * Content Blocks Styles
 * Flexible content blocks for blog posts
 */

/* ============================================
   GENERAL BLOCK STYLES
   ============================================ */

.flexible-content-blocks {
  margin: 0 auto;
}

.content-block {
  margin-bottom: 3rem;
  padding: 0;
}

.content-block:last-child {
  margin-bottom: 0;
}

/* Section Title */
.content-block__title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  color: #7a5b46 !important;
  line-height: 1.3;
  position: relative;
  padding-bottom: 0.75rem;
}

/* .content-block__title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--color-primary, #007bff) 0%, var(--color-primary-light, #4da3ff) 100%);
  border-radius: 2px;
} */

@media (max-width: 767px) {
  .content-block__title {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

/* ============================================
   RICH TEXT BLOCK
   ============================================ */

.content-block--rich-text .rich-text-content {
  line-height: 1.8;
}

.content-block--rich-text p {
  margin-bottom: 1.5rem;
}

.content-block--rich-text h1,
.content-block--rich-text h2,
.content-block--rich-text h3,
.content-block--rich-text h4,
.content-block--rich-text h5,
.content-block--rich-text h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

.content-block--rich-text h1 { font-size: 2.5rem; }
.content-block--rich-text h2 { font-size: 2rem; }
.content-block--rich-text h3 { font-size: 1.75rem; }
.content-block--rich-text h4 { font-size: 1.5rem; }
.content-block--rich-text h5 { font-size: 1.25rem; }
.content-block--rich-text h6 { font-size: 1rem; }

.content-block--rich-text ul,
.content-block--rich-text ol {
  margin-bottom: 1.5rem;
  padding-left: 2rem;
}

.content-block--rich-text li {
  margin-bottom: 0.5rem;
}

/* ============================================
   TWO COLUMN BLOCK
   ============================================ */

.content-block--two-column .column-content {
  padding: 1rem;
  height: 100%;
}

@media (max-width: 767px) {
  .content-block--two-column .col-md-6 + .col-md-6 {
    margin-top: 2rem;
  }
}

/* ============================================
   MULTI-COLUMN BLOCK (3-5 COLUMNS)
   ============================================ */

.content-block--multi-column .column-content {
  padding: 1rem;
  height: 100%;
}

/* Custom 5-column layout (20% width each) */
.col-md-2-4 {
  flex: 0 0 auto;
  width: 20%;
}

/* Responsive adjustments */
@media (max-width: 991px) {
  /* 5 columns -> 3 columns on tablets */
  .content-block--columns-5 .col-md-2-4 {
    width: 33.333333%;
  }

  /* 4 columns -> 2 columns on tablets */
  .content-block--columns-4 .col-md-3 {
    width: 50%;
  }
}

@media (max-width: 767px) {
  /* All columns stack on mobile */
  .content-block--multi-column [class*="col-md-"] {
    width: 100%;
    margin-top: 0;
  }

  .content-block--multi-column [class*="col-md-"] + [class*="col-md-"] {
    margin-top: 2rem;
  }
}

/* ============================================
   FULL WIDTH IMAGE BLOCK
   ============================================ */

.content-block--full-width-image {
  margin-bottom: 3rem;
}

.content-block--full-width-image .full-width-image-wrapper {
  margin: 0;
}

.content-block--full-width-image img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.content-block--full-width-image a:hover img {
  transform: scale(1.02);
}

.content-block--full-width-image .image-caption {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-top: 1rem;
  font-style: italic;
}

/* ============================================
   IMAGE GALLERY BLOCK
   ============================================ */

.content-block--image-gallery {
  margin-bottom: 3rem;
}

.content-block--image-gallery .gallery-item {
  display: block;
  overflow: hidden;
  border-radius: 8px;
  position: relative;

text-decoration: none !important;

}

.content-block--image-gallery .gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
    border-radius: 8px;
      aspect-ratio: 1 / 1;
  transition: transform 0.3s ease;
  margin: 0;
  margin-bottom: .5rem;
}

.content-block--image-gallery .gallery-item:hover img {
  /* transform: scale(1.1); */
}

.content-block--image-gallery .gallery-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.3s ease;
  pointer-events: none;
}

.content-block--image-gallery .gallery-item:hover::after {
  /* background: rgba(0, 0, 0, 0.1); */
}

/* ============================================
   IMAGE WITH CAPTION BLOCK
   ============================================ */

.content-block--image-caption {
  margin-bottom: 3rem;
}

.content-block--image-caption .image-caption-wrapper {
  margin: 0;
}

.content-block--image-caption .image-caption-wrapper.align-left {
  text-align: left;
  margin-right: auto;
  max-width: 50%;
}

.content-block--image-caption .image-caption-wrapper.align-center {
  text-align: center;
  margin: 0 auto;
  max-width: 80%;
}

.content-block--image-caption .image-caption-wrapper.align-right {
  text-align: right;
  margin-left: auto;
  max-width: 50%;
}

.content-block--image-caption img {
  border-radius: 8px;
}

.content-block--image-caption .image-caption {
  font-size: 0.9rem;
  color: #666;
  margin-top: 1rem;
  line-height: 1.6;
}

@media (max-width: 767px) {
  .content-block--image-caption .image-caption-wrapper.align-left,
  .content-block--image-caption .image-caption-wrapper.align-right {
    max-width: 100%;
  }
}

/* ============================================
   QUOTE BLOCK
   ============================================ */

.content-block--quote {
  margin-bottom: 3rem;
  padding: 2rem 0;
}

.content-block--quote .quote-block {
  position: relative;
  padding: 3rem 4rem;
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  border-left: 5px solid var(--color-primary, #007bff);
  border-radius: 8px;
  margin: 0;
}

.content-block--quote .quote-icon {
  position: absolute;
  top: 1.5rem;
  left: 1.5rem;
  opacity: 0.2;
}

.content-block--quote .quote-icon svg {
  width: 48px;
  height: 48px;
  color: var(--color-primary, #007bff);
}

.content-block--quote .quote-text {
  font-size: 1.5rem;
  font-style: italic;
  line-height: 1.6;
  color: #333;
  margin: 0 0 1.5rem 0;
}

.content-block--quote .quote-footer {
  display: block;
  text-align: right;
  font-style: normal;
}

.content-block--quote .quote-author {
  display: block;
  font-weight: 600;
  font-size: 1.1rem;
  color: #222;
  font-style: normal;
}

.content-block--quote .quote-author::before {
  content: '— ';
}

.content-block--quote .quote-author-title {
  display: block;
  font-size: 0.95rem;
  color: #666;
  margin-top: 0.25rem;
}

@media (max-width: 767px) {
  .content-block--quote .quote-block {
    padding: 2rem 1.5rem;
  }

  .content-block--quote .quote-text {
    font-size: 1.2rem;
  }
}

/* ============================================
   CODE BLOCK
   ============================================ */

.content-block--code {
  margin-bottom: 3rem;
}

.content-block--code .code-block-wrapper {
  position: relative;
  background: #282c34;
  border-radius: 8px;
  overflow: hidden;
}

.content-block--code .code-language-label {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  padding: 0.5rem 1rem;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.content-block--code pre {
  margin: 0;
  padding: 1.5rem;
  overflow-x: auto;
  background: transparent;
}

.content-block--code code {
  color: #abb2bf;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* ============================================
   VIDEO EMBED BLOCK
   ============================================ */

.content-block--video {
  margin-bottom: 3rem;
}

.content-block--video .video-wrapper {
  margin: 0;
}

.content-block--video .video-embed-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: #000;
}

.content-block--video .video-embed-container iframe,
.content-block--video .video-embed-container object,
.content-block--video .video-embed-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.content-block--video .video-caption {
  text-align: center;
  font-size: 0.9rem;
  color: #666;
  margin-top: 1rem;
  font-style: italic;
}

/* ============================================
   CALL TO ACTION BLOCK
   ============================================ */

.content-block--cta {
  margin-bottom: 3rem;
}

.content-block--cta .cta-box {
  text-align: center;
  padding: 3rem 2rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: #fff;
}

.content-block--cta.cta-style-secondary .cta-box {
  background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.content-block--cta .cta-heading {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #fff;
}

.content-block--cta .cta-text {
  font-size: 1.1rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.95);
}

.content-block--cta .cta-button {
  display: inline-block;
  padding: 1rem 2.5rem;
  font-size: 1.1rem;
  font-weight: 600;
  text-decoration: none;
  border-radius: 50px;
  transition: all 0.3s ease;
  background: #fff;
  color: #667eea;
  border: 2px solid #fff;
}

.content-block--cta .cta-button:hover {
  background: transparent;
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.content-block--cta.cta-style-secondary .cta-button {
  color: #f5576c;
}

@media (max-width: 767px) {
  .content-block--cta .cta-heading {
    font-size: 1.5rem;
  }

  .content-block--cta .cta-text {
    font-size: 1rem;
  }
}

/* ============================================
   ACCORDION / FAQ BLOCK
   ============================================ */

.content-block--accordion {
  margin-bottom: 3rem;
}

.content-block--accordion .accordion {
  border: 1px solid #dee2e6;
  border-radius: 8px;
  overflow: hidden;
}

.content-block--accordion .accordion-item {
  border: 0;
  border-bottom: 1px solid #dee2e6;
}

.content-block--accordion .accordion-item:last-child {
  border-bottom: 0;
}

.content-block--accordion .accordion-header {
  margin: 0;
}

.content-block--accordion .accordion-button {
  font-size: 1.1rem;
  font-weight: 600;
  padding: 1.25rem 1.5rem;
  background: #f8f9fa;
  color: #333;
  border: 0;
  position: relative;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
}

.content-block--accordion .accordion-button:not(.collapsed) {
  background: var(--color-primary, #007bff);
  color: #fff;
}

.content-block--accordion .accordion-button:hover {
  background: #e9ecef;
}

.content-block--accordion .accordion-button:not(.collapsed):hover {
  background: var(--color-primary-dark, #0056b3);
}

.content-block--accordion .accordion-button::after {
  content: '+';
  position: absolute;
  right: 1.5rem;
  font-size: 1.5rem;
  font-weight: 300;
  transition: transform 0.3s ease;
}

.content-block--accordion .accordion-button:not(.collapsed)::after {
  content: '−';
}

.content-block--accordion .accordion-button:focus {
  box-shadow: none;
  outline: 2px solid var(--color-primary, #007bff);
  outline-offset: -2px;
}

.content-block--accordion .accordion-collapse {
  transition: height 0.3s ease;
}

.content-block--accordion .accordion-body {
  padding: 1.5rem;
  line-height: 1.7;
  background: #fff;
}

/* ============================================
   IMAGE & TEXT BLOCK
   ============================================ */

.content-block--image-text {
  margin-bottom: 3rem;
}

.content-block--image-text .row {
  /* Use Bootstrap's gutter system instead of gap */
}

.content-block--image-text .image-text-image img {
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.content-block--image-text .image-text-content {
  padding: 1rem 0;
}

.content-block--image-text .image-text-content h1,
.content-block--image-text .image-text-content h2,
.content-block--image-text .image-text-content h3,
.content-block--image-text .image-text-content h4 {
  margin-bottom: 1rem;
}

.content-block--image-text .image-text-content p {
  line-height: 1.7;
  margin-bottom: 1rem;
}

@media (max-width: 767px) {
  .content-block--image-text.layout-image-right .col-md-6:first-child {
    order: 2;
  }

  .content-block--image-text.layout-image-right .col-md-6:last-child {
    order: 1;
  }
}

/* ============================================
   RESPONSIVE UTILITIES
   ============================================ */

@media (max-width: 767px) {
  .content-block {
    margin-bottom: 2rem;
  }
}
