/* ===== CSS Variables ===== */
:root {
  --color-white: #ffffff;
  --color-black: #0a0a0a;
  --color-gray-100: #f5f5f5;
  --color-gray-200: #e5e5e5;
  --color-gray-400: #a3a3a3;
  --color-gray-600: #525252;
  --color-gray-800: #262626;
  --color-beige: #d4c4a8;
  --color-beige-dark: #b5a48a;
  
  --font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --transition: all 0.3s ease;
  --shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 40px rgba(0, 0, 0, 0.15);
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  font-size: 16px;
  line-height: 1.6;
  color: var(--color-gray-800);
  background-color: var(--color-white);
  overflow-x: hidden;
}

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

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}

/* ===== Container ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ===== Header ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background-color: rgba(49, 45, 45, 0.95);
  backdrop-filter: blur(10px);
  transition: var(--transition);
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background-color: var(--color-gray-600);
  border-bottom-color: var(--color-gray-200);
  box-shadow: var(--shadow);
}

.header-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 5px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--color-black);
  display: flex;
  align-items: center;
}

.logo img {
  height: 80px;
  width: auto;
  object-fit: contain;
}

.nav-list {
  display: flex;
  gap: 40px;
}

.nav-link {
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--color-white);
  transition: var(--transition);
  position: relative;
}

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

.nav-link:hover {
  color: var(--color-black);
}

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

/* Hamburger Menu */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 6px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 1001;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--color-black);
  transition: var(--transition);
}

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

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

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

/* ===== Hero Section ===== */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.carousel {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.carousel-slide.active {
  opacity: 1;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.4) 100%);
}

.hero-content {
  position: relative;
  z-index: 10;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 24px 60px;
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: 60px;
  align-items: center;
}

.hero-text {
  color: var(--color-white);
  animation: fadeInUp 1s ease;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 24px;
  letter-spacing: -1px;
}

.hero-subtitle {
  font-size: 1.125rem;
  line-height: 1.7;
  margin-bottom: 32px;
  opacity: 0.9;
  max-width: 500px;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 16px 32px;
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
}

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

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

.btn-submit {
  width: 100%;
  background-color: var(--color-black);
  color: var(--color-white);
}

.btn-submit:hover {
  background-color: var(--color-gray-800);
  transform: translateY(-2px);
}

/* Hero Form Card */
.hero-form-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  padding: 40px;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  animation: fadeInUp 1s ease 0.3s both;
}

.hero-form-card h3 {
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 24px;
  color: var(--color-black);
}

.form-group {
  margin-bottom: 16px;
}

.form-group input,
.form-group textarea {
  width: 100%;
  padding: 14px 16px;
  font-size: 1rem;
  font-family: inherit;
  border: 1px solid var(--color-gray-200);
  border-radius: 4px;
  transition: var(--transition);
  background-color: var(--color-gray-100);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--color-black);
  background-color: var(--color-white);
}

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

/* Carousel Indicators */
.carousel-indicators {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid var(--color-white);
  background: transparent;
  cursor: pointer;
  transition: var(--transition);
}

.indicator.active {
  background: var(--color-white);
}

/* ===== Sections ===== */
.section {
  padding: 100px 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  text-align: center;
  margin-bottom: 16px;
  color: var(--color-black);
}

.section-subtitle {
  font-size: 1.125rem;
  text-align: center;
  color: var(--color-gray-600);
  margin-bottom: 60px;
}

/* ===== Trabajos Section ===== */
.trabajos {
  background-color: var(--color-gray-100);
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 40px;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 12px 24px;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  background: transparent;
  border: 1px solid var(--color-gray-400);
  border-radius: 4px;
  cursor: pointer;
  transition: var(--transition);
  color: var(--color-gray-600);
}

.filter-btn:hover,
.filter-btn.active {
  background-color: var(--color-black);
  border-color: var(--color-black);
  color: var(--color-white);
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.portfolio-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  aspect-ratio: 4/3;
  cursor: pointer;
}

.portfolio-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.portfolio-overlay {
  display: none;
}

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

.portfolio-item.hidden {
  display: none;
}

/* ===== Sobre Nosotros Section ===== */
.nosotros {
  background-color: var(--color-white);
}

.about-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.about-text p {
  font-size: 1.125rem;
  line-height: 1.8;
  color: var(--color-gray-600);
  margin-bottom: 20px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 32px;
}

.stat-item {
  text-align: center;
  padding: 32px;
  background-color: var(--color-gray-100);
  border-radius: 8px;
  transition: var(--transition);
}

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

.stat-number {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: var(--color-black);
  margin-bottom: 8px;
}

.stat-label {
  font-size: 0.875rem;
  color: var(--color-gray-600);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ===== Footer ===== */
.footer {
  background-color: var(--color-black);
  color: var(--color-white);
  padding: 40px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer p {
  font-size: 0.875rem;
  opacity: 0.8;
}

.credit a {
  color: var(--color-beige);
  transition: var(--transition);
}

.credit a:hover {
  color: var(--color-white);
}

/* ===== WhatsApp Button ===== */
.whatsapp-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  z-index: 999;
  width: 60px;
  height: 60px;
  background-color: #25D366;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 16px rgba(37, 211, 102, 0.4);
  transition: var(--transition);
}

.whatsapp-btn svg {
  width: 32px;
  height: 32px;
}

.whatsapp-btn:hover {
  background-color: #1ebe5d;
  transform: scale(1.1);
  box-shadow: 0 6px 24px rgba(37, 211, 102, 0.5);
}

/* ===== Ver más Button ===== */
.ver-mas-container {
  display: flex;
  justify-content: center;
  margin-top: 40px;
}

.ver-mas-btn {
  background-color: var(--color-black);
  color: var(--color-white);
  padding: 16px 48px;
}

.ver-mas-btn:hover {
  background-color: var(--color-gray-800);
  transform: translateY(-2px);
}

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

.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Responsive Design ===== */
@media (max-width: 1024px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .hero-form-card {
    max-width: 500px;
    margin: 0 auto;
  }

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

  .about-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .hamburger {
    display: flex;
  }

  .nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
  }

  .nav.active {
    right: 0;
  }

  .nav-list {
    flex-direction: column;
    align-items: center;
    gap: 32px;
  }

  .nav-link {
    font-size: 1.5rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .hero-form-card {
    padding: 32px 24px;
  }

  .section {
    padding: 80px 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .filter-buttons {
    gap: 8px;
  }

  .filter-btn {
    padding: 10px 16px;
    font-size: 0.75rem;
  }

  .portfolio-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }

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

  .stat-item {
    padding: 24px 16px;
  }

  .stat-number {
    font-size: 2rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }
}

@media (max-width: 480px) {
  .header-container {
    height: 70px;
  }

  .hero-title {
    font-size: 2rem;
  }

  .btn {
    padding: 14px 24px;
    font-size: 0.8rem;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}