/* =========================================================
   CONTACTS — MODERN DESIGN
========================================================= */

:root {
    --contact-purple: #6748f2;
    --contact-purple-2: #846cff;
    --contact-light: #f5f3ff;
    --contact-text: #10245b;
    --contact-muted: #61739a;
    --contact-border: rgba(103, 72, 242, .13);
}


/* =========================================================
   HERO
========================================================= */

.contact-hero {
    position: relative;
    min-height: 370px;
    padding: 55px 30px 65px;

    display: flex;
    align-items: center;
    justify-content: center;

    overflow: hidden;

    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(103, 72, 242, .13),
            transparent 25%
        ),
        radial-gradient(
            circle at 90% 80%,
            rgba(134, 104, 255, .15),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #edf3ff 0%,
            #f9f8ff 50%,
            #eeeaff 100%
        );
}


/* декоративные круги */

.contact-hero::before,
.contact-hero::after {
    content: "";
    position: absolute;

    border-radius: 50%;

    pointer-events: none;
}

.contact-hero::before {
    width: 420px;
    height: 420px;

    left: -220px;
    top: -200px;

    background: rgba(103, 72, 242, .08);

    animation: floatCircle 8s ease-in-out infinite;
}

.contact-hero::after {
    width: 350px;
    height: 350px;

    right: -170px;
    bottom: -220px;

    background: rgba(132, 108, 255, .09);

    animation: floatCircle 10s ease-in-out infinite reverse;
}

@keyframes floatCircle {

    0%,
    100% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(15px, -18px);
    }
}


/* =========================================================
   HERO CONTENT
========================================================= */

.contact-hero-content {
    position: relative;
    z-index: 5;

    max-width: 850px;

    text-align: center;

    animation: heroAppear .8s ease both;
}

