html, body {
    height: 100%;
    margin: 0;
    padding: 0;
}
/* ... existing CSS ... */

/* New styles for AdSense placeholders */
.ad-placeholder {
    background-color: #f0f0f0; /* Light gray background */
    border: 1px dashed #ccc;   /* Dashed border */
    padding: 20px;
    margin: 20px auto; /* Center the ad unit with some vertical margin */
    text-align: center;
    color: #888;
    min-height: 100px; /* Minimum height for ad units */
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    max-width: 90%; /* Max width relative to container */
}

/* You might want specific sizes for different ad types, e.g.: */
/*
#ad-unit-1, #ad-unit-2, #ad-unit-3, #ad-unit-4 {
    min-width: 320px;
    min-height: 100px;
    max-width: 728px;
}
@media (max-width: 768px) {
    #ad-unit-1, #ad-unit-2, #ad-unit-3, #ad-unit-4 {
        min-width: unset;
        width: 100%;
        max-width: 320px;
        min-height: 50px;
    }
}
*/
body {
    background: linear-gradient(135deg, #6dd5ed, #2193b0);
    font-family: 'Poppins', sans-serif;
	 display: flex;
    flex-direction: column;
}
main {
    flex-grow: 1;

}

/* Removed QR Code specific tab/form styles */

.mega-dropdown .dropdown-menu {
    width: 800px;
    max-width: calc(100vw - 30px);
    left: auto;
    right: 0;
    padding: 2rem 1.5rem;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border: none;
    border-top: 3px solid #007bff;
    border-radius: 0 0 0.5rem 0.5rem;
    margin-top: 0.5rem;
}

.mega-menu-title {
    font-weight: 600;
    color: #343a40;
    margin-bottom: 1.25rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e9ecef;
    font-size: 1rem;
}

.mega-menu-item {
    display: flex !important;
    align-items: center;
    padding: 0.75rem 1rem !important;
    border-radius: 0.5rem;
    transition: background-color 0.2s ease-in-out, transform 0.2s ease;
    margin-bottom: 0.5rem;
}

.mega-menu-item:hover {
    background-color: #f1f3f5 !important;
    color: inherit;
    transform: translateX(4px);
}

.mega-menu-item .icon-wrap {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    background-color: #e7f1ff;
    color: #007bff;
    border-radius: 50%;
    display: grid;
    place-items: center;
    margin-right: 1rem;
    font-size: 1rem;
}

.mega-menu-item .text-wrap {
    display: flex;
    flex-direction: column;
}

.mega-menu-item .title {
    font-weight: 600;
    color: #212529;
    font-size: 0.95rem;
    line-height: 1.2;
}

.mega-menu-item .description {
    font-size: 0.8rem;
    color: #6c757d;
    font-weight: 400;
    line-height: 1.4;
    margin-top: 2px;
}

.mega-menu-item.disabled-item {
    opacity: 0.6;
    pointer-events: none;
    background-color: transparent !important;
    transform: none;
}

@media (max-width: 991.98px) {
    .mega-dropdown .dropdown-menu {
        width: 100%;
        max-width: 100%;
        left: 0;
        transform: none;
        border-top: none;
        box-shadow: none;
        padding: 1rem;
    }
    .mega-menu-title {
        margin-top: 1rem;
    }
    .col-lg-4, .col-md-6, .col-md-12 {
        margin-bottom: 0;
    }
}
/* Removed .message-alert styles as they are tied to QR generation feedback */


section {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

section h2 {
    color: #343a40;
}


#tools .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#tools .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

#tools .card-body i {
    color: #007bff;
}


#faq .accordion-button {
    background-color: #f8f9fa;
    color: #343a40;
    font-weight: 600;
}

#faq .accordion-button:not(.collapsed) {
    color: #007bff;
    background-color: #e9ecef;
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .08);
}

#faq .accordion-body {
    background-color: #ffffff;
    color: #495057;
}

/* New styles for JPG to PDF Converter */
.converter-section {
    min-height: 500px; /* Adjust as needed */
}

#upload-area {
    min-height: 150px;
    cursor: pointer;
    border-color: #007bff !important;
}

#upload-area:hover {
    background-color: #e9f5ff;
}

.image-preview-item {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 0.5rem;
    overflow: hidden;
    padding: 0.5rem;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 120px; /* Ensure a consistent height for previews */
}

.image-preview-item img {
    max-width: 100%;
    max-height: 100px; /* Max height for the image within the preview card */
    object-fit: contain;
    display: block;
    margin-bottom: 0.5rem;
}

.image-preview-item .remove-btn {
    position: absolute;
    top: 5px;
    right: 5px;
    background-color: rgba(220, 53, 69, 0.8);
    color: white;
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

.image-preview-item .remove-btn:hover {
    opacity: 1;
}

.image-preview-item .image-name {
    font-size: 0.75rem;
    color: #6c757d;
    text-align: center;
    word-break: break-all;
}

/* Card Link Styling */
.card-link {
    text-decoration: none; /* Removes the underline */
    color: inherit;        /* Ensures text color is inherited from parent (card) */
    display: block;        /* Makes the entire anchor tag a block element */
    height: 100%;          /* Makes the link take the full height of the card column */
}

.card-link:hover .card {
    transform: translateY(-5px); /* Optional: subtle lift effect on hover */
    box-shadow: 0 8px 16px rgba(0,0,0,0.2) !important; /* Optional: stronger shadow on hover */
}

.card-link .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease; /* Smooth transition for hover effects */
}


/* ... existing CSS ... */

.image-preview-item.dragging {
    opacity: 0.5;
    border: 2px dashed #007bff;
}

.image-preview-item.drag-over {
    border: 2px solid #28a745; /* Highlight drop target */
}