/* --- General Setup --- */
:root {
    --primary-color: #16a085; /* A nice teal color */
    --secondary-color: #1abc9c;
    --dark-text: #333;
    --light-text: #fff;
    --background-color: #f9f9f9;
    --border-color: #e0e0e0;
    --card-bg: #fff;
    --footer-bg: #ecf0f1;
    --footer-dark-bg: #bdc3c7;
}

body {
    font-family: 'Nunito', sans-serif;
    margin: 0;
    background-color: var(--background-color);
    color: var(--dark-text);
    line-height: 1.6;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- Header --- */
.site-header {
    background-color: #1b6e73;
    padding: 15px 0;
    color: var(--light-text);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 1.5rem;
    font-weight: 700;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
}

.main-nav li {
    margin-left: 25px;
}

.main-nav a {
    color: var(--light-text);
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #f1c40f;
}

/* --- Main Content & Hero --- */
.page-content {
    padding: 40px 20px;
}

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 10px;
    color: var(--dark-text);
}

.hero p {
    font-size: 1.2rem;
    color: #777;
}

.search-container {
    margin-top: 20px;
}

#city-search {
    width: 100%;
    max-width: 500px;
    padding: 15px;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* --- City Grid --- */
.city-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

.city-card {
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.city-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.city-card h2 {
    margin: 0 0 5px 0;
    color: var(--primary-color);
    font-size: 1.4rem;
}

.city-card p {
    margin: 0;
    color: #888;
}

/* --- Footer --- */
.site-footer {
    background-color: var(--footer-bg);
    color: #555;
    padding-top: 40px;
}

.site-footer .container {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-about, .footer-links {
    flex-basis: 45%;
}

.footer-links ul {
    list-style: none;
    padding: 0;
}

.footer-links a {
    color: #555;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.copyright-bar {
    text-align: center;
    padding: 15px 0;
    margin-top: 30px;
    background-color: var(--footer-dark-bg);
    color: #444;
}

#modal-city-name {
    color: var(--primary-color);
    margin-top: 0;
}

#modal-date {
    color: #777;
    margin-bottom: 20px;
    font-size: 0.9rem;
}

.prayer-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.prayer-table th, .prayer-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.prayer-table th {
    background-color: var(--background-color);
}

.prayer-table td:last-child {
    font-weight: 700;
    color: var(--primary-color);
}

/* --- Share Buttons --- */
.share-buttons p {
    margin-bottom: 10px;
    font-weight: bold;
}
.share-btn {
    display: inline-block;
    padding: 10px 20px;
    margin-right: 10px;
    border-radius: 5px;
    color: white;
    text-decoration: none;
    font-weight: bold;
    transition: opacity 0.3s;
}
.share-btn:hover {
    opacity: 0.9;
}
.share-btn.facebook { background-color: #3b5998; }
.share-btn.twitter { background-color: #1da1f2; }

/* --- Other Pages (Sitemap, Contact) --- */
.sitemap-list {
    list-style-type: none;
    padding: 0;
    columns: 2;
}

.sitemap-list li {
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.contact-info {
    margin-top: 20px;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .city-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .site-header .container {
        flex-direction: column;
    }
    .main-nav ul {
        margin-top: 15px;
    }
    .footer-about, .footer-links {
        flex-basis: 100%;
        text-align: center;
    }
    .sitemap-list {
        columns: 1;
    }
}

@media (max-width: 576px) {
    .city-grid {
        grid-template-columns: 1fr;
    }
    .hero h1 {
        font-size: 2rem;
    }
}
/* --- New City Page Styles --- */
.city-card {
    /* Make the entire card a clickable link without ugly default styles */
    text-decoration: none;
    color: inherit;
    display: block; /* Make the <a> tag behave like a div */
}

.city-page-header {
    text-align: center;
    margin-bottom: 40px;
}

.city-page-header h1 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.city-page-header p {
    color: #777;
    font-size: 1rem;
}

.city-page-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.prayer-times-panel {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.content-section {
    margin-bottom: 30px;
}

.content-section h3 {
    border-bottom: 2px solid var(--primary-color);
    padding-bottom: 10px;
    margin-bottom: 15px;
    color: var(--dark-text);
}

.suggested-cities-section {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.suggested-cities-section h2 {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2rem;
}

/* Responsive adjustments for city page */
@media (max-width: 992px) {
    .city-page-grid {
        grid-template-columns: 1fr;
    }
}
/* --- Sitemap Page Updates --- */
.sitemap-list {
    list-style-type: none;
    padding: 0;
    columns: 2; /* Creates the two-column layout */
    -webkit-columns: 2;
    -moz-columns: 2;
}

.sitemap-list li a {
    display: block; /* Makes the entire area clickable */
    padding: 10px 5px;
    border-bottom: 1px solid #eee;
    text-decoration: none;
    color: var(--dark-text);
    transition: background-color 0.3s ease;
}

.sitemap-list li a:hover {
    background-color: #f0fdfa; /* A very light teal on hover */
    color: var(--primary-color);
}

@media (max-width: 576px) {
    .sitemap-list {
        columns: 1; /* Switch to a single column on small screens */
    }
}


/* --- Responsive Navigation (Hamburger Menu) --- */
.nav-toggle {
    display: none; /* Hidden by default */
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 0.5em;
}

.hamburger-bar {
    display: block;
    width: 25px;
    height: 3px;
    background: var(--light-text);
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
}

/* Styles for mobile view */
@media (max-width: 768px) {
    .nav-toggle {
        display: block; /* Show the hamburger */
        position: absolute;
        top: 15px;
        right: 20px;
        z-index: 1001; /* Make sure it's above other elements */
    }
    
    .main-nav ul {
        display: none; /* Hide the nav links by default */
        flex-direction: column;
        position: absolute;
        top: 65px; /* Position it below the header */
        left: 0;
        right: 0;
        background-color: var(--primary-color);
        text-align: center;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .main-nav.is-open ul {
        display: flex; /* Show the nav links when menu is open */
    }

    .main-nav li {
        margin: 0;
    }

    .main-nav li a {
        display: block;
        padding: 1rem;
        width: 100%;
        border-bottom: 1px solid var(--secondary-color);
    }

    /* Animate the hamburger icon into an 'X' */
    .main-nav.is-open .hamburger-bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .main-nav.is-open .hamburger-bar:nth-child(2) {
        opacity: 0;
    }
    .main-nav.is-open .hamburger-bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
}
/* --- Logo Image Style --- */
.logo-img {
    max-height: 40px; /* Adjust this value as needed */
    width: auto;
    display: block;
}
/* --- Updated Logo and Title Styles --- */
.logo a {
    display: flex; /* Aligns items horizontally */
    align-items: center; /* Aligns items vertically in the middle */
    gap: 10px; /* Creates space between the image and text */
    text-decoration: none; /* Removes the underline from the link */
}

.logo-text {
    color: var(--light-text);
    font-size: 1.5rem;
    font-weight: 700;
    white-space: nowrap; /* Prevents the text from wrapping */
}