/* ========================================
   BLOG PAGE - ORGANIZED BY VISUAL HIERARCHY
   ======================================== */

/* ========================================
   1. NAVIGATION (Top of page)
   ======================================== */

.navbar .nav-menu {
    order: 2 !important;
    flex-shrink: 0 !important;
    display: flex !important;
    list-style: none !important;
    margin: 0 !important;
    position: fixed !important;
    width: 200px !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(248, 250, 252, 0.95) 100%) !important;
    backdrop-filter: blur(12px) !important;
    flex-direction: column !important;
    justify-content: flex-start !important;
    align-items: stretch !important;
    padding: 0.5rem 0 !important;
    border-radius: 12px !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(0, 0, 0, 0.08) !important;
    opacity: 0 !important;
    transform: translateY(-10px) !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease !important;
    z-index: 1000 !important;
    gap: 0 !important;
}

.navbar .nav-menu.active {
    opacity: 1 !important;
    transform: translateY(0) !important;
    visibility: visible !important;
    pointer-events: all !important;
}

.navbar .nav-menu .nav-item {
    width: 100%;
    margin: 0;
}

.navbar .nav-menu .nav-link {
    display: block;
    padding: 0.75rem 1.5rem;
    color: #1E293B !important;
    text-decoration: none;
    transition: all 0.3s ease;
    border-radius: 0;
    width: 100%;
}

.navbar .nav-menu .nav-link:hover {
    background: rgba(50, 205, 50, 0.1);
    color: #32CD32 !important;
}

.navbar .nav-menu .nav-link.active {
    background: rgba(50, 205, 50, 0.15);
    color: #32CD32 !important;
}

.navbar .nav-menu .nav-link.active::after {
    display: none;
}

.navbar .nav-toggle {
    order: 3 !important;
    display: flex !important;
}

.nav-toggle {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
    z-index: 1001;
    position: relative;
}

/* ========================================
   2. FEATURED POST SECTION
   ======================================== */

.featured-post-section {
    padding: 50px 0;
    background: #FFFFFF;
    position: relative;
    margin-top: -20px;
}

.featured-post-section::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background: #FFFFFF;
    z-index: 1;
}

.featured-post-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 50vh;
    flex-direction: row-reverse;
}

.featured-post-text {
    flex: 1;
    max-width: 50%;
    position: relative;
    z-index: 3;
}

.featured-post-text h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 30px 0;
    line-height: 1.3;
}

.featured-post-card {
    background: #F8FAFC;
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
}

.featured-post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: white;
}

.post-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.post-category {
    background: #32CD32;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.post-date {
    color: #64748B;
    font-size: 0.9rem;
    font-weight: 500;
}

.featured-post-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 15px 0;
    line-height: 1.3;
}

.featured-post-card p {
    font-size: 1rem;
    color: #64748B;
    line-height: 1.6;
    margin: 0 0 20px 0;
    text-align: justify;
}

.post-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tag {
    background: #E2E8F0;
    color: #475569;
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
}

.featured-post-visual {
    flex: 1;
    max-width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.featured-post-image {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    position: relative;
    z-index: 2;
}

/* ========================================
   2. LATEST POSTS SECTION
   ======================================== */

.latest-posts-section {
    padding: 50px 0;
    background: #FFFFFF;
    position: relative;
    margin-top: -20px;
}

.latest-posts-section::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background: #FFFFFF;
    z-index: 1;
}

.latest-posts-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    min-height: 50vh;
    text-align: center;
}

.section-header {
    max-width: 800px;
    position: relative;
    z-index: 3;
}

.section-header h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.section-header p {
    font-size: 0.95rem;
    color: #64748B;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.post-card {
    background: #F8FAFC;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    transition: all 0.3s ease;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    background: white;
}

.post-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
}

.post-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0);
    transition: background 0.3s ease;
    pointer-events: none;
    z-index: 1;
}

.post-image:hover::after {
    background: rgba(0, 0, 0, 0.1);
}

