/* ==========================================================================
   CONTACTS SECTION - UPDATED VERSION
   ========================================================================== */
.contacts {
    width: 100%;
    min-height: auto;
    position: relative;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0c0c0c 100%);
    overflow-x: visible;
    display: flex;
    flex-direction: column;
    padding: 40px 20px 120px;
}

/* Фоновые элементы */
.contacts__background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.contacts__gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 30%, rgba(207, 123, 60, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(207, 123, 60, 0.05) 0%, transparent 50%);
}

/* Общий заголовок секции */
.contacts__header {
    position: relative;
    z-index: 2;
    text-align: center;
    margin-bottom: 40px;
    margin-top: 5px;
    padding-top: 5px;
    overflow: visible;
}

.contacts__title {
    color: #fff;
    font-size: 4rem;
    font-weight: 300;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 8px;
    position: relative;
    display: inline-block;
    overflow: visible;
}

/* Черточки по бокам заголовка */
.contacts__title::before,
.contacts__title::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 20px;
    height: 1px;
    background: #cf7b3c;
    transform: translateY(-50%);
}

.contacts__title::before {
    left: -30px;
}

.contacts__title::after {
    right: -30px;
}

.contacts__title-line {
    width: 80px;
    height: 2px;
    background: #cf7b3c;
    margin: 0 auto 10px;
}

.contacts__subtitle {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    font-weight: 300;
}

/* Частицы */
.contacts__particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    opacity: 0.6;
}

/* Боковые светильники */
.contacts__lamp {
    position: absolute;
    width: 12px;
    height: 500px;
    background: #cf7b3c;
    z-index: 2;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.7;
    box-shadow: 0 0 20px rgba(207, 123, 60, 0.8);
    border-radius: 2px;
}

.contacts__lamp--left {
    left: 5%;
}

.contacts__lamp--right {
    right: 5%;
}

.contacts__lamp::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, transparent 0%, #cf7b3c 30%, #cf7b3c 70%, transparent 100%);
    border-radius: 2px;
}

.contacts__container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px 0px; /* Добавили небольшой нижний padding */
    position: relative;
    z-index: 3;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.contacts__grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 30px;
    width: 100%;
    max-width: 1300px;
    margin: 0 auto;
}

/* Contact Card Styles - уменьшенная высота */
.contact-card {
    position: relative;
    width: 280px;
    height: 310px; /* Уменьшили высоту карточек */
    perspective: 1000px;
    cursor: pointer;
    animation: float 8s ease-in-out infinite;
}

.contact-card:nth-child(1) { animation-delay: 0s; }
.contact-card:nth-child(2) { animation-delay: 1s; }
.contact-card:nth-child(3) { animation-delay: 2s; }
.contact-card:nth-child(4) { animation-delay: 3s; }

@keyframes float {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-15px);
    }
}

.contact-card__content {
    position: relative;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.55);
    border-radius: 12px;
    padding: 0;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 1px 1px rgba(255, 255, 255, 0.1) inset;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    text-align: center;
}

.contact-card:hover .contact-card__content {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 1px 1px rgba(255, 255, 255, 0.1) inset;
    background: rgba(173, 173, 173, 0.65);
}

.contact-card__header {
    padding: 22px 20px 12px; /* Уменьшили верхний padding */
}

.contact-card__title {
    color: #000000;
    font-size: 1.6rem;
    margin: 0 0 10px 0; /* Уменьшили отступ снизу */
    font-weight: 600;
    text-align: center;
    letter-spacing: 1px;
}

.contact-card__divider {
    width: 50px;
    height: 3px;
    background-color: #cf7b3c;
    margin: 0 auto;
    border-radius: 2px;
}

.contact-card__body {
    padding: 12px 15px 15px; /* Уменьшили внутренние отступы */
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
}

.contact-card__description {
    color: rgba(0, 0, 0, 0.9);
    line-height: 1.6; /* Уменьшили межстрочный интервал */
    text-align: center;
    font-size: 1.05rem; /* Уменьшили размер шрифта */
    margin: 0 0 12px 0; /* Уменьшили отступ снизу */
    width: 100%;
    overflow-wrap: break-word;
    min-height: 40px; /* Уменьшили минимальную высоту */
}

/* Картина в карточке "Мои картины" - более квадратная */
.contact-card__painting {
    width: 100%;
    height: 140px; /* Увеличили высоту, сделали более квадратной */
    margin: 8px 0 12px; /* Уменьшили отступы сверху и снизу */
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(207, 123, 60, 0.2);
}

.contact-card__painting-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.contact-card:hover .contact-card__painting-img {
    transform: scale(1.05);
}

