/* CSS Variables for Premium Design */
:root {
  --navy-dark: #071224;
  --navy-brand: #13366B;
  --navy-accent: #2563EB;
  --navy-bg: #323232;

  --pastel-blue-bg: #EBF4FA;
  --pastel-blue-light: #F4F8FC;
  --pastel-blue-accent: #B9D6F2;
  --gray-almost-white: #F3F4F6;

  --text-main: #1E293B;
  --text-muted: #64748B;
  --text-white: #FFFFFF;
  --text-white-muted: #94A3B8;

  --bg-main: #F1F5F9;
  --border-color: #E2E8F0;
  --border-navy: rgba(255, 255, 255, 0.1);

  --transition-fast: 0.2s ease;
  --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.12);
  --shadow-page: 0 15px 35px rgba(13, 36, 62, 0.12);

  --font-sans: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

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

html,
body {
  font-family: var(--font-sans);
  background-color: var(--bg-main);
  color: var(--text-main);
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: auto;
}



/* -------------------- HTML PAGE/SLIDE CONTAINER -------------------- */
.slide-container {
  width: 95vw;
  max-width: 1200px;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  box-shadow: var(--shadow-page);
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 44px 56px;
  transition: transform var(--transition-normal);
}

.slide-header,
.slide-body,
.slide-footer {
  position: relative;
  z-index: 2;
}

/* Background Color Themes */
.bg-navy .slide-container {
  background-color: var(--navy-bg);
  color: var(--text-white);
}

.bg-contact-custom .slide-container {
  background: linear-gradient(rgba(7, 18, 36, 0.88), rgba(7, 18, 36, 0.88)), url('../extracted_assets/images/page_10_img_1.jpeg') no-repeat center center;
  background-size: cover;
  color: var(--text-white);
}

.bg-pastel .slide-container {
  background-color: #ffffff;
  color: #323232;
}

.bg-pastel .slide-container::before {
  content: "";
  position: absolute;
  top: 25px;
  right: 16px;
  width: 160px;
  height: 95px;
  background: url('logo-nuevo-v2.png') no-repeat right center;
  background-size: contain;
  z-index: 10;
  pointer-events: none;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

.bg-pastel .slide-container::after {
  content: "";
  position: absolute;
  top: 10%;
  left: -80px;
  width: 50%;
  height: 80%;
  background: url('icono-a-de-ataire.png') no-repeat left center;
  background-size: contain;
  opacity: 0.07;
  z-index: 1;
  pointer-events: none;
  -webkit-print-color-adjust: exact;
  print-color-adjust: exact;
}

/* Standard Header for Slides */
.slide-header {
  margin-bottom: 40px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.slide-header h2 {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.5px;
  line-height: 1.2;
}

.bg-navy .slide-header h2,
.bg-contact-custom .slide-header h2 {
  color: var(--text-white);
}

.bg-pastel .slide-header h2 {
  color: #323232;
}

.slide-header h4 {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text-muted);
}

.bg-navy .slide-header h4,
.bg-contact-custom .slide-header h4 {
  color: var(--pastel-blue-accent);
}

/* Standard Footer for Slides */
.slide-footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  font-size: 10px;
  margin-top: 20px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 12px;
}

.bg-navy .slide-footer,
.bg-contact-custom .slide-footer {
  border-top-color: rgba(255, 255, 255, 0.08);
}

.slide-footer .footer-left {
  font-weight: 500;
  color: var(--text-muted);
  max-width: 70%;
  line-height: 1.4;
}

.bg-navy .slide-footer .footer-left,
.bg-contact-custom .slide-footer .footer-left {
  color: var(--text-white-muted);
}

.slide-footer .footer-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.slide-footer .footer-company {
  font-size: 9px;
  font-weight: 400;
  color: var(--text-muted);
}

.bg-navy .slide-footer .footer-company,
.bg-contact-custom .slide-footer .footer-company {
  color: var(--text-white-muted);
}

