/**
 * GCCU Blog Styles
 * Extends main site styles
 */

/* Blog Container Layout */
.blog-container {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}

@media (max-width: 991.98px) {
    .blog-container {
        grid-template-columns: 1fr;
    }
}

/* Blog Header */
.blog-hero {
    background: linear-gradient(rgba(30, 107, 107, 0.85), rgba(22, 85, 85, 0.9)),
                url('https://images.unsplash.com/photo-1434030216411-0b793f4b4173?w=1920&q=80') center/cover no-repeat;
    min-height: 250px;
}

/* Post Cards */
.post-card {
    background: #fff;
    border-radius: 1rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

.post-card-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    background-color: #e5e7eb;
    background-size: cover;
    background-position: center;
}

.post-card-content {
    padding: 1.5rem;
}

/* Category Badge */
.post-category {
    display: inline-block;
    background: #1E6B6B;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    text-decoration: none;
    transition: background 0.2s ease;
}

.post-category:hover {
    background: #165555;
    color: white;
}

/* Post Title */
.post-title {
    font-size: 1.5rem;
    color: #1f2937;
    margin-bottom: 0.5rem;
    font-weight: 700;
    line-height: 1.3;
}

.post-title a {
    color: inherit;
    text-decoration: none;
}

.post-title a:hover {
    color: #1E6B6B;
}

/* Post Meta */
.post-meta {
    color: #6b7280;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.post-meta i {
    margin-right: 0.25rem;
}

.post-meta span {
    margin-right: 1rem;
}

