:root {
  /* Colors - Modern Brown Palette */
  --color-primary: #5D4037; /* Deep rich brown */
  --color-primary-light: #8D6E63; /* Light warm brown */
  --color-secondary: #4E342E;
  --color-accent: #D7CCC8;
  --color-bg: #FAF8F5;
  --color-surface: #FFFFFF;
  --color-text: #3E2723;
  --color-text-muted: #6D4C41;
  --color-border: #EFEBE9;
  
  /* Gradients */
  --gradient-primary: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
  --gradient-bg: linear-gradient(180deg, #F5EFEB 0%, var(--color-bg) 100%);

  /* Border Radius */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;
  --radius-pill: 9999px;

  /* Shadows */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 10px 20px -3px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 20px 40px -5px rgba(93, 64, 55, 0.15);
  --shadow-hover: 0 25px 50px -12px rgba(93, 64, 55, 0.25);

  /* Transitions */
  --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Outfit', sans-serif;
}

body {
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--color-text);
  line-height: 1.2;
}

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

h2 {
  font-size: clamp(2rem, 3vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 1rem;
}

h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

p {
  color: var(--color-text-muted);
  font-size: 1.125rem;
}

/* Base styles / Layout Components */
.section-title {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 4rem auto;
}

/* Buttons */
.btn-primary, .btn-secondary {
  display: inline-block;
  padding: 0.875rem 2rem;
  border-radius: var(--radius-pill);
  font-weight: 600;
  text-decoration: none !important;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: none;
  font-size: 1rem;
}

.btn-primary {
  background: var(--gradient-primary);
  color: white;
  box-shadow: 0 4px 14px 0 rgba(141, 110, 99, 0.39);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(141, 110, 99, 0.4);
}

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

.btn-secondary:hover {
  background: rgba(141, 110, 99, 0.1);
  transform: translateY(-2px);
}

/* Navbar */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  z-index: 1000;
  transition: all var(--transition-normal);
  background: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.navbar.scrolled {
  background: rgba(93, 64, 55, 0.98);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  padding: 1rem 5%;
  box-shadow: var(--shadow-md);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.5rem;
  font-weight: 700;
  color: #D3D3D3;
}

.logo-img {
  height: 44px;
  width: auto;
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #D3D3D3;
  font-weight: 500;
  transition: all var(--transition-fast);
}

.nav-links a.btn-primary {
  background: transparent;
  border: 2px solid #D3D3D3;
  color: #D3D3D3 !important;
  box-shadow: none;
}

.nav-links a.btn-primary:hover {
  background: rgba(211, 211, 211, 0.1);
}

.nav-links a:hover:not(.btn-primary) {
  color: white;
}

.hamburger {
  display: none;
  cursor: pointer;
}

.hamburger .bar {
  display: block;
  width: 25px;
  height: 3px;
  margin: 5px auto;
  -webkit-transition: all 0.3s ease-in-out;
  transition: all 0.3s ease-in-out;
  background-color: #D3D3D3;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  padding: 8rem 5% 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--gradient-bg);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -5%;
  width: 50vw;
  height: 50vw;
  background: radial-gradient(circle, rgba(141, 110, 99, 0.15) 0%, rgba(255,255,255,0) 70%);
  border-radius: 50%;
  z-index: 0;
}

.hero-content {
  flex: 1;
  max-width: 600px;
  z-index: 1;
}

.hero p {
  margin: 1.5rem 0 2.5rem;
  font-size: 1.25rem;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
}

.hero-image-wrapper {
  flex: 1;
  position: relative;
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 1;
}

.hero-image {
  width: 90%;
  height: 90%;
  background: linear-gradient(135deg, #efebe9 0%, #d7ccc8 100%);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
  /* Add an image style later using background-image */
  background-image: url('gabinete_1.jpg');
  background-size: cover;
  background-position: center;
  border: 10px solid white;
}

.floating-badge {
  position: absolute;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  padding: 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 1rem;
  font-weight: 600;
  color: var(--color-primary);
  animation: float 6s ease-in-out infinite;
  border: 1px solid rgba(255,255,255,1);
}

.badge-1 {
  top: 15%;
  left: -5%;
  animation-delay: 0s;
}

.badge-2 {
  bottom: 20%;
  right: -5%;
  animation-delay: 2s;
}

.badge-icon {
  font-size: 1.5rem;
  background: var(--color-bg);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

/* Services Section */
.services {
  padding: 8rem 5%;
  background: var(--color-surface);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--color-surface);
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--color-border);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden;
}

.card::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--transition-normal);
}

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

