/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #C85A3E;
  --secondary: #2C3E50;
  --accent: #D4A843;
  --dark: #1A1A1A;
  --light: #FAF7F2;
  --text: #333333;
  --text-light: #6B7280;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

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

/* Navigation Styles */
.navbar {
  background: transparent;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.05);
}

.navbar .logo-text {
  color: white;
  transition: color 0.3s ease;
}

.navbar.scrolled .logo-text {
  color: var(--dark);
}

.navbar #nav-links a {
  color: white;
  transition: color 0.3s ease;
  position: relative;
}

.navbar.scrolled #nav-links a {
  color: var(--text);
}

.navbar #nav-links a:hover {
  color: var(--primary);
}

.navbar #nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width 0.3s ease;
}

.navbar #nav-links a:hover::after {
  width: 100%;
}

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

.nav-cta:hover {
  background: var(--secondary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(200, 90, 62, 0.3);
}

.navbar.scrolled .nav-cta {
  background: var(--primary);
}

#mobile-menu-btn {
  color: white;
}

.navbar.scrolled #mobile-menu-btn {
  color: var(--dark);
}

/* Mobile Menu */
#mobile-menu {
  padding-top: 80px;
}

#mobile-nav-links a {
  color: white;
  font-size: 1.5rem;
  font-weight: 600;
  transition: color 0.3s ease;
}

#mobile-nav-links a:hover {
  color: var(--primary);
}

.mobile-nav-cta {
  background: var(--primary);
  color: white;
  width: 100%;
}

.mobile-nav-cta:hover {
  background: var(--secondary);
}

/* Hero Section */
.hero-section {
  padding-top: 80px;
  overflow-x: hidden;
}

.hero-bg {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.hero-overlay {
  background: linear-gradient(135deg, rgba(26, 26, 26, 0.75), rgba(44, 62, 80, 0.65));
}

.hero-headline,
.hero-subheadline {
  color: white;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.hero-cta {
  background: var(--primary);
  color: white;
  box-shadow: 0 4px 20px rgba(200, 90, 62, 0.4);
}

.hero-cta:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 6px 30px rgba(200, 90, 62, 0.5);
}

/* Section Overflow Control */
section {
  overflow-x: hidden;
  width: 100%;
  position: relative;
}

/* Service Cards */
.service-card {
  background: white;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
  height: 100%;
}

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

.service-card-content {
  padding: 32px 24px;
}

.service-icon-wrapper {
  width: 56px;
  height: 56px;
  background: var(--light);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 20px;
  color: var(--primary);
  transition: all 0.3s ease;
}

.service-card:hover .service-icon-wrapper {
  background: var(--primary);
  color: white;
  transform: scale(1.1);
}

.service-card-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--dark);
}

.service-card-description {
  color: var(--text-light);
  line-height: 1.7;
}

/* Gallery */
.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
  transition: all 0.4s ease;
}

.gallery-item:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.08);
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(26, 26, 26, 0.9), transparent);
  color: white;
  padding: 24px;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* Contact Cards */
.contact-card {
  transition: all 0.3s ease;
}

.contact-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.contact-icon-wrapper {
  width: 48px;
  height: 48px;
  background: var(--light);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  flex-shrink: 0;
}

.contact-map-wrapper {
  transition: all 0.3s ease;
}

.contact-map-wrapper:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

/* Scroll to Top Button */
#scroll-top {
  transition: all 0.3s ease;
}

#scroll-top.visible {
  opacity: 1;
  pointer-events: auto;
}

#scroll-top:hover {
  transform: translateY(-4px);
}

/* Responsive */
@media (max-width: 768px) {
  .hero-headline {
    font-size: 2.5rem;
  }
  
  .hero-subheadline {
    font-size: 1rem;
  }
  
  .gallery-item img {
    height: 240px;
  }
  
  .service-card-content {
    padding: 24px 20px;
  }
  
  .contact-card {
    padding: 20px !important;
  }
}

