/* ----------------------------------------------------------------------
   BASE TYPOGRAPHY & RESET
   ---------------------------------------------------------------------- */
html {
    overflow-x: hidden;
}

html,
body {
    -webkit-font-smoothing: antialiased;
    text-align: left;
    /* Global Override from original file */
    font-family: var(--font-heading) !important;
    font-size: clamp(16px, 2vw, 22px);
}

p {
    font-size: 19px;
    font-weight: 400;
    font-family: var(--font-main);
    color: var(--color-text-main);
    line-height: 1.4;
    margin-bottom: 16px;
    text-align: left;
}

a {
    font-family: var(--font-main);
    color: var(--color-text-dark);
    outline: 0;
    text-decoration: none;
    transition: color 0.2s;
}

a:hover,
a:focus,
a:active {
    color: var(--color-text-light);
    outline: 0;
    text-decoration: none;
}

h1,
h2,
h3,
h4 {
    font-weight: 600;
    font-family: var(--font-main);
    color: var(--color-primary);
    line-height: 1.4;
    margin: 0 0 15px;
}

/* Heading Sizes & Overrides */
h1 {
    font-size: 40px;
}

h2 {
    font-size: 30px;
}

h3 {
    font-size: 2.2rem !important;
    font-weight: 700 !important;
    color: var(--color-primary) !important;
}

h4 {
    font-size: 2rem;
}

h1>a,
h2>a,
h3>a,
h4>a {
    color: var(--color-text-dark);
}

h1>a:hover,
h2>a:hover {
    color: var(--color-text-light);
    text-decoration: none;
}

/* ----------------------------------------------------------------------
   USELESS?
   ---------------------------------------------------------------------- 
::selection {
    color: #fff;
    background: var(--color-accent);
    text-shadow: none;
}
*/

/* ----------------------------------------------------------------------
   COMPONENTS (Buttons, Forms, UI)
   ---------------------------------------------------------------------- */

/* Buttons */
.btn-theme {
    position: relative;
    display: inline-block;
    line-height: 1.4;
    text-align: center;
    border-style: solid;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    transition: all 300ms cubic-bezier(0.7, 1, 0.7, 1);
}

.btn-theme:hover,
.btn-theme:focus {
    text-decoration: none;
    outline: none;
}

.btn-theme.disabled {
    opacity: .65;
    pointer-events: none;
}

.btn-white-brd {
    color: #fff;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-white-brd:hover {
    color: #515769;
    background: #fff;
    border-color: transparent;
}

.btn-default-bg {
    color: #515769;
    background: #f3f4f5;
    border: 0;
}

.btn-default-bg:hover {
    color: #fff;
    background: var(--color-accent);
}

.btn-base-bg {
    color: #fff;
    background: var(--color-accent);
    border: 0;
}

.btn-base-bg:hover {
    background: var(--color-accent-hover);
    color: #fff;
}

.btn-theme-sm {
    font-size: 13px;
    font-weight: 600;
    padding: 15px 30px;
}

/* Forms */
.form-control {
    height: 50px;
    font-size: 14px;
    font-weight: 400;
    color: #a6a7aa;
    background: var(--bg-light);
    border: none;
    box-shadow: none;
    border-radius: 0;
    padding-left: 15px;
}

.form-control:focus {
    color: #cac9d0;
    box-shadow: none;
}

/* Links & Decoration */
.link {
    position: relative;
    font-size: 13px;
    font-weight: 600;
    font-family: var(--font-main);
    text-transform: uppercase;
}

.link:after {
    position: absolute;
    top: 8px;
    right: -15px;
    width: 9px;
    height: 2px;
    background: var(--color-accent);
    content: " ";
}

.back-to-top {
    position: fixed;
    right: 10px;
    bottom: 10px;
    display: inline-block;
    z-index: 9;
    width: 40px;
    height: 40px;
    line-height: 3.5;
    font-size: 11px;
    color: #fff;
    text-align: center;
    background: #515769;
    border-radius: var(--border-radius-sm);
    visibility: hidden;
    opacity: 0;
    transform: translate3d(0, 50px, 0);
    transition: all 300ms cubic-bezier(0.7, 1, 0.7, 1);
}

