@font-face {
    font-family: tilda;
    src: url(fonts/TildaSans-VF_TTF_Web/TildaSans-VF.ttf);
}

body {
    margin: 0 auto;
    box-sizing: border-box;
}

a {
    font-family: tilda;
    font-size: 20px;
    color: white;
    text-decoration: none;
}

h1 {
    display: flex;
    justify-content: center;
    align-items: flex-end; 
    height: 350px; 
    font-family: tilda;
    font-size: 70px;
    color: white;
}

h2{
    text-align: center;
    font-family: tilda;
    font-size: 50px;
    margin-top: 80px;
    font-weight: 650;
}

.h3--slideTitle {
    position: relative;
    z-index: 2;
    margin: 0;
    font-size: 60px;
    font-family: tilda;
    font-weight: 800;
    color: white;
    margin-bottom: 520px;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.7);
    line-height: 1.1;
    text-align: center;
    letter-spacing: 2px;
}

.h3--infoTitle {
    text-align: center;
    font-family: tilda;
    font-size: 35px;
    font-weight: 800;
    color: black;
    margin-top: 160px;
    margin-left: 40px;
    text-align: center;
}

.p--main {
    display: flex;
    justify-content: center;
    align-items: flex-end; 
    height: 5px; 
    padding-bottom: 20px;
    font-family: tilda;
    font-size: 20px;
    color: white;
}

.p--slideDescription {
    position: relative;
    z-index: 2;
    font-size: 20px;
    font-family: tilda;
    color: #f0f0f0;
    line-height: 1.4;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
    text-align: center;
    max-width: 40%;
    margin-top: 40px;
    margin-bottom: 60px;
    padding: 0 20px;
}

.p--infoText  {
    margin-left: 250px;
    margin-right: 160px;
    font-family: tilda;
    font-size: 20px;
    color: black;
    margin-top: 60px;
    align-items: flex-end; 
}

.container{
    width: 1400px;
    margin: 0 auto;
}

.container--slider{
    width: 100%;
}

.container--info{
    width: 1750px;
    margin: 0 auto;
}

.container--footer {
    width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 60px;
    align-items: start;
}

/*___________________________________________________________*/

header {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url(img/glavnaya/glavnaya.jpg);
    background-size: 100%;
    height: 930px;
    background-repeat: no-repeat;
}

.menu {
    display: flex;
    justify-content: space-between; 
    align-items: center;
    padding-top: 40px;
}

.menu__left, .menu__right {
    display: flex;
    gap: 50px; 
}

.menu__left {
    justify-content: flex-start; 
}

.menu__right {
    justify-content: flex-end;
}

.menu__center {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.menu__center a img {
    width: 80px;
}

.menu__user {
    position: relative;
    display: inline-block;
}

.menu__userName {
    color: white;
    cursor: pointer;
    padding: 8px 15px;
    border-radius: 5px;
    transition: background-color 0.3s;
    font-family: tilda;
    font-size: 18px;
}

.menu__userName:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.menu__userDropdown {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 180px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    border-radius: 8px;
    z-index: 1000;
    overflow: hidden;
}

.menu__userDropdown a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #eee;
    font-family: tilda;
    font-size: 16px;
    transition: background-color 0.3s;
}

.menu__userDropdown a:hover {
    background-color: #f8f9fa;
    color: #000;
}

.menu__userDropdown a:last-child {
    border-bottom: none;
}

.menu__user:hover .menu__userDropdown {
    display: block;
}

/*___________________________________________________________*/

.categories {
    margin: 0 auto;
    align-items: center; 
    justify-content: center;
    margin-bottom: 100px; 
}

.categories__photo {
    position: relative;
    height: 350px;
    border-radius: 25px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    margin-bottom: 20px;
}

.categories__photo:hover {
    transform: scale(1.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.categories__photo img {
    display: none;
}

.categories__name {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center; 
    justify-content: center; 
    font-family: tilda;
    color: white;
    font-size: 22px;
    font-weight: 700;
    text-align: center;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(25px);
}

.categories__photo:hover .categories__name {
    opacity: 1;
    transform: translateY(0);
    background: rgba(0, 0, 0, 0.7);
}

/*___________________________________________________________*/

.slider {
    position: relative;
    margin: 40px 0 0;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.3);
    height: 850px;
    user-select: none;
}

.slider__track {
    display: flex;
    transition: transform 1s cubic-bezier(0.23, 1, 0.32, 1);
    height: 100%;
}

.slider__slide {
    min-width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.slider__slidebg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.slider__slidebg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    filter: brightness(0.8);
}

.slider__slide.active.forward-animation .slider__slidebg img {
    transform: scale(1.05);
    transition: transform 1.2s cubic-bezier(0.23, 1, 0.32, 1);
}

.slider__slidebg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0,0,0,0.5) 0%, rgba(0,0,0,0.3) 100%);
}