@keyframes heroAppear {

    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


.contact-label {
    margin-bottom: 12px;

    color: var(--contact-purple);

    font-size: 13px;
    font-weight: 900;

    letter-spacing: 4px;
    text-transform: uppercase;
}


.contact-hero h1 {
    margin: 0 0 15px;

    color: var(--contact-text);

    font-size: clamp(45px, 5vw, 68px);
    line-height: 1;

    font-weight: 900;

    letter-spacing: -2px;
}


.contact-hero p {
    max-width: 760px;

    margin: 0 auto;

    color: var(--contact-muted);

    font-size: 17px;
    line-height: 1.65;
}


.contact-features {
    margin-top: 25px;

    display: flex;
    justify-content: center;
    align-items: center;

    gap: 15px;

    color: #66769a;

    font-size: 14px;
}

.contact-features span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.contact-features span b {
    width: 7px;
    height: 7px;

    display: inline-block;

    border-radius: 50%;

    background: var(--contact-purple);

    box-shadow: 0 0 0 5px rgba(103,72,242,.08);

    font-size: 0;
}


/* =========================================================
   FLOATING DECORATIONS
========================================================= */

.contact-decoration {
    position: absolute;
    z-index: 3;

    pointer-events: none;
}


/* конверт */

.decoration-left {
    left: 7%;
    bottom: 38px;

    animation:
        floatingEnvelope 4s ease-in-out infinite;
}

.envelope {
    width: 80px;
    height: 60px;

    display: flex;
    align-items: center;
    justify-content: center;

    border: 1px solid rgba(103,72,242,.1);

    border-radius: 20px;

    background: rgba(255,255,255,.82);

    color: var(--contact-purple);

    font-size: 29px;

    box-shadow:
        0 18px 40px rgba(80,60,180,.13);

    transform: rotate(-7deg);
}

.paper-plane {
    position: absolute;

    top: -22px;
    right: -15px;

    color: var(--contact-purple);

    font-size: 28px;

    transform: rotate(-20deg);

    animation:
        planeFly 3s ease-in-out infinite;
}

@keyframes floatingEnvelope {

    0%,
    100% {
        transform: translateY(0) rotate(0);
    }

    50% {
        transform: translateY(-12px) rotate(2deg);
    }
}

@keyframes planeFly {

    0%,
    100% {
        transform: translate(0, 0) rotate(-20deg);
    }

    50% {
        transform: translate(8px, -8px) rotate(-14deg);
    }
}


/* телефон */

.decoration-right {
    right: 7%;
    top: 45px;

    animation:
        floatingPhone 5s ease-in-out infinite;
}

.phone {
    width: 78px;
    height: 140px;

    padding: 7px;

    border: 4px solid var(--contact-purple);

    border-radius: 25px;

    background: white;

    box-shadow:
        0 20px 45px rgba(81,58,190,.18);

    transform: rotate(7deg);
}

.phone-screen {
    position: relative;

    width: 100%;
    height: 100%;

    overflow: hidden;

    border-radius: 17px;

    background:
        linear-gradient(
            145deg,
            #f1edff,
            #ffffff
        );
}

.chat-bubble {
    position: absolute;

    padding: 5px 7px;

    border-radius: 8px;

    background: #ddd6ff;

    color: #6849ed;

    font-size: 7px;

    animation: bubbleMove 3s ease-in-out infinite;
}

.bubble-one {
    top: 28px;
    left: 7px;
}

.bubble-two {
    top: 55px;
    right: 5px;

    animation-delay: .8s;
}

.phone-icon {
    position: absolute;

    left: 50%;
    bottom: 14px;

    transform: translateX(-50%);

    color: var(--contact-purple);

    font-size: 22px;
}

@keyframes floatingPhone {

    0%,
    100% {
        transform: rotate(7deg) translateY(0);
    }

    50% {
        transform: rotate(3deg) translateY(-12px);
    }
}

@keyframes bubbleMove {

    0%,
    100% {
        opacity: .7;
        transform: translateY(0);
    }

    50% {
        opacity: 1;
        transform: translateY(-3px);
    }
}


/* =========================================================
   CONTENT
========================================================= */

.page-content {
    padding-top: 45px;
    padding-bottom: 70px;
}


.contact-layout {
    display: grid;

    grid-template-columns:
        minmax(0, .95fr)
        minmax(0, 1.05fr);

    gap: 28px;

    align-items: stretch;
}


/* =========================================================
   INFO BAR
========================================================= */

.contact-info-bar {
    position: relative;
    z-index: 10;

    margin-top: -38px;
    margin-bottom: 48px;

    padding: 22px 27px;

    display: grid;

    grid-template-columns:
        1fr auto
        1fr auto
        1fr auto
        1fr;

    align-items: center;

    gap: 20px;

    border: 1px solid rgba(103,72,242,.12);

    border-radius: 22px;

    background: rgba(255,255,255,.95);

    box-shadow:
        0 20px 55px rgba(65,55,150,.1);

    backdrop-filter: blur(15px);

    animation:
        cardAppear .7s .15s ease both;
}


.info-box {
    display: flex;
    align-items: center;

    gap: 13px;

    transition: transform .25s ease;
}

.info-box:hover {
    transform: translateY(-3px);
}


.info-icon {
    width: 45px;
    height: 45px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #f0edff,
            #e8e3ff
        );

    color: var(--contact-purple);

    font-size: 18px;

    box-shadow:
        inset 0 0 0 1px rgba(103,72,242,.05);
}


.info-box strong {
    display: block;

    margin-bottom: 3px;

    color: var(--contact-text);

    font-size: 13px;
}

.info-box span {
    display: block;

    color: #7281a0;

    font-size: 11px;

    line-height: 1.4;
}


.info-divider {
    width: 1px;
    height: 42px;

    background: #e4e1f1;
}


/* =========================================================
   CARDS
========================================================= */

.contact-card {
    position: relative;

    padding: 30px;

    overflow: hidden;

    border: 1px solid var(--contact-border);

    border-radius: 24px;

    background: rgba(255,255,255,.97);

    box-shadow:
        0 18px 50px rgba(64,54,145,.08);

    transition:
        transform .35s ease,
        box-shadow .35s ease,
        border-color .35s ease;

    animation: cardAppear .7s ease both;
}

.contact-card:nth-child(2) {
    animation-delay: .12s;
}


.contact-card::before {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    right: -90px;
    top: -90px;

    border-radius: 50%;

    background: rgba(103,72,242,.055);

    pointer-events: none;
}


.contact-card:hover {
    transform: translateY(-6px);

    border-color: rgba(103,72,242,.25);

    box-shadow:
        0 28px 65px rgba(64,54,145,.13);
}

