/*
 * New Style CSS for MI Almiftah Website
 * Theme: Light Premium
 * Brand Colors:
 * - Primary: #004d40 (Deep Green)
 * - Accent: #FFD700 (Gold)
 */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,600;0,700;1,600&display=swap');

:root {
    --primary: #004d40;
    --primary-dark: #00251a;
    --primary-light: #00796b;
    --accent: #FFD700;
    --accent-hover: #ffea00;
    --text-dark: #1f2937;
    --text-light: #6b7280;
    --white: #ffffff;
    --bg-light: #f3f4f6;
    --shadow-soft: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-strong: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Outfit', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: var(--bg-light);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: var(--primary);
    transition: all 0.3s ease;
}

a:hover {
    color: var(--accent-hover);
}

/* TOP BAR (For secondary links) */
.top-bar {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 8px 0;
    font-size: 0.85rem;
    position: relative;
    z-index: 1031;
}

.top-bar a {
    color: rgba(255, 255, 255, 0.9);
    margin-left: 15px;
    font-weight: 500;
}

.top-bar a:hover {
    color: var(--accent);
}

/* HEADER / NAVBAR */
.navbar {
    background-color: var(--primary) !important;
    padding: 0.8rem 1rem;
    box-shadow: var(--shadow-strong);
    transition: all 0.3s ease;
    border-bottom: 3px solid var(--accent);
}

.navbar-brand {
    color: var(--accent) !important;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: 0.5px;
    display:flex;
    align-items: center;
}
.navbar-brand i {
    margin-right: 5px;
}

.navbar-toggler {
    border: none;
    color: var(--accent);
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Navigation Links */
.navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    padding: 10px 15px !important;
    position: relative;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 5px;
    left: 50%;
    background-color: var(--accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 80%;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    color: var(--accent) !important;
}

/* Dropdown */
.dropdown-menu {
    border: none;
    border-top: 3px solid var(--accent);
    border-radius: 0 0 8px 8px;
    box-shadow: var(--shadow-strong);
    padding: 0;
    overflow: hidden;
}

.dropdown-item {
    padding: 12px 20px;
    color: var(--primary);
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--primary);
    color: var(--white);
    padding-left: 25px; /* Slide effect */
}

/* Search Box */
.navbar .form-control {
    border: 2px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-radius: 20px 0 0 20px;
    padding-left: 20px;
}

.navbar .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.navbar .form-control:focus {
    background: rgba(255, 255, 255, 0.2);
    border-color: var(--accent);
    box-shadow: none;
    color: white;
}

.navbar .btn-warning {
    background-color: var(--accent);
    border-color: var(--accent);
    color: var(--primary);
    border-radius: 0 20px 20px 0;
    font-weight: 600;
}

.navbar .btn-warning:hover {
    background-color: #eec200;
    color: var(--primary-dark);
}

/* MAIN CONTENT */
.content {
    /* margin-top: 80px; Removed fixed margin since nav might change */
    padding-bottom: 60px;
    min-height: 80vh;
}

/* PAGE TITLE */
.page-title {
    position: relative;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    color: var(--primary);
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    padding-left: 15px;
    border-left: 5px solid var(--accent);
    background: transparent;
    box-shadow: none;
    text-transform: none;
}

/* CARDS */
.card {
    border: none;
    border-radius: 12px;
    background: var(--white);
    box-shadow: var(--shadow-soft);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-strong);
}

.card-img, .card-img-top {
    border-radius: 12px 12px 0 0;
    transition: transform 0.5s ease;
}

.card:hover .card-img, .card:hover .card-img-top {
    transform: scale(1.05);
}

.card-body {
    padding: 1.5rem;
}

.card-title a {
    color: var(--primary);
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    text-decoration: none;
}

.card-title a:hover {
    color: var(--primary-light);
}

/* Splide Slider */
.splide__slide img {
    border-radius: 12px;
    box-shadow: var(--shadow-strong);
}

.splide__pagination__page.is-active {
    background: var(--accent);
}

