/* ==========================================================================
   CHINESE THEME REDESIGN - LIÊN HỆ (CONTACT) PAGE
   Project: Cửa Kính Tín Đạt
   Color Palette:
   - Primary Background: #FFFFFF (Clean Pure White)
   - Brand Red Accent (Primary): #e80805 (Google Stitch Red)
   - Brand Blue Accent (Secondary): #0057d8 (Secondary blue for hover & sub-headings)
   - Typography Charcoal: #111827 (Deep Slate Black)
   - Secondary Text: #4b5563 (Elegant Muted Slate)
   ========================================================================== */

.cn-contact-page {
    background-color: #FFFFFF;
    color: #111827;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 16px;
    line-height: 1.7;
    overflow-x: hidden;
}

/* Base grid layout container */
.cn-shell {
    width: min(1200px, calc(100% - 2.5rem));
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

/* Premium Typography Style */
.cn-hero-title, 
.cn-section-title, 
.cn-panel-title,
.cn-info-title,
.cn-services-title,
.cn-info-label,
.cn-field label {
    font-family: 'Lora', 'Georgia', serif;
    font-weight: 700;
}

/* ==========================================================================
   HERO HEADER AREA (Identical to About Page)
   ========================================================================== */
.cn-hero {
    position: relative;
    padding: 7rem 0 6rem;
    text-align: center;
    background: radial-gradient(circle at center, #FFFFFF 0%, #f4f6fa 100%);
    border-bottom: 2px solid #e80805;
}

/* Repeating top and bottom geometric borders using border images or CSS ornaments */
.cn-hero-ornament {
    position: absolute;
    left: 0;
    width: 100%;
    height: 16px;
    background-image: url("/images/bg-footer2.png");
    background-repeat: repeat-x;
    background-size: auto 16px;
}

.cn-ornament-top {
    top: 0;
}

.cn-ornament-bottom {
    bottom: 0;
    transform: rotate(180deg);
}

.cn-kicker {
    display: inline-block;
    font-size: 0.85rem;
    font-weight: 800;
    color: #0057d8;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    position: relative;
    padding: 0 1.5rem;
}

.cn-kicker::before,
.cn-kicker::after {
    content: "✦";
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #e80805;
}

.cn-kicker::before { left: 0; }
.cn-kicker::after { right: 0; }

.cn-hero-title {
    margin: 0 0 2rem;
}

.cn-hero-brand {
    display: block;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: #e80805;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
    text-shadow: 1px 1px 0px rgba(197, 168, 92, 0.4);
}

.cn-hero-sub {
    display: block;
    font-size: clamp(1.2rem, 2.5vw, 1.8rem);
    color: #0057d8;
    font-weight: 500;
    letter-spacing: 0.02em;
}

.cn-hero-intro {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.15rem;
    color: #4b5563;
    line-height: 1.8;
}

.cn-hero-divider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 3rem;
}

.cn-hero-divider::before,
.cn-hero-divider::after {
    content: "";
    height: 1px;
    width: 100px;
    background: linear-gradient(to right, transparent, #0057d8, transparent);
}

.cn-divider-cloud {
    width: 24px;
    height: 24px;
    background: url("/images/mask-img.png") no-repeat center;
    background-size: contain;
    margin: 0 1.5rem;
    filter: invert(15%) sepia(95%) saturate(6932%) hue-rotate(358deg) brightness(95%) contrast(112%); /* Turns mask red */
}

/* ==========================================================================
   CONTENT WRAPPER & GRID
   ========================================================================== */
.cn-contact-wrap {
    padding: 6.5rem 0;
    position: relative;
    background-color: #FFFFFF;
}

.cn-contact-wrap::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("/images/bg-footer.jpg");
    background-repeat: repeat;
    opacity: 0.015;
    mix-blend-mode: multiply;
    pointer-events: none;
    z-index: 1;
}

.cn-contact-grid {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: 3rem;
    align-items: start;
    position: relative;
    z-index: 2;
}

/* Elegant traditional Chinese card with red borders and hover blue styling */
.cn-contact-card {
    position: relative;
    background-color: #FFFFFF;
    border: 2px solid #e80805;
    border-radius: 8px;
    padding: 3.5rem 3rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.02);
    transition: all 400ms cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.cn-contact-card:hover {
    border-color: #0057d8;
    box-shadow: 0 20px 50px rgba(0, 87, 216, 0.08);
}

.cn-card-mask {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    opacity: 0.015;
    background-image: url("/images/bg-footer.jpg");
    background-repeat: repeat;
    pointer-events: none;
}

.cn-contact-card::before {
    content: "";
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 1px solid rgba(0, 87, 216, 0.15);
    border-radius: 4px;
    pointer-events: none;
    transition: border-color 400ms ease;
}

.cn-contact-card:hover::before {
    border-color: rgba(0, 87, 216, 0.3);
}

/* Subtle corner decoration effects */
.cn-contact-card::after {
    content: "";
    position: absolute;
    width: 12px;
    height: 12px;
    border-top: 2px solid #e80805;
    border-left: 2px solid #e80805;
    top: 12px;
    left: 12px;
    transition: border-color 400ms ease;
}

.cn-contact-card:hover::after {
    border-color: #0057d8;
}

.cn-card-corner {
    position: absolute;
    width: 14px;
    height: 14px;
    border: 2px solid #e80805;
    pointer-events: none;
    transition: border-color 400ms ease;
}

.cn-contact-card:hover .cn-card-corner {
    border-color: #0057d8;
}

.cn-card-corner.top-right { top: 10px; right: 10px; border-left: none; border-bottom: none; }
.cn-card-corner.bottom-left { bottom: 10px; left: 10px; border-right: none; border-top: none; }
.cn-card-corner.bottom-right { bottom: 10px; right: 10px; border-left: none; border-top: none; }

/* ==========================================================================
   INFO CARD STYLING
   ========================================================================== */
.cn-info-title, 
.cn-panel-title {
    font-size: 1.8rem;
    color: #0057d8;
    margin: 0 0 1rem;
    letter-spacing: 0.05em;
}

.cn-panel-divider {
    width: 80px;
    height: 1px;
    background-color: #e80805;
    margin-bottom: 2.2rem;
    transition: background-color 400ms ease;
}

.cn-contact-card:hover .cn-panel-divider {
    background-color: #0057d8;
}

.cn-info-list {
    display: flex;
    flex-direction: column;
    gap: 1.8rem;
}

/* Asymmetrical Chinese screen design block */
.cn-info-item {
    display: flex;
    align-items: center;
    background-color: #FFFFFF;
    border: 1px solid rgba(0, 87, 216, 0.12);
    border-left: 4px solid #e80805;
    border-radius: 4px;
    padding: 1.5rem 1.8rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.005);
    transition: all 300ms ease;
    position: relative;
}

