/**
 * Katedra ekonomiky a rizeni stavebnictvi CVUT
 * Design inspirovany UPCE a Yale
 */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap");

:root {
    /* === ČVUT Grafický manuál - barevná paleta === */
    --primary: #0065BD;
    --primary-dark: #156570;
    --primary-light: #6AADE4;
    --white: #ffffff;
    /* Šedá škála odvozená z ČVUT #9B9B9B a #000000 */
    --gray-50: #fafafa;
    --gray-100: #f0f0f0;
    --gray-200: #d9d9d9;
    --gray-300: #bfbfbf;
    --gray-400: #9B9B9B;
    --gray-500: #787878;
    --gray-600: #555555;
    --gray-700: #383838;
    --gray-800: #1c1c1c;
    --gray-900: #000000;
    --font-family: "Inter", "Segoe UI", sans-serif;
    --font-heading: "Inter", "Segoe UI", sans-serif;
    --container-width: 1400px;
    --radius: 24px;
    --radius-lg: 8px;
    --radius-sm: 8px;
    /* ČVUT barvy - hlavní */
    --primary-color: #0065BD;
    --cvut-blue: #0065BD;
    --cvut-blue-light: #6AADE4;
    --cvut-black: #000000;
    --cvut-gray: #9B9B9B;
    /* ČVUT barvy - doplňkové */
    --cvut-green: #A2AD00;
    --cvut-red: #C60C30;
    --cvut-orange: #E05206;
    --cvut-teal: #00B2A9;
    --cvut-dark-teal: #156570;
    --cvut-burgundy: #981F40;
    --cvut-pink: #F04D98;
    --cvut-yellow: #F0AB00;
    /* Sémantické barvy (z ČVUT palety) */
    --wine-color: #981F40;
    --wine-light: #6AADE4;
    --wine-dark: #156570;
    --wine-pale: #6AADE4;
    --burgundy-color: #981F40;
    --success-color: #A2AD00;
    --info-color: #00B2A9;
    --warning-color: #F0AB00;
    --danger-color: #C60C30;
    --font-family-primary: "Inter", "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 15px; }

body {
    font-family: var(--font-family);
    font-weight: 400;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--white);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 { font-family: var(--font-heading); font-weight: 600; line-height: 1.3; color: var(--gray-900); }
h1 { font-size: 3rem; }
h2 { font-size: 2.4rem; }
h3 { font-size: 1.8rem; }
h4 { font-size: 1.5rem; }

p { color: var(--gray-600); line-height: 1.7; }
.lead { font-size: 1.3rem; color: var(--gray-600); }

a { color: var(--primary); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--primary-dark); }

.container { max-width: var(--container-width); margin: 0 auto; padding: 0 1.5rem; }
main { min-height: calc(100vh - 200px); }

/* Header */
header.header-custom, header.bg-primary { background-color: var(--primary) !important; }
header .container { max-width: var(--container-width); }
header img { filter: none; }
header h1 { font-weight: 600; font-size: 1.25rem; color: var(--white); }
header p { color: rgba(255, 255, 255, 0.9); font-size: 0.875rem; }

