/* ==========================================================================
   Modistería & Confecciones - Estilos Vanilla CSS (Sin Bootstrap)
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Plus+Jakarta+Sans:wght@300;400;500;600;700&display=swap');

:root {
  /* Paleta de Colores Elegante / Artesanal */
  --bg-main: #FFFBF7;
  --bg-card: #FFFFFF;
  --bg-alt: #F7EFF5;
  --text-dark: #2B2328;
  --text-muted: #6B5E68;
  --primary: #8B1A2B;       /* Burdeos / Vino */
  --primary-hover: #6E1220;
  --accent: #C5973B;        /* Dorado fino */
  --accent-light: #F7EEDD;
  --border-color: #E8DFD5;
  
  /* Sombras y Elevaciones */
  --shadow-sm: 0 2px 8px rgba(43, 35, 40, 0.05);
  --shadow-md: 0 8px 24px rgba(43, 35, 40, 0.08);
  --shadow-lg: 0 16px 36px rgba(43, 35, 40, 0.12);
  
  /* Fuentes */
  --font-heading: 'Playfair Display', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

  /* Bordes */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-pill: 50px;

  /* Transiciones */
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}

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

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

.container {
  width: 100%;
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Header & Barra Superior */
.top-bar {
  background-color: var(--primary);
  color: #FFFFFF;
  padding: 0.5rem 0;
  font-size: 0.875rem;
}

.top-bar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.top-bar-info {
  display: flex;
  gap: 1.5rem;
}

.top-bar-info span {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

/* Main Header & Navegación Pestañas */
.main-header {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}

.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo svg {
  width: 36px;
  height: 36px;
  color: var(--primary);
}

.brand-title {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.1;
}

.brand-subtitle {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--accent);
  display: block;
  font-family: var(--font-body);
}

/* Pestañas (Tabs Navigation) */
.nav-tabs {
  display: flex;
  list-style: none;
  gap: 0.5rem;
  background-color: var(--bg-main);
  padding: 0.35rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
}

.nav-tab-item {
  position: relative;
}

.nav-tab-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  transition: var(--transition);
}

.nav-tab-link:hover {
  color: var(--primary);
  background-color: rgba(139, 26, 43, 0.05);
}

.nav-tab-link.active {
  color: #FFFFFF;
  background-color: var(--primary);
  box-shadow: 0 4px 12px rgba(139, 26, 43, 0.25);
}

.mobile-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-dark);
  cursor: pointer;
  padding: 0.5rem;
}

/* Área de Contenido Dinámico de Pestañas */
.main-content {
  flex: 1;
  padding-bottom: 3rem;
}

.tab-pane {
  animation: fadeIn 0.4s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Hero Section */
.hero-section {
  padding: 4rem 0;
  background: linear-gradient(135deg, #FFFBF7 0%, #F7EFF5 100%);
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--border-color);
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background-color: var(--accent-light);
  color: #8A6419;
  padding: 0.4rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(197, 151, 59, 0.3);
}

.hero-title {
  font-family: var(--font-heading);
  font-size: 3rem;
  line-height: 1.15;
  color: var(--text-dark);
  margin-bottom: 1.25rem;
}

.hero-title span {
  color: var(--primary);
  font-style: italic;
}

.hero-description {
  font-size: 1.1rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* Botones Personalizados */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.8rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: var(--radius-pill);
  cursor: pointer;
  border: 2px solid transparent;
  transition: var(--transition);
}

.btn-primary {
  background-color: var(--primary);
  color: #FFFFFF;
  box-shadow: 0 4px 14px rgba(139, 26, 43, 0.3);
}

.btn-primary:hover {
  background-color: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(139, 26, 43, 0.4);
}

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

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

.btn-outline.active {
  background-color: var(--primary);
  color: #FFFFFF;
}

/* Tarjeta Hero Visual */
.hero-visual {
  position: relative;
}

.hero-card-main {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-color);
  position: relative;
  z-index: 2;
}

.hero-icon-box {
  width: 64px;
  height: 64px;
  background-color: var(--accent-light);
  color: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
}

.hero-icon-box svg {
  width: 36px;
  height: 36px;
}

/* Secciones Comunes */
.section {
  padding: 4rem 0;
}

.section-title-wrap {
  text-align: center;
  max-width: 650px;
  margin: 0 auto 3rem auto;
}

.section-tag {
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
  display: block;
}

