/* ===== RESET Y BASE ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f8fafc;
}

/* ===== VARIABLES CSS ===== */
:root {
  /* Colores principales - Sumpetrol */
  --primary-color: #6B2E3A;
  --primary-dark: #4A1E28;
  --primary-light: #8A3E4A;
  
  --secondary-color: #4A4A4A;
  --secondary-dark: #2A2A2A;
  --secondary-light: #6A6A6A;
  
  --accent-color: #8A3E4A;
  --accent-dark: #6B2E3A;
  --accent-light: #A94E5A;
  
  /* Colores neutros */
  --white: #ffffff;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  
  /* Colores semánticos */
  --success: #10b981;
  --warning: #f59e0b;
  --error: #ef4444;
  --info: #3b82f6;
  
  /* Tipografía */
  --font-family-primary: 'Inter', sans-serif;
  --font-family-heading: 'Poppins', sans-serif;
  
  /* Espaciado */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
  --spacing-3xl: 4rem;
  
  /* Bordes */
  --border-radius-sm: 0.375rem;
  --border-radius-md: 0.5rem;
  --border-radius-lg: 0.75rem;
  --border-radius-xl: 1rem;
  
  /* Sombras */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  
  /* Transiciones */
  --transition-fast: 0.15s ease-in-out;
  --transition-normal: 0.3s ease-in-out;
  --transition-slow: 0.5s ease-in-out;
}

/* ===== TIPOGRAFÍA ===== */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-family-heading);
  font-weight: 600;
  line-height: 1.2;
  margin-bottom: var(--spacing-md);
  color: var(--gray-900);
}

h1 {
  font-size: 2.5rem;
  font-weight: 700;
}

h2 {
  font-size: 2rem;
  font-weight: 600;
}

h3 {
  font-size: 1.5rem;
  font-weight: 600;
}

h4 {
  font-size: 1.25rem;
  font-weight: 500;
}

p {
  margin-bottom: var(--spacing-md);
  color: var(--gray-600);
}

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

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

/* ===== LAYOUT ===== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-lg);
}

.section-header {
  text-align: center;
  margin-bottom: var(--spacing-3xl);
}

.section-header h2 {
  color: var(--gray-900);
  margin-bottom: var(--spacing-md);
}

.section-header p {
  font-size: 1.125rem;
  color: var(--gray-600);
  max-width: 600px;
  margin: 0 auto;
}

/* ===== HEADER ===== */
.header {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
  color: var(--white);
  padding: var(--spacing-3xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.header-content {
  position: relative;
  z-index: 1;
}

.logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-lg);
}

.logo i {
  color: var(--accent-color);
}

.logo h1 {
  color: var(--white);
  margin: 0;
  font-size: 3rem;
}

.header-subtitle {
  font-size: 1.25rem;
  color: var(--gray-100);
  margin-bottom: var(--spacing-2xl);
  font-weight: 300;
}

.header-actions {
  display: flex;
  gap: var(--spacing-md);
  justify-content: center;
  flex-wrap: wrap;
}

/* ===== NAVEGACIÓN ===== */
.navbar {
  background: var(--white);
  box-shadow: var(--shadow-sm);
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: all var(--transition-normal);
}

.nav-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--spacing-md) 0;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  font-weight: 600;
  font-size: 1.25rem;
  color: var(--primary-color);
}

.nav-logo i {
  font-size: 1.5rem;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: var(--spacing-xl);
  margin: 0;
  padding: 0;
}

.nav-menu a {
  color: var(--gray-700);
  font-weight: 500;
  padding: var(--spacing-sm) var(--spacing-md);
  border-radius: var(--border-radius-md);
  transition: all var(--transition-fast);
}

.nav-menu a:hover {
  color: var(--primary-color);
  background-color: var(--gray-50);
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  padding: var(--spacing-sm);
}

.nav-toggle span {
  width: 25px;
  height: 3px;
  background-color: var(--gray-700);
  border-radius: 2px;
  transition: all var(--transition-fast);
}

/* ===== HERO SECTION ===== */
.hero {
  padding: var(--spacing-3xl) 0;
  background: var(--white);
}

.hero-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--spacing-3xl);
  align-items: center;
}

.hero-text h2 {
  font-size: 2.5rem;
  color: var(--gray-900);
  margin-bottom: var(--spacing-lg);
}

.hero-text p {
  font-size: 1.125rem;
  color: var(--gray-600);
  margin-bottom: var(--spacing-xl);
}

.hero-features {
  display: flex;
  flex-direction: column;
  gap: var(--spacing-md);
  margin-bottom: var(--spacing-2xl);
}

.feature {
  display: flex;
  align-items: center;
  gap: var(--spacing-md);
}

.feature i {
  color: var(--secondary-color);
  font-size: 1.25rem;
  width: 24px;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.construction-preview {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--spacing-md);
  max-width: 400px;
}

.preview-item {
  text-align: center;
  padding: var(--spacing-lg);
  border-radius: var(--border-radius-lg);
  background: var(--gray-50);
  border: 2px solid transparent;
  transition: all var(--transition-normal);
  cursor: pointer;
}

.preview-item:hover,
.preview-item.active {
  border-color: var(--primary-color);
  background: var(--white);
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}

.preview-item i {
  font-size: 2rem;
  color: var(--primary-color);
  margin-bottom: var(--spacing-md);
}

