body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #f8f9fa;
    color: #333;
}

header {
    background-color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px 0; /* Adjust padding as needed */
}

.header-logo {
    max-width: 100%; /* Ensure the logo scales down if needed */
    height: auto;    /* Maintain aspect ratio */
}

.primary-nav-container {
    display: flex;
    justify-content: center;
    gap: 0px; /* Remove space between boxes */
    padding: 15px 0;
    background-color: #f0f0f0; /* A light grey background for the nav bar */
}

.primary-nav-box {
    padding: 8px 10px; /* Reduced padding to match category buttons */
    font-weight: bold;
    color: #555;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: all 0.3s ease;
}

.primary-nav-box:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.primary-nav-box.selected {
    background-color: #a7d9ff; /* A lighter shade of blue */
    color: white;
    box-shadow: 0 4px 8px rgba(167, 217, 255, 0.5); /* Adjust shadow to match new color */
}

.hidden {
    display: none !important; /* Use important to ensure it overrides other display properties */
}


.menu-boxes-container {
    display: flex;
    justify-content: center;
    gap: 0px; /* Remove space between boxes */
    padding: 0 5px; /* Add a small padding to the container itself */
}

.menu-box {
    background-color: white;
    padding: 8px 10px; /* Reduced padding for smaller size */
    border-radius: 5px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    font-weight: bold;
    color: #333;
    cursor: pointer;
    transition: transform 0.2s;
    flex-grow: 1; /* Allow buttons to grow */
    flex-shrink: 1; /* Allow buttons to shrink */
    flex-basis: 0; /* Base size before growing/shrinking */
    text-align: center; /* Center text within the flexible button */
    white-space: nowrap; /* Prevent text from wrapping */
    overflow: hidden; /* Hide overflow content */
    text-overflow: ellipsis; /* Add ellipsis for overflowed text */
}

.menu-box:hover {
    transform: translateY(-2px);
}

.template-card {
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.template-card:hover {
    transform: translateY(-5px);
}

.template-card img {
    width: 100%;
}

.template-card-body {
    padding: 1.25rem;
}

.template-card-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

/* Carousel styles */
.carousel-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.carousel-content {
    position: relative;
    width: 80vw;
    height: 80vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

#carousel-image {
    max-width: 100%;
    max-height: 100%;
    display: block;
    margin: 0 auto;
    object-fit: contain;
}


.close-btn-new {
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 35px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 50%;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
    padding: 8px 16px;
}

.close-btn-new:hover {
    background-color: rgba(0, 0, 0, 0.8);
}


.prev-btn,
.next-btn {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -22px;
    color: white;
    font-weight: bold;
    font-size: 20px;
    transition: 0.6s ease;
    border-radius: 50%;
    user-select: none;
    background-color: rgba(0, 0, 0, 0.3);
}

.next-btn {
    right: 0;
}

.prev-btn {
    left: 0;
}

.prev-btn:hover,
.next-btn:hover {
    background-color: rgba(0, 0, 0, 0.8);
}