/* Oiko Home Spaces - Main Stylesheet */
/* 2025 Modern Design Standards */

/* Import Bootstrap 5.3 */
@import url('https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css');

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:wght@400;500;600;700&display=swap');

/* 2025 Color Palette */
:root {
  --primary-color: #1E3A3A;      /* Midnight Teal */
  --secondary-color: #9DBF9E;    /* Sage Green */
  --accent-color: #E9B44C;       /* Golden Sand */
  --background-color: #F9F9F6;   /* Soft Ivory */
  --text-color: #1A1A1A; /* Increased contrast for readability */
  --white: #FFFFFF;
  --light-gray: #F5F5F5;
  --border-color: #E0E0E0;
  --shadow: 0 4px 20px rgba(30, 58, 58, 0.1);
  --shadow-hover: 0 8px 30px rgba(30, 58, 58, 0.15);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  color: var(--text-color);
  background-color: var(--background-color);
  line-height: 1.6;
  font-size: 16px;
}

h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', serif;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 1rem;
}

h1 { font-size: 3.5rem; line-height: 1.2; }
h2 { font-size: 2.8rem; line-height: 1.3; }
h3 { font-size: 2.2rem; line-height: 1.4; }
h4 { font-size: 1.8rem; line-height: 1.4; }
h5 { font-size: 1.4rem; line-height: 1.5; }
h6 { font-size: 1.2rem; line-height: 1.5; }

p {
  margin-bottom: 1.2rem;
  color: var(--text-color);
}

a {
  color: var(--primary-color);
  text-decoration: none;
  transition: all 0.3s ease;
}

a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* Smooth Scroll */
html {
  scroll-behavior: smooth;
}

/* Container Improvements */
.container-fluid {
  padding-left: 2rem;
  padding-right: 2rem;
}

@media (max-width: 768px) {
  .container-fluid {
    padding-left: 1rem;
    padding-right: 1rem;
  }
}

/* Navigation Styles */
.navbar {
  background-color: var(--white) !important;
  box-shadow: var(--shadow);
  padding: 1rem 0;
  transition: all 0.3s ease;
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-color) !important;
}

.navbar-nav .nav-link {
  color: var(--text-color) !important;
  font-weight: 500;
  margin: 0 0.5rem;
  padding: 0.5rem 1rem !important;
  border-radius: 8px;
  transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--primary-color) !important;
  background-color: rgba(157, 191, 158, 0.1);
}

.dropdown-menu {
  border: none;
  box-shadow: var(--shadow);
  border-radius: 12px;
  padding: 1rem 0;
}

.dropdown-item {
  padding: 0.7rem 1.5rem;
  color: var(--text-color);
  transition: all 0.3s ease;
}

.dropdown-item:hover {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

/* Button Styles */
.btn {
  border-radius: 8px;
  padding: 0.75rem 2rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: all 0.3s ease;
  border: none;
}

.btn-primary {
  background-color: var(--primary-color);
  color: var(--white);
}

.btn-primary:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
  box-shadow: var(--shadow-hover);
}

.btn-secondary {
  background-color: var(--secondary-color);
  color: var(--primary-color);
}

.btn-secondary:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
}

.btn-outline-primary {
  border: 2px solid var(--primary-color);
  color: var(--primary-color);
  background-color: transparent;
}

.btn-outline-primary:hover {
  background-color: var(--primary-color);
  color: var(--white);
  transform: translateY(-2px);
}

/* Hero Section */
.hero-section {
  /* Use Pexels image across all pages for a rich hero background */
  background: linear-gradient(135deg, rgba(30, 58, 58, 0.85) 0%, rgba(30, 58, 58, 0.85) 100%),
              url('https://images.pexels.com/photos/1457842/pexels-photo-1457842.jpeg?auto=compress&cs=tinysrgb&w=1600');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  color: var(--white);
  padding: 8rem 0 6rem;
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="%23ffffff" opacity="0.05"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>') repeat;
  opacity: 0.3;
}

/* Ensure links in hero remain accessible on dark background */
.hero-section a {
  color: var(--white);
}

.hero-section a:hover {
  color: var(--accent-color);
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-title {
  font-size: 4rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
  opacity: 0.9;
}

/* Card Styles */
.card {
  border: none;
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  overflow: hidden;
  background-color: var(--white);
}

.card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-hover);
}

