/* Template 2 - Modern Design */
/* Local fonts - Vazirmatn loaded via base.html */

/* Messages Section Styles */
.messages-section {
    margin-bottom: 2rem;
}

.alert {
    border-radius: 8px;
    border: none;
    padding: 1rem 1.5rem;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.btn-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    opacity: 0.7;
    transition: opacity 0.3s;
}

.btn-close:hover {
    opacity: 1;
}

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

body {
    font-family: 'Vazir', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color, #667eea) 0%, var(--secondary-color, #764ba2) 100%);
    color: white;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    min-height: 78px;
}

.navbar {
    padding: 1rem 0;
}

.nav-container {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative; /* allow absolute centering of menu */
}

.nav-logo h2 {
    font-size: 1.8rem;
    font-weight: 700;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 0.6rem;
    align-items: center;
    margin: 0;
    padding: 0;
    position: absolute; /* perfectly center the menu */
    left: 50%;
    transform: translateX(-50%);
    max-width: 90vw;
    flex-wrap: nowrap; /* keep in one row on desktop */
    justify-content: center;
    overflow-x: auto; /* allow scroll if needed */
    -webkit-overflow-scrolling: touch;
}

.nav-menu::-webkit-scrollbar { display: none; }

.nav-menu li {
    display: flex;
    align-items: center;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.75rem;
    border-radius: 4px;
    font-size: 0.95rem;
}

.nav-menu a i {
    font-size: 0.95rem;
    margin-left: 0.3rem;
}

