/* ============================================
   PetsFilled Custom Styles
   Only add what you NEED, nothing extra
   ============================================ */

/* 1. UPDATE NOTICE - Keep it simple */
.update-notice {
    background: #e7f7ed;
    border-left: 4px solid #28a745;
    padding: 12px 15px;
    margin: 20px 0;
    border-radius: 3px;
    color: #155724;
}

.update-notice p {
    margin: 0;
}

/* 2. PRINT BUTTON - Simple and clean */
.print-container {
    text-align: center;
    margin: 25px 0;
}

.print-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: all 0.3s ease;
}

.print-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.print-hint {
    color: #666;
    font-size: 13px;
    margin-top: 8px;
}

/* 3. SOCIAL SHARE - Minimal */
.social-share {
    margin: 30px 0;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.social-share h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
}

.social-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.social-button {
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
}

.facebook {
    background: #3b5998;
}

.twitter {
    background: #000000;
}

.email {
    background: #ea4335;
}

/* 4. MOBILE FIXES - Essential only */
@media (max-width: 768px) {
    /* Touch targets */
    .print-button,
    .social-button {
        min-height: 44px;
        min-width: 44px;
        padding: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .social-buttons {
        grid-template-columns: repeat(2, 1fr);
        display: grid;
        gap: 8px;
    }
    
    .social-button {
        width: 100%;
        text-align: center;
    }
    
    /* Adjust spacing */
    .update-notice {
        margin: 15px 0;
        padding: 10px;
    }
    
    .print-container {
        margin: 20px 0;
    }
}

/* 5. PRINT STYLES - Hide non-essential */
@media print {
    .update-notice,
    .print-container,
    .social-share {
        display: none !important;
    }
}

/* ============================================
   ADDITIONAL FEATURES
   ============================================ */

/* TABLE OF CONTENTS */
.toc-container {
    background: #f8f9fa;
    border: 2px solid #2980b9;
    border-radius: 10px;
    padding: 20px;
    margin: 30px 0;
}

.toc-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.toc-icon {
    background: #2980b9;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: bold;
    margin-right: 12px;
}

.toc-title {
    margin: 0;
    color: #2c3e50;
    font-size: 20px;
}

.toc-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 10px;
}

.toc-item {
    display: block;
    padding: 8px 0;
    text-decoration: none;
    color: #2c3e50;
    border-left: 3px solid transparent;
    transition: all 0.3s;
}

.toc-item:hover {
    border-left-color: #2980b9;
    padding-left: 10px;
    background: rgba(41, 128, 185, 0.05);
}

.toc-level-2 {
    font-weight: bold;
}

.toc-level-3 {
    padding-left: 20px;
    font-size: 14px;
}

.toc-tip {
    margin-top: 15px;
    font-size: 13px;
    color: #666;
    border-top: 1px solid #ddd;
    padding-top: 10px;
}

/* RELATED POSTS */
.related-container {
    margin: 40px 0;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border-left: 5px solid #2980b9;
}

.related-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 15px;
}

.related-icon {
    background: #2980b9;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 20px;
}

.related-title {
    margin: 0;
    color: #2c3e50;
    font-size: 22px;
}

.related-subtitle {
    margin: 5px 0 0 0;
    color: #666;
    font-size: 15px;
}

.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.related-post {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-post:hover {
    transform: translateY(-5px);
}

.related-image {
    height: 160px;
    background-size: cover;
    background-position: center;
}

.related-content {
    padding: 18px;
}

.related-content h4 {
    margin: 0 0 10px 0;
    color: #2c3e50;
    font-size: 17px;
    line-height: 1.4;
}

.related-meta {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: #7f8c8d;
}

.related-footer {
    text-align: center;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.related-all-button {
    display: inline-block;
    background: #2980b9;
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    transition: all 0.3s;
}

.related-all-button:hover {
    background: #1c5d87;
    transform: translateY(-2px);
}

/* MOBILE FIXES */
@media (max-width: 768px) {
    .related-grid {
        grid-template-columns: 1fr;
    }
    
    .toc-list {
        max-height: 250px;
    }
    
    .related-container {
        padding: 20px 15px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .related-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* PRINT HIDING */
@media print {
    .toc-container,
    .related-container {
        display: none !important;
    }
}

/* ============================================
   FINAL FIXES
   ============================================ */

/* Ensure images don't overflow */
.related-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fix for older browsers */
.toc-list::-webkit-scrollbar {
    width: 8px;
}

.toc-list::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.toc-list::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.toc-list::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Ensure proper spacing after content */
.social-share {
    clear: both;
}

/* Fix for print */
@media print {
    body * {
        visibility: hidden;
    }
    
    .print-container,
    .social-share,
    .toc-container,
    .related-container,
    .update-notice {
        display: none !important;
    }
    
    #content,
    .entry-content,
    .post-content {
        visibility: visible;
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }
}