.post-image-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    overflow: hidden;
}

.post-image-carousel .carousel-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity 0.5s ease, transform 0.5s ease;
    opacity: 0;
    transform: scale(1.05);
}

.post-image-carousel .carousel-image.active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.post-card:hover .post-image-carousel .carousel-image.active {
    transform: scale(1.05);
}

.post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.post-card:hover .post-image img {
    transform: scale(1.05);
}

.carousel-indicators {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: 20px;
    backdrop-filter: blur(5px);
}

.carousel-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #32CD32;
    width: 20px;
    border-radius: 10px;
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
}

.carousel-dot.active:hover {
    background: #228B22;
}

.post-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.post-content .post-meta {
    margin-bottom: 12px;
}

.post-content h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #1E293B;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.post-content p {
    font-size: 0.9rem;
    color: #64748B;
    line-height: 1.5;
    margin: 0 0 15px 0;
    text-align: justify;
}

.read-more {
    color: #32CD32;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    transition: color 0.3s ease;
    margin-top: auto;
}

.read-more:hover {
    color: #228B22;
}

.read-more i {
    font-size: 0.8rem;
    transition: transform 0.3s ease;
}

.read-more:hover i {
    transform: translateX(3px);
}

/* ========================================
   3. NEWSLETTER SECTION
   ======================================== */

.newsletter-section {
    padding: 50px 0;
    background: #FFFFFF;
    position: relative;
    margin-top: -20px;
}

.newsletter-section::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 20px;
    background: #FFFFFF;
    z-index: 1;
}

.newsletter-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 10px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 50vh;
}

.newsletter-text {
    flex: 1;
    max-width: 50%;
    position: relative;
    z-index: 3;
}

.newsletter-text h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #1E293B;
    margin: 0 0 20px 0;
    line-height: 1.3;
}

.newsletter-text p {
    font-size: 0.95rem;
    color: #64748B;
    line-height: 1.5;
    margin: 0 0 20px 0;
}

.newsletter-visual {
    flex: 1;
    max-width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 1;
}

.newsletter-form {
    background: #F8FAFC;
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #E2E8F0;
    width: 100%;
    max-width: 400px;
}

.subscription-form .form-group {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.subscription-form input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    font-size: 0.9rem;
    transition: border-color 0.3s ease;
}

.subscription-form input:focus {
    outline: none;
    border-color: #32CD32;
}

.subscription-form .btn {
    padding: 12px 20px;
    font-size: 0.9rem;
    white-space: nowrap;
}

.privacy-note {
    font-size: 0.8rem;
    color: #94A3B8;
    margin: 0;
    text-align: center;
}

/* ========================================
   4. FEATURE LISTS (Used in content blocks)
   ======================================== */

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feature-list li {
    padding: 8px 0;
    color: #475569;
    font-size: 0.9rem;
    position: relative;
    padding-left: 25px;
}

.feature-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10B981;
    font-weight: bold;
    font-size: 1rem;
}

/* ========================================
   5. RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    /* Featured Post */
    .featured-post-wrapper {
        flex-direction: column;
        gap: 30px;
        min-height: auto;
        text-align: center;
    }

    .featured-post-text,
    .featured-post-visual {
        max-width: 100%;
        padding: 0 15px;
    }

    .featured-post-text h2 {
        font-size: 1.6rem;
    }

    .featured-post-card h3 {
        font-size: 1.3rem;
    }

    /* Latest Posts */
    .latest-posts-wrapper {
        gap: 30px;
        min-height: auto;
    }

    .section-header h2 {
        font-size: 1.6rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
        gap: 20px;
        max-width: 400px;
    }

    .post-content {
        padding: 20px;
    }

    /* Newsletter */
    .newsletter-wrapper {
        flex-direction: column;
        gap: 30px;
        min-height: auto;
        text-align: center;
    }

    .newsletter-text,
    .newsletter-visual {
        max-width: 100%;
        padding: 0 15px;
    }

    .newsletter-text h2 {
        font-size: 1.6rem;
    }

    .newsletter-form {
        padding: 30px 20px;
    }

    .subscription-form .form-group {
        flex-direction: column;
        gap: 10px;
    }

    .subscription-form .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .featured-post-text h2,
    .section-header h2,
    .newsletter-text h2 {
        font-size: 1.5rem;
    }

    .featured-post-card {
        padding: 20px;
    }

    .newsletter-form {
        padding: 20px 15px;
    }

    .post-content {
        padding: 15px;
    }
}

