/* ========================================
   DR. PIMENTA'S DENTAL BLOG - STYLESHEET
   ======================================== */

:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #ccfbf1;
    --accent: #f97316;
    --accent-hover: #ea580c;
    --text: #1e293b;
    --text-light: #64748b;
    --text-lighter: #94a3b8;
    --bg: #ffffff;
    --bg-warm: #fafaf9;
    --bg-cool: #f8fafc;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 4px 12px rgba(0,0,0,0.06);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.08);
    --radius: 12px;
    --radius-sm: 8px;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-head: 'Playfair Display', Georgia, serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--primary); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--primary-dark); }

/* ========================================
   HEADER
   ======================================== */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border-light);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(12px);
    background: rgba(255,255,255,0.92);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 28px;
    line-height: 1;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-title {
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    line-height: 1.2;
}

.logo-subtitle {
    font-size: 11px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.main-nav a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
}

.main-nav a:hover {
    background: var(--bg-cool);
    color: var(--text);
}

.main-nav a.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-cta {
    background: var(--primary) !important;
    color: white !important;
    margin-left: 8px;
}

.nav-cta:hover {
    background: var(--primary-dark) !important;
    color: white !important;
}

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* ========================================
   HERO
   ======================================== */
.blog-hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 80px 24px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
}

.blog-hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(255,255,255,0.03);
    border-radius: 50%;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 640px;
    margin: 0 auto;
}

.hero-label {
    display: inline-block;
    background: rgba(255,255,255,0.15);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 20px;
    backdrop-filter: blur(4px);
}

.blog-hero h1 {
    font-family: var(--font-head);
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 700;
    line-height: 1.15;
    margin-bottom: 20px;
}

.blog-hero p {
    font-size: 18px;
    opacity: 0.85;
    max-width: 520px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========================================
   BLOG WRAPPER
   ======================================== */
.blog-wrapper {
    display: flex;
    gap: 48px;
    max-width: 1200px;
    margin: -40px auto 80px;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

#blog-feed {
    flex: 1;
    min-width: 0;
}

/* ========================================
   POST CARDS (Feed)
   ======================================== */
.blog-post {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 32px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.blog-post:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.post-image {
    width: 100%;
    height: 280px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary-light), var(--bg-cool));
}

.post-image-placeholder {
    width: 100%;
    height: 280px;
    background: linear-gradient(135deg, var(--primary-light), #e0f2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 64px;
}

.post-content {
    padding: 28px 32px 32px;
}

.post-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}

.post-category {
    display: inline-block;
    background: var(--primary-light);
    color: var(--primary-dark);
    padding: 4px 12px;
    border-radius: 100px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.post-date {
    font-size: 13px;
    color: var(--text-lighter);
    font-weight: 500;
}

.post-readtime {
    font-size: 13px;
    color: var(--text-lighter);
    display: flex;
    align-items: center;
    gap: 4px;
}

.blog-post h2 {
    font-family: var(--font-head);
    font-size: 26px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 12px;
}

.blog-post h2 a {
    color: var(--text);
}

.blog-post h2 a:hover {
    color: var(--primary);
}

.post-excerpt {
    color: var(--text-light);
    font-size: 15px;
    line-height: 1.7;
    margin-bottom: 20px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
}

.read-more:hover {
    gap: 10px;
}

.read-more::after {
    content: '→';
    transition: var(--transition);
}

/* ========================================
   SIDEBAR
   ======================================== */
.blog-sidebar {
    width: 340px;
    flex-shrink: 0;
}

.widget {
    background: var(--bg);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.widget h3 {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--primary-light);
}

.widget-img {
    width: calc(100% + 48px);
    margin: -24px -24px 16px;
    height: 160px;
    object-fit: cover;
    border-radius: var(--radius) var(--radius) 0 0;
}

.widget p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 16px;
}

.widget-cta {
    display: block;
    width: 100%;
    text-align: center;
    background: var(--primary);
    color: white !important;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    margin-top: 12px;
}

.widget-cta:hover {
    background: var(--primary-dark);
}

/* Search Widget */
.search-box {
    display: flex;
    gap: 8px;
}

.search-box input {
    flex: 1;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    outline: none;
    transition: var(--transition);
}

.search-box input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.search-box button {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: 16px;
    transition: var(--transition);
}

.search-box button:hover {
    background: var(--primary-dark);
}

/* Categories */
.widget-categories ul {
    list-style: none;
}

.widget-categories li {
    border-bottom: 1px solid var(--border-light);
}

.widget-categories li:last-child {
    border-bottom: none;
}

.widget-categories a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    font-size: 14px;
    color: var(--text-light);
}

.widget-categories a:hover {
    color: var(--primary);
}

.widget-categories .cat-count {
    background: var(--bg-cool);
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-lighter);
}

/* Popular Posts */
.widget-popular ul {
    list-style: none;
}

.widget-popular li {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-light);
}

.widget-popular li:last-child {
    border-bottom: none;
}

.widget-popular a {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    line-height: 1.5;
}

.widget-popular a:hover {
    color: var(--primary);
}

.widget-popular .pop-date {
    font-size: 12px;
    color: var(--text-lighter);
    margin-top: 4px;
}

/* Newsletter */
.widget-newsletter form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.widget-newsletter input {
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-family: inherit;
    outline: none;
}

.widget-newsletter input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.widget-newsletter button {
    background: var(--accent);
    color: white;
    border: none;
    padding: 12px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.widget-newsletter button:hover {
    background: var(--accent-hover);
}

/* Book Widget */
.phone-link {
    display: block;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 12px;
}

/* ========================================
   SINGLE POST PAGE
   ======================================== */
.post-page {
    max-width: 800px;
    margin: 40px auto 60px;
    padding: 0 24px;
}

.post-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border-light);
}

