/**
 * Blog Pages Styles - Safari Theme
 * Consistent color scheme across all blog views
 * 
 * Color Palette: Beige Safari Theme
 * Primary: #C7805C (Terracotta)
 * Secondary: #90B3A7 (Sage)
 * Accent: #D9B39B (Beige)
 * Dark: #3D3029
 * Cream: #F5F0E1
 */

/* ============ CSS VARIABLES ============ */
:root {
    --blog-primary: #C7805C;
    --blog-primary-dark: #A8684A;
    --blog-secondary: #90B3A7;
    --blog-secondary-dark: #7A9A8F;
    --blog-accent: #D9B39B;
    --blog-dark: #3D3029;
    --blog-cream: #F5F0E1;
    --blog-shadow: rgba(61, 48, 41, 0.08);
    --blog-shadow-hover: rgba(61, 48, 41, 0.15);
}

/* ============ BLOG SECTION ============ */
.blog-section,
.blog-single-section {
    background: var(--blog-cream);
    min-height: auto;
    padding: 60px 0;
}

/* ============ PAGE HEADERS ============ */
.page-title {
    font-size: clamp(2rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--blog-dark);
    margin-bottom: 10px;
}

.page-subtitle {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 30px;
}

.page-subtitle strong {
    color: var(--blog-primary);
}

/* ============ SEARCH BOX ============ */
.blog-search-box {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--blog-shadow);
}

.blog-search-box .form-control {
    border: 2px solid #e9ecef;
    padding: 12px 16px;
}

.blog-search-box .form-control:focus {
    border-color: var(--blog-primary);
    box-shadow: 0 0 0 4px rgba(199, 128, 92, 0.15);
}

.blog-search-box .btn-primary {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
}

.blog-search-box .btn-primary:hover {
    background: var(--blog-primary-dark);
    border-color: var(--blog-primary-dark);
}

/* ============ BLOG CARDS ============ */
.blog-posts-grid {
    display: grid;
    gap: 30px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px var(--blog-shadow);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 40px var(--blog-shadow-hover);
}

.blog-card-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-card-image img {
    transform: scale(1.1);
}