/* -------------------- ARQUETIPOS DE LOGICAS DE PAGINA (Body Styles) -------------------- */
.slide-body {
  flex: 1;
  display: flex;
  overflow: hidden;
  align-items: center;
}

/* --- 1. Portada (Cover) --- */
.layout-cover-body {
  display: flex;
  gap: 40px;
}

.cover-left {
  flex: 3;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 40%;
}

.cover-company {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 2px;
  color: var(--gray-almost-white);
  margin-bottom: 16px;
  text-transform: uppercase;
}

.cover-title {
  font-size: 40px;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 8px;
  letter-spacing: -1px;
}

.cover-subtitle {
  font-size: 24px;
  font-weight: 400;
  color: var(--gray-almost-white);
  margin-bottom: 32px;
}

.cover-tagline {
  font-size: 14px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--text-white-muted);
}

.cover-right {
  flex: 7;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cover-right img {
  width: 280%;
  height: 100%;
  object-fit: cover;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.05) 5%, rgba(0, 0, 0, 0.7) 40%, #000000 100%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0, 0, 0, 0.05) 5%, rgba(0, 0, 0, 0.7) 40%, #000000 100%);
}

/* --- 2. Text-Image Split --- */
.layout-text-image-split-body {
  display: flex;
  gap: 40px;
}

.split-left {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.split-text {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-main);
  text-align: justify;
}

.split-highlight {
  font-size: 15px;
  font-weight: 600;
  color: var(--navy-brand);
  border-left: 3px solid var(--navy-brand);
  padding-left: 12px;
  font-style: italic;
}

.split-right {
  flex: 0.9;
  display: grid;
  grid-template-rows: repeat(2, 1fr);
  gap: 16px;
  height: 100%;
}

.split-right-img-container {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 100%;
}

.split-right-img-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- 3. Grid-4 layout --- */
.layout-grid-4-body {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding: 20px 0;
}

.grid-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 6px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  background-color: #ffffff;
  border: 1px solid var(--border-color);
}

.grid-card-img {
  flex: 1;
  overflow: hidden;
}

.grid-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.grid-card-label {
  padding: 12px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
  color: var(--navy-brand);
  background-color: #ffffff;
}

/* --- 4. Map & Times Layout --- */
.layout-map-times-body {
  display: flex;
  gap: 32px;
}

.map-times-list-container {
  flex: 1.1;
  height: 100%;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.map-times-table {
  width: 100%;
  border-collapse: collapse;
}

.map-times-table th {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid var(--border-color);
  padding: 6px 8px;
}

.map-times-table td {
  padding: 5px 8px;
  font-size: 12px;
  border-bottom: 1px solid #f1f5f9;
}

.map-times-table tr:last-child td {
  border-bottom: none;
}

.point-number {
  font-weight: 700;
  color: var(--navy-brand);
}

.point-name {
  font-weight: 500;
}

.time-val {
  font-weight: 600;
  color: var(--text-main);
}

.map-image-container {
  flex: 0.9;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--border-color);
  background-color: #ffffff;
}

.map-image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* --- 5. Render Full Layout --- */
.layout-render-full-body {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.layout-render-full-body img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.layout-render-full-body.contain-left {
  background-color: transparent;
  box-shadow: none;
  border: none;
  overflow: visible;
  display: flex;
  justify-content: flex-start;
}

.layout-render-full-body.contain-left img {
  width: auto;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  object-position: left;
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(0, 0, 0, 0.05);
}

/* --- 6. Plan Vivienda Layout --- */
.layout-plan-vivienda-body {
  display: flex;
  gap: 40px;
}

.plan-info-col {
  flex: 0.95;
  display: flex;
  flex-direction: column;
  gap: 16px;
  justify-content: center;
}

.plan-specs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.plan-spec-item {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 8px 12px;
}

.plan-spec-name {
  font-size: 10px;
  font-weight: 500;
  color: var(--text-muted);
  text-transform: uppercase;
}

.plan-spec-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-brand);
}

.plan-rooms-list {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  max-height: 200px;
  overflow-y: auto;
}