.slider__slide.active.forward-animation .slider__slidebg::after {
    opacity: 1;
    transition: opacity 1s ease;
}

.slider__slide:not(.active) .slider__slidebg img,
.slider__slide.active:not(.forward-animation) .slider__slidebg img {
    transform: scale(1);
    transition: none;
}

.slider__slide:not(.active) .slider__slidebg::after,
.slider__slide.active:not(.forward-animation) .slider__slidebg::after {
    opacity: 0.5;
    transition: none;
}

.slider__nav {
    position: absolute;
    bottom: 30px;
    right: 30px;
    display: flex;
    gap: 15px;
    z-index: 10;
    background: rgba(0, 0, 0, 0.4);
    padding: 12px 15px;
    border-radius: 25px;
    backdrop-filter: blur(10px);
}

.slider__btn--prev,
.slider__btn--next {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.9);
    color: #000;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.23, 1, 0.32, 1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.slider__btn--prev:hover,
.slider__btn--next:hover {
    background: #ffffff;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.slider__btn--prev:active,
.slider__btn--next:active {
    transform: scale(0.95);
}

.slider__lines {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
    padding: 12px 20px;
}

.slider__line {
    height: 2px;
    width: 200px;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.23, 1, 0.32, 1);
    border-radius: 2px;
    position: relative;
    overflow: hidden;
}

.slider__line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: #ffffff;
    transition: none;
    opacity: 0;
}

.slider__line.active::before {
    opacity: 1;
    width: 100%;
    transition: width 10s linear;
    animation: lineProgress 10s linear forwards;
}

.slider__line:not(.active)::before {
    display: none;
}

.slider__line.active {
    background: rgba(255, 255, 255, 0.3);
    width: 200px;
}

.slider__line:hover {
    background: rgba(255, 255, 255, 0.8);
}

.slider:hover .slider__line.active::before {
    animation-play-state: paused;
}

.slider__lineProgress {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 0%;
    background: #ffffff;
    transition: width 5s linear;
    border-radius: 2px;
}