@keyframes cardAppear {

    from {
        opacity: 0;
        transform: translateY(25px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* =========================================================
   CARD TITLE
========================================================= */

.card-title {
    position: relative;
    z-index: 2;

    display: flex;
    align-items: center;

    gap: 14px;

    margin-bottom: 25px;
}


.card-icon {
    width: 50px;
    height: 50px;

    display: flex;
    align-items: center;
    justify-content: center;

    flex-shrink: 0;

    border-radius: 16px;

    background:
        linear-gradient(
            135deg,
            #7154f5,
            #5638e5
        );

    color: white;

    font-size: 21px;

    box-shadow:
        0 12px 25px rgba(91,65,222,.22);

    animation: iconFloat 3s ease-in-out infinite;
}

@keyframes iconFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-4px);
    }
}


.card-title h2 {
    margin: 0 0 7px;

    color: var(--contact-text);

    font-size: 26px;

    line-height: 1.1;
}

.title-line {
    display: block;

    width: 55px;
    height: 3px;

    border-radius: 5px;

    background:
        linear-gradient(
            90deg,
            #6748f2,
            #9a84ff
        );
}


/* =========================================================
   CONTACT ITEMS
========================================================= */

.contact-items {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;

    gap: 12px;
}


.contact-item {
    min-height: 70px;

    padding: 12px 14px;

    display: flex;
    align-items: center;

    gap: 13px;

    border: 1px solid rgba(103,72,242,.07);

    border-radius: 16px;

    background: #f7f5ff;

    transition:
        transform .28s ease,
        background .28s ease,
        box-shadow .28s ease;
}


.contact-item:hover {
    transform: translateX(7px);

    background: #efecff;

    box-shadow:
        0 12px 28px rgba(83,65,180,.09);
}


.item-icon {
    width: 43px;
    height: 43px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 13px;

    background: white;

    color: #6849ed;

    font-size: 18px;

    box-shadow:
        0 5px 14px rgba(80,60,170,.08);

    transition:
        transform .3s ease,
        background .3s ease;
}

.contact-item:hover .item-icon {
    transform: rotate(-8deg) scale(1.08);

    background: #6849ed;

    color: white;
}


.item-text {
    min-width: 0;

    display: flex;
    flex-direction: column;

    gap: 4px;
}

.item-text small {
    color: #7785a2;

    font-size: 11px;
}

.item-text strong {
    color: #172d62;

    font-size: 14px;

    word-break: break-word;
}


.item-action {
    width: 34px;
    height: 34px;

    margin-left: auto;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 11px;

    background: white;

    color: #6849ed;

    text-decoration: none;

    transition:
        transform .25s ease,
        background .25s ease,
        color .25s ease;
}

.item-action:hover {
    transform: translateX(3px) scale(1.08);

    background: #6849ed;

    color: white;
}


/* =========================================================
   MAP
========================================================= */

.map-box {
    position: relative;

    height: 175px;

    margin-top: 18px;

    overflow: hidden;

    border-radius: 19px;

    background:
        linear-gradient(
            135deg,
            #e8e5ff,
            #f8f7ff
        );
}


.map-grid {
    position: absolute;
    inset: 0;

    opacity: .55;

    background-image:
        linear-gradient(
            rgba(103,72,242,.09) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(103,72,242,.09) 1px,
            transparent 1px
        );

    background-size: 27px 27px;
}


.map-road {
    position: absolute;

    height: 12px;

    border-radius: 20px;

    background: rgba(255,255,255,.85);
}

.road-one {
    width: 120%;
    left: -10%;
    top: 65px;

    transform: rotate(-18deg);
}

.road-two {
    width: 90%;
    left: 15%;
    top: 120px;

    transform: rotate(20deg);
}

.road-three {
    width: 70%;
    left: 35%;
    top: 25px;

    transform: rotate(65deg);
}


.map-pin {
    position: absolute;

    left: 50%;
    top: 50%;

    width: 48px;
    height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    background:
        linear-gradient(
            135deg,
            #7153f5,
            #5436df
        );

    color: white;

    font-size: 21px;

    transform: translate(-50%, -50%);

    box-shadow:
        0 12px 28px rgba(78,58,205,.3);

    animation: pinPulse 2.2s ease-in-out infinite;
}

