/* ============================================
   QRealEstate - Main Stylesheet
   ============================================ */

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    --secondary: #64748b;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;
    --info: #06b6d4;
    --dark: #1e293b;
    --gray-900: #0f172a;
    --gray-800: #1e293b;
    --gray-700: #334155;
    --gray-600: #475569;
    --gray-500: #64748b;
    --gray-400: #94a3b8;
    --gray-300: #cbd5e1;
    --gray-200: #e2e8f0;
    --gray-100: #f1f5f9;
    --gray-50: #f8fafc;
    --white: #ffffff;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --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);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --transition: all 0.3s ease;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--gray-800);
    background-color: var(--gray-50);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul, ol {
    list-style: none;
}

/* === Container === */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* === Header === */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 0;
    gap: 1rem;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.logo i {
    font-size: 1.75rem;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-links a {
    color: var(--gray-700);
    font-weight: 500;
    padding: 0.5rem 0;
    position: relative;
}

.nav-links a:hover {
    color: var(--primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--gray-700);
    cursor: pointer;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

.btn-text {
    background: transparent;
    color: var(--gray-600);
    padding: 0.5rem;
}

.btn-text:hover {
    color: var(--primary);
}

.btn-danger {
    background: var(--danger);
    color: var(--white);
}

.btn-danger:hover {
    background: #dc2626;
    color: var(--white);
}

.btn-white {
    background: var(--white);
    color: var(--primary);
}

.btn-white:hover {
    background: var(--gray-100);
    color: var(--primary-dark);
}

.btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
}

.btn-block {
    width: 100%;
}

.btn-search {
    padding: 0.75rem 1.5rem;
}

/* === Flash Messages === */
.flash-message {
    padding: 1rem;
    margin: 1rem 0;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: relative;
}

.flash-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.flash-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.flash-close {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: inherit;
    opacity: 0.5;
}

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

/* === Hero Section === */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></svg>');
    opacity: 0.3;
}

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

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.2;
}

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

/* === Search Box === */
.search-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-xl);
    margin-bottom: 2rem;
}

.search-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr auto;
    gap: 1rem;
    align-items: end;
}

.search-field {
    position: relative;
}

.search-field i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.search-field input,
.search-field select {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: var(--transition);
    background: var(--white);
}

.search-field input:focus,
.search-field select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* === Hero Stats === */
.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* === Sections === */
.section {
    padding: 4rem 0;
}

.section-gray {
    background: var(--gray-100);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.section-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--gray-900);
}

/* === Property Grid === */
.property-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.property-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

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

.property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.property-badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--white);
}

.badge-sale {
    background: var(--success);
}

.badge-rent {
    background: var(--info);
}

.property-type {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
    color: var(--white);
}

.property-info {
    padding: 1.25rem;
}

.property-title {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.property-title a {
    color: var(--gray-900);
}

.property-title a:hover {
    color: var(--primary);
}

.property-location {
    color: var(--gray-500);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.property-location i {
    margin-left: 0.25rem;
}

.property-company {
    font-size: 0.8rem;
    margin-bottom: 0.5rem;
}

.property-company i {
    color: var(--primary);
    margin-left: 0.25rem;
}

.property-company a {
    color: var(--primary);
    font-weight: 500;
}

.property-company a:hover {
    text-decoration: underline;
}

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

.property-details span {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.property-details i {
    color: var(--gray-400);
}

.property-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.property-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
}

.property-views {
    font-size: 0.75rem;
    color: var(--gray-400);
}

/* === Features Grid === */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    background: var(--white);
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 1rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--gray-900);
}

.feature-card p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* === CTA Section === */
.cta-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
}

.cta-content h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cta-content p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 1.5rem;
}

/* === Page Header === */
.page-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
}

.page-header p {
    opacity: 0.9;
}

/* === Filters Bar === */
.filters-bar {
    background: var(--white);
    padding: 1.5rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    margin-bottom: 2rem;
}

.filters-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group input,
.filter-group select {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: var(--transition);
}

