/**
 * StratPilote CMS - Blocks CSS
 * Block-based content styling for articles and pages
 * All blocks render inside .article-body container
 */

/* ========================================
   BASE BLOCK SPACING
   ======================================== */

[class^="block-"] {
  margin-bottom: 1.5rem;
}

/* ========================================
   1. PARAGRAPH BLOCK
   ======================================== */

.block-paragraph {
  font-size: 1.05rem;
  line-height: 1.85;
  color: var(--color-text);
}

.block-paragraph + .block-paragraph {
  margin-top: -0.5rem; /* Reduce gap between consecutive paragraphs */
}

/* ========================================
   2. HEADING BLOCK
   ======================================== */

.block-heading {
  position: relative;
  padding-left: 1rem;
  border-left: 4px solid var(--color-primary);
  margin: 2rem 0 1.25rem;
}

.block-heading h2 {
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--color-text);
  font-family: var(--font-heading);
  line-height: 1.3;
  margin: 0;
}

.block-heading h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  font-family: var(--font-heading);
  line-height: 1.4;
  margin: 0;
}

.block-heading h4 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  font-family: var(--font-heading);
  line-height: 1.5;
  margin: 0;
}

/* Anchor link hover indicator */
.block-heading:hover::before {
  content: '#';
  position: absolute;
  left: -1.25rem;
  color: var(--color-primary-light);
  font-weight: 400;
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.block-heading:hover::before:hover {
  opacity: 1;
}

/* ========================================
   3. IMAGE BLOCK
   ======================================== */

.block-image {
  margin: 2rem 0;
}

.block-image figure {
  margin: 0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background: var(--color-surface);
}

.block-image img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: cover;
}

.block-image figcaption {
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 0.75rem;
  padding: 0 1rem;
  font-style: italic;
}

/* Stretched variant (full width) */
.block-image--stretched figure {
  border-radius: 0;
  margin-left: -2rem;
  margin-right: -2rem;
}

@media (max-width: 768px) {
  .block-image--stretched figure {
    margin-left: -1rem;
    margin-right: -1rem;
  }
}

/* Bordered variant */
.block-image--bordered figure {
  border: 2px solid var(--color-border-strong);
}

/* Background variant */
.block-image--bg figure {
  background: var(--color-bg-muted);
  padding: 1.5rem;
}

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

/* ========================================
   4. LIST BLOCK
   ======================================== */

.block-list ul,
.block-list ol {
  margin: 1.5rem 0;
  padding-left: 1.5rem;
}

.block-list li {
  margin-bottom: 0.75rem;
  line-height: 1.7;
  color: var(--color-text);
}

/* Custom bullets */
.block-list ul li {
  list-style: none;
  position: relative;
  padding-left: 1.5rem;
}

.block-list ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 8px;
  height: 8px;
  background: var(--color-primary);
  border-radius: 50%;
}

/* Ordered list with custom numbers */
.block-list--ordered ol {
  counter-reset: list-counter;
  list-style: none;
  padding-left: 2rem;
}

.block-list--ordered li {
  counter-increment: list-counter;
  position: relative;
}

.block-list--ordered li::before {
  content: counter(list-counter);
  position: absolute;
  left: -2rem;
  top: 0;
  width: 1.5rem;
  height: 1.5rem;
  background: var(--color-primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 600;
}

/* ========================================
   5. QUOTE BLOCK
   ======================================== */

.block-quote {
  margin: 2rem 0;
  padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--color-primary);
  background: var(--color-bg-subtle);
  border-radius: 0 12px 12px 0;
  box-shadow: var(--shadow-sm);
}

.block-quote blockquote {
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--color-text);
  font-style: italic;
}

.block-quote cite {
  display: block;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--color-text-secondary);
  font-style: normal;
  text-align: right;
  font-weight: 500;
}

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

/* ========================================
   6. CALLOUT BLOCKS
   ======================================== */

