/**
 * Custom CSS for umzugsspezialist.at
 * Leaf-shaped image borders and dotted background pattern
 * 
 * Usage:
 * - Add IDs to WPBakery image elements: leaf-image-tl, leaf-image-tr, leaf-image-bl, leaf-image-br
 * - Add class "punkt-hintergrund" to the parent row for the dotted background
 */

/* ============================================
   LEAF IMAGE STYLING
   ============================================ */

/* Base styling for all leaf images - make them square and apply shine */
#leaf-image-tl img,
#leaf-image-tr img,
#leaf-image-bl img,
#leaf-image-br img {
    width: 170px !important;
    height: 170px !important;
    max-width: 100% !important;
    aspect-ratio: 1 / 1 !important;
    display: block;
    object-fit: cover;
    /* This creates the inner "shiny" gloss effect */
    box-shadow: inset 0 0 12px rgba(255, 255, 255, 0.4) !important;
}

/* Gradient + Shiny Border implementation using the wrapper */
#leaf-image-tl .vc_single_image-wrapper,
#leaf-image-tr .vc_single_image-wrapper,
#leaf-image-bl .vc_single_image-wrapper,
#leaf-image-br .vc_single_image-wrapper {
    display: inline-block !important;
    padding: 6px !important; /* This is the border width */
    background: linear-gradient(135deg, #E68A5C 0%, #ffdecb 50%, #E68A5C 100%) !important;
    box-shadow: 0 4px 15px rgba(230, 138, 92, 0.4) !important;
    position: relative !important;
    overflow: hidden !important;
}

/* Diagonal Gloss Sheen */
#leaf-image-tl .vc_single_image-wrapper::after,
#leaf-image-tr .vc_single_image-wrapper::after,
#leaf-image-bl .vc_single_image-wrapper::after,
#leaf-image-br .vc_single_image-wrapper::after {
    content: "" !important;
    position: absolute !important;
    top: -50% !important;
    left: -50% !important;
    width: 200% !important;
    height: 200% !important;
    background: linear-gradient(45deg, transparent 40%, rgba(255,255,255,0.2) 50%, transparent 60%) !important;
    pointer-events: none !important;
    z-index: 3 !important;
}

/* Top-Left: sharp corner at BOTTOM-RIGHT */
#leaf-image-tl .vc_single_image-wrapper, #leaf-image-tl img { 
    border-radius: 50% 50% 0 50% !important; 
}

/* Top-Right: sharp corner at BOTTOM-LEFT */
#leaf-image-tr .vc_single_image-wrapper, #leaf-image-tr img { 
    border-radius: 50% 50% 50% 0 !important; 
}

/* Bottom-Left: sharp corner at TOP-RIGHT */
#leaf-image-bl .vc_single_image-wrapper, #leaf-image-bl img { 
    border-radius: 50% 0 50% 50% !important; 
}

/* Bottom-Right: sharp corner at TOP-LEFT */
#leaf-image-br .vc_single_image-wrapper, #leaf-image-br img { 
    border-radius: 0 50% 50% 50% !important; 
}

/* ============================================
   DOTTED BACKGROUND PATTERN (LEFT SIDE)
   ============================================ */

/* Target the row containing the leaf images or having the class */
.punkt-hintergrund,
.vc_row:has(#leaf-image-tl) {
    position: relative !important;
}

.punkt-hintergrund::before,
.vc_row:has(#leaf-image-tl)::before {
    content: "" !important;
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important; /* Full width */
    height: 100% !important;
    background-image: radial-gradient(#cccccc 2px, transparent 2px) !important;
    background-size: 25px 25px !important;
    background-position: center !important;
    z-index: 1 !important;
    pointer-events: none !important;
    opacity: 0.8 !important;
    /* Fade out to the bottom */
    -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%) !important;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 0%, rgba(0,0,0,1) 50%, rgba(0,0,0,0) 100%) !important;
}

/* Ensure leaf images stay above the dots */
#leaf-image-tl, #leaf-image-tr, #leaf-image-bl, #leaf-image-br {
    position: relative !important;
    z-index: 2 !important;
}

/* ============================================
   FORCE 2x2 GRID LAYOUT
   Fix for WPBakery missing vc_col-xs-6 on bottom row
   ============================================ */

/* Force the columns containing leaf images to be 50% width on all screens */
#leaf-image-tl,
#leaf-image-tr,
#leaf-image-bl,
#leaf-image-br {
    display: inline-block;
    vertical-align: top;
}