.cn-info-item:hover {
    transform: translateX(6px);
    box-shadow: 0 12px 30px rgba(0, 87, 216, 0.06);
    border-color: rgba(0, 87, 216, 0.25);
    border-left-color: #0057d8;
}

/* Calligraphy character seals representing info pillars */
.cn-info-seal {
    width: 54px;
    height: 54px;
    min-width: 54px;
    border: 2px solid #e80805;
    border-radius: 4px;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: rgba(232, 8, 5, 0.02);
    margin-right: 1.5rem;
    color: #e80805;
    position: relative;
    transition: all 300ms ease;
}

.cn-info-item:hover .cn-info-seal {
    color: #0057d8;
    border-color: #0057d8;
    background-color: rgba(0, 87, 216, 0.02);
}

.cn-info-seal::before {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 3px;
    border: 1px dashed rgba(232, 8, 5, 0.4);
    transition: border-color 300ms ease;
}

.cn-info-item:hover .cn-info-seal::before {
    border-color: rgba(0, 87, 216, 0.4);
}

.cn-info-seal svg {
    width: 22px;
    height: 22px;
}

.cn-info-content {
    flex: 1;
}

.cn-info-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: #e80805;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: 0.35rem;
    transition: color 300ms ease;
}

.cn-info-item:hover .cn-info-label {
    color: #0057d8;
}

.cn-info-value {
    font-size: 1.05rem;
    line-height: 1.6;
    font-weight: 600;
    color: #111827;
    word-break: break-word;
}

.cn-info-value a {
    color: inherit;
    text-decoration: none;
    transition: color 200ms ease;
}

.cn-info-value a:hover {
    color: #0057d8;
}