/* Navbar */
.navbar { background-color: #0065BD !important; border-bottom: none; padding: 0; }
.navbar .container { max-width: var(--container-width); }
.navbar .nav-link { color: #fff !important; font-weight: 500; font-size: 1rem; padding: 1rem 1.25rem !important; transition: all 0.2s ease; border-radius: 0; margin: 0; }
.navbar .nav-link:hover { color: #fff !important; background-color: rgba(255,255,255,0.2) !important; }
.navbar .nav-link.active {
    color: #fff !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    padding: 1rem 1.25rem !important;
    font-weight: 400 !important;
}
.navbar-dark .navbar-nav .nav-link { color: var(--gray-700) !important; font-weight: 500; padding: 1rem 1.25rem; margin: 0; border-radius: 0; }
.navbar-dark .navbar-nav .nav-link:hover { background-color: var(--gray-50) !important; color: var(--primary) !important; }
.navbar-dark .navbar-nav .nav-link.active {
    color: #fff !important;
    background: none !important;
    background-color: transparent !important;
    border: none !important;
    font-weight: 400 !important;
}
.navbar-dark .navbar-nav .nav-link::before, .navbar-dark .navbar-nav .nav-link::after { display: none; }

/* Buttons */
.btn { font-family: var(--font-family); font-weight: 600; font-size: 1rem; padding: 0.75rem 1.5rem; border-radius: var(--radius); transition: all 0.2s ease; border: none; cursor: pointer; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.15); }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; }
.btn-primary { background-color: var(--primary); color: var(--white); }
.btn-primary:hover { background-color: var(--primary-dark); color: var(--white); }
.btn-outline-primary { background-color: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline-primary:hover { background-color: var(--primary); color: var(--white); }
.btn-light { background-color: var(--white); color: var(--gray-800); }
.btn-light:hover { background-color: var(--gray-100); color: var(--gray-900); }
.btn-outline-light { background-color: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline-light:hover { background-color: var(--white); color: var(--gray-900); }



/* Mozaika - v pravé části */








/* Různé velikosti a pozice */







/* Info box - levý dolní roh, překrývá mozaiku */
















/* Rychlé odkazy */










@media (max-width: 900px) {
    
    
    
}



/* Main element - padding pro header */
main {
    padding-top: 150px;
}

/* ===== YALE HERO ===== */
.yale-hero {
    background: #fff;
    padding: 60px 0 120px;
    width: 100%;

    margin: 0;
}

.yale-hero-inner {
    position: relative;
    display: grid;
    grid-template-columns: 1fr;
    max-width: 1450px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Mozaika - grid layout podle Yale */
.yale-mosaic {
    position: relative;
    width: 100%;
    height: 550px;
    margin-left: 0;
}

.ym-photo {
    overflow: hidden;
    background: #f0f0f0;
    border-radius: var(--radius);
}



.ym-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* Textbox - překrývá levý dolní roh mozaiky */
.yale-textbox {
    position: absolute;
    left: 80px;
    bottom: -100px;
    width: 650px;
    max-width: 650px;
    background: #ffffff;
    padding: 16px 24px;
    z-index: 10;
    transform-style: preserve-3d;
    border-radius: var(--radius-lg);
    /* SUPER 3D look with DRAMATIC layered shadows */
    box-shadow:
        /* Inner shadow for depth */
        inset 0 2px 4px rgba(255,255,255,0.5),
        inset 0 -2px 4px rgba(0,0,0,0.1),
        /* Multiple shadow layers */
        0 1px 2px rgba(0,0,0,0.05),
        0 4px 8px rgba(0,0,0,0.1),
        0 8px 16px rgba(0,0,0,0.12),
        0 16px 32px rgba(0,0,0,0.15),
        0 24px 48px rgba(0,0,0,0.18),
        /* Border glow */
        0 0 0 1px rgba(255,255,255,0.1),
        /* Soft outer glow */
        0 0 20px rgba(0,0,0,0.05) !important;
    border: 1px solid rgba(255,255,255,0.2);
}

/* Na menších desktopu */
@media (max-width: 1200px) {
    .yale-textbox {
        width: 500px;
        max-width: 500px;
        padding: 14px 20px;
    }
}

.yale-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #0065BD;
    margin-bottom: 10px;
    font-weight: 600;
}

.yale-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 600;
    line-height: 1.2;
    color: #0065BD;
    margin-bottom: 18px;
}

.yale-desc {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #0065BD;
    margin-bottom: 20px;
}

.yale-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0065BD;
    text-decoration: none;
    padding: 6px 12px;
    background: #fff;
    border: none;
    position: relative;
    z-index: 1;
    border-radius: 24px;
}

.yale-btn:hover {
    background: #0065BD;
    color: #fff;
}

.yale-btn span {
    font-size: 1.2rem;
}

/* Odkazy dole */
.yale-links {
    display: flex;
    gap: 30px;
    margin-top: 40px;
    padding-left: 25%;
}

.yale-links a {
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #0065BD;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.yale-links a:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 1000px) {
    .yale-mosaic {
        grid-template-columns: repeat(2, 1fr);
    }

    .ym-hero {
        grid-column: 1 / 3;
        height: 250px;
    }

    .ym-small {
        height: 150px;
    }

    .yale-textbox {
        position: relative;
        flex: 0 0 400px;
        background: #ffffff;
        padding: 16px 24px;
        border-radius: var(--radius-lg);
        /* 3D effects are inherited from main yale-textbox styles */
    }

    .yale-links {
        padding-left: 0;
        flex-wrap: wrap;
    }
}

/* Mobile - Tablet responsiveness for Yale Hero */
@media (max-width: 991px) {
    .yale-hero {
        padding: 0 !important;
        margin: 0 !important;
    }

    .yale-hero-inner {
        display: flex !important;
        flex-direction: column !important;
        padding: 0 !important;
        gap: 0 !important;
        margin: 0 !important;
    }

    /* Na mobilu: obrázek první, textbox druhý */
    .yale-mosaic {
        order: 1 !important;
    }

    .yale-textbox {
        order: 2 !important;
    }

    .yale-textbox {
        position: relative !important;
        left: 0 !important;
        bottom: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 3px !important;
        margin-bottom: 0 !important;
        padding: 4px 8px !important;
    }

    .yale-mosaic {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .yale-title {
        font-size: 0.9rem !important;
    }

    .yale-desc {
        font-size: 0.6rem !important;
    }
}

/* Mobile - Phone responsiveness */
@media (max-width: 767px) {
    /* Zmenšit header na mobilu aby nezakrýval navbar */
    header.header-custom {
        padding: 0.25rem 0 !important;
    }

    header.header-custom h1 {
        font-size: 0.7rem !important;
        padding-left: 10px !important;
        gap: 8px !important;
    }

    header.header-custom img {
        height: 28px !important;
    }

    /* Navbar musí být viditelný pod headerem */
    .navbar {
        top: 36px !important;
        z-index: 1030 !important;
        min-height: 44px !important;
        padding: 4px 0 !important;
        overflow: visible !important;
    }

    .navbar .container-fluid {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-height: 44px !important;
        overflow: visible !important;
    }

    .navbar-toggler {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        min-width: 36px !important;
        min-height: 36px !important;
        padding: 6px 8px !important;
        margin-top: 12px !important;
    }

    .navbar-toggler span {
        font-size: 1rem !important;
        line-height: 1 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }

    /* main padding-top pro header + navbar */
    main {
        padding-top: 100px !important;
    }

    body .yale-hero,
    section.yale-hero {
        padding: 0 !important;
        margin: 0 !important;
        padding-top: 0 !important;
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        max-height: none !important;
    }

    .yale-hero-inner {
        display: flex !important;
        flex-direction: column !important;
        gap: 0 !important;
        min-height: 0 !important;
        height: auto !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* Textbox těsně pod obrázkem */
    .yale-textbox {
        position: relative !important;
        left: auto !important;
        bottom: auto !important;
        width: auto !important;
        max-width: 100% !important;
        padding: 4px 8px !important;
        box-shadow: 0 1px 3px rgba(0,0,0,0.06) !important;
        margin-top: 3px !important;
        margin-bottom: 3px !important;
        order: 2 !important;
    }

    .yale-mosaic {
        order: 1 !important;
    }

    /* Timeline sekce na mobilech */
    #timeline {
        padding-top: 0.3rem !important;
        padding-bottom: 0.3rem !important;
        margin-top: 0 !important;
    }

    #aktuality {
        padding-top: 0.5rem !important;
        padding-bottom: 0.5rem !important;
        margin-top: 0 !important;
    }

    /* Odstranit všechny padddingy a marginy mezi sekcemi */
    section.section-divider {
        margin-top: 0 !important;
        padding-top: 0.5rem !important;
    }

    /* Zmenšit kontejnery uvnitř sekcí */
    #timeline .container,
    #aktuality .container {
        padding-top: 0.3rem !important;
        padding-bottom: 0.3rem !important;
    }

    .yale-title {
        font-size: 0.95rem !important;
        margin-bottom: 3px !important;
        line-height: 1.2 !important;
    }

    .yale-desc {
        font-size: 0.65rem !important;
        margin-bottom: 4px !important;
        line-height: 1.3 !important;
    }

    .yale-btn {
        font-size: 0.75rem !important;
        padding: 4px 8px !important;
    }

    /* Hide handwritten notes on mobile */
    .handwritten-note,
    .mobile-hidden {
        display: none !important;
    }

    /* Hide handwritten circle on mobile */
    .handwritten-circle {
        display: none !important;
    }

    .yale-mosaic img {
        border-radius: var(--radius) !important;
        margin: 0 !important;
    }

    /* Odstranit bílý prostor mezi sekcemi */
    #timeline.py-5,
    #aktuality.py-5 {
        padding-top: 1rem !important;
        padding-bottom: 1rem !important;
    }

    #aktuality.mt-4 {
        margin-top: 0.5rem !important;
    }

    /* Fotky lidí - celá fotka na mobilu */
    .person-photo-container {
        height: 250px !important;
    }

    .person-photo-container img,
    .person-photo {
        width: 100% !important;
        height: 100% !important;
        object-fit: cover !important;
        object-position: center 20% !important;
    }

    /* Zmenšit karty na mobilu */
    .card {
        margin-bottom: 1.5rem !important;
    }

    .card-body {
        padding: 12px !important;
    }

    .card-body h4 {
        font-size: 0.95rem !important;
        margin-bottom: 0.4rem !important;
    }

    .card-body h5 {
        font-size: 0.85rem !important;
        margin-bottom: 0.3rem !important;
    }

    .card-body h6 {
        font-size: 0.8rem !important;
    }

    .card-body p {
        font-size: 0.8rem !important;
        line-height: 1.4 !important;
        margin-bottom: 0.5rem !important;
    }

    /* Zmenšit výšku obrázků v kartách (kromě fotek lidí) */
    .card img:not(.person-photo),
    .news-card .news-image {
        height: 180px !important;
    }

    /* Zmenšit article karty */
    article.card {
        margin-bottom: 1.5rem !important;
    }

    article.card .card-body {
        padding: 12px !important;
    }
}




