:root {
    --primary-color: #2e7d32;
    --primary-light: #4caf50;
    --primary-dark: #1b5e20;
    --secondary-color: #f8f9fa;
    --accent-color: #ffc107;
    --text-color: #333;
    --light-text: #6c757d;
}

body {
    font-family: Vazirmatn, 'Segoe UI', Tahoma, sans-serif;
    background-color: #f5f5f5;
    color: var(--text-color);
    padding-top: 56px;
}

.navbar {
    background-color: var(--primary-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    transition: color 0.3s;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
}

.nav-link:hover {
    color: #fff !important;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('https://images.unsplash.com/photo-1591607388349-4bb2f3455c4c?ixlib=rb-4.0.3&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=1600&q=80') no-repeat center center;
    background-size: cover;
    color: white;
    padding: 100px 0;
    text-align: center;
    margin-bottom: 30px;
}

.service-card {
    transition: transform 0.3s, box-shadow 0.3s;
    border: none;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.service-icon {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover {
    background-color: var(--primary-color);
    color: white;
}

footer {
    background-color: var(--primary-color);
    color: white;
    padding: 30px 0;
    margin-top: 50px;
}

.social-icons a {
    color: white;
    font-size: 1.5rem;
    margin-left: 15px;
    transition: color 0.3s;
}

.social-icons a:hover {
    color: var(--accent-color);
}

.section-title {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 15px;
    text-align: center;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 50%;
    transform: translateX(50%);
    width: 80px;
    height: 3px;
    background-color: var(--accent-color);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
}

.stats-text {
    font-size: 1.1rem;
    color: var(--light-text);
}

.contact-info {
    background-color: var(--primary-light);
    color: white;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
}

.islamic-pattern {
    background-color: var(--primary-dark);
    opacity: 0.1;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.islamic-design {
    position: relative;
    overflow: hidden;
}

.islamic-design::before {
    content: "";
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, transparent 20%, var(--primary-dark) 20%, var(--primary-dark) 80%, transparent 80%, transparent), radial-gradient(circle, transparent 20%, var(--primary-dark) 20%, var(--primary-dark) 80%, transparent 80%, transparent) 50px 50px;
    background-size: 100px 100px;
    opacity: 0.05;
    transform: rotate(45deg);
    z-index: 0;
}

.feature-icon {
    width: 70px;
    height: 70px;
    background-color: rgba(46, 125, 50, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
}

.feature-icon i {
    font-size: 30px;
    color: var(--primary-color);
}

.prayer-time {
    background: linear-gradient(45deg, var(--primary-dark), var(--primary-light));
    color: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* صفحه لاودینگ */
#loading {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--primary-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}


/* مودال صفحات در دست ساخت */
.modal-content {
    border-radius: 10px;
    border: none;
}

.modal-header {
    background-color: var(--primary-color);
    color: white;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}

.btn-close {
    filter: invert(1);
}

/* چت آنلاین */
.chat-container {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 350px;
    height: 450px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow: hidden;
    transition: all 0.3s;
}

.chat-header {
    background-color: var(--primary-color);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

.message {
    max-width: 
    
    /* PWA Specific Styles */
.pwa-install-btn {
    position: fixed;
    bottom: 80px;
    left: 20px;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.network-status {
    position: fixed;
    top: 70px;
    right: 20px;
    padding: 10px 15px;
    border-radius: 5px;
    z-index: 1050;
    font-size: 14px;
    display: none;
}

.network-status.online {
    background-color: #28a745;
    color: white;
}

.network-status.offline {
    background-color: #dc3545;
    color: white;
}

/* PWA Installation Prompt */
.pwa-install-modal {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    z-index: 1060;
    display: none;
}

.pwa-install-modal.show {
    display: block;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from { transform: translateY(100px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.pwa-install-content {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pwa-install-icon {
    font-size: 2rem;
    color: #2e7d32;
}

.pwa-install-text {
    flex: 1;
}

.pwa-install-buttons {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

/* App-like styles for standalone mode */
@media all and (display-mode: standalone) {
    body {
        padding-top: env(safe-area-inset-top);
        padding-bottom: env(safe-area-inset-bottom);
    }
    
    .navbar {
        padding-top: env(safe-area-inset-top);
        height: calc(60px + env(safe-area-inset-top));
    }
    
    .pwa-install-btn {
        display: none !important;
    }
}

/* Safe area insets for notch devices */
@supports(padding: max(0px)) {
    .safe-area-top {
        padding-top: max(env(safe-area-inset-top), 15px);
    }
    
    .safe-area-bottom {
        padding-bottom: max(env(safe-area-inset-bottom), 15px);
    }
    
    .safe-area-left {
        padding-left: max(env(safe-area-inset-left), 15px);
    }
    
    .safe-area-right {
        padding-right: max(env(safe-area-inset-right), 15px);
    }
}

/* Splash screen style for PWA */
.app-splash {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #2e7d32, #1b5e20);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease-out;
}

.app-splash.hidden {
    opacity: 0;
    pointer-events: none;
}

.app-splash-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    animation: bounce 1s infinite alternate;
}

@keyframes bounce {
    from { transform: scale(1); }
    to { transform: scale(1.1); }
}

.app-splash-text {
    color: white;
    font-size: 1.2rem;
    margin-top: 20px;
}