:root {
  --primary-color: #0d9488;          /* Muted teal */
  --secondary-color: #115e59;        /* Deep teal */
  --accent-color: #d97706;           /* Warm amber (not too bright) */
  --danger-color: #b91c1c;           /* Deep muted red */
  --success-color: #166534;          /* Dark green */
  --warning-color: #ca8a04;          /* Mustard yellow */
  --light-color: #fefcf9;            /* Soft ivory */
  --dark-color: #1c1c1c;             /* Rich black */

  --gradient-primary: linear-gradient(135deg, #0d9488 0%, #14b8a6 100%);
  --gradient-accent: linear-gradient(135deg, #d97706 0%, #f59e0b 100%);
  --gradient-danger: linear-gradient(135deg, #b91c1c 0%, #ef4444 100%);

  --dark-bg: #111827;
  --dark-card: #1e293b;
  --dark-border: #374151;
  --dark-text: #f3f4f6;
  --dark-secondary-text: #9ca3af;
}

/* Home Blog Section & Slider Styles */
.blog-section {
    padding: 50px 20px;
    background: linear-gradient(135deg,#f8fafc 0%,#e2e8f0 100%);
    margin: 60px 0;
    border-radius: 24px;
}

.blog-slider-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 20px;
    isolation: isolate;
}

.blog-slider {
    display: flex;
    gap: 2rem;
    padding: 2rem 4rem 3rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    position: relative;
    z-index: 1;
}
.blog-slider::-webkit-scrollbar { display: none; }

.blog-card {
    flex: 0 0 360px;
    scroll-snap-align: start;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    /* box-shadow: 0 15px 40px rgba(0,0,0,0.08); */
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: block;
    position: relative;
    transform: translateZ(0);
    will-change: transform;
}

.dark-mode .blog-card{
    background: var(--dark-card);
    border: 1px solid var(--dark-secondary-text);
}

.blog-content { padding: 1.6rem; }
.blog-category {
    display:inline-block;
    background:var(--primary-color);
    color:white;
    padding:6px 12px;
    border-radius:999px;
    font-weight:600;
    font-size:.8rem;
    margin-bottom: .8rem;
}
.blog-content h3 { font-size:1.25rem; margin: .6rem 0; color:#0f172a; line-height:1.35; }

.dark-mode .blog-content h3{
    color: var(--dark-text);
}
.blog-content p { color:#64748b; font-size:.95rem; margin-bottom:.9rem; }

/* Nav buttons */
.slider-btn {
    --size: 50px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: var(--size);
    height: var(--size);
    border-radius: 50%;
    border: none;
    outline: none;
    background: rgba(255,255,255,0.95);
    cursor: pointer;
    font-size: 1.2rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
    display: grid;
    place-items: center;
    z-index: 9999;
    transition: transform .18s ease, background .18s ease;
    pointer-events: auto;
}

.slider-btn:focus { box-shadow: 0 0 0 4px rgba(13,148,136,0.12); }
.slider-btn:hover { transform: translateY(-50%) scale(1.06); background: var(--primary-color); color:#fff; }

#prevBlog { left: 10px; }
#nextBlog { right: 10px; }

.mobile-slider-indicator {
    display: none;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    gap: 20px;
    z-index: 9999;
}

.mobile-slider-indicator span {
    font-size: 1.2rem;
    color: var(--primary-color);
    background: rgba(255,255,255,0.9);
    padding: 6px 12px;
    border-radius: 30px;
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}

.mobile-slider-indicator span:hover {
    background: var(--primary-color);
    color: #fff;
}

.mobile-slider-bullets {
    display: none;
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    gap: 8px;
    display: flex;
    z-index: 9999;
}

.mobile-slider-bullets span {
    display: block;
    width: 10px;
    height: 10px;
    background: #94a3b8;
    border-radius: 50%;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.3s ease;
}

.mobile-slider-bullets span.active {
    background: var(--primary-color);
    transform: scale(1.2);
}

/* Blog Main and Detail Page styles */
/* Main container */
.breadcrumb {
    font-size: 0.95rem;
    margin-bottom: 18px;
    opacity: 0.85;
}
.breadcrumb a {
    text-decoration: none;
}
.dark-mode .breadcrumb a{
    color: var(--dark-secondary-text);
}
.breadcrumb-separator {
    margin: 0 6px;
}
.breadcrumb-current {
    font-weight: 500;
}

.blog-wrapper {
    display: flex;
    gap: 32px;
    align-items: flex-start;
    margin-top: 10px;
}
.blog-detail-main {
    width: 70%;
    font-size: 1.02rem;
    line-height: 1.8;
}
.dark-mode .blog-detail-main{
    color: var(--dark-secondary-text);
}
.blog-detail-main h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
    font-weight: 700;
}
.blog-meta {
    font-size: 0.9rem;
    opacity: 0.7;
    margin-bottom: 18px;
}
.blog-detail-main img {
    width: 100%;
    border-radius: 12px;
}
.blog-detail-main h2 {
    margin-top: 26px;
    margin-bottom: 10px;
    font-size: 1.4rem;
    font-weight: 600;
}
.dark-mode .blog-detail-main h2{
    color: var(--dark-text);
}
.blog-detail-main ul {
    margin: 10px 0 14px;
    padding-left: 22px;
}
.blog-detail-main ul li {
    list-style: inside;
}
.blog-detail-main ol li {
    list-style: auto;
}
.blog-container {
    display: flex;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 40px auto;
    padding: 10px;
    gap: 40px;
}

/* Main blog area */
.blog-main {
    flex: 1 1 600px;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

/* Blog card */
.blog-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}


.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

.blog-card img {
    width: 100%;
    object-fit: cover;
}

.blog-card-content {
    padding: 20px 10px;
}

.blog-card-content h4 {
    margin: 0 0 12px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--dark-color);
}
.dark-mode .blog-card-content h4{
    color: var(--dark-text);
}

.blog-card-content p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}
.dark-mode .blog-card-content p{
    color: var(--dark-secondary-text)
}

/* Sidebar */
.blog-sidebar {
    flex: 0 0 300px;
    min-width: 280px;
}

.sidebar-sticky {
    position: sticky;
    top: 100px;
}

.sidebar-widget {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05)
}
.dark-mode .sidebar-widget{
    background: var(--dark-bg);
    color: var(--dark-text)
}

.sidebar-widget h3 {
    font-size: 1.08rem;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
}
.dark-mode .sidebar-widget h3{
    color: var(--dark-text);
}

/* Search form */
.search-form {
    display: flex;
    gap: 0;
}

.search-form input {
    flex: 1;
    padding: 12px 5px;
    border: 1px solid #ddd;
    border-radius: 8px 0 0 8px;
    outline: none;
}
.dark-mode .search-form input{
    background-color: #2d2d2d;
    border-color: #444;
    color: var(--dark-text);
}

.search-form button {
    padding: 12px;
    background: var(--primary-color);
    color: var(--light-color);
    border: none;
    border-radius: 0 8px 8px 0;
    cursor: pointer;
    font-size: 1rem;
}

.search-form button:hover {
    background: var(--secondary-color);
}

/* Category list */
.category-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.category-list li {
    margin-bottom: 5px;
}

.category-list a {
    color: #007bff;
    text-decoration: none;
}

.category-list a:hover {
    text-decoration: underline;
}

/* Tag cloud */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tag-cloud a {
    background: var(--primary-color);
    color: white;
    padding: 8px 14px;
    border-radius: 30px;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.3s;
}
.dark-mode .tag-cloud a{
    background: var(--dark-card);
    border-color: var(--dark-border);
    color: var(--dark-text);
}

.tag-cloud a:hover {
    background: var(--secondary-color);
}
.dark-mode .tag-cloud a:hover{
    background: var(--dark-border);
}

.comement {
    float: right;
}

.blog-date {
    font-size:.85rem;
    color: #94a3b8;
    margin-top: 10px
}

.text-center {
    text-align: center
}

/* Ccustom Pagination*/
.custom-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 50px 0 20px;
    flex-wrap: wrap;
}

.custom-pagination .page-item {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-color, #ffffff);
    border: 1px solid var(--dark-secondary-text, #e2e8f0);
    border-radius: 10px;
    color: var(--primary-color);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.25s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.dark-mode .custom-pagination .page-item{
    background: var(--dark-bg, #ffffff);
    color: var(--dark-text)
}

.custom-pagination .page-item:hover:not(.disabled):not(.active) {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.1);
    border-color: var(--dark-border);
}

.custom-pagination .page-item.active {
    background: var(--primary-color);
    color: var(--light-color);
    border-color: var(--primary-color);
    cursor: default;
}

.custom-pagination .page-item.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    box-shadow: none;
}

.custom-pagination .page-item svg {
    opacity: 0.8;
}

.custom-pagination .page-item:hover svg {
    opacity: 1;
}

/* Related Secion */
.related-section {
    margin-top: 38px;
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
    margin-top: 12px;
}
.related-card {
    border-radius: 14px;
    overflow: hidden;
    border: 1px solid var(--dark-border);
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background: rgba(255,255,255,0.96);
}
body.dark-mode .related-card {
    background: var(--dark-card);
}
.related-card img {
    width: 100%;
    height: auto;
    object-fit: cover;
}
.related-card-content {
    padding: 10px 12px 12px;
}
.related-card h4 {
    margin: 4px 0 4px;
    font-size: 1rem;
}
.dark-mode .related-card h4{
    color: var(--dark-text);
}
.related-card p {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.85;
}
.dark-mode .related-card p{
    color: var(--dark-secondary-text);
}
.related-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 35px rgba(0,0,0,0.12);
}

/* Comments Section */
.comments-section {
    margin-top: 40px;
}

.comments-section h2 {
    font-size: 1.6rem;
    font-weight: 600;
}

.comments-list {
    margin-bottom: 30px;
}

.comment-item {
    padding: 20px 0;
    border-bottom: 1px solid #ededed;
}

.comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 10px;
}