/* Service Tags Section */
.cn-services-section {
    margin-top: 2.5rem;
    border-top: 1px dashed rgba(0, 87, 216, 0.2);
    padding-top: 1.8rem;
}

.cn-services-title {
    font-size: 1.15rem;
    color: #111827;
    margin-bottom: 1rem;
    letter-spacing: 0.02em;
}

.cn-services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
}

.cn-service-tag {
    font-size: 0.85rem;
    font-weight: 700;
    color: #0057d8;
    background-color: rgba(0, 87, 216, 0.05);
    border: 1px solid rgba(0, 87, 216, 0.15);
    padding: 0.35rem 0.9rem;
    border-radius: 4px;
    transition: all 250ms ease;
}

.cn-service-tag:hover {
    color: #FFFFFF;
    background-color: #0057d8;
    border-color: #0057d8;
    transform: translateY(-2px);
}

/* ==========================================================================
   FORM PANEL STYLING
   ========================================================================== */
.cn-form-intro {
    font-size: 1rem;
    color: #4b5563;
    margin-bottom: 2rem;
    line-height: 1.7;
}

.cn-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.cn-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.cn-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.cn-field label {
    font-size: 0.9rem;
    font-weight: 800;
    color: #111827;
    letter-spacing: 0.02em;
}

.cn-field input,
.cn-field select,
.cn-field textarea {
    width: 100%;
    border: 1px solid rgba(0, 87, 216, 0.15);
    border-radius: 4px;
    background-color: #FFFFFF;
    color: #111827;
    font-family: inherit;
    font-size: 0.98rem;
    outline: none;
    transition: all 250ms ease;
}

.cn-field input,
.cn-field select {
    height: 3.2rem;
    padding: 0 1.2rem;
}

.cn-field textarea {
    min-height: 9.5rem;
    padding: 1rem 1.2rem;
    resize: vertical;
}

.cn-field input:focus,
.cn-field select:focus,
.cn-field textarea:focus {
    border-color: #0057d8;
    box-shadow: 0 0 0 3px rgba(0, 87, 216, 0.1);
    background-color: #fcfdfe;
}

/* Submit button with traditional red style */
.cn-submit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.4rem;
    width: 100%;
    padding: 0.5rem 2rem;
    font-size: 0.95rem;
    font-weight: 800;
    border: 2px solid #e80805;
    border-radius: 4px;
    background-color: #e80805;
    color: #FFFFFF;
    text-decoration: none;
    letter-spacing: 0.05em;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(232, 8, 5, 0.15);
    transition: all 250ms ease;
}

.cn-submit-btn:hover {
    background-color: #0057d8;
    border-color: #0057d8;
    box-shadow: 0 8px 20px rgba(0, 87, 216, 0.2);
    transform: translateY(-2px);
}

/* Verification Alerts */
.cn-alert {
    padding: 1rem 1.25rem;
    border-radius: 4px;
    font-size: 0.95rem;
    font-weight: 700;
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.cn-alert-success {
    color: #15803d;
    background-color: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
}

.cn-alert-danger {
    color: #b91c1c;
    background-color: #fef2f2;
    border: 1px solid #fecaca;
    border-left: 4px solid #dc2626;
}

.cn-error-text {
    color: #dc2626;
    font-size: 0.82rem;
    font-weight: 700;
    margin-top: 0.25rem;
}

/* ==========================================================================
   RESPONSIVE DESIGN (MEDIA QUERIES)
   ========================================================================== */
@media (max-width: 1024px) {
    .cn-contact-grid {
        gap: 2rem;
    }
    .cn-contact-card {
        padding: 3rem 2rem;
    }
}

@media (max-width: 920px) {
    .cn-hero {
        padding: 5rem 0 4.5rem;
    }
    .cn-contact-wrap {
        padding: 4.5rem 0;
    }
    .cn-contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    .cn-contact-card {
        padding: 3rem 2rem;
    }
}

@media (max-width: 600px) {
    .cn-form-row {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .cn-contact-card {
        padding: 2.5rem 1.5rem;
    }
    .cn-info-item {
        flex-direction: column;
        text-align: center;
        padding: 2rem 1.5rem;
    }
    .cn-info-seal {
        margin-right: 0;
        margin-bottom: 1.25rem;
    }
}
