/* ===================================
   CUSTOM BLOG STYLES - CodingKey
   =================================== */

/* Reset & Base */
* {
    box-sizing: border-box;
}

/* ===================================
   BLOG ARCHIVE (MAIN PAGE) STYLES
   =================================== */

.blog-archive-wrapper {
    background: #ffffff;
    min-height: 100vh;
}

/* Hero Section */
.blog-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 100px 20px;
    text-align: center;
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="10" cy="10" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.blog-hero .container {
    position: relative;
    z-index: 2;
}

.blog-hero-title {
    font-size: 56px;
    font-weight: 700;
    margin: 0 0 20px 0;
    line-height: 1.2;
    letter-spacing: -1px;
}

.blog-hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
}

/* Blog Cards Section */
.blog-cards-section {
    padding: 80px 20px;
    background: #f8f9fa;
}

.blog-cards-section .container,
.elementor-banner-section .container,
.elementor-after-cards .container {
    max-width: 1120px!important;
    margin: 0 auto;
    width: 100%;
}

.blog-cards-slider {
    padding-bottom: 36px;
}

.blog-cards-slider .swiper-wrapper {
    align-items: stretch;
}

.blog-cards-slider .swiper-slide {
    height: auto;
    display: flex;
}

.blog-cards-slider .blog-card {
    width: 100%;
}

.blog-slider-pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
    width: 100%;
}

.blog-slider-pagination .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #d1d5db;
    opacity: 1;
    margin: 0;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.blog-slider-pagination .swiper-pagination-bullet-active {
    background: #6178f4;
    width: 10px;
    height: 10px;
}

/* Blog Card */
.blog-card {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

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

.blog-card-image {
    position: relative;
    overflow: hidden;
    height: 180px;
    background: #eef2f6;
}

.blog-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.blog-card-category {
    display: inline-block;
    color: #42b4c8;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 10px;
}

.blog-card-content {
    padding: 20px 20px 22px;
    background: #ffffff;
}

.blog-card-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px 0;
    line-height: 1.4;
    min-height: 50px;
}

.blog-card-title a {
    color: #1a202c;
    text-decoration: none;
    transition: color 0.3s ease;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-title a:hover {
    color: #667eea;
}

.blog-card-excerpt {
    font-size: 14px;
    line-height: 1.65;
    color: #636b7a;
    margin: 0 0 14px 0;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-date {
    display: inline-block;
    font-size: 13px;
    color: #7a8594;
    font-weight: 500;
    margin-bottom: 12px;
}

.blog-card-link {
    color: #6178f4;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.blog-card-link:hover {
    color: #4a5dd6;
    gap: 8px;
}

.blog-card-link svg {
    transition: transform 0.3s ease;
}

.blog-card-link:hover svg {
    transform: translateX(4px);
}

/* No Posts Message */
.no-posts {
    text-align: center;
    padding: 60px 20px;
    color: #718096;
}

.no-posts p {
    font-size: 18px;
    margin: 0;
}

/* Pagination */
.blog-pagination {
    display: flex;
    justify-content: center;
    margin-top: 40px;
}

.blog-pagination ul {
    display: flex;
    gap: 12px;
    list-style: none;
    padding: 0;
    margin: 0;
    align-items: center;
}

.blog-pagination li {
    margin: 0;
}

.blog-pagination a,
.blog-pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
    border-radius: 12px;
    background: #ffffff;
    color: #4a5568;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.blog-pagination a:hover {
    background: #667eea;
    color: #ffffff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.blog-pagination .current {
    background: #667eea;
    color: #ffffff;
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.blog-pagination .prev,
.blog-pagination .next {
    font-size: 0;
}

.blog-pagination .prev svg,
.blog-pagination .next svg {
    width: 20px;
    height: 20px;
}

/* ===================================
   SINGLE POST PAGE STYLES
   =================================== */

.single-post-wrapper {
    background: #ffffff;
}

/* Hero Section */
.single-post-hero {
    position: relative;
    background: #1a202c;
    color: #ffffff;
    overflow: hidden;
    min-height: 500px;
    display: flex;
    align-items: center;
}

.single-post-hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.single-post-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.single-post-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.85) 0%, rgba(118, 75, 162, 0.85) 100%);
    z-index: 2;
}

