/* Immediate Modern Styles for Kingsbury */

:root {
  --primary-color: #202f4b;
  --secondary-color: #f4c203;
  --white: #ffffff;
  --light-bg: #f8f9fa;
  --text-dark: #2c3e50;
  --text-light: #6c757d;
  --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
  --border-radius: 16px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--white);
  padding-top: 0;
}

/* Main content area */
main {
  position: relative;
  z-index: 1;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.3;
  color: var(--primary-color);
}

/* Modern Navigation */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(32, 47, 75, 0.1);
  padding: 1rem 0 !important;
  box-shadow: var(--shadow-lg);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-weight: 700;
  color: var(--primary-color) !important;
}

.nav-link {
  font-weight: 500 !important;
  color: var(--text-dark) !important;
  padding: 0.5rem 1rem !important;
  border-radius: var(--border-radius);
  transition: var(--transition);
  margin: 0 0.25rem;
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary-color) !important;
  background: rgba(32, 47, 75, 0.05);
  transform: translateY(-1px);
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  margin-bottom: 0;
  z-index: 1;
}

.hero + .section {
  margin-top: 0 !important;
  position: relative;
  z-index: 2;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(32, 47, 75, 0.9) 0%, rgba(26, 37, 47, 0.7) 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  color: var(--white);
  max-width: 800px;
  padding: 0 2rem;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  margin-bottom: 2rem;
  background: linear-gradient(135deg, #ffffff 0%, #f4c203 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.9;
  line-height: 1.6;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  font-weight: 600;
  border-radius: var(--border-radius);
  text-decoration: none;
  transition: var(--transition);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: linear-gradient(135deg, var(--secondary-color) 0%, #e6b800 100%);
  color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(244, 194, 3, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 15px 35px rgba(244, 194, 3, 0.4);
  color: var(--primary-color);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  color: var(--white);
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-ghost:hover {
  background: rgba(255, 255, 255, 0.2);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-lg {
  padding: 1.25rem 2.5rem;
  font-size: 1.1rem;
}

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

.card:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

.card:hover .card-img-overlay {
  opacity: 1 !important;
}

.card-body {
  padding: 2rem;
}

/* Section Styling */
.section {
  padding: 5rem 0;
  position: relative;
  z-index: 10;
  background: white;
  clear: both;
}

.section:first-of-type {
  margin-top: 0;
  padding-top: 5rem;
}

/* Ensure sections don't overlap */
.hero + .section {
  margin-top: 0 !important;
  padding-top: 6rem !important;
  position: relative;
  z-index: 2;
  background: #f8f9fa;
}

.section-title {
  text-align: center;
  margin-bottom: 4rem;
}

.section-title h2 {
  font-size: 3rem;
  color: var(--primary-color);
  margin-bottom: 1rem;
  position: relative;
}

.section-title h2::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  width: 80px;
  height: 4px;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #e6b800 100%);
  transform: translateX(-50%);
  border-radius: 2px;
}

.section-title p {
  font-size: 1.2rem;
  color: var(--text-light);
  max-width: 600px;
  margin: 0 auto;
}

/* Grid System */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-cols-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-cols-4 {
  grid-template-columns: repeat(4, 1fr);
}

/* Utility Classes */
.text-center { text-align: center; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-6 { margin-bottom: 2rem; }
.mb-8 { margin-bottom: 3rem; }
.mb-12 { margin-bottom: 4rem; }
.mt-8 { margin-top: 3rem; }
.p-6 { padding: 2rem; }
.flex { display: flex; }
.items-center { align-items: center; }
.justify-center { justify-content: center; }
.gap-4 { gap: 1rem; }
.gap-8 { gap: 2rem; }

/* Responsive Design */
@media (max-width: 1200px) {
  .container {
    max-width: 1140px;
    padding: 0 2rem;
  }
  
  .hero-title {
    font-size: 3.5rem;
  }
  
  .section-title h2 {
    font-size: 2.5rem;
  }
}

@media (max-width: 1024px) {
  .grid-cols-3,
  .grid-cols-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-title {
    font-size: 3rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .section {
    padding: 4rem 0;
  }
  
  .btn {
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
  }
  
  .btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
  }
}

@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }
  
  .hero {
    min-height: 80vh;
    background-attachment: scroll;
  }
  
  .hero-title {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
  
  .hero-content {
    padding: 0 1rem;
  }
  
  .grid-cols-3,
  .grid-cols-4,
  .grid-cols-2 {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .section-title {
    margin-bottom: 3rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .section-title p {
    font-size: 1rem;
  }
  
  .btn {
    width: 100%;
    justify-content: center;
    margin-bottom: 0.75rem;
    padding: 1rem 1.5rem;
  }
  
  .btn-lg {
    padding: 1.125rem 2rem;
  }
  
  .flex.gap-4,
  .flex.gap-8 {
    flex-direction: column;
    gap: 1rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  /* Navigation adjustments */
  .navbar {
    padding: 0.75rem 0 !important;
  }
  
  .navbar-brand img {
    max-width: 120px;
  }
  
  /* Footer adjustments */
  .footer {
    padding: 3rem 0 1.5rem;
  }
  
  .footer .row > div {
    margin-bottom: 2rem;
  }
  
  /* Floating button adjustments */
  .floating-btn {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }
  
  .floating-btn i {
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding: 0 0.75rem;
  }
  
  .hero {
    min-height: 70vh;
  }
  
  .hero-title {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  
  .section {
    padding: 2.5rem 0;
  }
  
  .section-title h2 {
    font-size: 1.75rem;
  }
  
  .section-title p {
    font-size: 0.9rem;
  }
  
  .btn {
    padding: 0.875rem 1.25rem;
    font-size: 0.9rem;
  }
  
  .btn-lg {
    padding: 1rem 1.5rem;
    font-size: 0.95rem;
  }
  
  .card-body {
    padding: 1.25rem;
  }
  
  .service-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  /* Typography adjustments */
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.125rem; }
  h5 { font-size: 1rem; }
  h6 { font-size: 0.875rem; }
  
  /* Spacing adjustments */
  .mb-4 { margin-bottom: 1rem; }
  .mb-6 { margin-bottom: 1.5rem; }
  .mb-8 { margin-bottom: 2rem; }
  .mb-12 { margin-bottom: 2.5rem; }
  .mt-8 { margin-top: 2rem; }
  .p-6 { padding: 1.5rem; }
}

/* Loading Animation */
.loading-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--white) 0%, var(--light-bg) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease-out;
}

.loading-spinner {
  width: 60px;
  height: 60px;
  border: 4px solid var(--light-bg);
  border-top: 4px solid var(--secondary-color);
  border-radius: 50%;
  animation: spin 1.2s linear infinite;
}

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

/* Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 4px;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #e6b800 100%);
  z-index: 1001;
  transition: width 0.1s ease-out;
}

/* Footer */
.footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, #1a252f 100%);
  color: var(--white);
  padding: 4rem 0 2rem;
}

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

.animate-fadeInUp {
  animation: fadeInUp 0.8s ease-out;
}

/* Service Icons */
.service-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #e6b800 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: var(--primary-color);
  box-shadow: 0 8px 25px rgba(244, 194, 3, 0.3);
}

/* Floating WhatsApp Button */
.floating-btn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 1000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  transition: var(--transition);
  text-decoration: none;
}

.whatsapp-btn {
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: var(--white);
}

.floating-btn:hover {
  transform: scale(1.1);
  color: var(--white);
}

/* Mobile Menu */
.navbar-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: transparent;
  border: none;
  cursor: pointer;
}

.navbar-toggle span {
  width: 24px;
  height: 2px;
  background: var(--primary-color);
  transition: var(--transition);
  border-radius: 2px;
}

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

.card-property:hover {
  transform: translateY(-8px);
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

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

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

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

.price-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: linear-gradient(135deg, var(--secondary-color) 0%, #e6b800 100%);
  color: var(--primary-color);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 4px 15px rgba(244, 194, 3, 0.3);
}

.card-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(32, 47, 75, 0.9) 0%, rgba(26, 37, 47, 0.8) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  padding: 2rem;
}

.card-property:hover .card-overlay {
  opacity: 1;
}

.card-content {
  padding: 1.5rem;
}

/* Form Styles */
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid rgba(32, 47, 75, 0.1);
  border-radius: var(--border-radius);
  font-size: 1rem;
  transition: var(--transition);
  background: var(--white);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--secondary-color);
  box-shadow: 0 0 0 3px rgba(244, 194, 3, 0.1);
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 600;
  color: var(--primary-color);
}