.nav-menu a:hover {
    color: #ffd700;
    transform: translateY(-2px);
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu-toggle:hover {
    color: #ffd700;
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('/static/template1/img/bg.png');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    margin-top: 78px;
}

.hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-button {
    display: inline-block;
    /* background: linear-gradient(45deg, #ff6b6b, #ee5a24); */
    color: white;
    padding: 15px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 2rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.cta-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Properties Section */
.properties {
    padding: 80px 0;
    background: white;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.property-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
}

.property-image {
    height: 250px;
    overflow: hidden;
    position: relative;
}

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image img {
    transform: scale(1.1);
}

.property-content {
    padding: 1.5rem;
}

.property-content h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #2c3e50;
}

.property-location {
    color: #7f8c8d;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.property-details {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.property-details span {
    background: #f8f9fa;
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.9rem;
    color: #555;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.property-price {
    font-size: 1.2rem;
    font-weight: 700;
    color: #e74c3c;
    margin-bottom: 1rem;
}

.view-details {
    display: block;
    background: var(--button-color, #3498db);
    color: white;
    text-align: center;
    padding: 12px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.view-details:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

/* About Section */
.about {
    padding: 80px 0;
    background: linear-gradient(135deg, var(--primary-color, #667eea) 0%, var(--secondary-color, #764ba2) 100%);
    color: white;
}

.about-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.about-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.8;
    opacity: 0.9;
}

/* Contact Section */
.contact {
    padding: 80px 0;
    background: white;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: #2c3e50;
}

.contact-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.contact-item {
    display: flex;
    color: #333;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem;
    background: #f8f9fa;
    border-radius: 10px;
    transition: all 0.3s ease;
}

.contact-item:hover {
    background: #e9ecef;
    transform: translateY(-5px);
}

.contact-item i {
    font-size: 1.5rem;
    color: var(--primary-color, #667eea);
    width: 40px;
    text-align: center;
}

.contact-item span {
    font-weight: 500;
    color: #2c3e50;
}

/* No Properties Section */
.no-properties {
    text-align: center;
    padding: 4rem 0;
    background: #f8f9fa;
    border-radius: 15px;
    margin: 2rem 0;
}

.no-properties-content {
    max-width: 500px;
    margin: 0 auto;
}

.no-properties-content i {
    font-size: 4rem;
    color: #bdc3c7;
    margin-bottom: 1rem;
}

.no-properties-content h3 {
    font-size: 1.5rem;
    color: #7f8c8d;
    margin-bottom: 1rem;
}

.no-properties-content p {
    color: #95a5a6;
    margin-bottom: 2rem;
}

.add-property-btn {
    display: inline-block;
    background: var(--button-color, #3498db);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.add-property-btn:hover {
    filter: brightness(1.05);
    transform: translateY(-2px);
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--primary-color, #667eea) 0%, var(--secondary-color, #764ba2) 100%);
    color: white;
    padding: 3rem 0 1rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-section h4 {
    color: var(--primary-color, #3498db);
    margin-bottom: 1rem;
    font-size: 1.2rem;
    font-weight: 600;
}

.footer-section p {
    color: #bdc3c7;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section ul li a {
    color: #bdc3c7;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section ul li a:hover {
    color: var(--primary-color, #3498db);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.contact-info i {
    color: var(--primary-color, #3498db);
    width: 16px;
}

.social-links {
    display: flex;
    gap: 1rem;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--primary-color, #3498db);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.3s ease;
}

.social-links a:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: 1rem;
    border-top: 1px solid #34495e;
    color: #95a5a6;
}

/* Consultation Section */
.consultation {
    padding: 4rem 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
}

.consultation-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.consultation-info {
    padding-right: 2rem;
}

.consultation-info h2 {
    font-size: 2.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
}

.consultation-info p {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.consultation-features {
    margin-bottom: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
}

.feature-item i {
    color: var(--button-color, #27ae60);
    font-size: 1.2rem;
    margin-left: 1rem;
    width: 20px;
}

.feature-item span {
    color: #2c3e50;
    font-weight: 500;
}

.consultation-info .contact-info h5 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 600;
}

.consultation-info .contact-info .contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 0.8rem;
}

.consultation-info .contact-info .contact-item i {
    color: var(--primary-color, #3498db);
    margin-left: 0.8rem;
    width: 16px;
}

.consultation-info .contact-info .contact-item span {
    color: #7f8c8d;
}

/* Consultation Form */
.consultation-form {
    position: relative;
    font-family: 'Vazir';
}

.form-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.form-header {
    background: var(--primary-color, #3498db);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.form-header h4 {
    margin: 0;
    font-size: 1.3rem;
    font-weight: 600;
}

.form-header i {
    margin-left: 0.5rem;
}

.form-body {
    padding: 2rem;
}

.messages {
    margin-bottom: 1.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2c3e50;
    font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color, #3498db);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 0.3rem;
}

.form-submit {
    margin-top: 2rem;
}

.submit-btn {
    font-family: 'Vazir';
    width: 100%;
    background: var(--button-color, #3498db);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
}

.submit-btn i {
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: block;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 0.5rem;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        transform: none; /* reset centering on mobile */
        background: var(--primary-color, #667eea);
        padding: 1rem;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        display: none;
        z-index: 1000;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .nav-menu li {
        width: 100%;
    }
    
    .nav-menu a {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        border-radius: 8px;
    }
    
    .nav-container {
        position: relative;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .properties-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        grid-template-columns: 1fr;
    }
    
    .consultation-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .consultation-info {
        padding-right: 0;
        text-align: center;
    }
    
    .consultation-info h2 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .feature-item {
        justify-content: center;
    }
    
    .consultation-info .contact-info .contact-item {
        justify-content: center;
    }
} 

/* RTL header fixes */
[dir="rtl"] .nav-container { direction: rtl; }
[dir="rtl"] .nav-menu { flex-direction: row-reverse; }
[dir="rtl"] .nav-menu a i { margin-right: 0.5rem; margin-left: 0; }

/* Compact, uniform RTL navbar */
[dir="rtl"] .header .navbar { padding: 0.4rem 0; }
[dir="rtl"] .nav-menu { gap: 0.6rem; }
[dir="rtl"] .nav-menu li { align-items: stretch; }
[dir="rtl"] .nav-menu a {
  font-size: 0.9rem;
  padding: 0.3rem 0.6rem;
  line-height: 1.7;
  text-align: center;
  min-width: 72px;
}

/* Admin button styling (consistent) */
.admin-btn {
  background: linear-gradient(45deg, var(--button-color, #3498db), #2980b9);
  color: #fff !important;
  padding: 0.45rem 1rem !important;
  border-radius: 999px !important;
  font-weight: 600 !important;
  font-size: 0.92rem !important;
}

/* Remove any gap between header and page */
.hero { margin-top: 0 !important; }