/* =====================================================
   BASE
===================================================== */

body {
    margin: 0;
    font-family: Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #2d3436;
    background-color: #ffffff;
    text-align: left;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@media (max-width: 576px) {
    body {
        padding: 0 10px;
    }
}

/* =====================================================
   HEADINGS
===================================================== */

h1, .h1 { font-size: 1rem; }
h2, .h2 { font-size: 1rem; }
h3, .h3 { font-size: 1.2rem; }

/* =====================================================
   HEADER
===================================================== */

.icms-header__middle {
    color: #ffffff;
    background: linear-gradient(
        45deg,
        rgba(191, 212, 191, 0.4) 0%,
        rgba(255, 255, 255, 1) 50%,
        rgba(117, 162, 115, 1) 100%
    );
}

/* =====================================================
   FOOTER
===================================================== */

.icms-footer__middle {
    background-image: url(../images/word_map.png);
    background-position: top;
    background-size: cover;
    background-repeat: no-repeat;
    background-color: #1e2224;
    color: #888888;
    box-shadow: 3px 11px 15px 3px rgba(0,0,0,0.15);
}

.icms-footer__middle > .container {
    border-color: #2a2f32 !important;
}

.icms-footer__bottom {
    background-color: #ffffff !important;
    color: #000000 !important;
}

.container + .icms-footer__bottom,
header + .icms-footer__bottom {
    margin-top: auto;
}

/* =====================================================
   UTILS
===================================================== */

.clickable {
    cursor: pointer;
}

#scroll-top {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 1038;
    visibility: hidden;
    opacity: 0;
    transform: translateY(5rem);
    transition: all 0.3s;
}

/* =====================================================
   SPOILER
===================================================== */

.icms-text-spoiler:not(.expanded) .icms-text-spoiler__wrap {
    max-height: 7.03125rem;
    overflow: hidden;
}

.icms-text-spoiler .btn-spoiler {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1.40625rem;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    font-size: 0.82rem;
    color: #495057;
    text-decoration: none;
    cursor: pointer;
    background-color: rgba(255,255,255,0.8);
    z-index: 100;
    animation: fadeBackground 0.7s forwards;
}

.icms-text-spoiler .btn-spoiler > span {
    display: block;
    background-color: #ffffff;
    padding: 0 1rem;
    animation: fadeIn 0.7s;
}

/* =====================================================
   ANIMATIONS
===================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeBackground {
    from { background-color: transparent; }
    to { background-color: rgba(255,255,255,0.8); }
}

/* =====================================================
   CONTENT NAVIGATION
===================================================== */

.ctype_navigation {
    display: flex;
    gap: 5px;
}

.previous_ctype_navigation,
.next_ctype_navigation {
    width: 50%;
    background-color: #000;
}

.previous_ctype_navigation a,
.next_ctype_navigation a {
    display: block;
    padding: 10px 20px;
    color: #2c3e50;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.previous_ctype_navigation a:hover,
.next_ctype_navigation a:hover {
    background: #dfe6e8;
}

@media (max-width: 480px) {
    .ctype_navigation {
        flex-direction: column;
    }

    .previous_ctype_navigation,
    .next_ctype_navigation {
        width: 100%;
    }
}

/* =====================================================
   TOAST NOTIFICATIONS
===================================================== */

.toast { background-color: #495057; }
.toast-success { background-color: #33bd66; }
.toast-error { background-color: #e66767; }
.toast-info { background-color: #0abde3; }
.toast-warning { background-color: #f5cd79; }

#toast-container {
    position: fixed;
    z-index: 999999;
}

#toast-container > div {
    margin-bottom: 0.5rem;
    padding: 1rem 1rem 1rem 3rem;
    width: 340px;
    border-radius: 0.25rem;
    color: #ffffff;
    opacity: 0.93;
    box-shadow: 0 0.5rem 1rem rgba(0,0,0,0.15);
    transition: opacity 0.15s;
}

#toast-container > div:hover {
    opacity: 1;
    cursor: pointer;
}

@media (max-width: 991.98px) {
    #toast-container {
        left: 1rem;
        right: 1rem;
    }

    #toast-container > div {
        width: auto;
    }
}

/* =====================================================
   POPULAR WIDGET
===================================================== */

.widget-popular {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 20px;
}

.widget-popular .widget-title {
    font-size: 1.125rem;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    color: #2c3e50;
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.popular-item {
    padding-bottom: 12px;
    border-bottom: 1px solid #e9ecef;
}

.popular-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.popular-title {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: #2c3e50;
    text-decoration: none;
    margin-bottom: 5px;
}

.popular-title:hover {
    color: #3498db;
    text-decoration: underline;
}

.popular-meta {
    display: flex;
    gap: 12px;
    font-size: 0.8rem;
    color: #6c757d;
}

/* =====================================================
   VIDEO
===================================================== */

.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}