.ym-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

/* Nepravidelná mozaika - absolutní pozice */
.ym-photo {
    position: absolute;
    overflow: hidden;
    border-radius: var(--radius);
}

.ym-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
    will-change: transform;
    transform: translateZ(0);
}

.ym-1 { width: 14%; height: 38%; top: 0; left: 0; }
.ym-2 { width: 24%; height: 48%; top: 0; left: 14.5%; }
.ym-3 { width: 20%; height: 38%; top: 0; left: 39%; }
.ym-4 { width: 26%; height: 58%; top: 0; left: 59.5%; }
.ym-5 { width: 22%; height: 48%; top: 0; left: 86%; }
.ym-6 { width: 17%; height: 48%; top: 39%; left: 0; }
.ym-7 { width: 21%; height: 38%; top: 49%; left: 17.5%; }
.ym-8 { width: 20%; height: 48%; top: 39%; left: 39%; }
.ym-9 { width: 23%; height: 41%; top: 59%; left: 59.5%; }
.ym-10 { width: 26%; height: 51%; top: 49%; left: 83%; }

/* Cards */
.card { background-color: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; transition: all 0.3s ease; }
.card:hover { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); transform: translateY(-4px); }
.card-header { background-color: var(--gray-50); border-bottom: 1px solid var(--gray-200); padding: 1rem 1.5rem; font-weight: 600; }
.card-header.bg-primary { background-color: var(--primary) !important; color: var(--white); }
.card-body { padding: 1.5rem; }
.card-title { font-weight: 700; color: var(--gray-900); margin-bottom: 0.5rem; }
.card-text { color: var(--gray-600); font-size: 1.05rem; }

