/*
Theme Name: Nam Khoa Sài Gòn by TPO
Author: TPO
Description: Theme cho Phòng Khám Nam Khoa Sài Gòn
Version: 1.0
*/

/* Unify border radius as per user request */
.rounded-2xl, .glass-card, .widget-sidebar, .service-card-shimmer {
    border-radius: 1rem !important;
}

/* Luxury Pen Circling Effect */
@keyframes drawCircle {
    from { stroke-dashoffset: 800; }
    to { stroke-dashoffset: 0; }
}

.tpo-active-circle {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    transition: opacity 0.3s ease, stroke 0.3s ease;
    filter: drop-shadow(0 0 1px rgba(var(--primary-rgb), 0.1));
    stroke: var(--primary-color); /* Hover Color: Dynamic Primary */
}

/* Trigger animation on hover or active */
.group:hover .tpo-active-circle,
.is-active .tpo-active-circle {
    opacity: 1;
    animation: drawCircle 1.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) forwards;
}

/* Specific Active Color: More prominent secondary/accent */
.is-active .tpo-active-circle {
    stroke: var(--secondary-color); /* Active Color: Dynamic Secondary */
    stroke-width: 2;
}

.tpo-active-circle-wrap {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.group:hover .tpo-active-circle-wrap,
.is-active .tpo-active-circle-wrap {
    opacity: 1;
}

/* Premium Scrollbar for FAQ */
.tpo-home-faq-items-container {
    scrollbar-width: thin;
    scrollbar-color: #2A7823 rgba(255, 255, 255, 0.05);
}

.tpo-home-faq-items-container::-webkit-scrollbar {
    width: 5px;
}
.tpo-home-faq-items-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 10px;
}
.tpo-home-faq-items-container::-webkit-scrollbar-thumb {
    background: #2A7823; /* Solid green for visibility */
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.tpo-home-faq-items-container::-webkit-scrollbar-thumb:hover {
    background: #16A14A; /* Brighter accent on hover */
}

/* Pill-Style Tabs for Footer Form */
.footer-form-tabs {
    background: rgba(255, 255, 255, 0.1) !important;
    padding: 5px !important;
    border-radius: 9999px !important;
    display: flex !important;
    gap: 4px !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}
.footer-form-tab {
    flex: 1 !important;
    padding: 10px 20px !important;
    border-radius: 9999px !important;
    font-weight: 800 !important;
    font-size: 13px !important;
    text-transform: uppercase !important;
    transition: all 0.3s ease !important;
    color: rgba(255, 255, 255, 0.6) !important;
    border: none !important;
    background: transparent !important;
    cursor: pointer !important;
    outline: none !important;
}
.footer-form-tab.active {
    background: #2A7823 !important; /* Exact green from image */
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}
.footer-form-tab:not(.active):hover {
    color: #ffffff !important;
}

/* =======================================================
   CSS ÉP BUỘC HIỂN THỊ CHUẨN CHO NỘI DUNG BÀI VIẾT
   Sử dụng !important để ghi đè mọi thiết lập lỗi của theme
======================================================= */

/* Cài đặt tổng thể cho toàn bộ vùng bài viết */
main > article {
    font-family: 'Be Vietnam Pro', sans-serif !important;
    font-size: 17px !important;
    line-height: 1.65 !important;
    color: #2c3338 !important;
}

/* Ép giãn dòng cho các đoạn văn bản (Quan trọng nhất) */
main > article p {
    line-height: 1.65 !important;
    margin-bottom: 24px !important;
}

/* Định dạng hệ thống Tiêu đề (Headings) */
main > article h1,
main > article h2, 
main > article h3, 
main > article h4 {
    font-family: 'Be Vietnam Pro', sans-serif !important;
    color: #111111 !important;
    line-height: 1.4 !important;
    font-weight: 700 !important;
    margin-top: 40px !important;
    margin-bottom: 16px !important;
}

main > article h1 { font-size: 28px !important; }
main > article h2 { font-size: 24px !important; }
/* main > article h2 { font-size: 24px !important; border-bottom: 1px solid #eeeeee; padding-bottom: 8px; } */
main > article h3 { font-size: 20px !important; }

/* Định dạng Danh sách (Bullets & Numbers) - Thường bị dính dòng */
main > article ul, 
main > article ol {
    margin-bottom: 24px !important;
    padding-left: 24px !important;
}

main > article li {
    line-height: 1.65 !important;
    margin-bottom: 12px !important;
}

/* Định dạng Bảng biểu (Tables) */
main > article table {
    width: 100% !important;
    border-collapse: collapse !important;
    margin-bottom: 24px !important;
}

main > article th, 
main > article td {
    border: 1px solid #dddddd !important;
    padding: 12px 16px !important;
    line-height: 1.6 !important;
}

main > article th {
    background-color: #f8f9fa !important;
    font-weight: 600 !important;
}

/* Định dạng hình ảnh và chú thích */
main > article img {
    max-width: 100% !important;
    height: auto !important;
    border-radius: 8px !important;
    margin: 32px auto 16px !important;
    display: block !important;
}

main > article figcaption,
main > article .wp-caption-text {
    text-align: center !important;
    font-size: 14.5px !important;
    color: #666666 !important;
    font-style: italic !important;
    margin-bottom: 32px !important;
}

/* Định dạng Link liên kết */
main > article a {
    color: #0056b3 !important;
    text-decoration: none !important;
    font-weight: 500 !important;
}

main > article a:hover {
    color: #cc0000 !important;
    text-decoration: underline !important;
}

/* =======================================================
   SỬA LỖI HÌNH ẢNH BỊ BUNG KHUNG CHỨA DO WORDPRESS
======================================================= */

/* Trị thẻ cha (figure, .wp-caption) đang bị gán width cứng */
main > article figure, 
main > article .wp-caption {
    max-width: 100% !important;
    width: auto !important; /* Ghi đè cái style="width: 800px" của WordPress */
    height: auto !important;
    margin-left: auto !important;
    margin-right: auto !important;
    display: block !important;
}

/* Đảm bảo ảnh bên trong luôn nằm gọn gàng */
main > article img {
    max-width: 100% !important;
    height: auto !important;
    width: auto !important; /* Ép ảnh không được vượt quá kích thước gốc và khung chứa */
    display: block !important;
    margin: 16px auto !important;
}
