/* === Base Styles & Variables === */
:root {
    /* 屏東醫院 LOGO 主視覺色彩 */
    --pt-blue: #076980; /* 屏醫深藍 (取自中文標誌) */
    --pt-orange: #F38200; /* 屏醫活力橘 (取自十字標誌) */
    --pt-green: #3ea44f; /* 屏醫醫療綠 (取自綠葉與英文標誌) */

    --light-grey: #f4f7f6;
    --white: #ffffff;
    --dark-text: #333333;
    --medium-grey: #666666;
    --border-color: #e0e0e0;
    --shadow-light: rgba(0, 0, 0, 0.1);
    /* 可掛號狀態 */
    --full: #D1332E;
    --onsite: #E67E22;
    --no-clinic: #adb5bd;
    --available: #2A8146; /* 使用屏醫綠色代表開放掛號 */
    --suspend: #666666;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

    *:focus {
        outline: 2px dashed var(--pt-blue);
        outline-offset: 2px;
    }

body {
    font-family: 'Helvetica Neue', 'Arial', 'PingFang TC', 'Microsoft JhengHei', sans-serif;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--white);
}

.logo-link {
    display: flex;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

a {
    text-decoration: none;
    color: var(--pt-blue);
    transition: color 0.3s ease;
}

    a:hover {
        color: var(--pt-orange);
    }

img {
    max-width: 100%;
    height: auto;
    display: block;
}

h1, h2, h3 {
    margin-bottom: 0.8em;
    font-weight: 600;
}

h1 {
    font-size: 2.5rem;
    color: var(--white);
}

h2 {
    font-size: 2rem;
    color: var(--pt-blue);
    text-align: center;
    margin-bottom: 1.5em;
}

h3 {
    font-size: 1.2rem;
    color: var(--pt-blue);
}

/* === Header === */
.main-header {
    background-color: var(--white);
    box-shadow: 0 2px 5px var(--shadow-light);
    padding: 30px 0 20px 0;
    top: 0;
    z-index: 1000;
}

.header-content {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .header-content #nav-link-bar {
        position: absolute;
        right: 20px;
        top: -20px;
    }

        .header-content #nav-link-bar a {
            color: var(--medium-grey);
        }

            .header-content #nav-link-bar a:hover {
                color: var(--pt-blue);
            }

.logo-image {
    height: 50px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
}

.main-nav a {
    color: var(--medium-grey);
    font-weight: 500;
    padding: 5px 0;
    position: relative;
}

    .main-nav a::after {
        content: '';
        position: absolute;
        bottom: -2px;
        left: 0;
        width: 0;
        height: 2px;
        background-color: var(--pt-orange);
        transition: width 0.3s ease;
    }

    .main-nav a:hover, .main-nav a.active {
        color: var(--pt-blue);
    }

        .main-nav a:hover::after, .main-nav a.active::after {
            width: 100%;
        }

.header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.lang-switcher {
    white-space: nowrap;
}

    .lang-switcher a {
        color: var(--medium-grey);
        font-size: 0.9rem;
    }

        .lang-switcher a.active {
            color: var(--pt-blue);
            font-weight: bold;
        }

.login-btn {
    background-color: var(--pt-blue);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
    transition: background-color 0.3s ease;
    font-size: 0.9rem;
}

    .login-btn:hover {
        background-color: #004873;
    }

.font-size-select {
    display: flex;
    gap: 4px;
    margin-right: 4px;
}

    .font-size-select .font-size-option {
        background-color: transparent;
        padding: 4px;
        width: 30px;
        height: 30px;
        border: 1px solid var(--pt-blue);
        transition: .2s;
        cursor: pointer;
    }

        .font-size-select .font-size-option.active, .font-size-select .font-size-option:hover {
            color: var(--white);
            background-color: var(--pt-blue);
        }

