/* ===== ELEGANT ACCORDION CSS ===== */
.service-accordion {
    max-width: 100%;
    /* Set to full width as requested */
    margin: 0 auto;
}

.service-accordion .accordion-item {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-radius: 12px;
    margin-bottom: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
    overflow: hidden;
    /* Contains the smooth animation */
}

.service-accordion .accordion-item:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
    border-color: #d1d5db;
}

.service-accordion .accordion-button {
    width: 100%;
    text-align: left;
    background: transparent;
    border: none;
    padding: 20px 24px;
    font-size: 1.1rem;
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: color 0.3s ease, background-color 0.3s ease;
}

/* Remove Bootstrap default outline */
.service-accordion .accordion-button:focus {
    outline: none;
    box-shadow: none;
}

.service-accordion .accordion-button.active {
    color: #954044;
    /* Primary accent color */
    background-color: #f8faff;
}

/* Custom Animated Chevron */
.service-accordion .accordion-button::after {
    content: "";
    display: inline-block;
    width: 10px;
    height: 10px;
    border-right: 2px solid #6c757d;
    border-bottom: 2px solid #6c757d;
    transform: translateY(-2px) rotate(45deg);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.3s ease;
}

.service-accordion .accordion-button.active::after {
    transform: translateY(2px) rotate(-135deg);
    border-color: #954044;
}

/* Smooth CSS Grid Height Animation */
.service-accordion .accordion-collapse {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease;
}

.service-accordion .accordion-collapse.show {
    grid-template-rows: 1fr;
    opacity: 1;
}

/* Inner wrapper required for grid animation to work */
.service-accordion .accordion-collapse-inner {
    overflow: hidden;
}

.service-accordion .accordion-body {
    padding: 0 24px 24px 24px;
    color: #555;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* ===== LIBRARY SERVICES PAGE ===== */
.library-container {
    max-width: 100%;
    width: 100%;
    padding: 0 24px;
    margin: 0 auto;
    box-sizing: border-box;
}

@media (min-width: 1200px) {
    .library-container {
        padding: 0 40px;
    }
}

@media (min-width: 1920px) {
    .library-container {
        padding: 0 80px;
    }
}

/* Professional Table CSS */
.library-table-wrapper {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    /* Ensures rounded corners contain the table */
    background: #ffffff;
    margin: 40px 0;
}

.table-responsive {
    overflow-x: auto;
}

.library-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    white-space: nowrap;
}

.library-table thead tr {
    background-color: var(--gold);
    /* Elegant dark blue */
    color: #ffffff;
    text-align: left;
}

.library-table th {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.library-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: top;
    color: #4a4a4a;
    line-height: 1.6;
}

.library-table tbody tr {
    transition: background-color 0.2s ease-in-out;
}

.library-table tbody tr:hover {
    background-color: #f8f9fc;
}

.library-table tbody tr:last-of-type td {
    border-bottom: none;
}

/* Styling for specific columns */
.staff-list,
.phone-list {
    margin: 0;
    padding: 0;
    list-style-type: none;
}

.staff-list li {
    margin-bottom: 4px;
}

.staff-title {
    color: #534733;
    font-size: 0.85rem;
    font-weight: 600;
}

/* Facebook Button */
.btn-fb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #1877F2;
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-fb:hover {
    background-color: #145dbf;
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(24, 119, 242, 0.3);
}

.number-highlight {
    font-weight: 600;
    color: #2c3e50;
}

/* Professional Table CSS */
.library-table-wrapper {
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border-radius: 12px;
    overflow: hidden;
    background: #ffffff;
    margin: 40px 0;
}

.table-responsive {
    overflow-x: auto;
}

.library-table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.library-table thead tr {
    background-color: var(--gold);
    /* Set to gold as requested */
    color: #ffffff;
    text-align: left;
}

.library-table th {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.library-table td {
    padding: 16px 20px;
    border-bottom: 1px solid #f0f2f5;
    vertical-align: top;
    color: #4a4a4a;
    line-height: 1.6;
}

.library-table tbody tr {
    transition: background-color 0.2s ease-in-out;
}

.library-table tbody tr:hover {
    background-color: #f1f8e9;
    /* Light green hover */
}

.library-table tbody tr:last-of-type td {
    border-bottom: none;
}

/* Doctor Details Formatting */
.doc-name {
    font-weight: 600;
    color: #2e7d32;
    display: block;
    margin-bottom: 5px;
}

.doc-phone {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #e8f5e9;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #1b5e20;
}

/* Opening Hours Formatting */
.time-badge {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 6px;
    padding-left: 15px;
    position: relative;
}

.time-badge::before {
    content: '•';
    position: absolute;
    left: 0;
    color: #4caf50;
    font-size: 1.2rem;
    line-height: 1;
}

.closed-badge {
    color: #d32f2f;
    font-weight: 500;
}

.closed-badge::before {
    color: #d32f2f;
}

/* Sub Office Link */
.sub-office-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: #1976d2;
    text-decoration: none;
    font-weight: 500;
    margin-top: 8px;
    font-size: 0.9rem;
}

.sub-office-link:hover {
    text-decoration: underline;
    color: #1565c0;
}

/* Gallery Section */
.gallery-section {
    background: #f8f9fa;
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.section-title {
    color: #2e7d32;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 25px;
    text-align: center;
}