/* Target the parent column containers and force 50% width */
.wpb_column:has(#leaf-image-tl),
.wpb_column:has(#leaf-image-tr),
.wpb_column:has(#leaf-image-bl),
.wpb_column:has(#leaf-image-br),
.vc_column_container:has(#leaf-image-tl),
.vc_column_container:has(#leaf-image-tr),
.vc_column_container:has(#leaf-image-bl),
.vc_column_container:has(#leaf-image-br) {
    width: 50% !important;
    float: left !important;
}

/* Align images toward the center to close the large screen gap */
.wpb_column:has(#leaf-image-tl) .wpb_wrapper,
.wpb_column:has(#leaf-image-bl) .wpb_wrapper,
.vc_column_container:has(#leaf-image-tl) .vc_single_image-wrapper,
.vc_column_container:has(#leaf-image-bl) .vc_single_image-wrapper {
    text-align: right !important;
}

.wpb_column:has(#leaf-image-tr) .wpb_wrapper,
.wpb_column:has(#leaf-image-br) .wpb_wrapper,
.vc_column_container:has(#leaf-image-tr) .vc_single_image-wrapper,
.vc_column_container:has(#leaf-image-br) .vc_single_image-wrapper {
    text-align: left !important;
}

/* Constrain the overall width of the grid row if it has the punkt-hintergrund class */
.vc_row.punkt-hintergrund {
    max-width: 1200px; /* Standard container width */
    margin-left: auto !important;
    margin-right: auto !important;
}

/* If you want the grid itself to be even more compact on desktop: */
@media (min-width: 769px) {
    .vc_row.punkt-hintergrund > .vc_column_container {
        max-width: 210px; /* Each column slightly larger than 200px image */
    }
    .vc_row.punkt-hintergrund {
        display: flex !important;
        justify-content: center !important;
        flex-wrap: wrap !important;
    }
}

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

@media (max-width: 768px) {
    #leaf-image-tl img,
    #leaf-image-tr img,
    #leaf-image-bl img,
    #leaf-image-br img {
        border-width: 4px !important;
    }
}

/* ============================================
   GAP ADJUSTMENTS
   ============================================ */
/* Reduce padding on the columns to close the horizontal gap */
.vc_row.punkt-hintergrund .vc_column_container,
.vc_row.leaf-images-grid .vc_column_container {
    padding-left: 10px !important;
    padding-right: 10px !important;
}

/* Reduce margin on the images to close the vertical gap if needed */
#leaf-image-tl, #leaf-image-tr {
    margin-bottom: 20px !important;
}

/* ============================================
   SERVICE ICONS REPOSITIONING
   ============================================ */
/* Service Icon next to Heading - Global Fix */
.vc_inner.vc_row-fluid:has(.wpb_single_image):has(h3) {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
    margin-bottom: 20px !important;
}

/* Ensure columns don't stack and have correct width */
.vc_inner.vc_row-fluid:has(.wpb_single_image):has(h3) > .vc_column_container {
    width: auto !important;
    float: none !important;
}

/* Icon column - restrict width */
.vc_inner.vc_row-fluid:has(.wpb_single_image):has(h3) > .vc_col-sm-3 {
    width: 60px !important; /* Fixed width for small icon */
    flex: 0 0 60px !important;
    margin-right: 15px !important;
    padding: 0 !important;
}

/* Text column - take remaining space */
.vc_inner.vc_row-fluid:has(.wpb_single_image):has(h3) > .vc_col-sm-9 {
    flex: 1 !important;
    padding: 0 !important;
}

/* Icon size adjustment */
.vc_inner.vc_row-fluid:has(.wpb_single_image):has(h3) .vc_single_image-img {
    width: 50px !important;
    height: auto !important;
}

/* Remove default margins that might break alignment */
.vc_inner.vc_row-fluid:has(.wpb_single_image):has(h3) h3 {
    margin: 0 !important;
}

/* ============================================
   PROCESS SECTION (VERTICAL TIMELINE)
   ============================================ */

.umzug-process-container {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.process-label {
    color: #e31e24; /* Theme Red */
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1px;
    display: block;
    margin-bottom: 10px;
}

.process-header h2 {
    color: #002d62; /* Dark Blue */
    font-size: 32px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 40px;
    text-transform: uppercase;
}

.process-timeline {
    position: relative;
    padding-left: 20px;
}

/* The vertical line */
.process-timeline::before {
    content: '';
    position: absolute;
    left: 45px;
    top: 10px;
    bottom: 40px;
    width: 2px;
    background-color: #e31e24;
}

.process-step {
    display: flex;
    align-items: flex-start;
    margin-bottom: 40px;
    position: relative;
}

.step-number-box {
    background-color: #e31e24;
    color: #fff;
    width: 50px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 18px;
    flex-shrink: 0;
    z-index: 2;
    margin-right: 25px;
    /* Angle shape like in the image */
    clip-path: polygon(15% 0%, 100% 0%, 85% 100%, 0% 100%);
}

.step-content {
    flex-grow: 1;
}

.step-content h4 {
    color: #002d62 !important;
    font-size: 20px !important;
    font-weight: 700 !important;
    margin: 0 0 10px 0 !important;
    line-height: 1.3 !important;
}

.step-content p {
    color: #666;
    font-size: 16px;
    line-height: 1.5;
    margin: 0;
}

/* Standout Box */
.process-standout-box {
    margin-top: 50px;
    border-top: 2px solid #eee;
    padding-top: 30px;
}

.process-highlight-text {
    font-size: 18px;
    font-weight: 700;
    color: #002d62;
    margin-bottom: 25px;
}

.savings-callout {
    background: linear-gradient(135deg, #f9f9f9 0%, #ffffff 100%);
    border-left: 5px solid #e31e24;
    padding: 25px;
    border-radius: 0 8px 8px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.savings-callout p {
    margin-bottom: 10px;
    font-size: 16px;
}

.savings-callout p strong {
    color: #e31e24;
    font-size: 20px;
    display: block;
    margin-bottom: 5px;
}

@media (max-width: 767px) {
    .process-timeline::before {
        left: 35px;
    }
    .step-number-box {
        width: 40px;
        height: 30px;
        font-size: 16px;
        margin-right: 15px;
    }
}