.contact-card__action {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.contact-card__btn {
    display: inline-block;
    padding: 10px 20px; /* Уменьшили padding кнопки */
    background: #cf7b3c;
    color: #fff;
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    width: 100%;
    max-width: 180px; /* Уменьшили максимальную ширину */
    font-size: 0.9rem; /* Уменьшили размер шрифта */
}

.contact-card__btn:hover {
    background: #b86a34;
    transform: translateY(-2px);
}

.contact-card__btn--link {
    background: #cf7b3c;
    text-decoration: none;
    text-align: center;
}

.contact-card__btn--link:hover {
    background: #b86a34;
    transform: translateY(-2px);
}

.contact-card__notification {
    position: absolute;
    top: -35px; /* Подняли уведомление выше */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 6px 14px; /* Уменьшили padding */
    border-radius: 6px;
    font-size: 0.8rem; /* Уменьшили размер шрифта */
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

.contact-card__notification::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid rgba(0, 0, 0, 0.85);
}

.contact-card__notification.show {
    opacity: 1;
    visibility: visible;
    top: -40px;
}

/* Стили для карточки социальных сетей */
.contact-card--social .contact-card__description {
    margin-bottom: 3px; /* Уменьшили отступ */
}

.contact-card__socials {
    display: flex;
    justify-content: center;
    gap: 22px; /* Немного уменьшили отступ между иконками */
    margin-top: 12px; /* Уменьшили отступ сверху */
    margin-bottom: 8px; /* Уменьшили отступ снизу */
}

.contact-card__social-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 50px; /* Уменьшили размер иконок */
    height: 50px;
    border-radius: 50%;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
}

.contact-card__social-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 50%;
    z-index: 1;
    transition: transform 0.3s ease;
}

.contact-card__social-link:hover::before {
    transform: scale(1.1);
}

.contact-card__social-link:hover {
    transform: translateY(-5px) scale(1.1);
}

.contact-card__social-icon {
    width: 25px; /* Уменьшили размер SVG */
    height: 25px;
    z-index: 2;
    position: relative;
    transition: transform 0.3s ease;
}

.contact-card__social-link:hover .contact-card__social-icon {
    transform: scale(1.1);
}

/* Instagram - градиент */
.contact-card__social-link--instagram {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D, #F56040, #F77737, #FCAF45, #FFDC80);
}

