/* === Общие стили === */
body {
    background-color: rgb(219, 219, 219);
    color: rgb(210, 210, 210);
    max-width: 100%;
    overflow-x: hidden;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* === Шапка сайта === */
header {
    display: flex;
    flex-direction: column;
    text-align: center;
    border-bottom: 2px solid rgb(230, 230, 230);
    padding: 10px;
    background-color: rgb(245, 245, 245);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    margin-right: 10px;
    padding: 10px 20px;
    gap: 10px;
}

.nav-links {
    justify-content: space-between;
}
.button-container{
   justify-items: center;
   justify-content: space-around; 
}
.nav a {
    color: rgb(24, 24, 24);
    text-decoration: none;
    white-space: nowrap;
    font-size: large;
    padding: 0 1rem;
}

.nav a:hover {
    cursor: pointer;
}

.logo img {
    height: 60px;
    width: auto;
    padding-bottom: 10px;
}

#lang-toggle {
    background-color: #ffffff;
    color: #222;
    border: 1px solid #ccc;

    padding: 5px 10px;
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.5px;

    cursor: pointer;
    margin: 10px;
    align-self: center;

    border-radius: 6px;
    transition:
        background-color 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

#lang-toggle:hover {
    background-color: #f0f0f0;
    border-color: #999;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

#lang-toggle:active {
    background-color: #e0e0e0;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.2);
}

main {
    background-image: url("../img/company/1.jpg");
    background-size: auto;
    padding: 20px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    background-repeat: no-repeat;
    background-position: center;
}

main ul {
    background-color: rgb(45, 45, 45);
    border: 1px solid rgb(80, 80, 80);
    border-radius: 8px;
    padding: 15px 20px 15px 40px;
    margin-bottom: 20px;
}

main ul li {
    margin-top: 20px;
    margin-bottom: 10px;
    padding-left: 5px;
    list-style-type: disc;
    color: rgb(230, 230, 230);
}

.projects h2 {
    margin-bottom: 20px;
    font-size: 24px;
}

.year {
    margin-bottom: 20px;
}

.year h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: rgb(211, 211, 211);
}

.year ul {
    padding-left: 20px;
    margin: 0;
}

.year li {
    margin-bottom: 5px;
    list-style-type: disc;
}

.accordion {
    background-color: #2a2a2a;
    color: #fff;
    cursor: pointer;
    padding: 15px 20px;
    width: 100%;
    border: none;
    text-align: left;
    outline: none;
    font-size: 1.1rem;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #444;
}

.accordion:hover {
    background-color: #3a3a3a;
}

.panel {
    padding: 0 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease;
    background-color: #1e1e1e;
    border-left: 3px solid #444;
}

.panel ul {
    margin: 15px 0;
    padding-left: 20px;
}

#Partners h2 {
    color: #fff;
    font-size: 2rem;
    margin-bottom: 30px;
    text-align: center;
    padding-top: 30px;
}

.partners-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    padding: 40px 20px;
}

.partners-container a {
    text-decoration: none;
    flex: 1 1 calc(20% - 20px);
    min-width: 200px;
    max-width: 400px;
    display: flex;
    justify-content: center;
}

.partner {
    background-color: rgb(45, 45, 45);
    border: 1px solid rgb(80, 80, 80);
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

.partner:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.05);
}

#Partner-Logo {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100px;
    margin-bottom: 10px;
}

#Partner-Logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.partner-name {
    color: #ccc;
    font-size: 0.9rem;
}

.license-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    padding: 10px 0;
}

.license-section-title {
    text-align: center;
}

.image-container {
    background-color: rgb(45, 45, 45);
    border: 1px solid rgb(80, 80, 80);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    justify-content: center;
    flex: 1 1 30%;
    max-width: 300px;
    box-sizing: border-box;
}

.image-container img {
    width: 100%;
    height: auto;
    cursor: zoom-in;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.image-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
    animation: fadeIn 0.3s ease;
}

.image-popup img {
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(0, 0, 0, 0.5);
    animation: zoomIn 0.3s ease;
}

.footer {
    background-color: rgb(229, 229, 229);
    color: rgb(55, 55, 55);
    padding: 30px 20px 10px;
    margin-top: 40px;
    font-size: 14px;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-section {
    flex: 1 1 250px;
    min-width: 200px;
}

.footer-section h3 {
    color: black;
    margin-bottom: 10px;
    font-size: 16px;
}

.footer a {
    color: rgb(70, 70, 180);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footer-bottom {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid rgb(190, 190, 190);
    padding-top: 10px;
    font-size: 13px;
    color: rgb(80, 80, 80);
}

.more-button {
    display: inline-block;
    margin: 20px auto;
    padding: 10px 20px;
    background-color: rgb(60, 60, 60);
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
    transition: background-color 0.3s ease;
    text-align: center;
}

.more-button:hover {
    background-color: rgb(90, 90, 90);
}

.more-button-container {
    display: flex;
    justify-content: center;
}

.project-icon {
    max-width: 100%;
    height: 15vh;
    margin-right: 8px;
    padding: 5px;
    vertical-align: middle;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes zoomIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

@media (max-width: 1024px) {
    .partners-container a {
        flex: 1 1 calc(33.33% - 20px);
    }
}

@media (max-width: 840px) {
    header {
        padding: 4px;
    }

    #lang-toggle {      
        font-size: 12px;
        padding: 4px 8px;
        margin: 5px auto;
    }

    .nav {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-links {
        display: flex;
        justify-content: center;
        flex-wrap: wrap;
        gap: 10px;
        width: 100%;
    }

    main {
        padding: 10px;
        margin: 0 10px;
        min-height: 100vh;
        background-repeat: repeat-y;
    }
}

@media (max-width: 768px) {
    .partners-container a {
        flex: 1 1 calc(50% - 20px);
    }

    .image-container {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .partners-container a {
        flex: 1 1 100%;
    }
}

/* ===============================
   THEME SWITCHER (layout only)
   =============================== */

.theme-switcher {
    position: relative;
    display: inline-block;
    padding-right: 5%;
    
}

#theme-toggle {
    padding: 6px 12px;
    border-radius: 9px;
    cursor: pointer;
    background-color: #fff;
}

.theme-popup {
    position: absolute;
    top: 120%;
    right: 0;
    border-radius: 10px;
    padding: 8px;
    max-width: calc(100vw - 16px);
    min-width: 190px;
    z-index: 1000;

    opacity: 0;
    transform: translateY(-10px) scale(0.98);
    pointer-events: none;
    background-color: #2a2a2a;
    border: 1px solid #444;
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.theme-popup.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.theme-label {
    color: #fff;
}

.theme-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    cursor: pointer;
    border-radius: 6px;
}

.theme-circle {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
}