/* FOOTER */
footer {
    background-color: var(--primary);
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

footer .primary-footer {
    padding: 60px 0 30px;
    background: linear-gradient(to bottom, var(--primary), var(--primary-dark));
}

footer .secondary-footer {
    background-color: var(--primary-dark);
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer h5, footer h4, footer .widget-title {
    color: var(--accent);
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    margin-bottom: 20px;
}

footer a {
    color: rgba(255, 255, 255, 0.8);
}

footer a:hover {
    color: var(--accent);
    padding-left: 5px;
}

/* Social Icons */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: all 0.3s ease;
    margin-right: 8px;
}

.social-icon:hover {
    background: var(--accent);
    color: var(--primary-dark);
    transform: translateY(-3px);
}

/* UTILITIES */
.text-primary { color: var(--primary) !important; }
.text-accent { color: var(--accent) !important; }
.bg-primary { background-color: var(--primary) !important; }
.bg-accent { background-color: var(--accent) !important; }

/* Buttons */
.btn-primary, .action-button {
    background-color: var(--primary);
    border-color: var(--primary);
    padding: 10px 25px;
    border-radius: 30px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-primary:hover, .action-button:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 5px 15px rgba(0, 77, 64, 0.3);
}

/* Return Top */
#return-top {
    background: var(--accent);
    bottom: 30px;
    right: 30px;
    box-shadow: var(--shadow-strong);
    color: var(--primary);
}

#return-top:hover {
    background: var(--white);
    color: var(--primary);
}

/* Responsive */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--primary);
        padding: 1rem;
        border-radius: 8px;
        margin-top: 10px;
        box-shadow: var(--shadow-soft);
    }
    
    .top-bar .text-end {
        text-align: center !important;
        margin-top: 5px;
    }

    .top-bar .col-md-6 {
        text-align: center;
    }
}

/* Redesign Custom Styles */
.welcome-card {
    border-radius: 16px;
    border-left: 6px solid var(--accent);
}
.welcome-img-wrapper {
    position: relative;
    border-radius: 12px;
    padding: 6px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--primary) 100%);
    box-shadow: var(--shadow-soft);
}
.welcome-img-wrapper img {
    border-radius: 8px;
}
.welcome-quote {
    font-size: 1.1rem;
    color: var(--text-dark);
    font-weight: 400;
    line-height: 1.8;
}

/* Sidebar Popular Rank Badges */
.rank-badge {
    position: absolute;
    top: -5px;
    left: -5px;
    width: 24px;
    height: 24px;
    background-color: var(--accent);
    color: var(--primary-dark);
    font-weight: 700;
    font-size: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid var(--white);
    box-shadow: var(--shadow-soft);
    z-index: 10;
}
.sidebar-popular-card {
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    overflow: visible;
}
.sidebar-popular-card:hover {
    transform: translateX(5px) !important;
    box-shadow: var(--shadow-soft) !important;
}
.sidebar-popular-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 8px;
}

/* Sidebar Links Group */
.custom-list-group .list-group-item {
    border: none;
    border-left: 3px solid transparent;
    padding: 12px 15px;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: var(--white);
    margin-bottom: 5px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    color: var(--text-dark);
}
.custom-list-group .list-group-item:hover {
    border-left: 3px solid var(--accent);
    background-color: #f8fafc;
    color: var(--primary) !important;
    transform: translateX(5px);
}

/* Photo & Video Cards */
.gallery-zoom-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: var(--shadow-soft);
}
.gallery-zoom-card img {
    transition: transform 0.5s ease;
}
.gallery-zoom-card:hover img {
    transform: scale(1.08);
}
.gallery-overlay-title {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
    color: var(--white);
    padding: 20px 15px 10px;
    font-size: 0.85rem;
    font-weight: 500;
}

/* Play Button Pulse */
.play-btn-pulse {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.5);
    animation: pulse-white 2s infinite;
    transition: all 0.3s ease;
}
.play-btn-pulse i {
    font-size: 1.5rem;
}
.gallery-zoom-card:hover .play-btn-pulse {
    background: var(--accent);
    color: var(--primary-dark);
    transform: scale(1.1);
}

@keyframes pulse-white {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(255, 255, 255, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
    }
}
