/* ===================================
   PRIMEROSE GROUP ESTATE - REDESIGNED
   Elegant & Professional Real Estate
   =================================== */

/* ===== CSS VARIABLES ===== */
:root {
  /* Primary Colors - Sophisticated Green */
  --primary: #1B4D3E;
  --primary-light: #2D6A4F;
  --primary-dark: #0D2818;
  
  /* Accent - Refined Gold */
  --accent: #C9A227;
  --accent-light: #E2C044;
  --accent-dark: #A68A1F;
  
  /* Neutrals - Clean & Modern */
  --white: #FFFFFF;
  --off-white: #FAFAFA;
  --light-grey: #F5F5F5;
  --medium-grey: #E0E0E0;
  --dark-grey: #757575;
  --charcoal: #424242;
  --text-primary: #212121;
  --text-secondary: #616161;
  
  /* Spacing System */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 3rem;
  --space-xl: 5rem;
  --space-2xl: 8rem;
  
  /* Typography */
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  
  /* Effects */
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 12px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  
  /* Border Radius */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  
  /* Transitions */
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--text-primary);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition);
}

ul, ol {
  list-style: none;
}

button {
  border: none;
  background: none;
  cursor: pointer;
  font-family: inherit;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.3;
  color: var(--text-primary);
}

h1 {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 700;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.01em;
}

h3 {
  font-size: clamp(1.5rem, 3vw, 1.75rem);
}

h4 {
  font-size: 1.25rem;
  font-family: var(--font-body);
  font-weight: 600;
}

p {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  margin-bottom: var(--space-sm);
}

.text-accent {
  color: var(--accent);
}

/* ===== LAYOUT ===== */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.container-narrow {
  max-width: 800px;
}

.container-wide {
  max-width: 1400px;
}

.section {
  padding: var(--space-xl) 0;
}

.section-lg {
  padding: var(--space-2xl) 0;
}

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

/* Section Headers */
.section-header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto var(--space-lg);
}

.section-header h2 {
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-size: 1.125rem;
}

/* Subtle label above headings */
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

/* ===== GRID SYSTEM ===== */
.grid {
  display: grid;
  gap: var(--space-md);
}

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

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

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

.grid-auto-fit {
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

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

.btn-primary:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-accent {
  background: var(--accent);
  color: var(--text-primary);
}

.btn-accent:hover {
  background: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

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

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

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

.btn-white:hover {
  background: var(--off-white);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-group {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ===== HEADER & NAVIGATION ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: transparent;
  transition: var(--transition);
}

.header.scrolled {
  background: var(--white);
  box-shadow: var(--shadow-sm);
}

.header.scrolled .nav-link {
  color: var(--text-primary);
}

.header.scrolled .logo-white {
  display: none;
}

.header.scrolled .logo-dark {
  display: block;
}

.nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 0;
}

.logo {
  height: 45px;
  width: auto;
}

.logo-dark {
  display: none;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--white);
  padding: 0.5rem 0;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: var(--transition);
}

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

.header.scrolled .nav-link:hover {
  color: var(--primary);
}

.nav-cta {
  margin-left: var(--space-sm);
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
  padding: 5px;
  z-index: 1001;
}

.mobile-menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: var(--transition);
}

.header.scrolled .mobile-menu-toggle span {
  background: var(--text-primary);
}

.mobile-menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -6px);
}

/* ===== HERO SECTION ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 0, 0, 0.7) 0%,
    rgba(0, 0, 0, 0.4) 50%,
    rgba(0, 0, 0, 0.2) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 650px;
  padding: var(--space-xl) 0;
}

.hero h1 {
  color: var(--white);
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: 1.25rem;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: var(--space-lg);
  line-height: 1.8;
}

/* Hero for inner pages - shorter */
.hero-sm {
  min-height: 50vh;
}

.hero-sm .hero-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

/* Trust Badges */
.trust-badges {
  display: flex;
  gap: var(--space-md);
  margin-top: var(--space-lg);
  flex-wrap: wrap;
}

