/**
 * WPHub Blocks - Static CSS
 * Стили для кастомных Gutenberg блоков
 * Использует CSS переменные из inline стилей
 */

/* ==========================================================================
   WORDPRESS BLOCK TABLE
   ========================================================================== */

.wp-block-table thead {
    border-bottom: none !important;
}

/* ==========================================================================
   CTA SECTION BLOCK
   ========================================================================== */

.sjwh-wp-block-wphub-cta-section {
    position: relative;
    overflow: hidden;
    display: flex;
    align-content: center;
    width: 100%;
    margin: 2rem 0 4rem 0;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--color-header-bg), var(--color-primary));
    min-height: auto;
    height: auto;
    text-align: center;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse {
    min-height: 500px !important;
}

.sjwh-wp-block-wphub-cta-section.animate-in-view {
    opacity: 1;
    transform: translateY(0);
}

.sjwh-wp-block-wphub-cta-section .sjwh-cta-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
    pointer-events: none;
}

.sjwh-wp-block-wphub-cta-section .sjwh-cta-content {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 100%;
}

.sjwh-wp-block-wphub-cta-section.has-image.sjwh-cta-layout-split .sjwh-cta-split-content,
.sjwh-wp-block-wphub-cta-section.has-image.sjwh-cta-layout-split-reverse .sjwh-cta-split-content,
.sjwh-wp-block-wphub-cta-section.has-image.sjwh-cta-style-split .sjwh-cta-split-content,
.sjwh-wp-block-wphub-cta-section.has-image.sjwh-cta-style-split-reverse .sjwh-cta-split-content,
.sjwh-wp-block-wphub-cta-section.has-background-image.sjwh-cta-layout-split .sjwh-cta-split-content,
.sjwh-wp-block-wphub-cta-section.has-background-image.sjwh-cta-layout-split-reverse .sjwh-cta-split-content,
.sjwh-wp-block-wphub-cta-section.has-background-image.sjwh-cta-style-split .sjwh-cta-split-content,
.sjwh-wp-block-wphub-cta-section.has-background-image.sjwh-cta-style-split-reverse .sjwh-cta-split-content {
    position: relative;
    z-index: 100 !important;
}