.comment-avatar {
    width: 48px;
    height: 48px;
    background: #e2e8f0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.1rem;
    color: #4a5568;
    flex-shrink: 0;
}

.comment-meta {
    line-height: 1.4;
}

.comment-author {
    font-weight: 600;
    font-size: 1.05rem;
}
.dark-mode .comment-author{
    color: var(--dark-text);
}

.comment-date {
    font-size: 0.85rem;
    opacity: 0.7;
}

.comment-message {
    margin-left: 62px;
    line-height: 1.7;
    font-size: 1.02rem;
    opacity: 0.95;
}

/* Comment Form */
.comment-form-wrapper h3 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    font-weight: 600;
}
.dark-mode .comment-form-wrapper h3{
    color: var(--dark-text);
}

.comment-form {
    padding: 24px;
    border-radius: 12px;
    border: 1px solid #e3e3e3;
    box-shadow: 0 4px 20px rgba(0,0,0,0.07);
}
.dark-mode .comment-form{
    background: var(--dark-bg);
}

.comment-form-grid {
    display: grid;
    /* grid-template-columns: 1fr 1fr; */
    gap: 16px;
    margin-bottom: 16px;
}

.comment-form input,
.comment-form textarea {
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #ededed;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: transparent;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.dark-mode .comment-form input,
.comment-form textarea{
    color: var(--dark-text);
}

.comment-form input:focus,
.comment-form textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.15);
}

