/* ============================
   BASE
============================ */

html, body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    overflow: auto;
}

body {
    height: 100%;
    overflow-x: hidden;
}

.contacts-body {
    background-color: #220022;
    padding-top: 60px;                 /* под фиксированный header */
    height: calc(100vh - 130px);       /* под фиксированный footer */
    padding-bottom: 20px;
    box-sizing: border-box;
    color: #fff;
}

/* ============================
   HEADER (как в index.css)
============================ */

.line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    background-color: #330033;
    z-index: 5;
    display: flex;
    align-items: center;
    padding-left: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.6);
}

.logotext {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.line img {
    width: 50px;
}

.texttop {
    color: #FFF;
    margin-left: 10px;
    font-size: 32px; /* НЕ МЕНЯЕМ НИКОГДА */
    white-space: nowrap;
}

/* ============================
   TITLES (как index-title)
============================ */

h1 {
    color: #fff;
    text-align: center;
    margin: 50px auto 0 auto;
    max-width: 90%;
    font-size: 28px;
    word-wrap: break-word;
}

h2 {
    color: #fff;
    text-align: center;
    margin: 40px auto 0 auto;
    max-width: 90%;
    font-size: 24px;
    word-wrap: break-word;
}

/* ============================
   CONTACTS LIST
============================ */

.contacts {
    list-style: none;
    padding: 0;
    margin: 30px auto 0 auto;
    display: flex;
    justify-content: center;
    align-items: stretch;
    gap: 30px;
    flex-wrap: wrap;
    max-width: 90%;
}

.contacts li {
    background-color: #330033;
    border-radius: 15px;
    padding: 20px;
    width: 220px;                 /* одинаковая ширина */
    height: 220px;                /* одинаковая высота */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.4);
}

.contacts li .text {
    color: #fff;
    font-size: 18px;
    min-height: 50px;             /* одинаковая зона под текст */
    display: flex;
    align-items: center;
    justify-content: center;
}

.contacts li img {
    width: 150px;
    height: 150px;
    object-fit: contain;
    cursor: pointer;
    transition: transform 0.15s ease;
}

.contacts li img:hover {
    transform: scale(1.08);
}

/* ============================
   MOBILE ADAPTATION
============================ */

@media (max-width: 768px) {
    .contacts-body {
        height: calc(100vh - 118px);
    }

    .texttop {
        font-size: 32px;
    }

    h1 {
        font-size: 24px;
        margin-top: 30px;
    }

    h2 {
        font-size: 20px;
        margin-top: 30px;
    }

    .contacts {
        gap: 20px;
        align-items: center;
        margin-top: 20px;
    }

    .contacts li {
        width: 85%;
        max-width: 200px;
        height: auto;
        padding: 18px;
    }

    .contacts li .text {
        font-size: 17px;
        min-height: auto;
        margin-bottom: 10px;
    }

    .contacts li img {
        width: 120px;
        height: 120px;
    }
}

@media (max-width: 480px) {
    .contacts-body {
        height: calc(100vh - 135px);
    }

    h1 {
        font-size: 20px;
    }

    h2 {
        font-size: 18px;
    }

    .contacts li {
        max-width: 200px;
        padding: 16px;
    }

    .contacts li .text {
        font-size: 15px;
    }

    .contacts li img {
        width: 110px;
        height: 110px;
    }
}

/* ============================
   FOOTER
============================ */

body {
    --footer-bg: #330033;
    --footer-text: #fff;
    --footer-link: #8F00FF;
}