/* Custom Styles for Chrisdomjay Real Estate */

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f8f9fa;
    --accent-color: #ff6b35;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden; /* Prevent horizontal scroll */
}

/* ===== NAVIGATION ===== */
.navbar {
    transition: var(--transition);
    padding: 0.75rem 0;
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.navbar-brand {
    padding: 0;
    margin-right: 1rem;
}

.navbar-logo {
    height: 40px;
    width: auto;
    transition: var(--transition);
}

.navbar-logo:hover {
    opacity: 0.8;
}

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: var(--transition);
    padding: 0.5rem 1rem !important;
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Mobile navbar adjustments */
.navbar-toggler {
    border: none;
    padding: 0.25rem 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* ===== HERO SECTION ===== */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%) !important;
    color: white;
    padding: 120px 0 80px;
    position: relative;
    overflow: hidden;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-pattern.svg') no-repeat center center;
    background-size: cover;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: clamp(2rem, 5vw, 3.5rem); /* Responsive font size */
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.25rem);
    margin-bottom: 2rem;
    opacity: 0.9;
    line-height: 1.6;
}

.hero-stats {
    margin-top: 2rem;
}

.hero-stats .row {
    justify-content: flex-start;
}

.hero-stats .col-auto {
    margin-right: 2rem;
    margin-bottom: 1rem;
}

.hero-stats span {
    display: block;
}

.hero-image {
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
}