@keyframes pinPulse {

    0%,
    100% {
        box-shadow:
            0 12px 28px rgba(78,58,205,.3),
            0 0 0 0 rgba(103,72,242,.2);
    }

    50% {
        box-shadow:
            0 15px 35px rgba(78,58,205,.35),
            0 0 0 12px rgba(103,72,242,0);
    }
}


.map-info {
    position: absolute;

    left: 15px;
    bottom: 14px;

    padding: 9px 12px;

    border-radius: 11px;

    background: rgba(255,255,255,.9);

    backdrop-filter: blur(10px);
}

.map-info strong {
    display: block;

    color: #172d62;

    font-size: 12px;
}

.map-info small {
    color: #7483a1;

    font-size: 10px;
}


.map-button {
    position: absolute;

    right: 15px;
    bottom: 14px;

    display: flex;
    align-items: center;
    gap: 6px;

    padding: 9px 12px;

    border-radius: 11px;

    background: white;

    color: #6849ed;

    text-decoration: none;

    font-size: 11px;
    font-weight: 800;

    box-shadow:
        0 6px 18px rgba(60,50,140,.1);

    transition:
        transform .2s ease,
        background .2s ease,
        color .2s ease;
}

.map-button:hover {
    transform: translateY(-2px);

    background: #6849ed;

    color: white;
}


/* =========================================================
   FORM
========================================================= */

.contact-form {
    position: relative;
    z-index: 2;

    display: flex;
    flex-direction: column;

    gap: 14px;
}


.form-row {
    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 14px;
}


.form-field input,
.form-field textarea {
    width: 100%;

    box-sizing: border-box;

    border: 1px solid #dedcff;

    border-radius: 14px;

    background: #faf9ff;

    color: #172d62;

    font-family: inherit;

    font-size: 14px;

    outline: none;

    transition:
        border-color .25s ease,
        box-shadow .25s ease,
        transform .25s ease,
        background .25s ease;
}


.form-field input {
    height: 53px;

    padding: 0 16px;
}


.form-field textarea {
    min-height: 145px;

    padding: 15px 16px;

    resize: vertical;
}


.form-field input::placeholder,
.form-field textarea::placeholder {
    color: #8995ae;
}


.form-field input:focus,
.form-field textarea:focus {
    transform: translateY(-2px);

    border-color: #7254f5;

    background: white;

    box-shadow:
        0 0 0 4px rgba(114,84,245,.1),
        0 8px 20px rgba(80,60,180,.06);
}


.form-bottom {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 15px;

    color: #7a87a2;

    font-size: 11px;
}


#counter {
    color: #6748ed;

    font-weight: 800;
}


.send-button {
    min-height: 53px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 9px;

    border: 0;
    border-radius: 14px;

    background:
        linear-gradient(
            135deg,
            #7052f5,
            #5537e4
        );

    color: white;

    font-family: inherit;

    font-size: 14px;
    font-weight: 800;

    cursor: pointer;

    box-shadow:
        0 12px 27px rgba(89,63,225,.23);

    transition:
        transform .25s ease,
        box-shadow .25s ease;
}


.send-button:hover {
    transform: translateY(-3px);

    box-shadow:
        0 17px 35px rgba(89,63,225,.3);
}


.send-button:active {
    transform: scale(.98);
}


.send-button span {
    transition: transform .3s ease;
}


.send-button:hover span {
    transform: translateX(5px) rotate(-8deg);
}


.form-notice {
    display: none;

    padding: 13px 15px;

    border-radius: 12px;

    background: #e9fff3;

    color: #16804b;

    font-size: 12px;
    font-weight: 700;
}


.form-notice.show {
    display: block;

    animation:
        noticeShow .4s ease both;
}


