/* styles.css */

/* Общие стили */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: #1a1a1a;
    color: #ffffff;
    margin: 0;
    padding-top: 80px; /* Высота шапки */
}

/* Шапка */
header {
    background-color: #1a1a1a;
    padding: 15px 20px;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 999;
}

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

.logo a {
    font-family: 'Montserrat', sans-serif;
    font-size: 28px;
    font-weight: 700;
    color: #ffffff;
    text-decoration: none;
}

.menu {
    list-style: none;
    display: flex;
    align-items: center;
}

.menu li {
    margin-left: 30px;
}

.menu li a {
    text-decoration: none;
    color: #ffffff;
    font-size: 18px;
    transition: color 0.3s;
}

.contact-button {
    background-color: #00adb5;
    color: #ffffff !important;
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.menu-toggle {
    display: none;
    font-size: 24px;
    cursor: pointer;
    color: #ffffff;
}

/* Адаптивность шапки */
@media (max-width: 768px) {
    .menu {
        position: absolute;
        top: 70px;
        left: -100%;
        width: 100%;
        background-color: #1a1a1a;
        flex-direction: column;
        align-items: center;
        transition: left 0.3s;
    }

    .menu.active {
        left: 0;
    }

    .menu li {
        margin: 20px 0;
    }

    .menu-toggle {
        display: block;
    }

    .navbar {
        justify-content: space-between;
    }
}

/* Стили для ссылок */
a {
    text-decoration: none;
    color: inherit;
}

/* Стили для плиток */
.tiles {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 20px auto 0;
    padding: 20px;
    gap: 20px;
    justify-content: center;
}

.tile {
    background-color: #2e2e2e;
    padding: 20px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
    text-align: center;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    transition: transform 0.3s, box-shadow 0.3s;
    min-height: 60px;
}

.tile h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    margin: 10px 0;
    position: relative;
    z-index: 2;
}

.tile p {
    font-size: 18px;
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
}

.tile img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    margin-bottom: 10px;
    margin-top: 20px;
    opacity: 0.8;
    border-radius: 20px;
    position: relative;
    transition: opacity 0.3s;
}

.overlay-text {
    position: absolute;
    top: 10px;
    left: 10px;
    font-size: 16px;
    color: rgba(255, 255, 255, 0.7);
    z-index: 3;
}

.icon-link {
    color: #00adb5;
    font-size: 32px;
    position: absolute;
    bottom: 15px;
    right: 15px;
    z-index: 2;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

.icon-link .hover-icon {
    display: none;
}

/* Стили для активной плитки */
.tile.active .icon-link .default-icon {
    display: none;
}

.tile.active .icon-link .hover-icon {
    display: inline-block;
}

/* Удаляем подчеркивание у иконок */
.icon-link, .social-icons a {
    text-decoration: none;
}


/* Стили для социальных иконок */
.social-icons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    position: relative;
    z-index: 2;
}

.social-icons a {
    color: #ffffff;
    font-size: 24px;
    transition: color 0.3s;
}

.social-tile h2 {
    color: #000000;
}

