/*
  Enhanced stylesheet for the Liderman digital portal. This file defines
  a comprehensive design system with improved visual hierarchy, modern
  components, and enhanced user experience while maintaining the original
  brand identity and color palette.
*/

/* Enhanced Color Palette */
:root {
  --primary: #b01217; /* Rich red for headers and accent bars */
  --primary-light: #d41e24; /* Lighter red for hover states */
  --primary-dark: #8a0f14; /* Darker red for active states */
  --secondary: #f5f5f5; /* Light grey for subtle backgrounds */
  --secondary-dark: #e8e8e8; /* Darker grey for borders */
  --dark: #1a1a1a; /* Almost black for high-contrast text */
  --light: #ffffff; /* White for cards and panels */
  --accent: #333333; /* Neutral dark grey for body text */
  --accent-light: #666666; /* Lighter grey for secondary text */
  --success: #28a745; /* Green for success states */
  --warning: #ffc107; /* Yellow for warning states */
  --info: #17a2b8; /* Blue for info states */
  --border: #dee2e6; /* Light border color */
  --shadow: rgba(0, 0, 0, 0.1); /* Subtle shadow */
  --shadow-hover: rgba(0, 0, 0, 0.15); /* Hover shadow */
  --text: #333333; /* Text color */
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
  color: var(--accent);
  line-height: 1.6;
  background-color: var(--secondary);
  font-size: 16px;
}

main {
  width: 100%;
  max-width: 100%;
  background-color: var(--secondary);
}

/* Enhanced Typography Scale */
h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 0.5em;
  line-height: 1.2;
}

h1 {
  font-size: 2rem;
}
h2 {
  font-size: 1.5rem;
}
h3 {
  font-size: 1rem;
}
h4 {
  font-size: 1.25rem;
}
h5 {
  font-size: 1.125rem;
}
h6 {
  font-size: 1rem;
}

p {
  margin-bottom: 1em;
  color: var(--accent);
}

small {
  font-size: 0.875rem;
  color: var(--accent-light);
}

/* Enhanced Link Styles */
a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.2s ease;
}

a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

a:focus {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Container and Layout Utilities */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* Enhanced Navigation Bar */
header {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--light);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 10px var(--shadow);
  position: sticky;
  top: 0;
  z-index: 100;
}

.logo {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo strong {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.tagline {
  font-size: 0.75rem;
  opacity: 0.9;
  font-weight: 300;
}

header nav ul {
  list-style: none;
  display: flex;
  gap: 1rem;
  align-items: center;
}

header nav a {
  color: var(--light);
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s ease;
  position: relative;
}

header nav a:hover {
  background-color: rgba(255, 255, 255, 0.1);
  text-decoration: none;
}

header nav a.active {
  background-color: rgba(255, 255, 255, 0.2);
  font-weight: 600;
}

/* Enhanced Hero Section */
.hero {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--light);
  border-radius: 15px 15px 0px 0px;
  text-align: center;
  padding: 1rem 1rem;
  position: relative;
  overflow: hidden;
}

.hero::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.05)" stroke-width="1"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
  opacity: 0.3;
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: 800px;
  margin: 0 auto;
}

.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
  color: var(--light);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  font-size: 1.25rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  font-weight: 300;
}

.hero-description {
  font-size: 1.125rem;
  margin-bottom: 2rem;
  opacity: 0.95;
  font-weight: 300;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Hero Stats */
.hero-stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin-top: 3rem;
}

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

