/* ========================================
   Von Bastik Tattoo Studio - Blog Styles
   ======================================== */

/* --- Utility Classes --- */
.hidden {
    display: none !important;
}

/* --- Blog Hero --- */
.blog-hero {
    position: relative;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
    overflow: hidden;
}

.blog-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background:
        radial-gradient(ellipse at 20% 50%, rgba(201, 169, 110, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 50%, rgba(201, 169, 110, 0.05) 0%, transparent 50%);
    z-index: 1;
}

.blog-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('public/images/banner.jpg') center/cover no-repeat;
    opacity: 0.15;
    z-index: 0;
}

.blog-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2rem;
}

.blog-hero-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.blog-hero-subtitle {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    color: #999;
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.8;
}

/* --- Blog Filters --- */
.blog-filters-section {
    border-bottom: 1px solid #1a1a1a;
}

.blog-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

.filter-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: transparent;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    color: #888;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover {
    border-color: #c9a96e;
    color: #c9a96e;
    background: rgba(201, 169, 110, 0.05);
}

.filter-btn.active {
    border-color: #c9a96e;
    color: #0a0a0a;
    background: #c9a96e;
}

.filter-btn i {
    font-size: 0.8rem;
}

/* --- Blog Grid --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* --- Blog Card --- */
.blog-card {
    background: #111;
    border: 1px solid #1a1a1a;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.4s ease;
    opacity: 0;
    transform: translateY(30px);
}

.blog-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.blog-card:hover {
    border-color: #c9a96e;
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.blog-card-image {
    position: relative;
    width: 100%;
    height: 220px;
    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.05);
}

.blog-card-category {
    position: absolute;
    top: 1rem;
    left: 1rem;
    padding: 0.3rem 0.8rem;
    background: #c9a96e;
    color: #0a0a0a;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 3px;
}

.blog-card-body {
    padding: 1.5rem;
}

.blog-card-meta {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.blog-card-date {
    font-size: 0.8rem;
    color: #666;
}

.blog-card-date i {
    margin-right: 0.3rem;
    color: #c9a96e;
}

.blog-card-read-time {
    font-size: 0.8rem;
    color: #666;
}

.blog-card-read-time i {
    margin-right: 0.3rem;
    color: #c9a96e;
}

.blog-card-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.15rem;
    font-weight: 600;
    color: #e5e5e5;
    line-height: 1.4;
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card:hover .blog-card-title {
    color: #c9a96e;
}

.blog-card-excerpt {
    font-size: 0.9rem;
    color: #888;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
}

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

.blog-card-author {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.blog-card-author-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
}

.blog-card-author-name {
    font-size: 0.8rem;
    color: #999;
}

.blog-card-link {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: #c9a96e;
    font-size: 0.8rem;
    font-weight: 600;
    transition: gap 0.3s ease;
}

.blog-card:hover .blog-card-link {
    gap: 0.6rem;
}

/* --- Featured Card (first post) --- */
.blog-card.featured {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.blog-card.featured .blog-card-image {
    height: 100%;
    min-height: 350px;
}

.blog-card.featured .blog-card-body {
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.blog-card.featured .blog-card-title {
    font-size: 1.5rem;
    -webkit-line-clamp: 3;
}

.blog-card.featured .blog-card-excerpt {
    -webkit-line-clamp: 4;
}

/* --- Loading State --- */
.blog-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 4rem 0;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    position: relative;
}

.loading-spinner .spinner {
    width: 100%;
    height: 100%;
    border: 3px solid #1a1a1a;
    border-top-color: #c9a96e;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* --- Error State --- */
.blog-error {
    text-align: center;
    padding: 4rem 2rem;
}

.blog-error .error-icon {
    font-size: 3rem;
    color: #c9a96e;
    margin-bottom: 1rem;
}

.blog-error h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    color: #e5e5e5;
    margin-bottom: 0.5rem;
}

.blog-error p {
    color: #888;
    margin-bottom: 1.5rem;
}

/* --- No Posts State --- */
.blog-no-posts {
    text-align: center;
    padding: 4rem 2rem;
}

.blog-no-posts .no-posts-icon {
    font-size: 3rem;
    color: #333;
    margin-bottom: 1rem;
}

.blog-no-posts h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.3rem;
    color: #e5e5e5;
    margin-bottom: 0.5rem;
}

.blog-no-posts p {
    color: #888;
}

/* --- Load More --- */
.blog-load-more {
    text-align: center;
    padding: 3rem 0;
}

.load-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.8rem 2rem;
    background: transparent;
    border: 2px solid #c9a96e;
    color: #c9a96e;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.load-more-btn:hover {
    background: #c9a96e;
    color: #0a0a0a;
}

/* --- Newsletter --- */
.newsletter-form {
    max-width: 500px;
    margin: 0 auto;
}

.newsletter-input-wrap {
    display: flex;
    gap: 0;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    overflow: hidden;
}

.newsletter-input-wrap input {
    flex: 1;
    padding: 0.9rem 1.2rem;
    background: #111;
    border: none;
    color: #e5e5e5;
    font-size: 0.9rem;
    outline: none;
}

.newsletter-input-wrap input::placeholder {
    color: #555;
}

.newsletter-input-wrap input:focus {
    background: #1a1a1a;
}

.newsletter-btn {
    padding: 0.9rem 1.5rem;
    background: #c9a96e;
    border: none;
    color: #0a0a0a;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.newsletter-btn:hover {
    background: #d4b87a;
}

.newsletter-btn i {
    margin-right: 0.4rem;
}

/* --- Blog Modal --- */
.blog-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.3s ease, visibility 0.3s ease, pointer-events 0.3s ease;
}

