body {
    font-family: 'Arial', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f4; /* Light grey background */
    color: #000000; /* Black text */
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    align-items: center; /* Center content horizontally */
}

html {
  background-color: #21486f;
}

/* Top Bar with Date, Friday Prayer Time, and Compact Prayer Times */
#top-bar {
    top: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff; /* White top bar */
    color: #000000; /* Black text */
    padding: 5px 0;
    z-index: 1001; /* Ensure it's above the header */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center; /* Center the content horizontally */
}

#top-bar .top-bar-container {
    width: 100%;
    max-width: 1200px; /* Match main content width */
    display: flex;
    justify-content: space-between; /* Space between date and prayer times */
    align-items: center;
    padding: 0 20px; /* Add padding to the sides */
    box-sizing: border-box;
}

#date-and-friday {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

#today-date {
    font-size: 1.1em;
    font-weight: bold;
    color: #000000; /* Black text */
}

#friday-prayer {
    font-size: 0.9em;
    color: #000000; /* Black text */ 
}

#compact-prayer-times table {
    border-collapse: collapse;
}

#compact-prayer-times table th,
#compact-prayer-times table td {
    padding: 5px 10px;
    text-align: center;
    font-size: 0.9em;
    color: #000000; /* Black text */
}

#compact-prayer-times table th {
    background-color: #ffffff;  White background 
    color: #D4AF37; /* Gold text for headers */
}

#compact-prayer-times table tr {
    background-color: rgba(0, 0, 0, 0.05); /* Light grey for rows */
}

#compact-prayer-times table tr:hover {
    background-color: rgba(0, 0, 0, 0.1); /* Slightly darker grey on hover */
}

header {
    background-color: #ffffff; /* White header */
    padding: 20px 0; /* Adjust padding */
    width: 100%;
    top: 140px;
    display: flex;
    justify-content: center; /* Center the header container */
    transition: all 0.3s;
    box-sizing: border-box;
    z-index: 1000;
}

#prayer-times-day {
    margin: 20px 0;
    padding: 20px;
    max-width: 1200px;
    margin: auto auto;
}

#prayer-times-table table {
    width: 100%;
    border-collapse: collapse;
}

#prayer-times-table table th,
#prayer-times-table table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

#prayer-times-table table th {
    color: #D4AF37; /* Gold for headers */
}

#prayer-times-table table tr:hover {
    background-color: #f1f1f1; /* Light grey on hover */
}

header h1 {
    color: #20486F;
}

.header-container {
    width: 100%;
    max-width: 1200px; /* Same max-width as the main content */
    display: flex;
    align-items: center;
    justify-content: space-between; /* Space out logo and nav */
    padding: 0 20px; /* Add padding to the sides */
    box-sizing: border-box;
}

header.shrink {
    padding: 10px 0; /* Adjust padding when shrunk */
}

header.shrink .logo img {
    height: 60px; /* Smaller logo */
}

header.shrink h1 {
    font-size: 1.5em; /* Smaller text */
}

header.shrink nav ul li {
    font-size: 0.9em; /* Smaller navigation items */
}

.logo {
    display: flex;
    align-items: center;
    gap: 30px; /* Space between logo and title */
    flex-shrink: 0; /* Prevent logo from shrinking */
}

.logo img {
    height: 100px; /* Initial logo size */
    transition: height 0.3s;
}

#menu-icon {
    display: none; /* Hide by default */
    font-size: 2em;
    cursor: pointer;
}

nav {
    display: flex;
    align-items: center;
}

nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 20px; /* Space between menu items */
}

nav ul li {
    display: inline-block;
}

nav ul li a, .dropdown-btn {
    text-decoration: none;
    color: #000000; /* Black text */
    font-size: 1.1em;
    padding: 5px 10px;
    border-radius: 5px;
    transition: all 0.3s ease;
    border: none;
    background: none;
    text-align: left;
    outline: none;
}

.menu-logos {
    background-color: white;
    max-width: 1200px;
    margin: auto auto;
    display: table;
    padding: 40px;
    table-layout: fixed;
}