/* === Hero Section (Homepage) === */
.hero-section {
    background: linear-gradient(135deg, var(--pt-blue), var(--pt-green));
    color: var(--white);
    padding: 80px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

    .hero-section::before {
        content: '';
        position: absolute;
        bottom: -50px;
        left: -50px;
        width: 200px;
        height: 200px;
        background-color: rgba(255, 255, 255, 0.1);
        border-radius: 50%;
        opacity: 0.5;
    }

    .hero-section::after {
        content: '';
        position: absolute;
        top: -30px;
        right: -40px;
        width: 150px;
        height: 150px;
        background-color: rgba(255, 255, 255, 0.08);
        transform: rotate(45deg);
        opacity: 0.5;
    }

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-section .subtitle {
    font-size: 1.1rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.search-form {
    display: flex;
    max-width: 600px;
    margin: 0 auto 30px auto;
    background-color: var(--white);
    border-radius: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hero-section .search-form {
    padding: 5px;
}

.department-search-form {
    max-width: 450px;
    margin: 0 auto;
    display: flex;
    border: 1px solid rgba(0, 98, 155, 0.3);
    border-radius: 25px;
    overflow: hidden;
    background-color: var(--white);
    box-shadow: 0 2px 8px rgba(0,0,0,0.07);
    position: relative;
    z-index: 1;
}

    .search-form input[type="text"],
    .department-search-form input[type="text"] {
        flex-grow: 1;
        border: none;
        padding: 10px 20px;
        font-size: 1rem;
        color: var(--dark-text);
    }

.hero-section .search-form input[type="text"] {
    border-radius: 30px 0 0 30px;
}

.department-search-form input[type="text"] {
    font-size: 0.95rem;
}

.search-form button,
.department-search-form button {
    border: none;
    cursor: pointer;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.hero-section .search-form button {
    background-color: var(--pt-orange);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 0 30px 30px 0;
    font-size: 1rem;
    font-weight: 600;
}

    .hero-section .search-form button i {
        margin-right: 5px;
    }

    .hero-section .search-form button:hover {
        background-color: #D97400; /* 深橘色Hover */
    }

.department-search-form button {
    background-color: transparent;
    color: var(--pt-blue);
    padding: 0 15px;
    font-size: 1.1rem;
}

    .department-search-form button:hover {
        color: var(--pt-orange);
    }

.quick-links {
    margin-top: 20px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}

    .quick-links a {
        color: var(--white);
        background-color: rgba(255, 255, 255, 0.2);
        padding: 8px 15px;
        border-radius: 20px;
        margin: 5px 10px;
        font-size: 0.9rem;
        transition: background-color 0.3s ease;
        white-space: nowrap;
    }

        .quick-links a i {
            margin-right: 5px;
        }

        .quick-links a:hover {
            background-color: rgba(255, 255, 255, 0.4);
            color: var(--white);
        }

/* === Services Section (Homepage) === */
.services-section {
    padding: 60px 0;
    background-color: var(--light-grey);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: var(--white);
    padding: 30px 20px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 3px 10px var(--shadow-light);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: var(--dark-text);
}

    .service-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
        color: var(--pt-blue);
    }

    .service-card .icon-wrapper {
        background-color: var(--pt-orange);
        color: var(--white);
        width: 60px;
        height: 60px;
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.8rem;
        margin-bottom: 20px;
        transition: background-color 0.3s ease, color 0.3s ease;
    }

    .service-card:hover .icon-wrapper {
        background-color: var(--pt-green);
        color: var(--white);
    }

    .service-card h3 {
        margin-bottom: 10px;
        font-size: 1.1rem;
    }

    .service-card p {
        font-size: 0.9rem;
        color: var(--medium-grey);
        flex-grow: 1;
    }

/* === News, Info & Instructions Section (Homepage) === */
.news-info-section {
    padding: 60px 0;
}

.news-info-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.latest-news h3, .health-info h3, #RegistrationNotice {
    color: var(--pt-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pt-orange);
    display: inline-block;
    font-size: 1.4rem;
    text-align: left;
}

.registration-instructions h3 i {
    margin-right: 8px;
}

.latest-news ul {
    list-style: none;
}

.latest-news li {
    margin-bottom: 15px;
    border-bottom: 1px dashed var(--border-color);
    padding-bottom: 15px;
}

    .latest-news li:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.latest-news span {
    display: block;
    font-size: 0.85rem;
    color: var(--medium-grey);
    margin-bottom: 5px;
}

.latest-news a {
    color: var(--dark-text);
    font-weight: 500;
}

    .latest-news a:hover {
        color: var(--pt-blue);
    }

.health-info article {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px dashed var(--border-color);
}

    .health-info article:last-of-type {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

.health-info img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}

.health-info h4 {
    margin-bottom: 5px;
    font-size: 1rem;
}

    .health-info h4 a {
        color: var(--dark-text);
        font-weight: 500;
    }

        .health-info h4 a:hover {
            color: var(--pt-blue);
        }

.health-info p {
    font-size: 0.9rem;
    color: var(--medium-grey);
    margin-bottom: 0;
}

.instruction-category {
    margin-bottom: 25px;
}

    .instruction-category:last-child {
        margin-bottom: 0;
    }

    .instruction-category h4 {
        font-size: 1.1rem;
        color: var(--dark-text);
        margin-bottom: 10px;
        font-weight: 600;
    }

.registration-instructions ol,
.registration-instructions ul {
    list-style-position: outside;
    margin-left: 20px;
    padding-left: 5px;
    color: var(--medium-grey);
}

    .registration-instructions ol > li {
        margin-bottom: 10px;
        line-height: 1.7;
    }

.registration-instructions ul {
    margin-top: 8px;
    margin-bottom: 8px;
    list-style-type: disc;
}

    .registration-instructions ul > li {
        margin-bottom: 5px;
    }

    .registration-instructions ul ul > li {
        list-style-type: circle;
        margin-left: 15px;
    }

.registration-instructions ol > li strong.important-note {
    color: #e74c3c;
    font-weight: bold;
}

.more-link {
    display: inline-block;
    margin-top: 20px;
    color: var(--pt-blue);
    font-weight: 600;
    font-size: 0.95rem;
}

    .more-link i {
        margin-left: 5px;
    }

    .more-link:hover {
        color: var(--pt-orange);
    }

/* === Page Title Section === */
.page-title-section {
    background: linear-gradient(135deg, var(--pt-blue), var(--pt-green));
    text-align: center;
    padding: 40px 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--light-grey);
    position: relative;
    overflow: hidden;
}

    .page-title-section h2 {
        color: var(--white);
        font-size: 2rem;
        margin-bottom: 10px;
        position: relative;
        z-index: 1;
    }

        .page-title-section h1 i, .page-title-section h2 i {
            margin-right: 10px;
        }

    .page-title-section p {
        color: var(--white);
        font-size: 1.1rem;
        margin-bottom: 25px;
        position: relative;
        z-index: 1;
    }

    .page-title-section.department-title {
        background: linear-gradient(135deg, rgba(0, 98, 155, 1), rgba(42, 129, 70, 1));
        border-bottom-color: transparent;
    }

        .page-title-section.department-title h2,
        .page-title-section.department-title h2 i,
        .page-title-section.department-title p {
            color: var(--white);
        }

        .page-title-section.department-title::before {
            content: '';
            position: absolute;
            bottom: -30px;
            left: -30px;
            width: 150px;
            height: 150px;
            background-color: rgba(255, 255, 255, 0.15);
            border-radius: 50%;
            opacity: 0.4;
        }

        .page-title-section.department-title::after {
            content: '';
            position: absolute;
            top: -20px;
            right: -25px;
            width: 100px;
            height: 100px;
            background-color: rgba(255, 255, 255, 0.12);
            transform: rotate(30deg);
            opacity: 0.4;
        }

    .page-title-section.schedule-title {
        text-align: left;
        padding-top: 20px;
        padding-bottom: 20px;
        background-color: var(--light-grey);
    }

        .page-title-section.schedule-title h2 {
            margin-bottom: 5px;
        }

        .page-title-section.schedule-title p {
            font-size: 1rem;
            margin-bottom: 0;
        }

.breadcrumb-link {
    display: inline-block;
    color: var(--white);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

    .breadcrumb-link i {
        margin-right: 5px;
    }

    .breadcrumb-link:hover {
        color: #cbcbcb;
    }

.page-title-section.progress-title {
    text-align: left;
    padding-bottom: 15px;
    background-color: var(--light-grey);
}

    .page-title-section.progress-title h2 i {
        color: var(--pt-blue);
    }

    .page-title-section.progress-title p {
        font-size: 0.9rem;
        color: #e74c3c;
        margin-top: 5px;
        margin-bottom: 0;
    }

/* === Department Selection Page === */
.department-listing-section {
    padding: 40px 0 60px 0;
    background-color: var(--white);
}

.department-category {
    margin-bottom: 50px;
}

    .department-category:last-child {
        margin-bottom: 0;
    }

    .department-category h2 {
        font-size: 1.6rem;
        color: var(--pt-blue);
        margin-bottom: 25px;
        padding-bottom: 10px;
        border-bottom: 2px solid var(--pt-orange);
        display: inline-block;
    }

    .department-category h3 i {
        margin-right: 8px;
        color: var(--pt-blue);
    }

.department-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
    gap: 25px;
}

.department-card {
    display: block;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    padding: 25px 20px;
    border-radius: 10px;
    text-align: left;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.07);
    transition: transform 0.25s ease-in-out, box-shadow 0.25s ease-in-out, border-color 0.25s ease-in-out, background-color 0.25s ease-in-out;
    color: var(--dark-text);
    position: relative;
    overflow: hidden;
}

    .department-card:hover {
        transform: translateY(-6px) scale(1.02);
        box-shadow: 0 8px 20px rgba(0, 98, 155, 0.15), 0 4px 8px rgba(243, 130, 0, 0.15);
        border-color: var(--pt-blue);
        background-color: var(--white);
        color: var(--pt-blue);
    }

    .department-card::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 0;
        width: 0;
        height: 5px;
        background-color: var(--pt-blue);
        transition: width 0.3s ease-out;
    }

    .department-card:hover::after {
        width: 100%;
    }

    .department-card .dept-name-ch {
        display: block;
        font-size: 1.15rem;
        font-weight: 600;
        color: var(--pt-blue);
        margin-bottom: 8px;
        transition: color 0.25s ease-in-out;
        position: relative;
        z-index: 1;
    }

    .department-card:hover .dept-name-ch {
        color: var(--pt-blue);
    }

    .department-card .dept-name-en {
        display: block;
        font-size: 0.85rem;
        color: var(--medium-grey);
        margin-bottom: 0;
        line-height: 1.3;
        transition: color 0.25s ease-in-out;
        position: relative;
        z-index: 1;
    }

    .department-card:hover .dept-name-en {
        color: var(--pt-blue);
    }

