/* ============================================
   CONNECT Platform - Main Stylesheet
   Modern, Clean Design for Rishtey + Property
   ============================================ */

/* CSS Variables - Updated for Modern Trust-First Design */
:root {
    /* New Palette: Soft Blue (Trust) & Green (Success) */
    --primary-color: #2563EB;
    --primary-dark: #1D4ED8;
    --primary-light: #DBEAFE;
    
    --secondary-color: #16A34A;
    --secondary-dark: #15803D;
    
    --accent-color: #F59E0B; /* Gold for features */
    
    --success-color: #10B981;
    --warning-color: #F59E0B;
    --error-color: #EF4444;
    
    --dark-color: #111827;
    --light-color: #F9FAFB;
    --white: #ffffff;
    
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 1rem;
    
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-color);
    background-color: var(--gray-100);
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 0.5em;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

/* Container */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.logo span {
    color: var(--secondary-color);
}

.nav {
    display: flex;
    gap: 30px;
}

.nav a {
    color: var(--gray-700);
    font-weight: 500;
    padding: 10px;
    transition: var(--transition);
}

.nav a:hover,
.nav a.active {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    gap: 8px;
}

.btn-primary {
    background: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary-color);
    color: var(--white);
}

.btn-secondary:hover {
    background: var(--secondary-dark);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-success {
    background: var(--success-color);
    color: var(--white);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 1.125rem;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.25rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

/* Section */
.section {
    padding: 60px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 40px;
}

.section-header h2 {
    color: var(--dark-color);
}

.section-header p {
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.card-image {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.card-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: var(--primary-color);
    color: var(--white);
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.card-badge.featured {
    background: var(--warning-color);
}

.card-badge.consultant {
    background: var(--secondary-color);
}

.card-body {
    padding: 20px;
}

.card-title {
    font-size: 1.125rem;
    margin-bottom: 10px;
    color: var(--dark-color);
}

.card-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.card-meta {
    display: flex;
    gap: 15px;
    font-size: 0.875rem;
    color: var(--gray-600);
    margin-bottom: 15px;
}

.card-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.card-footer {
    padding: 15px 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Grid */
.grid {
    display: grid;
    gap: 30px;
}

.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; }
}

/* Property Card */
.property-card .card-specs {
    display: flex;
    gap: 15px;
    margin-bottom: 10px;
}

.property-card .spec {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.875rem;
    color: var(--gray-600);
}

/* Search & Filters */
.search-section {
    background: var(--white);
    padding: 30px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    margin-top: -50px;
    position: relative;
    z-index: 10;
}

.search-form {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.search-group {
    flex: 1;
    min-width: 150px;
}

.search-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 5px;
    color: var(--gray-700);
}

.search-group input,
.search-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.search-group input:focus,
.search-group select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

/* Filter Bar */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 15px;
}

.filter-tabs {
    display: flex;
    gap: 10px;
}

.filter-tab {
    padding: 8px 16px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--white);
    cursor: pointer;
    transition: var(--transition);
}

.filter-tab:hover,
.filter-tab.active {
    background: var(--primary-color);
    color: var(--white);
    border-color: var(--primary-color);
}

.sort-select {
    padding: 10px 15px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    background: var(--white);
}

/* Modules Section */
.modules {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-top: 60px;
}

@media (max-width: 768px) {
    .modules { grid-template-columns: 1fr; }
}

.module-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 40px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: var(--transition);
}

.module-card:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow-lg);
}

.module-card.rishtey {
    border-top: 4px solid var(--primary-color);
}

.module-card.property {
    border-top: 4px solid var(--secondary-color);
}

.module-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.module-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.module-card p {
    color: var(--gray-600);
    margin-bottom: 25px;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--gray-700);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px var(--primary-light);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 576px) {
    .form-row { grid-template-columns: 1fr; }
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(-20px);
    transition: var(--transition);
}

.modal-overlay.active .modal {
    transform: translateY(0);
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-500);
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}

/* Alerts */
.alert {
    padding: 15px 20px;
    border-radius: var(--radius-md);
    margin-bottom: 20px;
}

.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Property Detail Page */
.property-detail {
    padding: 40px 0;
}

.property-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 15px;
    margin-bottom: 30px;
}

.gallery-main {
    height: 400px;
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    gap: 15px;
}

.gallery-thumb {
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
}

.gallery-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.property-info {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 30px;
}

@media (max-width: 768px) {
    .property-info { grid-template-columns: 1fr; }
    .property-gallery { grid-template-columns: 1fr; }
}

.property-main h1 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.property-location {
    color: var(--gray-600);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.property-highlights {
    display: flex;
    gap: 30px;
    padding: 20px;
    background: var(--gray-100);
    border-radius: var(--radius-md);
    margin-bottom: 30px;
}

.highlight {
    text-align: center;
}

.highlight-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

.highlight-label {
    font-size: 0.875rem;
    color: var(--gray-600);
}

.property-description h3 {
    margin-bottom: 15px;
}

.property-description p {
    color: var(--gray-700);
    margin-bottom: 20px;
}

.property-sidebar {
    position: sticky;
    top: 100px;
}

.contact-box {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.contact-box .price {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.contact-box .btn {
    width: 100%;
    margin-bottom: 10px;
}

/* Footer */
.footer {
    background: var(--gray-800);
    color: var(--white);
    padding: 60px 0 30px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 40px;
}

@media (max-width: 768px) {
    .footer-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 576px) {
    .footer-grid { grid-template-columns: 1fr; }
}

.footer h4 {
    margin-bottom: 20px;
}

.footer ul li {
    margin-bottom: 10px;
}

.footer a {
    color: var(--gray-400);
    transition: var(--transition);
}

.footer a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid var(--gray-700);
    padding-top: 30px;
    text-align: center;
    color: var(--gray-500);
}

/* Utilities */
.text-center { text-align: center; }
.text-primary { color: var(--primary-color); }
.text-secondary { color: var(--secondary-color); }
.text-muted { color: var(--gray-600); }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.d-flex { display: flex; }
.justify-center { justify-content: center; }
.align-center { align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-300);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--gray-600);
}

.empty-state svg {
    width: 100px;
    height: 100px;
    margin-bottom: 20px;
    opacity: 0.5;
}

/* Responsive Navigation */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .nav {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow-md);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition);
    }
    
    .nav.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-toggle {
        display: block;
    }
    
    .hero h1 { font-size: 2rem; }
}

/* Animation */
.fade-in {
    animation: fadeIn 0.5s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
