@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;600;700&family=Josefin+Sans:wght@300;400&display=swap');

:root {
    --main-bg-color: #005682;
    --main-text-color: #FFF6CC;
    --footer-height: 50px;
    --footer-padding-bottom: var(--footer-height); /* Default for desktop */
}

body {
    background-color: var(--main-bg-color);
    color: var(--main-text-color);
    font-family: 'Josefin Sans', sans-serif;
    overflow-x: hidden; /* Prevent horizontal scroll */
    padding-bottom: var(--footer-padding-bottom); /* Use dynamic padding */
}

/* Fonts */
.font-cairo {
    font-family: 'Cairo', sans-serif;
}

/* Header & Footer */
.main-footer {
    background-color: var(--main-bg-color); /* Explicitly set background color */
    min-height: var(--footer-height); /* Use min-height to allow expansion */
    height: auto; /* Allow height to adjust */
    display: flex;
    align-items: center; /* Vertically align content */
    z-index: 1030;
}

.footer-logo {
    height: 35px; /* Slightly smaller than header logo */
    width: auto;
}

@media (max-width: 575.98px) { /* Extra small devices */
    :root {
        --footer-padding-bottom: 120px; /* Adjust padding for expanded footer height */
    }
    .main-footer {
        min-height: 120px; /* Adjust height for stacked content */
        padding-top: 10px;
        padding-bottom: 10px;
    }
    .main-footer .footer-icon {
        font-size: 1rem; /* Slightly smaller icons */
    }
    .footer-logo {
        height: 30px;
    }
}

.header-logo {
    height: 40px;
    width: auto;
}

/* Grid / Masonry */
.grid-item, .grid-sizer {
    width: 100%;
    float: left; /* Fallback */
    padding: 0;
    margin: 0;
    border: none;
}

@media (min-width: 576px) {
    .grid-item, .grid-sizer {
        width: 50%;
    }
}

@media (min-width: 992px) {
    .grid-item, .grid-sizer {
        width: 33.3333%;
    }
}

/* Box Item & Hover Effects */
.box {
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.box-img img {
    transition: transform 0.5s ease;
    display: block;
}

.box:hover .box-img img {
    transform: scale(1.05);
}

.box .content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 86, 130, 0.85); /* Increased opacity for better readability */
    opacity: 0;
    transition: opacity 0.3s ease;
    color: var(--main-text-color);
    padding: 20px;
}

.box:hover .content {
    opacity: 1;
}

.box .title {
    font-weight: 700;
    margin-bottom: 10px;
}

.box .description {
    font-size: 1.1rem;
    line-height: 1.4;
}

/* Modals */
.modal-backdrop.show {
    opacity: 0.8;
}

/* Footer specific styles */
.main-footer .footer-icon {
    color: var(--main-text-color); /* #FFF6CC */
    text-decoration: none;
    font-size: 1.25rem; /* Adjust size as needed */
}

.main-footer .footer-icon:hover {
    color: #FFFFFF;
}

.main-footer p.small {
    color: var(--main-text-color) !important; /* Ensure it overrides Bootstrap's text-light */
}

/* Scrollbar for Chrome/Safari/Edge */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #004060;
}

::-webkit-scrollbar-thumb {
    background: #FFF6CC;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #fff;
}