.trust-badge {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.625rem 1rem;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.15);
}

/* ===== CARDS ===== */
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}

.card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.card-body {
  padding: var(--space-md);
}

.card-elevated {
  box-shadow: var(--shadow-md);
}

.card-bordered {
  border: 1px solid var(--medium-grey);
  box-shadow: none;
}

.card-bordered:hover {
  border-color: var(--primary);
  box-shadow: var(--shadow-md);
}

/* Feature Card */
.feature-card {
  padding: var(--space-lg);
  text-align: center;
  background: var(--white);
  border: 1px solid var(--medium-grey);
  border-radius: var(--radius-lg);
  transition: var(--transition);
}

.feature-card:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.feature-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  background: var(--light-grey);
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.feature-card:hover .feature-icon {
  background: var(--primary);
  color: var(--white);
}

.feature-card h4 {
  margin-bottom: var(--space-xs);
  color: var(--text-primary);
}

.feature-card p {
  font-size: 0.9375rem;
  margin-bottom: 0;
}

/* Estate Card */
.estate-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

.estate-card-image {
  height: 280px;
  overflow: hidden;
}

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

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

.estate-card-body {
  padding: var(--space-md);
}

.estate-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-md);
  border-bottom: 1px solid var(--medium-grey);
}

.estate-meta-item {
  font-size: 0.875rem;
}

.estate-meta-item strong {
  display: block;
  font-size: 0.75rem;
  color: var(--dark-grey);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

/* ===== TESTIMONIALS ===== */
.testimonial-card {
  background: var(--white);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--medium-grey);
  text-align: center;
}

.testimonial-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  margin: 0 auto var(--space-md);
  object-fit: cover;
  border: 3px solid var(--accent);
}

.testimonial-text {
  font-size: 1.0625rem;
  font-style: italic;
  color: var(--text-secondary);
  margin-bottom: var(--space-md);
  line-height: 1.8;
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary);
}

