/* Enhanced CSS for Santa Maria Realtors Ltd */

/* Base Styles with Century Gothic */
:root {
    --primary-color: #1a4b8c;
    --secondary-color: #e6b325;
    --accent-color: #2e7d32;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    --transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
    --gradient-primary: linear-gradient(135deg, #1a4b8c 0%, #2a6cc4 100%);
    --gradient-secondary: linear-gradient(135deg, #e6b325 0%, #f4c542 100%);
}

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

body {
    font-family: 'Nunito Sans', 'Montserrat', 'Open Sans', sans-serif;
    color: #333;
    padding-top: 80px;
    background-color: #f9fafc;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Nunito Sans', 'Montserrat', sans-serif;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.section-title {
    position: relative;
    padding-bottom: 20px;
    margin-bottom: 40px;
    font-size: 2.5rem;
    color: var(--dark-color);
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: var(--gradient-secondary);
    border-radius: 2px;
    transform-origin: left;
    animation: lineGrow 1.2s ease-out forwards;
}

@keyframes lineGrow {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

/* Navigation with Animation */
.navbar {
    transition: var(--transition);
    background-color: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    padding: 15px 0;
}

.navbar.navbar-scrolled {
    padding: 10px 0;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.1);
}

.navbar-brand .logo-text {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--dark-color);
    letter-spacing: -0.5px;
}

.navbar-brand .logo-text i {
    color: var(--primary-color);
    margin-right: 8px;
    font-size: 1.8rem;
}

.navbar-brand .logo-text strong {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.nav-link {
    font-weight: 600;
    margin: 0 8px;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: var(--transition);
    position: relative;
    color: var(--dark-color) !important;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary-color) !important;
    background-color: rgba(26, 75, 140, 0.08);
    transform: translateY(-2px);
}

.nav-link:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: var(--gradient-secondary);
    border-radius: 3px;
    transition: var(--transition);
    transform: translateX(-50%);
}

.nav-link:hover:after, .nav-link.active:after {
    width: 70%;
}

/* Enhanced Hero Section */
.hero-section {
    margin-top: -80px;
    position: relative;
    overflow: hidden;
}

.hero-image {
    background-image: url('https://images.unsplash.com/photo-1560518883-ce09059eeffa?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1073&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    height: 85vh;
    min-height: 600px;
    position: relative;
    animation: kenburns 30s infinite alternate;
}

@keyframes kenburns {
    0% { transform: scale(1); }
    100% { transform: scale(1.05); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 75, 140, 0.85) 0%, rgba(42, 108, 196, 0.7) 100%);
    display: flex;
    align-items: center;
}

.hero-content {
    color: white;
    max-width: 800px;
    animation: fadeUp 1.2s ease-out 0.3s both;
    transform: translateY(30px);
    opacity: 0;
}

