/* --- DESIGN SYSTEM & PROMĚNNÉ --- */
:root {
    --primary: #800000; /* Vínová 2. LF UK */
    --primary-light: #a31a1a;
    --text-main: #1d1d1f;
    --text-sub: #6e6e73;
    --bg-light: #fbfbfd;
    --white: #ffffff;
    --border: rgba(0, 0, 0, 0.06);
    --shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    --glass: rgba(255, 255, 255, 0.75);
}

/* --- ZÁKLADNÍ RESET --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* --- ANIMACE NAČTENÍ --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- NAVIGACE --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 8%;
    height: 80px;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background: var(--glass);
    backdrop-filter: blur(10px) saturate(180%);
    -webkit-backdrop-filter: blur(10px) saturate(180%);
    z-index: 1000;
    border-bottom: 1px solid var(--border);
}

.logo a {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 1px;
    color: var(--primary);
    text-decoration: none;
    text-transform: uppercase;
    display: inline-block; /* Důležité pro funkčnost transformace */
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), color 0.3s ease;
    will-change: transform; /* Optimalizace pro hladký pohyb */
}

/* Efekt při najetí: Zvětšení a odsazení nahoru */
.logo a:hover {
    transform: translateY(-3px) scale(1.05);
    color: var(--primary-light); /* Volitelně: lehké zesvětlení při hoveru */
}

/* Efekt při kliknutí (aktivní stav): Aby se logo nepříjemně nesmršťovalo */
.logo a:active {
    transform: translateY(-1px) scale(1.04);
    transition: transform 0.1s ease;
}

.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 40px; 
}

/* --- VYLEPŠENÉ ODKAZY V NAVIGACI --- */
.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 600;
    font-size: 0.9rem;
    opacity: 0.7;
    position: relative; /* Nutné pro umístění podtržítka */
    padding: 4px 0;
    transition: color 0.3s ease;
}

/* Podtržítko (příprava) */
.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0; /* Začínáme s nulovou šířkou */
    height: 2px;
    background-color: var(--primary);
    transition: width 0.3s ease; /* Animace šířky zleva doprava */
}

/* Efekt při najetí (Hover) */
.nav-links a:hover {
    opacity: 1;
    color: var(--primary);
}

.nav-links a:hover::after {
    width: 100%; /* Roztažení podtržítka na celou šířku */
}

/* --- AKTIVNÍ STRÁNKA (Stav po prokliku) --- */
/* Tato třída se přidá pomocí JavaScriptu */
.nav-links a.active {
    opacity: 1;
    color: var(--primary);
}

.nav-links a.active::after {
    width: 100%; /* Podtržítko zůstane viditelné */
}

/* --- UNIVERZÁLNÍ HERO SEKCE (Sjednoceno pro celý web) --- */
.hero-section {
    text-align: center;
    padding: 180px 20px 80px;
    max-width: 1000px;
    margin: 0 auto;
    animation: fadeInUp 1s cubic-bezier(0.2, 0, 0, 1) both;
}

.hero-section .badge {
    display: inline-block;
    background: var(--white);
    border: 1px solid var(--border);
    padding: 10px 20px;
    border-radius: 40px;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1.2px;
    box-shadow: var(--shadow);
    margin-bottom: 25px;
}

.hero-section h1 {
    font-size: clamp(2.5rem, 7vw, 4.2rem); /* Zvětšeno pro Apple look */
    letter-spacing: -3px;
    margin-bottom: 25px;
    font-weight: 800;
    line-height: 1.05;
    color: var(--text-main);
}

.hero-section h1 span { 
    color: var(--primary); 
}

.hero-section .lead-text {
    color: var(--text-sub);
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    max-width: 750px;
    margin: 0 auto;
    line-height: 1.6;
}

/* --- BENTO GRID --- */
.bento-wrapper {
    max-width: 1150px;
    margin: 0 auto 120px;
    padding: 0 25px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: fadeInUp 1s cubic-bezier(0.2, 0, 0, 1) 0.2s both;
}

.bento-box {
    background: var(--white);
    border-radius: 36px;
    padding: 45px;
    text-decoration: none;
    color: inherit;
    border: 1px solid var(--border);
    transition: all 0.5s cubic-bezier(0.2, 0, 0, 1);
    box-shadow: var(--shadow);
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.bento-box::before {
    content: '→';
    position: absolute;
    top: 40px;
    right: 40px;
    font-size: 1.5rem;
    color: var(--primary);
    opacity: 0;
    transform: translateX(-20px);
    transition: 0.4s ease;
}

.bento-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px rgba(0,0,0,0.07);
    border-color: rgba(128, 0, 0, 0.15);
}

.bento-box:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.category {
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    letter-spacing: 2px;
    margin-bottom: 18px;
    display: block;
}

.main-card {
    min-height: 340px;
}

.main-card h2 { 
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    margin: 0 0 15px;
    letter-spacing: -1.5px; 
}

.visual-icon {
    position: absolute;
    right: 50px;
    bottom: -10px;
    font-size: 9rem;
    opacity: 0.04;
    transition: 0.6s ease;
}

.bento-box:hover .visual-icon {
    transform: scale(1.1) rotate(-10deg);
    opacity: 0.08;
}

.bento-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
}

.medium-card h3 { 
    font-size: 1.8rem; 
    margin-bottom: 12px; 
    letter-spacing: -0.8px; 
}

/* --- FOOTER --- */
.main-footer {
    background: var(--white); /* Čistě bílá místo šedé vypadá luxusněji */
    padding: 30px 8% 30px;
    border-top: 1px solid var(--border);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-end; /* Zarovná jméno a linky na stejnou linku */
    max-width: 1000px; /* Tohle zabrání tomu roztažení do stran */
    margin: 0 auto 25px;
    gap: 30px;
}

.footer-info h3 { 
    font-size: 1.3rem; /* Menší, vkusnější */
    margin-bottom: 4px; 
    letter-spacing: -0.5px; 
    font-weight: 700;
}

.footer-info p { 
    color: var(--text-sub); 
    font-size: 0.95rem; 
}

.footer-links { 
    display: flex; 
    gap: 30px; 
}

.footer-links a {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.9rem;
    transition: 0.3s ease;
    opacity: 0.6;
}

.footer-links a:hover { 
    opacity: 1;
    color: var(--primary); 
}

.footer-bottom {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
    border-top: 1px solid var(--border);
    padding-top: 30px;
    color: #a1a1a6;
    font-size: 0.75rem;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

/* --- MOBILNÍ MENU & RESPONZIVITA --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    z-index: 1100;
}

.bar {
    width: 28px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 10px;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (max-width: 850px) {
    .menu-toggle { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 35px;
        transition: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
        padding: 0;
    }

    .nav-links.active { right: 0; }

    .nav-links a { font-size: 1.5rem; }

    /* Animace Hamburgeru */
    .menu-toggle.open .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.open .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.open .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .bento-row { grid-template-columns: 1fr; }
    .hero-minimal { padding-top: 140px; }
    .footer-content {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 30px;
    }
    .footer-links {
        gap: 20px;
    }
}