.comment-form textarea {
    color: var(--dark-color);
    resize: vertical;
    min-height: 120px;
    margin-bottom: 20px;
}

.comment-form button {
    padding: 13px 28px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.comment-form button:hover {
    background: var(--secondary-color);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(0, 123, 255, 0.25);
}
.dark-mode .comment-form button:hover{
    background: var(--secondary-color);
    color: var(--dark-text);
}

.comment-form button:active {
    transform: translateY(0);
}

.alert-success{
    display: none;
    margin-top: 20px;
    padding: 14px;
    background: #d4edda;
    color: #155724;
    border-radius: 8px;
    border: 1px solid #c3e6cb;
}

.alert-danger{
    display: none;
    margin-top: 20px;
    padding: 14px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 8px;
    border: 1px solid #f5c6cb;
}

svg {
    margin-top: 0;
}

/* Custom Styles Ends */

/* Responsive styles */
@media (max-width: 992px) {
    
}

@media (max-width: 900px) {
    .blog-main, .blog-detail-main, .blog-sidebar {
        width: 100%;
        flex: 0 0 240px;
        padding-left: 0;
        border-left: none;
    }
    .blog-container, .blog-wrapper {
        flex-direction: column;
    }
}

@media (max-width: 768px) {
    .mobile-slider-bullets span {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 475px) {
    .mobile-slider-bullets span {
        width: 7px;
        height: 7px;
    }
    
    .blog-section {
        padding: 50px 10px;
    }
}

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

    .mobile-slider-bullets span {
        width: 5px;
        height: 5px;
    }
}
