/* Базовые стили и сброс отступов */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
    display: grid;
    grid-template-rows: auto 1fr auto;
    min-height: 100vh;
}

header { grid-row: 1; }
main   { grid-row: 2; }   /* растягивается автоматически */
footer { grid-row: 3; }

/* Стили для шапки */
.header {
    position: fixed;
    left: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #2c3e50;
    color: white;
    padding: 15px 5%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    background: linear-gradient(135deg, #0056a8 0%, #003d75 100%);
    color: white;
    /*padding: 1rem 0;*/
    /*padding: 1rem 5%;*/
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 0 0 8px 8px;
    grid-column-gap: 40px;
}

.header-container {
    background-color: #003d75;
    position: fixed;
    top: 10;
    z-index: 100;
    width: 95%;
    max-width: 100%;
    height: auto;
    margin: 0 auto;
    margin-left: 10;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    column-count: 3;
}

.logo {
    display: flex;
    align-items: center;
}

.logo h1 {
    font-size: 1.8rem;
    margin-left: 10px;
}

.logo_sfedu_row {
    margin-left: 50px;
    display: flex;
    gap: 5px;
    justify-content: space-between;
}

.logo_sfedu_row img {
  /*width: 90%; /* или flex: 1; */
  flex: 1;
  height: 70px;
}

nav ul {
    display: flex;
    list-style: none;
}

nav ul li {
    margin-left: 1.5rem;
}

nav ul li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: #ffd700;
}

/* Стили для основного контента */
.refs-content {
    background: url('https://via.placeholder.com/1920x600') no-repeat center center/cover;
    color: rgb(0, 0, 0);
    text-align: center;
    /*padding: 6rem 1rem;*/
    /*padding-top: 170px;*/
    padding-top: clamp(170px, 8vh, 250px);
}

.refs-content ul {
    list-style-position: inside; /* Точки будут внутри блока списка, что поможет в центрировании */
    padding-left: 0; /* Убираем стандартный отступ слева */
    display: inline-block; /* Блок списка будет занимать ширину согласно содержимому */
    text-align: left; /* Текст внутри списка выравниваем по левому краю */
    margin: 0 auto; /* Автоматические отступы слева и справа для центрирования */
}

.refs-content li {
    /* Можно задать отступы для пунктов, если нужно */
    margin-bottom: 0.5rem; /* Например, отступ между пунктами */
}

.refs-content-btn {
    background: url('https://via.placeholder.com/1920x600') no-repeat center center/cover;
    color: white;
    text-align: center;
    padding: 6rem 1rem;
    padding-top: 50%;
}

.btn {
    display: inline-block;
    background: #ffd700;
    color: #003d75;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
    transition: all 0.3s ease;
}
.link-docs{
    text-decoration: none;
    color: black;
    padding: 0 20px;  
}

.link-nav-btn{
    text-decoration: none;
    color: rgb(255, 255, 255);
    padding: 0 20px;  
}

.enjoy-css {
  display: inline-block;
  -webkit-box-sizing: content-box;
  -moz-box-sizing: content-box;
  box-sizing: content-box;
  cursor: pointer;
  border: none;
  -webkit-border-radius: 20px;
  border-radius: 20px;
  font: normal normal bold 20px/40px "Baumans", Helvetica, sans-serif;
  color: black;
  -o-text-overflow: clip;
  text-overflow: clip;
  background: rgb(221, 221, 221);
  -webkit-box-shadow: 0 1px 0 0 rgb(119,119,119) , 0 2px 0 0 rgb(119,119,119) , 0 3px 0 0 rgb(119,119,119) , 0 4px 0 0 rgb(119,119,119) , 0 5px 0 0 rgb(119,119,119) , 0 6px 0 0 rgb(119,119,119) , 0 0 5px 0 rgba(0,0,0,0.0980392) , 0 1px 3px 0 rgba(0,0,0,0.298039) , 0 3px 5px 0 rgba(0,0,0,0.2) , 0 5px 10px 0 rgba(0,0,0,0.247059) , 0 10px 10px 0 rgba(0,0,0,0.2) , 0 20px 20px 0 rgba(0,0,0,0.14902) ;
  box-shadow: 0 1px 0 0 rgb(119,119,119) , 0 2px 0 0 rgb(119,119,119) , 0 3px 0 0 rgb(119,119,119) , 0 4px 0 0 rgb(119,119,119) , 0 5px 0 0 rgb(119,119,119) , 0 6px 0 0 rgb(119,119,119) , 0 0 5px 0 rgba(0,0,0,0.0980392) , 0 1px 3px 0 rgba(0,0,0,0.298039) , 0 3px 5px 0 rgba(0,0,0,0.2) , 0 5px 10px 0 rgba(0,0,0,0.247059) , 0 10px 10px 0 rgba(0,0,0,0.2) , 0 20px 20px 0 rgba(0,0,0,0.14902) ;
  text-shadow: 0 1px 0 #FFFFFF ;
  text-decoration: none;
}