/* Default Style */
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-default {
    justify-content: center;
    align-items: center;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-default .sjwh-cta-content {
    margin: 0 auto;
    width: 100%;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-default .sjwh-cta-section-container {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Split Styles */
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse {
    display: flex !important;
    align-items: stretch;
    min-height: auto;
    padding: 0 !important;
}

/* Override padding for split layouts */
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split.sjwh-cta-padding-xs,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split.sjwh-cta-padding-s,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split.sjwh-cta-padding-small,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split.sjwh-cta-padding-medium,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split.sjwh-cta-padding-large,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse.sjwh-cta-padding-xs,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse.sjwh-cta-padding-s,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse.sjwh-cta-padding-small,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse.sjwh-cta-padding-medium,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse.sjwh-cta-padding-large,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split.sjwh-cta-padding-xs,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split.sjwh-cta-padding-s,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split.sjwh-cta-padding-small,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split.sjwh-cta-padding-medium,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split.sjwh-cta-padding-large,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse.sjwh-cta-padding-xs,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse.sjwh-cta-padding-s,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse.sjwh-cta-padding-small,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse.sjwh-cta-padding-medium,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse.sjwh-cta-padding-large {
    padding: 0 !important;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-section-container,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-section-container,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split .sjwh-cta-section-container,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse .sjwh-cta-section-container {
    display: flex !important;
    width: 100%;
    align-items: stretch;
    min-height: 500px !important;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-content,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-content {
    flex: 0 0 50%;
    width: 50%;
    min-height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    box-sizing: border-box;
    background: inherit;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-image,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-image {
    flex: 0 0 50%;
    width: 50%;
    min-height: 100%;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-image img,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Reverse direction */
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse .sjwh-cta-section-container,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-section-container {
    flex-direction: row !important;
}

/* Height variants */
.sjwh-wp-block-wphub-cta-section.sjwh-cta-height-small {
    min-height: 300px !important;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-height-medium {
    min-height: 400px !important;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-height-large {
    min-height: 500px !important;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-height-auto {
    min-height: auto !important;
    height: auto !important;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-height-fullscreen {
    min-height: 100vh !important;
}

/* Content inner */
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split .sjwh-cta-content-inner,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse .sjwh-cta-content-inner,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-content-inner,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-content-inner {
    width: 100%;
    max-width: 100%;
    position: relative;
    z-index: 11 !important;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-content-inner,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-content-inner {
    width: 100%;
    max-width: 600px;
}

/* Section container */
.sjwh-wp-block-wphub-cta-section .sjwh-cta-section-container {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: stretch;
    position: relative;
    z-index: 5;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split .sjwh-cta-section-container,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-section-container {
    flex-direction: row !important;
}

/* Split content */
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split .sjwh-cta-split-content,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse .sjwh-cta-split-content,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-split-content,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-split-content {
    flex: 1 1 50% !important;
    width: 50% !important;
    max-width: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    padding: 50px 40px;
    box-sizing: border-box;
    min-height: 500px !important;
    background: inherit;
    position: relative;
    z-index: 10 !important;
}

/* Padding variants */
.sjwh-wp-block-wphub-cta-section.sjwh-cta-padding-xs .sjwh-cta-split-content {
    padding: 10px 15px !important;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-padding-s .sjwh-cta-split-content {
    padding: 20px 25px !important;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-padding-small .sjwh-cta-split-content {
    padding: 30px 35px !important;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-padding-medium .sjwh-cta-split-content {
    padding: 50px 40px !important;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-padding-large .sjwh-cta-split-content {
    padding: 80px 50px !important;
}

/* Text alignment for split content */
.sjwh-wp-block-wphub-cta-section.text-left .sjwh-cta-split-content {
    justify-content: flex-start !important;
}

.sjwh-wp-block-wphub-cta-section.text-right .sjwh-cta-split-content {
    justify-content: flex-end !important;
}

/* Split visual */
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split .sjwh-cta-split-visual,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse .sjwh-cta-split-visual,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-split-visual,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-split-visual {
    flex: 1 1 50% !important;
    width: 50% !important;
    max-width: 50% !important;
    min-height: 500px !important;
    position: relative;
    overflow: hidden;
    z-index: 0;
}

/* Split image */
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split .sjwh-cta-split-image,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse .sjwh-cta-split-image,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-split-image,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-split-image {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    object-position: center !important;
    min-width: 100% !important;
    min-height: 100% !important;
    border-radius: 0 !important;
    filter: none !important;
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
}

.sjwh-wp-block-wphub-cta-section .sjwh-cta-split-image:hover {
    transform: none !important;
    filter: none !important;
    opacity: 1 !important;
    border-radius: 0 !important;
}

/* Hide split elements in default layout */
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-default .sjwh-cta-split-content,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-default .sjwh-cta-split-visual,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-default .sjwh-cta-split-content,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-default .sjwh-cta-split-visual {
    display: none !important;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-default .sjwh-cta-content,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-default .sjwh-cta-content {
    display: block !important;
}

/* Hide default content in split layouts */
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split .sjwh-cta-content,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse .sjwh-cta-content,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-content,
.sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-content {
    display: none !important;
}

/* Default layout */
.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-default .sjwh-cta-section-container {
    justify-content: center;
    align-items: center;
}

.sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-default .sjwh-cta-content {
    width: 100%;
    padding: 10px;
}

/* Text alignment */
.sjwh-wp-block-wphub-cta-section.text-left,
.sjwh-wp-block-wphub-cta-section.text-left .sjwh-cta-content,
.sjwh-wp-block-wphub-cta-section.text-left .sjwh-cta-content-inner,
.sjwh-wp-block-wphub-cta-section.text-left .sjwh-cta-split-content {
    text-align: left !important;
}

.sjwh-wp-block-wphub-cta-section.text-center,
.sjwh-wp-block-wphub-cta-section.text-center .sjwh-cta-content,
.sjwh-wp-block-wphub-cta-section.text-center .sjwh-cta-content-inner,
.sjwh-wp-block-wphub-cta-section.text-center .sjwh-cta-split-content {
    text-align: center !important;
}

.sjwh-wp-block-wphub-cta-section.text-right,
.sjwh-wp-block-wphub-cta-section.text-right .sjwh-cta-content,
.sjwh-wp-block-wphub-cta-section.text-right .sjwh-cta-content-inner,
.sjwh-wp-block-wphub-cta-section.text-right .sjwh-cta-split-content {
    text-align: right !important;
}

/* Button wrapper alignment */
.sjwh-wp-block-wphub-cta-section.text-left .sjwh-cta-button-wrapper {
    display: flex;
    justify-content: flex-start !important;
}

.sjwh-wp-block-wphub-cta-section.text-center .sjwh-cta-button-wrapper {
    display: flex;
    justify-content: center !important;
}

.sjwh-wp-block-wphub-cta-section.text-right .sjwh-cta-button-wrapper {
    display: flex;
    justify-content: flex-end !important;
}

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

@media (max-width: 991px) {
    /* Stack split layouts vertically on tablets and mobile */
    .sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split .sjwh-cta-section-container,
    .sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse .sjwh-cta-section-container,
    .sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-section-container,
    .sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-section-container {
        flex-direction: column !important;
    }

    .sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split .sjwh-cta-split-content,
    .sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse .sjwh-cta-split-content,
    .sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split .sjwh-cta-split-visual,
    .sjwh-wp-block-wphub-cta-section.sjwh-cta-layout-split-reverse .sjwh-cta-split-visual,
    .sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-split-content,
    .sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-split-content,
    .sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-content,
    .sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-content,
    .sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split .sjwh-cta-image,
    .sjwh-wp-block-wphub-cta-section.sjwh-cta-style-split-reverse .sjwh-cta-image {
        flex: 1 1 100% !important;
        width: 100% !important;
        max-width: 100% !important;
        min-height: 300px !important;
    }
}
