:root {
    --primary-blue: #1a3a6c;
    --secondary-blue: #2a5a8c;
    --accent-red: #e63946;
    --light-red: #ff6b7c;
    --light-gray: #f5f7fa;
    --dark-gray: #2d3748;
    --medium-gray: #718096;
    --transition: all 0.3s ease;
    --shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    --border-radius: 8px;
    --z-modal: 1002;
    --title-color: #333;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
        
body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark-gray);
    line-height: 1.6;
    overflow-x: hidden;
    background-color: #fff;
}
        
h1, h2, h3, h4, h5 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}
        
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}
        
.btn {
    display: inline-block;
    padding: 14px 28px;
    background: var(--accent-red);
    color: white;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 16px;
    text-transform: uppercase;
    letter-spacing: 1px;
}
        
.btn:hover {
    background: var(--light-red);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
        
.btn-outline {
    background: transparent;
    border: 2px solid var(--accent-red);
    color: var(--accent-red);
}
        
.btn-outline:hover {
    background: var(--accent-red);
    color: white;
}
        
.btn-blue {
    background: var(--primary-blue);
}
        
.btn-blue:hover {
    background: var(--secondary-blue);
}
        
section {
    padding: 100px 0;
}
        
.section-title {
    text-align: center;
    margin-bottom: 60px;
}
        
.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-blue);
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
}
        
.section-title h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-red);
}
        
.section-title p {
    font-size: 1.1rem;
    color: var(--medium-gray);
    max-width: 700px;
    margin: 20px auto 0;
}

/* Accessibility Improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Hero Section */
.hero {
    height: 50vh !important;
    margin-top: 0;
    min-height: 800px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
}

.hero-slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide1 {
    background-image: url('../assets/images/photo108.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide2 {
    background-image: url('../assets/images/photo40.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.slide3 {
    background-image: url('../assets/images/photo120.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    color: white;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 1s ease-in-out, visibility 1s ease-in-out;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    animation: heroZoomOut 15s infinite linear;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;

    z-index: 1;
}

.hero-slide.active {
    opacity: 1;
    visibility: visible;
}

.hero-content {
    position: relative;
    padding-top: 0;
    padding: 1rem;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    transform: translateY(30px);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-slide.active .hero-content {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.3s;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.25));
    letter-spacing: 2px;
    font-weight: 800;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-slide.active .hero-title {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.5s;
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 40px;
    max-width: 700px;
    filter: drop-shadow(0 2px 2px rgba(0, 0, 0, 0.25));
    margin-left: auto;
    margin-right: auto;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-slide.active .hero-subtitle {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.7s;
}

.hero-btns {
    display: flex;
    justify-content: center;
    margin-top: 70px;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.hero-slide.active .hero-btns {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.9s;
}

/* Navigation Arrows */
.hero-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    cursor: pointer;
    transition: var(--transition);
    z-index: 3;
    backdrop-filter: blur(10px);
}

.hero-nav:hover {
    background: rgba(230, 57, 70, 0.8);
    border-color: var(--accent-red);
    transform: translateY(-50%) scale(1.1);
}

.hero-nav:focus {
    outline: 2px solid white;
    outline-offset: 4px;
}

.hero-prev {
    left: 30px;
}

.hero-next {
    right: 30px;
}

/* Slide Indicators */
.hero-indicators {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 15px;
    z-index: 3;
}

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.5);
    background: transparent;
    cursor: pointer;
    transition: var(--transition);
}

.indicator.active,
.indicator:hover {
    background: var(--accent-red);
    border-color: var(--accent-red);
    transform: scale(1.2);
}

/* Zoom Out Animation */
@keyframes heroZoomOut {
    0% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Services Section */
.services {
    background-color: var(--light-gray);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
}

.service-img {
    height: 200px;
    overflow: hidden;
}

.service-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.service-card:hover .service-img img {
    transform: scale(1.05);
}

.service-content {
    padding: 25px;
}
        
.service-content h3 {
    color: var(--primary-blue);
    font-size: 1.4rem;
}
        
.service-content p {
    color: var(--medium-gray);
    margin: 15px 0;
}

.services-cta {
    text-align: center;
    margin-top: 50px;
}

/* Property Cards */
.listings-container {
    display: flex;
    justify-content: center;
}
.property-card {
  position: relative;
  background-color: white;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.2s;
  height: fit-content;
  max-width: 100%;
}

.property-card:hover {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.property-image-wrapper {
    position: relative;
    height: 500px; 
    overflow: hidden;
}

.property-image {
    width: 100%;
    height: 100%;
    object-fit: fill; /* This ensures the image covers the entire container */
    object-position: center; /* Centers the image */
    display: block;
    border-radius: 8px;
}

.property-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  color: white;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 14px;
  font-weight: 500;
  background-color: #e63946;
}

.property-content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.property-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  border-bottom: 1px solid #e5e7eb;
  padding-bottom: 8px;
}

.property-title {
  font-size: 1.2rem;
  font-weight: 600;
  color: #1a3a6c;
}

.property-specs {
  display: flex;
  gap: 7px;
  justify-content: space-between;
}

.property-price {
  color: var(--primary-blue);
  font-size: 1rem;
 
}

.property-location {
  color: var(--accent-red);
  font-weight: bold;
}

.property-availability {
  color: #e63946;
  font-weight: 500;
  font-size: 0.9rem;
  margin-top: 4px;
}

.property-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); /* Better responsive columns */
    gap: 6px;
    font-size: 0.9rem;
    margin: 0; /* Remove margin-top */
    flex-grow: 1;
    list-style: none;
}