.logo-item {
    padding: 0px 20px;
    width: 33%;
    display: table-cell;
    text-align: center;
}

/* Add an active class to the active dropdown button */
.active {
  background-color: #f4f4f4;
  color: white;
}

/* Dropdown container (hidden by default). Optional: add a lighter background color and some left padding to change the design of the dropdown content */
.dropdown-container {
  display: none;
  background-color: #f4f4f4;
  position: absolute;
}

.dropdown-container li a {
    display: block;
}

nav ul li a:hover, .dropdown-btn:hover {
    background-color: rgba(0, 0, 0, 0.1); /* Light grey background on hover */
    color: #000000; /* Black text */
    transform: translateY(-2px); /* Slight lift effect */
}

#donate {
    background-color: #D4AF37;
    color: white;
}

nav ul li a:active, .dropdown-btn:active {
    transform: translateY(0); /* Reset lift effect when clicked */
}

main {
    padding-top: 0px; /* Adjust based on header height */
    width: 100%;
    box-sizing: border-box;
    margin-top: 0px;
}

#welcome-message {
    text-align: center;
    padding: 40px 20px;
    margin: auto auto;
    max-width: 1200px; /
}

#welcome-message h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #D4AF37; /* Gold for titles */
}

#welcome-message p, a {
/*    font-size: 1.2em;*/
    color: #555;
}

#prayer-times {
    background-color: #ffffff;
    margin: 20px 0;
    padding: 20px;
    margin: auto auto;
    overflow: hidden;
}

#newspaper-notice {
    background-color: #f4f4f4;
    margin: 20px 0;
    padding: 20px;
    margin: auto auto;
    overflow: hidden;
}

#prayer-times h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    color: #D4AF37; /* Gold for titles */
}

#newspaper-notice h2 {
    text-align: center;
    font-size: 2em;
    margin-bottom: 20px;
    color: #D4AF37; /* Gold for titles */
}

#prayer-times table {
    width: 100%;
    border-collapse: collapse;
}

#prayer-times table th,
#prayer-times table td {
    padding: 12px;
    text-align: center;
    border-bottom: 1px solid #ddd;
}

#prayer-times table th {
    color: #D4AF37; /* Gold for headers */
}

#prayer-times table tr:hover {
    background-color: #f1f1f1; /* Light grey on hover */
}

#khutba-times {
    background-color: #fff;
    padding: 20px;
}

.prayer-times-inner {
    max-width: 1200px;
    margin: auto auto;
    width: 100% !important;
}

.newspaper-notice-inner {
    max-width: 1200px;
    margin: auto auto;
    width: 100% !important;
}

.khutba {
    max-width: 1200px;
    margin: auto auto;
}

#khutba-times h2 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #D4AF37; /* Gold for titles */
}

#khutba-times p {
    font-size: 1.2em;
    color: #555;
}

.closebtn {
    display: none;
}

/* Optional: Style the caret down icon */
.fa-caret-down {
  float: right;
  padding-right: 8px;
  padding-left: 8px;
}

.form-row {
    display: flex;
    align-items: flex-end;
    width: 100%;
    margin-bottom: 5px;
}

.form-col {
    width: 100%;
    margin-right: 3%;
}

.form-col2 {
    width: 50%;
    margin-right: 3%;
}

.form-col2 input {
    width: 100%;
}

.form-col input {
    width: 100%;
}

.form-group textarea {
    width: 97%;
}

.submit-btn {
    margin-top: 10px;
    font-size: 1em;
}

footer {
    background-color: #21486f;
    color: white;
    text-align: center;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

@media (min-width:1101px) {
    .dropdown:hover .dropdown-container {
      display: block;
    }

    .dropdown-container li {
        display: block;
    }
}

.general-info {
    max-width: 1200px;
    padding: 20px;
    margin: auto auto;
}

.general-info h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #D4AF37;
}

.general-details p, ul {
    font-size: 1.2em;
    color: #555;
    margin: 10px 0;
}

.general-details a {
    font-size: 1em;
    color: #555;
}

/* Contact Page Styles */
#contact-info {
    background-color: #fff;
    margin: 0px 0;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#contact-info h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #D4AF37;
}

