/* =========================================
   Variables & General Setup
   ========================================= */
:root {
    --unicBlau: #334057;
    /* Dark blue / Gray-blue */
    --unicBlauHell: #5488c7;
    --color-text: #f8fafc;
    --color-text-muted: #cbd5e1;
    --color-accent: #38bdf8;
    --font-main: 'Barlow', sans-serif;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--unicBlau);
    color: var(--color-text);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   Preloader
   ========================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: var(--unicBlau);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease-out, visibility 0.6s ease-out;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--color-text);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* =========================================
   Navbar
   ========================================= */
.navbar {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff00;
    z-index: 1000;
    padding: 1.5rem 0;
    /* Vergrößert */
    transition: all var(--transition-speed) ease;
}

.navbar-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Zentriert */
}

.nav-logo {
    max-height: 80px;
    /* Vergrößert */
    width: auto;
    display: block;
}

.fade-in {
    opacity: 0;
    animation: fadeIn 1s forwards;
    animation-delay: 0.5s;
}

@keyframes fadeIn {
    to {
        opacity: 1;
    }
}

/* =========================================
   Hero Layout
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    /* Änderung für oben angehefteten Bereich */
    align-items: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, var(--unicBlauHell) 0%, var(--unicBlau) 70%);
}

/* Subtle background accent */
.hero::before {
    content: '';
    position: absolute;
    top: -20%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(56, 189, 248, 0.05) 0%, rgba(15, 23, 42, 0) 70%);
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    max-width: 1200px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2rem 4rem 2rem;
    /* Padding für den unteren Bereich */
    z-index: 1;
}

/* Fixed Background Fingerprint */
.bg-fingerprint {
    position: absolute;
    top: 55%;
    left: -5%;
    transform: translateY(-50%);
    width: clamp(300px, 35vw, 600px);
    height: auto;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

/* =========================================
   UNIC Logo Letters Area (Top half)
   ========================================= */
.hero-top-bg {
    width: 100vw;
    background-color: #e3efff;
    padding: 10rem 2rem 4rem 2rem;
    /* Enthält Platz für Navbar */
    display: flex;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.hero-header {
    text-align: center;
    width: 100%;
}

.unic-letters {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    flex-wrap: nowrap;
    /* Keep letters in one row by default */
}

.unic-letter {
    height: clamp(80px, 20vw, 350px);
    /* Deutlich größer, aber skalierbar für Mobile */
    width: auto;
    object-fit: contain;
    /* filter: drop-shadow(0 15px 25px rgba(0, 0, 0, 0.4)); */
    transition: transform 0.4s ease;
}

.unic-letter:hover {
    transform: translateY(-5px) scale(1.02);
}

/* =========================================
   Bottom Content Area (Text + Logos side by side)
   ========================================= */
.bottom-content-area {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-rows: auto auto;
    width: 100%;
    margin-top: 5rem;
    column-gap: 5rem;
    row-gap: 4rem;
    background-color: transparent;
}

/* =========================================
   Text Content
   ========================================= */
.hero-content {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    text-align: left;
    background-color: transparent;
    padding: 0;
    box-shadow: none;
    color: var(--color-text);
    align-self: start;
}

.hero-body-text {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    text-align: left;
}

.main-claim {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--color-text);
    border-left: 3px solid var(--color-accent);
    padding-left: 1.8rem;
}

.main-claim span {
    display: block;
}

.text-body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.text-body p {
    font-size: clamp(1.05rem, 1.2vw, 1.15rem);
    color: var(--color-text-muted);
    line-height: 1.7;
}

.text-body .lead {
    font-size: clamp(1.2rem, 1.5vw, 1.35rem);
    color: var(--color-text);
    font-weight: 400;
    line-height: 1.6;
}

.text-body .lead strong {
    font-weight: 700;
    color: #fff;
}

.text-body .highlight {
    font-size: clamp(1.15rem, 1.5vw, 1.3rem);
    font-weight: 700;
    color: var(--color-accent);
    letter-spacing: 0.05em;
    background: rgba(56, 189, 248, 0.05);
    border: 1px solid rgba(56, 189, 248, 0.2);
    padding: 1rem 1.5rem;
    border-radius: 8px;
    display: inline-block;
    width: fit-content;
}

/* =========================================
   Subsidiaries / Tochterfirmen
   ========================================= */
.subsidiaries-wrapper {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    width: 100%;
}

.subsidiary-card {
    display: block;
    text-decoration: none;
    perspective: 1000px;
}

.card-inner {
    background: transparent;
    border: none;
    padding: 0.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    min-height: 180px;
    transition: transform var(--transition-speed) ease;
}

.subsidiary-logo {
    max-width: 100%;
    max-height: 180px;
    object-fit: contain;
    transition: opacity var(--transition-speed) ease, transform var(--transition-speed) ease;
}

/* Hover Effects */
.subsidiary-card:hover .card-inner {
    transform: translateY(-5px);
}

.subsidiary-card:hover .subsidiary-logo {
    opacity: 1;
    transform: scale(1.05);
}

/* =========================================
   Animations
   ========================================= */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1s cubic-bezier(0.16, 1, 0.3, 1), transform 1s cubic-bezier(0.16, 1, 0.3, 1);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.delay-1 {
    transition-delay: 0.2s;
}

.delay-2 {
    transition-delay: 0.4s;
}

.delay-3 {
    transition-delay: 0.6s;
}

/* =========================================
   Responsive Adjustments
   ========================================= */
@media (max-width: 1024px) {
    .bottom-content-area {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto auto;
        column-gap: 0;
        row-gap: 3rem;
    }

    .hero-content,
    .hero-body-text,
    .subsidiaries-wrapper {
        grid-column: 1 / -1;
        grid-row: auto;
    }

    .main-claim {
        border-left: none;
        border-top: 3px solid var(--color-accent);
        padding-left: 0;
        padding-top: 1.5rem;
    }
}

@media (max-width: 768px) {
    .subsidiaries-wrapper {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 0;
        /* Remove padding here, controlled by inner elements */
    }

    .hero-top-bg {
        padding: 8rem 1rem 3rem 1rem;
        /* Reduce padding for mobile white background */
    }

    .unic-letters {
        gap: 0.5rem;
        /* Reduce gap between letters */
    }

    .bottom-content-area {
        margin-top: 3rem;
        /* Reduce space below white area */
        padding: 0 1.5rem;
        /* Add padding here instead of .hero */
    }
}

/* =========================================
   Footer
   ========================================= */
.footer {
    background-color: transparent;
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.footer p {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color var(--transition-speed) ease;
}

.footer-links a:hover {
    color: var(--color-text);
}