.property-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto; /* Push to bottom */
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0; /* Add subtle separator */
}

.btn-contact {
  background-color: #1a3a6c;
  color: white;
  padding: 5px 28px;
  border-radius: 8px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.btn-contact:hover {
  background-color: #153259;
}

.btn-gallery {
  color: #1a3a6c;
  background: none;
  border: none;
  cursor: pointer;
  outline: none;
  font-size: 1.2rem;
  transition: color 0.2s;
}

.btn-gallery:hover {
  color: #153259;
}

.btn-call {
  background-color: #e63946;
  color: white;
  padding: 12px 20px;
  border-radius: 8px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.2s;
}

.btn-call:hover {
  background-color: #c5303f;
}

.featured-homes-cta {
    text-align: center;
    margin-top: 1rem;
}

/* Gallery Modal */
.gallery-modal {
  display: none;
  position: fixed;
  padding-top: 60px;
  inset: 0;
  align-items: flex-start;
  background-color: rgba(0, 0, 0, 0.75);
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.gallery-modal.active {
  display: flex;
}

.modal-content {
  position: relative;
  max-width: 768px;
  width: 100%;
  background-color: white;
  border-radius: 8px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  max-height: 90vh;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  color: #374151;
  background: none;
  border: none;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  z-index: 10;
  transition: color 0.2s;
}

.modal-close:hover {
  color: #111827;
}

.modal-image {
  width: 100%;
  height: auto;
  max-height: 60vh;
  object-fit: contain;
  background-color: #f3f4f6;
}

.modal-controls {
  padding: 16px;
  display: flex;
  justify-content: center;
  gap: 16px;
  background-color: #f9fafb;
  border-top: 1px solid #e5e7eb;
}

.modal-btn {
  padding: 8px 16px;
  background-color: #1a3a6c;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.2s;
}

.modal-btn:hover {
  background-color: #153259;
}

        
/* Stats Section */
.stats {
    background: linear-gradient(to right, var(--primary-blue), var(--secondary-blue));
    color: white;
    text-align: center;
}
        
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}
        
.stat-item {
    padding: 20px;
}
        
.stat-number {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 10px;
    color: var(--light-red);
}
        
.stat-text {
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}
        
/* CTA Section */
.cta {
    background: linear-gradient(rgba(26, 58, 108, 0.9), rgba(26, 58, 108, 0.9)), url('https://images.unsplash.com/photo-1503387762-592deb58ef4e?ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D&auto=format&fit=crop&w=1920&q=80') center center/cover;
    color: white;
    text-align: center;
}
        
.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}
        
.cta p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto 40px;
}
        

/* Responsive Design */
@media (min-width: 1200px) {
    .property-content {
        padding: 24px;
    }
    
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

/* Mobile Responsive Updates */
@media (max-width: 820px) {
    /* Hero section */
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-title {
        font-size: 2.2rem;
        letter-spacing: 1px;
    }
    
    .hero-nav {
        width: 50px;
        height: 50px;
        font-size: 1rem;
    }
    
    .hero-prev {
        left: 20px;
    }
    
    .hero-next {
        right: 20px;
    }
    
    .hero-indicators {
        bottom: 20px;
    }

}
        
@media (max-width: 480px) {
    .container {
        padding: 0 5px;
    }

    /* Hero section */
    .hero {
        height: 500px !important;
        min-height: 400px !important;
        padding: 60px 0;
    }

    .hero-content {
        padding: 1rem;
        margin: 0 auto;
    }

    .hero-title {
        font-size: 1.5rem;
        padding-top: 40px;
        margin-bottom: 10px;
    }

    .hero-subtitle {
        font-size: 0.9rem;
        margin-bottom: 10px;
    }

    .hero-next, .hero-prev {
        display: none;
    }

    .hero-btns {
        margin-top: 20px;
        gap: 10px;
    }

    .hero-btns .btn {
        font-size: 1rem;
        padding: 5px 10px;
    }

    .hero-btns .btn.btn-outline {
        padding: 0 10px;
    }

    /* Sections */

    section {
        padding: 10px 0;
    }

    .featured-homes {
        padding: 50px 0;
    }

    .section-title h2 {
        font-size: 1.5rem;
    }

    .section-title p {
        font-size: 1rem;
    }
    
    /* Service section */

    .service-content h3 {
        font-size: 1.2rem;
    }

    .services-cta .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
        margin-bottom: 40px;
    }

    /* Property section */
    .property-card {
        box-shadow: none;
    }

    .property-image-wrapper {
        height: auto; 
    }
    
    .property-image {
        height: auto; 
    }

    .property-content {
        padding: 16px;
    }

    .property-features {
        grid-template-columns: 1fr;
    }

    .property-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }

    .btn-contact,
    .btn-gallery {
        width: 100%;
        font-size: 14px;
        padding: 5px;
        text-align: center;
    }

    .btn-call {
        width: 100%;
        text-align: center;
    }

    .featured-homes-cta .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
    
    /* Stats section */
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 10px;
    }
        
    .stat-item {
        padding: 10px;
    }
        
    .stat-number {
        font-size: 1.7rem;
        font-weight: 800;
        margin-bottom: 0;
    }
        
    .stat-text {
    font-size: 0.8rem;
    }
        
    /* CTA Section */   
    .cta h2 {
        font-size: 1.5rem;
        margin-bottom: 20px;
    }
        
    .cta p {
        font-size: 1rem;
        max-width: 700px;
        margin-bottom: 30px;
    }

    .cta .btn {
        font-size: 0.9rem;
        padding: 10px 20px;
    }
}