@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;700;800&display=swap');

:root {
  --color-primary: #21087e;
  --color-primary-light: #3a229a;
  --color-secondary: #00008f;
  --color-accent: #ffca00;
  --color-accent-hover: #e5b600;
  --color-danger: #f34f36;
  --color-danger-light: #e05a49;
  --color-background: #ffffff;
  --color-surface: #f9f9fb;
  --color-form: #fffbec;
  --color-text-main: #333333;
  --color-text-muted: #666666;
  --color-white: #ffffff;
  
  --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 8px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 20px rgba(0,0,0,0.15);
  
  --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  --border-radius: 8px;
  --container-max-width: 1200px;
}

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

html {
  scroll-behavior: smooth;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  color: var(--color-text-main);
  background-color: var(--color-background);
  scroll-padding-top: 92px; /* Estabilizacion por header sticky */
}

body {
  line-height: 1.6;
  overflow-x: hidden;
}

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

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

/* Layout Utilities */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.text-center { text-align: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 2rem;
  font-weight: 700;
  border-radius: var(--border-radius);
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-size: 1.1rem;
}

.btn-primary {
  background-color: var(--color-accent);
  color: #111;
  box-shadow: var(--shadow-md);
}

.btn-primary:hover {
  background-color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

/* Header & Nav */
.site-header {
  background-color: var(--color-white);
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
  min-height: 92px; /* Prevencion de Layout Shift (CLS) */
  will-change: transform;
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 60px; /* Estabilidad estructural */
}

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

.header-actions {
  display: flex;
  gap: 1.5rem;
}

.contact-action {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 1rem;
  border-radius: var(--border-radius);
  background: var(--color-surface);
}

.contact-action:hover {
  background: #f0f0f4;
}

.contact-action i {
  font-size: 1.5rem;
  color: var(--color-primary);
}

.contact-action.whatsapp i {
  color: #25D366;
}

.contact-details span {
  display: block;
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.contact-details strong {
  font-size: 1.1rem;
  color: var(--color-text-main);
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, var(--color-primary) 0%, var(--color-secondary) 100%);
  color: var(--color-white);
  padding: 6rem 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 60%);
  z-index: 0;
}

.hero .container {
  position: relative;
  z-index: 1;
}

.hero-subtitle {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-accent);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.hero-title {
  font-size: clamp(2.5rem, 5vw, 4rem);
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 2rem;
}

.hero-features {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 3rem;
  flex-wrap: wrap;
}

.hero-feature {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Gallery & Contact Section */
.demo-section {
  background-color: var(--color-accent);
  padding: 4rem 0;
}

.demo-title {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 2rem;
  color: #111;
}

.demo-title span {
  color: var(--color-danger);
}

.split-layout {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 3rem;
  align-items: start;
}

.gallery-container {
  background: var(--color-white);
  border-radius: var(--border-radius);
  padding: 1rem;
  box-shadow: var(--shadow-md);
}

/* Custom Simple Slider */
.slider-main {
  width: 100%;
  aspect-ratio: 16/9;
  background: #eee;
  border-radius: var(--border-radius);
  overflow: hidden;
  position: relative;
}

.slider-main img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  opacity: 0;
  transition: opacity 0.5s ease-in-out;
}

.slider-main img.active {
  opacity: 1;
}

.slider-nav {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  overflow-x: auto;
  padding-bottom: 0.5rem;
}

.slider-nav img {
  width: 80px;
  height: 80px;
  object-fit: cover;
  border-radius: 4px;
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
  opacity: 0.6;
}

.slider-nav img.active,
.slider-nav img:hover {
  opacity: 1;
  border-color: var(--color-primary);
}

.slider-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
    z-index: 10;
}

.slider-controls button {
    background: rgba(255,255,255,0.7);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--color-primary);
    transition: var(--transition);
}

.slider-controls button:hover {
    background: white;
}

/* Form Styles */
.contact-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.payment-methods {
  padding: 1rem;
  background: var(--color-surface);
  border-bottom: 1px solid #eee;
}

.payment-methods img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.form-wrapper {
  padding: 2rem;
  background-color: var(--color-form);
}

.form-title {
  color: var(--color-primary);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1.5rem;
  text-align: center;
}

.form-group {
  margin-bottom: 1.25rem;
}

.form-group label {
  display: block;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: var(--color-text-main);
}

.form-control {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid #ddd;
  border-radius: var(--border-radius);
  font-family: inherit;
  font-size: 1rem;
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(33, 8, 126, 0.1);
}

/* Services */
.services-section {
  background-color: var(--color-surface);
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-header h2 {
  font-size: 2.5rem;
  color: var(--color-danger-light);
  line-height: 1.2;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.service-card {
  background: var(--color-white);
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: var(--transition);
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.service-img-wrapper {
  height: 220px;
  overflow: hidden;
}

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

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

.service-content {
  padding: 1.5rem;
  text-align: center;
}

.service-content h3 {
  color: var(--color-danger-light);
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.divider {
  height: 2px;
  width: 60px;
  background: var(--color-accent);
  margin: 3rem auto;
}

/* Footer Section */
.site-footer {
  background: var(--color-danger);
  color: var(--color-white);
  padding: 4rem 0 0 0;
}

.footer-content {
  text-align: center;
  margin-bottom: 3rem;
}

.footer-content h2 {
  font-size: 2rem;
  margin-bottom: 1.5rem;
}

.footer-image {
  max-width: 800px;
  margin: 0 auto 2rem;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-lg);
}

.footer-contact-grid {
  display: grid;
  grid-template-columns: 1fr;
  max-width: 600px;
  margin: 0 auto;
}

.copyright {
  background-color: #2b2b2b;
  padding: 1.5rem 0;
  text-align: center;
  font-size: 0.9rem;
  color: #ccc;
}

/* Floating Actions */
.floating-actions {
  position: fixed;
  bottom: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 15px;
  z-index: 1000;
}

.btn-float {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 30px;
  box-shadow: var(--shadow-lg);
  animation: pulse 2s infinite;
  transition: var(--transition);
}

.btn-float:hover {
  transform: scale(1.1);
  animation: none;
}

.btn-whatsapp { background: #25d366; }
.btn-phone { background: var(--color-primary); animation-delay: 1s; }

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); }
  100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); }
}

.btn-phone {
  animation-name: pulse-blue;
}

@keyframes pulse-blue {
  0% { box-shadow: 0 0 0 0 rgba(33, 8, 126, 0.7); }
  70% { box-shadow: 0 0 0 15px rgba(33, 8, 126, 0); }
  100% { box-shadow: 0 0 0 0 rgba(33, 8, 126, 0); }
}

/* Responsive */
@media (max-width: 991px) {
  .split-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .header-actions {
    display: none;
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-features {
    flex-direction: column;
    gap: 1rem;
    align-items: center;
  }
  
  .section {
    padding: 3rem 0;
  }
  
  .demo-title {
    text-align: center;
  }
}
