/* 1. ГЛОБАЛЬНЫЙ СБРОС */
html, body {
    margin: 0;
    padding: 0;
    width: 100%;
    min-height: 100%;
    background-color: #002B49;
}

body {
    font-family: 'Georgia', serif;
    color: #333;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

/* Орел водяным знаком */
body::before {
    content: "";
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: url('eagle.png') no-repeat center/contain;
    opacity: 0.08;
    z-index: 1;
    pointer-events: none;
}

/* 2. ПАНЕЛИ (Ровно 3 орнамента в высоту) */
.side-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    width: 120px;
    background-color: #001A2D;
    background-image: url('border_pattern.png');
    background-size: 100% 33.333%;
    background-repeat: repeat-y;
    z-index: 20;
    box-shadow: 0 0 25px rgba(0,0,0,0.6);
}
.left-panel { left: 0; border-right: 3px solid #C5A059; }
.right-panel { right: 0; border-right: 3px solid #C5A059; transform: scaleX(-1); }

/* 3. КОНТЕЙНЕР */
.container {
    max-width: 800px;
    margin: 0 auto;
    background: rgba(249, 247, 242, 0.96);
    min-height: 100vh;
    padding: 40px 80px 0 80px; 
    position: relative;
    z-index: 5;
    box-shadow: 0 0 50px rgba(0,0,0,0.4);
    display: flex;
    flex-direction: column;
    text-align: center;
    border-radius: 0;
}


/* 4. ШАПКА И МЕНЮ */
header { margin-bottom: 30px; text-align: center; }

.main-menu {
    list-style: none;
    padding: 12px 0;
    margin: 20px 0;
    display: inline-flex;
    gap: 30px;
    border-top: 2px solid #C5A059;
    border-bottom: 2px solid #C5A059;
    position: relative;
    z-index: 100; /* Меню должно быть выше всего контента */
}

.main-menu li {
    position: relative; /* Для позиционирования подменю */
}

.main-menu a {
    text-decoration: none;
    color: #002B49;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85em;
    transition: 0.3s;
    cursor: pointer;
}

.main-menu a:hover {
    color: #C5A059;
}

/* ВЫПАДАЮЩИЙ СПИСОК */
.dropdown:hover .submenu {
    display: block;
    opacity: 1;
}

.submenu {
    display: none;
    position: absolute;
    top: 100%; /* Сразу под пунктом "Семестры" */
    left: 50%;
    transform: translateX(-50%);
    background: #f9f7f2;
    border: 1px solid #C5A059;
    list-style: none;
    padding: 10px 0;
    min-width: 140px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 1000;
}

.submenu li {
    margin: 0;
    padding: 5px 15px;
    text-align: center;
}

.submenu li a {
    text-transform: none; /* Семестры пишем обычно */
    font-size: 0.9em;
    display: block;
    padding: 5px 0;
}

.submenu li:hover {
    background: rgba(197, 160, 89, 0.1);
}

/* 5. ЛАНДШАФТ И ХОЛМ (СИЛЬНЫЙ ИЗГИБ) */
.landscape-section {
    margin-top: auto;
    margin-left: -80px;
    margin-right: -80px;
    background: #001A2D;
    position: relative;
    overflow: hidden;
    display: block;
}
.hill-container { position: relative; height: 280px; background: #001A2D; }
.hill {
    position: absolute;
    bottom: -160px;
    left: 50%;
    transform: translateX(-50%);
    width: 130%; 
    height: 400px;
    background: #001A2D;
    border-radius: 50%;
    border-top: 4px solid #C5A059;
    z-index: 2;
}

.yurta { position: absolute; top: 30px; left: 43%; width: 140px; z-index: 4; }

/* ГУСТОЙ ЗОЛОТОЙ ДЫМ */
.smoke { 
    position: absolute; 
    top: 80px; 
    left: 43%; 
    margin-left: 58px; 
    z-index: 5; /* Прямо над куполом */
}
.smoke span {
    position: absolute; bottom: 0; display: block; width: 12px; height: 12px;
    background: #C5A059; border-radius: 50%; opacity: 0; filter: blur(3px);
    animation: smokeRise 3.5s ease-in infinite;
}
.smoke span:nth-child(2) { animation-delay: 0.7s; left: 4px; width: 14px; }
.smoke span:nth-child(3) { animation-delay: 1.4s; left: -4px; }
.smoke span:nth-child(4) { animation-delay: 2.1s; left: 8px; width: 10px; }
.smoke span:nth-child(5) { animation-delay: 2.8s; left: -8px; }

@keyframes smokeRise {
    0% { transform: translateY(0) scale(0.5); opacity: 0; }
    20% { opacity: 0.8; }
    100% { transform: translateY(-200px) translateX(30px) scale(4); opacity: 0; }
}

/* ПЕРСОНАЖИ */
.aborigen {
    position: absolute; top: 160px; left: 29%; width: 97px; z-index: 5;
    transform-origin: bottom center; animation: aborigenShake 0.4s ease-in-out infinite alternate;
}
@keyframes aborigenShake { from { transform: rotate(-12deg); } to { transform: rotate(12deg); } }

.idol { position: absolute; width: 42px; z-index: 4; filter: brightness(0.7); }
.idol-1 { top: 88px; right: 22%; transform: rotate(6deg); }
.idol-2 { top: 100px; right: 28%; width: 36px; transform: rotate(-4deg); }
.idol-3 { top: 155px; left: 12%; width: 48px; transform: rotate(-10deg); }

/* КОЗЛИК (Патруль + Прыжки) */
.goat-wrapper {
    position: absolute; 
    bottom: -35px; 
    right: 5%; 
    z-index: 10;
    animation: goatPatrol 12s ease-in-out infinite;
}
.running-goat {
    width: 140px; 
    height: 140px; 
    background: url('goat.png') no-repeat center/contain;
    animation: goatJump 0.4s ease-in-out infinite alternate;
}
@keyframes goatPatrol {
    0%, 10% { right: 5%; transform: scaleX(1); }
    40%, 50% { right: 50%; transform: scaleX(1); }
    51% { transform: scaleX(-1); }
    80%, 90% { right: 5%; transform: scaleX(-1); }
    100% { transform: scaleX(1); }
}
@keyframes goatJump { from { transform: translateY(0); } to { transform: translateY(-8px); } }

/* 6. ФУТЕР (Надпись Мустафин) */
.bottom-footer { padding: 35px 0; background: #001A2D; color: #C5A059; text-align: center; position: relative; z-index: 15; display: block; width: 100%; }
.bottom-footer p { margin: 0; font-size: 16px; line-height: 1.5; display: block; }