.filter-group input:focus,
.filter-group select:focus {
    outline: none;
    border-color: var(--primary);
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--gray-700);
    font-size: 0.875rem;
    transition: var(--transition);
}

.page-link:hover {
    background: var(--gray-100);
    color: var(--primary);
}

.page-link.active {
    background: var(--primary);
    color: var(--white);
    border-color: var(--primary);
}

/* === Property Detail === */
.property-detail {
    padding: 2rem 0;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.breadcrumb a {
    color: var(--primary);
}

.breadcrumb span {
    color: var(--gray-400);
}

.property-detail-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.property-gallery {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.gallery-main {
    height: 400px;
    overflow: hidden;
}

.gallery-main img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem;
    overflow-x: auto;
}

.gallery-thumbs .thumb {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    cursor: pointer;
    opacity: 0.6;
    transition: var(--transition);
    border: 2px solid transparent;
}

.gallery-thumbs .thumb:hover,
.gallery-thumbs .thumb.active {
    opacity: 1;
    border-color: var(--primary);
}

.property-summary {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.property-header {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.property-type-badge {
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
    background: var(--gray-100);
    color: var(--gray-600);
}

.property-summary h1 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--gray-900);
}

.property-price-box {
    background: var(--gray-50);
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.price-label {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-bottom: 0.25rem;
}

.price-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.price-period {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.property-quick-info {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.info-item {
    text-align: center;
    padding: 0.75rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.info-item i {
    font-size: 1.25rem;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.info-item span {
    display: block;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.info-item strong {
    display: block;
    font-size: 1rem;
    color: var(--gray-900);
}

.property-actions {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.property-actions .btn {
    flex: 1;
}

.property-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--gray-400);
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

/* === Detail Sections === */
.property-detail-sections {
    display: grid;
    gap: 1.5rem;
}

.detail-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.detail-section h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
}

.description {
    color: var(--gray-600);
    line-height: 1.8;
}

.amenities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

.amenity-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: var(--gray-50);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
}

.amenity-item i {
    color: var(--success);
}

.agent-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.agent-avatar {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--white);
}

.agent-info h3 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.agent-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* === Similar Properties === */
.similar-properties {
    margin-top: 2rem;
}

.similar-properties h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

/* === Forms === */
.form-container {
    max-width: 800px;
    margin: 0 auto;
}

.form-section {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
}

.form-section h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border);
    color: var(--gray-800);
}

.form-section h2 i {
    color: var(--primary);
    margin-left: 0.5rem;
}

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

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.375rem;
    color: var(--gray-700);
}

.required {
    color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: 0.875rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

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

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

.form-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* === Input with Icon === */
.input-with-icon {
    position: relative;
}

.input-with-icon i {
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--gray-400);
}

.input-with-icon input {
    padding-right: 2.5rem;
}

/* === Checkbox === */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.875rem;
}

.checkbox-label input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

/* === Amenities Checkboxes === */
.amenities-checkboxes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 0.75rem;
}

/* === File Upload === */
.file-upload {
    position: relative;
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
}

.file-upload:hover {
    border-color: var(--primary);
    background: var(--gray-50);
}

.file-upload input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.file-upload-label i {
    font-size: 2rem;
    color: var(--gray-400);
    margin-bottom: 0.5rem;
}

.file-upload-label span {
    display: block;
    color: var(--gray-500);
}

.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
    margin-top: 1rem;
}

.image-preview img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

/* === Alerts === */
.alert {
    padding: 1rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-error ul {
    margin-right: 1.5rem;
    list-style: disc;
}

/* === Auth Section === */
.auth-section {
    padding: 4rem 0;
    min-height: calc(100vh - 200px);
    display: flex;
    align-items: center;
}

.auth-container {
    max-width: 450px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.auth-header {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-header h1 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.auth-footer {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.875rem;
}

/* === Profile === */
.profile-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 2rem;
}

.profile-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.profile-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.profile-avatar {
    width: 80px;
    height: 80px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--white);
    margin: 0 auto 1rem;
}

.profile-card h3 {
    font-size: 1.25rem;
    margin-bottom: 0.25rem;
}

.profile-card p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.member-since {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border);
}