/* === Schedule Page === */
.schedule-controls-section {
    padding: 20px 0;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
}

.date-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.date-nav-btn {
    background: none;
    border: 1px solid var(--border-color);
    color: var(--pt-blue);
    padding: 8px 12px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1;
    transition: background-color 0.3s ease, color 0.3s ease;
    flex-shrink: 0;
}

    .date-nav-btn:hover {
        background-color: var(--light-grey);
        border-color: var(--medium-grey);
    }

.date-items-wrapper {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    padding: 5px 0;
    flex-grow: 1;
    justify-content: center;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

    .date-items-wrapper::-webkit-scrollbar {
        display: none;
    }

.date-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 10px 15px;
    text-align: center;
    cursor: pointer;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    flex: 0 0 auto;
    min-width: 70px;
    background-color: var(--white);
}

    .date-item:hover {
        background-color: var(--light-grey);
        border-color: var(--medium-grey);
    }

    .date-item.active {
        background-color: var(--pt-blue);
        border-color: var(--pt-blue);
        color: var(--white);
        font-weight: bold;
    }

        .date-item.active .day-of-week {
            color: var(--pt-orange);
        }

    .date-item span {
        display: block;
    }

    .date-item .month-day {
        font-size: 0.95rem;
        font-weight: 600;
    }

    .date-item .day-of-week {
        font-size: 0.8rem;
        color: var(--medium-grey);
        transition: color 0.3s ease;
    }

    .date-item:hover .day-of-week {
        color: var(--dark-text);
    }

.schedule-display-section {
    padding: 40px 0 60px 0;
    background-color: #f9fafb;
}

.schedule-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.time-slot-column {
    background-color: var(--white);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 1px 3px rgba(0,0,0,0.03);
}

.slot-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--pt-blue);
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--pt-orange);
}

    .slot-title i {
        margin-right: 8px;
    }

.doctor-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.doctor-card {
    background-color: var(--light-grey);
    border-radius: 6px;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s ease;
}

    .doctor-card:hover {
        box-shadow: 0 3px 8px rgba(0,0,0,0.07);
    }

.doctor-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.doctor-name {
    font-weight: 600;
    color: var(--dark-text);
    font-size: 1rem;
}

    .doctor-name small {
        font-weight: 400;
        font-size: 0.8em;
        color: var(--medium-grey);
        margin-left: 5px;
        display: inline-block;
    }

.doctor-specialty {
    font-size: 0.85rem;
    color: var(--medium-grey);
}

.status-indicator {
    text-align: right;
    flex-shrink: 0;
    margin-left: 15px;
}

    .status-indicator span {
        font-weight: bold;
        font-size: 0.95rem;
    }

    .status-indicator small {
        display: block;
        font-size: 0.8rem;
        color: var(--medium-grey);
        margin-top: 3px;
    }

    .status-indicator.available .register-btn {
        background-color: var(--available);
        color: var(--white);
        border: none;
        padding: 8px 15px;
        border-radius: 20px;
        cursor: pointer;
        font-size: 0.9rem;
        font-weight: 500;
        transition: background-color 0.3s ease;
    }

        .status-indicator.available .register-btn:hover {
            background-color: #1F6335;
        }

    .status-indicator.available small {
        padding: 0 10px;
        color: var(--available);
        font-weight: 500;
    }

    .status-indicator.full span {
        color: #e74c3c;
    }

    .status-indicator.no-clinic span {
        color: var(--medium-grey);
    }

.no-clinic-message {
    text-align: center;
    padding: 30px 10px;
    color: var(--medium-grey);
}

    .no-clinic-message i {
        font-size: 1.8rem;
        margin-bottom: 15px;
        display: block;
        color: var(--border-color);
    }

    .no-clinic-message p {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 5px;
    }

/* === Consultation Progress Page === */
.filter-section {
    padding: 20px 0;
    background-color: var(--light-grey);
    border-bottom: 1px solid var(--border-color);
}

.progress-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    flex-grow: 0;
    min-width: 150px;
}

    .form-group label {
        font-size: 0.85rem;
        color: var(--medium-grey);
        margin-bottom: 5px;
        font-weight: 500;
    }

    .form-group select {
        padding: 10px 12px;
        border: 1px solid var(--border-color);
        border-radius: 6px;
        background-color: var(--white);
        font-size: 0.95rem;
        appearance: none;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23666666'%3E%3Cpath fill-rule='evenodd' d='M8 11.5a.5.5 0 0 1-.354-.146l-3-3a.5.5 0 0 1 .708-.708L8 10.293l2.646-2.647a.5.5 0 0 1 .708.708l-3 3A.5.5 0 0 1 8 11.5z'/%3E%3C/svg%3E");
        background-repeat: no-repeat;
        background-position: right 10px center;
        background-size: 16px 16px;
        padding-right: 35px;
        height: 41px;
    }

        .form-group select#filter-department,
        .form-group select#filter-timeslot {
            max-width: 220px;
            width: 100%;
        }

        .form-group select:focus {
            outline: none;
            border-color: var(--pt-blue);
            box-shadow: 0 0 0 2px rgba(0, 98, 155, 0.2);
        }

    .form-group.button-group {
        flex-grow: 0;
    }