/* Zarovnání karet - stejná výška v řádku */
.row > [class*="col"] > .card,
.row > [class*="col"] > a > .card,
.row > [class*="col"] > article.card,
.row > [class*="col"] > a > article.card {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.row > [class*="col"] > .card .card-body,
.row > [class*="col"] > a > .card .card-body,
.row > [class*="col"] > article.card .card-body,
.row > [class*="col"] > a > article.card .card-body {
    flex: 1;
}

/* News cards */
.news-card { background-color: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg); overflow: hidden; transition: all 0.3s ease; }
.news-card:hover { box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); transform: translateY(-4px); }
.news-card .news-image { height: 200px; background-color: var(--primary); }

/* Badges */
.badge { font-weight: 600; font-size: 0.85rem; padding: 0.4rem 0.8rem; border-radius: var(--radius); }
.badge.bg-primary { background-color: var(--primary) !important; }
.badge.bg-success { background-color: var(--cvut-green) !important; }
.badge.bg-info { background-color: var(--cvut-teal) !important; }
.badge.bg-warning { background-color: var(--cvut-yellow) !important; color: var(--cvut-black) !important; }

/* Forms */
.form-control, .form-select { font-size: 0.95rem; padding: 0.75rem 1rem; border: 1px solid var(--gray-300); border-radius: var(--radius); background-color: var(--white); transition: all 0.2s ease; }
.form-control:focus, .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(0, 101, 189, 0.15); outline: none; }
.form-label { font-weight: 600; font-size: 0.9rem; color: var(--gray-700); margin-bottom: 0.5rem; }

/* Breadcrumb */
.breadcrumb { background-color: transparent; padding: 0; margin-bottom: 1.5rem; }
.breadcrumb-item a { color: var(--primary); }
.breadcrumb-item.active { color: var(--gray-500); }

/* Tables */
.table thead th { font-weight: 600; color: var(--gray-700); border-bottom: 2px solid var(--gray-200); }
.table tbody tr:hover { background-color: var(--gray-50); }

/* Footer */
footer { background-color: var(--gray-800) !important; color: var(--gray-300); padding: 3rem 0 2rem; }
footer h5, footer h6 { color: var(--white); font-weight: 600; }
footer a { color: var(--gray-400); }
footer a:hover { color: var(--white) !important; }

/* ============================================
   MOBILNÍ RESPONSIVITA
   ============================================ */

/* Tablets a menší */
@media (max-width: 991px) {
    /* Hero sekce */
    .hero-section h1 {
        font-size: 2rem !important;
    }

    .hero-section p {
        font-size: 1rem !important;
    }

    /* Kontejnery */
    .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    /* Karty */
    .card-body {
        padding: 1rem !important;
    }

    /* Nadpisy */
    h1 { font-size: 1.75rem !important; }
    h2 { font-size: 1.5rem !important; }
    h3 { font-size: 1.25rem !important; }
    h4 { font-size: 1.1rem !important; }

    /* Footer */
    footer .container-fluid {
        padding-left: 1.5rem !important;
        padding-right: 1.5rem !important;
    }

    /* Yale mozaika - na tabletu použít grid */
    .yale-mosaic-container {
        display: grid !important;
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 1rem !important;
        position: relative !important;
        height: auto !important;
        padding-bottom: 0 !important;
    }

    .ym-photo {
        position: relative !important;
        width: 100% !important;
        height: 250px !important;
        top: auto !important;
        left: auto !important;
    }
}