.post-header .post-category {
    margin-bottom: 16px;
}

.post-header h1 {
    font-family: var(--font-head);
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
    color: var(--text);
}

.post-header-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    color: var(--text-light);
    font-size: 14px;
}

.post-header-meta .author {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text);
}

.post-header-meta .author-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.post-hero-image {
    width: 100%;
    max-height: 450px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 40px;
    box-shadow: var(--shadow);
}

.post-body {
    font-size: 17px;
    line-height: 1.85;
    color: var(--text);
}

.post-body p {
    margin-bottom: 24px;
}

.post-body h2 {
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 700;
    margin: 48px 0 20px;
    color: var(--text);
    line-height: 1.3;
}

.post-body h3 {
    font-family: var(--font-head);
    font-size: 22px;
    font-weight: 700;
    margin: 36px 0 16px;
    color: var(--text);
}

.post-body blockquote {
    border-left: 4px solid var(--primary);
    background: var(--bg-cool);
    padding: 24px 28px;
    margin: 32px 0;
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    font-style: italic;
    font-size: 18px;
    color: var(--text-light);
}

.post-body ul, .post-body ol {
    margin: 20px 0;
    padding-left: 28px;
}

.post-body li {
    margin-bottom: 10px;
}

.post-body img {
    border-radius: var(--radius-sm);
    margin: 32px 0;
    box-shadow: var(--shadow);
}

.post-body a {
    color: var(--primary);
    border-bottom: 1px solid var(--primary-light);
}

.post-body a:hover {
    border-bottom-color: var(--primary);
}

/* Post Footer */
.post-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid var(--border-light);
}

.post-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 32px;
}

.post-tags a {
    background: var(--bg-cool);
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 13px;
    color: var(--text-light);
}

.post-tags a:hover {
    background: var(--primary-light);
    color: var(--primary-dark);
}

/* Author Box */
.author-box {
    display: flex;
    gap: 20px;
    background: var(--bg-cool);
    padding: 28px;
    border-radius: var(--radius);
    margin-bottom: 32px;
}

.author-box-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 32px;
    flex-shrink: 0;
}

.author-box-info h4 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 6px;
}

.author-box-info .author-title {
    font-size: 13px;
    color: var(--primary);
    font-weight: 600;
    margin-bottom: 10px;
}

.author-box-info p {
    font-size: 14px;
    color: var(--text-light);
    line-height: 1.6;
}

/* Social Share */
.social-share {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.social-share span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-light);
}

.social-share a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-cool);
    font-size: 18px;
    transition: var(--transition);
}

.social-share a:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

/* ========================================
   RELATED POSTS
   ======================================== */
.related-posts {
    background: var(--bg-warm);
    padding: 60px 24px;
}

.related-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.related-posts h2 {
    font-family: var(--font-head);
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    margin-bottom: 40px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
}

.related-card {
    background: var(--bg);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

.related-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-3px);
}

.related-card img {
    width: 100%;
    height: 180px;
    object-fit: cover;
}

.related-card .placeholder-img {
    width: 100%;
    height: 180px;
    background: linear-gradient(135deg, var(--primary-light), #e0f2fe);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
}

.related-card-content {
    padding: 20px 24px 24px;
}

.related-card h3 {
    font-family: var(--font-head);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 8px;
}

.related-card h3 a {
    color: var(--text);
}

.related-card h3 a:hover {
    color: var(--primary);
}

.related-card .related-date {
    font-size: 12px;
    color: var(--text-lighter);
}

/* ========================================
   LOADING & EMPTY STATES
   ======================================== */
.loading-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-light);
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
}

.empty-state-icon {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.empty-state h3 {
    font-family: var(--font-head);
    font-size: 24px;
    margin-bottom: 8px;
}

.empty-state p {
    color: var(--text-light);
}

/* ========================================
   FOOTER
   ======================================== */
.site-footer {
    background: var(--text);
    color: white;
    padding: 60px 24px 30px;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-head);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 32px;
}

.footer-locations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.footer-locations strong {
    display: block;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    color: var(--primary-light);
}

.footer-locations p {
    font-size: 14px;
    line-height: 1.7;
    opacity: 0.8;
}

.footer-contact {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    margin-bottom: 32px;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-contact a {
    color: white;
    opacity: 0.8;
    font-size: 14px;
}

.footer-contact a:hover {
    opacity: 1;
    color: var(--primary-light);
}

.footer-copy {
    font-size: 13px;
    opacity: 0.5;
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

/* ========================================
   RESPONSIVE
   ======================================== */
@media (max-width: 1024px) {
    .blog-wrapper {
        flex-direction: column;
    }
    .blog-sidebar {
        width: 100%;
        order: 2;
    }
    .related-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
        position: absolute;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--bg);
        flex-direction: column;
        padding: 16px;
        border-bottom: 1px solid var(--border-light);
        box-shadow: var(--shadow);
    }
    .main-nav.active {
        display: flex;
    }
    .main-nav a {
        width: 100%;
        text-align: center;
        padding: 12px;
    }
    .nav-cta {
        margin-left: 0;
        margin-top: 8px;
    }
    .mobile-menu-btn {
        display: flex;
    }
    .blog-hero {
        padding: 60px 20px 80px;
    }
    .blog-hero h1 {
        font-size: 32px;
    }
    .post-content {
        padding: 20px 24px 24px;
    }
    .blog-post h2 {
        font-size: 22px;
    }
    .author-box {
        flex-direction: column;
        text-align: center;
    }
    .post-body {
        font-size: 16px;
    }
    .post-body h2 {
        font-size: 24px;
    }
}

/* ========================================
   UTILITY
   ======================================== */
.hidden { display: none !important; }
.fade-in { animation: fadeIn 0.5s ease; }
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}
