﻿/*
 * CYD WEBSITE UI KIT
 * Trường Cao đẳng Y tế Đồng Nai
 * Phiên bản: 1.0
 *
 * Cách dùng:
 * 1) Upload file này vào thư mục /CSS/cyd-ui.css
 * 2) Gọi file trong <head> hoặc MasterPage:
 *    <link rel="stylesheet" href="/CSS/cyd-ui.css?v=1">
 * 3) Dùng các class bắt đầu bằng cyd- trong HTML.
 *
 * CSS được giới hạn trong các class cyd-* để giảm ảnh hưởng đến giao diện cũ.
 */

/* ===== 1. MÀU SẮC VÀ NỀN TẢNG ===== */
:root {
    --cyd-primary: #087e8b;
    --cyd-primary-dark: #075e68;
    --cyd-secondary: #16a085;
    --cyd-accent: #f5a623;
    --cyd-text: #344054;
    --cyd-muted: #667085;
    --cyd-border: #e4e7ec;
    --cyd-soft: #f2fbfa;
    --cyd-white: #ffffff;
    --cyd-radius: 12px;
    --cyd-shadow: 0 5px 20px rgba(16, 75, 110, .09);
    --cyd-shadow-hover: 0 12px 28px rgba(16, 75, 110, .16);
}

/* ===== 2. KHUNG CƠ BẢN ===== */
.cyd-panel {
    margin: 18px 0;
    color: var(--cyd-text);
    background: var(--cyd-white);
    border: 1px solid var(--cyd-border);
    border-radius: var(--cyd-radius);
    box-shadow: var(--cyd-shadow);
    overflow: hidden;
}

.cyd-panel__header {
    padding: 17px 22px;
    color: var(--cyd-white);
    background: linear-gradient(120deg, var(--cyd-primary-dark), var(--cyd-secondary));
    border-bottom: 4px solid var(--cyd-accent);
}

.cyd-panel__title {
    margin: 0;
    color: inherit;
    font-size: 21px;
    line-height: 1.45;
    font-weight: 700;
}

.cyd-panel__subtitle {
    margin: 5px 0 0;
    color: rgba(255,255,255,.9);
    font-size: 14px;
    line-height: 1.6;
}

.cyd-panel__body {
    padding: 20px 22px;
}

/* ===== 3. TRANG / KHUNG LIÊN HỆ ===== */
.cyd-contact {
    max-width: 100%;
    margin: 18px auto;
    overflow: hidden;
    color: var(--cyd-text);
    background: #fff;
    border: 1px solid var(--cyd-border);
    border-radius: 14px;
    box-shadow: var(--cyd-shadow);
    transition: box-shadow .25s ease;
}

.cyd-contact:hover {
    box-shadow: var(--cyd-shadow-hover);
}