.card:hover::after {
  transform: scaleX(1);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1.5rem;
  background: #F5EFEB;
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

/* About Section */
.about {
  padding: 8rem 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.about-content {
  flex: 1;
}

.features {
  list-style: none;
  margin-top: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.features li {
  font-size: 1.125rem;
  font-weight: 500;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.about-image-wrapper {
  flex: 1;
  height: 500px;
}

.about-image {
  width: 100%;
  height: 100%;
  background-image: url('gabinete_2.jpg');
  background-size: cover;
  background-position: center;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
}

/* Contact Section */
.contact {
  padding: 8rem 5%;
  background: var(--color-bg);
}

.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.contact-card, .contact-form-card {
  background: var(--color-surface);
  padding: 4rem;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  width: 100%;
  text-align: center;
}

.contact-form-card {
  display: flex;
  flex-direction: column;
}

.contact-form-card p {
  margin-bottom: 3rem;
}

/* Form Styles */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  text-align: left;
  flex: 1;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-group label {
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.95rem;
}

.form-group input, .form-group textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-family: inherit;
  font-size: 1rem;
  background: var(--color-bg);
  transition: all var(--transition-fast);
}

.form-group input:focus, .form-group textarea:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(93, 64, 55, 0.1);
  background: var(--color-surface);
}

.contact-info {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 3rem;
  text-align: left;
}

.info-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.5rem;
  background: var(--color-bg);
  padding: 2rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  height: 100%;
  transition: all var(--transition-fast);
}

.info-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-sm);
}

.info-item .icon {
  font-size: 1.5rem;
  background: var(--color-surface);
  flex-shrink: 0;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  color: var(--color-primary);
  box-shadow: var(--shadow-sm);
}

.info-item h4 {
  margin-bottom: 0.5rem;
  font-size: 1.1rem;
}

.info-item p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* Footer */
footer {
  background: var(--color-primary);
  color: white;
  padding: 2rem 5%;
  text-align: center;
}

.footer-bottom {
  opacity: 0.8;
  font-size: 0.9rem;
}

.footer-bottom p {
  color: rgba(255,255,255,0.8);
}

/* Animations */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

.fade-up {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeUpAnim 0.8s ease-out forwards;
}

.fade-in {
  opacity: 0;
  animation: fadeInAnim 1s ease-out forwards;
}

.stagger-1 { animation-delay: 0.2s; }
.stagger-2 { animation-delay: 0.4s; }
.stagger-3 { animation-delay: 0.6s; }

@keyframes fadeUpAnim {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInAnim {
  to {
    opacity: 1;
  }
}

/* Scroll reveal classes added by JS */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.card-grid .card.reveal-interval {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s ease-out;
}
.card-grid .card.reveal-interval.active {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
  .hero {
    flex-direction: column;
    text-align: center;
    padding-top: 8rem;
  }
  
  .hero-buttons {
    justify-content: center;
  }
  
  .hero-image-wrapper {
    margin-top: 4rem;
    width: 100%;
    height: 400px;
  }
  
  .badge-1 { left: 0; }
  .badge-2 { right: 0; }
  
  .about {
    flex-direction: column;
  }
  
  .about-image-wrapper {
    width: 100%;
    margin-top: 2rem;
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: block;
    z-index: 1001;
  }

  .hamburger.active .bar:nth-child(2) {
    opacity: 0;
  }
  .hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }
  .hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    left: -100%;
    top: 0;
    gap: 0;
    flex-direction: column;
    background-color: rgba(93, 64, 55, 0.98);
    backdrop-filter: blur(10px);
    width: 100%;
    height: 100vh;
    text-align: center;
    transition: 0.3s;
    justify-content: center;
  }

  .nav-links.active {
    left: 0;
  }

  .nav-links li {
    margin: 1.5rem 0;
  }
  
  .contact-card, .contact-form-card {
    padding: 2rem;
  }
  
  .contact-info {
    grid-template-columns: 1fr;
  }
  
  .card-grid {
    grid-template-columns: 1fr;
  }
}