/* Small phones ≤ 480px */
@media (max-width: 480px) {
  .hero-headline {
    font-size: 2rem;
  }
  
  .hero-subheadline {
    font-size: 0.95rem;
  }
  
  .service-card-content {
    padding: 20px 16px;
  }
  
  .service-card-title {
    font-size: 1.25rem;
  }
  
  .service-card-description {
    font-size: 0.9rem;
  }
  
  .gallery-item img {
    height: 200px;
  }
  
  .contact-card {
    padding: 16px !important;
  }
  
  .contact-icon-wrapper {
    width: 40px;
    height: 40px;
  }
  
  .contact-icon-wrapper i {
    width: 20px !important;
    height: 20px !important;
  }
}

/* Very small screens < 350px */
@media (max-width: 350px) {
  .navbar .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .navbar .logo-text {
    font-size: 1.25rem;
  }
  
  .hero-section .container {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .hero-headline {
    font-size: 1.75rem;
    line-height: 1.2;
  }
  
  .hero-subheadline {
    font-size: 0.875rem;
  }
  
  .hero-cta {
    width: 100%;
    text-align: center;
    padding: 12px 20px;
  }
  
  section .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  .service-card-content {
    padding: 16px 12px;
  }
  
  .service-card-title {
    font-size: 1.125rem;
  }
  
  .service-card-description {
    font-size: 0.85rem;
  }
  
  .service-icon-wrapper {
    width: 48px;
    height: 48px;
  }
  
  .gallery-item img {
    height: 180px;
  }
  
  .contact-card {
    padding: 12px !important;
  }
  
  .contact-card h3 {
    font-size: 1rem;
  }
  
  .contact-phone,
  .contact-email,
  .contact-address,
  .contact-hours {
    font-size: 0.875rem;
    word-break: break-all;
  }
  
  .contact-map-wrapper {
    height: 300px !important;
  }
  
  #scroll-top {
    bottom: 1rem;
    right: 1rem;
    padding: 10px;
  }
  
  #scroll-top i {
    width: 20px !important;
    height: 20px !important;
  }
  
  footer .container {
    padding-left: 0.75rem !important;
    padding-right: 0.75rem !important;
  }
  
  footer h3 {
    font-size: 1.25rem;
  }
  
  footer h4 {
    font-size: 1rem;
  }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}


/* Container Safety - Prevent Horizontal Overflow */
.container {
  max-width: 100%;
  overflow-x: hidden;
}

/* Ensure all images are responsive */
img {
  max-width: 100%;
  height: auto;
}

/* Prevent text overflow */
h1, h2, h3, h4, h5, h6, p, a, span {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Mobile menu full width fix */
#mobile-menu {
  width: 100%;
  max-width: 100vw;
}

/* Gallery responsive improvements */
@media (max-width: 640px) {
  .gallery-item {
    margin-bottom: 1rem;
  }
}

/* Service grid responsive improvements */
@media (max-width: 768px) {
  #services-grid {
    gap: 1rem;
  }
}

@media (max-width: 480px) {
  #services-grid {
    gap: 0.75rem;
  }
}

/* Contact section responsive */
@media (max-width: 1024px) {
  .contact-map-wrapper {
    height: 400px !important;
  }
}

@media (max-width: 640px) {
  .contact-map-wrapper {
    height: 300px !important;
  }
}

/* Navbar responsive improvements */
@media (max-width: 350px) {
  .nav-cta {
    padding: 8px 16px;
    font-size: 0.875rem;
  }
  
  #mobile-menu-btn {
    padding: 8px;
  }
}

/* Footer responsive */
@media (max-width: 768px) {
  footer .grid {
    gap: 2rem;
  }
}

@media (max-width: 480px) {
  footer .grid {
    gap: 1.5rem;
  }
  
  footer p, footer a {
    font-size: 0.875rem;
  }
}