.stat-item strong {
  display: block;
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.stat-item span {
  font-size: 0.875rem;
  opacity: 0.9;
}

/* System Hero Variant */
.system-hero {
  padding: 3rem 2rem;
}

.system-badge {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 20px;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 1rem;
}

.os10-badge {
  background: linear-gradient(135deg, #28a745, #20c997);
  color: white;
}

.sigo-badge {
  background: linear-gradient(135deg, #007bff, #6610f2);
  color: white;
}

.visor-badge {
  background: linear-gradient(135deg, #fd7e14, #e83e8c);
  color: white;
}

.setra-badge {
  background: linear-gradient(135deg, #20c997, #17a2b8);
  color: white;
}

.cdc-badge {
  background: linear-gradient(135deg, #6f42c1, #e83e8c);
  color: white;
}

.org-badge {
  background: linear-gradient(135deg, #495057, #6c757d);
  color: white;
}

.system-status {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  margin-top: 2rem;
}

.status-indicator {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.status-indicator.active {
  background: var(--success);
  box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.3);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(40, 167, 69, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(40, 167, 69, 0);
  }
}

.status-text {
  font-size: 0.875rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
}

.last-update {
  opacity: 0.8;
}

/* Enhanced Project Showcase */
.project-showcase {
  padding: 4rem 0;
  background: var(--light);
}

.section-intro {
  text-align: center;
  font-size: 1.125rem;
  color: var(--accent-light);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

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

.project-card {
  background: var(--light);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px var(--shadow);
  transition: all 0.3s ease;
  border: 1px solid var(--border);
}

.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--shadow-hover);
}

.project-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.project-card h3 {
  margin-bottom: 1rem;
}

.project-card h3 a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.feature-list {
  list-style: none;
  margin-top: 1.5rem;
}

.feature-list li {
  padding: 0.5rem 0;
  color: var(--accent-light);
  font-size: 0.9rem;
  position: relative;
  padding-left: 1.5rem;
}

.feature-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

/* Enhanced Section Styling */
section {
  padding: 4rem 0;
}

.content-section {
  background-color: var(--light);
}

.content-section.alt {
  background-color: var(--secondary);
}

/* System Overview Cards */
.system-overview {
  padding: 4rem 0;
  background: var(--light);
}

.overview-card {
  background: var(--light);
  border-radius: 12px;
  padding: 3rem;
  box-shadow: 0 4px 6px var(--shadow);
  border: 1px solid var(--border);
}

.overview-card header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
}

.card-icon {
  font-size: 2rem;
  opacity: 0.7;
}

.feature-highlight {
  margin-top: 2rem;
  padding: 2rem;
  background: var(--secondary);
  border-radius: 8px;
}

.capability-list {
  list-style: none;
  display: grid;
  gap: 1rem;
  margin-top: 1rem;
}

.capability-list li {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--light);
  border-radius: 8px;
  border-left: 4px solid var(--primary);
}

.capability-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
}

.capability-list strong {
  display: block;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

/* Phase Cards */
.phases-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.phase-card {
  background: var(--light);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px var(--shadow);
  border: 1px solid var(--border);
}

.phase-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.phase-number {
  background: var(--primary);
  color: var(--light);
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.25rem;
}

.phase-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  margin-left: auto;
}

.phase-status.completed {
  background: var(--success);
  color: white;
}

.phase-status.active {
  background: var(--info);
  color: white;
}

.phase-metrics {
  display: flex;
  gap: 2rem;
  margin-top: 1.5rem;
}

.metric {
  text-align: center;
}

.metric strong {
  display: block;
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.metric span {
  font-size: 0.875rem;
  color: var(--accent-light);
}

/* Data Flow Diagram */
.data-flow {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--secondary);
  border-radius: 12px;
}

.flow-diagram {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.flow-step {
  background: var(--light);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 2px 4px var(--shadow);
  flex: 1;
  min-width: 200px;
}

.step-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.flow-step h4 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.flow-step ul {
  list-style: none;
  font-size: 0.875rem;
  color: var(--accent-light);
}

.flow-arrow {
  font-size: 2rem;
  color: var(--primary);
  font-weight: bold;
}

/* Report Cards */
.reports-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin: 3rem 0;
}

.report-card {
  background: var(--light);
  border-radius: 12px;
  padding: 2rem;
  box-shadow: 0 4px 6px var(--shadow);
  border: 1px solid var(--border);
  transition: transform 0.2s ease;
}

.report-card:hover {
  transform: translateY(-2px);
}

.report-card header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.report-icon {
  font-size: 1.5rem;
  color: var(--primary);
}

.report-features {
  list-style: none;
  margin-top: 1rem;
}

.report-features li {
  padding: 0.25rem 0;
  color: var(--accent-light);
  font-size: 0.9rem;
  position: relative;
  padding-left: 1.5rem;
}

.report-features li::before {
  content: "•";
  position: absolute;
  left: 0;
  color: var(--primary);
}

/* Digital Folder */
.digital-folder {
  margin: 3rem 0;
  padding: 2rem;
  background: var(--light);
  border-radius: 12px;
  border: 2px dashed var(--border);
}

.folder-categories {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: 2rem;
}

.category-group {
  padding: 1.5rem;
  background: var(--secondary);
  border-radius: 8px;
}

.category-group h4 {
  color: var(--primary);
  margin-bottom: 1rem;
  font-size: 1rem;
}

.category-group ul {
  list-style: none;
}

.category-group li {
  padding: 0.25rem 0;
  color: var(--accent);
  font-size: 0.9rem;
}

/* Enhanced Info Cards */
.info-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
  margin-top: 3rem;
}

.info-card {
  background: var(--light);
  padding: 2rem;
  border-radius: 12px;
  text-align: center;
  box-shadow: 0 4px 6px var(--shadow);
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}

.info-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 25px var(--shadow-hover);
}

.card-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.info-card h3 {
  margin-bottom: 1rem;
  color: var(--primary);
}

.card-metrics {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

/* Objective Section */
.objective-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 3rem;
  align-items: start;
}

.objective-text blockquote {
  margin: 2rem 0;
  padding: 1.5rem;
  background: var(--secondary);
  border-left: 4px solid var(--primary);
  border-radius: 0 8px 8px 0;
  font-style: italic;
  color: var(--accent);
}

.objective-benefits {
  background: var(--light);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px var(--shadow);
}

.objective-benefits h3 {
  color: var(--primary);
  margin-bottom: 1rem;
}

.objective-benefits ul {
  list-style: none;
}

.objective-benefits li {
  padding: 0.5rem 0;
  color: var(--accent);
}

/* Enhanced Links Section */
.links-section {
  background: var(--secondary);
}

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

.link-category {
  background: var(--light);
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 6px var(--shadow);
}

.link-category h3 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 1.25rem;
}