.preview-item h3 {
  font-size: 1rem;
  margin-bottom: var(--spacing-sm);
}

.preview-item p {
  font-size: 0.875rem;
  color: var(--gray-600);
  margin: 0;
}

/* ===== BOTONES ===== */
.cta-btn, .btn {
  display: inline-flex;
  align-items: center;
  gap: var(--spacing-sm);
  padding: var(--spacing-md) var(--spacing-xl);
  border-radius: var(--border-radius-md);
  font-weight: 500;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all var(--transition-fast);
  font-size: 1rem;
  line-height: 1;
}

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

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

.cta-btn.secondary, .btn.secondary {
  background-color: var(--secondary-color);
  color: var(--white);
}

.cta-btn.secondary:hover, .btn.secondary:hover {
  background-color: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
}

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

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

.cta-btn.large {
  padding: var(--spacing-lg) var(--spacing-2xl);
  font-size: 1.125rem;
}

/* ===== TIPOS DE CONSTRUCCIÓN ===== */
.construction-types {
  padding: var(--spacing-3xl) 0;
  background: var(--gray-50);
}

.types-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--spacing-xl);
}

.type-card {
  background: var(--white);
  border-radius: var(--border-radius-xl);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow-md);
  transition: all var(--transition-normal);
  border: 1px solid var(--gray-200);
}

.type-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--primary-color);
}

.type-icon {
  width: 80px;
  height: 80px;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--spacing-lg);
}

.type-icon i {
  font-size: 2rem;
  color: var(--white);
}

.type-card h3 {
  color: var(--gray-900);
  margin-bottom: var(--spacing-md);
}

.type-card p {
  color: var(--gray-600);
  margin-bottom: var(--spacing-lg);
}

.type-features {
  list-style: none;
  margin-bottom: var(--spacing-xl);
}

.type-features li {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
  color: var(--gray-700);
}

.type-features i {
  color: var(--success);
  font-size: 0.875rem;
}

.type-price {
  text-align: center;
  padding: var(--spacing-lg);
  background: var(--gray-50);
  border-radius: var(--border-radius-lg);
}

.price-label {
  display: block;
  font-size: 0.875rem;
  color: var(--gray-600);
  margin-bottom: var(--spacing-xs);
}

.price-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary-color);
}

.price-unit {
  font-size: 0.875rem;
  color: var(--gray-500);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-content {
    grid-template-columns: 1fr;
    gap: var(--spacing-xl);
  }
  
  .construction-preview {
    grid-template-columns: 1fr;
    max-width: 300px;
  }
  
  .types-grid {
    grid-template-columns: 1fr;
  }
  
  .nav-menu {
    display: none;
  }
  
  .nav-toggle {
    display: flex;
  }
  
  .header-actions {
    flex-direction: column;
    align-items: center;
  }
  
  .logo h1 {
    font-size: 2rem;
  }
  
  h1 {
    font-size: 2rem;
  }
  
  h2 {
    font-size: 1.75rem;
  }
}

/* ===== BOTÓN SUMPETROL ===== */
.cta-btn.sumpetrol {
  background: rgba(255, 255, 255, 0.2);
  border: 2px solid rgba(255, 255, 255, 0.6);
  color: #ffffff;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.cta-btn.sumpetrol:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.8);
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* ===== BOTONES DEL MODAL DE VISTA PREVIA ===== */
.modal-preview .btn.preview {
  background: var(--primary-color) !important;
  color: white !important;
  border: 2px solid var(--primary-color) !important;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-preview .btn.preview:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.modal-preview .btn.calculate {
  background: var(--primary-color) !important;
  color: white !important;
  border: 2px solid var(--primary-color) !important;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.modal-preview .btn.calculate:hover {
  background: var(--primary-dark) !important;
  border-color: var(--primary-dark) !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.modal-preview .btn.reset {
  background: white !important;
  color: var(--primary-color) !important;
  border: 2px solid var(--primary-color) !important;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.modal-preview .btn.reset:hover {
  background: var(--primary-color) !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* ===== MODAL DE VISTA PREVIA ===== */
.modal-preview {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(10px);
  border: 2px solid var(--primary-color);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-preview .modal-header {
  background: var(--primary-color);
  color: white;
  border-bottom: 2px solid var(--primary-dark);
}

.modal-preview .modal-body {
  background: white;
  border-radius: 0 0 12px 12px;
}

.modal-preview .btn-close {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.3s ease;
}

.modal-preview .btn-close:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}

/* ===== MODAL DE MATERIALES ===== */
.materials-modal {
  background: rgba(255, 255, 255, 0.98) !important;
  backdrop-filter: blur(15px);
  border: 2px solid var(--primary-color);
  box-shadow: 0 25px 80px rgba(0, 0, 0, 0.4);
}

.materials-modal .modal-header {
  background: var(--primary-color);
  color: white;
  border-bottom: 2px solid var(--primary-dark);
}

.materials-modal .modal-body {
  background: white;
  border-radius: 0 0 12px 12px;
}

.materials-modal .btn-close {
  background: white;
  color: var(--primary-color);
  border: 2px solid var(--primary-color);
  border-radius: 50%;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  transition: all 0.3s ease;
}

.materials-modal .btn-close:hover {
  background: var(--primary-color);
  color: white;
  transform: scale(1.1);
}