/* Logic of button Back to Top */
.back-to-top.back-to-top-fade-out {
    opacity: .4;
}

.back-to-top.back-to-top-is-visible {
    visibility: visible;
    opacity: .6;
    transform: translate3d(0, 0, 0);
    transition: all 300ms cubic-bezier(0.7, 1, 0.7, 1);
}

.back-to-top:hover {
    color: #fff;
}

.content {
    padding-top: 40px;
    padding-bottom: 40px;
}

/* ----------------------------------------------------------------------
   CUSTOM SECTIONS (History, Topics, PDF)
   ---------------------------------------------------------------------- */

/* History Images */
.history-images {
    display: flex;
    flex-wrap: nowrap;
    gap: 32px;
    justify-content: center;
    align-items: center;
    margin: 2.5em 0;
}

.history-images img {
    height: 220px;
    width: auto;
    max-height: 100%;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.10);
    object-fit: cover;
    transition: box-shadow 0.2s, transform 0.2s;
    display: block;
}

.history-images img:hover {
    box-shadow: 0 8px 32px rgba(93, 188, 0, 0.18);
    transform: scale(1.04);
}

/* PDF Preview & Registration */
.pdf-preview-full {
    width: 100%;
    max-width: 100%;
    margin: 0 0 1.5em 0;
    padding: 0;
    box-sizing: border-box;
}

.registrace-div .pdf-preview-full {
    width: 100%;
    max-width: 100%;
}

.pdf-embed-full {
    width: 100%;
    height: 100vh;
    min-height: 420px;
    max-height: 80vh;
    border: none;
    display: block;
    background: #f8f8f8;
}

/* Board / Team Grid */
.organising-board-div .row,
.advisory-board-div .row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 16px;
}

.organising-board-div .col-md-4,
.advisory-board-div .col-md-4 {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
}

.navbar-toggle {
    border: none;
    background: transparent;
    font-size: 2em;
}

/* separator for visual clarity */
.separating-line {
    background-color: var(--color-primary);
    height: 2.5rem;
    width: 100%;
}

/* Fixing modal shifting and padding issues */
body.modal-open {
    overflow-y: scroll !important;
    padding-right: 0 !important;
}

/* ----------------------------------------------------------------------
   MEDIA QUERIES (Responsive)
   ---------------------------------------------------------------------- */

@media (max-width: 1100px) {
    .history-images {
        gap: 16px;
    }

    .history-images img {
        height: 140px;
        width: auto;
    }
}

@media (max-width: 991px) {

    .organising-board-div .row,
    .advisory-board-div .row {
        flex-direction: column;
        align-items: center;
    }

    .organising-board-div .col-md-4,
    .advisory-board-div .col-md-4 {
        width: 100%;
        max-width: 320px;
    }
}

@media (max-width: 700px) {

    /* History Images Mobile */
    .history-images {
        flex-wrap: wrap;
        gap: 8px;
    }

    .history-images img {
        width: 100%;
        height: auto;
        max-width: 320px;
        min-height: unset;
    }

    /* PDF Mobile */
    .pdf-preview-full {
        margin-bottom: 0.5em;
        padding: 0.5em 0;
    }

    .pdf-embed-full {
        display: none !important;
    }

    .pdf-preview-full img {
        max-height: 220px;
        width: 100%;
        object-fit: contain;
        margin-bottom: 0.5em;
    }

    /* PDF Download Button (Mobile Only) */
    .pdf-download-link {
        display: block;
        margin: 0.5em auto;
        font-size: 1.1em;
        text-align: center;
        background: var(--color-secondary-bg);
        color: var(--color-primary);
        border-radius: 8px;
        padding: 0.6em 1.2em;
        text-decoration: none;
        box-shadow: 0 2px 8px 0 rgba(0, 0, 0, 0.04);
        font-weight: 600;
        transition: background 0.2s, color 0.2s;
    }

    .pdf-download-link:hover {
        background: var(--color-primary);
        color: #fff;
    }
}

@media (max-width: 600px) {
    h3 {
        font-size: 2rem !important;
    }

    h4 {
        font-size: 1.2rem;
    }
}

@media (max-width: 350px) {
    .container {
        width: 334px;
    }
}