.query-btn {
    background-color: var(--pt-blue);
    color: var(--white);
    border: none;
    padding: 10px 25px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: background-color 0.3s ease;
    height: 41px;
    line-height: 1.5;
}

    .query-btn i {
        margin-right: 5px;
    }

    .query-btn:hover {
        background-color: #004873;
    }

.status-bar-section {
    padding: 10px 0;
    background-color: var(--white);
    border-bottom: 1px solid var(--border-color);
}

.status-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.info-note {
    background-color: #E5F2FA;
    color: var(--pt-blue);
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

    .info-note i {
        font-size: 1.1em;
    }

.last-updated {
    font-size: 0.85rem;
    color: var(--medium-grey);
    text-align: right;
}

.progress-display-section {
    padding: 30px 0 60px 0;
    background-color: #f9fafb;
}

.progress-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
}

.clinic-card.progress-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.clinic-header {
    background-color: var(--pt-blue);
    color: var(--white);
    padding: 8px 15px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    text-align: left;
}

    .clinic-header .dept-name {
        font-size: 0.8rem;
        font-weight: 400;
        color: rgba(255, 255, 255, 0.85);
        margin-right: 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        flex-shrink: 1;
    }

    .clinic-header .clinic-number {
        font-size: 1rem;
        font-weight: 600;
        flex-shrink: 0;
    }

.clinic-body {
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-grow: 1;
    gap: 10px;
}

    .clinic-body .clinic-info {
        display: flex;
        flex-direction: column;
        gap: 2px;
    }

    .clinic-body .doctor-name {
        font-weight: 600;
        color: var(--dark-text);
        font-size: 1.05rem;
    }

.clinic-type {
    font-size: 0.85rem;
    color: var(--medium-grey);
}

.current-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--pt-blue);
    line-height: 1;
    text-align: right;
    flex-shrink: 0;
    min-width: 60px;
}

    .current-number.no-number {
        color: var(--medium-grey);
        font-size: 2rem;
        font-weight: 500;
    }

/* === Footer === */
.main-footer {
    background-color: #2c3e50;
    color: var(--light-grey);
    padding: 30px 0;
    margin-top: 60px;
    text-align: center;
    font-size: 0.9rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.footer-links a {
    color: white;
    margin: 0 10px;
}

    .footer-links a:hover {
        color: var(--white);
    }

.footer-contact p {
    margin-bottom: 0;
    color: var(--light-grey);
}

.footer-contact i {
    color: var(--pt-orange);
    margin-right: 5px;
}

.footer-copyright p {
    margin-bottom: 0;
    color: #bdc3c7;
    font-size: 0.85rem;
}

.main-footer *:focus {
    outline-color: white;
}

/* === Responsive Adjustments === */
@media (max-width: 992px) {
    .header-content {
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .main-nav {
        order: 3;
        width: 100%;
        margin-top: 10px;
    }

        .main-nav ul {
            justify-content: center;
            flex-wrap: wrap;
            gap: 15px;
        }

    .news-info-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .schedule-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .date-items-wrapper {
        justify-content: flex-start;
    }

    .results-container {
        grid-template-columns: 1fr;
    }

    .results-filters {
        margin-bottom: 30px;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.8rem;
    }

    .hero-section {
        padding: 60px 0;
    }

        .hero-section .search-form,
        .department-search-form {
            flex-direction: column;
            border-radius: 10px;
            padding: 15px;
            gap: 10px;
        }

            .hero-section .search-form input[type="text"],
            .department-search-form input[type="text"] {
                border-radius: 5px;
                text-align: center;
            }

            .hero-section .search-form button,
            .department-search-form button {
                border-radius: 5px;
            }

    .service-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 20px;
    }

    .service-card {
        padding: 20px 15px;
    }

    .footer-content {
        gap: 10px;
    }

    .footer-links a {
        margin: 0 5px;
    }

    .page-title-section.department-title {
        padding: 30px 0;
    }

        .page-title-section.department-title h2 {
            font-size: 1.8rem;
        }

        .page-title-section.department-title p {
            font-size: 1rem;
        }

    .department-category h2 {
        font-size: 1.4rem;
    }

    .department-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 15px;
    }

    .department-card {
        padding: 15px;
    }

        .department-card h4 {
            font-size: 1rem;
        }

        .department-card p {
            font-size: 0.8rem;
        }

    .schedule-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .date-item {
        padding: 8px 10px;
        min-width: 60px;
    }

        .date-item .month-day {
            font-size: 0.9rem;
        }

        .date-item .day-of-week {
            font-size: 0.75rem;
        }

    .page-title-section.schedule-title h2 {
        font-size: 1.6rem;
    }

    .page-title-section.schedule-title p {
        font-size: 0.9rem;
    }

    .progress-filter-form {
        gap: 15px;
    }

    .form-group {
        min-width: calc(50% - 10px);
    }

        .form-group.button-group {
            min-width: 100%;
            margin-top: 5px;
        }

    .query-btn {
        width: 100%;
    }

    .progress-grid {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 15px;
    }

    .current-number {
        font-size: 2rem;
    }

        .current-number.no-number {
            font-size: 1.8rem;
        }

    .clinic-body .doctor-name {
        font-size: 1rem;
    }

    .status-bar-content {
        flex-direction: column;
        align-items: flex-start;
    }

    .last-updated {
        align-self: flex-end;
    }

    .department-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 2px;
        border-bottom: none;
    }

        .department-tabs .tab-btn {
            flex-grow: 0;
            flex-shrink: 0;
            min-width: 100px;
            border-bottom: 2px solid transparent;
        }

            .department-tabs .tab-btn.active {
                border-bottom-color: var(--pt-blue);
                background-color: #E5F2FA;
                color: var(--pt-blue);
            }

    .consultation-progress-cards {
        grid-template-columns: 1fr;
    }

    .numbers-display .number {
        font-size: 2.2rem;
    }

    .search-result-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .result-icon {
        width: auto;
        padding-top: 0;
        font-size: 1.5rem;
    }

    .result-action {
        margin-left: 0;
        align-self: flex-start;
        width: 100%;
    }

    .btn {
        display: inline-block;
    }

    .result-content h3 {
        font-size: 1.15rem;
    }

    .inline-search-form {
        max-width: 90%;
    }

    .my-appointments-page .page-header-flex {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .appointment-item {
        flex-direction: column;
        align-items: stretch;
    }

    .appointment-actions {
        justify-content: flex-start;
        flex-direction: row;
    }

        .appointment-actions .btn {
            flex-grow: 1;
        }

    .modal-content {
        width: 95%;
        max-height: 90vh;
    }

    .modal-body {
        padding: 20px 15px;
    }

    .details-grid {
        grid-template-columns: 1fr;
        gap: 5px 0;
    }

    .detail-item .label {
        text-align: left;
        margin-bottom: 3px;
        background-color: transparent;
        color: var(--pt-blue);
        padding: 3px 0;
    }

    .detail-item .value {
        padding: 3px 0;
        border-bottom: 1px dashed var(--light-grey);
        margin-bottom: 8px;
    }

    .detail-item.detail-item-full-width .value {
        grid-column: 1 / -1;
    }

    .map-placeholder img {
        max-height: 200px;
        object-fit: cover;
    }
}