.single-post-hero .container {
    position: relative;
    z-index: 3;
}

.single-post-hero-content {
    padding: 120px 20px 80px;
    max-width: 900px;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 14px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.breadcrumbs a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
}

.breadcrumbs a:hover {
    color: #ffffff;
}

.breadcrumbs a svg {
    width: 16px;
    height: 16px;
}

.breadcrumbs .separator {
    color: rgba(255, 255, 255, 0.5);
    margin: 0 4px;
}

.breadcrumbs .current {
    color: #ffffff;
    font-weight: 600;
}

/* Title */
.single-post-title {
    font-size: 52px;
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 36px 0;
    letter-spacing: -1px;
}

/* Meta Information */
.single-post-meta {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
}

.meta-item svg {
    width: 20px;
    height: 20px;
    opacity: 0.9;
}

.meta-value {
    font-weight: 600;
}

/* Content Section */
.single-post-content {
    padding: 80px 20px;
    background: #ffffff;
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
}

.content-wrapper p {
    font-size: 18px;
    line-height: 1.8;
    color: #2d3748;
    margin: 0 0 28px 0;
}

.content-wrapper h1,
.content-wrapper h2 {
    font-size: 36px;
    font-weight: 700;
    margin: 56px 0 28px 0;
    color: #1a202c;
    line-height: 1.3;
}

.content-wrapper h3 {
    font-size: 28px;
    font-weight: 600;
    margin: 44px 0 20px 0;
    color: #2d3748;
    line-height: 1.4;
}

.content-wrapper h4 {
    font-size: 22px;
    font-weight: 600;
    margin: 36px 0 18px 0;
    color: #2d3748;
}

.content-wrapper ul,
.content-wrapper ol {
    margin: 0 0 28px 0;
    padding-left: 32px;
}

.content-wrapper li {
    font-size: 18px;
    line-height: 1.8;
    color: #2d3748;
    margin-bottom: 12px;
}

.content-wrapper img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 40px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.content-wrapper blockquote {
    border-left: 5px solid #667eea;
    padding: 24px 32px;
    margin: 40px 0;
    background: #f7fafc;
    border-radius: 0 8px 8px 0;
    font-size: 20px;
    font-style: italic;
    color: #4a5568;
}

.content-wrapper blockquote p:last-child {
    margin-bottom: 0;
}

.content-wrapper a {
    color: #667eea;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.content-wrapper a:hover {
    color: #764ba2;
}

.content-wrapper code {
    background: #f0f4f8;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 16px;
    color: #e53e3e;
    font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
}

.content-wrapper pre {
    background: #2d3748;
    color: #f7fafc;
    padding: 28px;
    border-radius: 12px;
    overflow-x: auto;
    margin: 40px 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.content-wrapper pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: 15px;
    line-height: 1.6;
}