.contact-details p, ul {
    font-size: 1.2em;
    color: #555;
    margin: 10px 0;
}


.contact-details a {
    color: #D4AF37; /* Gold for links */
    text-decoration: none;
    font-weight: bold;
}

.contact-details a:hover {
    text-decoration: underline; /* Underline on hover */
}

#map {
    background-color: #fff;
/*    margin: 20px 0;*/
    padding: 20px;
}

.map-inner {
    max-width: 1200px;
    margin: auto auto;
}

#map h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #D4AF37;
}

#map iframe {
    width: 100%;
    height: 450px;
    border: none;
    border-radius: 10px;
}

#ramadan-countdown {
    background-color: #f4f4f4; 
    margin: 20px 0;
    padding: 20px;
    text-align: center;
}

/* Ramadan Countdown Section */
#announcements {
    background-color: #f4f4f4; /* White background */
    padding: 40px 0px;
    text-align: center;
}

#announcements h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #D4AF37; /* Gold for titles */
}

#ramadan-countdown h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #D4AF37; /* Gold for titles */
}

#countdown-timer {
    font-size: 1.5em;
    color: #000000; /* Black text */
    font-weight: bold;
}

#countdown-timer p {
    margin: 0;
}

/* Hijri Calendar Section */
#hijri-calendar {
    background-color: #ffffff; /* White background */
    margin: 20px 0;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    text-align: center;
}

/* Calendar Grid */
#calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr); /* 7 columns for days of the week */
    gap: 10px;
    margin-top: 20px;
}

.calendar-header {
    background-color: #D4AF37; /* Gold */
    color: #ffffff; /* White */
    padding: 10px;
    text-align: center;
    font-weight: bold;
    border-radius: 5px;
}

.calendar-day {
    background-color: #f4f4f4; /* Light grey */
    padding: 10px;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.calendar-day:hover {
    background-color: #e0e0e0; /* Slightly darker grey on hover */
}

.calendar-day.selected {
    background-color: #D4AF37; /* Gold for selected day */
    color: #ffffff; /* White text */
}

#hijri-calendar h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #D4AF37; /* Gold for titles */
}

/* Calendar Controls */
#calendar-controls {
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

#calendar-controls label {
    font-weight: bold;
}

#calendar-controls select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
}

button {
    padding: 5px 10px;
    background-color: #D4AF37; /* Gold */
    color: #ffffff; /* White */
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

button:hover {
    background-color: #b38f2b; /* Darker gold */
}


#prayer-times-day h2 {
    font-size: 2em;
    margin-bottom: 20px;
    color: #D4AF37; /* Gold for titles */
}

.stop-scrolling {
  height: 100%;
  overflow: hidden;
}

.checkbox-list li:before {
    content: '☑';
    font-size: 1.5em;
}

.all-img {
    width: 100%;
    min-height: 400px;
    background-size: auto, cover;
    background-blend-mode: normal;
    background-position: center;
    background-repeat: no-repeat;
}

#main-img {
    background-position: center;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgb(0 0 0 / 42%) 100%), url(../public/masjid_inside.jpg);
    background-position: 50% 55%;   
}

#shahadas-img {
    background-position: 50% 22%;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgb(0 0 0 / 42%) 100%), url(https://plus.unsplash.com/premium_photo-1678463088816-883bdbdd8941?q=80&w=3687&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D);
}

#imam-img {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgb(0 0 0 / 42%) 100%), url(https://images.pexels.com/photos/8164512/pexels-photo-8164512.jpeg?auto=compress&cs=tinysrgb&w=1260&h=750&dpr=2);
}

#nikah-img {
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgb(0 0 0 / 42%) 100%), url(https://images.unsplash.com/photo-1714321624458-c6f56b602b80?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D);
}

#events-img {
    background-position: 50% 100%;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgb(0 0 0 / 42%) 100%), url(https://images.pexels.com/photos/29833372/pexels-photo-29833372/free-photo-of-interior-of-istiqlal-mosque-during-prayer-time.jpeg);
}

