/* =============================================================
   SORTIMENT – Haupt-Stylesheet (Landingpage)
   ============================================================= */
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@400&display=swap');

   :root {
    --bg-color: #000000;
    --text-color: #ffffff;
    --hover-yellow: #ffff00; /* Reines, leuchtendes Gelb */
    --sortiment-size: 10.7vw;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    height: 100%;
    background-color: var(--bg-color);
    color: var(--text-color);
    font-family: 'Clash Display', sans-serif;
    overflow: hidden;
}

/* ── NEUER WRAPPER FÜR EXKLUSIVEN SEITENÜBERGANG ── */
.page-fade-wrapper {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}

.page-fade-wrapper.fade-in {
    opacity: 1;
    transition: opacity 1s ease;
}

.page-fade-wrapper.fade-out {
    opacity: 0 !important;
    transition: opacity 0.6s ease;
}

/* ── GLOBAL IDENTISCHE POSITIONIERUNG (Aus archive.css) ── */
.vertical-title {
    position: fixed;
    top: 0;
    left: 0;                    /* Tweak this (e.g., 10px) if you need to slide it right, away from the screen edge */
    margin: 0;
    padding: 0;
    
    /* ── NEW SIZE CONTROLS FOR PNG ── */
    width: 100vh;                /* Adjust this value to control how far up the screen the logo climbs */
    height: auto;               /* Keeps your logo perfectly proportioned without stretching it */
    
    mix-blend-mode: difference; /* Keeps your difference blending effect intact */
    z-index: 100;
    pointer-events: none;
    transform-origin: top left;
    transform: translateY(100vh) rotate(-90deg);
}

.info-btn {
    position: fixed;
    top: 40px;
    right: 40px;
    background: none;
    border: none;
    color: #ffffff;
    font-family: 'Clash Display', sans-serif;
    font-size: 3rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0;
    margin: 0;
    mix-blend-mode: difference;
    z-index: 101;
    transition: color 0.3s ease;
}

.info-btn:hover {
    color: var(--hover-yellow) !important;
}

/* ── PERMANENTER BEGRÜSSUNGSTEXT RECHTS ── */
.permanent-info-box {
    position: fixed;
    top: 110px; 
    right: 40px;
    width: 280px;
    font-size: 0.95rem;
    line-height: 1.5;
    z-index: 90;
    text-align: right;
    font-weight: 300;
    pointer-events: auto;
}

.permanent-info-box p {
    margin: 0 0 15px 0;
}

/* ── MITTLERER BEREICH: ROTER ORDNER ── */
.folder-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

.folder-wrapper {
    position: relative;
    left: -100px;
    width: 68vw; /* Von 60vw auf 68vw vergrößert für mehr Präsenz auf dem Bildschirm */
    max-width: 1100px; /* Maximale Obergrenze angehoben */
    min-width: 600px;
    aspect-ratio: 955 / 670;
    pointer-events: auto;
}

.folder-bg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

.folder-content {
    position: absolute;
    top: 15%;
    left: 10%;
    width: 80%;
    height: 78%;
    overflow-y: auto;
    color: white;
    padding: 20px;
}

.email-link, .insta-link {
    color: white;
}

.email-link:hover, .insta-link:hover {
    color: var(--hover-yellow);
}

/* Die Reiter-Knöpfe */
.tab-link {
    position: absolute;
    text-decoration: none;
    color: #ffffff;
    font-size: 1.25vw; 
    transform-origin: center;
    transition: transform 0.2s ease, color 0.2s ease;
}

.tab-link:hover {
    color: var(--hover-yellow);
    transform: scale(1.05);
}

/* Exakte Platzierungswerte der Reiter */
#tab-program { 
    top: 3.5%; 
    left: 27.5%; 
    transform: rotate(0deg); 
}
#tab-register { 
    top: 3.5%; 
    left: 47%; 
    transform: rotate(0deg); 
}
#tab-more { 
    top: 3.5%; 
    left: 66.5%; 
    transform: rotate(0deg); 
}
#tab-contact { 
    top: 3.5%; 
    left: 86%; 
    transform: rotate(0deg); 
}

/* ── ARCHIV UNTEN RECHTS ── */
.archive-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    display: inline-block;
    text-decoration: none;
    color: var(--text-color);
    z-index: 101;
}

.archive-img {
    width: 175px;
    height: auto;
    display: block;
    margin: 0 auto;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.archive-container:hover .archive-img {
    filter: brightness(1.3) drop-shadow(0 0 12px rgba(77,184,255,0.7));
    transform: scale(1.06) translateY(-4px);
}

.archive-container:active .archive-img {
    animation: clickGlow 0.4s ease forwards;
}

@keyframes clickGlow {
    0%   { filter: brightness(2) drop-shadow(0 0 18px rgba(77,184,255,1)); transform: scale(1.1); }
    100% { filter: brightness(1.2) drop-shadow(0 0 5px rgba(77,184,255,0.5)); transform: scale(1.02); }
}

.archive-label {
    display: block;
    margin-top: 8px;
    font-size: 1.5rem;
    text-align: center;
}

/* ── REAKTIVIERTES INFO OVERLAY ── */
.overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.35);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.overlay.hidden {
    opacity: 0;
    pointer-events: none;
}