/* Mobilní telefony */
@media (max-width: 767px) {
    /* Hero sekce */
    .hero-section {
        padding: 2rem 0 !important;
    }

    .hero-section h1 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }

    .hero-section p {
        font-size: 0.9rem !important;
    }

    .hero-section .btn {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
    }

    /* Nadpisy */
    h1 { font-size: 1.5rem !important; }
    h2 { font-size: 1.3rem !important; }
    h3 { font-size: 1.15rem !important; }
    h4 { font-size: 1rem !important; }
    h5 { font-size: 0.95rem !important; }
    h6 { font-size: 0.9rem !important; }

    /* Page header */
    .page-header {
        padding: 2rem 0 !important;
    }

    .page-header h1 {
        font-size: 1.5rem !important;
    }

    /* Kontejnery a spacing */
    .container {
        padding-left: 15px !important;
        padding-right: 15px !important;
    }

    .mb-5, .my-5 {
        margin-bottom: 2rem !important;
    }

    .mt-5, .my-5 {
        margin-top: 2rem !important;
    }

    .py-5 {
        padding-top: 2rem !important;
        padding-bottom: 2rem !important;
    }

    /* Karty */
    .card {
        margin-bottom: 1rem !important;
    }

    .card-body {
        padding: 0.75rem !important;
    }

    .card-body h4 {
        font-size: 1rem !important;
        margin-bottom: 0.5rem !important;
    }

    .card-body h6 {
        font-size: 0.9rem !important;
    }

    .card-body p {
        font-size: 0.85rem !important;
    }

    /* Buttony */
    .btn {
        font-size: 0.85rem !important;
        padding: 0.5rem 1rem !important;
    }

    .btn-lg {
        font-size: 0.9rem !important;
        padding: 0.6rem 1.2rem !important;
    }

    /* Badges */
    .badge {
        font-size: 0.7rem !important;
        padding: 0.3rem 0.6rem !important;
    }

    /* Obrázky */
    img {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Grid - všechny sloupce na 100% na mobilu */
    .row > [class*="col-"] {
        margin-bottom: 1.5rem !important;
    }

    /* Karty nesmí mít fixní výšku na mobilu */
    .row > [class*="col"] > .card,
    .row > [class*="col"] > a > .card,
    .row > [class*="col"] > article.card,
    .row > [class*="col"] > a > article.card,
    .row > [class*="col"] > .soutez-card-3d,
    .row > [class*="col"] > .enhanced-card,
    .row > [class*="col"] > .hover-lift-enhanced,
    .soutez-card-3d,
    .enhanced-card,
    .card-3d {
        height: auto !important;
        margin-bottom: 1.5rem !important;
    }

    /* Footer */
    footer {
        padding: 2rem 0 1rem !important;
    }

    footer .container-fluid {
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }

    footer .row {
        text-align: center !important;
    }

    footer .col-lg-3,
    footer .col-lg-4,
    footer .col-lg-5,
    footer .col-md-4,
    footer .col-md-6 {
        margin-bottom: 1.5rem !important;
    }

    footer h5 {
        font-size: 1rem !important;
        margin-bottom: 0.75rem !important;
    }

    footer .small,
    footer small {
        font-size: 0.8rem !important;
    }

    footer .text-md-end {
        text-align: center !important;
    }

    /* Breadcrumb */
    .breadcrumb {
        font-size: 0.8rem !important;
    }

    /* Tables - responsivní scroll */
    .table-responsive {
        overflow-x: auto !important;
        -webkit-overflow-scrolling: touch !important;
    }

    /* Modal */
    .modal-dialog {
        margin: 0.5rem !important;
    }

    .modal-content {
        border-radius: var(--radius-lg) !important;
    }

    .modal-header {
        padding: 1rem !important;
    }

    .modal-header h3 {
        font-size: 1.1rem !important;
    }

    .modal-body {
        padding: 1rem !important;
    }

    /* Yale mozaika - na mobilu single column */
    .yale-mosaic-container {
        display: block !important;
        position: relative !important;
        height: auto !important;
        padding-bottom: 0 !important;
    }

    .ym-photo {
        position: relative !important;
        width: 100% !important;
        height: 200px !important;
        top: auto !important;
        left: auto !important;
        margin-bottom: 0.5rem !important;
    }

    /* Navigace */
    .navbar-nav {
        padding: 1rem 0 !important;
    }

    .nav-link {
        padding: 0.5rem 1rem !important;
        font-size: 0.9rem !important;
    }

    /* Skrýt dekorativní elementy na mobilu */
    .d-none.d-lg-block {
        display: none !important;
    }

    /* Section dividers */
    .section-divider {
        padding: 1.5rem 0 !important;
    }

    /* Team cards - stacked na mobilu */
    .team-member-card {
        margin-bottom: 1rem !important;
    }

    /* Lightbox na mobilu */
    .lightbox-content {
        max-width: 95% !important;
        max-height: 85% !important;
    }

    .lightbox-nav {
        font-size: 1.5rem !important;
        padding: 0.5rem !important;
    }

    .lightbox-prev {
        left: 10px !important;
    }

    .lightbox-next {
        right: 10px !important;
    }

    .lightbox-close {
        top: 10px !important;
        right: 10px !important;
        font-size: 1.5rem !important;
    }

    /* Gallery items */
    .gallery-item img {
        height: 150px !important;
    }

    /*Fix pro long text */
    p, .card-text, .text-muted {
        word-wrap: break-word !important;
        overflow-wrap: break-word !important;
    }

    /* Section subtitles */
    .section-subtitle {
        font-size: 0.75rem !important;
        letter-spacing: 1px !important;
    }

    /* Flex items - stack na mobilu */
    .d-flex.justify-content-between {
        flex-direction: column !important;
        align-items: flex-start !important;
    }

    .d-flex.gap-3 {
        gap: 0.5rem !important;
        flex-wrap: wrap !important;
    }
}

/* Extra malé mobily */
@media (max-width: 575px) {
    .hero-section h1 {
        font-size: 1.25rem !important;
    }

    h1 { font-size: 1.25rem !important; }
    h2 { font-size: 1.15rem !important; }
    h3 { font-size: 1rem !important; }
    h4 { font-size: 0.95rem !important; }

    .card-body {
        padding: 0.5rem !important;
    }

    .btn {
        font-size: 0.8rem !important;
        padding: 0.4rem 0.8rem !important;
    }

    .modal-dialog {
        margin: 0.25rem !important;
    }

    .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
    }
}