/* Post Excerpt */
.post-excerpt {
    color: #4b5563;
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Tags */
.post-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.tag {
    background: #f3f4f6;
    color: #4b5563;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.8rem;
    text-decoration: none;
    transition: all 0.2s ease;
}

.tag:hover {
    background: #C9922E;
    color: white;
}

/* Read More Button */
.read-more-btn {
    display: inline-flex;
    align-items: center;
    color: #1E6B6B;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.read-more-btn:hover {
    color: #C9922E;
}

.read-more-btn i {
    margin-left: 0.5rem;
    transition: transform 0.2s ease;
}

.read-more-btn:hover i {
    transform: translateX(3px);
}

/* Read More Toggle (expand article) */
.read-more-toggle {
    display: block;
    width: 100%;
    padding: 1rem;
    background: linear-gradient(to bottom, rgba(248,249,250,0) 0%, rgba(248,249,250,1) 100%);
    border: none;
    color: #1E6B6B;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    margin-top: -3rem;
    position: relative;
    z-index: 10;
}

.read-more-toggle:hover {
    color: #C9922E;
}

/* Share Buttons */
.share-buttons {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 2rem 0;
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-radius: 0.75rem;
    flex-wrap: wrap;
}

.share-label {
    font-weight: 500;
    color: #4b5563;
    margin-right: 0.5rem;
}

.share-btn {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.share-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: white;
}

.share-btn.whatsapp { background: #25D366; }
.share-btn.facebook { background: #1877F2; }
.share-btn.linkedin { background: #0A66C2; }
.share-btn.twitter { background: #000; }
.share-btn.copy { background: #6b7280; }

/* Sidebar */
.blog-sidebar {
    position: sticky;
    top: 100px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
}

.sidebar-widget {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

.sidebar-widget h4 {
    color: #1f2937;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid #C9922E;
    font-weight: 700;
}

/* Categories Widget */
.categories-widget ul li {
    margin-bottom: 0.5rem;
}

.categories-widget ul li a {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #4b5563;
    text-decoration: none;
    padding: 0.5rem 0;
    transition: color 0.2s ease;
}

.categories-widget ul li a:hover {
    color: #1E6B6B;
}

/* Tags Widget */
.tags-widget .tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Recent Posts Widget */
.recent-posts-widget ul li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #e5e7eb;
}

.recent-posts-widget ul li:last-child {
    border-bottom: none;
}

.recent-posts-widget ul li a {
    color: #1f2937;
    text-decoration: none;
    font-weight: 500;
    line-height: 1.4;
}

.recent-posts-widget ul li a:hover {
    color: #1E6B6B;
}

/* CTA Widget */
.cta-widget {
    background: linear-gradient(135deg, #1E6B6B, #165555);
    color: white;
}

.cta-widget h4 {
    color: white;
    border-bottom-color: #C9922E;
}

.cta-widget p {
    opacity: 0.9;
    margin-bottom: 1rem;
}

/* Search Form */
.search-form .input-group {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border-radius: 0.5rem;
    overflow: hidden;
}

.search-form .form-control {
    border: none;
    padding: 0.75rem 1rem;
}

.search-form .btn {
    padding: 0.75rem 1rem;
}

/* Feedback Form */
.post-feedback {
    background: #f8f9fa;
    padding: 2rem;
    border-radius: 1rem;
    margin-top: 3rem;
}

.post-feedback h3 {
    margin-bottom: 0.5rem;
}

.feedback-form {
    margin-top: 1.5rem;
}

.feedback-form .form-label {
    font-weight: 500;
    color: #374151;
}

.feedback-form .form-control,
.feedback-form .form-select {
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
}

.feedback-form .form-control:focus,
.feedback-form .form-select:focus {
    border-color: #1E6B6B;
    box-shadow: 0 0 0 3px rgba(30, 107, 107, 0.1);
}

/* Pagination */
.pagination-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin: 2rem 0;
    padding: 1rem;
}

.pagination-wrapper a,
.pagination-wrapper span {
    padding: 0.5rem 1rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    text-decoration: none;
    color: #1f2937;
    font-weight: 500;
    transition: all 0.2s ease;
}

.pagination-wrapper a:hover {
    background: #1E6B6B;
    color: white;
}

.pagination-wrapper .current {
    background: #1E6B6B;
    color: white;
}

.pagination-wrapper .disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Single Post */
.single-post-content {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.06);
}

.single-post-content .post-featured-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 0.75rem;
    margin-bottom: 1.5rem;
}

.single-post-content .post-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #374151;
}

.single-post-content .post-body h2 {
    margin-top: 2rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.single-post-content .post-body h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.single-post-content .post-body p {
    margin-bottom: 1.25rem;
}

.single-post-content .post-body ul,
.single-post-content .post-body ol {
    margin-bottom: 1.25rem;
    padding-left: 1.5rem;
}

.single-post-content .post-body li {
    margin-bottom: 0.5rem;
}

.single-post-content .post-body a {
    color: #1E6B6B;
    text-decoration: underline;
}

.single-post-content .post-body a:hover {
    color: #C9922E;
}

/* Related Posts */
.related-posts {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 2px solid #e5e7eb;
}

.related-posts h3 {
    margin-bottom: 1.5rem;
}

.related-post-card {
    background: #f8f9fa;
    border-radius: 0.75rem;
    padding: 1.25rem;
    height: 100%;
    transition: background 0.2s ease;
}

.related-post-card:hover {
    background: #f3f4f6;
}

.related-post-card h5 {
    margin-bottom: 0.5rem;
}

.related-post-card h5 a {
    color: #1f2937;
    text-decoration: none;
}

.related-post-card h5 a:hover {
    color: #1E6B6B;
}

/* No Posts Message */
.no-posts {
    text-align: center;
    padding: 4rem 2rem;
    background: #f8f9fa;
    border-radius: 1rem;
}

.no-posts i {
    font-size: 3rem;
    color: #9ca3af;
    margin-bottom: 1rem;
}

/* Search Highlight */
mark {
    background: #fef08a;
    padding: 0.1rem 0.2rem;
    border-radius: 2px;
}

/* Copy Link Success */
.copy-success {
    position: fixed;
    bottom: 100px;
    right: 20px;
    background: #059669;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    z-index: 9999;
    animation: fadeInOut 2s ease;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(20px); }
    20% { opacity: 1; transform: translateY(0); }
    80% { opacity: 1; transform: translateY(0); }
    100% { opacity: 0; transform: translateY(-20px); }
}

/* Responsive Adjustments */
@media (max-width: 767.98px) {
    .blog-container {
        padding: 1rem;
    }

    .post-card-image {
        height: 180px;
    }

    .post-title {
        font-size: 1.25rem;
    }

    .single-post-content {
        padding: 1.25rem;
    }

    .single-post-content .post-body {
        font-size: 1rem;
    }

    .share-buttons {
        padding: 1rem;
    }

    .post-feedback {
        padding: 1.5rem;
    }
}
