/* ===============================
   GLOBAL & VARIABLES (Mobile First)
================================ */
:root {
    --primary-color: #002b5c; 
    --accent-color: #0d6efd; 
    --accent-light: #eff6ff; 
    --text-dark: #111827;
    --text-gray: #4b5563;
    --text-light: #6b7280;
    --border-color: #e5e7eb;
    --bg-light: #f9fafb;
    --white: #ffffff;
    --radius-lg: 16px;
    --radius-md: 8px;
    --radius-sm: 4px;
    --shadow-md: 0 2px 4px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-hover: 0 6px 10px -3px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.blog-hero *,
.blog-hero-inner *,
.blog-filter-bar *,
.blog-section *,
.blog-card * {
    box-sizing: border-box;
}

.tdo-blog {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-dark);
    line-height: 1.5;
}

.tdo-blog { 
    width: 100%; 
}

.container {
    width: 100%;
    max-width: 1560px;
    margin: 0 auto;
    padding: 0 10px;
}

/* ===============================
   HERO SECTION ("Our Articles")
================================ */
.blog-hero {
    background-color: var(--white);
    background-size: cover;
    background-position: left center; /* Shifts image right so text sits on white space */
    background-repeat: no-repeat;
    padding: 40px 4vw;
    border-bottom: 1px solid var(--border-color);
    position: relative;
    min-height: 40vh; /* Takes up 50% of screen height */
    display: flex;
    align-items: center;
}
.blog-hero-overlay {
    display: none;
}
.blog-hero-inner {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    padding: 0 2vw;
}
.blog-hero-content {
    width: 100%;
    max-width: 600px;
    margin: 0;
}
.blog-hero-subtitle {
    display: block;
    color: var(--accent-color);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 10px;
}
.blog-hero-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.2;
}
.blog-hero-desc {
    font-size: 16px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* ===============================
   FILTER BAR (Categories)
================================ */
.blog-filter-bar {
    padding: 20px 0;
    background: var(--bg-light);
}
.blog-filter-inner {
    display: flex;
    flex-direction: column;
    align-items: center; /* Centered */
    justify-content: center;
}
.blog-categories-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    gap: 12px;
}
.category-label {
    font-size: 14px;
    color: var(--text-gray);
    font-weight: 500;
    display: none; /* Hidden on mobile to save space */
}
.blog-categories {
    display: flex;
    list-style: none;
    gap: 8px;
    width: 100%;
    overflow-x: auto;
    white-space: nowrap;
    padding-bottom: 10px;
    justify-content: flex-start;
    -webkit-overflow-scrolling: touch;
}
/* Hide scrollbar */
.blog-categories::-webkit-scrollbar { display: none; }
.blog-categories { -ms-overflow-style: none; scrollbar-width: none; }

.blog-categories li a {
    display: block;
    padding: 8px 16px;
    background: var(--white);
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    border-radius: 20px;
    border: 1px solid var(--border-color);
    transition: 0.3s ease;
}
.blog-categories li a:hover {
    background: var(--bg-light);
    border-color: #d1d5db;
}
.blog-categories li a.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* ===============================
   BLOG SECTION & GRID
================================ */
.blog-section { padding: 20px 0 60px; }
.blog-section h2 { display: none; }
.blog-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

/* ===============================
   BLOG CARD
================================ */
.blog-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}
.blog-card-image-wrapper {
    display: block;
    width: 100%;
    height: 200px;
    overflow: hidden;
}
.blog-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.blog-card:hover .blog-image { transform: scale(1.05); }

.blog-card-content {
    padding: 20px 20px 10px;
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.blog-category-badge {
    display: inline-block;
    background: var(--accent-light);
    color: var(--accent-color);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: var(--radius-sm);
    margin-bottom: 12px;
    letter-spacing: 0.5px;
}
.blog-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 10px;
}
.blog-card-title a { color: var(--text-dark); text-decoration: none; transition: 0.3s; }
.blog-card-title a:hover { color: var(--accent-color); }

.blog-card-excerpt {
    color: var(--text-gray);
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.blog-card-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
}
.blog-card-meta {
    font-size: 12px;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 6px;
}
.meta-separator { font-size: 10px; }
.blog-read-more {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--primary-color);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: 0.3s;
}
.blog-read-more:hover { color: var(--accent-color); }
.read-more-arrow { transition: transform 0.3s; }
.blog-read-more:hover .read-more-arrow { transform: translateX(4px); }

/* ===============================
   PAGINATION
================================ */
.blog-pagination {
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}
.blog-pagination .page-numbers {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-md);
    background: var(--white);
    color: var(--text-dark);
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border-color);
    transition: 0.3s;
}
.blog-pagination .page-numbers:hover { border-color: var(--text-light); }
.blog-pagination .page-numbers.current {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

/* ===============================
   TABLET (768px and up)
================================ */
@media (min-width: 768px) {
    .blog-hero { 
        padding: 100px 0; 
        background-position: center; /* Bring the toothbrush back on larger screens */
    }
    .blog-hero-title { font-size: 48px; }
    .blog-hero-inner {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
    .container {
    padding: 0 2vw;
}

    .blog-filter-bar { padding: 30px 0; }
    .blog-categories-wrapper {
        flex-direction: row;
        justify-content: center;
    }
    .category-label { display: inline-block; }
    .blog-categories {
        width: auto;
        justify-content: center;
        flex-wrap: wrap;
        padding-bottom: 0;
        overflow-x: visible;
    }
    
    .blog-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
    .blog-card-image-wrapper { height: 220px; }
    .blog-card-content { padding: 25px 25px 15px; }
    .blog-card-title { font-size: 22px; }
    .blog-card-excerpt { font-size: 15px; }
    .blog-card-footer { padding: 20px 25px; }
}

/* ===============================
   DESKTOP (1024px and up)
================================ */
@media (min-width: 1024px) {
    .blog-hero { padding: 100px 0; }
    .blog-hero-title { font-size: 56px; }
    .blog-hero-desc { font-size: 18px; }
    .container {
    padding: 0 2vw;
}

    .blog-grid { grid-template-columns: repeat(3, 1fr); gap: 35px; }
    .blog-card-image-wrapper { height: 240px; }
}