/* Стили для блока с цифрами */
.stats-tile {
    background: linear-gradient(to right, #add8e6, #40e0d0);
    color: #000000;
    align-items: center;
    justify-content: center;
}

.stats-tile .stat {
    margin-bottom: 10px;
    position: relative;
    z-index: 2;
    text-align: center;
}

.stats-tile .stat h2 {
    font-size: 30px;
    color: #000000;
}

.stats-tile .stat p {
    font-size: 16px;
    color: #000000;
}

/* Стили для блока социальных сетей */
.social-tile {
    background: linear-gradient(to right, #add8e6, #40e0d0);
    color: #000000;
    align-items: center;
    justify-content: center;
}

.social-tile h2 {
    color: #000000;
}

.social-tile .social-icons a {
    color: #000000;
}

/* Стили для контактной плитки */
.contact-tile {
    display: flex;
    align-items: stretch;
    position: relative;
    overflow: hidden;
}

.contact-content {
    display: flex;
    width: 100%;
}

.contact-content img {
    width: 50%;
    height: auto;
    max-height: 150px;
    object-fit: cover;
    border-radius: 20px 0 0 20px;
}

.contact-details {
    width: 50%;
    padding: 20px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-details h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 24px;
    margin-bottom: 10px;
    color: #ffffff;
    text-align: left;
}

.contact-details p {
    font-size: 18px;
    margin-bottom: 10px;
    color: #ffffff;
    text-align: left;
}

.contact-info p {
    margin: 5px 0;
    font-size: 16px;
    color: #ffffff;
    text-align: left;
}

.contact-info i {
    color: #00adb5;
    margin-right: 10px;
}

/* Позиционирование icon-link в правом нижнем углу */
.contact-details .icon-link {
    color: #00adb5;
    font-size: 32px;
    position: absolute;
    bottom: 15px;
    right: 15px;
    display: flex;
    align-items: center;
    transition: color 0.3s;
}

/* Скрываем hover-icon по умолчанию */
.contact-details .icon-link .hover-icon {
    display: none;
}

/* Адаптивность для мобильных устройств */
@media (max-width: 768px) {
    .contact-content {
        flex-direction: column;
    }

    .contact-content img,
    .contact-details {
        width: 100%;
    }

    .contact-content img {
        border-radius: 20px 20px 0 0;
    }

    .contact-details {
        padding: 15px;
    }

    .contact-details .icon-link {
        position: static;
        margin-top: 10px;
        align-self: flex-end;
    }
}

/* Стили для бегущей строки */
.marquee-tile {
    overflow: hidden;
    height: 30px;
    display: flex;
    align-items: center;
}

.marquee-tile .marquee {
    display: flex;
    animation: marquee 15s linear infinite;
}

.marquee-tile .marquee p {
    white-space: nowrap;
    font-size: 16px;
    color: #00adb5;
}

@keyframes marquee {
    0% { transform: translateX(0%); }
    100% { transform: translateX(-50%); }
}

/* Разные размеры плиток */
.tile-full {
    flex: 1 1 100%;
}

.tile-large {
    flex: 2 1 calc(60% - 40px);
}

.tile-medium {
    flex: 1 1 calc(40% - 40px);
}

.tile-small {
    flex: 1 1 calc(30% - 40px);
}

/* Адаптивность плиток */
@media (max-width: 768px) {
    .tiles {
        margin-top: 20px;
    }

    .tile {
        flex: 1 1 100%;
    }

    .tile-large, .tile-medium, .tile-small, .tile-full {
        flex: 1 1 100%;
    }

    .icon-link {
        position: static;
        margin-top: 20px;
    }
}

/* Стили :hover только для устройств с поддержкой hover */
@media (hover: hover) and (pointer: fine) {
    .tile:hover {
        transform: translateY(-10px);
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    .tile:hover img {
        opacity: 1;
    }

    .tile:hover::before {
        opacity: 0;
    }

    .tile:hover .icon-link .default-icon {
        display: none;
    }

    .tile:hover .icon-link .hover-icon {
        display: inline-block;
    }

    .icon-link:hover {
        color: #00858a;
    }

    /* При наведении показываем hover-icon и скрываем default-icon в контактной плитке */
    .contact-tile:hover .icon-link .default-icon {
        display: none;
    }

    .contact-tile:hover .icon-link .hover-icon {
        display: inline-block;
    }

    .contact-details .icon-link:hover {
        color: #00858a;
    }

    /* Стили для меню при наведении */
    .menu li a:hover {
        color: #00adb5;
    }

    .contact-button:hover {
        background-color: #00858a;
    }

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

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

/* Отключаем подсветку при клике на мобильных устройствах */
@media (hover: none) and (pointer: coarse) {
    .tile:active, .tile:focus {
        transform: none;
        box-shadow: none;
        outline: none;
    }
}