/* === MODERN GRID & CARD DESIGN (Inspired by Folioblox) === */

.modern-grid {
    display: grid;
    grid-template-columns: 3fr 2fr; /* 60/40 Split default */
    gap: 2rem;
    width: 100%;
    margin-top: 2rem;
}

.modern-grid.reverse {
    grid-template-columns: 2fr 3fr;
}

.modern-grid.thirds {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.modern-card {
    position: relative;
    border-radius: 30px; /* Large rounded corners */
    overflow: hidden;
    min-height: 550px; /* Increased height to show more image */
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    text-decoration: none;
}

.modern-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

/* Image Card Variant */
.modern-card.image-card {
    background-color: #000;
}

.modern-card.image-card img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 1; /* Full visibility as requested */
    transition: transform 0.6s ease;
}

.modern-card.image-card:hover img {
    transform: scale(1.05);
}

/* Solid Color Card Variant */
.modern-card.solid-card {
    background-color: #2a2a2a; /* Fallback */
    padding: 2.5rem;
}

.modern-card.accent-card {
    background-color: var(--color-accent);
    color: #fff;
}

.modern-card.dark-card {
    background-color: var(--color-secondary);
    border: 1px solid rgba(255,255,255,0.1);
}

/* GLASSMORPHISM CARD VARIANT (Full Card) */
.modern-card.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    padding: 2.5rem;
}

.modern-card.glass-card:hover {
    background: rgba(255, 255, 255, 0.07);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.modern-card.glass-card .card-content {
    background: none;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.modern-card.glass-card .card-icon-large {
    font-size: 4rem;
    color: var(--color-accent);
    margin-bottom: auto; /* Pushes content down */
    opacity: 0.8;
    transition: transform 0.4s ease;
}

.modern-card.glass-card:hover .card-icon-large {
    transform: scale(1.1);
    color: #fff;
}

/* Card Content Overlay (Default Gradient) */
.card-content {
    position: relative;
    z-index: 2;
    padding: 2.5rem;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.5) 50%, transparent 100%);
    pointer-events: none;
}

/* GLASS CONTENT MODE (For Image Cards with Glass Overlay) */
.card-content.glass-mode {
    background: rgba(20, 20, 20, 0.75); /* Darker for better contrast */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin: 0.5rem; /* Pushed very close to the edge */
    margin-top: auto;
    width: auto;
    border-radius: 25px; /* Matches card radius roughly */
    padding: 1.5rem;
    box-shadow: 0 -10px 30px rgba(0,0,0,0.5);
    transform: translateY(0); /* Ensure stable position */
    transition: all 0.4s ease;
}

.solid-card .card-content {
    background: none;
    padding: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

/* Typography inside Cards */
.modern-card h3 {
    font-family: var(--font-primary);
    font-size: 2.2rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 0;
    color: #fff;
}

.separator-line {
    width: 60px;
    height: 4px;
    background-color: var(--color-accent);
    margin: 1rem 0;
    border-radius: 2px;
}

.accent-card .separator-line {
    background-color: #fff;
}

.glass-card .separator-line {
    background-color: rgba(74, 155, 142, 0.8);
}

.modern-card p {
    font-size: 1rem;
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    margin-bottom: 0;
    font-family: var(--font-primary);
}

/* HOVER EFFECT LOGIC - Option 1: Expandable */
@media (min-width: 901px) {
    /* Hide Text and Separator by default on Desktop */
    .card-content.glass-mode .separator-line,
    .card-content.glass-mode p {
        opacity: 0;
        max-height: 0;
        margin: 0;
        overflow: hidden;
        transform: translateY(20px);
        transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    }

    /* Show them on Hover */
    .modern-card:hover .card-content.glass-mode .separator-line {
        opacity: 1;
        max-height: 4px;
        margin: 1rem 0;
        transform: translateY(0);
    }

    .modern-card:hover .card-content.glass-mode p {
        opacity: 1;
        max-height: 200px; /* Allow enough height */
        transform: translateY(0);
    }
}

.card-tag {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 3;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.accent-card .card-tag {
    color: rgba(255,255,255,0.8);
}

/* Arrow Button inside Card */
.card-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(5px);
    color: #fff;
    font-size: 1.2rem;
    margin-top: 1rem;
    transition: background 0.3s ease;
}

.modern-card:hover .card-arrow {
    background: var(--color-accent);
}

/* BACKGROUNDS FOR GLASS EFFECT */

/* Aurora Background Section (Replaces simple glass-section-bg) */
.aurora-section {
    position: relative;
    background-color: #050a0f; /* Deep dark background */
    overflow: hidden;
    padding: 6rem 0;
    transition: background-color 0.2s;
}

.aurora-bg-container {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.aurora-effect {
    position: absolute;
    inset: -10px;
    opacity: 0.6; /* Slight visibility */
    filter: blur(60px); /* Smooth blur */
    
    /* Variables for gradients */
    --transparent: transparent;
    --black: #000000;
    
    /* Aurora Colors adapted to Green/Teal theme */
    --c1: #4a9b8e; /* Accent */
    --c2: #325f58; /* Darker Teal */
    --c3: #64dccb; /* Lighter Teal */
    --c4: #1e3a45; /* Dark Blue-Green */
    
    --aurora-gradient: repeating-linear-gradient(
        100deg,
        var(--c1) 10%,
        var(--c2) 15%,
        var(--c3) 20%,
        var(--c4) 25%,
        var(--c1) 30%
    );
    
    --dark-gradient: repeating-linear-gradient(
        100deg,
        var(--black) 0%,
        var(--black) 7%,
        var(--transparent) 10%,
        var(--transparent) 12%,
        var(--black) 16%
    );

    background-image: var(--dark-gradient), var(--aurora-gradient);
    background-size: 300% 200%;
    background-position: 50% 50%, 50% 50%;
    
    /* Animation */
    animation: aurora 60s linear infinite;
    will-change: transform;
}

.aurora-effect::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--dark-gradient), var(--aurora-gradient);
    background-size: 200% 100%;
    background-attachment: fixed;
    mix-blend-mode: overlay;
    animation: aurora 60s linear infinite;
}

