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

:root {
    --primary-color: #1a5490;
    --secondary-color: #2d7ab5;
    --accent-color: #e8b923;
    --text-color: #333;
    --light-bg: #f8f9fa;
    --border-color: #ddd;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #fff;
}

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

/* Navbar */
.navbar {
    background-color: var(--primary-color);
    color: white;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

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

.navbar-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    letter-spacing: 1px;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    flex-wrap: wrap;
}

.nav-link {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
    font-weight: 500;
}

.nav-link:hover {
    color: var(--accent-color);
}

.language-switcher select {
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.15);
    color: white;
    font-weight: 600;
}

.language-switcher select option {
    color: #111;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

body.rtl {
    text-align: right;
}

body.rtl .nav-menu,
body.rtl .navbar-controls {
    flex-direction: row-reverse;
}

body.rtl .zmanim-item,
body.rtl #directory-results,
body.rtl .shul-card,
body.rtl .service-card,
body.rtl .property-card {
    text-align: right;
}

body.rtl .zmanim-item {
    border-left: none;
    border-right: 4px solid var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero-content p {
    font-size: 1.5rem;
    opacity: 0.95;
}

/* Sections */
.section {
    padding: 4rem 0;
    border-bottom: 1px solid var(--border-color);
}

.section:last-child {
    border-bottom: none;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.section-title-with-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
}

.section-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.section-icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.section-header p {
    font-size: 1.1rem;
    color: #666;
}

/* Grid Layouts */
.zmanim-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.zmanim-date {
    grid-column: 1 / -1;
    text-align: center;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: -0.5rem;
}

.zmanim-summary {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.zmanim-summary-item {
    background: #eef5ff;
    border: 1px solid #cfe0f5;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.zmanim-summary-item strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 0.35rem;
}

.shuls-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.realestate-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

/* Card Styles */
.zmanim-item {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: 8px;
    border-left: 4px solid var(--primary-color);
    transition: transform 0.3s ease;
}

.zmanim-item:hover {
    transform: translateY(-5px);
}

.zmanim-item strong {
    color: var(--primary-color);
    display: block;
    margin-bottom: 0.5rem;
}

.shul-card,
.service-card,
.property-card {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.shul-card:hover,
.service-card:hover,
.property-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}

.shul-card h3,
.service-card h3,
.property-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    border-bottom: 2px solid var(--accent-color);
    padding-bottom: 0.5rem;
}

.shul-card ul {
    list-style-position: inside;
    margin-top: 0.5rem;
}

.shul-card li {
    margin: 0.3rem 0;
    color: #555;
}

.service-card ul {
    list-style: none;
}

.service-card li {
    margin: 0.5rem 0;
    padding-left: 1rem;
}

/* Weather Card */
.weather-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2rem;
    border-radius: 8px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.weather-current {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.weather-info {
    font-size: 1.2rem;
    margin: 1rem 0;
}

.weather-location {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.weather-condition {
    font-size: 1.1rem;
    margin: 1rem 0;
}

.weather-feels-like {
    margin-top: 1rem;
    font-size: 0.9rem;
    opacity: 0.9;
}

.temperature {
    font-size: 3rem;
    font-weight: bold;
    margin: 1rem 0;
}

.weather-icon {
    font-size: 4rem;
    margin: 1rem 0;
}

.forecast-section {
    margin-top: 2rem;
    text-align: left;
}

.forecast-section h3 {
    text-align: center;
    margin-bottom: 1rem;
}

.forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
}

.hourly-forecast-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
    gap: 0.75rem;
}

.forecast-item {
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.hourly-forecast-item {
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 8px;
    padding: 0.85rem 0.65rem;
    text-align: center;
}

.forecast-day {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.hourly-time {
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 0.35rem;
}

.forecast-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.hourly-icon {
    font-size: 1.7rem;
    margin-bottom: 0.35rem;
}

.forecast-temps {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.hourly-temp {
    font-weight: 700;
    margin-bottom: 0.2rem;
}

.forecast-text {
    font-size: 0.9rem;
    opacity: 0.95;
}

.hourly-precip {
    font-size: 0.82rem;
    opacity: 0.9;
}

/* Directory */
.directory-info {
    background: var(--light-bg);
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
}

.directory-search {
    margin: 2rem 0;
}

#directory-search {
    width: 100%;
    max-width: 500px;
    padding: 0.75rem;
    font-size: 1rem;
    border: 2px solid var(--primary-color);
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

#directory-search:focus {
    outline: none;
    border-color: var(--secondary-color);
}

#directory-results {
    margin-top: 2rem;
    text-align: left;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 2rem;
    color: #999;
    font-size: 1.1rem;
}

/* Footer */
footer {
    background-color: var(--primary-color);
    color: white;
    padding: 2rem 0;
    text-align: center;
    margin-top: 4rem;
}

footer p {
    margin: 0.5rem 0;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }

    .navbar-controls {
        justify-content: center;
    }

    .weather-current {
        gap: 1rem;
    }

    .nav-menu {
        gap: 1rem;
        font-size: 0.9rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1.1rem;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .temperature {
        font-size: 2rem;
    }

    .weather-icon {
        font-size: 3rem;
    }
}

@media (max-width: 480px) {
    .nav-menu {
        gap: 0.5rem;
        font-size: 0.8rem;
    }

    .logo {
        font-size: 1.2rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .section {
        padding: 2rem 0;
    }

    .section-header h2 {
        font-size: 1.5rem;
    }
}

/* Print Styles */
@media print {
    .navbar,
    footer {
        background-color: #333;
    }
}
