* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f4f4f4;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================
   Navigation Bar
============================ */

.navbar {
    background-color: #1a3a52;
    color: #fddc5c;
    padding: 0.5rem 0 1rem;
    position: sticky;
    top: 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 100;
    overflow: visible;
}

.navbar .container {
    position: relative;
    display: grid;
    grid-template-columns: auto auto auto;
    align-items: center;
    gap: 20px;
}

.logo {
    justify-self: start;
    color: #fddc5c;
    font-size: 1.5rem;
    font-weight: bold;
    text-decoration: none;
    line-height: 1.2;
}

.logo:hover {
    color: #d8b131;
}

.navbar-logo-img {
    position: relative; 
    height: 70px;
    width: auto;
    z-index: 150;
    pointer-events: none;
    margin: 0 auto; 
}

.nav-right {
    justify-self: end;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.4rem;
    padding-top: 28px;
}

.nav-links {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 1rem;
    flex-wrap: nowrap;
}

.nav-links > li {
    position: relative;
}

.nav-links a {
    display: inline-block;
    flex-shrink: 0;
    white-space: nowrap;
    background-color: #fddc5c;
    color: #1a3a52;
    text-decoration: none;
    padding: 0.55rem 1rem;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    background-color: #d8b131;
    color: #ffffff;
    transform: translateY(-2px);
}

.nav-links a.active {
    background-color: #d8b131;
    color: #ffffff;
    transform: none;
}

/* ============================
   Dropdown Menu
============================ */

.dropdown {
    position: relative;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 230px;
    background-color: #1a3a52;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    border-radius: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.25);
    z-index: 999;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    width: 100%;
    background-color: #fddc5c;
    color: #1a3a52;
    padding: 0.7rem 1rem;
    border-radius: 0;
    text-align: left;
}