.profile-menu {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.profile-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--gray-700);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.profile-menu a:last-child {
    border-bottom: none;
}

.profile-menu a:hover,
.profile-menu a.active {
    background: var(--gray-50);
    color: var(--primary);
}

.profile-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border);
}

.content-header h2 {
    font-size: 1.25rem;
}

.my-properties {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.my-property-card {
    display: grid;
    grid-template-columns: 120px 1fr auto;
    gap: 1rem;
    padding: 1rem;
    background: var(--gray-50);
    border-radius: var(--radius);
    align-items: center;
}

.my-property-card .property-image {
    width: 120px;
    height: 90px;
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.my-property-card .property-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.my-property-card .property-info h3 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.my-property-card .property-info p {
    font-size: 0.875rem;
    color: var(--gray-500);
    margin-bottom: 0.5rem;
}

.property-stats {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: var(--gray-400);
}

.my-property-card .property-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 3rem;
    color: var(--gray-500);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--gray-300);
}

.empty-state h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--gray-700);
}

.empty-state p {
    margin-bottom: 1rem;
}

/* === Modal === */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: var(--radius-lg);
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 1.125rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--gray-400);
}

.modal-close:hover {
    color: var(--gray-600);
}

.modal-content form {
    padding: 1.5rem;
}

/* === About Page === */
.about-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.about-text h2 {
    font-size: 1.5rem;
    margin: 1.5rem 0 0.75rem;
    color: var(--gray-900);
}

.about-text h2:first-child {
    margin-top: 0;
}

.about-text p {
    color: var(--gray-600);
    line-height: 1.8;
    margin-bottom: 1rem;
}

.about-text ul {
    margin-right: 1.5rem;
    list-style: disc;
}

.about-text li {
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.stat-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-card .stat-number {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-card .stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* === Contact Page === */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 2rem;
}

.contact-info {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.contact-info h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

.contact-item:last-child {
    border-bottom: none;
}

.contact-item i {
    font-size: 1.25rem;
    color: var(--primary);
    margin-top: 0.25rem;
}

.contact-item h4 {
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.contact-item p {
    font-size: 0.875rem;
    color: var(--gray-500);
}

.contact-form-wrapper {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.contact-form-wrapper h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

/* === Error Page === */
.error-page {
    padding: 6rem 0;
    text-align: center;
}

.error-content h1 {
    font-size: 6rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.error-content h2 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.error-content p {
    color: var(--gray-500);
    margin-bottom: 1.5rem;
}

.error-actions {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

/* === Footer === */
.footer {
    background: var(--gray-900);
    color: var(--gray-300);
    padding: 3rem 0 1rem;
    margin-top: auto;
}

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

.footer-col h3 {
    color: var(--white);
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.footer-col h4 {
    color: var(--white);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.footer-col p {
    font-size: 0.875rem;
    line-height: 1.7;
}

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

.footer-col ul a {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.footer-col ul a:hover {
    color: var(--white);
}

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

.social-links a {
    width: 36px;
    height: 36px;
    background: var(--gray-800);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-400);
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary);
    color: var(--white);
}

.contact-info li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

.contact-info i {
    color: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-800);
    font-size: 0.875rem;
    color: var(--gray-500);
}

/* === Companies Grid === */
.companies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2rem;
}

.company-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.company-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.company-card-header {
    position: relative;
    padding: 1.5rem;
    background: linear-gradient(135deg, var(--gray-50) 0%, var(--white) 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.company-logo {
    width: 70px;
    height: 70px;
    background: var(--white);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    color: var(--primary);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 2px solid var(--gray-100);
}

.company-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-badges {
    display: flex;
    gap: 0.5rem;
}

.badge-verified {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    background: #d1fae5;
    color: #065f46;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 600;
}

.company-card-body {
    padding: 1.5rem;
    flex: 1;
}

.company-name {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.company-name a {
    color: var(--gray-900);
}

.company-name a:hover {
    color: var(--primary);
}

.company-description {
    color: var(--gray-500);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.company-stats {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.company-stats .stat {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.8rem;
    color: var(--gray-500);
}

.company-stats .stat i {
    color: var(--primary);
}

.company-card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border);
    background: var(--gray-50);
}

/* === Company Header (Show Page) === */
.company-header {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.company-logo-large {
    width: 100px;
    height: 100px;
    background: var(--white);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    color: var(--primary);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-md);
    border: 3px solid var(--white);
}

.company-logo-large img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.company-header-info h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 2rem;
    margin-bottom: 0.75rem;
    color: var(--white);
}

.company-header-info p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
}

.company-header-info .company-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 0;
}

.company-header-info .company-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--white);
}

.company-header-info .company-stats i {
    color: #fbbf24;
}

/* === Company Content === */
.company-content {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 2rem;
}

.company-contact {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    height: fit-content;
    position: sticky;
    top: 100px;
}

.company-contact h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    color: var(--gray-900);
}

.company-contact ul li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.875rem;
    color: var(--gray-600);
}

.company-contact ul li:last-child {
    border-bottom: none;
}

.company-contact i {
    color: var(--primary);
    width: 20px;
    font-size: 1rem;
}

.company-properties {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}

.company-properties h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    color: var(--gray-900);
}

