:root {
    --islamic-green: #0a5e2aff;
    --gold: #d4af37;
    --light-gold: #f8e6c0;
    --white: #ffffff;
    --off-white: #f9f9f9;
    --dark-text: #333333;
    --shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--off-white);
    color: var(--dark-text);
    line-height: 1.6;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--islamic-green), #0d7e3d);
    color: var(--white);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    position: relative;
    overflow: hidden;
    position: sticky;
    z-index: 1000;
    top: 0px;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo i {
    font-size: 2.5rem;
    color: var(--gold);
    filter: drop-shadow(0 0 5px rgba(212, 175, 55, 0.5));
}

.logo-text h1 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
}

.logo-text p {
    font-size: 0.9rem;
    opacity: 0.9;
}

.header-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="100" viewBox="0 0 100 100"><text x="10" y="50" font-family="Arial" font-size="20" fill="rgba(255,255,255,0.05)">ﷲ</text></svg>');
    background-repeat: repeat;
    opacity: 0.1;
    z-index: 1;
}

/* Navigation */
nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: var(--transition);
    position: relative;
    padding: 0.5rem 0;
}

nav a:hover {
    color: var(--gold);
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--gold);
    transition: var(--transition);
}

nav a:hover::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(10, 94, 42, 0.8), rgba(10, 94, 42, 0.8)), 
                url('Majestic\ Mosque.jpg') no-repeat center center/cover;
    color: var(--white);
    text-align: center;
    padding: 5rem 2rem;
    position: relative;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.bismillah {
    font-family: 'Traditional Arabic', Arial, sans-serif;
    font-size: 2.5rem;
    color: var(--gold);
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
    display: inline-block;
}

/* Prayer Times Section */
.prayer-times {
    background-color: var(--white);
    padding: 3rem 2rem;
    max-width: 1200px;
    margin: -3rem auto 2rem auto;
    border-radius: 10px;
    box-shadow: var(--shadow);
    position: relative;
    z-index: 3;
}

.section-title {
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

.section-title h2 {
    font-size: 2rem;
    color: var(--islamic-green);
    display: inline-block;
    background-color: var(--white);
    padding: 0 1.5rem;
    position: relative;
    z-index: 2;
}

.section-title::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 1px;
    background-color: #ddd;
    z-index: 1;
}

.prayer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1.5rem;
}

.prayer-card {
    background: linear-gradient(135deg, var(--off-white), var(--white));
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    border-top: 4px solid var(--gold);
}

.prayer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.prayer-card.active {
    background: linear-gradient(135deg, var(--islamic-green), #0d7e3d);
    color: var(--white);
    box-shadow: 0 0 20px rgba(10, 94, 42, 0.3);
}

.prayer-card.active .prayer-name {
    color: var(--gold);
}

.prayer-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--islamic-green);
    margin-bottom: 0.5rem;
}

.prayer-time {
    font-size: 1.5rem;
    font-weight: 700;
}

.prayer-remaining {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 0.5rem;
}

/* Announcements Section */
.announcements {
    padding: 4rem 2rem;
    background-color: var(--off-white);
}

.announcement-container {
    max-width: 1200px;
    margin: 0 auto;
}

.announcement-card {
    background-color: var(--white);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    border-left: 4px solid var(--gold);
    transition: var(--transition);
}

.announcement-card:hover {
    transform: translateX(5px);
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.announcement-title {
    font-size: 1.3rem;
    color: var(--islamic-green);
    font-weight: 600;
}

.announcement-date {
    color: #666;
    font-size: 0.9rem;
}

.announcement-content {
    line-height: 1.7;
}

.announcement-content p {
    word-wrap: break-word;    /* Allows long words or URLs to break */
    overflow-wrap: break-word; /* Same as above, better browser support */
    white-space: normal;       /* Ensure text wraps normally */
    max-width: 100%;           /* Never exceed container width */
    box-sizing: border-box;
}


/* Events Section */
.events {
    padding: 4rem 2rem;
    background-color: var(--white);
}

.event-container {
    max-width: 1200px;
    margin: 0 auto;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.event-card {
    background-color: var(--off-white);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.event-image {
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.event-image::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
}

.event-date {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background-color: var(--gold);
    color: var(--dark-text);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-weight: 600;
    z-index: 2;
}

.event-details {
    padding: 1.5rem;
}

.event-title {
    font-size: 1.3rem;
    color: var(--islamic-green);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.event-time {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.event-desc {
    margin-bottom: 1rem;
    line-height: 1.6;
    word-wrap: break-word;    /* Allows long words or URLs to break */
    overflow-wrap: break-word; /* Same as above, better browser support */
    white-space: normal;       /* Ensure text wraps normally */
    max-width: 100%;           /* Never exceed container width */
    box-sizing: border-box;
}

.event-btn {
    display: inline-block;
    background-color: var(--islamic-green);
    color: var(--white);
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
}

.event-btn:hover {
    background-color: #0d7e3d;
    box-shadow: 0 0 15px rgba(10, 94, 42, 0.3);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--islamic-green), #083a1c);
    color: var(--white);
    padding: 3rem 2rem;
    text-align: center;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--gold);
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--gold);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.social-icons a {
    color: var(--white);
    font-size: 1.5rem;
    transition: var(--transition);
}

.social-icons a:hover {
    color: var(--gold);
    transform: translateY(-3px);
}

.copyright {
    opacity: 0.8;
    font-size: 0.9rem;
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 60px;
    height: 60px;
    background-color: var(--gold);
    color: var(--dark-text);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    transition: var(--transition);
    z-index: 100;
}

.fab:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    nav ul {
        flex-direction: column;
        gap: 1rem;
        display: none;
    }

    nav ul.show {
        display: flex;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h2 {
        font-size: 2rem;
    }

    .bismillah {
        font-size: 2rem;
    }

    .prayer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 480px) {
    .prayer-grid {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 3rem 1rem;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .logo-text h1 {
        font-size: 1.6rem;
    }
}

/* Animation Effects */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.8s ease forwards;
}

.delay-1 { animation-delay: 0.2s; }
.delay-2 { animation-delay: 0.4s; }
.delay-3 { animation-delay: 0.6s; }
.delay-4 { animation-delay: 0.8s; }

/* Glowing Effects */
.glow {
    position: relative;
}

.glow::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.5);
    opacity: 0;
    transition: var(--transition);
}

.glow:hover::after {
    opacity: 1;
}