@keyframes noticeShow {

    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


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

footer {
    border-top: 1px solid #e5e2f2;

    background: #f7f6fc;
}


.footer-grid {
    padding-top: 32px;
    padding-bottom: 28px;

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 20px;
}


.footer-grid h3 {
    margin: 0 0 9px;

    color: #172d62;

    font-size: 14px;
}


.footer-grid p {
    margin: 0 0 5px;

    color: #697996;

    font-size: 12px;
}


.footer-grid a {
    color: #6849ed;

    text-decoration: none;
}


.footer-grid small {
    grid-column: 1 / -1;

    padding-top: 14px;

    border-top: 1px solid #e4e1ef;

    color: #8995ae;

    font-size: 11px;
}


/* =========================================================
   DARK THEME
========================================================= */

body.dark .contact-hero {
    background:
        radial-gradient(
            circle at 10% 20%,
            rgba(103,72,242,.16),
            transparent 25%
        ),
        radial-gradient(
            circle at 90% 80%,
            rgba(134,104,255,.13),
            transparent 28%
        ),
        linear-gradient(
            135deg,
            #11162d,
            #17172f,
            #18162f
        );
}


body.dark .contact-hero h1 {
    color: #ffffff;
}


body.dark .contact-hero p,
body.dark .contact-features {
    color: #b9c1d9;
}


body.dark .contact-features strong {
    color: #ffffff;
}


body.dark .contact-card,
body.dark .contact-info-bar {
    background: #202642;

    border-color: #3c446b;

    box-shadow:
        0 20px 55px rgba(0,0,0,.25);
}


body.dark .card-title h2 {
    color: #ffffff;
}


body.dark .contact-item {
    background: #292f52;

    border-color: #3c456c;
}


body.dark .contact-item:hover {
    background: #31385e;
}


body.dark .item-icon {
    background: #353c64;

    color: #b1a2ff;
}


body.dark .item-text small {
    color: #aeb7d0;
}


body.dark .item-text strong {
    color: #ffffff;
}


body.dark .item-action {
    background: #353c64;

    color: #b1a2ff;
}


body.dark .info-icon {
    background: #30365b;

    color: #b1a2ff;
}


body.dark .info-box strong {
    color: #ffffff;
}


body.dark .info-box span {
    color: #aeb7d0;
}


body.dark .info-divider {
    background: #424a70;
}


body.dark .map-box {
    background:
        linear-gradient(
            135deg,
            #292f4d,
            #343a5e
        );
}


body.dark .map-info {
    background: rgba(25,29,52,.92);
}


body.dark .map-info strong {
    color: #ffffff;
}


body.dark .map-info small {
    color: #aeb7d0;
}


body.dark .map-button {
    background: #30375b;

    color: #c3b9ff;
}


body.dark .form-field input,
body.dark .form-field textarea {
    background: #292f52;

    border-color: #444d76;

    color: #ffffff;
}


body.dark .form-field input::placeholder,
body.dark .form-field textarea::placeholder {
    color: #aeb7d0;
}


body.dark .form-field input:focus,
body.dark .form-field textarea:focus {
    background: #30375b;

    border-color: #8067ff;
}


body.dark .form-bottom {
    color: #aeb7d0;
}


body.dark footer {
    background: #11162d;

    border-color: #343b5d;
}


body.dark .footer-grid h3 {
    color: #ffffff;
}


body.dark .footer-grid p {
    color: #aeb7d0;
}


body.dark .footer-grid small {
    border-color: #343b5d;

    color: #8e99b4;
}


/* =========================================================
   RESPONSIVE
========================================================= */

@media (max-width: 1100px) {

    .contact-decoration {
        opacity: .35;
    }

    .contact-info-bar {
        grid-template-columns: 1fr 1fr;
    }

    .info-divider {
        display: none;
    }

}


@media (max-width: 850px) {

    .contact-hero {
        min-height: 330px;

        padding: 50px 20px;
    }

    .contact-decoration {
        display: none;
    }

    .contact-layout {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 600px) {

    .contact-hero {
        min-height: 310px;
    }

    .contact-hero h1 {
        font-size: 43px;
    }

    .contact-hero p {
        font-size: 14px;
    }

    .contact-features {
        flex-direction: column;
        gap: 8px;
    }

    .contact-features > b {
        display: none;
    }

    .contact-info-bar {
        grid-template-columns: 1fr;

        padding: 20px;
    }

    .contact-card {
        padding: 21px;

        border-radius: 19px;
    }

    .card-title h2 {
        font-size: 22px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid small {
        grid-column: auto;
    }

}

/* Кликабельная карточка электронной почты */

.email-link {
    display: flex;
    align-items: center;
    width: 100%;
    box-sizing: border-box;

    color: inherit;
    text-decoration: none;
    cursor: pointer;

    transition: all .3s ease;
}

.email-link:hover {
    transform: translateX(7px);
    background: #efecff;
}

.email-link .item-action {
    margin-left: auto;
}

/* Темная тема */

body.dark .email-link:hover {
    background: #31385e;
}