/* Univerzální mobilní fixe */
@media (max-width: 767px) {
    /* Zajistit že obrázky a media se vejdou na obrazovku */
    img, video, iframe, embed, object, svg {
        max-width: 100%;
    }

    /* Tabulky - vždy scrollovatelné na mobilu */
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    /* Preventovat horizontal scroll */
    body {
        overflow-x: hidden !important;
    }

    .container,
    .container-fluid {
        overflow-x: hidden !important;
    }

    /* Responsivní video/iframe */
    iframe,
    video,
    embed {
        max-width: 100% !important;
        height: auto !important;
    }

    /* Mobile-friendly navigation */
    .navbar-collapse {
        background: white;
        padding: 1rem;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }

    /* Zmenšit mezery mezi sekcemi */
    section {
        margin-bottom: 1.5rem !important;
    }

    /* Card images na mobilu */
    .card img {
        width: 100% !important;
        height: auto !important;
        object-fit: cover !important;
    }

    /* Button groups stackovat vertikálně */
    .btn-group {
        display: flex !important;
        flex-direction: column !important;
    }

    .btn-group .btn {
        width: 100% !important;
        margin-bottom: 0.5rem !important;
    }

    /* Zmenšit box shadows na mobilu pro lepší výkon */
    .shadow,
    .shadow-sm,
    .shadow-lg {
        box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    }
}

/* Hero section */





/* Sections */
section { padding: 4rem 0; }
.bg-light { background-color: var(--gray-50) !important; }

/* Timeline */
.timeline-item { position: relative; padding-left: 2rem; padding-bottom: 1.5rem; }
.timeline-item::before { content: ""; position: absolute; left: 0; top: 0.5rem; width: 10px; height: 10px; background-color: var(--primary); border-radius: 50%; }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 4px; top: 1.25rem; bottom: 0; width: 2px; background-color: var(--gray-200); }

/* Person cards */
.person-card { text-align: center; }
.person-card .person-photo { width: 100%; height: 100%; object-fit: cover; object-position: center top; }

/* Nav pills */
.nav-pills .nav-link { color: var(--gray-600); font-weight: 500; border-radius: var(--radius); }
.nav-pills .nav-link:hover { background-color: var(--gray-100); }
.nav-pills .nav-link.active { background-color: var(--primary); color: var(--white); }

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--gray-100); }
::-webkit-scrollbar-thumb { background: var(--gray-400); border-radius: var(--radius-sm); }
::-webkit-scrollbar-thumb:hover { background: var(--gray-500); }

/* Utilities */
.text-primary { color: var(--primary) !important; }
.bg-primary { background-color: var(--primary) !important; }
.text-muted { color: var(--gray-500) !important; }
.fw-bold { font-weight: 400 !important; }

/* Quick links hover */
section a[style*="border-radius: 8px"]:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(0,0,0,0.2); }