.dropdown-menu a:hover {
    background-color: #d8b131;
    color: #1a3a52;
    transform: none;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

/* ============================
   Language Switcher & Toggle
============================ */

.language-switcher {
    position: absolute;
    top: 10px;
    right: 12px;
    display: flex;
    justify-content: flex-end;
    gap: 0.35rem;
    align-items: center;
    margin-bottom: 0.1rem;
    z-index: 500;
}

.lang-flag {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 26px;
    height: 18px;
    padding: 2px;
    font-size: 1.35rem;
    text-decoration: none;
    background-color: #fddc5c;
    border-radius: 4px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
    cursor: pointer;
}

.lang-flag img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

.lang-flag:hover {
    background-color: #3edb29;
    transform: none;
}

.active-lang {
    border-color: #ffffff;
    background-color: #3edb29;
}

/* Классы для переключения языков */
.lang-en {
    display: none;
}

body.english-active .lang-sr {
    display: none;
}

body.english-active .lang-en {
    display: block;
}

body.english-active span.lang-en,
body.english-active strong.lang-en,
body.english-active a.lang-en,
body.english-active i.lang-en {
    display: inline;
}

/* ============================
   Hero Section
============================ */

.hero {
    background: linear-gradient(135deg, #1a3a52 0%, #2c5aa0 100%);
    color: white;
    padding: 6rem 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero h2 {
    margin-bottom: 1rem;
}

.hero .subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.invited-speaker {
    background-color: #f9f9f9;
    border-left: 4px solid #fddc5c;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 4px;
}

/* ============================
   Main Content
============================ */

main {
    min-height: calc(100vh - 200px);
}

.content {
    background-color: white;
    padding: 3rem 0;
}

.content h1 {
    color: #1a3a52;
    margin-bottom: 1rem;
    font-size: 2.5rem;
}

.content h2 {
    color: #2c5aa0;
    margin-top: 2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #ffcc00;
}

.content h3 {
    color: #1a3a52;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.content p {
    text-align: justify;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.content ul,
.content ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content li {
    margin-bottom: 0.5rem;
}

/* ============================
   Welcome Section
============================ */

.welcome {
    background-color: white;
    padding: 3rem 0;
}

.welcome h1 {
    color: #153e7b;
    text-decoration: underline;
    text-align: center;
    margin-bottom: 2rem;
}

.welcome h2 {
    color: #153e7b;
    text-align: center;
    margin-bottom: 2rem;
}

.welcome p {
    font-size: 1.1rem;
    text-align: justify;
    max-width: 800px;
    margin: 0 auto;
}

.narrow-container {
    max-width: 900px;
}

/* ============================
   SOC / Committee Sections
============================ */

.soc {
    background-color: white;
    padding: 3rem 0;
}

.soc h2 {
    color: #153e7b;
    margin-top: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    border-bottom: 3px solid #ffcc00;
}

.soc ol,
.soc ul {
    padding-left: 2rem;
    margin: 0;
}

.soc li {
    margin-bottom: 0.8rem;
    line-height: 1.6;
    color: #1a3a52;
}

/* ============================
   Buttons
============================ */

.btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background-color: #ffcc00;
    color: #1a3a52;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1rem;
}

.btn:hover {
    background-color: #ffb800;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* ============================
   Registration / Abstract
============================ */

.form-center {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-top: 30px;
    padding: 0 10px;
}

.form-center iframe {
    width: 100%;
    max-width: 1140px;
    height: 1820px;
    border: none;
}

.Abstract-Submission-download {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
}

/* ============================
   Footer
============================ */

footer {
    background-color: #1a3a52;
    color: #fddc5c;
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

footer p {
    margin: 0;
}

/* ============================
   Responsive Design
============================ */

@media (max-width: 1050px) {
    .navbar .container {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 1rem;
    }

    .logo {
        justify-self: center;
        text-align: center;
    }

    .navbar-logo-img {
        position: static;
        transform: none;
        height: 65px;
        pointer-events: auto;
    }

    .nav-right {
        justify-self: center;
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-links {
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 4rem 0;
        background-attachment: scroll !important;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero h2 {
        font-size: 1.2rem;
    }

    .hero .subtitle {
        font-size: 1rem;
    }

    .logo {
        font-size: 1.15rem;
    }

    .nav-links {
        gap: 0.7rem;
        font-size: 0.9rem;
    }

    .nav-links a {
        padding: 0.5rem 0.8rem;
    }

    .content h1 {
        font-size: 1.8rem;
    }

    .content h2 {
        font-size: 1.3rem;
    }

    .welcome p {
        font-size: 1rem;
    }

    .form-center iframe {
        height: 2100px;
    }
}

.section-list {
    list-style: none;
    padding: 0;
    margin: 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.section-list li a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-left: 4px solid #0d6efd;
    border-radius: 6px;
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
}

.section-list li a:hover {
    background-color: #f1f5f9;
    border-color: #cbd5e1;
    border-left-color: #0a58ca;
    transform: translateX(4px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.section-list li a::after {
    content: "→";
    font-size: 1.1rem;
    color: #6c757d;
    transition: transform 0.2s ease;
}

.section-list li a:hover::after {
    transform: translateX(4px);
    color: #0d6efd;
}

.lang-en {
    display: none !important;
}

body.english-active .lang-sr {
    display: none !important;
}

body.english-active .lang-en {
    display: revert !important;
}

body:not(.english-active) select.lang-en { display: none !important; }
body.english-active select.lang-sr { display: none !important; }

@media (max-width: 768px) {
    .navbar {
        padding: 2px 0 !important;
    }

    .navbar .container {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        padding: 0 10px;
    }

    .language-switcher {
        position: absolute !important;
        right: 5px;
        top: 5px;
        display: flex;
        gap: 4px;
        margin: 0;
        z-index: 10;
    }
    .language-switcher img {
        width: 20px;
    }

    .navbar-logo-img {
        width: 45px;
        height: auto;
        max-width: none;
        margin: 2px auto;
    }

    .navbar .logo {
        font-size: 0.9em;
        text-align: center;
        display: block;
        width: 100%;
        margin: 4px 0 6px 0;
    }

    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
        padding: 0 5px 15px 5px;
        width: 100%;
    }
    .nav-links li {
        width: 48%;
        margin: 0;
    }
    .nav-links a {
        padding: 6px 4px;
        font-size: 0.7em;
        text-align: center;
        display: block;
        box-sizing: border-box;
        white-space: nowrap;
    }

    .dropdown {
        position: static;
    }
    .dropdown-menu {
        position: absolute;
        left: -40px;
        right: 15px;
        width: auto;
        box-sizing: border-box;
        background: transparent !important;
        padding: 0 !important;
        box-shadow: none !important;
        border: none !important;
    }
    .dropdown-menu li {
        width: 100%;
        margin: 0 !important;
    }
    .dropdown-menu a {
        width: 100%;
        white-space: normal;
        font-size: 0.75em;
    }

    p, .content p {
        text-align: justify !important;
    }
}