/* AEM Labs - Blog Base CSS */
/* ======================== */


/* --- Blog Navigation Start --- */
.blog-nav {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-bottom: 1px solid #e9ecef;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.blog-nav-container {
    max-width: min(90%, var(--max-container-width));
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
}

.blog-nav-links {
    display: flex;
    gap: 30px;
    align-items: center;
}

.blog-nav-link {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 25px;
    text-decoration: none;
    color: #666;
    font-weight: 600;
    font-size: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.blog-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(167, 28, 28, 0.1), transparent);
    transition: left 0.5s ease;
}

.blog-nav-link:hover::before {
    left: 100%;
}

.blog-nav-link:hover {
    color: var(--accent-color);
    background-color: rgba(167, 28, 28, 0.05);
    transform: translateY(-2px);
}

.blog-nav-link.active {
    background: linear-gradient(135deg, var(--accent-color), #d64545);
    color: white;
    box-shadow: 0 4px 15px rgba(167, 28, 28, 0.3);
}

.blog-nav-link.active:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(167, 28, 28, 0.4);
}

.blog-nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 4px 0;
}

.rss-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #ff6b35;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 107, 53, 0.3);
}

.rss-link:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.newsletter-subscribe-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(40, 167, 69, 0.3);
}

.newsletter-subscribe-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
}

@media (max-width: 1400px) {
    .blog-nav-container {
        padding: 0;
    }

    .blog-nav-links {
        gap: 16px;
    }

    .rss-link {
        width: 38px;
        height: 38px;
    }

    .rss-link i {
        font-size: 16px;
    }

    .newsletter-subscribe-btn {
        font-size: 12px;
    }
}

@media (max-width: 992px) {
    .blog-nav-container {
        flex-direction: column;
        max-width: min(98%, var(--max-container-width));
        padding: 6px 0;
    }

    .blog-nav-links {
        gap: 6px;
    }
}

@media (max-width: 768px) {
    .blog-nav-container {
        max-width: min(100%, var(--max-container-width));
    }

    .blog-nav-links {
        gap: 4px;
    }

    .blog-nav-link {
        font-size: 11px;
    }

    .blog-nav-link i {
        font-size: 12px;
    }
}

@media (max-width: 480px) {
    .blog-nav-container {
        flex-direction: row;
        padding: 6px 10px;
        align-items: center;
        overflow: hidden;
        position: relative;
    }

    /* Add fade effect to indicate scrollable content */
    .blog-nav-container::after {
        content: '';
        position: absolute;
        top: 0;
        right: 140px;
        /* Account for actions width */
        bottom: 0;
        width: 20px;
        background: linear-gradient(to right, transparent, rgba(248, 249, 250, 0.8));
        pointer-events: none;
        z-index: 1;
    }

    .blog-nav-links {
        flex: 1;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-behavior: smooth;
        gap: 8px;
        padding: 8px 0;
        margin-right: 10px;
        scrollbar-width: none;
        -ms-overflow-style: none;
        /* Smooth momentum scrolling on iOS */
        -webkit-overflow-scrolling: touch;
        /* Prevent text selection during scroll */
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

    .blog-nav-links::-webkit-scrollbar {
        display: none;
    }

    .blog-nav-link {
        flex-shrink: 0;
        white-space: nowrap;
        min-width: fit-content;
        padding: 8px 12px;
        font-size: 11px;
    }

    .blog-nav-link.active {
        box-shadow: 0 0 8px rgba(167, 28, 28, 0.4);
    }

    .blog-nav-actions {
        flex-shrink: 0;
        gap: 8px;
        margin: 0;
    }

    .rss-link {
        width: 32px;
        height: 32px;
    }

    .rss-link i {
        font-size: 14px;
    }

    .newsletter-subscribe-btn {
        padding: 8px 12px;
        font-size: 10px;
        gap: 4px;
    }

    .newsletter-subscribe-btn i {
        font-size: 12px;
    }
}

/* --- Blog Navigation End --- */


/* --- Newsletter Modal Start --- */
.newsletter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.newsletter-modal.show {
    opacity: 1;
    visibility: visible;
}

.newsletter-modal-content {
    background: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 500px;
    width: 90%;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s ease;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
}

.newsletter-modal.show .newsletter-modal-content {
    transform: scale(1);
}

.newsletter-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.newsletter-modal-close:hover {
    color: #333;
    background-color: #f0f0f0;
}

.newsletter-modal-header {
    text-align: center;
    margin-bottom: 30px;
}

.newsletter-modal-header i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 15px;
}

.newsletter-modal-header h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.newsletter-modal-header p {
    color: #666;
    line-height: 1.6;
}

.newsletter-input-group {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.newsletter-input-group input {
    flex: 1;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.newsletter-input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.newsletter-input-group button {
    padding: 15px 25px;
    background: var(--accent-color);
    color: white;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.newsletter-input-group button:hover {
    background: #8b1818;
    transform: translateY(-2px);
}

.newsletter-options {
    margin-bottom: 20px;
}

.newsletter-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    color: #666;
}

.newsletter-checkbox input {
    margin: 0;
    opacity: 0;
    position: absolute;
    width: 0;
    height: 0;
}

.newsletter-checkbox .checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 3px;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.newsletter-checkbox input:checked+.checkmark {
    background-color: var(--accent-color);
    border-color: var(--accent-color);
}

.newsletter-checkbox input:checked+.checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.newsletter-privacy {
    text-align: center;
    font-size: 0.8rem;
    color: #999;
    line-height: 1.4;
}

@media (max-width: 768px) {
    .newsletter-modal-content {
        padding: 30px 20px;
        margin: 20px;
    }

    .newsletter-input-group {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .newsletter-modal-content {
        padding-bottom: 16px;
    }

    .newsletter-modal-header i {
        font-size: 32px;
    }

    .newsletter-modal-header h3 {
        font-size: 20px;
    }

    .newsletter-modal-header p {
        font-size: 12px;
    }

    .newsletter-input-group input {
        font-size: 12px;
        padding: 10px;
    }

    .newsletter-input-group button {
        padding: 10px 15px;
        width: 100%;
        justify-content: center;
        font-size: 13px;
    }

    .newsletter-input-group button i {
        font-size: 14px;
    }

    .newsletter-checkbox {
        font-size: 11px;
    }

    .newsletter-checkbox .checkmark {
        width: 16px;
        height: 16px;
    }

    .newsletter-privacy {
        font-size: 10px;
    }
}

/* --- Newsletter Modal End --- */