/* ============================================
   SMSONAYTR.COM BLOG - Styles
   ============================================ */

:root {
    --blog-primary: #0066cc;
    --blog-secondary: #00cc66;
    --blog-dark: #1a1a1a;
    --blog-light: #f8f9fa;
    --blog-gray: #6c757d;
    --blog-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    --blog-shadow-hover: 0 8px 25px rgba(0, 0, 0, 0.15);
    --blog-radius: 12px;
}

/* ============================================
   LAYOUT
   ============================================ */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.7;
    padding-top: 0;
    margin-top: 0;
    background-color: var(--blog-light);
}

.blog-main {
    min-height: calc(100vh - 300px);
    padding: 2rem 0;
    padding-top: 80px;
}

/* fixed-top navbar offset for main content */
main.container {
    padding-top: 60px;
}

/* ============================================
   NAVBAR
   ============================================ */

.blog-navbar {
    background: linear-gradient(135deg, var(--blog-primary) 0%, #0052a3 100%) !important;
    padding: 0.8rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.blog-navbar .navbar-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: #fff !important;
}

.blog-navbar .navbar-brand span {
    background: linear-gradient(135deg, #fff 0%, #e6f2ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.blog-navbar .nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem !important;
}

.blog-navbar .nav-link:hover,
.blog-navbar .nav-link.active {
    color: #fff !important;
}

/* ============================================
   BLOG HEADER / HERO
   ============================================ */

.blog-hero {
    background: linear-gradient(135deg, var(--blog-primary), #0052a3);
    color: #fff;
    padding: 3rem 0;
    margin-top: 0;
    margin-bottom: 2rem;
}

/* Footer link hover */
footer a.text-white-50:hover {
    color: #fff !important;
}

.blog-hero h1 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.blog-hero p {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* ============================================
   BLOG CARDS
   ============================================ */

.blog-card {
    border: none;
    border-radius: var(--blog-radius);
    overflow: hidden;
    box-shadow: var(--blog-shadow);
    transition: all 0.3s ease;
    height: 100%;
    background: #fff;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--blog-shadow-hover);
}

.blog-card .card-img-top {
    height: 200px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-card:hover .card-img-top {
    transform: scale(1.05);
}

.blog-card .card-img-wrapper {
    overflow: hidden;
    position: relative;
}

.blog-card .card-body {
    padding: 1.25rem;
}

.blog-card .card-title {
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card .card-title a {
    color: #222;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-card .card-title a:hover {
    color: var(--blog-primary);
}

.blog-card .card-text {
    color: var(--blog-gray);
    font-size: 0.9rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.blog-card .card-meta {
    font-size: 0.8rem;
    color: #999;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.blog-card .card-meta i {
    margin-right: 3px;
}

.blog-card .category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
}

/* Placeholder for posts without images */
.blog-card .no-image-placeholder {
    height: 200px;
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--blog-primary);
    font-size: 3rem;
}

/* ============================================
   SINGLE POST
   ============================================ */

.post-header {
    margin-bottom: 2rem;
}

.post-header h1 {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.3;
    color: #1a1a1a;
    margin-bottom: 1rem;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    color: var(--blog-gray);
    font-size: 0.9rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.post-meta i {
    margin-right: 4px;
    color: var(--blog-primary);
}

.post-featured-image {
    width: 100%;
    max-height: 500px;
    object-fit: cover;
    border-radius: var(--blog-radius);
    margin-bottom: 2rem;
    box-shadow: var(--blog-shadow);
}

/* Article Content */
.post-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #2d2d2d;
}

.post-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 2rem 0 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e3f2fd;
}

.post-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #333;
    margin: 1.5rem 0 0.75rem;
}

.post-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #444;
    margin: 1.25rem 0 0.5rem;
}

.post-content p {
    margin-bottom: 1rem;
}

.post-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1.5rem 0;
    display: block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.post-content figure {
    margin: 1.5rem 0;
    text-align: center;
}

.post-content figure img {
    margin: 0 auto 0.5rem;
}

.post-content figcaption {
    color: var(--blog-gray);
    font-size: 0.85rem;
    font-style: italic;
}

.post-content ul,
.post-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
}

.post-content li {
    margin-bottom: 0.4rem;
}

.post-content blockquote {
    border-left: 4px solid var(--blog-primary);
    background: #f0f7ff;
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #555;
}

.post-content a {
    color: var(--blog-primary);
    font-weight: 500;
    text-decoration: underline;
    text-decoration-color: rgba(0, 102, 204, 0.3);
    text-underline-offset: 2px;
    transition: all 0.3s;
}

.post-content a:hover {
    text-decoration-color: var(--blog-primary);
}

.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5rem 0;
    font-size: 0.95rem;
}