.cyd-contact__header {
    padding: 20px 24px;
    color: #fff;
    background: linear-gradient(120deg, #075e68, #16a085);
    border-bottom: 4px solid var(--cyd-accent);
}

.cyd-contact__header h2,
.cyd-contact__header h3 {
    margin: 0;
    color: #fff;
    font-size: 23px;
    line-height: 1.45;
}

.cyd-contact__header p {
    margin: 5px 0 0;
    color: #e8ffff;
    font-size: 14px;
}

.cyd-contact__body {
    padding: 18px 24px;
}

.cyd-contact__row {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    padding: 13px 10px;
    border-bottom: 1px solid #edf1f5;
    border-radius: 7px;
    transition: background .22s ease, transform .22s ease;
}

.cyd-contact__row:last-child {
    border-bottom: 0;
}

.cyd-contact__row:hover {
    background: var(--cyd-soft);
    transform: translateX(3px);
}

.cyd-contact__icon {
    display: inline-flex;
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    align-items: center;
    justify-content: center;
    color: var(--cyd-primary);
    background: #e5f5f3;
    border-radius: 10px;
    font-size: 18px;
}

.cyd-contact__info {
    flex: 1;
    min-width: 0;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.cyd-contact__label {
    display: block;
    margin-bottom: 2px;
    color: var(--cyd-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .45px;
    text-transform: uppercase;
}

.cyd-contact__phone {
    margin: 6px 0;
    padding: 8px 10px;
    background: #f7fbfb;
    border-left: 3px solid var(--cyd-secondary);
    border-radius: 0 6px 6px 0;
}

.cyd-contact a {
    color: var(--cyd-primary);
    text-decoration: none;
    transition: color .2s ease;
}

.cyd-contact a:hover {
    color: #d97706;
    text-decoration: underline;
}

.cyd-contact__social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

/* ===== 4. NÚT BẤM ===== */
.cyd-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    max-width: 100%;
    padding: 10px 16px;
    color: #fff !important;
    background: var(--cyd-primary);
    border: 1px solid var(--cyd-primary);
    border-radius: 8px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.45;
    text-align: center;
    text-decoration: none !important;
    cursor: pointer;
    transition: background .22s ease, transform .22s ease, box-shadow .22s ease;
}

.cyd-btn:hover,
.cyd-btn:focus {
    color: #fff !important;
    background: var(--cyd-primary-dark);
    border-color: var(--cyd-primary-dark);
    box-shadow: 0 5px 13px rgba(8,126,139,.2);
    transform: translateY(-2px);
    text-decoration: none !important;
}

.cyd-btn--green {
    background: #16845b;
    border-color: #16845b;
}

.cyd-btn--green:hover,
.cyd-btn--green:focus {
    background: #116746;
    border-color: #116746;
}

.cyd-btn--orange {
    color: #273444 !important;
    background: #ffc857;
    border-color: #ffc857;
}

.cyd-btn--orange:hover,
.cyd-btn--orange:focus {
    color: #273444 !important;
    background: #f5b52e;
    border-color: #f5b52e;
}

.cyd-btn--outline {
    color: var(--cyd-primary) !important;
    background: #fff;
    border-color: var(--cyd-primary);
}

.cyd-btn--outline:hover,
.cyd-btn--outline:focus {
    color: #fff !important;
    background: var(--cyd-primary);
}

.cyd-btn--small {
    padding: 7px 11px;
    font-size: 13px;
}

/* ===== 5. THẺ / BẢNG THÔNG BÁO ===== */
.cyd-notice {
    margin: 16px 0;
    padding: 16px 18px;
    color: var(--cyd-text);
    background: #f2fbfa;
    border: 1px solid #c8e9e5;
    border-left: 5px solid var(--cyd-primary);
    border-radius: 8px;
    line-height: 1.7;
}

.cyd-notice__title {
    display: block;
    margin: 0 0 5px;
    color: var(--cyd-primary-dark);
    font-size: 17px;
    font-weight: 700;
}

.cyd-notice--warning {
    background: #fff8e8;
    border-color: #f8df9c;
    border-left-color: #e5a000;
}

.cyd-notice--warning .cyd-notice__title {
    color: #875b00;
}

.cyd-notice--danger {
    background: #fff2f1;
    border-color: #f5c6c2;
    border-left-color: #c9362b;
}

.cyd-notice--danger .cyd-notice__title {
    color: #a12820;
}

.cyd-notice--success {
    background: #effaf3;
    border-color: #c4e8cf;
    border-left-color: #218653;
}

.cyd-notice--success .cyd-notice__title {
    color: #17683f;
}

/* ===== 6. BẢNG DỮ LIỆU ===== */
.cyd-table-wrap {
    width: 100%;
    margin: 16px 0;
    overflow-x: auto;
    border: 1px solid var(--cyd-border);
    border-radius: 9px;
    box-shadow: 0 3px 12px rgba(16,75,110,.05);
}

.cyd-table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    color: var(--cyd-text);
    background: #fff;
    font-size: 14px;
    line-height: 1.6;
}

.cyd-table th {
    padding: 12px 14px;
    color: #fff;
    background: var(--cyd-primary);
    font-weight: 700;
    text-align: left;
    vertical-align: top;
}

.cyd-table td {
    padding: 11px 14px;
    border-bottom: 1px solid #e9eef2;
    vertical-align: top;
}

.cyd-table tbody tr:nth-child(even) {
    background: #f7fbfb;
}

.cyd-table tbody tr {
    transition: background .2s ease;
}

.cyd-table tbody tr:hover {
    background: #eaf7f5;
}

.cyd-table tbody tr:last-child td {
    border-bottom: 0;
}

/* ===== 7. KHUNG TIN TỨC ===== */
.cyd-news-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin: 18px 0;
}

