/**
 * Advanced Paragraph Components CSS
 * Styles for Advanced Image, Video, Icon, and Divider paragraphs
 */

/* =============================================================================
   IMAGE BLOCK COMPONENT
   ============================================================================= */

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

.image-block__container {
  max-width: 100%;
}

.image-block__wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
}

.image-block__placeholder {
  padding: 2rem;
  text-align: center;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 0.5rem;
  color: #6c757d;
}

/* =============================================================================
   VIDEO BLOCK COMPONENT  
   ============================================================================= */

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

.video-block__container {
  max-width: 100%;
}

.video-block__wrapper {
  position: relative;
  width: 100%;
  max-width: 100%;
}

.video-block__iframe,
.video-block__video {
  max-width: 100%;
  height: auto;
  border-radius: 0.5rem;
}

.video-block__placeholder {
  padding: 3rem 2rem;
  text-align: center;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 0.5rem;
  color: #6c757d;
}

/* =============================================================================
   ICON BLOCK COMPONENT
   ============================================================================= */

.icon-block {
  margin-bottom: 2rem;
  text-align: center;
}

.icon-block__container {
  display: inline-block;
}

.icon-block__wrapper {
  display: inline-block;
}

.icon-block__icon {
  display: inline-block;
  line-height: 1;
}

.icon-block__placeholder {
  padding: 2rem;
  text-align: center;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 0.5rem;
  color: #6c757d;
}

/* =============================================================================
   DIVIDER BLOCK COMPONENT
   ============================================================================= */

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

.divider-block__container {
  width: 100%;
  text-align: center;
}

.divider-block__line {
  display: block;
  border: none;
}

/* =============================================================================
   ADVANCED IMAGE COMPONENT (Legacy)
   ============================================================================= */

.advanced-image {
  margin-bottom: 2rem;
}

.advanced-image__container {
  display: inline-block;
  max-width: 100%;
}

.advanced-image__wrapper {
  position: relative;
  overflow: hidden;
  display: inline-block;
  max-width: 100%;
}

.advanced-image__wrapper img {
  max-width: 100%;
  height: auto;
  display: block;
  transition: all 0.3s ease;
}

.advanced-image__link {
  text-decoration: none;
  display: inline-block;
}

/* Image Size Options */
.advanced-image--size-cover .advanced-image__wrapper {
  width: 100%;
  height: 300px;
}

.advanced-image--size-cover .advanced-image__wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.advanced-image--size-contain .advanced-image__wrapper img {
  object-fit: contain;
}

/* Hover Effects */
.advanced-image--hover-zoom .advanced-image__wrapper:hover img {
  transform: scale(1.1);
}

.advanced-image--hover-zoom_out .advanced-image__wrapper:hover img {
  transform: scale(0.9);
}

.advanced-image--hover-fade .advanced-image__wrapper:hover img {
  opacity: 0.7;
}

.advanced-image--hover-blur .advanced-image__wrapper:hover img {
  filter: blur(2px);
}

.advanced-image--hover-grayscale .advanced-image__wrapper:hover img {
  filter: grayscale(100%);
}

/* Alignment */
.advanced-image--align-center {
  text-align: center;
}

.advanced-image--align-right {
  text-align: right;
}

/* =============================================================================
   ADVANCED VIDEO COMPONENT
   ============================================================================= */

.advanced-video {
  margin-bottom: 2rem;
}

.advanced-video__container {
  max-width: 100%;
}

.advanced-video__wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  background: #000;
  border-radius: inherit;
}

.advanced-video__iframe,
.advanced-video__video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: inherit;
}

.advanced-video__embed {
  position: relative;
  width: 100%;
}

.advanced-video__placeholder {
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  padding: 3rem 2rem;
  text-align: center;
  color: #6c757d;
  border-radius: 0.5rem;
}

/* Alignment */
.advanced-video--align-center .advanced-video__wrapper {
  margin: 0 auto;
}

.advanced-video--align-right .advanced-video__wrapper {
  margin-left: auto;
}

/* =============================================================================
   ADVANCED ICON COMPONENT
   ============================================================================= */

.advanced-icon {
  margin-bottom: 2rem;
}

.advanced-icon__container {
  display: inline-block;
}

.advanced-icon__wrapper {
  display: inline-block;
}

.advanced-icon__icon {
  display: inline-block;
  line-height: 1;
  transition: all 0.3s ease;
}

.advanced-icon__image {
  display: inline-block;
  max-width: 100%;
  height: auto;
}

.advanced-icon__svg {
  display: inline-block;
  line-height: 1;
}

.advanced-icon__svg svg {
  width: 1em;
  height: 1em;
  fill: currentColor;
}

.advanced-icon__placeholder {
  text-align: center;
  padding: 1rem;
  background: #f8f9fa;
  border: 2px dashed #dee2e6;
  border-radius: 0.5rem;
}

.advanced-icon__placeholder p {
  margin: 0.5rem 0 0 0;
  color: #6c757d;
}

/* Icon Hover Effects */
.advanced-icon__wrapper:hover .advanced-icon__icon {
  transform: scale(1.1);
}

/* Alignment */
.advanced-icon--align-center {
  text-align: center;
}

.advanced-icon--align-right {
  text-align: right;
}

/* =============================================================================
   ADVANCED DIVIDER COMPONENT
   ============================================================================= */

.advanced-divider {
  margin: 2rem 0;
}

.advanced-divider__container {
  width: 100%;
}

.advanced-divider__line {
  margin: 0 auto;
  border: none;
}

.advanced-divider__decorative {
  text-align: center;
  font-size: 2rem;
  line-height: 1;
}

.advanced-divider__ornament {
  display: inline-block;
  padding: 0 1rem;
  background: white;
  position: relative;
}

.advanced-divider__ornament::before {
  content: '';
  position: absolute;
  top: 50%;
  left: -100px;
  right: calc(100% + 100px);
  height: 1px;
  background: currentColor;
  opacity: 0.3;
}

.advanced-divider__ornament::after {
  content: '';
  position: absolute;
  top: 50%;
  right: -100px;
  left: calc(100% + 100px);
  height: 1px;
  background: currentColor;
  opacity: 0.3;
}

/* Alignment */
.advanced-divider--align-left .advanced-divider__line {
  margin-left: 0;
}

.advanced-divider--align-right .advanced-divider__line {
  margin-right: 0;
}

/* =============================================================================
   RESPONSIVE STYLES
   ============================================================================= */

@media (max-width: 768px) {
  .advanced-image--size-cover .advanced-image__wrapper {
    height: 200px;
  }
  
  .advanced-video__wrapper {
    padding-bottom: 75%; /* More square on mobile */
  }
  
  .advanced-icon__placeholder {
    padding: 0.75rem;
  }
  
  .advanced-divider {
    margin: 1.5rem 0;
  }
  
  .advanced-divider__decorative {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  .advanced-image,
  .advanced-video,
  .advanced-icon,
  .advanced-divider {
    margin-bottom: 1.5rem;
  }
  
  .advanced-video__placeholder {
    padding: 2rem 1rem;
  }
  
  .advanced-divider__ornament::before,
  .advanced-divider__ornament::after {
    left: -50px;
    right: calc(100% + 50px);
  }
  
  .advanced-divider__ornament::after {
    right: -50px;
    left: calc(100% + 50px);
  }
}

