.marriage-page { background: #f5f7fb; color: #18233a; }
.marriage-hero { min-height: 360px; padding: 110px 18px 42px; background: linear-gradient(135deg, rgba(103, 30, 16, .88), rgba(25, 51, 95, .82)), url("../webimg/logo_08122025070019.jpeg") center/cover no-repeat; color: #fff; }
.marriage-hero-inner { width: min(1120px, 100%); margin: 0 auto; }
.marriage-hero h1 { max-width: 760px; margin: 0; font-size: clamp(34px, 5vw, 58px); line-height: 1.08; font-weight: 850; }
.marriage-hero p { max-width: 720px; margin: 16px 0 0; color: rgba(255,255,255,.86); font-size: 17px; line-height: 1.65; }
.marriage-actions, .media-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.marriage-actions a, .marriage-actions button, .marriage-submit, .marriage-secondary { min-height: 46px; padding: 0 18px; border: 0; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; font-weight: 800; text-decoration: none; cursor: pointer; }
.marriage-actions a:first-child, .marriage-submit { background: #f7c948; color: #1b2436; }
.marriage-actions a, .marriage-actions button, .marriage-secondary { background: rgba(255,255,255,.14); color: #fff; border: 1px solid rgba(255,255,255,.25); }
.marriage-wrap { width: min(1180px, calc(100% - 24px)); margin: 28px auto 54px; }
.marriage-feature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.marriage-feature-card { min-height: 116px; padding: 18px; background: #fff; border: 1px solid #e4eaf4; border-radius: 8px; box-shadow: 0 8px 24px rgba(18,35,67,.07); }
.marriage-feature-card i { width: 38px; height: 38px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; background: #eef5ff; color: #1568b5; }
.marriage-feature-card h3 { margin: 12px 0 6px; font-size: 16px; font-weight: 850; }
.marriage-feature-card p { margin: 0; color: #5e6b82; font-size: 13px; line-height: 1.5; }
.marriage-layout { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(360px, .92fr); gap: 18px; align-items: start; }
.marriage-panel { background: #fff; border: 1px solid #e2e9f3; border-radius: 8px; box-shadow: 0 12px 32px rgba(18,35,67,.08); overflow: hidden; }
.marriage-panel-head { padding: 18px 20px; border-bottom: 1px solid #e7eef7; background: #fbfdff; }
.marriage-panel-head h2 { margin: 0; font-size: 21px; font-weight: 850; }
.marriage-panel-head p { margin: 6px 0 0; color: #637087; font-size: 14px; }
.marriage-form { padding: 18px 20px 22px; }
.marriage-section-title { margin: 18px 0 12px; padding-bottom: 9px; border-bottom: 1px solid #edf1f7; color: #27364f; font-size: 15px; font-weight: 850; }
.marriage-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.marriage-field.full { grid-column: 1 / -1; }
.marriage-field label { display: block; margin-bottom: 7px; color: #2d3a52; font-size: 13px; font-weight: 800; }
.marriage-field input, .marriage-field select, .marriage-field textarea { width: 100%; min-height: 43px; padding: 10px 12px; border: 1px solid #cfd9e7; border-radius: 8px; color: #172033; background: #fff; font-size: 14px; }
.marriage-field textarea { min-height: 88px; resize: vertical; }
.age-output { min-height: 42px; padding: 11px 12px; border-radius: 8px; background: #eef7f2; color: #12643b; font-weight: 800; }
.witness-box { padding: 14px; border: 1px solid #e0e7f1; border-radius: 8px; background: #fbfdff; }
.signature-pad { width: 100%; height: 108px; border: 1px dashed #9fb0c8; border-radius: 8px; background: #fff; touch-action: none; }
.media-tools { margin-top: 8px; }
.media-tools button { min-height: 38px; padding: 0 12px; border: 1px solid #ced8e6; border-radius: 8px; background: #fff; color: #25344f; font-weight: 800; }
.capture-preview { width: 96px; height: 96px; margin-top: 10px; border: 1px solid #d7e1ee; border-radius: 8px; object-fit: cover; background: #f2f5f9; }
.camera-stream { width: 100%; max-height: 220px; margin-top: 10px; border-radius: 8px; background: #101828; display: none; }
.document-list { margin: 10px 0 0; padding: 0; list-style: none; }
.document-list li { padding: 8px 10px; border: 1px solid #e2e9f3; border-radius: 8px; color: #43516a; font-size: 13px; }
.certificate-shell { padding: 16px; background: #eef3f9; }
.certificate-preview { min-height: 720px; padding: 34px; border: 8px double #b88a32; background: #fffdf8; color: #1e2430; text-align: center; }
.certificate-preview.buddhist { border-color: #2a6d9f; background: #fbfdff; }
.certificate-logo-row { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.certificate-person { width: 94px; height: 94px; border: 1px solid #d7c28d; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; background: #fff8df; color: #744b11; font-size: 12px; font-weight: 850; line-height: 1.3; }
.certificate-title { margin: 20px 0 8px; color: #8a3d18; font-size: 42px; font-weight: 900; }
.buddhist .certificate-title { color: #165f91; }
.certificate-preview h3 { margin: 0 0 12px; font-size: 18px; }
.certificate-line { margin: 11px 0; font-size: 17px; line-height: 1.65; }
.certificate-name { color: #111827; font-size: 24px; font-weight: 900; }
.certificate-photo-row { display: flex; justify-content: center; gap: 14px; margin: 18px 0; }
.certificate-photo-row img, .certificate-photo-placeholder { width: 112px; height: 112px; border: 1px solid #cdd6e3; border-radius: 8px; object-fit: cover; display: inline-flex; align-items: center; justify-content: center; background: #f3f6fa; color: #5c6980; font-size: 12px; font-weight: 800; }
.certificate-signatures { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 24px; text-align: center; }
.certificate-sign-box { min-height: 72px; border-top: 1px solid #8c96a8; padding-top: 8px; font-size: 12px; color: #475467; }
.certificate-sign-box img { max-width: 100%; max-height: 42px; display: block; margin: 0 auto 4px; }
.certificate-website { margin-top: 22px; color: #1164a8; font-weight: 850; }
.form-status { min-height: 22px; margin-top: 12px; font-weight: 800; }
.form-status.success { color: #0f7a42; }
.form-status.error { color: #c53131; }
@media (max-width: 980px) { .marriage-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .marriage-layout { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .marriage-hero { padding-top: 92px; } .marriage-feature-grid, .marriage-grid, .certificate-signatures { grid-template-columns: 1fr; } .certificate-preview { min-height: 0; padding: 18px; } .certificate-title { font-size: 32px; } }

.certificate-person img { width: 100%; height: 100%; object-fit: cover; display: block; }


.rich-input {
    min-height: 88px;
    padding: 10px 12px;
    border: 1px solid #cfd9e7;
    border-radius: 8px;
    background: #fff;
    color: #172033;
    font-size: 14px;
    line-height: 1.55;
    outline: none;
}
.rich-input:empty::before {
    content: attr(data-placeholder);
    color: #8793a6;
}
.application-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.application-paper {
    min-height: 620px;
    padding: 26px;
    border: 1px solid #d7dfec;
    border-radius: 8px;
    background: #fffefb;
    color: #161f31;
    font-family: "Mangal", "Noto Sans Devanagari", Arial, sans-serif;
    font-size: 15px;
    line-height: 1.85;
    box-shadow: inset 0 0 0 1px rgba(184, 138, 50, .12);
    outline: none;
}
.application-paper .app-to { text-align: left; font-weight: 800; line-height: 1.55; }
.application-paper .app-row { display: flex; gap: 14px; align-items: baseline; margin-top: 8px; }
.application-paper .app-row span { flex: 1; border-bottom: 1px dotted #7c8798; min-height: 28px; padding: 0 6px; font-weight: 700; }
.application-paper .app-subject { margin: 18px 0 10px; font-weight: 850; }
.application-paper ol { margin: 8px 0 0 24px; padding: 0; }
.application-paper li { margin-bottom: 10px; }
.application-paper .app-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; font-weight: 800; }
.application-paper .blank { display: inline-block; min-width: 90px; border-bottom: 1px dotted #7c8798; font-weight: 700; text-align: center; }
@media (max-width: 980px) { .application-preview-grid { grid-template-columns: 1fr; } }

.service-link-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}
.service-link-card {
    color: inherit;
    text-decoration: none;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.service-link-card:hover {
    color: inherit;
    text-decoration: none;
    transform: translateY(-3px);
    border-color: #b9c9de;
    box-shadow: 0 14px 32px rgba(18, 35, 67, .12);
}
@media (max-width: 980px) { .service-link-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .service-link-grid { grid-template-columns: 1fr; } }


.apply-only-layout { grid-template-columns: 1fr; }
.public-hidden-preview { position: absolute; left: -99999px; top: 0; width: 794px; pointer-events: none; opacity: 0; }


.marriage-admin-action,
.admin-print-toolbar a,
.admin-print-toolbar button {
    min-height: 40px;
    padding: 0 14px;
    border: 0;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #1f6fb2;
    color: #fff;
    font-weight: 800;
    text-decoration: none;
    cursor: pointer;
}
.marriage-admin-action:hover,
.admin-print-toolbar a:hover,
.admin-print-toolbar button:hover { color: #fff; text-decoration: none; filter: brightness(1.05); }
.admin-print-toolbar { position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; gap: 10px; padding: 12px; background: #fff; border-bottom: 1px solid #dbe4f0; box-shadow: 0 8px 24px rgba(18,35,67,.08); }
.admin-detail-grid > div { padding: 10px 12px; border: 1px solid #e1e8f2; border-radius: 8px; background: #fbfdff; }
.print-page-break { margin-top: 18px; }
@media print {
    .admin-print-toolbar { display: none; }
    .marriage-wrap { width: 100%; margin: 0; }
    .marriage-panel-head, .print-section { break-inside: avoid; }
    .print-page-break { break-before: page; margin-top: 0; }
    .application-paper, .certificate-preview { box-shadow: none; border-radius: 0; }
    body { background: #fff !important; }
}

.marriage-image-comp {
    padding: 16px;
    border: 1px solid rgba(28, 111, 172, 0.14);
    border-left: 3px solid #1f6fb2;
    border-radius: 8px;
    background: linear-gradient(180deg, #f3f7ff 0%, #eef4ff 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.marriage-image-comp .form-group-label {
    margin: 0;
    color: #2d3a52;
    font-size: 13px;
    font-weight: 800;
}
.marriage-image-comp .form_img {
    margin-left: auto;
}
.marriage-field > .capture-preview:not([src]),
.marriage-field > .capture-preview[src=""] {
    display: none;
}
@media (max-width: 620px) {
    .marriage-image-comp {
        display: block;
    }
    .marriage-image-comp .form_img {
        margin: 10px 0 0;
    }
}

.marriage-slot-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 620px) { .marriage-slot-grid { grid-template-columns: 1fr; } }