.blog-card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(61, 48, 41, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-card:hover .blog-card-overlay {
    opacity: 1;
}

.read-more {
    color: white;
    font-weight: 600;
    text-decoration: none;
    padding: 12px 24px;
    border: 2px solid white;
    border-radius: 50px;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.read-more:hover {
    background: white;
    color: var(--blog-primary);
}

.blog-card-content {
    padding: 25px;
}

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

.blog-category {
    display: inline-block;
    background: var(--blog-primary);
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

.blog-date {
    color: #999;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
}

.blog-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--blog-dark);
}

.blog-title a {
    color: var(--blog-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.blog-excerpt {
    color: #666;
    margin-bottom: 15px;
    line-height: 1.6;
}

.blog-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.blog-author {
    font-size: 0.9rem;
    color: #999;
}

.blog-read-more {
    color: var(--blog-primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.blog-read-more:hover {
    color: var(--blog-primary-dark);
}

/* ============ BLOG SINGLE ARTICLE ============ */
.blog-article {
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 4px 20px var(--blog-shadow);
}

.article-featured-image {
    margin: -40px -40px 30px -40px;
    border-radius: 12px 12px 0 0;
    overflow: hidden;
    height: 400px;
}

.article-featured-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
    border-bottom: 1px solid #eee;
    margin-bottom: 20px;
}

.meta-left {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.meta-left span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.95rem;
}

.meta-left a {
    color: var(--blog-primary);
    text-decoration: none;
}

.meta-left a:hover {
    text-decoration: underline;
}

.meta-right {
    color: #999;
    font-style: italic;
}

.article-title {
    font-size: clamp(2rem, 5vw, 2.8rem);
    font-weight: 800;
    color: var(--blog-dark);
    margin-bottom: 20px;
    line-height: 1.2;
}

/* ============ SOCIAL SHARE ============ */
.social-share {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: var(--blog-cream);
    border-radius: 8px;
    margin-bottom: 30px;
}

.social-share span {
    font-weight: 600;
    color: #666;
}

.share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.share-btn.fb { background: #1877F2; }
.share-btn.tw { background: #000; }
.share-btn.wa { background: #25D366; }
.share-btn.li { background: #0A66C2; }

.share-btn:hover {
    transform: translateY(-3px);
    color: white;
}

/* ============ ARTICLE CONTENT ============ */
.article-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #333;
    margin-bottom: 30px;
}

.article-content h2 {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--blog-dark);
    margin-top: 30px;
    margin-bottom: 15px;
}

.article-content h3 {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--blog-dark);
    margin-top: 25px;
    margin-bottom: 15px;
}

.article-content p {
    margin-bottom: 15px;
}

.article-content ul,
.article-content ol {
    margin-bottom: 15px;
    margin-left: 25px;
}

.article-content li {
    margin-bottom: 8px;
}

.article-content blockquote {
    border-left: 4px solid var(--blog-primary);
    padding-left: 20px;
    margin-left: 0;
    margin-bottom: 15px;
    color: #666;
    font-style: italic;
}

.article-content img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 8px;
}

.article-footer {
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.tags {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.tag {
    display: inline-block;
    background: var(--blog-cream);
    padding: 6px 12px;
    border-radius: 20px;
    color: var(--blog-primary);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.tag:hover {
    background: var(--blog-primary);
    color: white;
}

/* ============ RELATED POSTS ============ */
.related-posts {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--blog-shadow);
}

.related-posts .section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--blog-dark);
    margin-bottom: 25px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--blog-primary);
}

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

.related-post-card {
    background: var(--blog-cream);
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px var(--blog-shadow-hover);
}

.rp-image {
    height: 150px;
    overflow: hidden;
}

.rp-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.related-post-card:hover .rp-image img {
    transform: scale(1.1);
}

.rp-content {
    padding: 15px;
}

.rp-content h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.rp-content a {
    color: var(--blog-dark);
    text-decoration: none;
    transition: color 0.3s ease;
}

.rp-content a:hover {
    color: var(--blog-primary);
}

/* ============ PAGINATION ============ */
.blog-pagination {
    display: flex;
    justify-content: center;
}

.pagination {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 5px;
}

.page-item {
    display: inline-block;
}

.page-link {
    display: block;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    color: var(--blog-primary);
    text-decoration: none;
    transition: all 0.3s ease;
}

.page-link:hover {
    background: var(--blog-primary);
    color: white;
    border-color: var(--blog-primary);
}

.page-item.active .page-link {
    background: var(--blog-primary);
    color: white;
    border-color: var(--blog-primary);
}

/* ============ SIDEBAR ============ */
.sidebar-widget {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px var(--blog-shadow);
}

.sidebar-widget .btn-primary {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
}

.sidebar-widget .btn-primary:hover {
    background: var(--blog-primary-dark);
    border-color: var(--blog-primary-dark);
}

.sidebar-widget .form-control:focus {
    border-color: var(--blog-primary);
    box-shadow: 0 0 0 4px rgba(199, 128, 92, 0.15);
}

.widget-title {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--blog-dark);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 3px solid var(--blog-primary);
}

.category-list,
.latest-posts-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li,
.latest-posts-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.category-list li:last-child,
.latest-posts-list li:last-child {
    border-bottom: none;
}

.category-list li.active a {
    color: var(--blog-primary);
    font-weight: 600;
}

.category-list a,
.post-link {
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.category-list a:hover,
.post-link:hover {
    color: var(--blog-primary);
    padding-left: 5px;
}

.post-link {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.post-link strong {
    color: var(--blog-dark);
}

.latest-posts-list li {
    padding: 12px 0;
}

/* ============ CTA BOX ============ */
.cta-box {
    background: linear-gradient(135deg, var(--blog-primary) 0%, var(--blog-primary-dark) 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(199, 128, 92, 0.25);
    transition: all 0.3s ease;
}

.cta-box::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: pulse-glow 4s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); opacity: 0.5; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.cta-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 50px rgba(199, 128, 92, 0.35);
}

.cta-box .widget-title {
    color: white;
    border-bottom: 3px solid rgba(255,255,255,0.3);
    font-size: 1.35rem;
    position: relative;
    z-index: 1;
    margin-bottom: 15px;
    padding-bottom: 12px;
}

.cta-box .widget-title::before {
    content: '🦁';
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
}

.cta-box p {
    color: rgba(255,255,255,0.95);
    margin-bottom: 20px;
    font-size: 0.95rem;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.cta-box .btn,
.cta-box .btn-primary,
.cta-box .btn-cta-primary,
.sidebar-widget.cta-box a.btn.btn-primary {
    width: 100%;
    padding: 14px 24px !important;
    background: white !important;
    color: var(--blog-primary) !important;
    font-weight: 700;
    border: none !important;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.cta-box .btn::before {
    content: '📅';
    font-size: 1.1rem;
}

.cta-box .btn:hover,
.cta-box .btn-primary:hover,
.cta-box .btn-cta-primary:hover,
.sidebar-widget.cta-box a.btn.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(199, 128, 92, 0.4);
    background: var(--blog-accent) !important;
    color: var(--blog-primary-dark) !important;
}

/* ============ ALERTS ============ */
.blog-section .alert,
.blog-single-section .alert {
    background: var(--blog-cream);
    border: 1px solid var(--blog-accent);
    color: var(--blog-dark);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.blog-section .alert i,
.blog-single-section .alert i {
    font-size: 2rem;
    margin-right: 15px;
    opacity: 0.7;
}

.blog-section .alert a,
.blog-single-section .alert a {
    color: var(--blog-primary);
    text-decoration: underline;
}

.blog-section .alert a:hover,
.blog-single-section .alert a:hover {
    color: var(--blog-primary-dark);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .blog-search-box {
        padding: 15px;
    }

    .blog-card-image {
        height: 200px;
    }

    .page-title {
        font-size: 1.8rem;
    }

    .blog-article {
        padding: 20px;
    }

    .article-featured-image {
        margin: -20px -20px 20px -20px;
        height: 250px;
    }

    .article-meta {
        flex-direction: column;
        align-items: flex-start;
    }

    .article-title {
        font-size: 1.8rem;
    }

    .social-share {
        flex-direction: column;
    }

    .related-posts-grid {
        grid-template-columns: 1fr;
    }

    .article-content {
        font-size: 1rem;
    }
}

/* ============ BUTTON STYLING ============ */
.btn-primary,
.btn-primary:focus,
.btn-primary.focus {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
    color: white;
}

.btn-primary:hover {
    background: var(--blog-primary-dark);
    border-color: var(--blog-primary-dark);
    color: white;
}

.btn-primary:active,
.btn-primary.active,
.btn-primary:not(:disabled):not(.disabled):active {
    background: var(--blog-primary-dark);
    border-color: var(--blog-primary-dark);
    color: white;
}

.btn-search {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
    color: white;
    transition: all 0.3s ease;
}

.btn-search:hover {
    background: var(--blog-primary-dark);
    border-color: var(--blog-primary-dark);
    color: white;
}

.btn-cta-primary {
    background: linear-gradient(135deg, var(--blog-primary) 0%, var(--blog-primary-dark) 100%);
    border-color: var(--blog-primary);
    color: white;
    font-weight: 600;
}

.btn-cta-primary:hover {
    background: var(--blog-primary-dark);
    border-color: var(--blog-primary-dark);
    color: white;
    transform: translateY(-2px);
}