/* ===== STATS SECTION ===== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  text-align: center;
}

.stat-item h3 {
  font-size: 3rem;
  color: var(--accent);
  margin-bottom: var(--space-xs);
}

.stat-item p {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: var(--primary);
  color: var(--white);
  text-align: center;
  padding: var(--space-xl) 0;
}

.cta-section h2 {
  color: var(--white);
  margin-bottom: var(--space-sm);
}

.cta-section p {
  color: rgba(255, 255, 255, 0.85);
  font-size: 1.125rem;
  margin-bottom: var(--space-lg);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.cta-section .btn-group {
  justify-content: center;
}

/* ===== FOOTER ===== */
.footer {
  background: var(--primary-dark);
  color: var(--white);
  padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-brand p {
  color: rgba(255, 255, 255, 0.7);
  margin-top: var(--space-sm);
  font-size: 0.9375rem;
}

.footer-logo {
  height: 45px;
}

.footer h4 {
  color: var(--white);
  font-size: 1rem;
  margin-bottom: var(--space-md);
  font-family: var(--font-body);
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.footer-link {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.9375rem;
  transition: var(--transition);
}

.footer-link:hover {
  color: var(--accent);
  padding-left: 4px;
}

.social-links {
  display: flex;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

.social-link {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  transition: var(--transition);
}

.social-link:hover {
  background: var(--accent);
  transform: translateY(-3px);
}

.footer-bottom {
  padding-top: var(--space-md);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  text-align: center;
}

.footer-bottom p {
  color: rgba(255, 255, 255, 0.5);
  font-size: 0.875rem;
  margin: 0;
}

/* ===== FORMS ===== */
.form-group {
  margin-bottom: var(--space-md);
}

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

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: var(--font-body);
  border: 1px solid var(--medium-grey);
  border-radius: var(--radius-sm);
  background: var(--white);
  transition: var(--transition);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(27, 77, 62, 0.1);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

/* ===== MODAL ===== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  backdrop-filter: blur(4px);
}

.modal.active {
  display: flex;
}

.modal-content {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  max-width: 500px;
  width: 100%;
  position: relative;
  animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.modal-close {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  font-size: 1.5rem;
  color: var(--dark-grey);
  cursor: pointer;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--light-grey);
  color: var(--text-primary);
}

.modal h3 {
  margin-bottom: var(--space-md);
  padding-right: var(--space-lg);
}

/* ===== FAQ ===== */
.faq-item {
  border: 1px solid var(--medium-grey);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  overflow: hidden;
}

.faq-question {
  padding: var(--space-md);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  transition: var(--transition);
}

.faq-question:hover {
  background: var(--light-grey);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
  max-height: 500px;
}

.faq-answer-content {
  padding: 0 var(--space-md) var(--space-md);
}

/* ===== UTILITIES ===== */
.bg-light {
  background: var(--light-grey);
}

.bg-white {
  background: var(--white);
}

.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: var(--space-sm); }
.mb-md { margin-bottom: var(--space-md); }
.mb-lg { margin-bottom: var(--space-lg); }

.mt-0 { margin-top: 0; }
.mt-sm { margin-top: var(--space-sm); }
.mt-md { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-in {
  animation: fadeInUp 0.6s ease forwards;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Tablet Landscape */
@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-lg);
  }
}

/* Tablet Portrait */
@media (max-width: 991px) {
  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    height: 100vh;
    background: var(--white);
    flex-direction: column;
    padding: 100px var(--space-md) var(--space-md);
    box-shadow: var(--shadow-xl);
    transition: var(--transition);
    gap: 0;
    align-items: stretch;
  }
  
  .nav-links.active {
    right: 0;
  }
  
  .nav-links .nav-link {
    color: var(--text-primary);
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--medium-grey);
    display: block;
  }
  
  .nav-links .nav-cta {
    margin-left: 0;
    margin-top: var(--space-md);
  }
  
  .nav-links .btn {
    width: 100%;
    justify-content: center;
  }
  
  .mobile-menu-toggle {
    display: flex;
  }
  
  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }
  
  .hero-content {
    max-width: 100%;
  }
}

/* Mobile */
@media (max-width: 767px) {
  :root {
    --space-xl: 3rem;
    --space-2xl: 4rem;
  }
  
  .hero {
    min-height: 90vh;
  }
  
  .hero::before {
    background: linear-gradient(
      to bottom,
      rgba(0, 0, 0, 0.6) 0%,
      rgba(0, 0, 0, 0.5) 100%
    );
  }
  
  .hero-content {
    text-align: center;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
  
  .hero p {
    font-size: 1.0625rem;
  }
  
  .btn-group {
    flex-direction: column;
    width: 100%;
  }
  
  .btn {
    width: 100%;
  }
  
  .trust-badges {
    justify-content: center;
  }
  
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  
  .social-links {
    justify-content: center;
  }
  
  .footer-links {
    align-items: center;
  }
  
  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-md);
  }
  
  .stat-item h3 {
    font-size: 2rem;
  }
  
  .section-header {
    text-align: center;
  }
  
  .estate-card-meta {
    grid-template-columns: 1fr;
  }
}

/* Small Mobile */
@media (max-width: 480px) {
  .container {
    padding: 0 var(--space-sm);
  }
  
  .hero h1 {
    font-size: 1.75rem;
  }
  
  .trust-badges {
    flex-direction: column;
    align-items: center;
  }
  
  .trust-badge {
    width: 100%;
    justify-content: center;
  }
  
  .modal-content {
    padding: var(--space-md);
  }
  
  .feature-card {
    padding: var(--space-md);
  }
}

/* Touch Devices */
@media (hover: none) {
  .card:hover,
  .feature-card:hover {
    transform: none;
  }
  
  .btn:hover {
    transform: none;
  }
}

/* Print */
@media print {
  .header, .footer, .modal, .btn-group {
    display: none !important;
  }
  
  .hero {
    min-height: auto;
    padding: 2rem 0;
  }
  
  .hero::before {
    display: none;
  }
}