.card-img-top {
  height: 250px;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.card:hover .card-img-top {
  transform: scale(1.05);
}

.card-body {
  padding: 2rem;
}

.card-title {
  color: var(--primary-color);
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.card-text {
  color: var(--text-color);
  line-height: 1.6;
}

/* Section Styles */
.section {
  padding: 5rem 0;
}

.section-title {
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background-color: var(--accent-color);
  border-radius: 2px;
}

/* Service Cards */
.service-card {
  text-align: center;
  padding: 2.5rem 1.5rem;
  border-radius: 16px;
  background-color: var(--white);
  box-shadow: var(--shadow);
  transition: all 0.3s ease;
  height: 100%;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}

.service-icon {
  width: 80px;
  height: 80px;
  background-color: var(--secondary-color);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  font-size: 2rem;
  color: var(--primary-color);
}

/* Testimonial Styles */
.testimonial-card {
  background-color: var(--white);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow);
  text-align: center;
  position: relative;
  margin: 1rem;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 4rem;
  color: var(--accent-color);
  font-family: 'Playfair Display', serif;
}

.testimonial-text {
  font-style: italic;
  margin-bottom: 1.5rem;
  font-size: 1.1rem;
}

.testimonial-author {
  font-weight: 600;
  color: var(--primary-color);
}

/* Footer Styles */
.footer {
  background-color: var(--primary-color);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer h5 {
  color: var(--accent-color);
  margin-bottom: 1.5rem;
}

.footer a {
  color: var(--white);
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

.footer a:hover {
  opacity: 1;
  color: var(--accent-color);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  opacity: 0.7;
}

/* Form Styles */
.form-control {
  border: 2px solid var(--border-color);
  border-radius: 8px;
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(30, 58, 58, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--primary-color);
  margin-bottom: 0.5rem;
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.fade-in-up {
  animation: fadeInUp 0.6s ease-out;
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  h1 { font-size: 2.5rem; }
  h2 { font-size: 2rem; }
  h3 { font-size: 1.7rem; }
  
  .section {
    padding: 3rem 0;
  }
  
  .service-card {
    margin-bottom: 2rem;
  }
}

@media (max-width: 576px) {
  .hero-section {
    padding: 6rem 0 4rem;
  }
  
  .hero-title {
    font-size: 2rem;
  }
  
  .btn {
    padding: 0.6rem 1.5rem;
    font-size: 0.9rem;
  }
}

/* Utility Classes */
.text-primary-custom {
  color: var(--primary-color) !important;
}

.text-secondary-custom {
  color: var(--secondary-color) !important;
}

.text-accent {
  color: var(--accent-color) !important;
}

.bg-primary-custom {
  background-color: var(--primary-color) !important;
}

.bg-secondary-custom {
  background-color: var(--secondary-color) !important;
}

.bg-light-custom {
  background-color: var(--background-color) !important;
}

/* Loading Animation */
.loading {
  opacity: 0;
  transform: translateY(20px);
  transition: all 0.6s ease;
}

.loading.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Global readability improvements */
.text-muted {
  color: #5A6672 !important; /* Darker than Bootstrap default for better contrast */
}

/* Strengthen global link and heading contrast on light backgrounds */
a { color: #153131; } /* slightly darker than primary for better contrast */
a:hover { color: var(--accent-color); }

/* Ensure headings inherit white when inside hero and dark sections */
.hero-section h1, .hero-section h2, .hero-section h3, .hero-section h4, .hero-section h5, .hero-section h6,
.hero-section p, .hero-section li, .hero-section small { color: var(--white) !important; }

/* Add real imagery to right-side hero placeholder blocks on all pages */
.hero-image > .bg-light {
  background-image: url('https://images.pexels.com/photos/36362/pexels-photo.jpg?auto=compress&cs=tinysrgb&w=1600');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  color: transparent; /* hide placeholder text color */
}
.hero-image > .bg-light::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.25) 100%);
  border-radius: inherit;
}
.hero-image > .bg-light i, .hero-image > .bg-light h4, .hero-image > .bg-light p { opacity: 0; }

/* Featured Projects: replace colored headers with photographic covers */
/* slide 1 cards */
.carousel-item:first-child .col-lg-4:nth-child(1) .card > .bg-secondary-custom,
.carousel-item:first-child .col-md-6:nth-child(1) .card > .bg-secondary-custom {
  background-image: url('https://images.pexels.com/photos/259962/pexels-photo-259962.jpeg?auto=compress&cs=tinysrgb&w=1200');
}
.carousel-item:first-child .col-lg-4:nth-child(2) .card > .bg-secondary-custom,
.carousel-item:first-child .col-md-6:nth-child(2) .card > .bg-secondary-custom {
  background-image: url('https://images.pexels.com/photos/1643383/pexels-photo-1643383.jpeg?auto=compress&cs=tinysrgb&w=1200');
}
.carousel-item:first-child .col-lg-4:nth-child(3) .card > .bg-secondary-custom,
.carousel-item:first-child .col-md-6:nth-child(3) .card > .bg-secondary-custom {
  background-image: url('https://images.pexels.com/photos/1115804/pexels-photo-1115804.jpeg?auto=compress&cs=tinysrgb&w=1200');
}

/* slide 2 cards */
.carousel-item:nth-child(2) .col-lg-4:nth-child(1) .card > .bg-secondary-custom,
.carousel-item:nth-child(2) .col-md-6:nth-child(1) .card > .bg-secondary-custom {
  background-image: url('https://images.pexels.com/photos/1454806/pexels-photo-1454806.jpeg?auto=compress&cs=tinysrgb&w=1200');
}
.carousel-item:nth-child(2) .col-lg-4:nth-child(2) .card > .bg-secondary-custom,
.carousel-item:nth-child(2) .col-md-6:nth-child(2) .card > .bg-secondary-custom {
  background-image: url('https://images.pexels.com/photos/276724/pexels-photo-276724.jpeg?auto=compress&cs=tinysrgb&w=1200');
}
.carousel-item:nth-child(2) .col-lg-4:nth-child(3) .card > .bg-secondary-custom,
.carousel-item:nth-child(2) .col-md-6:nth-child(3) .card > .bg-secondary-custom {
  background-image: url('https://images.pexels.com/photos/373548/pexels-photo-373548.jpeg?auto=compress&cs=tinysrgb&w=1200');
}

/* Make card headers behave as cover images and hide icons inside */
.card > .bg-secondary-custom {
  background-size: cover !important;
  background-position: center !important;
  background-repeat: no-repeat !important;
  position: relative;
}
.card > .bg-secondary-custom i { opacity: 0; }
.card > .bg-secondary-custom::after {
  content: '';
  position: absolute; inset: 0; border-radius: inherit;
  background: linear-gradient(180deg, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.15) 100%);
}

/* Utility: ensure any text laid over images remains legible if used */
.has-image-overlay, .image-cover-text { color: var(--white) !important; text-shadow: 0 1px 2px rgba(0,0,0,.5); }
.service-card {
  position: relative;
  overflow: hidden;
}
.service-card * { position: relative; z-index: 1; }
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0.12; /* keep subtle to maintain text readability */
  filter: saturate(0.9) contrast(1.05);
  z-index: 0;
}
/* Rotate a curated set of Pexels images across service cards generically */
.row > [class*="col-"]:nth-child(1) .service-card::before {
  background-image: url('https://images.pexels.com/photos/271795/pexels-photo-271795.jpeg?auto=compress&cs=tinysrgb&w=1200'); /* Interior */
}
.row > [class*="col-"]:nth-child(2) .service-card::before {
  background-image: url('https://images.pexels.com/photos/1457847/pexels-photo-1457847.jpeg?auto=compress&cs=tinysrgb&w=1200'); /* Kitchen */
}
.row > [class*="col-"]:nth-child(3) .service-card::before {
  background-image: url('https://images.pexels.com/photos/1571460/pexels-photo-1571460.jpeg?auto=compress&cs=tinysrgb&w=1200'); /* Bathroom */
}
.row > [class*="col-"]:nth-child(4) .service-card::before {
  background-image: url('https://images.pexels.com/photos/1643383/pexels-photo-1643383.jpeg?auto=compress&cs=tinysrgb&w=1200'); /* Outdoor */
}
.row > [class*="col-"]:nth-child(5) .service-card::before {
  background-image: url('https://images.pexels.com/photos/1080916/pexels-photo-1080916.jpeg?auto=compress&cs=tinysrgb&w=1200'); /* Smart Home */
}
.row > [class*="col-"]:nth-child(6) .service-card::before {
  background-image: url('https://images.pexels.com/photos/276724/pexels-photo-276724.jpeg?auto=compress&cs=tinysrgb&w=1200'); /* Flooring */
}