/* Responsive */
@media (max-width: 991.98px) {
    .navbar-nav { padding: 1rem 0; }
    .navbar .nav-link { color: #fff !important; font-weight: 500; font-size: 1rem; padding: 1rem 1.25rem !important; transition: all 0.2s ease; border-radius: 0; margin: 0; }
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
}

@media (max-width: 767.98px) {
    section { padding: 3rem 0; }
    .container { padding: 0 1rem; }
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
}

@media (max-width: 575.98px) {
    .btn-lg { padding: 0.75rem 1.5rem; font-size: 0.9rem; }
}

/* Print */
@media print {
    .navbar, .btn, footer { display: none !important; }
    body { font-size: 12pt; color: black; }
}

/* ===== GLOBÁLNÍ ZAOBLENÉ ROHY ===== */
/* Přepsání inline stylů pro konzistentní zaoblení */

/* Karty - hlavní layout prvky */
.card,
.card.border-0,
.card.h-100,
article.card,
.person-card,
.alumni-card,
.projekt-card,
.news-card {
    border-radius: var(--radius-lg) !important;
}

/* Card headers a photo containers */
.card .card-img-top,
.person-photo-container,
.card > div:first-child[style*="background"],
.card > div:first-child[style*="height"] {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

/* Card s obrázkem vlevo (row layout) */
.card .row.g-0 > div:first-child,
.card .row.g-0 > .col-4 {
    border-radius: var(--radius-lg) 0 0 var(--radius-lg) !important;
}

/* Hero obrázky */
.yale-mosaic img,
.hero-section img,
section img[style*="box-shadow"] {
    border-radius: var(--radius) !important;
}

/* Statistiky karty */
.card .card-body .h2,
.card .card-body .h4 {
    border-radius: 0;
}

/* Sticky sidebar karty */
.sticky-top.card,
.card.sticky-top {
    border-radius: var(--radius-lg) !important;
}

/* List group uvnitř karet */
.card .list-group,
.card .list-group-flush {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
}

.card .list-group-item:last-child {
    border-radius: 0 0 var(--radius-lg) var(--radius-lg) !important;
}

/* Modální okna - přepsání inline */
.modal-content,
div.modal-content {
    border-radius: var(--radius-lg) !important;
}

.modal-header {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

/* Tlačítka s inline styly */
.btn[style*="border-radius"],
button[style*="border-radius"] {
    border-radius: var(--radius) !important;
}

/* Obrázky */
img:not(.navbar-brand img):not(header img) { border-radius: var(--radius); }
figure img { border-radius: var(--radius); }

/* Alertové boxy */
.alert { border-radius: var(--radius-lg); }

/* Dropdown menu */
.dropdown-menu { border-radius: var(--radius); overflow: hidden; }
.dropdown-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.dropdown-item:last-child { border-radius: 0 0 var(--radius) var(--radius); }

/* Modální okna */
.modal-content { border-radius: var(--radius-lg); overflow: hidden; }
.modal-header { border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.modal-footer { border-radius: 0 0 var(--radius-lg) var(--radius-lg); }

/* Lightbox */
.lightbox-content { border-radius: var(--radius-lg); }

/* Gallery items */
.gallery-item { border-radius: var(--radius); overflow: hidden; }
.gallery-item img { border-radius: var(--radius); }

/* Person cards - foto */
.person-card .card-img-top,
.person-photo-wrapper,
.person-photo { border-radius: var(--radius) var(--radius) 0 0; }

/* Toast notifikace */
.toast { border-radius: var(--radius); }

/* Progress bar */
.progress { border-radius: var(--radius); }
.progress-bar { border-radius: var(--radius); }

/* Tooltip a popover */
.tooltip-inner { border-radius: var(--radius-sm); }
.popover { border-radius: var(--radius); }

/* Pagination */
.page-link { border-radius: var(--radius-sm) !important; }
.page-item:first-child .page-link { border-radius: var(--radius) 0 0 var(--radius) !important; }
.page-item:last-child .page-link { border-radius: 0 var(--radius) var(--radius) 0 !important; }

/* Input groups */
.input-group > .form-control:first-child,
.input-group > .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.input-group > .form-control:last-child,
.input-group > .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }

/* List group */
.list-group { border-radius: var(--radius); overflow: hidden; }
.list-group-item:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.list-group-item:last-child { border-radius: 0 0 var(--radius) var(--radius); }

/* Accordion */
.accordion { border-radius: var(--radius); overflow: hidden; }
.accordion-item:first-of-type { border-radius: var(--radius) var(--radius) 0 0; }
.accordion-item:last-of-type { border-radius: 0 0 var(--radius) var(--radius); }
.accordion-button { border-radius: var(--radius) !important; }

/* Thumbnails a media */
.thumbnail, .media-object { border-radius: var(--radius); }

/* Embed responsive */
.embed-responsive { border-radius: var(--radius); overflow: hidden; }
iframe { border-radius: var(--radius); }

/* Well a jumbotron */
.well, .jumbotron { border-radius: var(--radius-lg); }

/* Tabs */
.nav-tabs .nav-link { border-radius: var(--radius) var(--radius) 0 0; }
.tab-content { border-radius: 0 0 var(--radius) var(--radius); }

/* ===== PŘEPSÁNÍ INLINE STYLŮ NA STRÁNKÁCH ===== */
/* Tyto pravidla přepisují hardcoded inline border-radius */

/* Všechny elementy s inline border-radius: 12px */
[style*="border-radius: 12px"],
[style*="border-radius:12px"] {
    border-radius: var(--radius-lg) !important;
}

/* Všechny elementy s inline border-radius: 8px */
[style*="border-radius: 8px"],
[style*="border-radius:8px"] {
    border-radius: var(--radius) !important;
}

/* Všechny elementy s inline border-radius: 6px */
[style*="border-radius: 6px"],
[style*="border-radius:6px"] {
    border-radius: var(--radius) !important;
}

/* Všechny elementy s inline border-radius: 15px */
[style*="border-radius: 15px"],
[style*="border-radius:15px"] {
    border-radius: var(--radius) !important;
}

/* Všechny elementy s inline border-radius: 20px */
[style*="border-radius: 20px"],
[style*="border-radius:20px"] {
    border-radius: var(--radius) !important;
}

/* Všechny elementy s inline border-radius: 0 (přepsat na zaoblené) */
.modal-content[style*="border-radius: 0"],
[style*="border-radius: 0;"] {
    border-radius: var(--radius) !important;
}

/* Person cards - special 3D efekt */
.person-card::before {
    border-radius: var(--radius-lg) !important;
}

/* Alumni carousel */
.alumni-card {
    border-radius: var(--radius-lg) !important;
}

.alumni-photo {
    border-radius: var(--radius-lg) var(--radius-lg) 0 0 !important;
}

/* Katedra box (hero) */
.katedra-box {
    border-radius: var(--radius) !important;
}

.rotating-circle,
.rotating-circle::before {
    border-radius: var(--radius-lg) !important;
}

/* Mosaic items */
.mosaic-item {
    border-radius: var(--radius) !important;
}

/* Link boxes */
.mosaic-link-box,
.tb-link {
    border-radius: var(--radius) !important;
}

/* BG Light rounded sekce */
.bg-light.rounded,
.p-3.bg-light.rounded,
div.bg-light.rounded {
    border-radius: var(--radius) !important;
}

/* Quick links */
.quick-link,
a.quick-link {
    border-radius: var(--radius) !important;
}

/* ===== CERTIFIKÁTY ===== */
.cert-card-3d {
    border-radius: 0 !important;
    overflow: visible !important; /* Info box přesahuje přes kartu */
}

.cert-card-3d img {
    border-radius: 24px !important;
}

.cert-info-box-3d {
    border-radius: 24px !important;
}

/* ===== HERO/ÚVODNÍ OBRÁZKY NA STRÁNKÁCH ===== */
/* Yale hero obrázky - zaoblené rohy */
.yale-mosaic {
    border-radius: 24px !important;
    overflow: hidden !important;
}
.yale-hero img,
.yale-mosaic img,
.yale-hero-inner img {
    border-radius: 24px !important;
}

/* Studijní programy - obrázky */
section img[style*="object-fit"],
article img[style*="object-fit"],
div[style*="overflow: hidden"] img {
    border-radius: var(--radius) !important;
}

/* Obrázky v sekcích */
section .mb-4 img,
section .card img,
.card-img-top {
    border-radius: var(--radius) !important;
}

/* Flip cards */
.flip-card,
.flip-card-inner,
.flip-card-front,
.flip-card-back,
.flip-card-front .card,
.flip-card-back .card {
    border-radius: var(--radius) !important;
}

/* Sekce s pozadím a overflow */
div[style*="overflow: hidden"],
section div[style*="overflow: hidden"],
article[style*="overflow: hidden"] {
    border-radius: var(--radius) !important;
}

/* Modální okna certifikátů */
.modal-content[style*="border-radius: 0"] {
    border-radius: var(--radius) !important;
}

/* ===== EXKURZE A DALŠÍ STRÁNKY ===== */
/* Enhanced cards */
.enhanced-card,
.card-3d,
.hover-lift-enhanced {
    border-radius: var(--radius) !important;
}

/* Zarovnání enhanced/3d karet */
.row > [class*="col"] > .enhanced-card,
.row > [class*="col"] > .hover-lift-enhanced,
.row > [class*="col"] > a > .enhanced-card,
.row > [class*="col"] > a > .hover-lift-enhanced,
.row > [class*="col"] > .soutez-card-3d {
    height: 100%;
    display: flex;
    flex-direction: column;
}
.enhanced-card .card-body,
.hover-lift-enhanced .card-body,
.soutez-card-3d .card-body {
    flex: 1;
}

/* Image containers */
.image-container,
.image-container img {
    border-radius: var(--radius) var(--radius) 0 0 !important;
}

/* Date badges */
.date-badge {
    border-radius: var(--radius) !important;
}

/* Hero sections bez Yale stylu */
.hero-section {
    border-radius: 0; /* Hero sekce má být full-width bez zaoblení */
}

/* Karty uvnitř hero sekcí */
.hero-section + div .card,
div[style*="margin-top: -100px"] .card {
    border-radius: var(--radius) !important;
}

/* Gallery grid */
.gallery-grid img,
.gallery-item img,
.lightbox-trigger img {
    border-radius: var(--radius) !important;
}

/* Detailové stránky - hero obrázky */
.detail-hero img,
.exkurze-hero img,
.prednaska-hero img {
    border-radius: var(--radius) !important;
}

/* Kontaktní stránka */
.contact-card,
.map-container,
.map-container iframe {
    border-radius: var(--radius) !important;
}










/* Rotující čára kolem tlačítka */
@property --angle {
    syntax: "<angle>";
    initial-value: 0deg;
    inherits: false;
}

.yale-btn::before {
    content: "";
    position: absolute;
    inset: -2px;
    background: conic-gradient(from var(--angle), transparent 70%, #0065BD 100%);
    z-index: -2;
    animation: rotateBorder 2s linear infinite;
    border-radius: 24px;
}

.yale-btn::after {
    content: "";
    position: absolute;
    inset: 1px;
    background: #fff;
    z-index: -1;
    border-radius: 24px;
}

@keyframes rotateBorder {
    0% { --angle: 0deg; }
    100% { --angle: 360deg; }
}

.yale-btn:hover {
    color: #156570;
}

.yale-lion {
    font-size: 1.8rem;
}

/* Section Dividers - vizuální oddělení sekcí */
.section-divider {
    position: relative;
    border-top: none;
}

.section-divider::before {
    content: "";
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(0, 101, 189, 0.6), transparent);
}

.section-divider::after {
    display: none;
}


/* Scrollující text v hlavičce */
@keyframes scroll-text {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.scrolling-text {
    display: inline-block;
    white-space: nowrap;
}

.scrolling-container {
    overflow: hidden;
    width: 100%;
}

/* ===== MOBILE PRODUCTION FIXES ===== */
@media (max-width: 767px) {
    /* Skrýt dekorativní kruhy, které přetékají na mobilu */
    .position-absolute[style*="border-radius: 50%"] {
        display: none !important;
    }

    /* Menší výška obrázků v kartách na mobilu */
    .image-container {
        height: 180px !important;
    }

    /* Responsive footer padding */
    .container-fluid[style*="padding: 0 3rem"] {
        padding: 0 1rem !important;
    }
}