@media (max-width: 480px) {
    .logo-image {
        height: 40px;
    }

    .header-actions {
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

    .login-btn {
        width: 100%;
        text-align: center;
    }

    h1 {
        font-size: 1.8rem;
    }

    .hero-section .subtitle {
        font-size: 1rem;
    }

    .service-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .service-card h3 {
        font-size: 1rem;
    }

    .service-card p {
        font-size: 0.85rem;
    }

    .service-card .icon-wrapper {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }

    .health-info article {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .health-info img {
        width: 100%;
        height: auto;
        max-width: 150px;
        margin-bottom: 10px;
    }

    .footer-links {
        font-size: 0.8rem;
    }

    .footer-contact p {
        font-size: 0.85rem;
    }

    .page-title-section.department-title h2 {
        font-size: 1.7rem;
    }

    .department-search-form {
        max-width: 95%;
    }

    .department-grid {
        grid-template-columns: 1fr;
    }

    .doctor-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .status-indicator {
        text-align: left;
        margin-left: 0;
        width: 100%;
    }

        .status-indicator.available .register-btn {
            width: auto;
            display: inline-block;
        }

        .status-indicator small {
            text-align: left;
        }

    .date-nav-btn {
        padding: 6px 10px;
    }

    .form-group {
        min-width: 100%;
    }

    .progress-grid {
        grid-template-columns: 1fr;
    }

    .clinic-body {
        padding: 10px;
    }

    .current-number {
        font-size: 1.8rem;
    }

        .current-number.no-number {
            font-size: 1.6rem;
        }

    .clinic-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
        padding: 8px 10px;
    }

        .clinic-header .dept-name {
            margin-right: 0;
        }

    .progress-page-header h1 {
        font-size: 1.6rem;
    }

    .query-info-bar {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .consult-card .doctor-name-big {
        font-size: 1.15rem;
    }

    .numbers-display .number {
        font-size: 2rem;
    }

    .page-title-section.search-title h2 {
        font-size: 1.6rem;
    }

    .page-title-section.search-title p {
        font-size: 0.9rem;
    }

    .results-filters h4 {
        font-size: 1.1rem;
    }

    .filter-group h5 {
        font-size: 0.9rem;
    }

    .result-content h3 {
        font-size: 1.05rem;
    }

    .result-content p {
        font-size: 0.85rem;
    }

    .btn {
        font-size: 0.85rem;
        padding: 7px 15px;
    }

    .inline-search-form {
        flex-direction: column;
        border-radius: 8px;
        padding: 10px;
        gap: 10px;
        box-shadow: none;
        border: 1px solid var(--border-color);
    }

        .inline-search-form input[type="text"] {
            border-radius: 5px;
            text-align: center;
            border: 1px solid var(--border-color);
            padding: 12px 15px;
        }

        .inline-search-form button {
            border-radius: 5px;
            padding: 12px 15px;
        }

    .my-appointments-page .page-header-flex h1 {
        font-size: 1.5rem;
    }

    .appointment-summary .patient-name-summary {
        font-size: 1rem;
    }

    .appointment-summary .details-line,
    .appointment-summary .location-line {
        font-size: 0.85rem;
    }

    .appointment-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .modal-header h2 {
        font-size: 1.1rem;
    }

    .detail-item .label, .detail-item .value {
        font-size: 0.85rem;
    }
}

/* === New Consultation Progress Page Styles === */
.progress-page-main .container {
    max-width: 1000px;
}

.progress-page-header {
    padding: 25px 0 15px 0;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 20px;
}

    .progress-page-header .breadcrumbs {
        font-size: 0.85rem;
        color: var(--medium-grey);
        margin-bottom: 15px;
    }

        .progress-page-header .breadcrumbs a {
            color: var(--medium-grey);
        }

            .progress-page-header .breadcrumbs a:hover {
                color: var(--pt-blue);
            }

    .progress-page-header h1 {
        font-size: 1.8rem;
        color: var(--dark-text);
        text-align: left;
        margin-bottom: 10px;
    }

    .progress-page-header .description {
        font-size: 0.9rem;
        color: var(--medium-grey);
        line-height: 1.7;
        margin-bottom: 15px;
    }

.clinic-hours-info p {
    font-size: 0.85rem;
    color: var(--dark-text);
    margin-bottom: 3px;
    line-height: 1.5;
}

.auto-refresh-note {
    font-size: 0.8rem;
    color: var(--medium-grey);
    margin-top: 8px;
}

    .auto-refresh-note .highlight-time {
        color: #D33B36;
        font-weight: bold;
    }

    .auto-refresh-note.system-update {
        color: var(--pt-blue);
    }

.query-info-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--light-grey);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 25px;
    font-size: 0.9rem;
    color: var(--dark-text);
}

.refresh-query-btn {
    background-color: var(--pt-blue);
    color: var(--white);
    border: none;
    padding: 8px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.3s ease;
}

    .refresh-query-btn i {
        margin-right: 5px;
    }

    .refresh-query-btn:hover {
        background-color: #004873;
    }

.department-tabs {
    display: flex;
    gap: 0px;
    margin-bottom: 30px;
    border-bottom: 2px solid var(--pt-blue);
}

    .department-tabs .tab-btn {
        flex-grow: 1;
        padding: 12px 10px;
        font-size: 0.95rem;
        color: var(--medium-grey);
        background-color: #f8f9fa;
        border: 1px solid var(--border-color);
        border-bottom: none;
        border-radius: 6px 6px 0 0;
        cursor: pointer;
        text-align: center;
        transition: background-color 0.3s ease, color 0.3s ease;
        margin-right: -1px;
    }

        .department-tabs .tab-btn:last-child {
            margin-right: 0;
        }

        .department-tabs .tab-btn:hover {
            background-color: #e9ecef;
            color: var(--dark-text);
        }

        .department-tabs .tab-btn.active {
            background-color: var(--pt-blue);
            color: var(--white);
            border-color: var(--pt-blue);
            font-weight: 500;
            position: relative;
            z-index: 1;
        }