/* ===== SEARCH FORM ===== */
.search-form {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

/* ===== SECTIONS ===== */
.section-padding {
    padding: clamp(3rem, 8vw, 5rem) 0; /* Responsive padding */
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
    line-height: 1.2;
}

.section-subtitle {
    font-size: clamp(1rem, 2vw, 1.1rem);
    color: var(--text-light);
    margin-bottom: clamp(2rem, 4vw, 3rem);
    line-height: 1.6;
}

/* ===== PROPERTY CARDS ===== */
.property-card {
    border: none;
    border-radius: 15px;
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
    height: 100%;
    margin-bottom: 1.5rem;
}

.property-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.property-image-container {
    position: relative;
    overflow: hidden;
    aspect-ratio: 4/3; /* Maintain aspect ratio */
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.property-card:hover .property-image {
    transform: scale(1.05);
}

.property-badges {
    position: absolute;
    top: 10px;
    left: 10px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.property-type, .property-status, .featured-badge {
    font-size: 0.7em;
    padding: 5px 10px;
    font-weight: 600;
    white-space: nowrap;
}

.property-price {
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 700;
    color: var(--primary-color);
    margin: 0.5rem 0;
}

.property-location {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.property-features {
    font-size: 0.85rem;
    color: var(--text-light);
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    margin: 10px 0;
}

.property-details {
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
    margin: 10px 0;
}

/* ===== STATS SECTION ===== */
.stats-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #1e3a8a 100%);
    color: white;
    padding: clamp(3rem, 8vw, 5rem) 0;
}

.stat-number {
    font-size: clamp(2rem, 6vw, 3rem);
    font-weight: 700;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.stat-label {
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    opacity: 0.9;
}

/* ===== SERVICES ===== */
.service-card {
    text-align: center;
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 15px;
    transition: var(--transition);
    border: 1px solid #e9ecef;
    height: 100%;
    margin-bottom: 1.5rem;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary-color);
}

.service-icon {
    width: clamp(60px, 10vw, 80px);
    height: clamp(60px, 10vw, 80px);
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

/* ===== BUTTONS ===== */
.btn-primary {
    background: var(--primary-color);
    border: none;
    padding: clamp(10px, 2vw, 12px) clamp(20px, 3vw, 30px);
    font-weight: 600;
    transition: var(--transition);
    border-radius: 8px;
}

.btn-primary:hover {
    background: #1e3a8a;
    transform: translateY(-2px);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
    padding: clamp(8px, 2vw, 10px) clamp(18px, 3vw, 28px);
    font-weight: 600;
    transition: var(--transition);
    border-radius: 8px;
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* ===== CATEGORY CARDS ===== */
.category-card {
    transition: var(--transition);
    border: 2px solid transparent !important;
    padding: clamp(1rem, 2vw, 1.5rem);
    margin-bottom: 1rem;
}

.category-card:hover {
    border-color: var(--primary-color) !important;
    transform: translateY(-5px);
}

.category-icon {
    color: var(--primary-color);
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

/* ===== TEAM CARDS ===== */
.team-card {
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 15px;
    background: white;
    box-shadow: var(--shadow);
    transition: var(--transition);
    margin-bottom: 1.5rem;
}

.team-card:hover {
    transform: translateY(-5px);
}

.team-image img {
    width: clamp(120px, 20vw, 200px);
    height: clamp(120px, 20vw, 200px);
    border: 3px solid var(--primary-color);
    object-fit: cover;
}

/* ===== CONTACT FORM ===== */
.contact-info {
    background: var(--secondary-color);
    padding: clamp(1.5rem, 3vw, 2rem);
    border-radius: 15px;
    margin-bottom: 2rem;
}

.contact-item {
    padding-bottom: 1rem;
    border-bottom: 1px solid #dee2e6;
    margin-bottom: 1rem;
}

.contact-item:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.contact-icon {
    flex-shrink: 0;
    font-size: clamp(1.5rem, 3vw, 2rem);
}

/* ===== FORM ENHANCEMENTS ===== */
.form-control:focus, .form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
}

/* ===== IMAGE PREVIEW ===== */
.image-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
}

.image-preview-item {
    position: relative;
}

.image-preview-item .badge {
    position: absolute;
    top: 5px;
    right: 5px;
    font-size: 0.6em;
}

/* ===== RESPONSIVE BREAKPOINTS ===== */

/* Large devices (desktops, 992px and up) */
@media (min-width: 992px) {
    body {
        padding-top: 76px;
    }
    
    .hero-section {
        padding: 140px 0 100px;
    }
}

/* Medium devices (tablets, 768px to 991px) */
@media (max-width: 991.98px) {
    body {
        padding-top: 70px;
    }
    
    .hero-section {
        padding: 100px 0 60px;
        text-align: center;
    }
    
    .hero-stats .row {
        justify-content: center;
    }
    
    .navbar-collapse {
        background: white;
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
        box-shadow: var(--shadow);
    }
}

/* Small devices (landscape phones, 576px to 767px) */
@media (max-width: 767.98px) {
    body {
        padding-top: 66px;
    }
    
    .hero-section {
        padding: 80px 0 40px;
        min-height: 70vh;
    }
    
    .section-padding {
        padding: 2.5rem 0;
    }
    
    .search-form {
        padding: 1rem;
    }
    
    .property-badges {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .team-image img {
        width: 120px;
        height: 120px;
    }
}

/* Extra small devices (portrait phones, less than 576px) */
@media (max-width: 575.98px) {
    body {
        padding-top: 62px;
    }
    
    .hero-section {
        padding: 60px 0 30px;
        min-height: 60vh;
    }
    
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .btn-lg {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .property-badges {
        top: 5px;
        left: 5px;
    }
    
    .property-type, .property-status, .featured-badge {
        font-size: 0.6em;
        padding: 3px 8px;
    }
}

/* ===== UTILITY CLASSES ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Ensure images don't overflow */
img {
    max-width: 100%;
    height: auto;
}

/* Fix for mobile tap targets */
@media (max-width: 768px) {
    .btn, .nav-link, .form-control, .form-select {
        min-height: 44px; /* Minimum touch target size */
    }
    
    .navbar-toggler {
        padding: 0.5rem 0.75rem;
    }
}

/* Print styles */
@media print {
    .navbar, .btn, .hero-section::before {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
    }
    
    .hero-section {
        background: white !important;
        color: black !important;
        padding: 2rem 0 !important;
    }
}