.section-title {
  font-family: var(--font-heading);
  font-size: 2.25rem;
  color: var(--text-dark);
}

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

.service-card {
  background: var(--bg-card);
  border-radius: var(--radius-md);
  padding: 2rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}

.service-badge {
  align-self: flex-start;
  background: var(--bg-alt);
  color: var(--primary);
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-pill);
  margin-bottom: 1rem;
}

.service-title {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
  color: var(--text-dark);
}

.service-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  flex: 1;
}

.service-price {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--primary);
  border-top: 1px dashed var(--border-color);
  padding-top: 1rem;
}

/* Portafolio & Galería Lightbox */
.portfolio-card {
  cursor: pointer;
}

.portfolio-img-container {
  height: 230px;
  overflow: hidden;
  background: #F0EBE5;
  position: relative;
  cursor: pointer;
}

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

.portfolio-card:hover .portfolio-img-container img {
  transform: scale(1.08);
}

.portfolio-overlay {
  position: absolute;
  inset: 0;
  background: rgba(139, 26, 43, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
  color: #FFFFFF;
  font-weight: 600;
  font-size: 0.9rem;
}

.portfolio-card:hover .portfolio-overlay {
  opacity: 1;
}

/* Modal Lightbox */
.lightbox-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  inset: 0;
  background-color: rgba(20, 15, 18, 0.88);
  backdrop-filter: blur(5px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  animation: fadeIn 0.3s ease;
}

.lightbox-modal.active {
  display: flex;
}

.lightbox-content {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  max-width: 800px;
  width: 100%;
  max-height: 90vh;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  position: relative;
  display: flex;
  flex-direction: column;
  animation: zoomIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes zoomIn {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.lightbox-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  color: var(--primary);
}

.lightbox-close {
  background: var(--bg-alt);
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 1.25rem;
  color: var(--text-dark);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close:hover {
  background-color: var(--primary);
  color: #FFFFFF;
}

.lightbox-body {
  padding: 0;
  overflow-y: auto;
  max-height: 60vh;
  background: #111;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-body img {
  max-height: 60vh;
  width: auto;
  object-fit: contain;
}

.lightbox-footer {
  padding: 1.25rem 1.5rem;
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
}

.lightbox-desc {
  color: var(--text-muted);
  font-size: 0.95rem;
}

/* Formulario de Contacto */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-info-card {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
}

.info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}

.info-icon {
  width: 44px;
  height: 44px;
  background-color: rgba(139, 26, 43, 0.08);
  color: var(--primary);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-form {
  background: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: 2.5rem;
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-md);
}

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

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 0.4rem;
  color: var(--text-dark);
}

.form-control {
  width: 100%;
  padding: 0.8rem 1rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  background-color: var(--bg-main);
  transition: var(--transition);
}

.form-control:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(139, 26, 43, 0.1);
  background-color: #FFFFFF;
}

textarea.form-control {
  resize: vertical;
  min-height: 120px;
}

/* Alertas de Respuesta */
.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}

.alert-success {
  background-color: #E6F4EA;
  color: #137333;
  border: 1px solid #CEEAD6;
}

.alert-error {
  background-color: #FCE8E6;
  color: #C5221F;
  border: 1px solid #FAD2CF;
}

/* Footer */
.main-footer {
  background-color: #1F181C;
  color: #E0D6DD;
  padding: 4rem 0 2rem 0;
  margin-top: auto;
  border-top: 3px solid var(--accent);
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1.5fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.footer-brand .brand-title {
  color: #FFFFFF;
}

.footer-desc {
  color: #A396A0;
  font-size: 0.9rem;
  margin-top: 1rem;
}

.footer-heading {
  color: #FFFFFF;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 0.6rem;
}

.footer-links a {
  color: #A396A0;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1.5rem;
  text-align: center;
  font-size: 0.85rem;
  color: #857782;
}

/* Responsive Media Queries */
@media (max-width: 868px) {
  .hero-grid, .contact-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 680px) {
  .top-bar {
    display: none;
  }

  .mobile-toggle {
    display: block;
  }

  .nav-tabs {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    background: var(--bg-card);
    border-radius: 0;
    border: none;
    border-bottom: 1px solid var(--border-color);
    padding: 1rem;
    box-shadow: var(--shadow-md);
  }

  .nav-tabs.open {
    display: flex;
  }

  .nav-tab-link {
    border-radius: var(--radius-sm);
    justify-content: flex-start;
  }

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

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