/* Regulations Combined Section - Timeline + Posts Grid */

/* Import base posts-grid styles to avoid duplication */
@import url("./posts-grid.css");

.regulations-combined-section {
  background: #e9ebef;
  padding: 36px 0 20px;
  position: relative;
  overflow: hidden;
}

/* Override blob styles from posts-grid to avoid conflicts */
.regulations-combined-section .posts-grid-block::before {
  display: none; /* Hide default blob from posts-grid */
}

/* Custom blobs for regulations combined section */
.regulations-combined-blob {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  z-index: 0;
  /* Hardware acceleration hints */
  transform: translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
}

.regulations-combined-blob-1 {
  width: 1121px;
  height: 744px;
  background-color: rgba(82, 24, 71, 251, 0.25);
  filter: blur(400px);
  top: -200px;
  right: -200px;
}

.regulations-combined-blob-2 {
  width: 800px;
  height: 250px;
  background-color: #5247e740;
  bottom: -120px;
  left: 50%;
  transform: translateX(-50%) scaleY(0.6);
  border-radius: 50% / 40%;
  filter: blur(175px);
}

/* Timeline Section - specific styles only */
.timeline-section {
  position: relative;
  z-index: 1;
  margin-bottom: 32px;
}

/* Posts Grid Section - use base styles with minimal overrides */
.posts-grid-section {
  position: relative;
  z-index: 1;
}

/* Override posts-grid padding for combined section */
.regulations-combined-section .posts-grid-inner {
  padding: 40px 15px; /* Reduced padding for combined section */
}

/* Style for wrapper - just provides structure, no visual styling */
.posts-grid-wrapper {
  width: 100%;
}

/* Remove background from posts-grid-block to avoid double background */
.regulations-combined-section .posts-grid-block {
  background-color: transparent;
}

.regulations-combined-section .posts-grid-block::before {
  display: none; /* Already defined, but ensuring no conflicts */
}

/* Timeline specific styles */
.timeline-section .section__header {
  padding: 0;
}

.key-regulations-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 24px;
}

.key-regulations-header__title-wrapper {
  flex: 1;
}

.key-regulations-header__title {
  font-family: "Inter", sans-serif;
  font-size: 2.125rem;
  font-weight: 700;
  color: #213361;
  margin: 0 0 0.5rem;
  letter-spacing: -1.8px;
}

.key-regulations-header__subtitle {
  font-family: "Inter", sans-serif;
  font-size: 20px;
  color: rgba(33, 51, 97, 0.5);
  margin: 0;
}

.key-regulations-header__pagination {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  max-width: 1456px;
  margin: 0 auto;
  transform: translateY(-50%);
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  gap: 12px;
  z-index: 20;
  pointer-events: none;
  padding: 0 15px; /* Match content-wrapper default padding */
}

.key-regulations__pagination-button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  color: #213361;
  background: rgba(255, 255, 255, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  pointer-events: auto;
}

.key-regulations__pagination-button:first-of-type {
  background: rgba(33, 51, 97, 0.65);
  border-color: rgba(33, 51, 97, 0.3);
  color: #fff;
}

.key-regulations__pagination-button:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.95);
  transform: scale(1.05);
}

.key-regulations__pagination-button:first-of-type:hover:not(:disabled) {
  background: rgba(33, 51, 97, 0.95);
}

.key-regulations__pagination-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  box-shadow: none;
}

.key-regulations-content {
  position: relative;
}

.key-regulations-content__timeline {
  display: flex;
  gap: 20px;
  padding: 20px 0;
  will-change: transform;
  justify-content: flex-end;
  position: relative;
  transform: translateX(0);
}

.key-regulations-content__timeline-item {
  flex-shrink: 0;
}

.key-regulation-card {
  width: 360px;
  background: #ffffff;
  border-radius: 24px 24px 0 0;
  box-shadow: 0px 4px 12px 0px rgba(142, 152, 168, 0.06);
  display: flex;
  flex-direction: column;
}

.key-regulation-card__year {
  background: #213361;
  color: #ffffff;
  padding: 20px 0;
  text-align: center;
  border-radius: 24px 24px 0 0;
}

.key-regulation-card__year span {
  font-family: "Inter", sans-serif;
  font-weight: 600;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #ffffff;
}

.key-regulation-card__content {
  padding: 0;
}

.key-regulation-entry {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 24px;
  border-bottom: 1px solid #ededed;
  transition: background-color 0.3s ease;
}

