/* =======================
   BLORJ REALTY CUSTOM STYLES
   ======================= */

/* Global Styles */
:root {
    --primary-color: #030357;
    --secondary-color: #3EC4F3;
    --accent-color: #e74c3c;
    --dark-color: #030357;
    --light-color: #ecf0f1;
    --success-color: #27ae60;
    --text-color: #34495e;
    --border-color: #bdc3c7;
    --shadow-light: 0 2px 10px rgba(0,0,0,0.1);
    --shadow-medium: 0 5px 20px rgba(0,0,0,0.15);
    --shadow-heavy: 0 10px 30px rgba(0,0,0,0.2);
    --gradient-primary: linear-gradient(135deg, #030357 0%, #3EC4F3 100%);
    --gradient-secondary: linear-gradient(135deg, #3EC4F3 0%, #030357 100%);
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    overflow-x: hidden;
    background: white;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-color);
    margin-bottom: 1rem;
    position: relative;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-subtitle {
    font-size: 1.1rem;
    color: #7f8c8d;
    margin-bottom: 2rem;
}

/* Navigation */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color) !important;
    text-decoration: none;
}

.navbar-brand i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

.nav-link {
    color: var(--text-color) !important;
    font-weight: 500;
    margin: 0 0.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background: var(--secondary-color);
    transition: all 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
    left: 0;
}

/* Hero Section */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(rgba(3, 3, 87, 0.9), rgba(62, 196, 243, 0.3)),
                url('assets/images/hero-bg.jpg') center/cover;
    display: flex;
    align-items: center;
    position: relative;
    color: white;
}

.hero-overlay {
    background: rgba(3, 3, 87, 0.2);
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 1s ease 0.2s both;
}

/* Search Container */
.search-container {
    animation: fadeInUp 1s ease 0.4s both;
}

.search-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-heavy);
    backdrop-filter: blur(10px);
}

.search-form .form-select,
.search-form .form-control {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.search-form .form-select:focus,
.search-form .form-control:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(62, 196, 243, 0.25);
}

/* Button Styles */
.btn {
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    position: relative;
    overflow: hidden;
}

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

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
    background: var(--gradient-secondary);
}

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

.btn-secondary:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-medium);
}

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

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

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

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

.btn-outline-secondary:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-2px);
}

/* Property Cards */
.property-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-heavy);
    border: 2px solid var(--secondary-color);
}

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

.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-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    z-index: 2;
}

.verified-badge {
    background: var(--secondary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.property-type-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: var(--primary-color);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    z-index: 2;
}

.property-details {
    padding: 1.5rem;
}

.property-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.property-location {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.property-location i {
    color: var(--secondary-color);
    margin-right: 0.5rem;
}

.property-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.property-features span {
    font-size: 0.8rem;
    color: #7f8c8d;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.property-actions {
    display: flex;
    gap: 0.5rem;
}

.property-actions .btn {
    flex: 1;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
}

/* Sold Property Styles */
.property-card.sold-property {
    position: relative;
    opacity: 0.8;
}

.property-card.sold-property::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.1);
    z-index: 1;
    pointer-events: none;
}

.property-sold-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #28a745;
    color: white;
    padding: 5px 10px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.sold-text {
    color: #28a745;
    font-size: 0.8em;
    font-weight: bold;
    margin-left: 10px;
}

.sold-price {
    text-decoration: line-through;
    color: #6c757d;
    position: relative;
}

.sold-label {
    background: #28a745;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 10px;
    margin-left: 10px;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

.sold-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(40, 167, 69, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
    pointer-events: none;
}

.sold-stamp {
    background: #28a745;
    color: white;
    padding: 20px 30px;
    font-size: 24px;
    font-weight: bold;
    border-radius: 50%;
    transform: rotate(-15deg);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
    border: 3px solid white;
}

/* Hover effects for sold properties */
.property-card.sold-property:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

/* Feature Cards */
.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--secondary-color);
}

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

.feature-card h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
}

/* Testimonial Cards */
.testimonial-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    height: 100%;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
    border: 2px solid var(--secondary-color);
}

.testimonial-card::before {
    content: '"';
    position: absolute;
    top: -20px;
    left: 20px;
    font-size: 4rem;
    color: var(--secondary-color);
    opacity: 0.3;
    font-family: serif;
}

.testimonial-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author strong {
    color: var(--dark-color);
}

.rating i {
    font-size: 1rem;
    margin-right: 0.2rem;
    color: var(--secondary-color);
}

/* Newsletter Section */
.newsletter {
    background: var(--gradient-primary);
}

.newsletter-form .input-group {
    max-width: 400px;
    margin-left: auto;
}