.room-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding: 4px 0;
  border-bottom: 1px solid #f1f5f9;
}

.room-row:last-child {
  border-bottom: none;
}

.room-name {
  color: var(--text-main);
  font-weight: 500;
}

.room-area {
  font-weight: 700;
  color: var(--navy-brand);
}

.plan-image-col {
  flex: 1.05;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background-color: #ffffff;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  justify-content: center;
}

.plan-image-col img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* --- 7. Specifications (Memoria de calidades) --- */
.layout-specifications-body {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  overflow-y: auto;
  padding: 8px 0;
}

.spec-category-card {
  background-color: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 16px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.spec-category-card h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--navy-brand);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 6px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.spec-category-card p {
  font-size: 11px;
  line-height: 1.5;
  color: var(--text-main);
  text-align: justify;
}

.bg-navy .spec-category-card {
  background-color: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: none;
}

.bg-navy .spec-category-card h3 {
  color: var(--pastel-blue-accent);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.bg-navy .spec-category-card p {
  color: var(--text-white-muted);
}


/* --- 8. Contacto y Cierre --- */
.layout-contact-body {
  display: flex;
  gap: 48px;
}

.contact-left {
  flex: 1.1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.contact-company {
  font-size: 14px;
  font-weight: 700;
  color: var(--gray-almost-white);
  letter-spacing: 1.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
}

.contact-title {
  font-size: 38px;
  font-weight: 800;
  margin-bottom: 24px;
  letter-spacing: -0.5px;
  line-height: 1.1;
}

.contact-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}

.contact-item {
  background-color: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.contact-item i {
  font-size: 18px;
  color: var(--gray-almost-white);
}

.contact-item-label {
  font-size: 10px;
  color: var(--text-white-muted);
  text-transform: uppercase;
}

.contact-item-value {
  font-size: 14px;
  font-weight: 600;
}

.contact-right {
  flex: 0.9;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background-color: #ffffff;
}

.bg-navy .contact-right {
  background-color: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bg-navy .contact-right img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 160px;
  object-fit: contain;
}


/* -------------------- PRINT STYLING (@media print) -------------------- */
@media print {
  body {
    background-color: #ffffff !important;
    padding: 0 !important;
    min-height: 0 !important;
    overflow: visible !important;
    display: block !important;
  }

  @page {
    size: A4 landscape;
    margin: 0;
  }

  .slide-container {
    width: 100vw !important;
    height: 100vh !important;
    max-width: none !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    margin: 0 !important;
    padding: 40px 56px !important;
    box-sizing: border-box !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
  }

  .bg-navy .slide-container {
    background-color: #323232 !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .bg-contact-custom .slide-container {
    background: linear-gradient(rgba(7, 18, 36, 0.88), rgba(7, 18, 36, 0.88)), url('../extracted_assets/images/page_10_img_1.jpeg') no-repeat center center !important;
    background-size: cover !important;
    color: #ffffff !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .bg-pastel .slide-container {
    background-color: #ffffff !important;
    color: #323232 !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }

  .bg-pastel .slide-container::before {
    top: 40px !important;
    right: 56px !important;
  }

  .bg-pastel .slide-container::after {
    top: 10% !important;
    left: -80px !important;
  }

  /* Make sure images render well in print */
  img {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}

/* White Cover Theme */
.bg-white-cover .slide-container {
  background-color: #ffffff;
  color: #323232;
  box-shadow: var(--shadow-page);
}

.bg-white-cover .cover-company {
  color: var(--navy-brand);
}

.bg-white-cover .cover-title {
  color: #323232;
}

.bg-white-cover .cover-subtitle {
  color: #555555;
}

.bg-white-cover .cover-tagline {
  color: var(--text-muted);
}

.bg-white-cover .slide-footer {
  border-top-color: rgba(0, 0, 0, 0.08);
}

.bg-white-cover .slide-footer .footer-left,
.bg-white-cover .slide-footer .footer-company {
  color: var(--text-muted);
}