/*
 * Gutenberg Blocks Styles
 * =======================
 * Styles for block editor content, including wide and full-width alignments
 */

/* Block editor content wrapper */
.block-editor-content {
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scroll from full-width elements */
}

/* Default content container - centered with max-width matching classic layout */
.block-editor-content #content {
  max-width: 1410px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 15px;
  padding-right: 15px;
}

/* Wide alignment - slightly wider than content */
.block-editor-content .alignwide {
  max-width: 1600px;
  margin-left: calc(50% - 800px);
  margin-right: calc(50% - 800px);
  width: auto;
}

/* Full width alignment - spans entire viewport, breaks out of container */
.block-editor-content .alignfull {
  width: 100vw;
  max-width: 100vw;
  margin-left: calc(-50vw + 50%);
  margin-right: calc(-50vw + 50%);
}

/* Ensure full-width covers and groups work properly */
.block-editor-content .wp-block-cover.alignfull,
.block-editor-content .wp-block-group.alignfull,
.block-editor-content .wp-block-image.alignfull {
  width: 100vw;
  max-width: 100vw;
}

/* Responsive adjustments for wide blocks */
@media (max-width: 1630px) {
  .block-editor-content .alignwide {
    margin-left: 15px;
    margin-right: 15px;
    width: auto;
    max-width: none;
  }
}

/* Video embeds */
.wp-block-video video {
  max-width: 100%;
}

.wp-block-image img {
  display: block;
}

.wp-block-image.alignfull img {
  width: 100%;
}

/* Gallery */
.wp-block-gallery:not(.components-placeholder) {
  margin: 1.5em auto;
}

/* Cover text */
.wp-block-cover-text p {
  padding: 1.5em 14px;
}

/* Tables */
.wp-block-table {
  display: block;
  overflow-x: auto;
}

.wp-block-table table {
  border-collapse: collapse;
  width: 100%;
}

.wp-block-table td,
.wp-block-table th {
  padding: .5em;
}

/* Embeds */
.wp-block-embed.type-video > .wp-block-embed__wrapper {
  position: relative;
  width: 100%;
  height: 0;
  padding-top: 56.25%;
}

.wp-block-embed.type-video > .wp-block-embed__wrapper > iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
}

/* Quotes */
.wp-block-quote.is-large {
  margin: 0 auto 16px;
}

.wp-block-pullquote > p:first-child {
  margin-top: 0;
}

/* Separator */
.wp-block-separator {
  margin: 3em auto;
  padding: 0;
}

@media screen and (min-width: 768px) {
  .wp-block-cover-text p {
    padding: 1.5em 0;
  }
}

/* Homepage block cards - remove hover shift, add permanent shadow */
.wp-block-group.has-light-grey-background-color {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: none !important;
  transform: none !important;
}

.wp-block-group.has-light-grey-background-color:hover {
  transform: none !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Remove hover effects from parent containers (rows/columns) */
.wp-block-group.has-white-background-color,
.wp-block-group.has-background,
.wp-block-columns {
  transition: none !important;
  transform: none !important;
}

.wp-block-group.has-white-background-color:hover,
.wp-block-group.has-background:hover,
.wp-block-columns:hover {
  transform: none !important;
}