.overlay-content {
    background: #111;
    font-size: 10px;
    padding: 50px;
    border: none;
    position: relative;
    max-width: 800px;
    width: 90%;
}

.close-btn {
    position: absolute;
    top: 20px; right: 20px;
    background: none; border: none;
    color: white; font-size: 1.5rem;
    cursor: pointer;
}
.close-btn:hover {
    color: var(--hover-yellow);
}

/* --- REGISTRATION FORMS --- */
.event-block {
    margin-bottom: 40px;
    font-family: inherit;
}

.event-title {
    font-size: 1.2rem;
    font-weight: 500;
    text-transform: uppercase;
    color: var(--hover-yellow); /* Uses your existing yellow variable */
    margin: 0 0 5px 0;
}

.event-tracker {
    font-size: 0.9rem;
    color: white;
    margin-bottom: 15px;
    text-transform: lowercase;
}

.event-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.event-form input {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.4);
    padding: 10px 12px;
    color: white;
    font-family: inherit;
    font-size: 1rem;
    outline: none;
    border-radius: 0;
    transition: border-color 0.3s ease;
}

.event-form input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.event-form input:focus {
    border-color: var(--hover-yellow);
}

.submit-btn {
    background: white;
    color: black;
    border: none;
    padding: 12px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    transition: background-color 0.3s ease;
    margin-top: 5px;
}

.submit-btn:hover:not(:disabled) {
    background: var(--hover-yellow);
}

.submit-btn:disabled {
    background: #555;
    color: #888;
    cursor: not-allowed;
}

.success-msg {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--hover-yellow);
    font-size: 0.9rem;
    margin-top: 10px;
}

.cancel-btn {
    background: none;
    border: none;
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
    text-decoration: underline;
    cursor: pointer;
    padding: 0;
    transition: color 0.3s ease;
}

.cancel-btn:hover {
    color: red; /* Turns red on hover to indicate deletion */
}

.success-msg.hidden {
    display: none;
}

/* =============================================================
   PROGRAM TIMETABLE & BLURRED TOOLTIP
   ============================================================= */

/* Forces text over the scanned white paper element to be dark ink style */
.timetable-wrapper {
    color: #000000;
    height: 90%;
    padding-top: 30px;
    display: flex;
    flex-direction: column;
}

.timetable-title {
    font-size: 1.8vw; 
    font-weight: 600;
    margin: 0 0 15px 10px;
    letter-spacing: -0.5px;
}

.timetable-grid {
    display: flex;
    flex-grow: 1;
    position: relative;
    padding-bottom: 10px;
}

/* Y-Axis Timeline configuration */
.time-col {
    width: 55px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding-right: 12px;
    font-size: 0.75vw;
    font-weight: 500;
    padding-top: 36px; /* Aligns 14:00 directly horizontally with header items */
}

/* Day Column Grid dividers */
.day-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    border-left: 0px solid rgba(0, 0, 0, 0.15);
}

.day-header {
    font-size: 1.05vw;
    font-weight: 500;
    margin-bottom: 20px;
    padding-left: 12px;
    padding-bottom: 12px;
}

.day-events {
    position: relative;
    flex-grow: 1;
}

.mobile-time {
    display: none;
}

/* Maintainable Absolute Event Points */
.event-item {
    position: absolute;
    left: 12px;
    right: 8px;
    transform: translateY(-50%); /* Centers element text bounding box precisely over percentage line */
    font-size: 0.82vw;
    line-height: 1.3;
    font-weight: 500;
    cursor: crosshair;
    transition: color 0.2s ease, transform 0.2s ease;
}

.event-item:hover {
    color: #b02a2a; /* Muted red layout highlight */
    transform: translateY(-50%) scale(1.01);
}

.event-item .loc {
    font-size: 0.7vw;
    font-weight: 400;
    opacity: 0.8;
}

