/*
Theme Name:   Landeseiten Design Child
Theme URI:    #
Description:  Child theme for Hello Elementor for Landeseiten Design projects.
Author:       Your Name
Author URI:   #
Template:     hello-elementor
Version:      1.0.0
License:      GNU General Public License v2 or later
License URI:  http://www.gnu.org/licenses/gpl-2.0.html
Text Domain:  landeseiten-design-child
*/

/*----------------------------------------------------------------*/
/* Add your custom CSS below this line
/*----------------------------------------------------------------*/


/* =========================================
   1. GLOBAL VARIABLES & SETTINGS
   ================================********* */
:root {
    /* Dimensions */
    --hero-top-padding: 100px;
    --hero-max-height: 1440px;
    
    /* Colors & Gradients */
    /* Adjust these HEX codes if needed to match your exact global colors */
    --ls-gradient-primary: linear-gradient(-72deg, var(--e-global-color-7b94558, #016CDF) 0%, var(--e-global-color-a8a1d84, #64CDE6) 64%, var(--e-global-color-primary, #0FAAFF) 100%);
    
    /* The specific gradient for the Grid Borders */
    --ls-grid-border-gradient: linear-gradient(135deg, #016CDF 0%, #64CDE6 50%, #0FAAFF 100%);
}

html {
    scroll-behavior: auto !important;
}

body {
    overflow-x: hidden;
}

body p, body h1, body h2, body h3, body h4, body h5, body h6,
body .elementor-widget-container {
    padding: 0;
    margin: 0;
    text-wrap: pretty;
}

/* Fix Elementor Page Overflow */
[data-elementor-type="wp-page"],
[data-elementor-type="single-post"] {
    overflow: hidden;
}

/* =========================================
   2. COMPONENTS (Buttons, Forms, Header)
   ================================********* */

/* --- Gravity Forms Button --- */
body .cs-landeseiten-form .gform_button.button.button-next:not(:disabled) {
    background: var(--ls-gradient-primary) !important;
}

/* --- Custom Theme Buttons --- */
.cs-button a {
    background: var(--ls-gradient-primary);
    padding: 18px 32px !important;
    border: none;
    border-radius: 12px;
    font-weight: 600 !important;
    box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.3) !important, inset -1px -1px 4px rgba(255, 255, 255, 0.4) !important;
}

/* --- Header Menu --- */
.cs-header-menu li a {
    background: var(--e-global-color-accent);
    box-shadow: 4px 4px 8px rgba(0, 0, 0, .14);
    padding: 6px 10px !important;
    border-radius: 6px;
}

/* --- Footer --- */
.wp-singular .cs-footer {
    box-shadow: -4px -4px 40px rgba(0, 0, 0, 0.5) !important;
    z-index: 50;
    position: relative;
}

/* =========================================
   3. THE FLIPBOX GRID SYSTEM (Refactored)
   ================================********* */

/* This replaces the old ::after lines. 
   It creates borders by putting a gradient behind the items 
   and using 'gap' to let it shine through.
*/

.cs-grid-card-container {
    display: grid !important;
    /* Default Desktop: 3 Columns */
    grid-template-columns: repeat(3, 1fr);
    
    /* The Border Thickness */
    gap: 2px;
    padding: 2px; /* External border */
    
    /* The Border Color (Gradient) */
    background: var(--ls-grid-border-gradient);
    
    /* Layout Resets */
    width: 100%;
    margin: 0 auto;
    align-items: stretch;
}

/* The Cards inside the grid */
.cs-flipbox-wrapper {
    background: #fff; /* Masks the gradient behind */
    height: 100%;
    width: 100% !important; /* Forces full width in cell */
    margin: 0 !important;
}

/* Ensure inner flipbox fills space */
.cs-custom-flip-box {
    height: 100%;
}


/* --- Grid Counter Lines (Horizontal) --- */
/* Keeps your existing style for the counters */
.cs-grid-lines-counter::after,
.cs-grid-lines-counter::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 100%;
    height: 2px;
    background: var(--ls-grid-border-gradient);
}

.cs-grid-lines-counter::before { left: 100% !important; }
.cs-grid-lines-counter::after { right: 100% !important; }
.cs-grid-lines-counter .elementor-counter-title { text-align: center; }

/* =========================================
   4. MODULES (Testimonials, Icon Boxes)
   ================================********* */

/* --- Testimonials --- */
.cs-testimonials .testimonial-star-rating {
    text-align: center;
    padding-top: 16px;
    border-top: 2px solid var(--e-global-color-accent);
}

.cs-testimonials .eael-testimonial-item,
.cs-testimonials .eael-testimonial-content {
    height: 100%;
}

.cs-testimonials .eael-testimonial-content {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
}

.cs-testimonials li i { display: none; }
.cs-testimonials li::before {
    content: url('/wp-content/uploads/2025/08/star-icon.svg');
}

/* --- Icon Boxes (Hover Effect) --- */
.cs-icon-box {
    height: 200px;
    width: 200px;
    background: #fff;
    border-radius: 100px;
    box-shadow: 3px 3px 8px #00000040;
    transition: background 0.3s ease;
}

.cs-icon-box:hover {
    background: var(--ls-gradient-primary);
}

.cs-icon-box:hover svg path {
    fill: #ffffff !important;
}

/* --- Special Project Card --- */
.cs-special-project-card {
    --my-icon-size: 140px;  
    --my-gap-size: 20px;
    --my-grid-gap: 60px;
    --line-color: #fff;  
    backdrop-filter: blur(7px);
}

.cs-special-project-card .elementor-icon-box-icon {
    background: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    margin: auto;
    width: var(--my-icon-size);
    height: var(--my-icon-size);
    box-shadow: 4px 4px 16px 4px #0002;
    overflow: visible;
    position: relative;
}

.cs-special-project-card--grid {
    gap: var(--my-grid-gap);
}

.cs-special-project-card .cs-icon-box--container:not(:last-of-type)::before {
    content: '';
    position: absolute;
    width: calc(100% - var(--my-icon-size) - (var(--my-gap-size) * 2) + var(--my-grid-gap));
    height: 3px;
    background: var(--line-color);
    top: calc(var(--my-icon-size) / 2);
    left: calc(50% + (var(--my-icon-size) / 2) + var(--my-gap-size));
}

.cs-icon-box--container .read-more-btn {
    display: none !important;
}

/* =========================================
   5. ANIMATIONS
   ================================********* */

.cs-rotate-in-center-right img {
    transform-box: fill-box;
    transform-origin: center;
    animation: rotateInfiniteRight 8s linear 1.25;
    will-change: transform;
    backface-visibility: hidden;
}

@keyframes rotateInfiniteRight {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.cs-rotate-in-center-left img {
    transform-box: fill-box;
    transform-origin: center;
    animation: rotateInfiniteLeft 8s linear 1.25;
    will-change: transform;
    backface-visibility: hidden;
}

@keyframes rotateInfiniteLeft {
    from { transform: rotate(360deg); }
    to { transform: rotate(0deg); }
}

/* =========================================
   6. RESPONSIVE MEDIA QUERIES
   ================================********* */

/* --- TABLET (Between 768px and 1024px) --- */
@media (max-width: 1024px) and (min-width: 768px) {
    
    .cs-grid-card-container {
        /* Switch to 2 columns */
        grid-template-columns: repeat(2, 1fr) !important;
    }

    /* Make the last item span 2 columns to fill the row */
    .cs-grid-card-container .cs-flipbox-wrapper:last-of-type {
        grid-column: span 2 !important;
    }
	
	/* Special Project Card Mobile */
	.cs-special-project-card--grid {
		grid-template-columns: repeat(1, 1fr);
	}
	
	.cs-special-project-card {
        --my-icon-size: 60px;  
        --my-gap-size: 20px;
        --my-grid-gap: 60px;
    }

    .cs-special-project-card .cs-icon-box--container:not(:last-of-type)::before {
        display: none;
    }
    
    .cs-special-project-card .cs-icon-box--container .elementor-icon-box-icon {
        display: flex;
    }
	
	.cs-icon-box {
        height: 140px;
        width: 140px;
    }
}

/* --- MOBILE (Below 767px) --- */
@media (max-width: 767px) {
    
    .cs-grid-card-container {
        /* Switch to 1 column */
        grid-template-columns: 1fr !important;
        gap: 2px;
    }

    /* FIX: Reset the last item so it behaves normally */
    .cs-grid-card-container .cs-flipbox-wrapper:last-of-type {
        grid-column: auto !important;
        grid-column-start: auto !important;
        grid-column-end: auto !important;
    }

    /* Remove extra decoration lines on mobile */
    .cs-grid-lines-counter::after,
    .cs-grid-lines-counter::before {
        display: none;
    }
    
    /* Add Custom Counter Lines for Mobile Layout */
    .cs-counter-line-left::after,
    .cs-counter-line-right::after {
        content: '';
        position: absolute;
        top: 30%;
        width: 100%;
        height: 2px;
        background: var(--ls-gradient-primary);
    }
    
    .cs-counter-line-left::after { right: calc(100% - 30px); }
    .cs-counter-line-right::after { left: calc(100% - 30px); }
    
    .cs-grid-lines-counter,
    .cs-grid-lines-counter .elementor-counter-number-wrapper {
        width: fit-content !important;
        align-self: center;
    }
    
    /* Testimonials mobile alignment */
    .cs-testimonials .eael-testimonial-text {
        text-align: center;
    }
    
    /* Shrink icons on mobile */
    .cs-icon-box {
        height: 100px;
        width: 100px;
    }

    /* Special Project Card Mobile */
    .cs-special-project-card {
        --my-icon-size: 60px;  
        --my-gap-size: 20px;
        --my-grid-gap: 60px;
    }

    .cs-special-project-card .cs-icon-box--container:not(:last-of-type)::before {
        display: none;
    }
    
    .cs-special-project-card .cs-icon-box--container .elementor-icon-box-icon {
        display: flex;
    }
}