.block-callout {
  display: flex;
  gap: 1rem;
  padding: 1.25rem;
  margin: 2rem 0;
  border-radius: 12px;
  border-left: 4px solid;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.block-callout:hover {
  transform: translateX(4px);
  box-shadow: var(--shadow-md);
}

.block-callout__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.block-callout__icon svg {
  width: 20px;
  height: 20px;
}

.block-callout__content {
  flex: 1;
  font-size: 0.95rem;
  line-height: 1.65;
}

.block-callout__content p:first-child {
  margin-top: 0;
}

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

/* Info variant (cyan) */
.block-callout--info {
  background: rgba(6, 182, 212, 0.08);
  border-left-color: var(--color-accent);
}

.block-callout--info .block-callout__icon {
  background: rgba(6, 182, 212, 0.15);
  color: var(--color-accent);
}

/* Warning variant (orange) */
.block-callout--warning {
  background: rgba(242, 125, 12, 0.08);
  border-left-color: var(--color-cta);
}

.block-callout--warning .block-callout__icon {
  background: rgba(242, 125, 12, 0.15);
  color: var(--color-cta);
}

/* Tip variant (indigo) */
.block-callout--tip {
  background: rgba(79, 70, 229, 0.08);
  border-left-color: var(--color-primary);
}

.block-callout--tip .block-callout__icon {
  background: rgba(79, 70, 229, 0.15);
  color: var(--color-primary);
}

/* Success variant (green) */
.block-callout--success {
  background: rgba(16, 185, 129, 0.08);
  border-left-color: #10B981;
}

.block-callout--success .block-callout__icon {
  background: rgba(16, 185, 129, 0.15);
  color: #10B981;
}

/* ========================================
   7. CTA BLOCK
   ======================================== */

.block-cta {
  text-align: center;
  margin: 2.5rem 0;
}

.block-cta__btn {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  font-family: var(--font-heading);
}

.block-cta__btn:hover {
  transform: translateY(-2px);
}

/* Primary button (indigo gradient) */
.block-cta__btn--primary {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.block-cta__btn--primary:hover {
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

/* Secondary button (outlined) */
.block-cta__btn--secondary {
  background: transparent;
  color: var(--color-primary);
  border: 2px solid var(--color-primary);
  box-shadow: none;
}

.block-cta__btn--secondary:hover {
  background: var(--color-primary);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

/* CTA button (orange gradient) */
.block-cta__btn--cta {
  background: linear-gradient(135deg, var(--color-cta) 0%, var(--color-cta-light) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(242, 125, 12, 0.3);
}

.block-cta__btn--cta:hover {
  box-shadow: 0 8px 20px rgba(242, 125, 12, 0.45);
}

/* ========================================
   8. IMAGE-TEXT BLOCK
   ======================================== */

.block-image-text {
  display: flex;
  gap: 2rem;
  align-items: center;
  margin: 2.5rem 0;
}

.block-image-text__image {
  flex: 0 0 40%;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.block-image-text__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.block-image-text__content {
  flex: 1;
}

.block-image-text__content h3 {
  margin-top: 0;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-text);
}

.block-image-text__content p {
  margin: 0.75rem 0;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* Right variant (image on right side) */
.block-image-text--right {
  flex-direction: row-reverse;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .block-image-text,
  .block-image-text--right {
    flex-direction: column;
  }

  .block-image-text__image {
    flex: 0 0 auto;
    width: 100%;
    max-height: 300px;
  }
}

/* ========================================
   9. FAQ BLOCK
   ======================================== */

.block-faq {
  margin: 2rem 0;
}

.block-faq__item {
  border-bottom: 1px solid var(--color-border);
  padding: 1.25rem 0;
}

.block-faq__item:last-child {
  border-bottom: none;
}

.block-faq__question {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  transition: color 0.2s ease;
}

.block-faq__question:hover {
  color: var(--color-primary);
}

.block-faq__question-text {
  flex: 1;
  padding-right: 1rem;
}

.block-faq__chevron {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.block-faq__chevron svg {
  width: 100%;
  height: 100%;
  fill: currentColor;
}

.block-faq__question[aria-expanded="true"] .block-faq__chevron {
  transform: rotate(180deg);
}

.block-faq__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.block-faq__question[aria-expanded="true"] + .block-faq__answer {
  max-height: 2000px;
  padding: 1rem 0 0.5rem;
}

.block-faq__answer p {
  margin: 0.5rem 0;
  line-height: 1.7;
  color: var(--color-text-secondary);
}

/* ========================================
   10. ACCORDION BLOCK
   ======================================== */

.block-accordion {
  margin: 2rem 0;
}

.block-accordion__item {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  margin-bottom: 0.75rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}

.block-accordion__item:hover {
  box-shadow: var(--shadow-card);
}

.block-accordion__trigger {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--color-bg);
  border: none;
  padding: 1rem 1.25rem;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.block-accordion__trigger:hover {
  background: var(--color-surface);
  color: var(--color-primary);
}

.block-accordion__trigger-text {
  flex: 1;
  padding-right: 1rem;
}

.block-accordion__chevron {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.block-accordion__chevron svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.block-accordion__item--open .block-accordion__trigger {
  background: var(--color-surface);
  color: var(--color-primary);
}

.block-accordion__item--open .block-accordion__chevron {
  transform: rotate(180deg);
}

.block-accordion__answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  background: var(--color-bg);
}

.block-accordion__item--open .block-accordion__answer {
  max-height: 2000px;
}

.block-accordion__answer-content {
  padding: 0 1.25rem 1.25rem;
  line-height: 1.7;
  color: var(--color-text-light);
}

.block-accordion__answer-content p {
  margin: 0.5rem 0;
}

/* Accordion variants */
.block-accordion--bordered .block-accordion__item {
  border-width: 2px;
  box-shadow: var(--shadow-card);
}

.block-accordion--minimal .block-accordion__item {
  border: none;
  border-bottom: 1px solid var(--color-border);
  border-radius: 0;
  margin-bottom: 0;
}

.block-accordion--minimal .block-accordion__item:last-child {
  border-bottom: none;
}

.block-accordion--minimal .block-accordion__trigger {
  background: transparent;
}

.block-accordion--minimal .block-accordion__trigger:hover {
  background: transparent;
  color: var(--color-primary);
}

/* ========================================
   11. TABLE BLOCK
   ======================================== */

.block-table {
  margin: 2rem 0;
  overflow-x: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
}

.block-table table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.block-table th {
  background: var(--color-primary);
  color: white;
  font-family: var(--font-heading);
  font-weight: 600;
  text-align: left;
  padding: 1rem;
  white-space: nowrap;
}

.block-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.block-table tr:last-child td {
  border-bottom: none;
}

/* Striped variant */
.block-table--striped tbody tr:nth-child(even) {
  background: var(--color-surface);
}

/* Bordered variant */
.block-table--bordered td,
.block-table--bordered th {
  border: 1px solid var(--color-border);
}

/* Responsive wrapper */
@media (max-width: 768px) {
  .block-table {
    font-size: 0.875rem;
  }

  .block-table th,
  .block-table td {
    padding: 0.75rem;
  }
}

/* ========================================
   12. GALLERY BLOCK
   ======================================== */

.block-gallery {
  margin: 2rem 0;
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(3, 1fr);
}

.block-gallery--cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

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

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

.block-gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md);
  aspect-ratio: 1;
  background: var(--color-surface);
}

.block-gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.block-gallery__item:hover img {
  transform: scale(1.05);
}

.block-gallery--lightbox .block-gallery__item {
  cursor: pointer;
}

.block-gallery__item figcaption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 0.75rem;
  background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
  color: white;
  font-size: 0.875rem;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.block-gallery__item:hover figcaption {
  opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .block-gallery--cols-4 {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 768px) {
  .block-gallery,
  .block-gallery--cols-3,
  .block-gallery--cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .block-gallery--cols-4 {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   13. VIDEO BLOCK
   ======================================== */

.block-video {
  margin: 2rem 0;
}

.block-video__wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.block-video__wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.block-video__caption {
  margin-top: 0.75rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--color-text-light);
  font-style: italic;
}

/* ========================================
   14. SEPARATOR BLOCK
   ======================================== */

.block-separator {
  margin: 3rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.block-separator--line {
  width: 100%;
  height: 2px;
  background: var(--color-border);
}

.block-separator--dots {
  display: flex;
  gap: 0.5rem;
}

.block-separator--dots::before,
.block-separator--dots::after,
.block-separator--dots span {
  content: '';
  width: 6px;
  height: 6px;
  background: var(--color-text-light);
  border-radius: 50%;
  display: block;
}

.block-separator--dashed {
  width: 100%;
  height: 0;
  border-top: 2px dashed var(--color-border);
}

/* Width variants */
.block-separator--full {
  width: 100%;
}

.block-separator--medium {
  width: 60%;
}

.block-separator--small {
  width: 30%;
}

/* Custom color support */
.block-separator[style*="--sep-color"] .block-separator--line {
  background: var(--sep-color);
}

.block-separator[style*="--sep-color"].block-separator--dashed {
  border-top-color: var(--sep-color);
}

.block-separator[style*="--sep-color"] .block-separator--dots::before,
.block-separator[style*="--sep-color"] .block-separator--dots::after,
.block-separator[style*="--sep-color"] .block-separator--dots span {
  background: var(--sep-color);
}

/* ========================================
   15. SPACER BLOCK
   ======================================== */

.block-spacer {
  display: block;
}

.block-spacer:empty {
  border-top: 1px dashed var(--color-border);
  opacity: 0.3;
}

/* ========================================
   16. COLUMNS BLOCK
   ======================================== */

.block-columns {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
}

.block-columns--2-col {
  grid-template-columns: 1fr 1fr;
}

.block-columns--3-col {
  grid-template-columns: 1fr 1fr 1fr;
}

.block-columns--2-1 {
  grid-template-columns: 2fr 1fr;
}

.block-columns--1-2 {
  grid-template-columns: 1fr 2fr;
}

.block-columns__column {
  min-width: 0; /* Prevent overflow */
}

/* Responsive stacking */
@media (max-width: 768px) {
  .block-columns--stack,
  .block-columns--2-col,
  .block-columns--3-col,
  .block-columns--2-1,
  .block-columns--1-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* ========================================
   17. ICON BOX BLOCK
   ======================================== */

.block-icon-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  margin: 2rem 0;
}

.block-icon-box:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.block-icon-box__icon {
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  color: var(--color-primary);
}

.block-icon-box__icon svg,
.block-icon-box__icon img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.block-icon-box__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.75rem;
}

.block-icon-box__description {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-light);
  margin: 0;
}

.block-icon-box__link {
  margin-top: 1rem;
  color: var(--color-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  transition: gap 0.2s ease;
}

.block-icon-box__link:hover {
  gap: 0.5rem;
}

/* Left-aligned variant */
.block-icon-box--left {
  flex-direction: row;
  align-items: flex-start;
  text-align: left;
}

.block-icon-box--left .block-icon-box__icon {
  margin-right: 1.5rem;
  margin-bottom: 0;
}

/* ========================================
   18. HERO BLOCK
   ======================================== */

.block-hero {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin: 2rem 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.block-hero--small {
  height: 300px;
}

.block-hero--medium {
  height: 450px;
}

.block-hero--large {
  height: 600px;
}

.block-hero--full {
  height: 100vh;
  min-height: 600px;
  border-radius: 0;
}

.block-hero__bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

.block-hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(79, 70, 229, 0.7) 0%, rgba(124, 58, 237, 0.7) 100%);
  z-index: 1;
}

.block-hero__content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: white;
  max-width: 800px;
  padding: 2rem;
}

.block-hero__tagline {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.block-hero__title {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.2;
  margin: 0 0 1.25rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.block-hero__subtitle {
  font-size: 1.25rem;
  line-height: 1.6;
  margin: 0 0 2rem;
  opacity: 0.95;
}

.block-hero__cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.block-hero__btn {
  padding: 0.875rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: none;
  font-family: var(--font-heading);
}

.block-hero__btn--primary {
  background: white;
  color: var(--color-primary);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.block-hero__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.block-hero__btn--secondary {
  background: transparent;
  color: white;
  border: 2px solid white;
}

.block-hero__btn--secondary:hover {
  background: white;
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* Responsive */
@media (max-width: 768px) {
  .block-hero__title {
    font-size: 2rem;
  }

  .block-hero__subtitle {
    font-size: 1rem;
  }

  .block-hero--small {
    height: 250px;
  }

  .block-hero--medium {
    height: 350px;
  }

  .block-hero--large {
    height: 450px;
  }
}

/* ========================================
   19. TESTIMONIAL BLOCK
   ======================================== */

.block-testimonial {
  margin: 2rem 0;
  position: relative;
}

.block-testimonial--card {
  padding: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  border-left: 4px solid var(--color-primary);
}

.block-testimonial--minimal {
  padding: 1.5rem 0 1.5rem 2rem;
  border-left: 3px solid var(--color-primary);
}

.block-testimonial__quote {
  position: relative;
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--color-text);
  font-style: italic;
  margin: 0 0 1.5rem;
}

.block-testimonial__quote::before {
  content: '"';
  position: absolute;
  top: -0.5rem;
  left: -1.5rem;
  font-size: 4rem;
  color: var(--color-primary);
  opacity: 0.2;
  font-family: Georgia, serif;
  line-height: 1;
}

.block-testimonial__stars {
  display: flex;
  gap: 0.25rem;
  margin-bottom: 1rem;
}

.block-testimonial__stars svg {
  width: 18px;
  height: 18px;
  fill: #F59E0B;
}

.block-testimonial__author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.block-testimonial__avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.block-testimonial__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.block-testimonial__author-info {
  flex: 1;
}

.block-testimonial__author-name {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-text);
  margin: 0;
}

.block-testimonial__author-role {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin: 0.25rem 0 0;
}

/* ========================================
   20. PRICING BLOCK
   ======================================== */

.block-pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  margin: 2rem 0;
}

.block-pricing__plan {
  position: relative;
  padding: 2rem 1.75rem;
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.block-pricing__plan:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.block-pricing__plan--highlighted {
  border-color: var(--color-accent);
  transform: scale(1.05);
  box-shadow: var(--shadow-lg);
}

.block-pricing__plan--highlighted:hover {
  transform: scale(1.05) translateY(-4px);
}

.block-pricing__badge {
  position: absolute;
  top: -12px;
  right: 1.5rem;
  padding: 0.375rem 1rem;
  background: var(--color-accent);
  color: white;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  border-radius: 999px;
}

.block-pricing__name {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.5rem;
}

.block-pricing__description {
  font-size: 0.9rem;
  color: var(--color-text-light);
  margin: 0 0 1.5rem;
  min-height: 2.7em;
}

.block-pricing__price {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.block-pricing__currency {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text-light);
}

.block-pricing__amount {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
}

.block-pricing__period {
  font-size: 0.9rem;
  color: var(--color-text-light);
}

.block-pricing__billing {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 1.5rem;
}

.block-pricing__features {
  list-style: none;
  padding: 0;
  margin: 0 0 2rem;
  flex: 1;
}

.block-pricing__feature {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.625rem 0;
  font-size: 0.95rem;
  color: var(--color-text);
}

.block-pricing__feature-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  margin-top: 0.125rem;
}

.block-pricing__feature--included .block-pricing__feature-icon {
  color: #10B981;
}

.block-pricing__feature--excluded {
  opacity: 0.5;
}

.block-pricing__feature--excluded .block-pricing__feature-icon {
  color: #EF4444;
}

.block-pricing__cta {
  width: 100%;
  padding: 0.875rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  text-align: center;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  border: 2px solid var(--color-primary);
  background: transparent;
  color: var(--color-primary);
  font-family: var(--font-heading);
}

.block-pricing__plan--highlighted .block-pricing__cta {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
  border: none;
}

.block-pricing__cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

/* Responsive */
@media (max-width: 768px) {
  .block-pricing {
    grid-template-columns: 1fr;
  }

  .block-pricing__plan--highlighted {
    transform: scale(1);
  }
}

/* ========================================
   21. STATS BLOCK
   ======================================== */

.block-stats {
  display: grid;
  gap: 2rem;
  margin: 2rem 0;
  grid-template-columns: repeat(3, 1fr);
}

.block-stats--cols-2 {
  grid-template-columns: repeat(2, 1fr);
}

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

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

.block-stats__item {
  text-align: center;
  padding: 1.5rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.block-stats__number {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.block-stats__label {
  font-size: 0.95rem;
  color: var(--color-text-light);
  font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
  .block-stats,
  .block-stats--cols-3,
  .block-stats--cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .block-stats--cols-4 {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   22. LOGOS BLOCK
   ======================================== */

.block-logos {
  margin: 2rem 0;
  padding: 2rem 0;
}

.block-logos--grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 2rem;
  align-items: center;
}

.block-logos--marquee {
  overflow: hidden;
  position: relative;
}

.block-logos__track {
  display: flex;
  gap: 3rem;
  align-items: center;
}

.block-logos--marquee .block-logos__track {
  animation: marquee-scroll 30s linear infinite;
  width: max-content;
}

.block-logos__item {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.block-logos__item img {
  max-height: 60px;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

.block-logos--grayscale .block-logos__item img {
  filter: grayscale(100%);
  opacity: 0.6;
  transition: filter 0.3s ease, opacity 0.3s ease;
}

.block-logos--grayscale .block-logos__item:hover img {
  filter: grayscale(0%);
  opacity: 1;
}

/* Responsive */
@media (max-width: 768px) {
  .block-logos--grid {
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 1.5rem;
  }
}

/* ========================================
   23. MARQUEE BLOCK
   ======================================== */

.block-marquee {
  width: 100%;
  overflow: hidden;
  margin: 2rem 0;
  background: var(--color-surface);
  padding: 1.5rem 0;
}

.block-marquee__track {
  display: flex;
  gap: 3rem;
  animation: marquee-scroll 30s linear infinite;
  width: max-content;
}

.block-marquee[data-pause-hover]:hover .block-marquee__track {
  animation-play-state: paused;
}

.block-marquee__item {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
}

@keyframes marquee-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Speed variants (controlled by data-speed attribute) */
.block-marquee[data-speed="slow"] .block-marquee__track {
  animation-duration: 60s;
}

.block-marquee[data-speed="fast"] .block-marquee__track {
  animation-duration: 15s;
}

/* ========================================
   24. COUNTDOWN BLOCK
   ======================================== */

.block-countdown {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
  padding: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
}

.block-countdown__unit {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.block-countdown__number {
  font-family: var(--font-heading);
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.block-countdown__label {
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-light);
}

/* Boxes variant */
.block-countdown--boxes .block-countdown__unit {
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 1.5rem 2rem;
  min-width: 100px;
}

/* Minimal variant */
.block-countdown--minimal .block-countdown__number {
  font-size: 4rem;
}

.block-countdown--minimal .block-countdown__unit {
  padding: 0;
}

/* Responsive */
@media (max-width: 768px) {
  .block-countdown {
    gap: 1rem;
    padding: 1.5rem;
  }

  .block-countdown__number {
    font-size: 2rem;
  }

  .block-countdown--boxes .block-countdown__unit {
    padding: 1rem 1.5rem;
    min-width: 80px;
  }
}

/* ========================================
   25. FORM BLOCK
   ======================================== */

.block-form {
  margin: 2rem 0;
  padding: 2rem;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
}

.block-form__field {
  margin-bottom: 1.5rem;
}

.block-form__label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}

.block-form__input,
.block-form__textarea,
.block-form__select,
.block-form input[type="text"],
.block-form input[type="email"],
.block-form input[type="tel"],
.block-form textarea,
.block-form select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  box-sizing: border-box;
}

.block-form__input:focus,
.block-form__textarea:focus,
.block-form__select:focus,
.block-form input:focus,
.block-form textarea:focus,
.block-form select:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.block-form__textarea,
.block-form textarea {
  min-height: 120px;
  resize: vertical;
}

.block-form label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
  font-family: var(--font-heading);
}

.block-form h3 {
  font-size: 1.5rem;
  margin-bottom: 1rem;
  color: var(--color-text);
}

.block-form__submit {
  width: 100%;
  padding: 0.875rem 2rem;
  border-radius: 10px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  font-family: var(--font-heading);
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.block-form__submit:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4);
}

.block-form__success {
  display: none;
  padding: 1rem;
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid #10B981;
  border-radius: var(--radius-sm);
  color: #10B981;
  font-weight: 600;
  text-align: center;
  margin-top: 1rem;
}

.block-form__success--visible {
  display: block;
}

/* Form & Newsletter message feedback */
.block-message {
  padding: 0.875rem 1.25rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-align: center;
  margin-top: 1rem;
  animation: messageSlideIn 0.3s ease;
}

.block-message--success {
  background: rgba(16, 185, 129, 0.1);
  border: 2px solid #10B981;
  color: #059669;
}

.block-message--error {
  background: rgba(239, 68, 68, 0.1);
  border: 2px solid #EF4444;
  color: #DC2626;
}

@keyframes messageSlideIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ========================================
   26. NEWSLETTER BLOCK
   ======================================== */

.block-newsletter {
  margin: 2rem 0;
  padding: 2rem;
  border-radius: var(--radius-md);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
}

.block-newsletter__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  margin: 0 0 0.75rem;
}

.block-newsletter__description {
  font-size: 0.95rem;
  color: var(--color-text-light);
  margin: 0 0 1.5rem;
}

.block-newsletter__form {
  display: flex;
  gap: 1rem;
}

.block-newsletter__input {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-family: var(--font-body);
  color: var(--color-text);
  background: var(--color-bg);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.block-newsletter__input:focus {
  outline: none;
  border-color: var(--color-accent);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.1);
}

.block-newsletter__button {
  padding: 0.75rem 2rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  font-family: var(--font-heading);
  background: var(--color-accent);
  color: white;
  white-space: nowrap;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.block-newsletter__button:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3);
}

/* Card variant */
.block-newsletter--card {
  text-align: center;
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: white;
  border: none;
}

.block-newsletter--card .block-newsletter__title,
.block-newsletter--card .block-newsletter__description {
  color: white;
}

.block-newsletter--card .block-newsletter__form {
  justify-content: center;
}

.block-newsletter--card .block-newsletter__input {
  background: rgba(255, 255, 255, 0.9);
  border-color: transparent;
}

.block-newsletter--card .block-newsletter__button {
  background: white;
  color: var(--color-primary);
}

/* Inline variant */
.block-newsletter--inline {
  background: transparent;
  border: none;
  padding: 0;
}

.block-newsletter--inline .block-newsletter__form {
  flex-direction: row;
}

/* Responsive */
@media (max-width: 768px) {
  .block-newsletter__form {
    flex-direction: column;
  }

  .block-newsletter__button {
    width: 100%;
  }
}

/* ========================================
   27. BUTTON GROUP BLOCK
   ======================================== */

.block-button-group {
  display: flex;
  gap: 1rem;
  margin: 2rem 0;
  flex-wrap: wrap;
}

.block-button-group--left {
  justify-content: flex-start;
}

.block-button-group--center {
  justify-content: center;
}

.block-button-group--right {
  justify-content: flex-end;
}

/* Stack on mobile */
@media (max-width: 768px) {
  .block-button-group--stack {
    flex-direction: column;
  }

  .block-button-group--stack .block-cta__btn {
    width: 100%;
  }
}

/* ========================================
   28. BLOG GRID BLOCK
   ======================================== */

.block-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin: 2rem 0;
}

.block-blog-grid__post {
  display: flex;
  flex-direction: column;
  background: var(--color-surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}

.block-blog-grid__post:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.block-blog-grid__image {
  width: 100%;
  height: 200px;
  overflow: hidden;
  background: var(--color-border);
}

.block-blog-grid__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.block-blog-grid__post:hover .block-blog-grid__image img {
  transform: scale(1.05);
}

.block-blog-grid__content {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.block-blog-grid__date {
  font-size: 0.875rem;
  color: var(--color-text-light);
  margin-bottom: 0.75rem;
}

.block-blog-grid__title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 0.75rem;
  line-height: 1.4;
}

.block-blog-grid__excerpt {
  font-size: 0.95rem;
  color: var(--color-text-light);
  line-height: 1.6;
  margin: 0;
  flex: 1;
}

/* Responsive */
@media (max-width: 1024px) {
  .block-blog-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .block-blog-grid {
    grid-template-columns: 1fr;
  }
}

/* ========================================
   29. MAP BLOCK
   ======================================== */

.block-map {
  margin: 2rem 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.block-map iframe {
  width: 100%;
  height: 450px;
  border: none;
  display: block;
}

/* ========================================
   30. CUSTOM HTML BLOCK
   ======================================== */

.block-custom-html {
  margin: 2rem 0;
}

/* No special styles - raw HTML renders as-is */

/* ========================================
   DARK MODE - NEW BLOCKS
   ======================================== */

/* Accordion */
[data-theme="dark"] .block-accordion__item {
  border-color: #334155;
}

[data-theme="dark"] .block-accordion__trigger {
  background: #1E293B;
  color: #F1F5F9;
}

[data-theme="dark"] .block-accordion__trigger:hover {
  background: #334155;
}

[data-theme="dark"] .block-accordion__item--open .block-accordion__trigger {
  background: #334155;
}

[data-theme="dark"] .block-accordion__answer {
  background: #1E293B;
}

/* Table */
[data-theme="dark"] .block-table th {
  background: var(--color-primary);
}

[data-theme="dark"] .block-table td {
  border-bottom-color: #334155;
  color: #F1F5F9;
}

[data-theme="dark"] .block-table--striped tbody tr:nth-child(even) {
  background: #1E293B;
}

[data-theme="dark"] .block-table--bordered td,
[data-theme="dark"] .block-table--bordered th {
  border-color: #334155;
}

/* Gallery */
[data-theme="dark"] .block-gallery__item {
  background: #1E293B;
}

/* Icon Box */
[data-theme="dark"] .block-icon-box {
  background: #1E293B;
  border-color: #334155;
}

[data-theme="dark"] .block-icon-box__title {
  color: #F1F5F9;
}

/* Testimonial */
[data-theme="dark"] .block-testimonial--card {
  background: #1E293B;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .block-testimonial__quote {
  color: #F1F5F9;
}

[data-theme="dark"] .block-testimonial__author-name {
  color: #F1F5F9;
}

/* Pricing */
[data-theme="dark"] .block-pricing__plan {
  background: #1E293B;
  border-color: #334155;
}

[data-theme="dark"] .block-pricing__name {
  color: #F1F5F9;
}

/* Stats */
[data-theme="dark"] .block-stats__item {
  background: #1E293B;
  border-color: #334155;
}

/* Countdown */
[data-theme="dark"] .block-countdown {
  background: #1E293B;
}

[data-theme="dark"] .block-countdown--boxes .block-countdown__unit {
  background: #0F172A;
  border-color: #334155;
}

/* Form */
[data-theme="dark"] .block-form {
  background: #1E293B;
  border-color: #334155;
}

[data-theme="dark"] .block-form__label {
  color: #F1F5F9;
}

[data-theme="dark"] .block-form__input,
[data-theme="dark"] .block-form__textarea,
[data-theme="dark"] .block-form__select {
  background: #0F172A;
  border-color: #334155;
  color: #F1F5F9;
}

/* Newsletter */
[data-theme="dark"] .block-newsletter {
  background: #1E293B;
  border-color: #334155;
}

[data-theme="dark"] .block-newsletter__title {
  color: #F1F5F9;
}

[data-theme="dark"] .block-newsletter__input {
  background: #0F172A;
  border-color: #334155;
  color: #F1F5F9;
}

/* Blog Grid */
[data-theme="dark"] .block-blog-grid__post {
  background: #1E293B;
  border-color: #334155;
}

[data-theme="dark"] .block-blog-grid__title {
  color: #F1F5F9;
}

/* Marquee */
[data-theme="dark"] .block-marquee {
  background: #1E293B;
}

[data-theme="dark"] .block-marquee__item {
  color: #F1F5F9;
}

/* ========================================
   ACCESSIBILITY - NEW BLOCKS
   ======================================== */

.block-accordion__trigger:focus-visible,
.block-form__input:focus-visible,
.block-form__textarea:focus-visible,
.block-form__select:focus-visible,
.block-newsletter__input:focus-visible,
.block-newsletter__button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 4px;
}

/* ========================================
   REDUCED MOTION - NEW BLOCKS
   ======================================== */

@media (prefers-reduced-motion: reduce) {
  .block-accordion__chevron,
  .block-accordion__answer,
  .block-gallery__item img,
  .block-icon-box,
  .block-hero__btn,
  .block-pricing__plan,
  .block-logos__item img,
  .block-marquee__track,
  .block-form__submit,
  .block-newsletter__button,
  .block-blog-grid__post,
  .block-blog-grid__image img {
    transition: none;
    animation: none;
  }
}

/* ========================================
   PRINT STYLES - NEW BLOCKS
   ======================================== */

@media print {
  .block-accordion__answer {
    max-height: none !important;
    overflow: visible !important;
  }

  .block-hero,
  .block-video,
  .block-form,
  .block-newsletter,
  .block-button-group,
  .block-map {
    display: none;
  }

  .block-pricing,
  .block-blog-grid,
  .block-gallery {
    page-break-inside: avoid;
  }
}