/* Mask for radial fade to focus attention on center */
.aurora-section::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, transparent 20%, #050a0f 90%);
    pointer-events: none;
    z-index: 1;
}

@keyframes aurora {
    from { background-position: 50% 50%, 50% 50%; }
    to { background-position: 350% 50%, 350% 50%; }
}

/* Ensure content is above aurora */
.aurora-content {
    position: relative;
    z-index: 10;
}

/* Alternate Background for 'Was ist' Section (Blob on Right) */
.glass-bg-alt {
    position: relative;
    overflow: hidden;
    background: #0a0a0a;
}

.glass-bg-alt::before {
    content: '';
    position: absolute;
    top: 10%;
    right: 0%;
    width: 600px;
    height: 600px;
    background: #f4b942; /* Warm yellow/orange for contrast */
    filter: blur(180px);
    opacity: 0.1;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

/* CTA Glass Section */
.cta-glass-section {
    position: relative;
    background: #000;
    overflow: hidden;
    padding: 6rem 0;
}

/* Background Image with Overlay */
.cta-glass-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../images/cta-bg.jpg');
    background-size: cover;
    background-position: center;
    opacity: 0.85; /* Increased opacity for better visibility of the backpack */
    z-index: 0;
}

/* Add a dark gradient overlay on top of image for better text contrast */
.cta-glass-section::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.8) 100%); /* Lighter overlay */
    z-index: 0;
}

/* --- MAGIC UI SHINE BORDER EFFECT (ROBUST VERSION) --- */

.shine-border-container {
    position: relative;
    z-index: 10; /* Ensure it's above the background overlays */
    max-width: 1000px;
    margin: 0 auto;
    border-radius: 30px;
    padding: 3px; /* Visible Border Width */
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05); /* Very subtle static border */
    box-shadow: 0 0 80px rgba(74, 155, 142, 0.15); /* Subtle glow */
}

/* The Spinning Light - Using standard rotate for maximum compatibility */
.shine-border-container::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg, 
        transparent 0deg, 
        transparent 80deg, 
        var(--color-accent) 140deg, 
        #ffffff 180deg, 
        var(--color-accent) 220deg, 
        transparent 280deg, 
        transparent 360deg
    );
    animation: shine-rotate 4s linear infinite;
    z-index: 0; /* Behind the content */
}

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

.cta-glass-container {
    background: rgba(10, 10, 10, 0.65); /* Increased transparency to show background image */
    backdrop-filter: blur(12px); /* Reduced blur to reveal details behind */
    -webkit-backdrop-filter: blur(12px);
    border-radius: 27px; /* Slightly smaller than parent (30px - 3px padding) */
    padding: 4rem 2rem;
    text-align: center;
    position: relative;
    z-index: 1; /* Sits ON TOP of the spinner */
    height: 100%;
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .modern-grid {
        grid-template-columns: 1fr;
    }
    
    .modern-grid.reverse {
        grid-template-columns: 1fr;
    }
    
    .modern-card {
        min-height: 350px;
    }
    
    .modern-card h3 {
        font-size: 1.8rem;
    }
    
    .card-content.glass-mode {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .cta-glass-container {
        padding: 2rem 1rem;
    }
}
