/* ===================================================
   ColorBlock Portlet Styles
   Gradient-basierter Content-Block mit Scroll-Rotation
   =================================================== */

.opc-ColorBlock {
    position: relative;
    min-height: 100px;
    overflow-y: visible; /* Shapes können nach oben/unten rausragen */
}

/* Fullwidth-Modus: Shapes über volle Breite */
.opc-ColorBlock--fullwidth {
    /* Shapes können volle Breite nutzen */
}

/* Im Fullwidth-Modus: Container bleibt zentriert, aber breiter */
.opc-ColorBlock--fullwidth > .container {
    max-width: 100% !important;
    padding-left: 2rem;
    padding-right: 2rem;
}

/* Content Box Styles */
.opc-ColorBlock .container > .row {
    position: relative;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    overflow: hidden; /* Verhindert horizontales Scrolling durch negative Margins */
}

/* Bilder: Max-Width für sichere Darstellung */
.opc-ColorBlock .colorblock-image {
    max-width: 100%;
    height: auto;
}

/* Image Rotation Animation */
.opc-ColorBlock .colorblock-image {
    transition: transform 0.3s ease-out;
    will-change: transform;
}

.opc-ColorBlock .colorblock-image.rotate-on-scroll {
    transform-origin: center center;
}

/* Gradient Text Styles */
.opc-ColorBlock h2 span {
    display: inline-block;
    font-weight: 600;
    word-wrap: break-word;
    overflow-wrap: break-word;
    max-width: 100%;
}

/* Headline Styles */
.opc-ColorBlock h1 {
    line-height: 1.2;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
}

.opc-ColorBlock h1 .font-weight-bold {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.opc-ColorBlock h1 .text-lighten {
    font-weight: 300;
    opacity: 0.85;
}

/* Feature Grid */
.opc-ColorBlock .row .col-xl-6,
.opc-ColorBlock .row .col-12 {
    padding: 0.5rem 1rem;
}

.opc-ColorBlock .row .col-xl-6 h3,
.opc-ColorBlock .row .col-12 h3 {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.opc-ColorBlock .row .col-xl-6 p,
.opc-ColorBlock .row .col-12 p {
    font-size: 0.95rem;
    line-height: 1.5;
    margin-bottom: 0;
}

/* Icon Styles */
.opc-ColorBlock [class*="fa-"] {
    display: inline-block;
}

/* Button Styles */
.opc-ColorBlock .opc-Button .btn {
    padding: 0.75rem 2rem;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* ===================================================
   DECORATIVE SHAPES - JTL CI Style
   =================================================== */

/* Base Shape Styling */
.opc-ColorBlock .colorblock-shape {
    position: absolute;
    z-index: 0;
    pointer-events: none;
    opacity: 0.95;
    transition: transform 0.3s ease-out;
    will-change: transform;
}

/* ===== SHAPE 1: INNER - Unten seitlich ===== */
.opc-ColorBlock .colorblock-shape-inner {
    width: 450px;
    height: 350px;
    bottom: 0;
    border-radius: 60px;
}

/* Inner Shape - Rechts (Bild links) */
.opc-ColorBlock .colorblock-shape-inner.shape-position-right {
    right: 0;
    transform: rotate(-22deg) skewY(-5deg) translateY(40%) translateX(15%);
}

/* Inner Shape - Links (Bild rechts) */
.opc-ColorBlock .colorblock-shape-inner.shape-position-left {
    left: 0;
    transform: rotate(22deg) skewY(5deg) translateY(40%) translateX(-15%);
}

/* ===== SHAPE 2: EDGE - Mittig oben am Container ===== */
.opc-ColorBlock .colorblock-shape-edge {
    z-index: -1;
    width: 500px;
    height: 450px;
    top: -150px; /* Teilweise hinter Container */
    left: 50%; /* Horizontal zentriert */
    border-radius: 80px;
    opacity: 0.85;
}

/* Edge Shape - Leicht rechts versetzt (Normal) */
.opc-ColorBlock .colorblock-shape-edge.shape-position-right {
    transform: translateX(-35%) rotate(-25deg) skewY(-4deg);
}

/* Edge Shape - Leicht links versetzt (RTL) */
.opc-ColorBlock .colorblock-shape-edge.shape-position-left {
    transform: translateX(-65%) rotate(25deg) skewY(4deg);
}

/* Responsive Shapes - Tablet */
@media (max-width: 991px) {
    
    /* Inner Shape auf Tablet ausblenden */
    .opc-ColorBlock .colorblock-shape-inner {
        display: none;
    }
    
    .opc-ColorBlock .colorblock-shape-edge {
        width: 380px;
        height: 320px;
        top: -120px;
        left: 50%;
    }
    
    .opc-ColorBlock .colorblock-shape-edge.shape-position-right {
        transform: translateX(-35%) rotate(-25deg) skewY(-4deg);
    }
    
    .opc-ColorBlock .colorblock-shape-edge.shape-position-left {
        transform: translateX(-65%) rotate(25deg) skewY(4deg);
    }
}

/* Responsive Shapes - Mobile */
@media (max-width: 767px) {
    
    /* Inner Shape bleibt ausgeblendet */
    .opc-ColorBlock .colorblock-shape-inner {
        display: none;
    }
    
    .opc-ColorBlock .colorblock-shape-edge {
        width: 260px;
        height: 220px;
        top: -100px;
        left: 50%;
    }
    
    .opc-ColorBlock .colorblock-shape-edge.shape-position-right {
        transform: translateX(-35%) rotate(-25deg) skewY(-4deg);
    }
    
    .opc-ColorBlock .colorblock-shape-edge.shape-position-left {
        transform: translateX(-65%) rotate(25deg) skewY(4deg);
    }
}

/* Content Row - Relative Position für z-index Layering */
.opc-ColorBlock .container > .row {
    position: relative;
    z-index: 1;
}

.opc-ColorBlock .opc-Button .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Tablet Optimizations - Full Width Layout */
@media (min-width: 768px) and (max-width: 1199px) {
    .opc-ColorBlock .row {
        padding: 2rem !important;
    }
    
    /* Image Margin auf Tablet/Laptop deaktivieren (untereinander) */
    .opc-ColorBlock .colorblock-image {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    
    /* Features auf Tablet einzeln */
    .opc-ColorBlock .row .col-12 {
        max-width: 100%;
    }
}

/* Desktop Image Margins - Nur XL+ */
@media (min-width: 1200px) {
    .opc-ColorBlock .colorblock-image {
        max-width: 100%;
        height: auto;
    }
    
    /* Negative Margins erlaubt auf XL+ */
    .opc-ColorBlock .d-none.d-xl-block {
        overflow: visible;
    }
}

/* Preview Mode Styles */
.opc-ColorBlock-preview {
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.opc-ColorBlock-preview h4 {
    font-size: 1.1rem;
    margin-bottom: 0.25rem;
}

.opc-ColorBlock-preview strong {
    font-size: 0.9rem;
    font-weight: 600;
}

/* Accessibility: Reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
    .opc-ColorBlock .colorblock-image.rotate-on-scroll {
        transform: none !important;
        transition: none !important;
    }
    
    .opc-ColorBlock .opc-Button .btn {
        transition: none !important;
    }
}

/* Print Styles */
@media print {
    .opc-ColorBlock {
        background: white !important;
        padding: 1rem !important;
        margin-bottom: 1rem !important;
    }
    
    .opc-ColorBlock .row {
        border: 1px solid #ddd !important;
    }
    
    .opc-ColorBlock .colorblock-image {
        transform: none !important;
    }
}