/* ========================================
   6. IMAGE MODAL POPUP
   ======================================== */

.image-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
}

.image-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.modal-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.modal-counter {
    color: white;
    font-size: 1rem;
    font-weight: 500;
    margin-top: 15px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    transition: color 0.3s ease;
    line-height: 1;
}

.modal-close:hover {
    color: #32CD32;
}

.modal-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    font-size: 24px;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10001;
}

.modal-nav:hover {
    background: rgba(50, 205, 50, 0.8);
    border-color: #32CD32;
    transform: translateY(-50%) scale(1.1);
}

.modal-prev {
    left: 30px;
}

.modal-next {
    right: 30px;
}

.modal-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.modal-nav:disabled:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1);
}

@media (max-width: 768px) {
    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 30px;
    }

    .modal-nav {
        width: 40px;
        height: 40px;
        font-size: 18px;
        padding: 10px 15px;
    }

    .modal-prev {
        left: 15px;
    }

    .modal-next {
        right: 15px;
    }

    .modal-content {
        max-width: 95%;
    }

    .modal-content img {
        max-height: 80vh;
    }

    .modal-counter {
        font-size: 0.9rem;
        margin-top: 10px;
    }
}

/* ========================================
   7. BLOG POST MODAL POPUP
   ======================================== */

.blog-post-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    animation: fadeIn 0.3s ease;
    overflow-y: auto;
}

.blog-post-modal.active {
    display: block;
}

.blog-modal-content {
    position: relative;
    max-width: 900px;
    margin: 40px auto;
    background: white;
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-modal-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: #1E293B;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10002;
    transition: color 0.3s ease;
    line-height: 1;
    background: white;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.blog-modal-close:hover {
    color: #32CD32;
    transform: rotate(90deg);
}

.blog-modal-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #E2E8F0;
}

.blog-modal-meta {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: center;
}

.blog-modal-category {
    background: #32CD32;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
}

.blog-modal-date {
    color: #64748B;
    font-size: 0.9rem;
    font-weight: 500;
}

.blog-modal-title {
    font-size: 2rem;
    font-weight: 700;
    color: #1E293B;
    margin: 0;
    line-height: 1.3;
}

.blog-modal-body {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.blog-modal-image-container {
    width: 100%;
    max-height: 500px;
    overflow: hidden;
    border-radius: 12px;
    cursor: pointer;
}

.blog-modal-image {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.blog-modal-image-container:hover .blog-modal-image {
    transform: scale(1.02);
}

.blog-modal-text {
    font-size: 1rem;
    color: #475569;
    line-height: 1.8;
}

.blog-modal-description {
    text-align: justify;
    margin: 0;
    white-space: pre-line;
}

.blog-modal-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding-top: 20px;
    border-top: 1px solid #E2E8F0;
}

.blog-modal-tags .tag {
    background: #E2E8F0;
    color: #475569;
    padding: 6px 12px;
    border-radius: 15px;
    font-size: 0.85rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .blog-modal-content {
        margin: 20px;
        padding: 30px 20px;
        max-width: calc(100% - 40px);
    }

    .blog-modal-close {
        top: 15px;
        right: 20px;
        font-size: 30px;
        width: 35px;
        height: 35px;
    }

    .blog-modal-title {
        font-size: 1.5rem;
    }

    .blog-modal-text {
        font-size: 0.95rem;
    }

    .blog-modal-image-container {
        max-height: 300px;
    }
}