.consultation-progress-cards {
    display: none;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

    .consultation-progress-cards.active {
        display: grid;
        gap: 12px;
    }

/* === Search Results Page Styles === */
.page-title-section.search-title {
    text-align: left;
    padding-bottom: 25px;
}

    .page-title-section.search-title p {
        font-size: 1rem;
        color: var(--medium-grey);
    }

        .page-title-section.search-title p strong {
            color: var(--pt-blue);
            font-weight: 600;
        }

.search-results-section {
    padding: 30px 0 60px 0;
    background-color: var(--light-grey);
}

.results-container {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 30px;
}

.results-filters {
    background-color: var(--white);
    padding: 20px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    height: fit-content;
}

    .results-filters h4 {
        font-size: 1.2rem;
        color: var(--pt-blue);
        margin-bottom: 20px;
        padding-bottom: 10px;
        border-bottom: 1px solid var(--pt-orange);
    }

.filter-group {
    margin-bottom: 25px;
}

    .filter-group h5 {
        font-size: 0.95rem;
        color: var(--dark-text);
        margin-bottom: 10px;
        font-weight: 600;
    }

    .filter-group label {
        display: block;
        margin-bottom: 8px;
        font-size: 0.9rem;
        color: var(--medium-grey);
        cursor: pointer;
    }

        .filter-group label input[type="checkbox"] {
            margin-right: 8px;
            accent-color: var(--pt-blue);
        }

    .filter-group select {
        width: 100%;
        padding: 8px 10px;
        border-radius: 5px;
        border: 1px solid var(--border-color);
        font-size: 0.9rem;
        background-color: var(--white);
    }

.apply-filters-btn {
    width: 100%;
    background-color: var(--pt-blue);
    color: var(--white);
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

    .apply-filters-btn:hover {
        background-color: #004873;
    }

.results-summary {
    margin-bottom: 20px;
    padding: 10px 15px;
    background-color: var(--white);
    border-radius: 5px;
    border: 1px solid var(--border-color);
    font-size: 0.95rem;
    color: var(--medium-grey);
}

    .results-summary strong {
        color: var(--pt-blue);
        font-weight: 600;
    }

.search-result-item {
    background-color: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 20px;
    margin-bottom: 20px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    transition: box-shadow 0.2s ease;
}

    .search-result-item:hover {
        box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    }

    .search-result-item:last-child {
        margin-bottom: 0;
    }

.result-icon {
    font-size: 1.8rem;
    color: var(--pt-orange);
    width: 40px;
    text-align: center;
    flex-shrink: 0;
    padding-top: 5px;
}

.doctor-result .result-icon {
    color: var(--pt-blue);
}

.department-result .result-icon {
    color: var(--pt-blue);
}

.info-result .result-icon {
    color: var(--pt-green);
}

.result-content {
    flex-grow: 1;
}

    .result-content h3 {
        font-size: 1.25rem;
        margin-bottom: 5px;
    }

        .result-content h3 a {
            color: var(--pt-blue);
        }

            .result-content h3 a:hover {
                text-decoration: underline;
                color: #004873;
            }

.result-tag {
    display: inline-block;
    background-color: #e9ecef;
    color: var(--medium-grey);
    font-size: 0.75rem;
    padding: 3px 8px;
    border-radius: 10px;
    margin-left: 10px;
    font-weight: 500;
    vertical-align: middle;
}

.doctor-result .result-tag {
    background-color: #E5F2FA;
    color: var(--pt-blue);
}

.department-result .result-tag {
    background-color: #E5F2FA;
    color: var(--pt-blue);
}

.info-result .result-tag {
    background-color: #d4edda;
    color: #155724;
}

.result-content p {
    font-size: 0.9rem;
    color: var(--medium-grey);
    line-height: 1.5;
    margin-bottom: 8px;
}

    .result-content p:last-child {
        margin-bottom: 0;
    }

.doctor-specialty {
    font-weight: 500;
    color: var(--dark-text) !important;
}

.doctor-bio-snippet, .info-meta {
    font-size: 0.85rem !important;
}

.result-action {
    flex-shrink: 0;
    margin-left: auto;
    align-self: center;
}

.btn {
    display: inline-block;
    padding: 8px 18px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid transparent;
    transition: background-color 0.3s ease, border-color 0.3s ease, color 0.3s ease;
    cursor: pointer;
    text-align: center;
    white-space: nowrap;
}

    .btn i {
        margin-right: 4px;
    }

.btn-primary {
    background-color: var(--pt-blue);
    color: var(--white);
}

    .btn-primary:hover {
        background-color: #004873;
        border-color: #004873;
    }

.btn-secondary {
    background-color: var(--pt-orange);
    color: var(--white);
    border-color: var(--pt-orange);
}

    .btn-secondary:hover {
        background-color: #D97400;
        border-color: #D97400;
    }

.btn-secondary-outline {
    background-color: var(--white);
    color: var(--pt-blue);
    border: 1px solid var(--pt-blue);
}

    .btn-secondary-outline:hover {
        background-color: var(--light-grey);
        color: #004873;
        border-color: #004873;
    }

.btn-danger-outline {
    background-color: var(--white);
    color: #d9534f;
    border: 1px solid #d9534f;
}

    .btn-danger-outline:hover {
        background-color: #fbeeed;
        color: #c9302c;
        border-color: #c9302c;
    }

.consult-card {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 18px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.06);
    display: flex;
    flex-direction: column;
    gap: 12px;
}

    .consult-card .card-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
        font-size: 0.9rem;
        color: var(--medium-grey);
    }

    .consult-card .department {
        font-weight: 500;
        color: var(--dark-text);
    }

    .consult-card .doctor-name-big {
        font-size: 1.3rem;
        font-weight: 600;
        color: var(--pt-blue);
        text-align: center;
    }

.numbers-display {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    padding: 10px 0;
    border-top: 1px solid var(--light-grey);
    border-bottom: 1px solid var(--light-grey);
    text-align: center;
}

    .numbers-display .number-slot {
        position: relative;
        flex: 1;
    }

        .numbers-display .number-slot.current::after {
            content: '';
            position: absolute;
            right: 0;
            top: 10%;
            bottom: 10%;
            width: 1px;
            background-color: var(--border-color);
        }

    .numbers-display .number {
        display: block;
        font-size: 2.8rem;
        font-weight: bold;
        color: var(--dark-text);
        line-height: 1.1;
    }

        .numbers-display .number.highlight {
            color: var(--pt-blue);
        }

    .numbers-display .label {
        display: block;
        font-size: 0.8rem;
        color: var(--medium-grey);
        margin-top: 2px;
    }

    .numbers-display .number-slot.overdue .number {
        color: #d9534f;
    }

    .numbers-display .number-slot.overdue .label {
        color: #d9534f;
    }

.consult-card .clinic-room {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark-text);
    text-align: center;
}