.newsletter-form .form-control {
    border: none;
    padding: 1rem;
    border-radius: 8px 0 0 8px;
}

.newsletter-form .btn {
    border-radius: 0 8px 8px 0;
    padding: 1rem 1.5rem;
    background: var(--secondary-color);
    border: none;
}

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

/* Footer */
.footer {
    background: var(--dark-color) !important;
}

.footer h5, .footer h6 {
    color: white;
    margin-bottom: 1rem;
}

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

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

.footer ul li a:hover {
    color: var(--secondary-color);
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(62, 196, 243, 0.2);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
    color: var(--secondary-color);
}

.social-links a:hover {
    background: var(--secondary-color);
    color: white;
    transform: translateY(-3px);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: #25d366;
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: var(--shadow-medium);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    background: #128c7e;
    color: white;
    transform: scale(1.1);
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        transform: scale(1.05);
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .search-form {
        padding: 1.5rem;
    }
    
    .search-form .row > div {
        margin-bottom: 1rem;
    }
    
    .property-features {
        justify-content: center;
    }
    
    .newsletter .row {
        text-align: center;
    }
    
    .newsletter .col-lg-6:first-child {
        margin-bottom: 2rem;
    }
    
    /* Responsive adjustments for sold properties */
    .sold-stamp {
        padding: 15px 20px;
        font-size: 18px;
    }
    
    .property-sold-badge {
        font-size: 10px;
        padding: 3px 8px;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .search-form .row .col-md-2 .btn {
        width: 100%;
    }
    
    .property-actions {
        flex-direction: column;
    }
    
    .whatsapp-float {
        bottom: 15px;
        right: 15px;
    }
    
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--secondary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Form Styles */
.form-control, .form-select {
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 0.2rem rgba(62, 196, 243, 0.25);
}

.form-label {
    font-weight: 500;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-color) !important;
}

.text-secondary-custom {
    color: var(--secondary-color) !important;
}

.bg-primary-custom {
    background: var(--gradient-primary) !important;
}

.bg-secondary-custom {
    background: var(--secondary-color) !important;
}

.border-primary-custom {
    border-color: var(--primary-color) !important;
}

.border-secondary-custom {
    border-color: var(--secondary-color) !important;
}

.shadow-custom {
    box-shadow: var(--shadow-medium) !important;
}

/* Admin Panel Specific Styles */
.admin-sidebar {
    background: var(--dark-color);
    min-height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    width: 250px;
    z-index: 1000;
    transition: all 0.3s ease;
}

.admin-sidebar.collapsed {
    width: 70px;
}

.admin-content {
    margin-left: 250px;
    padding: 2rem;
    transition: all 0.3s ease;
}

.admin-content.expanded {
    margin-left: 70px;
}

.admin-nav-link {
    color: #bdc3c7;
    padding: 1rem 1.5rem;
    display: block;
    text-decoration: none;
    transition: all 0.3s ease;
}

.admin-nav-link:hover,
.admin-nav-link.active {
    background: rgba(62, 196, 243, 0.2);
    color: var(--secondary-color);
}

.admin-card {
    background: white;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.stats-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
    border-left: 4px solid var(--secondary-color);
}

.stats-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-medium);
}

.stats-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stats-label {
    color: #7f8c8d;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Data Tables */
.table-custom {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.table-custom th {
    background: var(--primary-color);
    color: white;
    font-weight: 500;
    border: none;
    padding: 1rem;
}

.table-custom td {
    padding: 1rem;
    border-color: #f8f9fa;
    vertical-align: middle;
}

.table-custom tbody tr:hover {
    background: rgba(62, 196, 243, 0.05);
}

/* Status Badges */
.status-badge {
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.status-available {
    background: rgba(62, 196, 243, 0.1);
    color: var(--secondary-color);
}

.status-sold {
    background: rgba(231, 76, 60, 0.1);
    color: var(--accent-color);
}

.status-hidden {
    background: rgba(149, 165, 166, 0.1);
    color: #95a5a6;
}

/* Image Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.gallery-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(3, 3, 87, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-overlay button {
    background: var(--secondary-color);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    cursor: pointer;
}

/* Section Backgrounds */
.section-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(62, 196, 243, 0.1) 100%);
}

.section-secondary {
    background: linear-gradient(135deg, rgba(62, 196, 243, 0.1) 0%, white 100%);
}

/* Call to Action Sections */
.cta-section {
    background: var(--gradient-primary);
    color: white;
    padding: 4rem 0;
}

.cta-section h2 {
    color: white;
    margin-bottom: 1rem;
}

.cta-section p {
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Print Styles */
@media print {
    .navbar,
    .whatsapp-float,
    .newsletter,
    .footer {
        display: none !important;
    }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
    
    .property-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}