@keyframes fadeUp {
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.hero-content h1 {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 20px;
    line-height: 1.1;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.hero-content .lead {
    font-size: 1.4rem;
    margin-bottom: 30px;
    opacity: 0.9;
}

.hero-buttons .btn {
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1rem;
    margin-right: 15px;
    margin-bottom: 10px;
    transition: var(--transition);
    transform: translateY(0);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.hero-buttons .btn:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.2);
}

.btn-primary {
    background: var(--gradient-primary);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2a6cc4 0%, #1a4b8c 100%);
}

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-image {
        height: 70vh;
        min-height: 500px;
        background-attachment: scroll;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

/* Enhanced Service Cards */
.service-card {
    background-color: white;
    border-radius: 16px;
    padding: 40px 25px;
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    height: 100%;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-secondary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
    z-index: -1;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.service-card:hover:before {
    transform: scaleX(1);
}

.service-icon {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, rgba(26, 75, 140, 0.1) 0%, rgba(42, 108, 196, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--primary-color);
    font-size: 2.2rem;
    transition: var(--transition);
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
    background: var(--gradient-primary);
    color: white;
}

.service-card h4 {
    margin-bottom: 15px;
    color: var(--dark-color);
    font-size: 1.4rem;
}

.service-card p {
    color: #666;
    line-height: 1.6;
}

/* Enhanced Property Cards */
.property-card {
    background-color: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
    position: relative;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

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

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

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

.property-type {
    position: absolute;
    top: 20px;
    right: 20px;
    background: var(--gradient-primary);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.property-badge {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--gradient-secondary);
    color: var(--dark-color);
    padding: 6px 15px;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.property-info {
    padding: 25px;
}

.property-info h4 {
    font-size: 1.4rem;
    margin-bottom: 8px;
    color: var(--dark-color);
}

.property-location {
    color: #777;
    margin-bottom: 15px;
    font-size: 0.95rem;
}

.property-location i {
    color: var(--primary-color);
    margin-right: 5px;
}

.property-features {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.property-feature {
    text-align: center;
}

.property-feature i {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 5px;
    display: block;
}

.property-feature span {
    font-size: 0.9rem;
    color: #666;
    font-weight: 600;
}

.price {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0;
}

.price-period {
    font-size: 0.9rem;
    color: #777;
    font-weight: normal;
}

.view-details {
    padding: 10px 25px;
    border-radius: 50px;
    font-weight: 600;
    transition: var(--transition);
    border-width: 2px;
}

.view-details:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(26, 75, 140, 0.2);
}

/* WhatsApp CTA Enhanced */
.whatsapp-cta {
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: white;
    position: relative;
    overflow: hidden;
    padding: 80px 0;
}

.whatsapp-cta:before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    animation: float 20s linear infinite;
    opacity: 0.3;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(-50px, -50px) rotate(360deg); }
}

.whatsapp-cta h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
}

.whatsapp-cta .btn-success {
    background: rgba(255, 255, 255, 0.9);
    color: #128c7e;
    border: none;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.2rem;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.whatsapp-cta .btn-success:hover {
    background: white;
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

/* Feature Cards for About Page */
.feature-card {
    background-color: white;
    border-radius: 16px;
    padding: 40px 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    text-align: center;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.feature-card:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

.feature-card:hover:before {
    transform: scaleX(1);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(230, 179, 37, 0.1) 0%, rgba(244, 197, 66, 0.1) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    color: var(--secondary-color);
    font-size: 2rem;
    transition: var(--transition);
}

.feature-card:hover .feature-icon {
    transform: scale(1.1);
    background: var(--gradient-secondary);
    color: white;
}

/* Pagination Styles */
.pagination-container {
    margin-top: 50px;
    margin-bottom: 30px;
}

.pagination .page-link {
    padding: 12px 20px;
    margin: 0 5px;
    border-radius: 10px;
    border: 1px solid #ddd;
    color: var(--dark-color);
    font-weight: 600;
    transition: var(--transition);
}

.pagination .page-link:hover {
    background-color: rgba(26, 75, 140, 0.1);
    border-color: var(--primary-color);
    transform: translateY(-3px);
}

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

/* Property Filter */
.property-filter {
    background-color: white;
    border-radius: 16px;
    padding: 25px;
    box-shadow: var(--shadow);
    margin-bottom: 40px;
}

.filter-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: var(--dark-color);
}

.filter-group {
    margin-bottom: 20px;
}

.filter-label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #555;
}

/* Footer Enhanced */
footer {
    background: linear-gradient(135deg, #1a2332 0%, #2c3e50 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

footer:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: var(--gradient-secondary);
}

.footer-logo {
    font-size: 1.8rem;
    font-weight: 800;
    margin-bottom: 20px;
    letter-spacing: -0.5px;
}

.footer-logo i {
    color: var(--secondary-color);
    margin-right: 10px;
}

.footer-logo strong {
    background: linear-gradient(to right, #fff, var(--secondary-color));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 45px;
    transition: var(--transition);
    margin-right: 10px;
    margin-bottom: 10px;
}

.social-icons a:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px) scale(1.1);
}

.footer-heading {
    font-size: 1.3rem;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-heading:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--secondary-color);
    border-radius: 2px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: var(--transition);
    position: relative;
    padding-left: 0;
}

.footer-links a:hover {
    color: white;
    padding-left: 8px;
}

.footer-links a:before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: var(--transition);
}

.footer-links a:hover:before {
    left: 0;
    opacity: 1;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-out both;
}

.slide-in-left {
    animation: slideInLeft 1s ease-out both;
}

.slide-in-right {
    animation: slideInRight 1s ease-out both;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@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);
    }
}