.post-content table th,
.post-content table td {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    text-align: left;
}

.post-content table th {
    background: #f0f7ff;
    font-weight: 600;
    color: #1a1a1a;
}

.post-content table tr:nth-child(even) {
    background: #fafafa;
}

.post-content code {
    background: #f1f3f5;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9rem;
    color: #c7254e;
}

.post-content pre {
    background: #2d2d2d;
    color: #f8f8f2;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.post-content pre code {
    background: none;
    color: inherit;
    padding: 0;
}

/* Article Recommendation Block */
.article-recommendation {
    background: linear-gradient(135deg, #e3f2fd, #f0f7ff);
    border: 1px solid #bbdefb;
    border-radius: var(--blog-radius);
    padding: 1.5rem;
    margin: 2rem 0;
}

.article-recommendation h3,
.article-recommendation h4 {
    color: var(--blog-primary) !important;
    border: none !important;
    margin-top: 0 !important;
    padding-bottom: 0 !important;
}

.article-recommendation a {
    font-weight: 600;
}

/* ============================================
   SOCIAL SHARING
   ============================================ */

.social-share {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.5rem 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    margin: 2rem 0;
    flex-wrap: wrap;
}

.social-share .label {
    font-weight: 600;
    font-size: 0.9rem;
    color: #555;
}

.social-share .btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.85rem;
    border-radius: 20px;
    padding: 0.35rem 1rem;
    transition: all 0.3s;
}

.social-share .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.15);
}

.social-share .btn-twitter {
    background: #1da1f2;
    border-color: #1da1f2;
    color: #fff;
}

.social-share .btn-facebook {
    background: #1877f2;
    border-color: #1877f2;
    color: #fff;
}

.social-share .btn-whatsapp {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}

.social-share .btn-linkedin {
    background: #0077b5;
    border-color: #0077b5;
    color: #fff;
}

.social-share .btn-copy {
    background: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

/* ============================================
   RELATED POSTS
   ============================================ */

.related-posts {
    margin-top: 3rem;
}

.related-posts h3 {
    font-size: 1.35rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--blog-primary);
    display: inline-block;
}

/* ============================================
   SEARCH RESULTS
   ============================================ */