.contact-card__social-link--instagram::before {
    background: linear-gradient(45deg, #405DE6, #5851DB, #833AB4, #C13584, #E1306C, #FD1D1D, #F56040, #F77737, #FCAF45, #FFDC80);
}

.contact-card__social-link--instagram .contact-card__social-icon {
    filter: brightness(0) invert(1);
}

/* Telegram - синий градиент */
.contact-card__social-link--telegram {
    background: linear-gradient(45deg, #0088cc, #34AADF, #0088cc);
}

.contact-card__social-link--telegram::before {
    background: linear-gradient(45deg, #0088cc, #34AADF, #0088cc);
}

.contact-card__social-link--telegram .contact-card__social-icon {
    filter: brightness(0) invert(1);
}

/* VK - синий градиент */
.contact-card__social-link--vk {
    background: linear-gradient(45deg, #4C75A3, #5B7FA6, #4C75A3);
}

.contact-card__social-link--vk::before {
    background: linear-gradient(45deg, #4C75A3, #5B7FA6, #4C75A3);
}

.contact-card__social-link--vk .contact-card__social-icon {
    filter: brightness(0) invert(1);
}

.contact-card__hover {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    background: linear-gradient(135deg, rgba(207, 123, 60, 0.1) 0%, transparent 100%);
    border-radius: 8px;
    opacity: 0;
    transition: all 0.4s ease;
    z-index: 1;
}

.contact-card:hover .contact-card__hover {
    opacity: 1;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
}

/* Адаптивность */
@media (max-width: 1200px) {
    .contacts__grid {
        max-width: 1000px;
    }

    .contact-card {
        width: 260px;
        height: 320px;
    }

    .contact-card__painting {
        height: 130px;
    }
}

@media (max-width: 1024px) {
    .contacts__title {
        font-size: 3rem;
        margin-bottom: 8px;
    }

    .contacts__subtitle {
        font-size: 1rem;
    }

    .contacts__title::before,
    .contacts__title::after {
        width: 20px;
    }

    .contacts__title::before {
        left: -30px;
    }

    .contacts__title::after {
        right: -30px;
    }

    .contacts__title-line {
        width: 80px;
        height: 2px;
        margin: 0 auto 10px;
    }

    .contacts__header {
        margin-bottom: 40px;
        margin-top: 20px;
        padding-top: 20px;
    }

    .contacts__grid {
        max-width: 800px;
    }

    .contact-card {
        width: 280px;
        height: 310px;
    }

    .contact-card__title {
        font-size: 1.5rem;
    }

    .contact-card__description {
        font-size: 1rem;
    }

    .contact-card__socials {
        gap: 20px;
    }

    .contact-card__social-link {
        width: 48px;
        height: 48px;
    }

    .contact-card__social-icon {
        width: 24px;
        height: 24px;
    }

    .contact-card__painting {
        height: 120px;
    }
}

@media (max-width: 768px) and (min-width: 600px) {
    .contacts {
        overflow-x: visible;
    }

    .contacts__header {
        overflow: visible;
    }

    .contacts__title {
        font-size: 2.5rem;
        margin-bottom: 6px;
        overflow: visible;
    }

    .contacts__subtitle {
        font-size: 0.9rem;
    }

    .contacts__title::before,
    .contacts__title::after {
        width: 20px;
        left: -30px;
        right: -30px;
    }

    .contacts__title-line {
        width: 80px;
        height: 2px;
        margin: 0 auto 10px;
    }

    .contacts__header {
        margin-bottom: 40px;
        margin-top: 20px;
        padding-top: 20px;
    }

    .contact-card__description {
        font-size: 0.95rem;
    }

    .contact-card__social-link {
        width: 45px;
        height: 45px;
    }

    .contact-card__social-icon {
        width: 22px;
        height: 22px;
    }
}

@media (max-width: 576px) {
    .contacts {
        overflow-x: visible;
    }

    .contacts__header {
        overflow: visible;
    }

    .contacts__title {
        font-size: 2rem;
        margin-bottom: 5px;
        overflow: visible;
    }

    .contacts__subtitle {
        font-size: 0.8rem;
    }

    .contacts__title::before,
    .contacts__title::after {
        width: 20px;
        left: -30px;
        right: -30px;
    }

    .contacts__title-line {
        width: 80px;
        height: 2px;
        margin: 0 auto 10px;
    }

    .contacts__header {
        margin-bottom: 40px;
        margin-top: 20px;
        padding-top: 20px;
    }

    .contact-card__description {
        font-size: 0.9rem;
    }

    .contact-card__social-link {
        width: 42px;
        height: 42px;
    }

    .contact-card__social-icon {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .contacts {
        overflow-x: visible;
    }

    .contacts__header {
        overflow: visible;
    }

    .contacts__title {
        font-size: 2rem;
        margin-bottom: 5px;
        overflow: visible;
    }

    .contacts__subtitle {
        font-size: 0.8rem;
    }

    .contacts__title::before,
    .contacts__title::after {
        width: 20px;
        left: -30px;
        right: -30px;
    }

    .contacts__title-line {
        width: 80px;
        height: 2px;
        margin: 0 auto 10px;
    }

    .contacts__header {
        margin-bottom: 40px;
        margin-top: 20px;
        padding-top: 20px;
    }

    .contact-card__description {
        font-size: 0.85rem;
    }

    .contact-card__social-link {
        width: 40px;
        height: 40px;
    }

    .contact-card__social-icon {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 375px) {
    .contacts {
        overflow-x: visible;
    }

    .contacts__header {
        overflow: visible;
    }

    .contacts__title {
        font-size: 1.9rem;
        margin-bottom: 5px;
        overflow: visible;
    }

    .contacts__subtitle {
        font-size: 0.8rem;
    }

    .contacts__title::before,
    .contacts__title::after {
        width: 15px;
        left: -20px;
        right: -20px;
    }

    .contacts__title-line {
        width: 60px;
        height: 2px;
        margin: 0 auto 8px;
    }

    .contacts__header {
        margin-bottom: 40px;
        margin-top: 20px;
        padding-top: 20px;
    }

    .contact-card__description {
        font-size: 0.8rem;
    }

    .contact-card__social-link {
        width: 38px;
        height: 38px;
    }

    .contact-card__social-icon {
        width: 16px;
        height: 16px;
    }
}

@media (max-width: 320px) {
    .contacts {
        overflow-x: visible;
    }

    .contacts__header {
        overflow: visible;
    }

    .contacts__title {
        font-size: 1.8rem;
        margin-bottom: 5px;
        overflow: visible;
    }

    .contacts__subtitle {
        font-size: 0.75rem;
    }

    .contacts__title::before,
    .contacts__title::after {
        width: 12px;
        left: -18px;
        right: -18px;
    }

    .contacts__title-line {
        width: 50px;
        height: 2px;
        margin: 0 auto 8px;
    }

    .contacts__header {
        margin-bottom: 40px;
        margin-top: 20px;
        padding-top: 20px;
    }

    .contact-card__description {
        font-size: 0.75rem;
    }

    .contact-card__social-link {
        width: 36px;
        height: 36px;
    }

    .contact-card__social-icon {
        width: 14px;
        height: 14px;
    }
}