.blog-modal.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.blog-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.9);
    transition: opacity 0.3s ease;
}

.blog-modal.active .blog-modal-overlay {
    opacity: 1;
}

.blog-modal .blog-modal-overlay {
    opacity: 0;
}

.blog-modal-content {
    position: relative;
    width: 90%;
    max-width: 900px;
    max-height: 90vh;
    background: #111;
    border: 1px solid #2a2a2a;
    border-radius: 8px;
    overflow-y: auto;
    z-index: 1;
    transform: translateY(30px);
    transition: transform 0.3s ease;
}

.blog-modal.active .blog-modal-content {
    transform: translateY(0);
}

.blog-modal-close {
    position: sticky;
    top: 1rem;
    float: right;
    margin-right: 1rem;
    width: 40px;
    height: 40px;
    background: rgba(10, 10, 10, 0.8);
    border: 1px solid #2a2a2a;
    border-radius: 50%;
    color: #e5e5e5;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}

.blog-modal-close:hover {
    border-color: #c9a96e;
    color: #c9a96e;
    background: rgba(201, 169, 110, 0.1);
}

.blog-modal-body {
    padding: 0;
}

.blog-modal-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.blog-modal-header {
    padding: 2rem;
    border-bottom: 1px solid #1a1a1a;
}

.blog-modal-category {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background: #c9a96e;
    color: #0a0a0a;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 3px;
    margin-bottom: 1rem;
}

.blog-modal-title {
    font-family: 'Space Grotesk', sans-serif;
    font-size: clamp(1.3rem, 3vw, 2rem);
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
    margin-bottom: 1rem;
}

.blog-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    color: #888;
    font-size: 0.85rem;
}

.blog-modal-meta i {
    margin-right: 0.3rem;
    color: #c9a96e;
}

.blog-modal-content-inner {
    padding: 2rem;
}

.blog-modal-content-inner .content {
    font-size: 1rem;
    line-height: 1.8;
    color: #ccc;
}

.blog-modal-content-inner .content p {
    margin-bottom: 1.5rem;
}

.blog-modal-content-inner .content h2 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.4rem;
    color: #fff;
    margin: 2rem 0 1rem;
}

.blog-modal-content-inner .content h3 {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 1.2rem;
    color: #fff;
    margin: 1.5rem 0 0.75rem;
}

.blog-modal-content-inner .content ul,
.blog-modal-content-inner .content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.blog-modal-content-inner .content li {
    margin-bottom: 0.5rem;
}

.blog-modal-content-inner .content blockquote {
    border-left: 3px solid #c9a96e;
    padding-left: 1.5rem;
    margin: 1.5rem 0;
    color: #999;
    font-style: italic;
}

.blog-modal-content-inner .content a {
    color: #c9a96e;
    text-decoration: underline;
}

.blog-modal-content-inner .content strong {
    color: #e5e5e5;
    font-weight: 700;
}

.blog-modal-content-inner .content em {
    color: #999;
    font-style: italic;
}

.blog-modal-content-inner .content hr {
    border: none;
    border-top: 1px solid rgba(201,169,110,0.2);
    margin: 2rem 0;
}

.blog-modal-content-inner .content img {
    border-radius: 4px;
    margin: 1.5rem 0;
}

/* --- Share Buttons --- */
.blog-modal-share {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 2rem;
    border-top: 1px solid #1a1a1a;
    flex-wrap: wrap;
}

.blog-modal-share-label {
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.8rem;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.blog-modal-share-label i {
    color: #c9a96e;
    margin-right: 0.4rem;
}

.blog-modal-share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #2a2a2a;
    border-radius: 4px;
    background: transparent;
    color: #666;
    cursor: pointer;
    transition: all 0.25s ease;
    font-size: 0.95rem;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.share-whatsapp:hover {
    border-color: #25D366;
    color: #25D366;
    background: rgba(37, 211, 102, 0.08);
}

.share-twitter:hover {
    border-color: #e5e5e5;
    color: #e5e5e5;
    background: rgba(229, 229, 229, 0.08);
}

.share-facebook:hover {
    border-color: #1877F2;
    color: #1877F2;
    background: rgba(24, 119, 242, 0.08);
}

.share-copy:hover,
.share-copy.share-copied {
    border-color: #c9a96e;
    color: #c9a96e;
    background: rgba(201, 169, 110, 0.08);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .blog-card.featured {
        grid-template-columns: 1fr;
    }

    .blog-card.featured .blog-card-image {
        min-height: 250px;
    }
}

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

    .blog-hero {
        min-height: 40vh;
    }

    .blog-hero-title {
        font-size: 1.8rem;
    }

    .blog-filters {
        gap: 0.5rem;
    }

    .filter-btn {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .blog-card-body {
        padding: 1.2rem;
    }

    .blog-card.featured .blog-card-body {
        padding: 1.5rem;
    }

    .blog-modal-content {
        width: 95%;
        max-height: 95vh;
    }

    .blog-modal-header {
        padding: 1.5rem;
    }

    .blog-modal-content-inner {
        padding: 1.5rem;
    }

    .blog-modal-share {
        padding: 1rem 1.5rem;
    }

    .newsletter-input-wrap {
        flex-direction: column;
    }

    .newsletter-btn {
        padding: 0.9rem;
    }

    .desktop-nav {
        display: none !important;
    }

    .desktop-nav .nav-link.active-blog {
        color: #c9a96e !important;
        font-weight: 600;
    }
}

@media (max-width: 480px) {
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

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

    .blog-card-meta {
        flex-wrap: wrap;
        gap: 0.5rem;
    }
}