#janaza-img {
    background-position: 50% 90%;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgb(0 0 0 / 42%) 100%), url(https://images.unsplash.com/photo-1600814832809-579119f47045?q=80&w=2923&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D);
}

#donate-img {
    background-position: 50% 60%;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgb(0 0 0 / 42%) 100%), url(https://images.unsplash.com/photo-1561414927-6d86591d0c4f?q=80&w=3473&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D);
}

#about-img {
    background-position: 50% 60%;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgb(0 0 0 / 42%) 100%), url(https://images.unsplash.com/photo-1506463108611-88834e9f6169?q=80&w=3540&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D);
}

#volunteer-img {
    background-position: 50% 65%;
    background-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.25) 0%, rgb(0 0 0 / 42%) 100%), url(https://images.unsplash.com/photo-1559027615-cd4628902d4a?q=80&w=3548&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D);
}

.main-gallery {
    max-width: 1200px;
    margin: auto auto;
}

.gallery-cell {
  width: 95%;
  padding-right: 5px;
  padding-left: 5px;

  height: 500px;
  /* flex-box, center image in cell */
  display: -webkit-box;
  display: -webkit-flex;
  display:         flex;
  -webkit-box-pack: center;
  -webkit-justify-content: center;
          justify-content: center;
  -webkit-align-items: center;
          align-items: center;
}

.gallery-cell img {
    max-height: 100%;
    max-width: 100%;
}

@media screen and ( min-width: 768px ) {
  /* half-width cells for larger devices */
  .gallery-cell { width: 40%; }
}

.gallery-cell img:hover {opacity: 0.7;}

/* The Modal (background) */
.modal {
  display: none; /* Hidden by default */
  position: fixed; /* Stay in place */
  z-index: 1; /* Sit on top */
  padding-top: 100px; /* Location of the box */
  left: 0;
  top: 0;
  width: 100%; /* Full width */
  height: 100%; /* Full height */
  overflow: auto; /* Enable scroll if needed */
  background-color: rgb(0,0,0); /* Fallback color */
  background-color: rgba(0,0,0,0.9); /* Black w/ opacity */
  overscroll-behavior: contain;
}

/* Modal Content (image) */
.modal-content {
  margin: auto;
  display: block;
  width: 80%;
  max-width: 700px;
  padding-bottom: 10%;
}

/* Add Animation */
.modal-content, #caption {  
  -webkit-animation-name: zoom;
  -webkit-animation-duration: 0.6s;
  animation-name: zoom;
  animation-duration: 0.6s;
}

@-webkit-keyframes zoom {
  from {-webkit-transform:scale(0)} 
  to {-webkit-transform:scale(1)}
}

@keyframes zoom {
  from {transform:scale(0)} 
  to {transform:scale(1)}
}

/* The Close Button */
.close {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  transition: 0.3s;
}

.close:hover,
.close:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* 100% Image Width on Smaller Screens */
@media only screen and (max-width: 700px){
  .modal-content {
    width: 100%;
  }
}

#welcome-message1 {
    text-align: center;
    padding: 200px 20px;
    margin: 0px 0;
}

#welcome-message1 h2 {
    font-size: 2.5em;
    margin-bottom: 10px;
    color: #FFFFFF; /* Gold for titles */
}

hr { 
  display: block;
  margin-top: 0.5em;
  margin-bottom: 40px;
  margin-left: auto;
  margin-right: auto;
  border-style: inset;
  border-width: 0.1px;
} 

input, textarea {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px; /* Rounder corners */
    font-size: 1em;
    outline: none; /* Remove default focus outline */
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

label {
    font-size: 1.2em;
    align-items: center;
    line-height: 35px;
}

textarea:focus, input:focus {
    border-color: #D4AF37; /* Gold border on focus */
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.5); /* Subtle gold shadow on focus */
}

#frame-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-top: 100%; /* 1:1 Aspect Ratio */
}

#volunteer-iframe {
  position: absolute;
  top: 0;
  left: 0;
  bottom: 0;
  right: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Responsive Design for Small Screens */
