:root {
  --orangecolor-: rgb(209, 78, 21); /* DarkOrange */
}

body {
  background-color: #f0f2f5;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  margin: 0;
  color: #333;
}

.container {
    padding: 0px 10px; /* Add some padding to the main content area */
}

.main-container {
  max-width: 1200px;
  margin: 20px auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  overflow: hidden; 
  background-color: #fff; /* Add a background to the main container */
}

.mainwarn {
  background-color: #fffbe6;
  color: #8a6d3b;
  padding: 15px 20px;
  text-align: center;
  border-bottom: 1px solid #f2e3b3;
  font-size: 14px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.mainnav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  background: linear-gradient(180deg, rgb(0, 0, 0), rgb(66, 66, 66));  color: white;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.logo-container img {
  width: 100px;
  height: auto;
}

.logo-container h3 {
  margin: 0;
  text-align: center;
}

.cabinet-button {
  background-color: var(--orangecolor-);
  color: white;
  padding: 12px 22px;
  border: none;
  border-radius: 5px;
  text-decoration: none;
  font-size: 16px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: background-color 0.3s ease, transform 0.2s ease;
}

.cabinet-button:hover {
  background-color: #e67e00; 
  transform: translateY(-2px);
}

.box {
  background-color: var(--orangecolor-);
  padding: 10px 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.box ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: flex-start;
  gap: 40px;
}

.box ul li a {
  text-decoration: none;
  color: white;
  font-size: 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: color 0.3s ease;
}

.box ul li a:hover {
  color: #ffffff;
}

.social-icons a {
  color: white;
  text-decoration: none;
  font-size: 20px;
  margin-left: 15px;
  transition: color 0.3s ease;
}

.social-icons a:hover {
  color: #f0f0f0;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  background-color: var(--orangecolor-);
  min-width: 160px;
  box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
  z-index: 1;
  border-radius: 0 0 5px 5px;
  padding: 10px 0;
  margin-top: 10px; 
}

.dropdown-content::before {
  content: '';
  position: absolute;
  top: -10px;
  left: 0;
  right: 0;
  height: 10px;
  background-color: transparent;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
  text-align: left;
}

.dropdown-content a:hover {
  background-color: rgb(207, 108, 66);
  color: var(--orangecolor-);
}

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

/* Hero Banner */
.cta-banner {
    display: block;
    position: relative;
    text-decoration: none;
    color: white;
    height: 450px; 
    overflow: hidden; 
    background-color: #222; 
}

.cta-banner-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.cta-banner:hover .cta-banner-img {
    transform: scale(1.05);
}

.cta-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1); 
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background 0.3s ease;
}

.cta-banner:hover .cta-banner-overlay {
    background: rgba(0, 0, 0, 0.2); 
}

.cta-banner-text {
    font-size: 3em; 
    font-weight: bold;
    text-align: center;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8);
    margin: 0;
    padding: 0 20px; 
}

/* Home News Section */
.home-news {
    padding: 40px 0;
}

.section-title {
    font-size: 2.2em;
    font-weight: 700;
    margin-bottom: 10px;
    text-align: center;
    color: #333;
}

.section-subtitle {
    font-size: 1.1em;
    color: #666;
    text-align: center;
    max-width: 600px;
    margin: 0 auto 30px auto;
}

.home-news-grid {
    display: flex; /* Используем flexbox */
    gap: 20px; /* Отступ между блоками */
    height: 450px; /* Общая высота для всего блока новостей */
}

.news-card-featured {
    flex: 2; /* Занимает 2/3 ширины */
    position: relative;
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card-featured:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.news-card-featured .news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-featured .news-title-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 20px;
    background: linear-gradient(to top, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0) 100%);
}

.news-card-featured .news-title {
    color: white;
    font-size: 1.8em;
    font-weight: 700;
    margin: 0;
}

.news-card-secondary-container {
    flex: 1; /* Занимает 1/3 ширины */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.news-card-secondary {
    flex: 1; /* Равномерно делит высоту в контейнере */
    position: relative;
    display: block;
    text-decoration: none;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-card-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.12);
}

.news-card-secondary .news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-card-secondary .news-title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px;
    margin: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0) 100%);
    color: white;
    font-size: 1.1em;
    font-weight: 600;
}

/* Responsive */
@media (max-width: 768px) {
    .home-news-grid {
        flex-direction: column; /* Ставим в колонку на мобильных */
        height: auto; /* Автоматическая высота */
    }
    .news-card-featured {
        height: 300px;
    }
}

.footer {
  background: linear-gradient(180deg, rgb(0, 0, 0), rgb(66, 66, 66));
  color: white;
  padding: 20px;
  font-weight: bold;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-right {
  display: flex;
  gap: 20px;
  font-weight: bold;
}

.footer-right a {
  color: white;
  text-decoration: none;
  transition: color 0.3s ease;
  font-size: 14px;
  font-weight: 500;
}

.footer-right a:hover {
  color: var(--orangecolor-);
}

#user-fullname {
    font-size: 1.5em;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 5px;
}

#user-rank-text {
    font-size: 1.2em;
    font-style: italic;
    color: #7f8c8d;
    margin-bottom: 10px;
}

#user-role {
    display: inline-block;
    background-color: #f0f2f5;
    color: #34495e;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.9em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

/* Preloader */
#preloader {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: #fff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.5s ease-out;
}

#preloader.fade-out {
    opacity: 0;
}

.loader {
    width: 150px; /* Increased size */
    height: 150px; /* Increased size */
    background-image: url('/img/gerb_mo.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    animation: pulse 1.5s ease-in-out infinite;
    filter: grayscale(100%); /* Make the image gray */
}

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

.fade-out {
    animation: fadeOut 0.5s ease-in-out forwards;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.9;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}
