/* Ember Forest Architecture Studio - Modern CSS */

:root {
  --primary-color: #FF6B35;
  --secondary-color: #2C5F41;
  --primary-dark: #E55A2B;
  --secondary-light: #3A7A54;
  --accent-warm: #FFB896;
  --accent-forest: #1E4A32;
  --text-dark: #2D3436;
  --text-light: #636E72;
  --white: #FFFFFF;
  --light-gray: #F8F9FA;
  --medium-gray: #E9ECEF;
  --border-color: #DEE2E6;
  --shadow-light: 0 2px 15px rgba(255, 107, 53, 0.1);
  --shadow-medium: 0 5px 25px rgba(44, 95, 65, 0.15);
  --shadow-strong: 0 10px 40px rgba(45, 52, 54, 0.2);
  --gradient-primary: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  --gradient-secondary: linear-gradient(135deg, var(--secondary-color) 0%, var(--accent-forest) 100%);
  --gradient-hero: linear-gradient(135deg, rgba(44, 95, 65, 0.9) 0%, rgba(30, 74, 50, 0.9) 100%);
  --transition-fast: all 0.3s ease;
  --transition-smooth: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
  --border-radius: 8px;
  --border-radius-lg: 16px;
}

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

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

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  line-height: 1.7;
  color: var(--text-dark);
  background-color: var(--white);
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: 1rem;
  color: var(--text-dark);
}

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

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

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

p {
  margin-bottom: 1.5rem;
  color: var(--text-light);
  font-size: 1.1rem;
}

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

a:hover {
  color: var(--primary-dark);
}

/* Bootstrap 5 Overrides */
.btn {
  font-weight: 500;
  border-radius: var(--border-radius);
  padding: 0.75rem 2rem;
  border: none;
  font-size: 1rem;
  transition: var(--transition-fast);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: var(--transition-smooth);
}

.btn:hover::before {
  left: 100%;
}

.btn-primary {
  background: var(--gradient-primary);
  color: var(--white);
  box-shadow: var(--shadow-light);
}

.btn-primary:hover {
  background: var(--gradient-primary);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(255, 107, 53, 0.3);
  color: var(--white);
}

.btn-secondary {
  background: var(--gradient-secondary);
  color: var(--white);
  box-shadow: var(--shadow-medium);
}

.btn-secondary:hover {
  background: var(--gradient-secondary);
  transform: translateY(-2px);
  box-shadow: 0 5px 20px rgba(44, 95, 65, 0.3);
  color: var(--white);
}

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

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

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

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

.card-img-top {
  transition: var(--transition-smooth);
}

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

/* Navigation */
.navbar {
  padding: 1rem 0;
  transition: var(--transition-fast);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-light);
  padding: 0.5rem 0;
}

.navbar-brand {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--secondary-color);
}

.navbar-brand:hover {
  color: var(--primary-color);
}

.navbar-nav .nav-link {
  font-weight: 500;
  color: var(--text-dark);
  margin: 0 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  transition: var(--transition-fast);
  position: relative;
}

.navbar-nav .nav-link::after {
  content: '';
  position: absolute;
  width: 0;
  height: 2px;
  bottom: 0;
  left: 50%;
  background: var(--primary-color);
  transition: var(--transition-fast);
  transform: translateX(-50%);
}

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

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
  color: var(--primary-color);
}

.navbar-toggler {
  border: none;
  padding: 0.25rem 0.5rem;
  font-size: 1.2rem;
  background: var(--light-gray);
  border-radius: var(--border-radius);
}

.navbar-toggler:focus {
  box-shadow: none;
}

/* Hero Section */
.hero-section {
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, rgba(44, 95, 65, 0.9) 0%, rgba(30, 74, 50, 0.9) 100%), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><path d="M0,1000V0h1000v1000Z" fill="%232C5F41"/><path d="M200,800C300,700 500,600 700,800C800,900 600,1000 400,900C300,850 100,900 200,800Z" fill="%23FF6B35" opacity="0.1"/></svg>');
  background-size: cover;
  background-position: center;
  color: var(--white);
  position: relative;
  overflow: hidden;
}

.hero-content {
  z-index: 2;
  position: relative;
}

.hero-title {
  color: var(--white);
  margin-bottom: 1.5rem;
  animation: fadeInUp 1s ease-out;
}

