/* Blog Details Custom CSS */

/* Content Block Container */
.content-block {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* Feature Cards Styling */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin: 20px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.feature-card {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-align: center;
}

    .feature-card:hover {
        transform: translateY(-8px);
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    }

.card-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #ff6a0b 0%, #ff4814 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
    font-size: 24px;
}

.card-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;
}

.card-text {
    font-size: 14px;
    line-height: 1.6;
    color: #666;
}

/* Responsive Table Styling */
.table-responsive {
    overflow-x: auto;
    margin: 20px 0;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    min-width: 600px;
}

    .comparison-table thead {
        background: linear-gradient(135deg, #ff6a0b 0%, #ff4814 100%);
        color: white;
    }

    .comparison-table th {
        padding: 15px;
        text-align: left;
        font-weight: 600;
        font-size: 16px;
        border: none;
    }

    .comparison-table td {
        padding: 12px 15px;
        border-bottom: 1px solid #e0e0e0;
        font-size: 14px;
    }

    .comparison-table tbody tr:hover {
        background-color: #f5f5f5;
    }

    .comparison-table tbody tr:last-child td {
        border-bottom: none;
    }

/* Image Gallery Styling */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin: 20px 0;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    aspect-ratio: 4/3;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

    .gallery-item:hover {
        transform: translateY(-5px);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    }

.gallery-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-img {
    transform: scale(1.1);
}

.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), transparent);
    color: white;
    padding: 20px 15px 15px;
    font-size: 14px;
    font-weight: 600;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
    transform: translateY(0);
}

/* Mobile Responsive Styles */
@media (max-width: 767px) {

    /* Content Block Mobile */
    .content-block {
        padding: 0 10px;
    }

    /* Feature Cards Mobile */
    .feature-cards {
        grid-template-columns: 1fr;
        gap: 20px;
        margin: 15px 0;
        max-width: 100%;
    }

    .feature-card {
        padding: 25px 20px;
        max-width: 100%;
    }

    .card-icon {
        width: 50px;
        height: 50px;
        font-size: 20px;
        margin-bottom: 15px;
    }

    .card-title {
        font-size: 18px;
    }

    .card-text {
        font-size: 13px;
    }

    /* Table Mobile */
    .table-responsive {
        margin: 15px 0;
        border-radius: 6px;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
    }

    .comparison-table {
        font-size: 13px;
        width: 100%;
        min-width: 600px;
    }

        .comparison-table th {
            padding: 12px 10px;
            font-size: 14px;
        }

        .comparison-table td {
            padding: 10px;
            font-size: 12px;
        }

    /* Image Gallery Mobile */
    .image-gallery {
        grid-template-columns: 1fr;
        gap: 15px;
        margin: 15px 0;
        max-width: 100%;
    }

    .gallery-item {
        border-radius: 6px;
        width: 100%;
    }

    .gallery-caption {
        padding: 15px 10px 10px;
        font-size: 12px;
    }
}