@media (max-width: 1100px) {
    .header-container {
        flex-direction: row; /* Keep logo and title on the left, menu icon on the right */
        align-items: center;
    }

    .logo {
        flex-basis: auto; /* Reset flex-basis */
        justify-content: center; /* Center logo and title */
    }

    .logo h1 {
        font-size: 1.2em; /* Smaller title for mobile */
    }

    #menu-icon {
        display: block; /* Show the hamburger icon */
    }

    #today-date  {
        display: none; /* Hide today's date on small screens */
    }

    #compact-prayer-times table {
        width: 100%; /* Ensure the table fits within the mobile width */
        table-layout: fixed;
    }

    .prayer-times-inner table {
        table-layout: fixed;
    }

    #compact-prayer-times table td {
        padding: 5px 5px;
    }

    #top-bar .top-bar-container {
        width: auto;
        padding: 0;
        flex-wrap: wrap-reverse;
        justify-content: center;
    }

    #friday-prayer {
        margin: 5px 0 0 0;
    }

    .active {
      background-color: #e0e0e0;
    }

    .dropdown-container {
      position: relative;
    }

    .dropdown-container li a {
        padding-left: 40px;
    }

    nav {
        display: none; /* Hide the nav by default on small screens */
        position: fixed;
        top: 10px; /* Below the header */
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #ffffff; /* White background */
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    nav ul {
        flex-direction: column; /* Stack menu items vertically */
        gap: 0px; /* Reduce gap between menu items */
    }

    nav ul li {
        width: 100%; /* Full width for each menu item */
    }

    nav ul li a, .dropdown-btn {
        display: block; /* Make the entire line clickable */
        padding: 10px 20px; /* Add padding for better touch targets */
        width: 100%;
        box-sizing: border-box;
    }

    header.shrink nav ul li {
        font-size: 1.1em; 
    }

    #prayer-times-day {
        padding: 10px;
    }

    #prayer-times-table {
        overflow: hidden;
    }

    #prayer-times-table table {
        table-layout: fixed;
    }

    #prayer-times-table table td {
        width: 100% !important; /* Ensure the table fits within the mobile width */
        overflow: hidden;
        font-size: 0.9em;
        padding: 4px;
    }

    #welcome-message h2,
    #welcome-message1 h2 {
        font-size: 2em;
    }

    #welcome-message p {
        font-size: 1em;
    }

    #prayer-times, #newspaper-notice {
        padding: 0px;
    }

    #prayer-times h2,
    #newspaper-notice h2,
    #khutba-times h2,
    #ramadan-countdown h2, #announcements h2 {
        font-size: 1.5em;
    }

    #announcements {
        padding: 20px 5px 40px 5px;
    }

    #prayer-times-table table th,
    #prayer-times table th,
    #prayer-times table td {
        padding: 4px;
    }

    .closebtn {
      display: block;
      top: 0;
      right: 25px;
      font-size: 36px;
      margin-right: 20px;
      text-decoration: none;
      text-align: right;
    }

    .menu-logos {
        margin: auto auto;
        display: block;
        table-layout: none;
    }

    #shahadas-img, #imam-img, #nikah-img, #events-img, #janaza-img, #donate-img, #about-img, #volunteer-img {
        min-height: 120px;
        max-height: 120px;
    }

    #volunteer-img {
        background-position: 50% 85%;
    }

    .logo-item {
        padding: 0px 0px 20px;
        width: 100%;
        display: block;
        text-align: center;
    }

    .general-details p, ul {
        font-size: 1em;
    }

    .form-row, .form-group textarea {
        display: block;
        max-width: 300px;
    }

    .form-col {
        width: 100%;
        margin-right: 0;
    }

    .form-col2 {
        width: 100%;
        margin-right: 0;
    }

    .general-info {
        padding: 10px;
    }

     /* Hide the sidebar when the screen is maximized */
    @media (min-width: 1101px) {
        nav {
            display: flex !important; /* Force the nav to display on larger screens */
            position: static; /* Reset position */
            box-shadow: none; /* Remove shadow */
        }

        #menu-icon {
            display: none; /* Hide the hamburger icon on larger screens */
        }
    }
}