.cyd-news-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    overflow: hidden;
    color: var(--cyd-text);
    background: #fff;
    border: 1px solid var(--cyd-border);
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(16,75,110,.07);
    transition: transform .25s ease, box-shadow .25s ease;
}

.cyd-news-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--cyd-shadow-hover);
}

.cyd-news-card__image {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #edf5f5;
}

.cyd-news-card__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .45s ease, filter .35s ease;
}

.cyd-news-card:hover .cyd-news-card__image img {
    transform: scale(1.045);
    filter: saturate(1.08);
}

.cyd-news-card__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 15px 16px 17px;
}

.cyd-news-card__date {
    margin-bottom: 7px;
    color: var(--cyd-muted);
    font-size: 12px;
}

.cyd-news-card__title {
    margin: 0 0 9px;
    color: var(--cyd-primary-dark);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.5;
}

.cyd-news-card__title a {
    color: inherit;
    text-decoration: none;
}

.cyd-news-card__title a:hover {
    color: #d97706;
}

.cyd-news-card__summary {
    margin: 0 0 14px;
    color: #586474;
    font-size: 14px;
    line-height: 1.65;
}

.cyd-news-card__more {
    margin-top: auto;
    font-size: 14px;
    font-weight: 700;
}

/* ===== 8. HIỆU ỨNG ẢNH ===== */
.cyd-image-frame {
    display: block;
    overflow: hidden;
    background: #edf5f5;
    border-radius: 10px;
    box-shadow: 0 4px 14px rgba(16,75,110,.1);
}

.cyd-image-frame img {
    display: block;
    width: 100%;
    height: auto;
    transition: transform .4s ease, filter .4s ease;
}

.cyd-image-frame:hover img {
    transform: scale(1.035);
    filter: brightness(1.04);
}

.cyd-image-caption {
    margin-top: 8px;
    color: var(--cyd-muted);
    font-size: 13px;
    line-height: 1.55;
    text-align: center;
}

/* ===== 9. ĐƯỜNG PHÂN CÁCH / NHÃN ===== */
.cyd-divider {
    height: 3px;
    margin: 18px 0;
    background: linear-gradient(90deg, var(--cyd-primary), var(--cyd-secondary), var(--cyd-accent));
    border: 0;
    border-radius: 99px;
}

.cyd-badge {
    display: inline-block;
    padding: 4px 9px;
    color: var(--cyd-primary-dark);
    background: #e5f5f3;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.5;
}

.cyd-badge--orange {
    color: #805500;
    background: #fff1c9;
}

/* ===== 10. RESPONSIVE ===== */
@media (max-width: 900px) {
    .cyd-news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .cyd-panel__header,
    .cyd-contact__header {
        padding: 16px;
    }

    .cyd-panel__title,
    .cyd-contact__header h2,
    .cyd-contact__header h3 {
        font-size: 19px;
    }

    .cyd-panel__body,
    .cyd-contact__body {
        padding: 12px;
    }

    .cyd-contact__row {
        gap: 10px;
        padding: 11px 5px;
    }

    .cyd-contact__social {
        flex-direction: column;
    }

    .cyd-contact__social .cyd-btn {
        width: 100%;
        box-sizing: border-box;
    }

    .cyd-news-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .cyd-table {
        min-width: 560px;
    }
}