@media (max-width: 768px) {
  .navbar-toggle {
    display: flex;
  }
  
  .navbar-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    flex-direction: column;
    padding: 1rem;
    box-shadow: var(--shadow-lg);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
  }
  
  .navbar-nav.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }
  
  .nav-link {
    width: 100%;
    text-align: center;
    margin: 0.25rem 0;
  }
  
  /* Property cards mobile */
  .card-image {
    height: 200px;
  }
  
  .price-badge {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .card-content {
    padding: 1.25rem;
  }
  
  .card-overlay {
    padding: 1.5rem;
  }
  
  /* Form mobile adjustments */
  .form-input,
  .form-select,
  .form-textarea {
    padding: 0.875rem;
    font-size: 0.95rem;
  }
}

@media (max-width: 576px) {
  .card-image {
    height: 180px;
  }
  
  .price-badge {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .card-content {
    padding: 1rem;
  }
  
  .card-overlay {
    padding: 1rem;
  }
}

/* Additional Mobile Responsive Enhancements */
@media (max-width: 992px) {
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
  
  .hero-title {
    font-size: 3rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .section-title h2 {
    font-size: 2.25rem;
  }
}

@media (max-width: 768px) {
  /* Enhanced mobile navigation */
  .navbar-brand img {
    max-width: 130px;
    height: auto;
  }
  
  /* Hero section mobile optimization */
  .hero {
    min-height: 80vh;
    padding: 2rem 0;
  }
  
  .hero-content {
    padding: 0 1rem;
    max-width: 100%;
  }
  
  .hero-title {
    font-size: 2.25rem;
    margin-bottom: 1.5rem;
    line-height: 1.2;
  }
  
  .hero-subtitle {
    font-size: 1rem;
    margin-bottom: 2rem;
    line-height: 1.6;
  }
  
  /* Button mobile adjustments */
  .btn-lg {
    padding: 1rem 2rem;
    font-size: 1rem;
    width: 100%;
    margin-bottom: 0.75rem;
  }
  
  .d-flex.gap-4 {
    flex-direction: column;
    gap: 0.75rem !important;
  }
  
  /* Section mobile spacing */
  .section {
    padding: 3rem 0;
  }
  
  .section-title {
    margin-bottom: 2.5rem;
  }
  
  .section-title h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
  }
  
  .section-title p {
    font-size: 1rem;
  }
  
  /* Card mobile adjustments */
  .card {
    margin-bottom: 1.5rem;
  }
  
  .card-body {
    padding: 1.5rem;
  }
  
  .service-icon {
    width: 60px;
    height: 60px;
    font-size: 1.5rem;
    margin-bottom: 1rem;
  }
  
  /* Property cards mobile */
  .card-property .card-image {
    height: 200px;
  }
  
  .card-property .price-badge {
    top: 0.75rem;
    right: 0.75rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
  }
  
  .card-property .card-content {
    padding: 1.25rem;
  }
  
  /* Footer mobile */
  .footer {
    padding: 3rem 0 2rem;
  }
  
  .footer .row > div {
    margin-bottom: 2rem;
  }
  
  .footer-contact-item {
    margin-bottom: 1rem;
  }
  
  .social-links {
    justify-content: center;
  }
  
  /* Floating buttons mobile */
  .floating-btn {
    width: 50px;
    height: 50px;
    bottom: 20px;
    right: 20px;
  }
  
  .floating-btn i {
    font-size: 1.25rem;
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  /* Hero extra small screens */
  .hero {
    min-height: 70vh;
  }
  
  .hero-title {
    font-size: 1.875rem;
    margin-bottom: 1rem;
  }
  
  .hero-subtitle {
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
  }
  
  /* Navigation extra small */
  .navbar {
    padding: 0.5rem 0 !important;
  }
  
  .navbar-brand img {
    max-width: 110px;
  }
  
  /* Section extra small */
  .section {
    padding: 2.5rem 0;
  }
  
  .section-title h2 {
    font-size: 1.75rem;
  }
  
  .section-title p {
    font-size: 0.9rem;
  }
  
  /* Card extra small */
  .card-body {
    padding: 1.25rem;
  }
  
  .service-icon {
    width: 50px;
    height: 50px;
    font-size: 1.25rem;
  }
  
  /* Property cards extra small */
  .card-property .card-image {
    height: 180px;
  }
  
  .card-property .price-badge {
    top: 0.5rem;
    right: 0.5rem;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
  }
  
  .card-property .card-content {
    padding: 1rem;
  }
  
  /* Typography extra small */
  h1 { font-size: 1.75rem; }
  h2 { font-size: 1.5rem; }
  h3 { font-size: 1.25rem; }
  h4 { font-size: 1.125rem; }
  h5 { font-size: 1rem; }
  h6 { font-size: 0.875rem; }
  
  /* Button extra small */
  .btn {
    padding: 0.75rem 1.5rem;
    font-size: 0.9rem;
  }
  
  .btn-lg {
    padding: 0.875rem 1.75rem;
    font-size: 0.95rem;
  }
  
  .btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
  }
  
  /* Spacing extra small */
  .mb-4 { margin-bottom: 1rem; }
  .mb-6 { margin-bottom: 1.5rem; }
  .mb-8 { margin-bottom: 2rem; }
  .mt-8 { margin-top: 2rem; }
  .p-6 { padding: 1rem; }
}

/* Landscape mobile orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .hero {
    min-height: 100vh;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .hero-subtitle {
    font-size: 0.95rem;
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  .btn:hover {
    transform: none;
  }
  
  .card:hover {
    transform: none;
  }
  
  .card-property:hover {
    transform: none;
  }
  
  .card-property:hover .card-image img {
    transform: none;
  }
  
  .floating-btn:hover {
    transform: none;
  }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  .hero {
    background-attachment: scroll;
  }
}