@media (max-width: 480px) {

    /* Feature Cards Extra Small Mobile */
    .feature-cards {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .feature-card {
        padding: 20px 15px;
    }

    .card-icon {
        width: 45px;
        height: 45px;
        font-size: 18px;
    }

    .card-title {
        font-size: 16px;
    }

    .card-text {
        font-size: 12px;
    }

    /* Table Extra Small Mobile */
    .comparison-table {
        font-size: 12px;
    }

        .comparison-table th {
            padding: 10px 8px;
            font-size: 13px;
        }

        .comparison-table td {
            padding: 8px;
            font-size: 11px;
        }

    /* Image Gallery Extra Small Mobile */
    .image-gallery {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 10px;
    }

    .gallery-caption {
        font-size: 11px;
        padding: 12px 8px 8px;
    }
}

/* Tablet Responsive Styles */
@media (min-width: 768px) and (max-width: 1024px) {
    .feature-cards {
        grid-template-columns: repeat(2, 1fr);
    }

    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================
   Fix: Add top margin to section header to prevent
   hiding by header menus on all screen sizes
   ===================================================== */

.blog-details-area .section-header {
    margin-top: 40px;
}


/* =====================================================
   Fix: Remove excess vertical space before footer
   (desktop view on blog detail page)
   The section-spacing / section-spacing-top classes
   inherited from master CSS add very large padding
   values that are designed for full-page sections,
   not for nested blog inner sections.
   ===================================================== */

/* FAQ inner section — reduce the large section-spacing padding */
.blog-details-area .faq-area-inner,
.faq-area-inner.section-spacing {
    padding-top: 40px !important;
    padding-bottom: 40px !important;
}

/* Comment form & Comments section — remove excess top spacing */
.commentform.section-spacing-top,
.comments-section.section-spacing-top {
    padding-top: 30px !important;
    margin-top: 0 !important;
}

/* Ensure the blog-details-area itself has no extra bottom gap */
.blog-details-area {
    padding-bottom: 30px !important;
}

/* Also reset any large margin on the last child inside blog-details-area-inner */
.blog-details-area-inner > *:last-child {
    margin-bottom: 0 !important;
}

/* Decrease top margin/padding for comments section across all screens */
.comments-section.section-spacing {
    padding-top: 30px !important;
}

@media (max-width: 767px) {
    .comments-section.section-spacing {
        padding-top: 15px !important;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .comments-section.section-spacing {
        padding-top: 18px !important;
    }
}

/* Mobile: Fix blog details wrapper content cutting */
@media (max-width: 991px) {
    /* Override global body overflow-x for blog detail page */
    body {
        overflow-x: auto !important;
    }

    html {
        overflow-x: auto !important;
    }

    .blog-details-area {
        overflow-x: visible !important;
        padding: 0;
        width: 100%;
    }

        .blog-details-area .container {
            max-width: 100% !important;
            padding: 0 15px !important;
            width: 100% !important;
        }

    .blog-details-area-inner {
        overflow-x: visible !important;
        width: 100% !important;
        padding: 0;
    }

    .blogdetails__wrapper {
        gap: 20px;
        padding: 0;
        margin: 0;
        overflow-x: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    .blogdetails-contentleft {
        width: 100% !important;
        padding: 0 15px;
        margin-bottom: 20px;
    }

    .blogdetails-overview {
        justify-content: center;
        width: 100%;
        padding: 15px 0;
        border-right: none;
        border-bottom: 1px solid var(--border);
    }

    .blogdetails-contentright {
        padding: 0 15px !important;
        width: 100% !important;
        max-width: 100% !important;
        overflow-x: visible !important;
        box-sizing: border-box;
    }

    .blog-details-fullBody {
        overflow-x: visible !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

        .blog-details-fullBody *,
        .blog-details-fullBody *::before,
        .blog-details-fullBody *::after {
            max-width: 100% !important;
            box-sizing: border-box !important;
            width: auto !important;
            min-width: 0 !important;
            position: relative !important;
            transform: none !important;
        }

        /* Exclude icon classes from universal overrides */
        .blog-details-fullBody .card-icon,
        .blog-details-fullBody i,
        .blog-details-fullBody .fa-solid,
        .blog-details-fullBody .fa-brands {
            width: auto !important;
            min-width: auto !important;
            transform: none !important;
        }

        .blog-details-fullBody img,
        .blog-details-fullBody table,
        .blog-details-fullBody pre,
        .blog-details-fullBody iframe,
        .blog-details-fullBody video {
            max-width: 100% !important;
            height: auto !important;
            display: block;
            width: 100% !important;
            min-width: 0 !important;
        }

        .blog-details-fullBody table {
            overflow-x: auto;
            display: table;
        }

        .blog-details-fullBody p,
        .blog-details-fullBody div,
        .blog-details-fullBody span {
            max-width: 100% !important;
            word-wrap: break-word !important;
            overflow-wrap: break-word !important;
            min-width: 0 !important;
            white-space: normal !important;
        }

        .blog-details-fullBody [style*="width"] {
            width: 100% !important;
            max-width: 100% !important;
            min-width: 0 !important;
        }

        .blog-details-fullBody [style*="min-width"] {
            min-width: 0 !important;
        }

        .blog-details-fullBody [style*="position"] {
            position: relative !important;
        }

        .blog-details-fullBody [style*="transform"] {
            transform: none !important;
        }

        .blog-details-fullBody [style*="white-space"] {
            white-space: normal !important;
        }
}
