/* Trang Liên hệ - Trường Tiểu học Hàm Thắng 2 */
.contact-page {
    --contact-blue: #123f93;
    --contact-blue-dark: #08275f;
    --contact-sky: #3aa9ed;
    --contact-green: #20a66a;
    --contact-yellow: #ffc928;
    --contact-red: #e74d4d;
    --contact-text: #1b2c4d;
    --contact-muted: #65728a;
    position: relative;
    overflow: hidden;
    color: var(--contact-text);
    background: #f7faff;
    font-family: 'Montserrat-Medium', Arial, sans-serif;
}

    .contact-page *,
    .contact-page *::before,
    .contact-page *::after {
        box-sizing: border-box;
    }

.contact-container {
    position: relative;
    z-index: 2;
}

/* Hero */
.contact-hero {
    position: relative;
    isolation: isolate;
    padding: 66px 0 108px;
    background: radial-gradient(circle at 87% 16%, rgba(255, 201, 40, .19), transparent 21%), radial-gradient(circle at 10% 90%, rgba(58, 169, 237, .15), transparent 27%), linear-gradient(125deg, #eaf5ff 0%, #f9fcff 52%, #eef9f4 100%);
}

    .contact-hero::before {
        content: "";
        position: absolute;
        z-index: -1;
        top: -360px;
        right: -240px;
        width: 710px;
        height: 710px;
        border: 80px solid rgba(18, 63, 147, .045);
        border-radius: 50%;
    }

    .contact-hero::after {
        content: "";
        position: absolute;
        z-index: -1;
        inset: 0;
        opacity: .4;
        background-image: radial-gradient(rgba(18, 63, 147, .17) 1.2px, transparent 1.2px);
        background-size: 30px 30px;
        mask-image: linear-gradient(90deg, #000, transparent 40%, transparent 65%, #000);
        -webkit-mask-image: linear-gradient(90deg, #000, transparent 40%, transparent 65%, #000);
    }

.contact-decor {
    position: absolute;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.contact-decor--book {
    top: 50px;
    left: 7%;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    color: #fff;
    background: linear-gradient(145deg, var(--contact-green), #42c98d);
    box-shadow: 0 14px 30px rgba(32, 166, 106, .22);
    transform: rotate(-10deg);
    animation: contactFloat 5.5s ease-in-out infinite;
}

.contact-decor--pencil {
    right: 7%;
    bottom: 62px;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: var(--contact-blue);
    background: var(--contact-yellow);
    box-shadow: 0 14px 30px rgba(255, 201, 40, .27);
    transform: rotate(12deg);
    animation: contactFloat 6s 1s ease-in-out infinite reverse;
}

.contact-hero-content {
    max-width: 835px;
    margin: 0 auto;
    text-align: center;
}

.contact-eyebrow,
.contact-card-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--contact-blue);
    font: 12px/1.4 'Montserrat-Bold', Arial, sans-serif;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.contact-eyebrow {
    padding: 10px 15px;
    border: 1px solid rgba(18, 63, 147, .12);
    border-radius: 999px;
    background: rgba(255, 255, 255, .82);
    box-shadow: 0 8px 24px rgba(18, 63, 147, .08);
}

    .contact-eyebrow i {
        color: var(--contact-green);
    }

.contact-hero h1 {
    margin: 20px 0 0;
    color: var(--contact-blue-dark);
    font: 46px/1.17 'Montserrat-ExtraBold', Arial, sans-serif;
    letter-spacing: -.035em;
    text-transform: none;
}

    .contact-hero h1 span {
        position: relative;
        color: var(--contact-blue);
    }

        .contact-hero h1 span::after {
            content: "";
            position: absolute;
            z-index: -1;
            left: 0;
            right: 0;
            bottom: 1px;
            height: 10px;
            border-radius: 8px;
            background: rgba(255, 201, 40, .52);
            transform: rotate(-1deg);
        }

.contact-hero-content > p {
    max-width: 1019px;
    margin: 20px auto 0;
    color: #556681;
    font-size: 15px;
    line-height: 1.9;
}

.contact-quick-cards {
    display: grid;
    grid-template-columns: minmax(300px, .98fr) minmax(0, 2.05fr) minmax(300px, .98fr);
    gap: 16px;
    max-width: 1160px;
    margin: 36px auto -147px;
}

.contact-quick-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
    padding: 17px;
    border: 1px solid rgba(18, 63, 147, .10);
    border-radius: 20px;
    color: var(--contact-text);
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 16px 38px rgba(20, 61, 119, .12);
    text-decoration: none !important;
    transition: transform .3s ease, border-color .3s ease, box-shadow .3s ease;
}

a.contact-quick-card:hover {
    color: var(--contact-text);
    transform: translateY(-6px);
    border-color: rgba(18, 63, 147, .23);
    box-shadow: 0 23px 45px rgba(20, 61, 119, .17);
}

.contact-quick-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 47px;
    height: 47px;
    flex: 0 0 47px;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg, var(--contact-blue), #2e78cf);
    box-shadow: 0 9px 18px rgba(18, 63, 147, .20);
    transition: transform .3s ease;
}

.contact-quick-card:nth-child(2) .contact-quick-icon {
    background: linear-gradient(145deg, var(--contact-green), #39c184);
    box-shadow: 0 9px 18px rgba(32, 166, 106, .20);
}

.contact-quick-card:nth-child(3) .contact-quick-icon {
    color: #805d00;
    background: linear-gradient(145deg, var(--contact-yellow), #ffe071);
    box-shadow: 0 9px 18px rgba(255, 201, 40, .20);
}

.contact-quick-card:hover .contact-quick-icon {
    transform: rotate(-7deg) scale(1.07);
}

.contact-quick-card > span:nth-child(2) {
    min-width: 0;
}

.contact-quick-card small,
.contact-quick-card strong {
    display: block;
}

.contact-quick-card small {
    margin-bottom: 4px;
    color: var(--contact-muted);
    font-size: 14px;
    line-height: 1.4;
}

.contact-quick-card strong {
    overflow: hidden;
    color: var(--contact-blue-dark);
    font: 16px/1.45 'Montserrat-Bold', Arial, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.contact-card-arrow {
    margin-left: auto;
    color: #9aa8bb;
    font-size: 11px;
    transition: color .25s ease, transform .25s ease;
}

.contact-quick-card:hover .contact-card-arrow {
    color: var(--contact-blue);
    transform: translateX(4px);
}

/* Nội dung chính */
.contact-main {
    padding: 84px 0 56px;
    background: linear-gradient(rgba(18, 63, 147, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(18, 63, 147, .025) 1px, transparent 1px), #f8faff;
    background-size: 34px 34px;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(340px, .82fr) minmax(560px, 1.18fr);
    gap: 25px;
    align-items: start;
}

.contact-left {
    display: flex;
    flex-direction: column;
    gap: 25px;
    min-width: 0;
}

.contact-info-card,
.contact-map-card,
.contact-form-card {
    position: relative;
    overflow: hidden;
    border: 1px solid #e0e8f3;
    border-radius: 25px;
    background: #fff;
    box-shadow: 0 14px 42px rgba(26, 61, 111, .08);
    transition: transform .32s ease, border-color .32s ease, box-shadow .32s ease;
}

    .contact-info-card:hover,
    .contact-map-card:hover,
    .contact-form-card:hover {
        transform: translateY(-4px);
        border-color: #cbd9eb;
        box-shadow: 0 23px 52px rgba(26, 61, 111, .12);
    }

.contact-info-card,
.contact-form-card {
    padding: 29px;
}

    .contact-info-card::before,
    .contact-form-card::before {
        content: "";
        position: absolute;
        top: 0;
        left: 35px;
        right: 35px;
        height: 5px;
        border-radius: 0 0 8px 8px;
        background: linear-gradient(90deg, var(--contact-blue), var(--contact-sky), var(--contact-green), var(--contact-yellow));
    }

.contact-card-heading,
.contact-form-heading {
    display: flex;
    gap: 14px;
    align-items: center;
}

.contact-heading-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 49px;
    height: 49px;
    flex: 0 0 49px;
    border-radius: 16px;
    color: #fff;
    background: linear-gradient(145deg, var(--contact-blue), #2878d1);
    box-shadow: 0 10px 22px rgba(18, 63, 147, .20);
}

.contact-heading-icon--green {
    background: linear-gradient(145deg, #168d58, #38bd80);
    box-shadow: 0 10px 22px rgba(32, 166, 106, .20);
}

.contact-card-kicker {
    display: block;
    margin-bottom: 3px;
    color: var(--contact-green);
    font-size: 12px;
}

.contact-card-heading h2,
.contact-form-heading h2,
.contact-map-heading h2 {
    margin: 0;
    color: var(--contact-blue-dark);
    font-family: 'Montserrat-ExtraBold', Arial, sans-serif;
}

.contact-card-heading h2,
.contact-form-heading h2 {
    font-size: 20px;
    line-height: 1.4;
}

.contact-intro,
.contact-form-note {
    color: var(--contact-muted);
    font-size: 15px;
    line-height: 1.75;
}

.contact-intro {
    margin: 20px 0;
    padding-bottom: 18px;
    border-bottom: 1px dashed #dce5f0;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.contact-info-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 11px;
    border-radius: 15px;
    transition: background .28s ease, transform .28s ease;
}

    .contact-info-item:hover {
        background: #f3f7fd;
        transform: translateX(5px);
    }

    .contact-info-item > span {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 39px;
        height: 39px;
        flex: 0 0 39px;
        border-radius: 13px;
        color: var(--contact-blue);
        background: #eaf3ff;
        transition: color .28s ease, background .28s ease, transform .28s ease;
    }

    .contact-info-item:nth-child(2) > span {
        color: #168a57;
        background: #e9f8f1;
    }

    .contact-info-item:nth-child(3) > span {
        color: #ae7900;
        background: #fff7da;
    }

    .contact-info-item:nth-child(4) > span {
        color: #a94a50;
        background: #fff0f1;
    }

    .contact-info-item:hover > span {
        color: #fff;
        background: var(--contact-blue);
        transform: rotate(-6deg);
    }

    .contact-info-item > div {
        min-width: 0;
    }

    .contact-info-item small,
    .contact-info-item strong,
    .contact-info-item a {
        display: block;
    }

    .contact-info-item small {
        margin-bottom: 2px;
        color: #8a96aa;
        font-size: 13px;
    }

    .contact-info-item strong,
    .contact-info-item a {
        color: #334969;
        font: 15px/1.55 'Montserrat-SemiBold', Arial, sans-serif;
        overflow-wrap: anywhere;
        text-decoration: none;
        transition: color .25s ease;
    }

        .contact-info-item a:hover {
            color: var(--contact-blue);
        }

.contact-office-hours {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-top: 18px;
    padding: 15px;
    border: 1px solid #d9ece3;
    border-radius: 16px;
    background: linear-gradient(135deg, #effaf5, #f7fbff);
}

    .contact-office-hours > span {
        color: var(--contact-green);
        font-size: 22px;
    }

    .contact-office-hours strong {
        display: block;
        color: #176f4c;
        font: 14px/1.4 'Montserrat-Bold', Arial, sans-serif;
    }

    .contact-office-hours p {
        margin: 3px 0 0;
        color: #5f786d;
        font-size: 13px;
        line-height: 1.5;
    }

/* Bản đồ */
.contact-map-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 22px;
}

    .contact-map-heading span {
        display: block;
        margin-bottom: 3px;
        color: var(--contact-green);
        font: 13px/1.4 'Montserrat-Bold', Arial, sans-serif;
        letter-spacing: .08em;
    }

    .contact-map-heading h2 {
        font-size: 18px;
        line-height: 1.4;
    }

    .contact-map-heading > i {
        color: var(--contact-blue);
        font-size: 24px;
    }

.contact-map-frame {
    overflow: hidden;
    border-top: 1px solid #e4ebf4;
}

    .contact-map-frame iframe {
        display: block;
        width: 100%;
        min-height: 300px;
        transition: transform .55s ease, filter .55s ease;
    }

.contact-map-card:hover iframe {
    transform: scale(1.025);
    filter: saturate(1.08);
}

/* Biểu mẫu */
.contact-form-card {
    min-width: 0;
    padding: 32px;
}

.contact-form-heading {
    padding-bottom: 20px;
    border-bottom: 1px dashed #dce5f0;
}

    .contact-form-heading h2 {
        font-size: 22px;
    }

.contact-form-note {
    margin: 16px 0 21px;
}

    .contact-form-note b,
    .contact-field label b {
        color: var(--contact-red);
    }

.contact-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 14px;
}

.contact-field {
    min-width: 0;
}

.contact-field--full {
    grid-column: 1 / -1;
}

.contact-field label {
    display: block;
    margin: 0 0 7px 2px;
    color: #293d5e;
    font: 14px/1.4 'Montserrat-Bold', Arial, sans-serif;
}

    .contact-field label span {
        color: #8b96a8;
        font-family: 'Montserrat-Medium', Arial, sans-serif;
        font-weight: normal;
    }

.contact-control {
    position: relative;
}

    .contact-control > i {
        position: absolute;
        z-index: 2;
        top: 50%;
        left: 15px;
        color: #7b8ba5;
        font-size: 13px;
        transform: translateY(-50%);
        pointer-events: none;
        transition: color .25s ease, transform .25s ease;
    }

    .contact-control input,
    .contact-control textarea {
        display: block;
        width: 100%;
        border: 1px solid #dce5f0;
        border-radius: 13px;
        outline: none;
        color: var(--contact-text);
        background: #f9fbfe;
        font: 14px 'Montserrat-Medium', Arial, sans-serif;
        transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
    }

    .contact-control input {
        height: 48px;
        padding: 0 15px 0 42px;
    }

    .contact-control textarea {
        min-height: 130px;
        padding: 15px 15px 15px 42px;
        line-height: 1.65;
        resize: vertical;
    }

.contact-control--textarea > i {
    top: 17px;
    transform: none;
}

.contact-control input::placeholder,
.contact-control textarea::placeholder {
    color: #9ca8b9;
    opacity: 1;
    font-size: 14px;
}

.contact-control input:hover,
.contact-control textarea:hover {
    border-color: #bacce2;
    background: #fff;
}

.contact-control input:focus,
.contact-control textarea:focus {
    border-color: #4c8bd0;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(39, 111, 190, .10);
}

.contact-control:focus-within > i {
    color: var(--contact-blue);
    transform: translateY(-50%) scale(1.08);
}

.contact-control--textarea:focus-within > i {
    transform: scale(1.08);
}

.contact-validation {
    display: block;
    margin: 5px 2px 0;
    color: #c83b3b;
    font-size: 13px;
    line-height: 1.45;
}

.contact-captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 184px;
    gap: 11px;
}

.contact-captcha-image {
    display: flex;
    align-items: stretch;
    gap: 8px;
}

.imgCapcha {
    display: block;
    width: 126px;
    height: 48px;
    object-fit: contain;
    border: 1px dashed rgba(18, 63, 147, .32);
    border-radius: 12px;
    background: #f4f8fd;
}

.btnRefresh {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    border-radius: 12px;
    color: #fff !important;
    background: linear-gradient(145deg, var(--contact-green), #39ba7e);
    box-shadow: 0 9px 18px rgba(32, 166, 106, .20);
    text-decoration: none !important;
    transition: transform .35s ease, box-shadow .35s ease;
}

    .btnRefresh:hover {
        transform: rotate(180deg) scale(1.05);
        box-shadow: 0 13px 24px rgba(32, 166, 106, .28);
    }

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 21px;
}

.contact-submit,
.contact-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 49px;
    padding: 0 21px;
    border-radius: 13px;
    font: 15px/1.2 'Montserrat-Bold', Arial, sans-serif;
    text-decoration: none !important;
    transition: transform .27s ease, box-shadow .27s ease, background .27s ease;
}

.contact-submit {
    min-width: 162px;
    color: #fff !important;
    background: linear-gradient(135deg, var(--contact-blue), #1f6fc7);
    box-shadow: 0 11px 23px rgba(18, 63, 147, .23);
}

    .contact-submit i {
        transition: transform .27s ease;
    }

    .contact-submit:hover {
        transform: translateY(-3px);
        box-shadow: 0 16px 30px rgba(18, 63, 147, .30);
    }

        .contact-submit:hover i {
            transform: translateX(4px);
        }

.contact-reset {
    color: #536782 !important;
    background: #eef3f9;
    box-shadow: inset 0 0 0 1px #dce5f0;
}

    .contact-reset:hover {
        color: var(--contact-blue) !important;
        background: #e6eef9;
        transform: translateY(-3px);
    }

.contact-privacy {
    margin: 12px 0 0;
    color: #7e8a9d;
    font-size: 12px;
    line-height: 1.55;
}

    .contact-privacy i {
        margin-right: 4px;
        color: var(--contact-green);
    }

.contact-status {
    display: block;
    margin: 0 0 18px;
    padding: 12px 14px;
    border: 1px solid;
    border-radius: 13px;
    font-size: 11px;
    line-height: 1.6;
    animation: contactStatusIn .35s ease both;
}

.contact-status--success {
    color: #17643f;
    border-color: #bce7cf;
    background: #eefaf3;
}

.contact-status--error {
    color: #9c3030;
    border-color: #f0c9c9;
    background: #fff3f3;
}

@keyframes contactFloat {
    0%, 100% {
        transform: translateY(0) rotate(-10deg);
    }

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

@keyframes contactStatusIn {
    from {
        opacity: 0;
        transform: translateY(-7px);
    }

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

@media (max-width: 1100px) {
    .contact-layout {
        grid-template-columns: minmax(310px, .78fr) minmax(500px, 1.22fr);
        gap: 20px;
    }

    .contact-info-card,
    .contact-form-card {
        padding: 24px;
    }
}

@media (max-width: 991px) {
    .contact-hero {
        padding: 53px 0 103px;
    }

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

    .contact-quick-cards {
        margin-bottom: -167px;
    }

    .contact-main {
        padding-top: 105px;
    }

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

    .contact-left {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
    }

    .contact-form-card {
        grid-row: 1;
    }
}

@media (max-width: 767px) {
    .contact-hero {
        padding: 34px 0 43px;
    }

    .contact-decor {
        display: none;
    }

    .contact-eyebrow {
        padding: 8px 12px;
        font-size: 12px;
    }

    .contact-hero h1 {
        margin-top: 17px;
        font-size: 21px;
        line-height: 1.3;
    }

        .contact-hero h1 span {
            display: inline-block;
        }

        .contact-hero h1 br {
            display: none;
        }

    .contact-hero-content > p {
        margin-top: 14px;
        font-size: 13px;
        line-height: 1.75;
        text-align: justify;
    }

    .contact-quick-cards {
        grid-template-columns: 1fr;
        gap: 10px;
        margin: 23px 0 0;
    }

    .contact-quick-card {
        padding: 12px;
        border-radius: 16px;
        box-shadow: 0 10px 26px rgba(20, 61, 119, .09);
    }

        .contact-quick-card strong {
            font-size: 14px;
        }

    .contact-quick-icon {
        width: 41px;
        height: 41px;
        flex-basis: 41px;
        border-radius: 13px;
    }

    .contact-main {
        padding: 26px 0 40px;
    }

    .contact-left {
        display: flex;
    }

    .contact-info-card,
    .contact-map-card,
    .contact-form-card {
        border-radius: 20px;
        width: 100%;
    }

    .contact-info-card,
    .contact-form-card {
        padding: 20px 16px;
    }

    .contact-form-card {
        grid-row: auto;
        order: -1;
    }

    .contact-card-heading,
    .contact-form-heading {
        gap: 11px;
    }

    .contact-heading-icon {
        width: 43px;
        height: 43px;
        flex-basis: 43px;
        border-radius: 14px;
    }

    .contact-card-heading h2,
    .contact-form-heading h2 {
        font-size: 16px;
    }

    .contact-info-item strong, .contact-info-item a {
        font-size: 14px;
    }

    .contact-info-item {
        padding: 6px;
    }

    .contact-form-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .contact-field--full {
        grid-column: auto;
    }

    .contact-control input, .contact-control textarea {
        font: 16px 'Montserrat-Medium', Arial, sans-serif;
    }

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

    .contact-control input::placeholder,
    .contact-control textarea::placeholder {
        color: #9ca8b9;
        opacity: 1;
        font-size: 13px;
    }

    .contact-captcha-image {
        width: 184px;
    }

    .contact-actions {
        flex-direction: column;
    }

    .contact-submit,
    .contact-reset {
        width: 100%;
    }

    .contact-map-heading {
        padding: 17px;
    }

        .contact-map-heading h2 {
            font-size: 15px;
        }

    .contact-map-frame iframe {
        min-height: 280px;
    }
}

@media (max-width: 380px) {
    .contact-hero h1 {
        font-size: 24px;
    }

    .contact-quick-card strong {
        max-width: 200px;
    }

    .contact-info-item {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-page *,
    .contact-page *::before,
    .contact-page *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
    }
}