.link-category ul {
  list-style: none;
}

.link-category li {
  margin-bottom: 1rem;
}

.link-category a {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: var(--secondary);
  border-radius: 8px;
  text-decoration: none;
  transition: all 0.2s ease;
  border: 1px solid transparent;
}

.link-category a:hover {
  background: var(--light);
  border-color: var(--primary);
  transform: translateX(4px);
}

.link-icon {
  font-size: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.125rem;
}

.link-category a strong {
  display: block;
  color: var(--dark);
  margin-bottom: 0.25rem;
}

.link-category a small { 
  color: var(--accent-light);
  font-size: 0.8rem;
}

/* Dashboard Section */
.dashboard-section {
  background: var(--light);
}

.dashboard-header {
  text-align: center;
  margin-bottom: 2rem;
}

.dashboard-controls {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-top: 1rem;
}

.control-btn {
  padding: 0.75rem 1.5rem;
  background: var(--primary);
  color: var(--light);
  border: none;
  border-radius: 6px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  transition: all 0.2s ease;
}

.control-btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.dashboard-container {
  background: var(--light);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 6px var(--shadow);
  border: 1px solid var(--border);
}

.dashboard-frame {
  border-radius: 8px;
  overflow: hidden;
}

/* Enhanced Footer */
footer {
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: var(--light);
  padding: 2rem;
  text-align: center;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.footer-brand strong {
  font-size: 1.25rem;
  margin-bottom: 0.25rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.875rem;
  text-decoration: none;
  transition: color 0.2s ease;
}

.footer-links a:hover {
  color: white;
  text-decoration: underline;
}

.footer-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: 0.875rem;
  opacity: 0.9;
}

/* Placeholder Styles for Empty Iframes */
.iframe-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 650px;
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border-radius: 8px;
  border: 2px dashed var(--border);
}

.placeholder-content {
  text-align: center;
  color: var(--accent-light);
}