/* Improve hero breadcrumb/link contrast explicitly */
.hero-section .breadcrumb-item a { color: var(--white) !important; }
.hero-section .breadcrumb-item.active { color: var(--accent-color) !important; }
.hero-section .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.6); }
/* Force high contrast in colored sections (above footer newsletter, etc.) */
.bg-primary-custom,
.bg-secondary-custom { color: var(--white) !important; }
.bg-primary-custom h1, .bg-primary-custom h2, .bg-primary-custom h3, .bg-primary-custom h4, .bg-primary-custom h5, .bg-primary-custom h6,
.bg-primary-custom p, .bg-primary-custom a, .bg-primary-custom li, .bg-primary-custom small,
.bg-secondary-custom h1, .bg-secondary-custom h2, .bg-secondary-custom h3, .bg-secondary-custom h4, .bg-secondary-custom h5, .bg-secondary-custom h6,
.bg-secondary-custom p, .bg-secondary-custom a, .bg-secondary-custom li, .bg-secondary-custom small {
  color: var(--white) !important;
}
.bg-primary-custom a:hover, .bg-secondary-custom a:hover { color: var(--accent-color) !important; }

/* Footer bottom: improve readability and avoid global dimming */
.footer-bottom { opacity: 1; }
.footer-bottom p, .footer-bottom small, .footer-bottom li { color: rgba(255,255,255,0.92) !important; }
.footer-bottom a { color: #FFFFFF !important; opacity: 1 !important; }
.footer-bottom a:hover { color: var(--accent-color) !important; }