/* assets/css/single-ad.css */

/* ================= RESET & FONTS ================= */
* { box-sizing: border-box; margin: 0; padding: 0; outline: none; }
body {
    font-family: 'Vazirmatn', sans-serif;
    background-color: #fcfcfc;
    color: #333;
    display: flex; flex-direction: column; min-height: 100vh;
    line-height: 1.6;
}
a { text-decoration: none; color: inherit; transition: 0.2s; }
ul { list-style: none; }
button { font-family: inherit; cursor: pointer; }

/* ================= HEADER STYLE (Matching About Page) ================= */
.header {
    background: #fff;
    border-bottom: 1px solid #eee;
    padding: 15px 0;
    position: sticky; top: 0; z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.02);
}

.container { width: 92%; max-width: 1200px; margin: 0 auto; }
.header-inner { display: flex; justify-content: space-between; align-items: center; }

/* Right: Logo & Menu */
.header-right { display: flex; align-items: center; gap: 40px; }

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: #368BCC; /* Blue Brand */
    letter-spacing: -0.5px;
}

.nav ul { display: flex; gap: 25px; }
.nav a {
    font-size: 0.85rem; /* ریزتر */
    color: #666; /* خاکستری */
    font-weight: 500;
}
.nav a:hover, .nav a.active { color: #368BCC; }

/* Left: Auth & Post Ad */
.header-left { display: flex; align-items: center; gap: 20px; }

.post-ad-link {
    font-size: 0.9rem;
    color: #444;
    font-weight: 600;
}
.post-ad-link:hover { color: #000; }

.auth-btn {
    background-color: #368BCC;
    color: #fff;
    border: none;
    /* تنظیمات دقیق طبق درخواست */
    border-radius: 6px; 
    padding: 8px 24px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}
.auth-btn:hover { background-color: #2b7ab3; }

.menu-toggle { display: none; background: none; border: none; font-size: 1.6rem; }

/* Mobile Menu Styles */
@media (max-width: 992px) {
    .nav { display: none; }
    .menu-toggle { display: block; }
    .post-ad-link { display: none; }
}
.mobile-menu {
    position: fixed; top: 0; right: -280px; width: 280px; height: 100%;
    background: #fff; z-index: 1002; transition: 0.3s; padding: 20px;
    box-shadow: -5px 0 15px rgba(0,0,0,0.1); display: flex; flex-direction: column;
}
.mobile-menu.active { right: 0; }
.mobile-menu-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 30px; }
.logo-mobile { font-weight: 800; color: #368BCC; font-size: 1.2rem; }
.close-mobile-menu { background: none; border: none; font-size: 2rem; }
.mobile-nav li { margin-bottom: 15px; border-bottom: 1px solid #f0f0f0; padding-bottom: 10px; }
.mobile-menu-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.5); z-index: 1001;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.mobile-menu-overlay.active { opacity: 1; visibility: visible; }

/* ================= PAGE CONTENT ================= */
.page-content { flex: 1; padding: 30px 0 60px; }
.breadcrumb { margin-bottom: 25px; font-size: 0.85rem; color: #888; display: flex; align-items: center; gap: 8px; }
.breadcrumb .separator { font-size: 0.7rem; color: #ccc; }

/* Grid Layout */
.ad-grid { display: grid; grid-template-columns: 1fr 360px; gap: 30px; align-items: start; }
.right-column { display: flex; flex-direction: column; gap: 30px; }

/* Gallery & Info */
.gallery-section, .info-section { background: #fff; border-radius: 12px; padding: 25px; border: 1px solid #f0f0f0; }
.main-img-wrapper { width: 100%; aspect-ratio: 16/9; background: #f8f9fa; border-radius: 8px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.main-img-wrapper img { max-width: 100%; max-height: 100%; object-fit: contain; }

.info-header .badge { background: #eef6fc; color: #368BCC; padding: 5px 12px; border-radius: 6px; font-size: 0.8rem; }
.info-header h1 { font-size: 1.6rem; margin: 15px 0; color: #222; font-weight: 700; }
.meta-row { display: flex; gap: 20px; color: #777; font-size: 0.85rem; }

.divider { border: 0; border-top: 1px solid #eee; margin: 25px 0; }
.description h3 { font-size: 1.1rem; margin-bottom: 10px; font-weight: 700; }
.description p { text-align: justify; color: #555; line-height: 1.9; font-size: 0.95rem; }

.owner-card { background: #f9f9f9; padding: 15px; border-radius: 8px; margin-top: 25px; display: flex; align-items: center; gap: 15px; border: 1px solid #eee; }
.owner-icon { font-size: 2.5rem; color: #ccc; }
.owner-details h4 { margin: 0; font-size: 0.95rem; font-weight: 700; color: #333; }
.owner-details .caption { font-size: 0.75rem; color: #888; }

/* Booking Box (Left) */
.left-column { position: sticky; top: 100px; }
.booking-box { background: #fff; border-radius: 12px; padding: 25px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); border: 1px solid #eaeaea; }
.price-display { text-align: center; margin-bottom: 25px; }
.price-display .amount { font-size: 1.8rem; font-weight: 800; color: #368BCC; }
.price-display .unit { color: #999; font-size: 0.8rem; display: block; margin-top: 4px; }

.form-group { margin-bottom: 15px; }
.form-group label { display: block; font-size: 0.85rem; margin-bottom: 6px; color: #555; font-weight: 500; }
.date-picker-row { display: flex; align-items: center; gap: 10px; background: #fdfdfd; padding: 10px; border-radius: 6px; border: 1px solid #ddd; }
.date-picker-row input { width: 100%; border: none; background: transparent; text-align: center; font-family: inherit; color: #333; cursor: pointer; font-size: 0.9rem; }
.calc-details { background: #f0f7ff; padding: 10px; border-radius: 6px; margin-bottom: 15px; color: #368BCC; font-size: 0.85rem; text-align: center; border: 1px dashed #cfe2ff; }

.extras-box { margin-bottom: 20px; }
.checkbox-item { display: flex; gap: 8px; margin-bottom: 12px; cursor: pointer; align-items: flex-start; }
.checkbox-item input { margin-top: 4px; accent-color: #368BCC; }
.chk-text b { display: block; font-size: 0.85rem; color: #444; }
.chk-text small { color: #888; font-size: 0.75rem; }

.form-select { width: 100%; padding: 10px; border-radius: 6px; border: 1px solid #ddd; font-family: inherit; background: #fff; color: #444; font-size: 0.9rem; }
.total-price-row { display: flex; justify-content: space-between; align-items: center; border-top: 1px dashed #ddd; padding-top: 15px; margin-top: 15px; font-weight: 700; font-size: 1rem; }
#totalPriceTxt { color: #368BCC; }

.btn-submit-booking { width: 100%; background: #368BCC; color: #fff; border: none; padding: 12px; border-radius: 8px; font-size: 0.95rem; font-weight: 700; margin-top: 20px; cursor: pointer; transition: 0.3s; }
.btn-submit-booking:hover { background: #2a73a8; }
.msg-box { margin-top: 15px; font-size: 0.85rem; text-align: center; display: none; }
.msg-box.error { color: #d32f2f; display: block; }
.msg-box.success { color: #388e3c; display: block; }

/* States */
.state-box { text-align: center; padding: 80px 20px; margin: 40px auto; max-width: 600px; }
.spinner { width: 40px; height: 40px; border: 4px solid #eee; border-top-color: #368BCC; border-radius: 50%; margin: 0 auto 20px; animation: spin 1s infinite linear; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* ================= FOOTER STYLE (Matching About Page) ================= */
.footer {
    background-color: #111; /* مشکی خالص طبق درخواست */
    color: #fff;
    padding: 50px 0 20px;
    margin-top: auto;
    font-size: 0.9rem;
}
.footer-container { display: flex; flex-direction: column; align-items: center; gap: 20px; text-align: center; }

.footer-links { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: #ddd; font-weight: 500; font-size: 0.85rem; }
.footer-links a:hover { color: #fff; }

.footer-legal { display: flex; gap: 20px; flex-wrap: wrap; justify-content: center; }
.footer-legal a { font-size: 0.75rem; color: #888; }
.footer-legal a:hover { color: #aaa; }

.footer-social { display: flex; align-items: center; gap: 15px; margin-top: 10px; }
.footer-social span { color: #666; font-size: 0.8rem; }
.footer-social a i { font-size: 1.4rem; transition: transform 0.2s; }
.footer-social a:hover i { transform: scale(1.15); }

/* آیکون‌های رنگی */
.icon-insta { color: #d62976; }
.icon-linkedin { color: #0a66c2; }

.footer-copyright { width: 100%; border-top: 1px solid #222; padding-top: 20px; color: #555; font-size: 0.75rem; margin-top: 20px; }

/* Scroll Top Button */
#backToTopBtn {
    position: fixed; bottom: 30px; right: 30px; width: 45px; height: 45px;
    background: #6200ea; /* بنفش */
    color: #fff; border: none; border-radius: 50%;
    font-size: 1.5rem; cursor: pointer; 
    box-shadow: 0 4px 15px rgba(98, 0, 234, 0.4);
    transition: 0.3s; opacity: 0; visibility: hidden; z-index: 999;
    display: flex; align-items: center; justify-content: center;
}
#backToTopBtn.show { opacity: 1; visibility: visible; }
#backToTopBtn:hover { background: #7c4dff; transform: translateY(-3px); }

/* Responsive Grid */
@media (max-width: 900px) {
    .ad-grid { grid-template-columns: 1fr; }
    .left-column { position: static; order: 2; margin-top: 0; }
    .right-column { order: 1; }
}