.enjoy-css:hover {
  background: #FFFFFF;
}

.enjoy-css:active {
  margin: 6px 0 0;
  background: rgb(221, 221, 221);
  -webkit-box-shadow: 0 -1px 10px 0 rgba(0,0,0,0.247059) , 0 4px 10px 0 rgba(0,0,0,0.2) , 0 14px 20px 0 rgba(0,0,0,0.14902) ;
  box-shadow: 0 -1px 10px 0 rgba(0,0,0,0.247059) , 0 4px 10px 0 rgba(0,0,0,0.2) , 0 14px 20px 0 rgba(0,0,0,0.14902) ;
}

.enjoy-css:focus {
  background: rgb(221, 221, 221);
}

.btn:hover {
    background: #ffc400;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 2rem auto;
    padding: 1rem;
}

.news-section, .faculties-section {
    margin-bottom: 3rem;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    color: #0056a8;
    font-size: 2rem;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: #ffd700;
    margin: 0.5rem auto;
}

.news-slider-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.news-grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding: 0.5rem 0.25rem 1rem 0.25rem;
    width: 100%;
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.news-grid::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

.faculties-grid, .founders-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.news-card {
    flex: 0 0 calc(33.333% - 1rem);
    box-sizing: border-box;
    scroll-snap-align: start;
    background: white;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

@media (max-width: 900px) {
    .news-card {
        flex: 0 0 calc(50% - 0.75rem);
    }
}

@media (max-width: 600px) {
    .news-card {
        flex: 0 0 100%;
    }
}

.faculty-card, .founder-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #0056a8;
    color: white;
    border: none;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    transition: background-color 0.2s ease, transform 0.2s ease, opacity 0.2s ease;
}

.slider-btn:hover {
    background: #003d75;
    transform: translateY(-50%) scale(1.1);
}

.slider-btn.prev-btn {
    left: -22px;
}

.slider-btn.next-btn {
    right: -22px;
}

.slider-btn svg {
    width: 28px;
    height: 28px;
    fill: currentColor;
}

.news-card:hover, .faculty-card:hover, .founder-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.news-card img, .faculty-card img, .founder-card img {
    width: 100%;
    object-fit: cover;
    flex-grow: 1;
}

.news-content, .faculty-content {
    padding: 1.5rem;
}

.news-date {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.news-card h3, .faculty-card h3 {
    color: #0056a8;
    margin-bottom: 0.5rem;
}

/* Стили для подвала */
footer {
    background: #003d75;
    color: white;
    padding: 2rem 0;
    margin-top: 2rem;
}

.footer-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.footer-section h3 {
    color: #ffd700;
    margin-bottom: 1rem;
    font-size: 1.2rem;
}

.footer-section p, .footer-section a {
    color: #ccc;
    text-decoration: none;
    margin-bottom: 0.5rem;
    display: block;
}

.footer-section a:hover {
    color: #ffd700;
}

.copyright {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #4a6a92;
    color: #ccc;
    font-size: 0.9rem;
}

.logo-text {
    width: 50%;
    font-size: 1.5rem;
    font-weight: bold;
    color: #fcfcfc;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.nav-buttons {
    width: 40%;
    display: flex;
    gap: 15px;
}

.nav-button {
    background-color: #3498db;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.nav-button:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .header-container {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 1rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    nav ul li {
        margin: 0.5rem;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }
}