.key-regulation-entry:last-child {
  border-bottom: none;
}

.key-regulation-entry:hover {
  background-color: #f8f9fa;
}

.key-regulation-entry__icon {
  width: 6px;
  height: 11px;
  color: rgba(33, 51, 97, 0.5);
  flex-shrink: 0;
  margin-top: 0.4rem;
}

.key-regulation-entry__text {
  font-family: "Inter", sans-serif;
  flex: 1;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.55;
  letter-spacing: -0.01em;
  color: #213361;
  text-wrap: pretty;
  overflow-wrap: anywhere;
}

.timeline-wrapper {
  position: relative;
  display: flex;
  justify-content: flex-end;
  padding: 0 84px; /* Space for the buttons on both sides */
  z-index: 1; /* Keep cards below pagination */
}

/* Highlighted Entry */
.key-regulation-entry--highlighted {
  background-color: #ffffff;
}

.key-regulation-entry--highlighted .key-regulation-entry__text {
  color: #c747e7;
}

.key-regulation-entry--highlighted .key-regulation-entry__icon {
  color: rgba(33, 51, 97, 0.5);
}

/* Link Entry */
a.key-regulation-entry {
  text-decoration: none;
  color: inherit;
  cursor: pointer;
}

a.key-regulation-entry:hover {
  background-color: #f8f9fa;
}

/* Entries Wrapper for Max-Height Collapse */
.key-regulation-card__entries-wrapper {
  position: relative;
  max-height: 250px;
  overflow: hidden;
  transition: max-height 0.4s ease-in-out;
}

.key-regulation-card__entries-wrapper::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 60px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgba(255, 255, 255, 1));
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

.key-regulation-card__entries-wrapper.is-expanded {
  max-height: 2500px;
}

.key-regulation-card__entries-wrapper.is-expanded::after {
  opacity: 0;
  pointer-events: none;
}

.key-regulation-card__entries-wrapper.no-overflow::after {
  display: none;
}

.key-regulation-card__show-more {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  background-color: transparent;
  border: none;
  border-top: 1px solid #ededed;
  color: #c747e7;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.key-regulation-card__show-more:hover {
  background-color: #f8f9fa;
}

.key-regulation-card__show-more[aria-expanded="true"] svg {
  transform: rotate(180deg);
}

/* Results actions for filtered view */
.results-actions {
  margin-bottom: 2rem;
  text-align: right;
}

.results-actions .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 24px;
  background-color: var(--goz-gray-bg);
  color: var(--goz-primary);
  border: none;
  border-radius: 24px;
  font-family: "Inter", sans-serif;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.results-actions .btn:hover {
  background-color: #d1d5e0;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .regulations-combined-section {
    padding: 32px 0 20px;
  }

  .key-regulations-header {
    flex-direction: column;
    gap: 20px;
  }

  .key-regulations-header__title {
    font-size: 32px;
  }
}

@media (max-width: 768px) {
  .regulations-combined-section {
    padding: 28px 0 20px;
  }

  /* Adjust blobs for mobile */
  .regulations-combined-blob-1 {
    width: 600px;
    height: 400px;
    top: -150px;
    right: -150px;
    filter: blur(300px);
  }

  .regulations-combined-blob-2 {
    width: 500px;
    height: 170px;
    bottom: -80px;
    filter: blur(150px);
    transform: translateX(-50%) scaleY(0.6);
    border-radius: 50% / 40%;
  }

  .timeline-section {
    margin-bottom: 36px;
  }

  .key-regulations-header__title {
    font-size: 28px;
    margin-bottom: 0.375rem;
  }

  .key-regulations-header__subtitle {
    font-size: 18px;
  }

  .key-regulation-card {
    width: 340px;
  }

  .key-regulation-card__year span {
    font-size: 27px;
  }

  .key-regulation-entry__text {
    font-size: 13px;
    line-height: 1.5;
  }

  .timeline-wrapper {
    padding: 0 44px;
  }

  .key-regulations__pagination-button {
    width: 40px;
    height: 40px;
  }

  .key-regulations-content__timeline {
    gap: 16px;
    padding: 16px 0;
  }

  .results-actions {
    text-align: center;
  }
}

@media (max-width: 480px) {
  .key-regulation-card {
    width: 300px;
  }

  .key-regulation-card__year span {
    font-size: 24px;
  }

  .key-regulation-entry {
    padding: 15px 18px;
  }

  .key-regulations-content__timeline {
    gap: 12px;
    padding: 12px 0;
  }
}
