/* Communities Page Styles */

/* Page Hero */
.page-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    overflow: hidden;
    margin-top: 120px;
}

.page-hero .hero-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.page-hero .hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.page-hero .hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(26, 58, 95, 0.8) 0%, rgba(26, 58, 95, 0.4) 100%);
    z-index: 2;
}

.page-hero .hero-content {
    position: relative;
    z-index: 3;
    height: 100%;
    display: flex;
    align-items: center;
    color: white;
}

.page-hero h1 {
    color: white;
    font-size: 3rem;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.page-hero p {
    color: white;
    font-size: 1.25rem;
    max-width: 700px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Community Types */
.community-types {
    background-color: var(--light);
    padding: var(--spacing-xl) 0;
}

.types-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.type-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    text-align: center;
    padding: var(--spacing-lg);
    transition: var(--transition);
}

.type-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--light-gray);
    border-radius: 50%;
    color: var(--primary);
    font-size: 2rem;
}

.type-card h3 {
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.type-card p {
    color: var(--gray);
    margin-bottom: 1.5rem;
}

/* Featured Communities */
.featured-communities {
    background-color: white;
    padding: var(--spacing-xl) 0;
}

.community-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--spacing-lg);
}

.community-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    background: white;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.community-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.community-image {
    position: relative;
    height: 250px;
}

.community-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.community-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--secondary);
    color: var(--dark);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.8rem;
}

.community-content {
    padding: var(--spacing-md);
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.community-content h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
}

.community-location {
    color: var(--gray);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}

.community-location i {
    margin-right: 0.5rem;
    color: var(--primary);
}

.community-price {
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 0.75rem;
    font-size: 1.1rem;
}

.community-desc {
    color: var(--gray);
    margin-bottom: 1.5rem;
    flex-grow: 1;
    font-size: 0.95rem;
}

.community-stats {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid var(--border-color);
    padding-top: 1rem;
    margin-top: auto;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-weight: 600;
    color: var(--primary);
    font-size: 1.1rem;
}

.stat-label {
    font-size: 0.85rem;
    color: var(--gray);
}

.community-actions {
    display: flex;
    gap: 0.75rem;
}

.community-actions .btn {
    flex: 1;
    text-align: center;
}

/* CTA Section */
.community-cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.community-cta h2 {
    color: white;
    margin-bottom: 1.5rem;
}

.community-cta p {
    max-width: 700px;
    margin: 0 auto 2rem;
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .page-hero {
        height: 50vh;
        min-height: 350px;
    }
    
    .page-hero h1 {
        font-size: 2.2rem;
    }
    
    .page-hero p {
        font-size: 1.1rem;
    }
    
    .community-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .community-actions {
        flex-direction: column;
    }
}