/* Loading Spinner */
.spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(26, 75, 140, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-content h1 {
        font-size: 3.2rem;
    }
    
    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content .lead {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .property-filter {
        padding: 20px;
    }
}

/* Print Styles */
@media print {
    .navbar, .hero-section, .whatsapp-cta, footer {
        display: none !important;
    }
    
    body {
        padding-top: 0;
    }
    
    .property-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Property Details Modal Styles */
.property-modal-image {
    height: 400px;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
}

.property-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.property-gallery-thumbnails {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.gallery-thumbnail {
    width: 80px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.3s ease;
    position: relative;
}

.gallery-thumbnail:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-thumbnail.active {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26, 75, 140, 0.2);
}

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

.property-details-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.property-details-list li {
    padding: 12px 0;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.3s ease;
}

.property-details-list li:hover {
    background-color: rgba(26, 75, 140, 0.03);
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 8px;
}

.property-details-list li:last-child {
    border-bottom: none;
}

.property-details-list li i {
    width: 24px;
    text-align: center;
    margin-right: 10px;
}

.property-features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 15px;
}

.feature-badge {
    background: linear-gradient(135deg, rgba(26, 75, 140, 0.1) 0%, rgba(42, 108, 196, 0.1) 100%);
    color: var(--primary-color);
    padding: 10px 18px;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(26, 75, 140, 0.1);
}

.feature-badge:hover {
    background: linear-gradient(135deg, rgba(26, 75, 140, 0.15) 0%, rgba(42, 108, 196, 0.15) 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.property-agent-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 16px;
    padding: 25px;
    margin-top: 20px;
    border-left: 4px solid var(--primary-color);
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.agent-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: bold;
    margin: 0 auto 15px;
    box-shadow: 0 5px 15px rgba(26, 75, 140, 0.3);
}

.property-details-cta {
    position: sticky;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(255,255,255,0.95), white);
    padding: 20px;
    border-top: 1px solid #eee;
    box-shadow: 0 -5px 20px rgba(0,0,0,0.08);
    backdrop-filter: blur(10px);
}

/* Property Card Enhancements */
.property-card {
    cursor: pointer;
    transition: all 0.3s ease;
}

.property-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.property-info h4 {
    transition: color 0.3s ease;
}

.property-card:hover .property-info h4 {
    color: var(--primary-color);
}

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

.property-image:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.3), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.property-card:hover .property-image:after {
    opacity: 1;
}

/* View Details Button Animation */
.view-details {
    position: relative;
    overflow: hidden;
}

.view-details:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}

.view-details:focus:not(:active)::after {
    animation: ripple 1s ease-out;
}

@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(40, 40);
        opacity: 0;
    }
}

/* Favorite Button Animation */
.favorite-btn {
    transition: all 0.3s ease;
}

.favorite-btn .fa-heart {
    transition: all 0.3s ease;
}

.favorite-btn:hover .fa-heart {
    transform: scale(1.2);
}

/* Compare Button Animation */
.compare-btn {
    transition: all 0.3s ease;
}

.compare-btn:hover {
    transform: rotate(180deg);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .property-modal-image {
        height: 300px;
    }
    
    .property-features-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    }
    
    .property-details-list li {
        padding: 10px 0;
        font-size: 0.9rem;
    }
    
    .agent-avatar {
        width: 60px;
        height: 60px;
        font-size: 1.4rem;
    }
}

/* Loading Animation for Property Details */
@property-details-loader {
    display: none;
    text-align: center;
    padding: 40px;
}

@property-details-loader .spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(26, 75, 140, 0.2);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Print Styles for Property Details */
@media print {
    .property-details-cta,
    .property-actions,
    .modal-footer {
        display: none !important;
    }
    
    .property-modal-image {
        height: 300px;
    }
    
    .property-details-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}