/* Tôn trọng cài đặt giảm chuyển động của người dùng */
@media (prefers-reduced-motion: reduce) {
    .cyd-contact,
    .cyd-contact__row,
    .cyd-contact a,
    .cyd-btn,
    .cyd-news-card,
    .cyd-news-card__image img,
    .cyd-image-frame img {
        transition: none !important;
    }
}



/* CYD - Bảng thông tin văn bản hành chính trang trọng */
.cyd-document-card {
    --doc-blue: #0b6170;
    --doc-blue-dark: #084653;
    --doc-gold: #c49a45;
    --doc-ink: #263746;
    --doc-line: #dce6e9;
    margin: 22px 0;
    color: var(--doc-ink);
    background: #fff;
    border: 1px solid #d8e3e6;
    border-top: 4px solid var(--doc-blue);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 22px rgba(8, 70, 83, .09);
    transition: box-shadow .28s ease, transform .28s ease;
}

.cyd-document-card:hover {
    box-shadow: 0 12px 30px rgba(8, 70, 83, .15);
    transform: translateY(-2px);
}

.cyd-document-card__heading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 17px 22px;
    background: linear-gradient(110deg, #f4f9fa 0%, #ffffff 75%);
    border-bottom: 1px solid #e7eef0;
}

.cyd-document-card__mark {
    display: flex;
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    color: #fff;
    background: var(--doc-blue);
    border-radius: 10px;
    font-size: 21px;
}

.cyd-document-card__heading-text {
    min-width: 0;
}