.content-wrapper table {
    width: 100%;
    border-collapse: collapse;
    margin: 40px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

.content-wrapper th,
.content-wrapper td {
    padding: 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

.content-wrapper th {
    background: #667eea;
    color: #ffffff;
    font-weight: 600;
}

.content-wrapper tr:last-child td {
    border-bottom: none;
}

/* Tags Section */
.single-post-tags {
    padding: 48px 20px;
    background: #f8f9fa;
}

.tags-wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.tags-wrapper svg {
    color: #667eea;
    flex-shrink: 0;
}

.tags-label {
    font-weight: 700;
    color: #2d3748;
    font-size: 16px;
}

.tags-list {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.tags-list a {
    background: #ffffff;
    color: #667eea;
    padding: 10px 20px;
    border-radius: 24px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    border: 2px solid #e2e8f0;
    transition: all 0.3s ease;
}

.tags-list a:hover {
    background: #667eea;
    color: #ffffff;
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

/* Author Bio */
.author-bio {
    padding: 60px 20px;
    background: #ffffff;
}

.author-bio-wrapper {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    gap: 28px;
    padding: 36px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.author-avatar {
    flex-shrink: 0;
}

.author-avatar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.author-info {
    flex: 1;
}

.author-name {
    font-size: 22px;
    font-weight: 700;
    margin: 0 0 12px 0;
    color: #1a202c;
}

.author-description {
    font-size: 16px;
    line-height: 1.7;
    color: #4a5568;
    margin: 0;
}

/* Post Navigation */
.post-navigation {
    padding: 60px 20px;
    background: #f8f9fa;
    border-top: 1px solid #e2e8f0;
}

.nav-links {
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.nav-link {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 28px;
    background: #ffffff;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid #e2e8f0;
}

.nav-link:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 8px 30px rgba(102, 126, 234, 0.2);
}

.nav-label {
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #718096;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-label svg {
    width: 20px;
    height: 20px;
}

.nav-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a202c;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.nav-link.prev-post {
    text-align: left;
}

.nav-link.next-post {
    text-align: right;
}

.nav-link.next-post .nav-label {
    justify-content: flex-end;
}

/* ===================================
   RESPONSIVE STYLES
   =================================== */

@media (max-width: 1024px) {
    .blog-hero-title {
        font-size: 48px;
    }
    
    .single-post-title {
        font-size: 42px;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 80px 20px;
    }
    
    .blog-hero-title {
        font-size: 36px;
    }
    
    .blog-hero-subtitle {
        font-size: 18px;
    }
    
    .blog-cards-section {
        padding: 60px 20px;
    }
    
    .blog-card-title {
        min-height: auto;
    }
    
    .single-post-hero {
        min-height: 400px;
    }
    
    .single-post-hero-content {
        padding: 80px 20px 60px;
    }
    
    .single-post-title {
        font-size: 32px;
    }
    
    .single-post-meta {
        gap: 20px;
    }
    
    .single-post-content {
        padding: 60px 20px;
    }
    
    .content-wrapper p,
    .content-wrapper li {
        font-size: 17px;
    }
    
    .content-wrapper h1,
    .content-wrapper h2 {
        font-size: 28px;
        margin: 44px 0 24px 0;
    }
    
    .content-wrapper h3 {
        font-size: 22px;
        margin: 36px 0 18px 0;
    }
    
    .author-bio-wrapper {
        flex-direction: column;
        text-align: center;
        padding: 28px;
    }
    
    .author-avatar {
        margin: 0 auto;
    }
    
    .nav-links {
        grid-template-columns: 1fr;
    }
    
    .nav-link.next-post {
        text-align: left;
    }
    
    .nav-link.next-post .nav-label {
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 60px 20px;
    }
    
    .blog-hero-title {
        font-size: 28px;
    }
    
    .blog-hero-subtitle {
        font-size: 16px;
    }
    
    .blog-cards-section {
        padding: 40px 20px;
    }
    
    .blog-card-content {
        padding: 16px;
    }
    
    .blog-card-title {
        font-size: 18px;
    }
    
    .blog-card-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .single-post-hero-content {
        padding: 60px 20px 40px;
    }
    
    .single-post-title {
        font-size: 24px;
    }
    
    .single-post-meta {
        flex-direction: column;
        gap: 12px;
        align-items: flex-start;
    }
    
    .single-post-content {
        padding: 40px 20px;
    }
    
    .content-wrapper p,
    .content-wrapper li {
        font-size: 16px;
    }
    
    .content-wrapper h1,
    .content-wrapper h2 {
        font-size: 24px;
    }
    
    .content-wrapper h3 {
        font-size: 20px;
    }
    
    .content-wrapper blockquote {
        padding: 20px;
        font-size: 18px;
    }
    
    .tags-wrapper {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .author-bio-wrapper {
        padding: 24px;
    }
    
    .nav-link {
        padding: 20px;
    }
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-center {
    text-align: center;
}

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 20px; }
.mb-2 { margin-bottom: 20px; }
.mt-4 { margin-top: 40px; }
.mb-4 { margin-bottom: 40px; }

/* ===================================
   PRINT STYLES
   =================================== */

@media print {
    .blog-hero,
    .blog-pagination,
    .single-post-tags,
    .author-bio,
    .post-navigation {
        display: none;
    }
    
    .single-post-content {
        padding: 20px 0;
    }
    
    .content-wrapper a {
        text-decoration: underline;
        color: #000;
    }
}