.placeholder-icon {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.5;
}

.placeholder-content h3 {
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.placeholder-content p {
  margin-bottom: 0.5rem;
}

.placeholder-content small {
  font-style: italic;
}

/* Organizational Chart Section */
.org-section {
  margin: 3rem 0;
  background: white;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.org-section:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.org-section-header {
  padding: 6px;
  background: #b01217;
  color: white;
  text-align: center;
}

.org-section-header .org-icon {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  opacity: 0.9;
}

.org-section-header h3 {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
}

.org-section-header p {
  font-size: 1.1rem;
  margin: 0;
  opacity: 0.9;
  line-height: 1.5;
}

.org-chart-image {
  padding: 2rem;
  background: #f8f9fa;
  text-align: center;
}

.org-chart-img {
  max-width: 100%;
  height: auto;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

.org-chart-img:hover {
  transform: scale(1.02);
}

/* Power BI Container and Info Sections */
.powerbi-container {
  background: var(--light);
  border-radius: 12px;
  padding: 1rem;
  box-shadow: 0 4px 6px var(--shadow);
  border: 1px solid var(--border);
  margin-top: 2rem;
}

.powerbi-container iframe {
  border-radius: 8px;
  overflow: hidden;
}

.info-section {
  padding: 4rem 0;
  background: var(--light);
}

.info-section.alt {
  background: var(--secondary);
}

.info-section h2 {
  color: var(--primary);
  margin-bottom: 1.5rem;
  font-size: 2rem;
  font-weight: 700;
}

.info-section p {
  font-size: 1.1rem;
  line-height: 1.7;
  margin-bottom: 1.5rem;
  color: var(--text);
}

.info-section ul,
.info-section ol {
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.info-section li {
  margin-bottom: 0.75rem;
  line-height: 1.6;
  color: var(--text);
}

.info-section li strong {
  color: var(--primary);
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .container {
    padding: 0 1rem;
  }

  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  header nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
  }

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

  .hero-stats {
    flex-direction: column;
    gap: 1.5rem;
  }

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

  .phases-container {
    grid-template-columns: 1fr;
  }

  .flow-diagram {
    flex-direction: column;
  }

  .flow-arrow {
    transform: rotate(90deg);
  }

  .objective-content {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

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

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

  .footer-main,
  .footer-meta {
    align-items: center;
  }

  .dashboard-controls {
    flex-direction: column;
    align-items: center;
  }

  .system-badge {
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
  }

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

  .org-section {
    margin: 2rem 0;
  }

  .org-section-header {
    padding: 1.5rem;
  }

  .org-section-header .org-icon {
    font-size: 2rem;
  }

  .org-section-header h3 {
    font-size: 1.5rem;
  }

  .org-chart-image {
    padding: 1.5rem;
  }
}

@media (max-width: 480px) {
  .hero {
    padding: 2rem 1rem;
  }

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

  section {
    padding: 2rem 0;
  }

  .project-card,
  .overview-card,
  .phase-card {
    padding: 1.5rem;
  }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Focus Styles */
button:focus,
.control-btn:focus {
  outline: 2px solid var(--light);
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  header,
  footer,
  .dashboard-section {
    display: none;
  }

  body {
    background: white;
    color: black;
  }

  .hero {
    background: white;
    color: black;
    border-bottom: 2px solid black;
  }
}

/* Header con fondo blanco - Override */
header {
  background: var(--light) !important;
  color: var(--dark) !important;
  border-bottom: 3px solid var(--primary);
  box-shadow: 0 2px 10px var(--shadow);
}

/* Logo con imagen */
.logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

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

.logo-text {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.logo-text strong {
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--primary);
}

.logo-text .tagline {
  font-size: 0.75rem;
  opacity: 0.8;
  font-weight: 300;
  color: var(--accent-light);
}

/* Navegación con contraste para fondo blanco */
header nav a {
  color: var(--accent) !important;
  font-weight: 500;
  padding: 0.75rem 1.25rem;
  border-radius: 8px;
  transition: all 0.2s ease;
  border: 2px solid transparent;
}

header nav a:hover {
  background-color: var(--secondary);
  color: var(--primary) !important;
  text-decoration: none;
  border-color: var(--primary);
}

header nav a.active {
  background-color: var(--primary);
  color: var(--light) !important;
  font-weight: 600;
  border-color: var(--primary);
}

header nav a i {
  margin-right: 0.5rem;
}

/* User menu para fondo blanco */
.user-menu {
  color: var(--accent) !important;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info .last-login {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.8rem;
    color: var(--accent-light);
}

.user-greeting {
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  font-weight: 500;
}

.logout-btn {
  background: var(--primary);
  border: none;
  color: white;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.875rem;
}

.logout-btn:hover {
  background: var(--primary-light);
  transform: translateY(-1px);
}

.logout-btn::after {
  content: "Salir";
  font-size: 0.8rem;
}

/* Responsive para header */
@media (max-width: 768px) {
  header {
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
  }

  .logo {
    gap: 0.75rem;
  }

  .logo-img {
    height: 40px;
  }

  .logo-text strong {
    font-size: 1.25rem;
  }

  header nav ul {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
  }

  header nav a {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
  }

  .user-greeting {
    display: none;
  }

  .logout-btn::after {
    display: none;
  }
}

@media (max-width: 480px) {
  .logo {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .logo-img {
    height: 35px;
  }

  header nav ul {
    gap: 0.25rem;
  }

  header nav a {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
  }

  header nav a span {
    display: none; /* Ocultar texto en móvil, solo iconos */
  }
}

/* Secciones info con estilo acordeón */
.info-section {
    padding: 2rem 0;
    border-bottom: 1px solid var(--border);
}

.info-section.alt {
    background: var(--primary);
    color: white;
}

.info-section.alt .section-content p {
    color: white;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.section-header h2 {
    color: var(--primary);
    font-size: 1.5rem;
    margin: 0;
}

.info-section.alt .section-header h2 {
    color: white;
}

.collapse-btn {
    background: none;
    border: none;
    color: var(--accent-light);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.info-section.alt .collapse-btn {
    color: white;
}

.collapse-btn:hover {
    background: var(--secondary);
}

.info-section.alt .collapse-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.section-content {
    animation: fadeIn 0.3s ease;
}

.section-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    color: var(--text);
}

.kpi-list {
    margin: 1.5rem 0;
    padding-left: 1rem;
}

.kpi-list ol {
    list-style: decimal;
    padding-left: 1.5rem;
}

.kpi-list li {
    margin-bottom: 0.5rem;
    font-size: 1rem;
    color: white;
}

.report-details {
    margin-top: 2rem;
}

.report-item {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.report-item:last-child {
    border-bottom: none;
}

.report-item h3 {
    color: var(--dark);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

.report-item p {
    color: var(--text);
    line-height: 1.6;
}

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

/* Responsive */
@media (max-width: 768px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .collapse-btn {
        align-self: flex-end;
    }
}

/* =======================
   Componentes CMS dinámicos
   ======================= */
.cms-hero {
    position: relative;
    background: linear-gradient(135deg, rgba(176, 18, 23, 0.75), rgba(0, 0, 0, 0.6));
    background-size: cover;
    background-position: center;
    border-radius: 18px;
    padding: 3rem;
    color: #ffffff;
    margin-bottom: 2rem;
    box-shadow: 0 18px 32px rgba(0, 0, 0, 0.25);
}

.cms-hero__content {
    max-width: 640px;
}

.cms-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cms-hero p {
    font-size: 1.15rem;
    margin-bottom: 1.5rem;
}

.cms-title {
    margin: 2rem 0 1rem;
}

.cms-title__heading {
    display: block;
    margin: 0;
    padding: 0.75rem 0;
}

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

.cms-title__heading--right {
    text-align: right;
}

.cms-paragraph {
 animation: fadeIn 0.3s ease;
 display: block;
}
.cms-paragraph p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.2rem;
    color: var(--text);
}
.cms-card-grid {
    margin: 2rem 0;
}

.cms-card-grid__items {
    display: grid;
    gap: 1.25rem;
}

.cms-card-grid--two-column .cms-card-grid__items {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.cms-card-grid--grid .cms-card-grid__items {
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.cms-card {
    background: #ffffff;
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.cms-card__icon i {
    font-size: 1.75rem;
    color: #b01217;
}

.cms-card__action {
    color: #b01217;
    font-weight: 600;
    text-decoration: none;
    align-self: flex-start;
}

.cms-dashboard {
    margin: 2rem 0;
    padding: 2rem;
    border-radius: 18px;
    background: linear-gradient(145deg, #ffffff, #f4f5fb);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.1);
}

.cms-dashboard__description {
    margin-top: 0;
    font-size: 1.05rem;
    color: #444;
}

.cms-dashboard__metrics {
    margin-top: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.cms-metric {
    background: #ffffff;
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cms-metric__label {
    display: block;
    font-weight: 600;
    color: #8b0f14;
}

.cms-metric__value {
    font-size: 1.8rem;
    font-weight: 700;
    color: #222;
}

.cms-metric__trend {
    display: block;
    margin-top: 0.5rem;
    color: #0f8b5f;
    font-weight: 600;
}

.cms-metric__detail {
    display: block;
    margin-top: 0.25rem;
    color: #666;
}

/* === Componente Image === */
.cms-image {
    margin: 2rem 0;
    text-align: center;
}

.cms-image--left {
    text-align: left;
}

.cms-image--right {
    text-align: right;
}

.cms-image--center {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}

.cms-image img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.cms-image figcaption {
    margin-top: 0.75rem;
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}

/* === Componente Iframe === */
.cms-iframe-container {
    position: relative;
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    background: #f8f9fa;
}

.cms-iframe-container iframe {
    display: block;
    border: none;
}

/* === Dashboard PowerBI (mejorado) === */
.cms-dashboard {
    margin: 2rem 0;
}

.cms-dashboard h3 {
    margin-bottom: 1rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

.cms-dashboard__description {
    margin-bottom: 1.5rem;
    color: #666;
    font-size: 1.05rem;
}

.dashboard-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.control-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.2s ease;
}

.control-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(176, 18, 23, 0.2);
}

.dashboard-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.dashboard-frame {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    background: #f8f9fa;
}

.dashboard-frame iframe {
    display: block;
    border: none;
}

/* === Wrapper de Secciones CMS (nuevo sistema) === */
.cms-section-wrapper {
    margin-bottom: 1rem;
}

.cms-section-wrapper:last-child {
    margin-bottom: 0;
}

/* Separación entre secciones de componentes */
.cms-section-wrapper .cms-title,
.cms-section-wrapper .cms-paragraph,
.cms-section-wrapper .cms-card-grid,
.cms-section-wrapper .cms-dashboard,
.cms-section-wrapper .cms-image-section,
.cms-section-wrapper .cms-iframe-section {
    padding: 1rem 0;
}

/* Primera sección sin padding top */
.cms-section-wrapper:first-child > section:first-child {
    padding-top: 2rem;
}

/* Última sección sin padding bottom */
.cms-section-wrapper:last-child > section:last-child {
    padding-bottom: 2rem;
}

/* Secciones de imagen e iframe */
.cms-image-section {
    margin: 1rem 0;
}

.cms-iframe-section {
    margin: 1rem 0;
}

/* Dashboard título */
.cms-dashboard__title {
    margin: 0 0 1rem;
    font-size: 1.8rem;
    font-weight: 700;
    color: #333;
}

@media (max-width: 768px) {
    .cms-hero {
        padding: 2rem;
    }

    .cms-dashboard {
        padding: 1.5rem;
    }

    .cms-section-wrapper .cms-title,
    .cms-section-wrapper .cms-paragraph,
    .cms-section-wrapper .cms-card-grid,
    .cms-section-wrapper .cms-dashboard,
    .cms-section-wrapper .cms-image-section,
    .cms-section-wrapper .cms-iframe-section {
        padding: 0.75rem 0;
    }
}