/* Floating Tooltip following cursor */
.cursor-tooltip {
    position: fixed;
    pointer-events: none; /* Mouse actions transparently ignore tooltip container */
    z-index: 9999;
    
    /* Frosted-glass theme maintaining core dark theme principles */
    background: rgba(15, 15, 15, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    
    color: #ffffff;
    font-family: 'Clash Display', sans-serif;
    font-size: 0.85rem;
    font-weight: 400;
    padding: 10px 14px;
    max-width: 240px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
    
    /* Smooth opacity fade-in/fade-out state handling */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.cursor-tooltip.show {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 768px) {
    /* 3. Info- & Home-Button verkleinern */
    .info-btn {
      right: 25px;
      top: 25px;
        font-size: 1.5rem !important;
    }

    .overlay-content {
    font-size: 6px;
    padding: 10px;
    }

    .archive-container {
    position: fixed;
    bottom: 25px;
    right: 25px;
    }

    .archive-img {
        width: 75px;
    }

    .permanent-info-box {
        visibility: hidden;
    }

    /* 5. Sortiment-Tag unten links reparieren */
    .vertical-title {
    visibility: hidden;
    width: 85vh !important; /* Adjust this to make the logo longer/shorter */
    height: auto !important;
    
    /* 1. Reset top and pin to the bottom left */
    top: auto !important;
    bottom: calc(env(safe-area-inset-bottom, 20px) + 20px) !important;
    left: 0px !important;
    
    /* 2. Geometrically perfect rotation */
    transform-origin: 0% 100% !important; /* Pivot exactly from the bottom-left corner */
    transform: rotate(-90deg) translateY(100%) !important; /* Swings it up, then pushes it right by its own height */
	}

    /* 1. Center the container safely on the screen */
    .folder-container {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100vw !important;
        height: 100dvh !important;
        /* Prevents the rotated corners from stretching the page */
        overflow: hidden !important; 
    }

    /* 2. Rotate the folder and flip its dimensions */
    .folder-wrapper {
        /* Rotates the entire folder, including tabs and content */
        transform: rotate(90deg) !important;
        
        /* INCREASED SIZE HERE: */
        width: 90vh !important;   /* Increase from 85vh to 95vh (or even 100vh) to make it stretch closer to the top and bottom edges */
        height: 90vw !important;  /* Increase from 70vw to 85vw (or 90vw) to make it stretch wider across the phone screen */
        
        /* RE-CENTERING: */
        left: 0 !important;       /* Set this to 0 to keep it perfectly centered */
        top: -50px !important;        /* Set this to 0 to keep it perfectly centered */
        
        /* Ensures it spins exactly from its center */
        transform-origin: center center !important;
    }

    /* 4. Adjust the Content Class */
    .folder-content {
        transform: rotate(-90deg);
        font-size: 10px;
        /* Since it rotated with the wrapper, its width/height are also flipped relative to the phone. 
           Adjust these percentages if your text spills over the edges of the red folder. */
        width: 45% !important;
        height: 111% !important;
        top: -5%;
        left: 24.5%;
        
        /* Note: Any text you put in here will be sideways. 
           This plays nicely into the physical "folder" illusion, 
           as users will naturally read it like a book spine! */
    }

    /* 3. Make Tab Links bigger for touchscreens */
    .tab-link {
        font-size: 10px !important; /* Larger text */
      	padding: 10px;
    }

    #tab-program { 
    	top: 0.3%; 
    	left: 30%; 
    	transform: rotate(0deg); 
    }
    #tab-register { 
        top: 0.3%; 
        left: 45.5%; 
        transform: rotate(0deg); 
    }
    #tab-more { 
        top: 0.3%; 
        left: 61.5%; 
        transform: rotate(0deg); 
    }
    #tab-contact { 
        top: 0.3%; 
        left: 78%; 
        transform: rotate(0deg); 
    }

    /* --- Mobile Timetable Stacking Layout (CSS Grid) --- */
    .timetable-grid {
        display: grid;
        grid-template-columns: 45px 1fr;
        row-gap: 40px;
        align-items: start;
    }

    .time-col {
        grid-column: 1; /* LOCK: Times can ONLY go in the left column */
        display: flex;
        flex-direction: column;
        justify-content: space-between; /* Evenly spaces the 6 timestamps vertically */
        width: 100%;
        height: 265px;
        margin-top: 23px;
        padding-right: 8px;
        padding-top: 0;
        font-size: 10px;
    }

    /* Force the duplicated time columns to appear on mobile */
    .timetable-wrapper {
        padding-top: 5px;
    }
    
    .timetable-grid .time-col.mobile-time {
        display: flex !important; 
    }

    .day-col {
        grid-column: 2; /* LOCK: Days can ONLY go in the right column */
        width: 100%;
        border-left: 0px solid rgba(0, 0, 0, 0.15);
        margin-bottom: 0;
    }

    .timetable-title {
        font-size: 15px;
    }

    .day-header {
        font-size: 14px;
        margin-bottom: 15px;
        padding-left: 12px;
        padding-bottom: 4px;
        border-bottom: 0px solid rgba(0, 0, 0, 0.2);
    }

    .day-events {
        position: relative;
        height: 250px; 
    }

    .event-item {
        font-size: 11px;
        left: 10px;
        right: 0;
    }

    .event-item .loc {
        font-size: 10px;
    }

    #cursor-tooltip {
        display: none !important;
    }
}