.no-data-placeholder {
    grid-column: 1 / -1;
    text-align: center;
    padding: 50px 20px;
    color: var(--medium-grey);
    background-color: var(--light-grey);
    border-radius: 8px;
}

    .no-data-placeholder i {
        font-size: 3rem;
        margin-bottom: 15px;
        display: block;
        opacity: 0.5;
    }

    .no-data-placeholder p {
        font-size: 1rem;
    }

/* === My Appointments Page Styles === */
.my-appointments-page .container {
    max-width: 960px;
}

.my-appointments-page .page-header-flex {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border-color);
}

    .my-appointments-page .page-header-flex h1 {
        font-size: 1.7rem;
        color: var(--dark-text);
        text-align: left;
        margin-bottom: 0;
    }

.edit-profile-btn {
    padding: 8px 15px;
    font-size: 0.9rem;
}

    .edit-profile-btn i {
        margin-right: 6px;
    }

.no-results-message {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--white);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

    .no-results-message i {
        font-size: 3rem;
        color: var(--border-color);
        margin-bottom: 20px;
        display: block;
    }

    .no-results-message h3 {
        font-size: 1.5rem;
        color: var(--pt-blue);
        margin-bottom: 10px;
    }

    .no-results-message p {
        color: var(--medium-grey);
        margin-bottom: 15px;
        line-height: 1.6;
    }

    .no-results-message ul {
        list-style: none;
        padding: 0;
        margin-top: 10px;
    }

    .no-results-message li {
        font-size: 0.9rem;
        margin-bottom: 5px;
    }

    .no-results-message strong {
        color: var(--pt-blue);
    }

/* === Inline Search Form === */
.inline-search-form {
    max-width: 600px;
    margin: 20px auto 0 auto;
    display: flex;
    border: 1px solid var(--border-color);
    border-radius: 25px;
    overflow: hidden;
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

    .inline-search-form input[type="text"] {
        flex-grow: 1;
        border: none;
        padding: 10px 20px;
        font-size: 0.95rem;
        outline: none;
        color: var(--dark-text);
        border-radius: 25px 0 0 25px;
    }

    .inline-search-form button {
        background-color: var(--pt-orange);
        border: none;
        color: var(--white);
        padding: 0 20px;
        cursor: pointer;
        font-size: 1rem;
        font-weight: 500;
        transition: background-color 0.3s ease;
        border-radius: 0 25px 25px 0;
    }

        .inline-search-form button i {
            margin-right: 3px;
        }

        .inline-search-form button:hover {
            background-color: #D97400;
        }

.page-title-section.search-title {
    padding: 40px 0;
}

/* Appointment List */
.appointment-list {
    margin-bottom: 40px;
}

.appointment-item {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 20px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.appointment-summary {
    flex-grow: 1;
}

    .appointment-summary .patient-name-summary {
        font-size: 1.1rem;
        font-weight: 600;
        color: var(--dark-text);
        margin-bottom: 8px;
    }

.appointment-number-badge {
    background-color: var(--light-grey);
    color: var(--medium-grey);
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
    font-weight: normal;
}

.appointment-summary .details-line,
.appointment-summary .location-line {
    font-size: 0.9rem;
    color: var(--medium-grey);
    margin-bottom: 5px;
    line-height: 1.5;
}

.appointment-summary .location-line {
    margin-bottom: 0;
}

.appointment-summary .highlight {
    color: var(--pt-blue);
    font-weight: 500;
}

.appointment-summary .map-link-summary i {
    color: var(--pt-green);
}

.appointment-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Registration Info Section */
.registration-info-section {
    background-color: var(--light-grey);
    padding: 25px;
    border-radius: 8px;
}

.section-title-underline {
    font-size: 1.4rem;
    color: var(--pt-blue);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--pt-orange);
    text-align: left;
}

    .section-title-underline i {
        margin-right: 8px;
    }

.registration-info-section ol {
    list-style-type: decimal;
    margin-left: 20px;
    padding-left: 5px;
    font-size: 0.9rem;
    line-height: 1.8;
    color: var(--medium-grey);
}

    .registration-info-section ol > li {
        margin-bottom: 12px;
    }

.registration-info-section strong {
    color: var(--dark-text);
    font-weight: 500;
}

.registration-info-section ul {
    list-style-type: disc;
    margin-top: 8px;
    margin-left: 15px;
}

    .registration-info-section ul li {
        margin-bottom: 5px;
    }

.registration-info-section a {
    color: var(--pt-blue);
    text-decoration: underline;
}

    .registration-info-section a:hover {
        color: var(--pt-orange);
    }

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
    padding-top: 30px;
    padding-bottom: 30px;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 0;
    border: 1px solid #888;
    width: 90%;
    max-width: 750px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
    animation: fadeInModal 0.3s ease-out;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    padding: 15px 20px;
    background-color: var(--pt-blue);
    color: var(--white);
    border-bottom: 1px solid #e5e5e5;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

    .modal-header h2 {
        font-size: 1.2rem;
        margin-bottom: 0;
        color: var(--white);
        text-align: left;
    }

        .modal-header h2 .highlight {
            color: var(--pt-orange);
            font-weight: bold;
        }

.close-modal-btn {
    color: var(--white);
    background: none;
    border: none;
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    opacity: 0.8;
    padding: 0 5px;
}

    .close-modal-btn:hover {
        color: var(--light-grey);
        opacity: 1;
    }

    .close-modal-btn:focus {
        outline-color: white;
    }

.btn.btn-secondary.close-modal-btn:focus {
    outline-color: var(--pt-blue);
}

.modal-body {
    padding: 25px 20px;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.details-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 15px 10px;
    align-items: start;
}

.detail-item {
    display: contents;
}

    .detail-item .label {
        background-color: var(--pt-blue);
        color: var(--white);
        padding: 8px 12px;
        border-radius: 4px;
        font-size: 0.9rem;
        text-align: center;
        font-weight: 500;
        white-space: nowrap;
    }

    .detail-item .value {
        padding: 8px 0;
        font-size: 0.9rem;
        color: var(--dark-text);
        line-height: 1.6;
    }

        .detail-item .value.highlight {
            color: #d9534f;
            font-weight: bold;
        }

    .detail-item.detail-item-full-width .label {
        grid-column: 1 / 2;
    }

    .detail-item.detail-item-full-width .value {
        grid-column: 2 / 3;
    }

.map-placeholder img {
    border: 1px solid var(--border-color);
    border-radius: 4px;
    width: 100%;
    height: auto;
}

.modal-footer {
    padding: 15px 20px;
    text-align: right;
    border-top: 1px solid #e5e5e5;
    border-radius: 0 0 8px 8px;
    background-color: #f9f9f9;
}

    .modal-footer .btn-secondary {
        background-color: var(--medium-grey);
        color: var(--white);
        border-color: var(--medium-grey);
    }

        .modal-footer .btn-secondary:hover {
            background-color: #555555;
            border-color: #555555;
        }

.user-info-header {
    font-size: 0.9rem;
    color: var(--dark-text);
}

    .user-info-header span {
        font-weight: 500;
    }

.logout-btn-header {
    color: var(--pt-blue);
    margin-left: 5px;
}

    .logout-btn-header:hover {
        text-decoration: underline;
    }

.progressBar {
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    z-index: 100;
    background: rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(2px);
}

.loader {
    width: 45px;
    aspect-ratio: 1;
    --c: no-repeat linear-gradient(#fff 0 0);
    background: var(--c) 0% 50%, var(--c) 50% 50%, var(--c) 100% 50%;
    background-size: 20% 100%;
    animation: l1 1s infinite linear;
}

@keyframes l1 {
    0% {
        background-size: 20% 100%,20% 100%,20% 100%
    }

    33% {
        background-size: 20% 10%,20% 100%,20% 100%
    }

    50% {
        background-size: 20% 100%,20% 10%,20% 100%
    }

    66% {
        background-size: 20% 100%,20% 100%,20% 10%
    }

    100% {
        background-size: 20% 100%,20% 100%,20% 100%
    }
}

.user-menu {
    position: relative;
    display: inline-block;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    cursor: pointer;
}

#user-name {
    font-weight: bold;
    margin-right: 6px;
}

.user-menu i.fas.fa-caret-down {
    color: #333;
    font-size: 0.9em;
}

.user-menu ul {
    list-style: none;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 100%;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    display: none;
    min-width: 150px;
    z-index: 999;
}

.user-menu:hover ul,
.user-menu #user-menu-trigger:focus + ul {
    display: block;
}