.cyd-document-card__eyebrow {
    display: block;
    margin-bottom: 3px;
    color: var(--doc-blue);
    font-size: 11px;
    font-family: Arial, sans-serif;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.cyd-document-card__title {
    margin: 0;
    color: var(--doc-blue-dark);
    font-family: Arial, sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.cyd-document-card__accent {
    height: 3px;
    background: linear-gradient(90deg, var(--doc-gold) 0, #e6d2a5 35%, transparent 100%);
}

.cyd-document-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.cyd-document-table {
    width: 100%;
    margin: 0;
    border: 0;
    border-collapse: separate;
    border-spacing: 0;
    color: var(--doc-ink);
    background: #fff;
    font-family: "Times New Roman", Times, serif;
    font-size: 19px;
    line-height: 1.65;
}

.cyd-document-table th,
.cyd-document-table td {
    padding: 15px 19px;
    border: 0;
    border-bottom: 1px solid var(--doc-line);
    vertical-align: top;
    transition: background-color .22s ease;
}

.cyd-document-table th {
    width: 25%;
    color: #214e59;
    background: #f3f8f9;
    border-right: 1px solid #e2ebed;
    text-align: left;
    font-weight: 700;
}

.cyd-document-table td {
    background: #fff;
    overflow-wrap: anywhere;
}

.cyd-document-table tbody tr:last-child th,
.cyd-document-table tbody tr:last-child td {
    border-bottom: 0;
}

.cyd-document-table tbody tr:hover th,
.cyd-document-table tbody tr:hover td {
    background: #f5fbfa;
}

.cyd-document-table tbody tr:hover th {
    box-shadow: inset 3px 0 0 var(--doc-gold);
}

.cyd-document-table .cyd-document-number {
    color: var(--doc-blue);
    font-weight: 700;
    letter-spacing: .2px;
}

.cyd-document-table .cyd-document-excerpt {
    line-height: 1.8;
    text-align: justify;
}

.cyd-document-table .cyd-document-sign {
    text-align: center;
    padding-top: 20px;
    padding-bottom: 22px;
}

.cyd-document-table .cyd-document-sign-title {
    display: block;
    margin-bottom: 24px;
    color: var(--doc-blue-dark);
    font-weight: 700;
    letter-spacing: .6px;
}

.cyd-document-table .cyd-document-sign-name {
    display: block;
    font-weight: 700;
}

.cyd-document-table p {
    margin: 0;
}

.cyd-document-card__footer {
    padding: 10px 18px;
    color: #667984;
    background: #fafcfc;
    border-top: 1px solid #edf2f3;
    font-family: Arial, sans-serif;
    font-size: 12px;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .cyd-document-card__heading {
        padding: 14px;
    }

    .cyd-document-card__title {
        font-size: 16px;
    }

    .cyd-document-table {
        font-size: 16px;
        min-width: 0;
    }

    .cyd-document-table th,
    .cyd-document-table td {
        padding: 11px 10px;
    }

    .cyd-document-table th {
        width: 34%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cyd-document-card,
    .cyd-document-table th,
    .cyd-document-table td {
        transition: none;
    }
}
/* ================= TÙY BIẾN CHO TRANG : LIÊN HỆ ================= */
.cyd-contact {
    font-family: Arial, Helvetica, sans-serif;
    color: #344054;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(16, 75, 110, 0.08);
    max-width: 100%;
    margin: 15px auto;
    transition: box-shadow 0.3s ease;
}

.cyd-contact:hover {
    box-shadow: 0 10px 28px rgba(16, 75, 110, 0.15);
}

/* TIEU DE */
.cyd-contact-header {
    background: linear-gradient(120deg, #087e8b, #16a085);
    color: #fff;
    padding: 20px 24px;
    border-bottom: 4px solid #f5a623;
}

.cyd-contact-header h2 {
    margin: 0;
    color: #fff;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.5;
    text-transform: uppercase;
}

.cyd-contact-header p {
    margin: 5px 0 0;
    color: #e8ffff;
    font-size: 14px;
}

/* NOI DUNG */
.cyd-contact-body {
    padding: 20px 24px;
}

.cyd-contact-row {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 13px 10px;
    border-bottom: 1px solid #edf1f5;
    border-radius: 6px;
    transition: background 0.25s, transform 0.25s;
}

.cyd-contact-row:last-child {
    border-bottom: none;
}

.cyd-contact-row:hover {
    background: #f0faf9;
    transform: translateX(4px);
}

.cyd-contact-icon {
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #e5f5f3;
    border-radius: 9px;
    color: #087e8b;
    font-size: 18px;
}

.cyd-contact-info {
    flex: 1;
    min-width: 0;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

.cyd-contact-label {
    display: block;
    font-size: 13px;
    color: #718096;
    font-weight: 600;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.cyd-contact a {
    color: #087e8b;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s;
}

.cyd-contact a:hover {
    color: #e67e22;
    text-decoration: underline;
}

.cyd-contact-phone {
    margin: 5px 0;
    padding: 8px 10px;
    border-left: 3px solid #16a085;
    background: #f7fbfb;
    border-radius: 0 6px 6px 0;
}

.cyd-contact-phone a {
    color: #344054;
}

.cyd-contact-phone a:hover {
    color: #087e8b;
}

.cyd-contact-social {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.cyd-contact-btn {
    display: inline-block;
    padding: 10px 16px;
    border-radius: 7px;
    background: #e5f5f3;
    color: #087e8b !important;
    font-size: 14px;
    font-weight: 700;
    transition: all 0.25s ease;
}

.cyd-contact-btn:hover {
    background: #087e8b;
    color: #fff !important;
    text-decoration: none !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(8, 126, 139, 0.2);
}

/* DIEN THOAI */
@media screen and (max-width: 600px) {
    .cyd-contact-header {
        padding: 16px;
    }

    .cyd-contact-header h2 {
        font-size: 19px;
    }

    .cyd-contact-body {
        padding: 12px;
    }

    .cyd-contact-row {
        gap: 10px;
        padding: 11px 5px;
    }

    .cyd-contact-social {
        flex-direction: column;
    }

    .cyd-contact-btn {
        text-align: center;
    }
}