.search-result-item {
    background: #fff;
    border-radius: var(--blog-radius);
    box-shadow: var(--blog-shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.search-result-item:hover {
    transform: translateY(-3px);
    box-shadow: var(--blog-shadow-hover);
}

.search-result-item img {
    width: 200px;
    height: 150px;
    object-fit: cover;
    flex-shrink: 0;
}

.search-highlight {
    background: #fff3cd;
    padding: 1px 3px;
    border-radius: 3px;
    font-weight: 600;
}

/* ============================================
   BREADCRUMB
   ============================================ */

.blog-breadcrumb {
    padding: 0.75rem 0;
    font-size: 0.85rem;
}

.blog-breadcrumb .breadcrumb {
    margin: 0;
    background: none;
    padding: 0;
}

.blog-breadcrumb .breadcrumb-item a {
    color: var(--blog-primary);
    text-decoration: none;
}

.blog-breadcrumb .breadcrumb-item a:hover {
    text-decoration: underline;
}

.blog-breadcrumb .breadcrumb-item.active {
    color: var(--blog-gray);
}

/* ============================================
   SIDEBAR
   ============================================ */

.sidebar .card {
    border: none;
    border-radius: var(--blog-radius);
}

.sidebar .card-title {
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #eee;
    color: #1a1a1a;
}

.sidebar .card-title i {
    color: var(--blog-primary);
    margin-right: 5px;
}

.sidebar .list-group-item {
    border: none;
    padding: 0.5rem 0;
}

.sidebar .list-group-item a {
    color: #555;
    font-weight: 500;
    transition: color 0.3s;
}

.sidebar .list-group-item a:hover {
    color: var(--blog-primary);
}

/* ============================================
   PAGINATION
   ============================================ */

.blog-pagination .page-link {
    border-radius: 8px !important;
    margin: 0 3px;
    border: 1px solid #dee2e6;
    color: var(--blog-primary);
    font-weight: 500;
    padding: 0.5rem 0.85rem;
    transition: all 0.3s;
}

.blog-pagination .page-link:hover {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
    color: #fff;
    transform: translateY(-2px);
}

.blog-pagination .page-item.active .page-link {
    background: var(--blog-primary);
    border-color: var(--blog-primary);
    color: #fff;
    box-shadow: 0 3px 10px rgba(0, 102, 204, 0.3);
}

.blog-pagination .page-item.disabled .page-link {
    color: #ccc;
}

/* ============================================
   FOOTER
   ============================================ */

.blog-footer {
    background: linear-gradient(135deg, #1a1a1a, #2d2d2d);
    color: #ccc;
    padding: 3rem 0 1.5rem;
    margin-top: 3rem;
}

.blog-footer h5 {
    color: #fff;
    font-weight: 700;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.blog-footer a {
    color: #adb5bd;
    text-decoration: none;
    transition: color 0.3s;
}

.blog-footer a:hover {
    color: var(--blog-secondary);
}

.blog-footer .footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    margin-top: 2rem;
    font-size: 0.85rem;
    color: #888;
}

/* ============================================
   TAGS
   ============================================ */

.tag-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag-item {
    display: inline-block;
    background: #e3f2fd;
    color: var(--blog-primary);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s;
}

.tag-item:hover {
    background: var(--blog-primary);
    color: #fff;
}

/* ============================================
   EMPTY STATE
   ============================================ */

.blog-empty {
    text-align: center;
    padding: 4rem 1rem;
}

.blog-empty i {
    font-size: 4rem;
    color: #dee2e6;
    margin-bottom: 1.5rem;
    display: block;
}

.blog-empty h3 {
    color: #6c757d;
    font-weight: 600;
}

.blog-empty p {
    color: #adb5bd;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 991.98px) {
    .blog-hero h1 {
        font-size: 1.7rem;
    }

    .post-header h1 {
        font-size: 1.6rem;
    }

    .blog-card .card-img-top {
        height: 180px;
    }

    .sidebar {
        margin-top: 2rem;
    }
}

@media (max-width: 767.98px) {
    body {
        padding-top: 70px;
    }

    .blog-hero {
        padding: 2rem 0;
    }

    .blog-hero h1 {
        font-size: 1.4rem;
    }

    .post-header h1 {
        font-size: 1.35rem;
    }

    .post-content {
        font-size: 1rem;
    }

    .post-content h2 {
        font-size: 1.3rem;
    }

    .post-content h3 {
        font-size: 1.1rem;
    }

    .search-result-item {
        flex-direction: column !important;
    }

    .search-result-item img {
        width: 100%;
        height: 180px;
    }

    .social-share {
        gap: 0.5rem;
    }

    .social-share .btn {
        font-size: 0.8rem;
        padding: 0.3rem 0.75rem;
    }

    .blog-card .card-img-top {
        height: 160px;
    }

    .blog-pagination .page-link {
        padding: 0.4rem 0.65rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 575.98px) {
    .blog-main {
        padding: 1rem 0;
    }

    .post-meta {
        gap: 0.75rem;
        font-size: 0.8rem;
    }

    .post-featured-image {
        border-radius: 8px;
        max-height: 300px;
    }
}