/* === Reviews === */
.company-reviews {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-top: 1.5rem;
}

.company-reviews h2 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    color: var(--gray-900);
}

.review-form {
    background: var(--gray-50);
    padding: 1.25rem;
    border-radius: var(--radius);
    margin-bottom: 1.5rem;
}

.rating-input {
    display: flex;
    flex-direction: row-reverse;
    gap: 0.25rem;
}

.rating-input input {
    display: none;
}

.rating-input label {
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--gray-300);
    transition: var(--transition);
}

.rating-input label:hover,
.rating-input label:hover ~ label,
.rating-input input:checked ~ label {
    color: #fbbf24;
}

.reviews-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.review-card {
    background: var(--gray-50);
    padding: 1.25rem;
    border-radius: var(--radius);
    border-right: 3px solid var(--primary);
}

.review-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.review-stars {
    display: flex;
    gap: 0.25rem;
}

.review-stars i {
    color: var(--gray-300);
    font-size: 0.875rem;
}

.review-stars i.active {
    color: #fbbf24;
}

.review-card p {
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.review-date {
    font-size: 0.75rem;
    color: var(--gray-400);
}

.no-reviews {
    text-align: center;
    color: var(--gray-500);
    padding: 2rem;
}

/* === Register Type === */
.register-type {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
}

.radio-label:hover {
    border-color: var(--primary);
}

.radio-label input[type="radio"] {
    accent-color: var(--primary);
}

.radio-label input[type="radio"]:checked + span {
    color: var(--primary);
    font-weight: 600;
}

.radio-label i {
    font-size: 1.25rem;
    color: var(--primary);
}

/* === Responsive === */
@media (max-width: 992px) {
    .search-row {
        grid-template-columns: 1fr 1fr;
    }

    .property-detail-grid {
        grid-template-columns: 1fr;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .company-content {
        grid-template-columns: 1fr;
    }

    .company-header {
        flex-direction: column;
        text-align: center;
    }

    .company-stats {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .search-row {
        grid-template-columns: 1fr;
    }

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

    .property-quick-info {
        grid-template-columns: 1fr 1fr;
    }

    .my-property-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .my-property-card .property-image {
        width: 100%;
        height: 150px;
    }

    .my-property-card .property-actions {
        flex-direction: row;
        justify-content: center;
    }

    .property-actions {
        flex-direction: column;
    }

    .filters-form {
        grid-template-columns: 1fr;
    }

    .companies-grid {
        grid-template-columns: 1fr;
    }

    .register-type {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero-stats {
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 1.5rem;
    }

    .property-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: 1fr;
    }

    .error-content h1 {
        font-size: 4rem;
    }

    .error-actions {
        flex-direction: column;
    }
}