@keyframes lineProgress {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/*___________________________________________________________*/

.info {
    margin-top: 50px;
}

.info__wrapper {
    display: flex;
    justify-content: center;
}

.info__logotip {
    width: 700px;
    margin-left: 70px;
}

.info__opisanie {
    margin-bottom: 180px;
}

/*___________________________________________________________*/

footer {
    background: black;
    padding: 100px 40px 30px;
}

.footer--left {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

.footer--left__footer-title {
    font-family: tilda;
    font-size: 30px;
    font-weight: 700;
    color: white;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer--left__footer-text {
    font-family: tilda;
    font-size: 16px;
    line-height: 1.6;
    color: white;
    max-width: 700px;
}

.footer--right {
    display: flex;
    gap: 130px;
    align-items: flex-start;
}

.footer--right__social-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.footer--right__social-title {
    font-family: tilda;
    font-size: 30px;
    font-weight: 700;
    color: white;    
}    

.footer--right__social-links {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.footer--right__social-link {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    padding: 12px 30px;
}

.footer--right__social-name {
    font-family: tilda;
    font-size: 16px;
    font-weight: 500;
}

.faq-section {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.faq-section__faq-title {
    font-family: tilda;
    font-size: 30px;
    font-weight: 700;
    color: white;
}

.faq-section__faq-links {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.faq-section__faq-link {
    font-family: tilda;
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 10px 0;
}

.faq-section__faq-link:hover {
    color: white;
}

.footer-bottom {
    max-width: 1200px;
    margin: 40px auto 0;
    padding-top: 30px;
    text-align: center;
}

.footer-bottom__copyright {
    font-family: tilda;
    font-size: 14px;
    color: white;
    margin-top: 30px;
}

/*___________________________________________________________*/

.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.modal__content {
    background-color: white;
    margin: 10% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    position: relative;
}

.modal__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.modal__title {
    font-family: tilda;
    font-size: 24px;
    font-weight: 700;
    color: black;
    margin: 0;
}

.modal__close {
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: black;
    background: none;
    border: none;
}

.modal__close:hover {
    color: #666;
}

.modal__formGroup {
    margin-bottom: 20px;
}

.modal__formLabel {
    display: block;
    margin-bottom: 8px;
    font-family: tilda;
    font-size: 16px;
    font-weight: 600;
    color: black;
}

.modal__formInput {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-family: tilda;
    font-size: 16px;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.modal__formInput:focus {
    outline: none;
    border-color: #007bff;
}

.modal__formActions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    justify-content: center;
}

.modal__adminBtn--cancel,
.modal__adminBtn--save {
    width: 300px;
    height: 45px;
    border: none;
    border-radius: 8px;
    font-family: tilda;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal__adminBtn--cancel {
    background: black;
    color: white;
}

.modal__adminBtn--cancel:hover {
    background: #5a6268;
}

.modal__adminBtn--save {
    background: black;
    color: white;
}

.modal__adminBtn--save:hover {
    background: #5a6268;
}

.modal__authSwitch {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.modal__authSwitch a {
    color: #000;
    text-decoration: none;
    font-weight: 600;
}

.modal__authSwitch a:hover {
    text-decoration: underline;
}

.modal__message {
    padding: 12px;
    margin: 15px 0;
    border-radius: 8px;
    font-family: tilda;
    font-size: 14px;
    text-align: center;
    border: 1px solid transparent;
}

.modal__message.success {
    background: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.modal__message.error {
    background: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

/*___________________________________________________________*/

@media (max-width: 767px) {
    body {
        overflow-x: hidden;
    }
    
    .container {
        width: 100%;
        padding: 0 15px;
    }
    
    .container--info {
        width: 100%;
        padding: 0 15px;
    }
    
    .container--footer {
        width: 100%;
        padding: 0 15px;
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    header {
        height: 500px;
        background-size: cover;
        background-position: center;
    }
    
    .menu {
        display: none;
    }
    
    .main{
        padding-top: 20px;
        padding-right: 30px;
    }

    h1 {
        font-size: 32px;
        height: 180px;
        text-align: center;
        padding: 0 15px;
    }
    
    .p--main {
        font-size: 16px;
        text-align: center;
        padding: 0 15px 30px;
        height: auto;
    }
    
    .categories {
        width: 350px;
        padding-right: 20px;
        margin-bottom: 50px;
    }
    
    h2 {
        font-size: 28px;
        margin-top: 40px;
        padding: 0 15px;
    }
    
    .categories__photo {
        height: 300px;
        margin-bottom: 15px;
    }
    
    .categories__name {
        font-size: 16px;
    }
    
    .slider {
        height: 400px;
        margin: 20px 0;
    }
    
    .h3--slideTitle {
        font-size: 24px;
        margin-top: 80px;
        margin-bottom: 220px;
        padding: 0 15px;
        text-align: center;
    }
    
    .p--slideDescription {
        font-size: 14px;
        max-width: 90%;
        margin-top: 15px;
        margin-bottom: 100px;
        padding: 0 15px;
    }
    
    .slider__nav {
        bottom: 10px;
        right: 10px;
        padding: 6px 10px;
    }
    
    .slider__btn--prev,
    .slider__btn--next {
        display: none;
    }
    
    .slider__lines {
        bottom: 20px;
        gap: 6px;
        padding: 6px 12px;
    }
    
    .slider__line {
        width: 60px;
    }
    
    .slider__line.active {
        width: 60px;
    }
    
    .info {
        margin-top: 30px;
    }
    
    .info__wrapper {
        flex-direction: column;
        align-items: center;
    }
    
    .info__logotip {
        width: 100%;
        max-width: 400px;
        height: 300px;
        margin-left: 0;
        margin-bottom: 50px;
    }
    
    .h3--infoTitle {
        font-size: 30px;
        margin-top: 0;
        margin-left: 0;
        padding: 0 15px;
    }
    
    .p--infoText {
        margin-left: 8px;
        margin-right: 30px;
        padding-left: 35px;
        font-size: 14px;
        margin-top: 15px;
    }
    
    .info__opisanie {
        margin-bottom: 60px;
    }
    
    footer {
        padding: 30px 15px 15px;
    }
    
    .footer--right {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 30px;
        align-items: start;
    }
    
    .footer--left__footer-title,
    .footer--right__social-title,
    .faq-section__faq-title {
        font-size: 22px;
    }
    
    .footer--left__footer-text {
        font-size: 14px;
        width: 420px;
    }
    
    .faq-section{
        padding-left: 20px;
    }

    .footer--right__social-links,
    .faq-section__faq-links {
        gap: 12px;
    }
    
    .footer--right__social-name,
    .faq-section__faq-link {
        font-size: 15px;
    }

    .footer-bottom {
        margin-top: 25px;
        padding-top: 15px;
    }
}