.dropdown-li {
    padding: 10px 16px;
}

    .dropdown-li a {
        text-decoration: none;
        color: #333;
        display: block;
        transition: background-color 0.2s, color 0.2s;
    }

    .dropdown-li:hover {
        background-color: #f0f0f0;
    }

    .dropdown-li a:hover, .dropdown-li a:focus {
        color: var(--pt-blue);
    }

.auth-modal {
    padding-top: 5vh;
}

.auth-modal-content {
    max-width: 420px;
}

.auth-modal-header {
    text-align: center;
    padding: 20px;
}

    .auth-modal-header h2 {
        font-size: 1.5rem;
        color: var(--white);
        margin-bottom: 0;
    }

.auth-modal .modal-body {
    padding: 25px 30px 30px 30px;
}

.modal.auth-modal .form-group-modal {
    margin-bottom: 20px;
}

    .modal.auth-modal .form-group-modal label {
        display: block;
        font-size: 0.9rem;
        color: var(--dark-text);
        margin-bottom: 6px;
        font-weight: 500;
    }

.modal fieldset.form-options, .modal fieldset.form-group-modal {
    border: none;
    padding: 0;
    margin: 0;
    margin-bottom: 20px;
}

.error-message {
    color: #D8000C;
    font-weight: bold;
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

.modal input[aria-invalid="true"] {
    border-color: #D8000C;
    box-shadow: 0 0 0 2px rgba(216, 0, 12, 0.2);
}

.modal.auth-modal .form-group-modal input[type="text"],
.modal.auth-modal .form-group-modal input[type="password"],
.modal.auth-modal .form-group-modal select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

    .modal.auth-modal .form-group-modal input[type="text"]:focus,
    .modal.auth-modal .form-group-modal input[type="password"]:focus {
        outline: none;
        border-color: var(--pt-blue);
        box-shadow: 0 0 0 2px rgba(0, 98, 155, 0.2);
    }

.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

    .password-input-wrapper input[type="password"],
    .password-input-wrapper input[type="text"] {
        padding-right: 40px;
    }

.play-captcha-audio, .toggle-password-visibility {
    width: 38px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--medium-grey);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 5px 5px 0;
}

.toggle-password-visibility {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
}

    .toggle-password-visibility:hover {
        color: var(--pt-blue);
    }

    .toggle-password-visibility i {
        font-size: 1rem;
    }

.modal.auth-modal .form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    font-size: 0.85rem;
}

.modal.auth-modal .remember-me {
    color: var(--medium-grey);
    cursor: pointer;
    display: flex;
    align-items: center;
}

    .modal.auth-modal .remember-me input[type="checkbox"] {
        margin-right: 6px;
        accent-color: var(--pt-blue);
    }

.modal.auth-modal .forgot-password-link {
    color: var(--pt-blue);
    text-decoration: none;
}

    .modal.auth-modal .forgot-password-link:hover {
        text-decoration: underline;
        color: var(--pt-orange);
    }

.btn-block-modal {
    display: block;
    width: 100%;
    padding: 12px 15px;
    font-size: 1rem;
    font-weight: 500;
}

.social-login-divider {
    text-align: center;
    margin: 25px 0;
    position: relative;
    color: var(--medium-grey);
    font-size: 0.85rem;
}

    .social-login-divider span {
        background-color: var(--white);
        padding: 0 10px;
        position: relative;
        z-index: 1;
    }

    .social-login-divider::before {
        content: '';
        position: absolute;
        left: 0;
        top: 50%;
        width: 100%;
        height: 1px;
        background-color: var(--border-color);
        z-index: 0;
    }

.social-login-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 15px;
    font-size: 0.9rem;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--white);
    color: var(--dark-text);
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

    .btn-social:hover {
        background-color: var(--light-grey);
        border-color: #ccc;
    }

    .btn-social i {
        font-size: 1.2em;
    }

.btn-google {
    color: #DB4437;
}

.btn-line {
    color: #00B900;
}

.switch-auth-link {
    padding: 20px 15px;
    text-align: center;
    font-size: 0.9rem;
    color: var(--medium-grey);
}

    .switch-auth-link a {
        padding: 20px 15px;
        color: var(--pt-blue);
        font-weight: 500;
        text-decoration: none;
    }

        .switch-auth-link a:hover {
            padding: 20px 15px;
            text-decoration: underline;
            color: var(--pt-orange);
        }

#gotomain, #gotoaccessibility {
    position: absolute;
    left: 0;
    top: -2.2rem;
    background: var(--pt-blue);
    color: white;
    transition: .2s;
    height: 2.2rem;
    line-height: 1.8rem;
    font-weight: bold;
    font-size: 1.4rem;
    border: 1px solid white;
    padding: .4rem .3rem;
    outline-color: white;
    z-index: 999999;
}

    #gotomain:focus, #gotoaccessibility:focus {
        top: 0;
    }
