/* assets/style.css */
@import url('https://cdn.jsdelivr.net/gh/rastikerdar/vazirmatn@v33.003/Vazirmatn-font-face.css');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
}
body {
    background: #f5f5f5;
    padding-top: 80px;
}

/* ==========================================
   هدر سبز تیره #0A492E
   ========================================== */
header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #0A492E;
    color: #ffffff;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    height: 80px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.5);
    border-bottom: 2px solid #0A492E;
}
.logo-area { 
    display: flex; 
    align-items: center; 
}
.logo-area img { 
    height: 60px; 
    width: auto; 
    background: transparent !important;
    display: block;
}

/* ==========================================
   دکمه تماس با ما
   ========================================== */
.contact-btn {
    background: #ffffff;
    color: #0A492E;
    padding: 6px 18px;
    border-radius: 30px;
    cursor: pointer; font-weight: 600; font-size: 0.9rem;
    transition: 0.3s; border: none;
    text-decoration: none; display: inline-block;
}
.contact-btn:hover { background: #e0e0e0; transform: scale(1.02); }

/* ==========================================
   دکمه‌های اصلی صفحه
   ========================================== */
.main-actions {
    max-width: 800px; margin: 50px auto 30px; padding: 0 15px;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
}
.action-card {
    background: white; padding: 12px 6px; border-radius: 15px;
    text-align: center; text-decoration: none; color: #222;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: 0.3s; border: 1px solid rgba(0,0,0,0.03);
    display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.action-card:hover { transform: translateY(-4px); box-shadow: 0 8px 20px rgba(0,0,0,0.1); }
.action-card .icon { width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; }
.action-card .icon img { width: 100%; height: 100%; object-fit: contain; }
.action-card .icon-text { font-size: 1.2rem; font-weight: bold; }
.action-card .label { font-weight: 700; font-size: 0.8rem; }

/* آیکون‌های متنی */
.qeymat-icon { background: #2d7d46; color: white; border-radius: 50%; width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; }
.submit-icon { background: #111; color: white; border-radius: 50%; width: 35px; height: 35px; display: flex; align-items: center; justify-content: center; border: 2px solid #ffcc00; }

/* ==========================================
   انیمیشن راداری برای دکمه "سپردن ملک"
   ========================================== */
@keyframes radar-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(255, 204, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 204, 0, 0);
    }
}

/* اعمال انیمیشن روی دکمه سپردن ملک در بخش آیکون‌ها */
.action-card .submit-icon {
    animation: radar-pulse 1.5s infinite ease-out;
    position: relative;
    z-index: 1;
}
.action-card .submit-icon::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    width: 100%; height: 100%;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: rgba(255, 204, 0, 0.3);
    z-index: -1;
    animation: radar-pulse 1.5s infinite ease-out;
    animation-delay: 0.2s;
}

/* ==========================================
   انیمیشن راداری برای دکمه شناور موبایل
   ========================================== */
.floating-submit {
    display: none;
    position: fixed; bottom: 25px; left: 20px;
    background: #222; color: white;
    padding: 12px 22px; border-radius: 50px; font-weight: 700;
    cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,0.5);
    z-index: 999; border: 2px solid #ffcc00; transition: 0.3s;
    animation: radar-pulse 1.5s infinite ease-out;
}
.floating-submit:hover { background: #444; transform: scale(1.05); }

/* ==========================================
   مقالات عمودی (۲ ستون)
   ========================================== */
.slider-section { max-width: 1000px; margin: 30px auto; padding: 0 20px; }
.news-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}
.news-card {
    background: white; padding: 15px; border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
    display: flex; flex-direction: column;
    height: 100%;
    border: 1px solid #eee;
}
.news-card h3 { margin: 0 0 8px 0; font-size: 1rem; color: #222; }
.news-card p { color: #555; line-height: 1.6; font-size: 0.9rem; margin-bottom: 10px; flex-grow: 1; }
.news-card .card-actions { 
    display: flex; gap: 10px; margin-top: 10px; align-items: center;
    border-top: 1px solid #eee; padding-top: 10px;
}
.news-card .read-more-btn {
    background: #f0f0f0; border: none; border-radius: 6px;
    padding: 6px 14px; cursor: pointer; font-size: 0.85rem;
    color: #111; font-weight: 600; transition: 0.2s;
}
.news-card .read-more-btn:hover { background: #e0e0e0; }
.share-btn {
    background: #e3f2fd; border: none; border-radius: 6px;
    padding: 6px 14px; cursor: pointer; font-size: 0.85rem;
    color: #0d47a1; font-weight: 600; transition: 0.2s;
    display: flex; align-items: center; gap: 4px;
}
.share-btn:hover { background: #bbdefb; }

/* ==========================================
   فایل‌های ملک (۴ ستون)
   ========================================== */
.listings-section { max-width: 1200px; margin: 20px auto; padding: 0 15px; }
.listings-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
}
.listing-card {
    background: white; border-radius: 12px; padding: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.06); text-align: right;
    display: flex; flex-direction: column;
    border: 1px solid #eee;
}
.listing-card img { 
    width: 100%; height: 220px;
    object-fit: cover; border-radius: 8px; margin-bottom: 10px; background: #eee; 
}
.listing-card .header-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.listing-card .header-row h4 { margin: 0; font-size: 1rem; color: #222; }
.listing-card .deal-badge { font-size: 0.75rem; padding: 3px 12px; border-radius: 20px; font-weight: 700; display: inline-block; }
.deal-sale { background: #e8f5e9; color: #2e7d32; }
.deal-rent { background: #fff3e0; color: #e65100; }

.listing-card .detail-row { font-size: 0.9rem; color: #444; line-height: 1.8; margin: 3px 0; display: flex; gap: 8px; }
.listing-card .detail-row strong { color: #222; min-width: 60px; }
.listing-card .detail-row .price-val { color: #2d7d46; font-weight: bold; font-size: 1.1rem; }
.listing-card .card-actions { 
    margin-top: 12px; display: flex; justify-content: flex-end; gap: 10px;
    border-top: 1px solid #eee; padding-top: 10px;
}
.listing-card .info-btn {
    background: #222; color: white; border: none; border-radius: 6px;
    padding: 6px 14px; cursor: pointer; font-size: 0.85rem; font-weight: 600;
}
.listing-card .info-btn:hover { background: #444; }
.listing-card .share-btn { 
    background: #e3f2fd; border: none; border-radius: 6px; padding: 6px 14px; cursor: pointer; font-size: 0.85rem; color: #0d47a1; font-weight: 600; display: flex; align-items: center; gap: 4px;
}
.listing-card .share-btn:hover { background: #bbdefb; }

/* ==========================================
   مودال‌ها
   ========================================== */
.news-modal, .listing-modal, .share-modal {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); z-index: 3000; justify-content: center; align-items: center;
}
.news-modal.show, .listing-modal.show, .share-modal.show { display: flex; }
.modal-content-base {
    background: white; padding: 30px; width: 95%; max-width: 600px;
    border-radius: 20px; max-height: 85vh; overflow-y: auto;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3); position: relative;
}
.modal-content-base h2 { margin-top: 0; margin-bottom: 15px; color: #222; font-size: 1.2rem; }
.modal-content-base p, .modal-content-base pre { line-height: 1.8; color: #444; white-space: pre-wrap; font-size: 0.9rem; }
.modal-close {
    position: absolute; top: 15px; left: 15px;
    background: #eee; border: none; border-radius: 50%;
    width: 35px; height: 35px; font-size: 1.2rem; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
.modal-close:hover { background: #ddd; }

.share-modal-content { background: white; padding: 25px; width: 90%; max-width: 400px; border-radius: 15px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.2); }
.share-modal-content h3 { margin-top: 0; color: #222; }
.share-modal-content p { color: #555; margin-bottom: 15px; }
.share-modal-content .share-options { display: flex; flex-direction: column; gap: 10px; }
.share-modal-content .share-options button { padding: 12px; border: none; border-radius: 8px; cursor: pointer; font-size: 1rem; font-weight: 600; transition: 0.2s; }
.share-modal-content .share-options .copy-link-btn { background: #e3f2fd; color: #0d47a1; }
.share-modal-content .share-options .copy-link-btn:hover { background: #bbdefb; }
.share-modal-content .share-options .sms-btn { background: #e8f5e9; color: #2e7d32; }
.share-modal-content .share-options .sms-btn:hover { background: #c8e6c9; }
.share-modal-content .close-share-btn { margin-top: 15px; background: #f5f5f5; color: #555; }
.share-modal-content .close-share-btn:hover { background: #e0e0e0; }

.modal { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 2000; justify-content: center; align-items: center; }
.modal.show { display: flex; }
.modal-content { background: white; padding: 25px; width: 95%; max-width: 500px; border-radius: 20px; max-height: 90vh; overflow-y: auto; box-shadow: 0 20px 40px rgba(0,0,0,0.3); }
.modal-content h2 { text-align: center; margin-bottom: 15px; color: #111; }
form label { display: block; margin-top: 12px; font-weight: 600; color: #333; }
form input, form select, form textarea { width: 100%; padding: 10px; margin-top: 5px; border: 1px solid #ccc; border-radius: 8px; font-size: 0.95rem; }
.form-actions { display: flex; justify-content: space-between; gap: 15px; margin-top: 20px; }
.btn-submit { background: #111; color: white; padding: 10px; border: none; border-radius: 8px; cursor: pointer; flex: 1; font-weight: bold; }
.btn-cancel { background: #aaa; color: white; padding: 10px; border: none; border-radius: 8px; cursor: pointer; flex: 1; font-weight: bold; }

/* ==========================================
   فوتر
   ========================================== */
footer { background: #111; color: #ccc; padding: 35px 20px; text-align: center; margin-top: 40px; }
footer h3 { color: white; font-size: 1.3rem; margin-bottom: 10px; }
footer p { margin: 6px 0; font-size: 0.9rem; line-height: 1.8; }

/* ==========================================
   واکنش‌گرایی
   ========================================== */
@media (max-width: 992px) { 
    .listings-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 768px) {
    body { padding-top: 70px; }
    header { padding: 0 15px; height: 60px; }
    .logo-area img { height: 45px; }
    .contact-btn { padding: 6px 16px; font-size: 0.85rem; }
    .main-actions { max-width: 600px; grid-template-columns: repeat(3, 1fr); gap: 10px; }
    .news-grid { grid-template-columns: 1fr; }
    .listings-grid { grid-template-columns: repeat(2, 1fr); }
    
    /* در موبایل دکمه شناور نمایش داده می‌شود */
    .floating-submit { display: block; }
    
    .listing-card .detail-row { font-size: 0.8rem; }
}
@media (max-width: 450px) { 
    .listings-grid { grid-template-columns: 1fr; }
}
@media (min-width: 769px) { 
    .floating-submit { display: none !important; }
}