/* Custom Styles for Deepavali.sg */

/* General overrides */
a {
    text-decoration: none;
    transition: color 0.2s;
}

/* Event Cards */
.card-hover {
    transition: transform 0.3s, box-shadow 0.3s;
}
.card-hover:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive Banner */
.responsive-banner {
    height: 400px !important;
    width: 100%;
    background-size: cover !important;
    background-position: center !important;
    position: relative;
}
@media (max-width: 768px) {
    .responsive-banner {
        height: 220px !important; /* Smaller height for mobile to see more content/less chop */
    }
}

/* Responsive Image Tag Height */
.responsive-img-height {
    height: 400px;
    width: 100%;
    object-fit: cover;
}
@media (max-width: 768px) {
    .responsive-img-height {
        height: 220px;
    }
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
}

/* Utilities */
.text-justify {
    text-align: justify;
}

/* =========================================
   Modern Dropdown Menu
   ========================================= */

/* Desktop Hover Effect */
@media (min-width: 992px) {
    .navbar-custom .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        animation: fadeInUp 0.3s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
    }
}

/* Dropdown Container */
.navbar-custom .dropdown-menu {
    border: none;
    border-radius: 12px;
    /* Soft, deep shadow for a floating effect */
    box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.1),
        0 10px 20px -5px rgba(209, 0, 116, 0.1);
    padding: 12px;
    margin-top: 15px; /* Spacing from navbar */
    min-width: 260px;
    background: #ffffff;
    display: none; /* Hidden by default, shown by hover/click */
}

/* Fix for Hover Gap: Bridge the 15px margin */
.navbar-custom .dropdown-menu::before {
    content: "";
    position: absolute;
    top: -20px; /* Covers the 15px margin + buffer */
    left: 0;
    width: 100%;
    height: 20px;
    background: transparent;
}

/* Dropdown Items */
.navbar-custom .dropdown-item {
    padding: 12px 20px;
    font-weight: 500;
    color: #4a4a4a;
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    position: relative;
    overflow: hidden;
    margin-bottom: 2px;
}

/* Hover State for Items */
.navbar-custom .dropdown-item:hover {
    background-color: #fff0f7; /* Very light pink tint matching brand */
    color: #d10074; /* Brand Pink */
    transform: translateX(4px); /* Subtle slide right */
    padding-left: 24px; /* Text shift */
    font-weight: 600;
}

/* Active State */
.navbar-custom .dropdown-item:active {
    background-color: #fce4ec;
    transform: translateX(2px);
}

/* "View All" Link Distinction */
.navbar-custom .dropdown-item.fw-bold.bg-light {
    background-color: #f8f9fa;
    color: #6c757d;
    text-align: center;
    margin-top: 8px;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.navbar-custom .dropdown-item.fw-bold.bg-light:hover {
    background-color: #e9ecef;
    color: #495057;
    transform: none; /* No slide for the footer link */
    padding-left: 20px;
}

/* Animation Keyframes */
@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translate3d(0, 15px, 0);
    }
    100% {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

/* =========================================
   Mobile Navbar Optimization
   ========================================= */
@media (max-width: 991.98px) {
    .navbar-custom .dropdown-menu {
        display: none; /* Default hidden */
        position: static !important; /* Forces it to push content down */
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: transparent;
        border: none;
        box-shadow: none;
        padding-left: 20px;
        padding-top: 0;
        padding-bottom: 10px;
        min-width: auto;
        /* SCROLL FIX for long lists */
        max-height: 400px; 
        overflow-y: auto;
        /* Hide Scrollbar */
        scrollbar-width: none;  /* Firefox */
        -ms-overflow-style: none;  /* IE and Edge */
    }
    
    .navbar-custom .dropdown-menu::-webkit-scrollbar {
        display: none; /* Chrome, Safari, Opera */
    }

    .navbar-custom .dropdown-menu.show {
        display: block; /* Bootstrap toggles this class */
    }
    
    .navbar-custom .dropdown-item {
        padding: 10px 15px;
        color: #555;
    }

    .navbar-custom .dropdown-item:hover {
        background-color: transparent;
        color: #d10074;
        transform: translateX(5px);
    }

    /* Hide the desktop hover bridge */
    .navbar-custom .dropdown-menu::before {
        display: none;
    }
    
    /* Ensure navbar items have spacing */
    .navbar-nav .nav-item {
        margin-bottom: 5px;
        border-bottom: 1px solid #f0f0f0;
    }
    .navbar-nav .nav-item:last-child {
        border-bottom: none;
    }
}