.hero-subtitle {
  font-size: 1.3rem;
  color: var(--accent-warm);
  margin-bottom: 2rem;
  animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-buttons {
  animation: fadeInUp 1s ease-out 0.4s both;
}

.hero-buttons .btn {
  margin: 0.5rem 1rem 0.5rem 0;
}

/* Floating Elements */
.floating-element {
  position: absolute;
  animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(1) {
  top: 20%;
  right: 10%;
  animation-delay: -2s;
}

.floating-element:nth-child(2) {
  bottom: 30%;
  left: 5%;
  animation-delay: -4s;
}

/* Sections */
.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: 60px;
  height: 3px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

/* Services Section */
.service-card {
  text-align: center;
  padding: 2.5rem 2rem;
  height: 100%;
  position: relative;
  background: var(--white);
  border-radius: var(--border-radius-lg);
  transition: var(--transition-smooth);
}

.service-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  background: var(--gradient-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  color: var(--white);
  transition: var(--transition-fast);
}

.service-card:hover .service-icon {
  transform: scale(1.1) rotate(5deg);
}

/* Portfolio Section */
.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
  margin-bottom: 2rem;
  cursor: pointer;
}

.portfolio-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--gradient-hero);
  opacity: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  color: var(--white);
  transition: var(--transition-fast);
}

.portfolio-item:hover .portfolio-overlay {
  opacity: 1;
}

.portfolio-item img {
  transition: var(--transition-smooth);
  width: 100%;
  height: 300px;
  object-fit: cover;
}

.portfolio-item:hover img {
  transform: scale(1.1);
}

/* About Section */
.about-content {
  padding: 2rem 0;
}

.stat-card {
  text-align: center;
  padding: 1.5rem;
  background: var(--light-gray);
  border-radius: var(--border-radius);
  margin-bottom: 1rem;
  transition: var(--transition-fast);
}

.stat-card:hover {
  background: var(--white);
  box-shadow: var(--shadow-light);
  transform: translateY(-5px);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--primary-color);
  display: block;
}

.stat-label {
  color: var(--text-light);
  font-weight: 500;
}

/* Contact Section */
.contact-section {
  background: var(--light-gray);
}

.contact-info {
  background: var(--gradient-secondary);
  color: var(--white);
  padding: 2rem;
  border-radius: var(--border-radius-lg);
  height: 100%;
}

.contact-item {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
}

.contact-icon {
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 1rem;
  color: var(--accent-warm);
}

/* Forms */
.form-control {
  border: 2px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 0.75rem 1rem;
  font-size: 1rem;
  transition: var(--transition-fast);
  background: var(--white);
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(255, 107, 53, 0.25);
}

.form-label {
  font-weight: 500;
  color: var(--text-dark);
  margin-bottom: 0.5rem;
}

.form-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.25rem;
}

/* Footer */
.footer {
  background: var(--secondary-color);
  color: var(--white);
  padding: 3rem 0 1rem;
}

.footer h5 {
  color: var(--accent-warm);
  margin-bottom: 1rem;
}

.footer a {
  color: rgba(255, 255, 255, 0.8);
  transition: var(--transition-fast);
}

.footer a:hover {
  color: var(--accent-warm);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  margin-top: 2rem;
  padding-top: 1rem;
  text-align: center;
  color: rgba(255, 255, 255, 0.7);
}

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

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

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

.animate-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition-smooth);
}

.animate-on-scroll.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Loading Spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 1s ease-in-out infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .hero-section {
    min-height: 80vh;
    text-align: center;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .hero-buttons .btn {
    display: block;
    width: 100%;
    margin: 0.5rem 0;
  }
  
  .contact-info {
    margin-top: 2rem;
  }
  
  .portfolio-item img {
    height: 250px;
  }
  
  .navbar-collapse {
    background: var(--white);
    margin-top: 1rem;
    padding: 1rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
  }
}

@media (max-width: 576px) {
  .container {
    padding-left: 1rem;
    padding-right: 1rem;
  }
  
  h1 {
    font-size: 2.5rem;
  }
  
  .service-card {
    padding: 2rem 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
  .card {
    background: #1a1a1a;
    color: var(--white);
  }
  
  .form-control {
    background: #2a2a2a;
    color: var(--white);
    border-color: #444;
  }
}

/* High contrast mode */
@media (prefers-contrast: high) {
  .btn-primary {
    background: var(--primary-color);
    border: 2px solid var(--primary-dark);
  }
  
  .btn-secondary {
    background: var(--secondary-color);
    border: 2px solid var(--accent-forest);
  }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms;
    animation-iteration-count: 1;
    transition-duration: 0.01ms;
  }
  
  html {
    scroll-behavior: auto;
  }
}