/* --- Base Styles & Variables --- */
:root {
    /* Core Palette */
    --primary-color: #31a6a2;
    --primary-light: #5ce0dc;
    --secondary-color: #31a6a2ab;
    --accent-color: #f0b42b;
    --highlight-color: #ffd34e;
    --background-color: #fdfdff;
    --card-color: #ffffff;
    --text-color: #2c3e50;
    --text-light: #576574;
    --border-color: #e0e4e8;
    --hover-color: #f1f4ff;
    --shadow: 0 8px 25px rgba(74, 105, 189, 0.12);
    --shadow-light: 0 4px 12px rgba(0, 0, 0, 0.06);
    --sidebar-width: 420px;
    --transition-speed: 0.35s;
    --transition-speed-fast: 0.2s;
    --border-radius: 6px;
    --border-radius-large: 10px;
    --font-sans: 'Roboto', sans-serif;
    --font-mono: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    /* --- Altura estimada del header --- */
    --header-height: 65px; /* Ajustar si el header real es diferente */
}

/* responsive.css - Media queries para diferentes dispositivos */

/* Tablets y dispositivos medianos */
@media (max-width: 1024px) {
  .overview-grid, .specs-grid, .case-studies-grid, .special-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-title {
    font-size: 2.2rem;
  }
  
  .hero-subtitle {
    font-size: 1.1rem;
  }
  
  .sidebar {
    width: 350px;
  }
}

/* Dispositivos móviles */
@media (max-width: 768px) {
  .header-content {
    padding: 0 20px;
  }
  
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: linear-gradient(60deg, var(--primary-color), var(--primary-light));
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
  }
  
  .main-nav.active {
    display: block;
  }
  
  .main-nav ul {
    flex-direction: column;
    gap: 15px;
  }
  
  .nav-toggle {
    display: block;
  }
  
  .hero {
    padding: 6rem 1rem 4rem;
  }
  
  .hero-title {
    font-size: 1.8rem;
  }
  
  .hero-stats {
    flex-direction: column;
    gap: 1rem;
  }
  
  .overview-grid, .specs-grid, .case-studies-grid, .special-grid {
    grid-template-columns: 1fr;
  }
  
  .page-container {
    padding: 30px 20px;
  }
  
  .controls {
    flex-direction: column;
    align-items: center;
  }
  
  .controls button {
    width: 100%;
    justify-content: center;
  }
  
  .sidebar {
    width: 100%;
  }
}

/* Dispositivos muy pequeños */
@media (max-width: 480px) {
  .hero-title {
    font-size: 1.5rem;
  }
  
  .hero-subtitle {
    font-size: 1rem;
  }
  
  .stat-item {
    padding: 1rem;
  }
  
  .stat-value {
    font-size: 2rem;
  }
  
  .page-title {
    font-size: 1.8rem;
  }
}

/* --- Reset & Global Styles --- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; scrollbar-width: thin; scrollbar-color: var(--primary-light) var(--hover-color); }
html::-webkit-scrollbar { width: 8px; }
html::-webkit-scrollbar-track { background: var(--hover-color); }
html::-webkit-scrollbar-thumb { background-color: var(--primary-light); border-radius: 10px; border: 2px solid var(--hover-color); }

body {
    font-family: var(--font-sans); background-color: var(--background-color); color: var(--text-color);
    line-height: 1.7; margin: 0; padding: 0; overflow-x: hidden; font-weight: 400;
    display: flex; flex-direction: column; min-height: 100vh;
    opacity: 0; animation: fadeInPage 0.6s ease-out forwards; animation-delay: 0.1s;
}
@keyframes fadeInPage { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }

/* --- Layout: Container & Main --- */
.container {
    display: flex; width: 100%; flex-grow: 1;
    margin-top: calc(var(--header-height) + 20px); /* Asegura espacio suficiente para el header */
    padding-top: 20px;
}
/* --- Contenedor general para páginas sin sidebar --- */
.page-container {
    max-width: 1100px; margin: 0 auto;
    /* --- Padding superior aumentado y margen superior --- */
    padding: 50px 40px 30px 40px;
    width: 100%; flex-grow: 1;
    margin-top: var(--header-height);
}

/* --- Header & Navigation --- */
.site-header {
    background: linear-gradient(60deg, var(--primary-color), var(--primary-light)); color: white;
    padding: 20px 40px; min-height: 80px; box-shadow: var(--shadow-light);
    position: fixed; top: 0; left: 0; right: 0; z-index: 1100; width: 100%;
    display: flex; align-items: center;
    will-change: transform; /* Optimización para navegadores */
    transform: translateZ(0); /* Force hardware acceleration */
}
.header-content { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; width: 100%; }
.logo a { color: white; text-decoration: none; font-size: 1.6rem; font-weight: 500; transition: color var(--transition-speed-fast); }
.logo a span { color: white; /* Asegurar que el texto del logo sea siempre blanco */ }
.logo a:hover { color: var(--highlight-color); }
.main-nav ul { list-style: none; display: flex; gap: 25px; }
.main-nav a { color: rgba(255, 255, 255, 0.85); text-decoration: none; font-weight: 500; padding: 8px 0; position: relative; transition: color var(--transition-speed-fast); }
.main-nav a::after { 
    content: ''; 
    position: absolute; 
    bottom: 0; 
    left: 0; 
    width: 0; 
    height: 2px; 
    background-color: var(--highlight-color); 
    transition: all var(--transition-speed) cubic-bezier(0.25, 0.46, 0.45, 0.94); 
    transform-origin: left center;
}
.main-nav a:hover, .main-nav a.active { color: white; }
.main-nav a:hover::after, .main-nav a.active::after { width: 100%; }

/* Estilos para el submenú desplegable */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: var(--primary-light);
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    z-index: 1;
    border-radius: var(--border-radius);
    overflow: hidden;
}

.dropdown-content a {
    color: white;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color var(--transition-speed-fast);
}

.dropdown-content a:hover {
    background-color: var(--primary-color);
}

.dropdown:hover .dropdown-content {
    display: block;
}

.dropdown {
    position: relative;
    display: inline-block;
}
.nav-toggle { display: none; background: #59dcd8; border: none; color: white; font-size: 1.8rem; cursor: pointer; padding: 5px; line-height: 1; }

/* --- Main Content Area (Diagram Page Specific) --- */
.main-content {
    flex: 1;
    /* --- Padding superior aumentado --- */
    padding: 50px 40px 30px 40px;
    transition: margin-right var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    max-width: 100%; width: 100%;
    opacity: 0; animation: fadeInSection 0.5s ease-out forwards 0.3s;
}
.main-content.sidebar-active { margin-right: var(--sidebar-width); @media (max-width: 1024px) { margin-right: 0; } }
@keyframes fadeInSection { from { opacity: 0; transform: translateY(15px); } to { opacity: 1; transform: translateY(0); } }

/* --- Page Titles & Sections --- */
.page-title { font-size: 2.2rem; font-weight: 500; color: var(--primary-color); margin-bottom: 35px; padding-bottom: 15px; border-bottom: 3px solid var(--primary-color); text-align: center; }

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 8rem 2rem 6rem;
    margin: -50px -40px 3rem -40px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border-radius: 0 0 var(--border-radius-large) var(--border-radius-large);
    position: relative;
    overflow: hidden;
    animation: heroEntrance 1s ease-out;
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite, heroEntrance 1s ease-out;
}

/* Mejora de contraste en hero section */
.hero h1, .hero h2 {
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); /* Sombra más pronunciada */
}

.hero p {
    color: rgba(255, 255, 255, 1); /* Aumentar opacidad del texto */
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle .highlight-text {
    background-color: rgba(0, 0, 0, 0.2); /* Fondo semi-transparente */
    padding: 0 5px;
    border-radius: 3px;
}

/* Mejorar contraste en cards */
.overview-card h3, .specs-card h3, .case-study-card h3, .special-card h3 {
    color: #2a7d7a; /* Versión más oscura del color primario */
}

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

.stat-item {
    position: relative;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-large);
    padding: 1.5rem;
    min-width: 120px;
    text-align: center;
    transition: all var(--transition-speed-fast) ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    transition: all 0.5s ease;
}

.stat-label {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-icon {
    font-size: 1.8rem;
    color: var(--highlight-color);
    margin-top: 0.5rem;
}

.stat-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: var(--highlight-color);
    width: 0%;
    border-radius: 0 0 var(--border-radius-large) var(--border-radius-large);
    transition: width 1s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.stat-item:hover .stat-progress {
    width: 100%;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse-animated {
    animation: pulse 2s infinite ease-in-out;
    animation-delay: var(--delay, 0s);
}

@keyframes heroEntrance {
    0% { opacity: 0; transform: translateY(30px); }
    100% { opacity: 1; transform: translateY(0); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Adjust hero container if needed */
.hero .container { /* Assuming you might wrap hero content */
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
}

.hero h1, .hero h2 { /* Style both h1 and h2 if used */
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: white;
    font-weight: 500;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero p {
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.9);
}


/* === Styles for Advanced Systems Page Specific Sections === */
.overview-section, .tech-specs-section, .phases-section, .case-studies, .special-components {
    padding: 2.5rem 0; /* Vertical padding */
    margin-bottom: 2.5rem; /* Space below section */
    position: relative; /* For potential pseudo-elements */
}

/* Section Titles within Advanced Systems */
.overview-section h2,
.tech-specs-section h2,
.phases-section h2,
.case-studies h2,
.special-components h2 {
    font-size: 1.9rem; /* Slightly smaller than page title */
    font-weight: 500;
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary-light);
    text-align: left; /* Align section titles left */
}

.overview-section p,
.tech-specs-section p,
.phases-section p,
.case-studies p,
.special-components p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}


/* Grid Layouts (Used for Overview, Specs, Special, Case Studies) */
.overview-grid, .specs-grid, .case-studies-grid, .special-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsive columns */
    gap: 2rem; /* Space between cards */
    margin-top: 2rem; /* Space above grid */
}

/* Card Styling (Used for Overview, Specs, Special, Case Study Cards) */
.overview-card, .specs-card, .case-study-card, .special-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius-large);
    padding: 30px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-color);
    display: flex;
    flex-direction: column;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-left-color 0.3s ease;
}

.overview-card:hover, .specs-card:hover, .case-study-card:hover, .special-card:hover {
    border-left-color: var(--highlight-color);
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.1);
}

.overview-card h3, .specs-card h3, .case-study-card h3, .special-card h3 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.3rem; /* Card title size */
    font-weight: 500;
    letter-spacing: 0.2px;
}

/* Icon Styling within Cards */
.overview-card i, .specs-card i, .case-study-card i, .special-card i {
    font-size: 1.3rem; /* Icon size */
    color: var(--primary-color);
    margin-right: 0.8rem; /* Space between icon and text */
    vertical-align: middle;
}
.overview-card h3, .specs-card h3, .case-study-card h3, .special-card h3 {
    display: flex; /* Align icon and text */
    align-items: center;
}


/* Specific List Styling (e.g., in Specs, Special) */
.specs-card ul, .special-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.specs-card li, .special-card li {
    margin-bottom: 0.8rem;
    padding-left: 1.8rem; /* Indent list items */
    position: relative;
    color: var(--text-light);
    line-height: 1.6;
    font-size: 0.95rem;
}

.specs-card li::before, .special-card li::before {
    content: "✓"; /* Checkmark or other indicator */
    position: absolute;
    left: 0;
    color: var(--primary-color);
    font-weight: bold;
}

.specs-card strong, .special-card strong {
    color: var(--text-color);
    font-weight: 500;
}


/* === Phases Section Specific Styles === */
.phase {
    background: var(--card-color);
    border-radius: var(--border-radius-large); /* Larger radius for phase block */
    box-shadow: var(--shadow);
    margin-bottom: 3rem; /* Space between phase blocks */
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all var(--transition-speed) ease;
    opacity: 0;
    animation: fadeInSection 0.5s ease-out forwards 0.3s; /* Fade in */
}

.phase:hover {
    transform: translateY(-3px); /* Subtle lift */
    box-shadow: 0 10px 25px rgba(74, 105, 189, 0.15); /* Slightly stronger shadow */
}

.phase > h3 { /* Direct child H3 for phase title */
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    padding: 1.2rem 2rem; /* Padding for phase title */
    margin: 0;
    font-size: 1.5rem; /* Phase title size */
    font-weight: 500;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1rem; /* Space between icon and text */
}

.phase > h3 i { /* Icons within phase title */
    font-size: 1.4rem;
}

.phase > p { /* Paragraph directly under phase title (phase description) */
    padding: 0 2rem 1rem 2rem; /* Padding below title, inside phase block */
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 1.1rem;
}

/* Styling for components within a phase */
.phase-component {
    padding: 1rem 2rem 1.5rem 2rem; /* Padding for each component */
    border-top: 1px dashed var(--border-color); /* Separator line */
}
.phase-component:first-of-type {
    border-top: none; /* No top border for the first component */
     margin-top: 1rem; /* Add space after phase description */
}


.phase-component h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
    font-weight: 500;
}

.phase-component p {
    color: var(--text-light);
    font-size: 0.98rem;
    line-height: 1.6;
    margin-bottom: 0; /* Remove default bottom margin */
}


/* === Case Studies Specific Styles (If needed) === */
.case-studies h2 {
    text-align: center; /* Center title for case studies */
}

.case-studies > p { /* Paragraph directly under section title */
    text-align: center;
    max-width: 800px;
    margin: 0 auto 2rem; /* Center description paragraph */
}

.case-study-card h3 {
    /* Styling already covered by generic card styles */
}

.case-description { /* Specific paragraph style within case study card */
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-style: italic;
}

.case-details { /* Box for details within a case study */
    background: var(--hover-color);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-top: 1.5rem;
    border: 1px solid var(--border-color);
}

.case-details p {
    margin-bottom: 1rem;
    text-align: left; /* Align detail text left */
    font-size: 0.95rem;
}

.case-details ul {
    list-style: none;
    padding-left: 0; /* Remove default padding */
}

.case-details li {
    position: relative;
    margin-bottom: 0.8rem;
    padding-left: 1.5rem;
    font-size: 0.95rem;
}

.case-details li::before {
    content: "→"; /* Arrow indicator */
    position: absolute;
    left: 0;
    color: var(--primary-color);
}

/* --- Introduction Box (From index.html, keep for consistency) --- */
.introduction { margin-bottom: 40px; font-size: 1.1rem; line-height: 1.8; color: var(--text-light); background-color: var(--hover-color); padding: 25px 30px; border-radius: var(--border-radius); border-left: 5px solid var(--primary-color); box-shadow: var(--shadow-light); opacity: 0; animation: fadeInSection 0.5s ease-out forwards 0.5s; }

/* --- Back to Top Button --- */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition-speed) ease;
    box-shadow: var(--shadow-light);
    z-index: 999;
}
.back-to-top:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}
.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

/* --- Controls Area (From index.html, keep structure if needed) --- */
.controls { display: flex; justify-content: center; flex-wrap: wrap; margin-bottom: 30px; margin-top: 15px; gap: 15px; opacity: 0; animation: fadeInSection 0.5s ease-out forwards 0.7s; }
.controls button { padding: 12px 22px; background-color: var(--primary-color); color: white; border: none; border-radius: var(--border-radius); cursor: pointer; font-weight: 500; transition: all var(--transition-speed-fast) ease-out; display: inline-flex; align-items: center; gap: 10px; font-size: 0.95rem; box-shadow: 0 2px 4px rgba(0,0,0,0.08); opacity: 0.7; }
.controls button:not(:disabled) { opacity: 1; }
.controls button:disabled { cursor: not-allowed; background-color: #aab8e2; box-shadow: none; opacity: 0.6; }
.controls button:not(:disabled):hover { background-color: var(--primary-light); box-shadow: 0 4px 8px rgba(74, 105, 189, 0.15); transform: translateY(-2px); }
.controls button:not(:disabled):active { transform: scale(0.98) translateY(-1px); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.controls button i { font-size: 1.1em; }

/* --- Mermaid Diagram Container (Keep styling for index.html) --- */
.chart-container { background-color: var(--card-color); border-radius: var(--border-radius-large); box-shadow: var(--shadow); padding: 40px; margin-bottom: 50px; overflow: auto; border: 1px solid var(--border-color); position: relative; opacity: 0; animation: fadeInSection 0.6s ease-out forwards 0.9s; }
#mermaidChartOutput { min-height: 250px; position: relative; width: fit-content; margin: 0 auto; display: flex; justify-content: center; align-items: center; }
#mermaidChartOutput p { padding: 40px; color: var(--text-light); font-size: 1.05rem; width: 80%; text-align: center; }
#mermaidChartOutput .error-message { color: #d32f2f; font-weight: 500; background-color: #ffebee; border-radius: var(--border-radius); border: 1px solid #d32f2f; padding: 20px; width: auto; max-width: 90%; }
/* Mermaid SVG Specific Styles */
.mermaid svg { display: block; margin: 0 auto; max-width: none; height: auto; transform-origin: center center; transition: transform var(--transition-speed) ease-out; }
.mermaid .node { transition: transform 0.15s ease-out; cursor: pointer !important; } /* Added cursor */
.mermaid .node > rect, .mermaid .node > polygon, .mermaid .node > circle, .mermaid .node > ellipse { transition: stroke 0.2s ease, stroke-width 0.2s ease, transform 0.2s ease, filter 0.2s ease, fill 0.2s ease; }
.mermaid .node > * { fill: #f9f9f9; stroke: #bbb; stroke-width: 2px; }
.mermaid .edgePath .path { stroke: var(--text-light); stroke-width: 1.5px; fill: none; }
.mermaid .edgePath .path-dotted { stroke-dasharray: 5, 5 !important; }
.mermaid .edgePath .marker { fill: var(--text-light); stroke: none; }
.mermaid .edgeLabel text { fill: var(--text-light); font-size: 0.85rem; background: var(--card-color); padding: 1px 3px; }
.mermaid .cluster rect { fill: rgba(230, 230, 230, 0.2); stroke: #bbb; stroke-width: 1px; stroke-dasharray: 5 5; }
.mermaid .cluster text { fill: var(--text-light); font-weight: bold; }
.mermaid .node.dataFlow > * { fill:#e1f5fe !important; stroke:#0277bd !important; }
.mermaid .node.aiProcess > * { fill:#e8eaf6 !important; stroke:#3f51b5 !important; }
.mermaid .node.userInteraction > * { fill:#e8f5e9 !important; stroke:#2e7d32 !important; }
.mermaid .node.securityLayer > * { fill:#ffebee !important; stroke:#c62828 !important; }
.mermaid .node.outputNode > * { fill:#fff3e0 !important; stroke:#ef6c00 !important; }
.mermaid .node text { fill: var(--text-color); font-size: 0.9rem; font-weight: 500; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; } /* Prevent text selection */
.mermaid .node.dataFlow text, .mermaid .node.aiProcess text, .mermaid .node.userInteraction text, .mermaid .node.outputNode text { fill: #222; }
.mermaid .node.securityLayer text { fill: #333; }
.mermaid g.node:not(.highlighted-node):hover { transform: scale(1.03); }
.mermaid g.node:not(.highlighted-node):hover > * { stroke: var(--accent-color) !important; stroke-width: 3px !important; filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2)); }
.mermaid g.node.highlighted-node { transform: scale(1.05); }
.mermaid g.node.highlighted-node > * { stroke: var(--highlight-color) !important; stroke-width: 4px !important; filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3)); transform-origin: center center; }
/* Panning Styles */
.chart-container.pannable { cursor: grab; user-select: none; -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; }
.chart-container.pannable.panning { cursor: grabbing !important; }
.mermaid text { cursor: default; /* Override node cursor for text */ }

/* --- Sidebar (Keep for all pages) --- */
.sidebar {
    width: var(--sidebar-width); background-color: var(--card-color); box-shadow: -7px 0 20px rgba(0, 0, 0, 0.1);
    padding: 35px; overflow-y: auto; position: fixed;
    top: var(--header-height); right: calc(-1 * var(--sidebar-width)); bottom: 0;
    transition: right var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear var(--transition-speed);
    z-index: 1000; border-left: 1px solid var(--border-color); visibility: hidden;
    scrollbar-width: thin; scrollbar-color: var(--primary-light) var(--hover-color);
}
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-track { background: var(--hover-color); }
.sidebar::-webkit-scrollbar-thumb { background-color: var(--primary-light); border-radius: 10px; }
.sidebar.active { right: 0; visibility: visible; transition: right var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1), visibility 0s linear 0s; }
.sidebar-close { position: absolute; top: 15px; right: 15px; background: none; border: none; font-size: 1.8rem; cursor: pointer; color: var(--text-light); padding: 8px; line-height: 1; transition: color var(--transition-speed-fast) ease, transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
.sidebar-close:hover { color: var(--secondary-color); transform: rotate(90deg) scale(1.1); }
#componentInfoWrapper { opacity: 1; transform: translateY(0); transition: opacity 0.4s ease-out 0.1s, transform 0.4s ease-out 0.1s; min-height: 100px; }
#componentInfoWrapper.loading { opacity: 0; transform: translateY(15px); }
#componentInfo { padding-bottom: 20px; }
#componentInfo h2 { font-size: 1.5rem; margin-bottom: 30px; margin-top: 0; color: var(--primary-color); border-bottom: 2px solid var(--primary-color); padding-bottom: 12px; font-weight: 500; display: flex; align-items: center; gap: 12px; }
#componentInfo h2 i { font-size: 1.1em; color: var(--primary-color); }

/* --- Reusable Info Card Style (Used in sidebar & key concepts) --- */
.info-card { background-color: var(--card-color); border-radius: var(--border-radius); padding: 25px; margin-bottom: 25px; box-shadow: var(--shadow-light); border: 1px solid var(--border-color); border-left: 5px solid var(--primary-color); transition: box-shadow var(--transition-speed) ease, transform var(--transition-speed) ease, border-color var(--transition-speed) ease; word-wrap: break-word; }
.info-card:last-child { margin-bottom: 0; }
.info-card:hover { box-shadow: var(--shadow); transform: translateY(-4px); }
.info-card.key-concept-sidebar { border-left-color: var(--accent-color); background-color: #fffaf0; }
.info-card h3 { color: var(--primary-color); margin-top: 0; margin-bottom: 18px; font-size: 1.2rem; font-weight: 500; display: flex; align-items: center; gap: 12px; }
.info-card.key-concept-sidebar h3 { color: var(--accent-color); }
.info-card h3 i { font-size: 1.2em; color: inherit; width: 25px; text-align: center; flex-shrink: 0; }
.info-card p, .info-card li { margin-bottom: 15px; font-size: 0.98rem; color: var(--text-light); line-height: 1.75; }
.info-card p:last-child, .info-card li:last-child { margin-bottom: 0; }
.info-card strong { color: var(--text-color); font-weight: 500; }
.info-card ul { padding-left: 30px; margin-top: 12px; margin-bottom: 15px; list-style: none; }
.info-card ul li { position: relative; padding-left: 20px; }
.info-card ul li::before { content: '•'; position: absolute; left: 0; color: var(--primary-color); font-weight: bold; font-size: 1.2em; line-height: 1; top: 2px; }
.info-card.key-concept-sidebar ul li::before { color: var(--accent-color); }

/* --- Example Code Box --- */
.example-box { background-color: var(--card-color); padding: 2rem 3rem; border-radius: var(--border-radius); box-shadow: var(--shadow-light); transition: all var(--transition-speed) ease; border: 1px solid var(--border-color); border-left: 4px solid var(--primary-color); position: relative; overflow: hidden; margin: 1rem 0; }
.example-box code { font-family: inherit; background-color: rgba(0,0,0,0.06); padding: 0.2em 0.5em; border-radius: 4px; font-size: 0.95em; word-break: break-all; }
.example-box pre { margin: 0; white-space: pre-wrap; word-break: break-word; overflow-x: visible; }
.example-box pre code { display: block; background-color: transparent; padding: 0; border-radius: 0; font-size: 1em; line-height: inherit; white-space: pre-wrap; word-break: break-word; }

/* --- Key Concepts Section (Keep for index.html) --- */
.key-concepts-section { margin-top: 55px; padding: 40px; background-color: var(--card-color); border-radius: var(--border-radius-large); box-shadow: var(--shadow); border: 1px solid var(--border-color); opacity: 0; animation: fadeInSection 0.6s ease-out forwards 1.1s; }
h2.key-concepts-title { font-size: 1.75rem; margin-top: 0; margin-bottom: 35px; color: var(--primary-color); border-bottom: 3px solid var(--primary-color); padding-bottom: 15px; font-weight: 500; text-align: left; }
.key-concepts-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 30px; margin-top: 30px; }
.key-concepts-section .info-card { margin-bottom: 0; border-left-color: var(--accent-color); opacity: 0; transform: translateY(30px); transition: opacity 0.6s ease-out, transform 0.6s ease-out, box-shadow 0.3s ease, border-color 0.3s ease; }
.key-concepts-section .info-card.is-visible { opacity: 1; transform: translateY(0); }
.key-concepts-section .info-card h3 { color: var(--accent-color); }
.key-concepts-section .info-card ul li::before { color: var(--accent-color); }
.key-concepts-section .info-card:hover { border-left-color: var(--primary-color); }

/* --- Footer (Keep for all pages) --- */
.site-footer { background-color: #343a40; color: rgba(255, 255, 255, 0.7); padding: 30px 40px; margin-top: 60px; text-align: center; font-size: 0.9rem; }
.site-footer p { margin: 0 0 5px 0; }
.site-footer p:last-child { margin-bottom: 0; }
.site-footer a { color: var(--highlight-color); text-decoration: none; transition: color var(--transition-speed-fast); }
.site-footer a:hover { color: white; }

/* --- Overlay for Sidebar (Keep for all pages) --- */
.overlay {
    position: fixed;
    top: var(--header-height); left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.6); z-index: 999;
    opacity: 0; visibility: hidden;
    transition: opacity var(--transition-speed) ease, visibility 0s var(--transition-speed) linear;
}
.overlay.active { opacity: 1; visibility: visible; transition: opacity var(--transition-speed) ease, visibility 0s linear; }

/* --- Page Specific Styles (Example: FAQ) --- */
.faq-section details { background: var(--card-color); border-radius: var(--border-radius); margin-bottom: 15px; border: 1px solid var(--border-color); box-shadow: var(--shadow-light); transition: box-shadow var(--transition-speed-fast); }
.faq-section details:hover { box-shadow: 0 5px 15px rgba(0,0,0,0.08); }
.faq-section summary { padding: 20px 25px; font-weight: 500; font-size: 1.1rem; color: var(--primary-color); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; transition: background-color var(--transition-speed-fast); }
.faq-section summary::-webkit-details-marker { display: none; }
.faq-section summary:hover { background-color: var(--hover-color); }
.faq-section summary::after { content: '\f078'; font-family: 'Font Awesome 6 Free'; font-weight: 900; color: var(--primary-light); transition: transform var(--transition-speed-fast) ease-out; font-size: 0.9em; margin-left: 10px; flex-shrink: 0; }
.faq-section details[open] summary { border-bottom: 1px dashed var(--border-color); background-color: var(--hover-color); }
.faq-section details[open] summary::after { transform: rotate(180deg); }
.faq-section details .faq-answer { padding: 20px 25px 25px 25px; color: var(--text-light); line-height: 1.75; }
.faq-section details .faq-answer p:last-child { margin-bottom: 0; }
.faq-section details .faq-answer ul { list-style: disc; padding-left: 25px; margin-top: 10px; }
.faq-section details .faq-answer li { margin-bottom: 8px; }

/* --- Page Specific Styles (Example: Concepts) --- */
.content-card { background-color: var(--card-color); border-radius: var(--border-radius-large); padding: 30px; margin-bottom: 35px; box-shadow: var(--shadow); border: 1px solid var(--border-color); opacity: 0; transform: translateY(20px); transition: opacity 0.5s ease-out, transform 0.5s ease-out; }
.content-card.visible { opacity: 1; transform: translateY(0); }
.content-card h3 { color: var(--primary-color); margin-top: 0; margin-bottom: 20px; font-size: 1.4rem; border-bottom: 2px solid var(--primary-light); padding-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.content-card h3 i { color: var(--primary-color); font-size: 1.1em; flex-shrink: 0; }
.content-card p, .content-card li { color: var(--text-light); margin-bottom: 15px; line-height: 1.8; }
.content-card ul { list-style: none; padding-left: 0; margin-top: 10px; }
.content-card ul li { position: relative; padding-left: 25px; margin-bottom: 12px; }
.content-card ul li::before { content: '\f138'; font-family: 'Font Awesome 6 Free'; font-weight: 900; position: absolute; left: 0; top: 4px; color: var(--accent-color); font-size: 1em; }
.content-card strong { font-weight: 500; color: var(--text-color); }

/* --- Page Specific Styles (Example: Terminology) --- */
.terminology-list dt { font-weight: 600; font-size: 1.15rem; color: var(--primary-color); margin-top: 25px; margin-bottom: 8px; }
.terminology-list dd { margin-left: 20px; margin-bottom: 20px; color: var(--text-light); padding-left: 15px; border-left: 3px solid var(--accent-color); }
.terminology-list dd p:last-child { margin-bottom: 0; }

/* --- Estilos específicos para la página F.I.C.E. --- */
.fice-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 20px 0;
}

.fice-header {
    text-align: center;
    margin-bottom: 40px;
}

.fice-header h1 {
    color: var(--primary-color);
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.fice-header p {
    color: var(--text-light);
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

.fice-section {
    margin-bottom: 60px;
    padding: 30px;
    background-color: var(--card-color);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.fice-section h2 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--primary-light);
    display: flex;
    align-items: center;
    gap: 15px;
}

.fice-section h2 i {
    color: var(--primary-color);
}

.fice-section h3 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin: 30px 0 20px;
}

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

.fice-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 25px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    border-left: 5px solid var(--primary-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.fice-card h3 {
    color: var(--primary-color);
    font-size: 1.3rem;
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

.component-icon {
    width: 60px;
    height: 60px;
    background-color: var(--primary-light);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.component-content {
    color: var(--text-light);
}

.component-question {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 15px 0 5px;
    color: var(--text-color);
}

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

.benefits-list {
    list-style: none;
    padding: 0;
    margin: 30px 0;
}

.benefits-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 25px;
    padding: 20px;
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.benefits-list li:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
}

.benefits-list li i {
    font-size: 1.5rem;
    color: var(--primary-color);
    background-color: rgba(49, 166, 162, 0.1);
    padding: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.benefits-list li strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text-color);
    font-size: 1.1rem;
}

.examples-section {
    background-color: var(--hover-color);
}

/* Estilos para los botones de filtro */
.examples-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
    justify-content: center;
}

.filter-btn {
    padding: 10px 20px;
    background-color: rgba(255, 255, 255, 0.7);
    border: 2px solid var(--primary-color);
    border-radius: var(--border-radius);
    color: var(--primary-color);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    box-shadow: var(--shadow-light);
    position: relative;
    overflow: hidden;
}

.filter-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

.filter-btn:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow);
    background-color: rgba(255, 255, 255, 0.9);
}

.filter-btn:hover::before {
    width: 100%;
}

.filter-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.filter-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 166, 162, 0.3);
}

/* Estilos responsivos para los botones de filtro */
@media (max-width: 768px) {
    .examples-filter {
        gap: 8px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .examples-filter {
        flex-direction: column;
        width: 100%;
        max-width: 250px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .filter-btn {
        width: 100%;
        text-align: center;
    }
}

.example-card {
    background-color: var(--card-color);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

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

.example-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-color);
}

.example-card h4 {
    color: var(--primary-color);
    font-size: 1.2rem;
    margin: 0;
}

.copy-prompt-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background-color: var(--hover-color);
    color: var(--primary-color);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

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

.copy-prompt-btn.copied {
    background-color: #4CAF50;
    color: white;
}

@media (max-width: 480px) {
    .copy-prompt-btn span {
        display: none;
    }
    
    .copy-prompt-btn {
        padding: 6px;
    }
}

.example-card .component {
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 3px solid var(--primary-light);
}

.example-card .component strong {
    display: block;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.example-card .component p {
    color: var(--text-light);
    margin: 0;
}

.download-section {
    text-align: center;
    margin: 60px 0;
    padding: 40px;
    background-color: var(--hover-color);
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow-light);
}

.download-section h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.download-section p {
    color: var(--text-light);
    max-width: 800px;
    margin: 0 auto 30px;
}

.download-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 25px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-light);
}

.download-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.download-btn i {
    font-size: 1.2rem;
}

.course-cta {
    text-align: center;
    margin: 60px 0;
    padding: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    color: white;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow);
}

.course-cta h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: white;
}

.course-cta p {
    max-width: 800px;
    margin: 0 auto 30px;
    font-size: 1.1rem;
}

/* Estilos para la sección CTA de Técnica F.I.C.E. */
.fice-cta-container {
    max-width: 900px;
    margin: 0 auto;
}

.fice-acronym-mini {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.fice-letter-mini {
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    padding: 15px;
    min-width: 100px;
    text-align: center;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.fice-letter-mini:hover {
    transform: translateY(-5px);
    background-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

.fice-letter-mini span {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    display: block;
    margin-bottom: 5px;
}

.fice-letter-mini p {
    margin: 0;
    color: white;
    font-size: 0.9rem;
    font-weight: 500;
}

@media (max-width: 768px) {
    .fice-acronym-mini {
        gap: 10px;
    }
    
    .fice-letter-mini {
        min-width: 80px;
        padding: 10px;
    }
    
    .fice-letter-mini span {
        font-size: 1.5rem;
    }
    
    .fice-letter-mini p {
        font-size: 0.8rem;
    }
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    background-color: var(--accent-color);
    color: white;
    text-decoration: none;
    border-radius: var(--border-radius);
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.cta-button:hover {
    background-color: var(--highlight-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.secondary-hero-section {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 60px 30px;
    text-align: center;
    margin: 30px -40px 50px -40px;
    border-radius: var(--border-radius-large);
    box-shadow: var(--shadow);
    position: relative;
    z-index: 1;
}

/* Media queries para la sección secondary-hero-section */
@media (max-width: 768px) {
    .secondary-hero-section {
        margin: 20px -20px 40px -20px;
        padding: 40px 20px;
    }
    
    .secondary-hero-content h1 {
        font-size: 1.8rem;
    }
    
    .secondary-hero-content p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .secondary-hero-section {
        margin: 15px -15px 30px -15px;
        padding: 30px 15px;
    }
    
    .secondary-hero-content h1 {
        font-size: 1.5rem;
    }
}

.secondary-hero-content {
    max-width: 900px;
    margin: 0 auto;
}

.secondary-hero-content h1 {
    font-size: 2.2rem;
    margin-bottom: 20px;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.secondary-hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    color: rgba(255, 255, 255, 0.9);
}

.secondary-cta-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
}

.secondary-cta-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 15px 30px;
    border-radius: var(--border-radius);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.secondary-cta-primary {
    background-color: var(--accent-color);
    color: white;
}

.secondary-cta-primary:hover {
    background-color: var(--highlight-color);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.secondary-cta-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

.secondary-cta-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

/* Estilos mejorados para la sección F.I.C.E. hero */
.fice-hero-badge {
    display: inline-block;
    background-color: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    padding: 8px 20px;
    margin-bottom: 20px;
    backdrop-filter: blur(5px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.fice-hero-badge span {
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.fice-benefits-container {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.fice-benefit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    transition: all 0.3s ease;
}

.fice-benefit-item:hover {
    transform: translateY(-5px);
}

.benefit-icon {
    width: 60px;
    height: 60px;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 5px;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fice-benefit-item:hover .benefit-icon {
    background-color: var(--accent-color);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.benefit-icon i {
    font-size: 1.5rem;
    color: white;
}

.fice-benefit-item span {
    font-weight: 500;
    font-size: 1rem;
}

.fice-hero-decoration {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: -1;
    opacity: 0.6;
}

.decoration-circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    animation: float 8s infinite ease-in-out;
}

.circle-1 {
    width: 300px;
    height: 300px;
    top: -100px;
    right: 10%;
    animation-delay: 0s;
}

.circle-2 {
    width: 200px;
    height: 200px;
    bottom: -50px;
    left: 15%;
    animation-delay: 2s;
}

.circle-3 {
    width: 150px;
    height: 150px;
    top: 40%;
    right: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0% { transform: translateY(0) translateX(0); }
    50% { transform: translateY(-20px) translateX(10px); }
    100% { transform: translateY(0) translateX(0); }
}

/* Estilos para el contenedor del acrónimo F.I.C.E. */
.fice-acronym-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin: 30px 0;
    flex-wrap: wrap;
}

.fice-letter {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 15px;
    width: 100px;
    height: 100px;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.fice-letter:hover {
    transform: translateY(-8px) scale(1.05);
    background-color: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.4);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.fice-letter span {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.fice-letter p {
    font-size: 0.9rem;
    margin: 0;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* Estilos responsivos para el acrónimo */
@media (max-width: 768px) {
    .fice-letter {
        width: 80px;
        height: 80px;
        padding: 10px;
    }
    
    .fice-letter span {
        font-size: 2rem;
    }
    
    .fice-letter p {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .fice-acronym-container {
        gap: 10px;
    }
    
    .fice-letter {
        width: 70px;
        height: 70px;
        padding: 8px;
    }
    
    .fice-letter span {
        font-size: 1.8rem;
    }
    
    .fice-letter p {
        font-size: 0.7rem;
    }
}

/* --- Accessibility Helper --- */
.visually-hidden { position: absolute !important; width: 1px !important; height: 1px !important; margin: -1px !important; padding: 0 !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; border: 0 !important; white-space: nowrap !important; }

/* --- Responsive Design Adjustments --- */
@media (max-width: 1200px) {
    :root { --sidebar-width: 380px; }
    .page-container { padding: 25px 30px; }
    .key-concepts-grid { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 25px; }
    /* Adjust advanced systems grids */
    .overview-grid, .specs-grid, .special-grid, .case-studies-grid, .phase-components {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    .hero h2 { font-size: 2.2rem; }
    .hero p { font-size: 1.1rem; }
}

@media (max-width: 1024px) {
    .main-content.sidebar-active { margin-right: 0; }
    .sidebar { width: 360px; right: -360px; box-shadow: -5px 0 15px rgba(0, 0, 0, 0.15); }
    .sidebar.active { right: 0; }
    .page-title { font-size: 2rem; }
    .overview-section h2, .tech-specs-section h2, .phases-section h2, .case-studies h2, .special-components h2 { font-size: 1.7rem; } /* Adjust section titles */
    #componentInfo h2 { font-size: 1.5rem; }
    .main-content { padding: 25px 30px; }
    .site-header { padding: 10px 30px; min-height: auto; --header-height: 55px; } /* Adjust header height */
    .container, .page-container { margin-top: 55px; } /* Match header height */
}

@media (max-width: 768px) {
    html { font-size: 15px; }
    .page-container, .main-content { padding: 20px 20px; }
    .site-header { padding: 10px 20px; }
    .header-content { flex-wrap: wrap; justify-content: space-between; }
    .logo a { font-size: 1.4rem; }
    .nav-toggle { display: block; } /* Show toggle */
    .main-nav {
        display: none; /* Hide nav by default */
        position: absolute; /* Position it below header */
        top: var(--header-height); /* Position below header */
        left: 0;
        right: 0;
        width: 100%;
        /*color de menu mobile*/
        background-color: rgba(24, 168, 147, 0.98); /* Slightly transparent */
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        z-index: 1099; /* Below header but above content */
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    .main-nav.active { display: block; } /* Show when active */
    .main-nav ul { flex-direction: column; gap: 0; padding: 5px 0; }
    .main-nav a { display: block; padding: 12px 20px; border-bottom: 1px solid rgba(255, 255, 255, 0.1); text-align: left; color: rgba(255, 255, 255, 0.9); }
    .main-nav ul li:last-child a { border-bottom: none; }
    .main-nav a::after { display: none; } /* Hide underline effect */
    .main-nav a:hover, .main-nav a.active { background-color: rgba(255, 255, 255, 0.1); color: white; }

    /* Adjust grids for single column */
    .overview-grid, .specs-grid, .case-studies-grid, .special-grid, .key-concepts-grid, .phase-components {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    /* Adjust padding/margins for smaller screens */
    .hero { padding: 3rem 0; margin: -20px -20px 2rem -20px; }
    .hero h1, .hero h2 { font-size: 1.8rem; }
    .hero p { font-size: 1rem; padding: 0 1rem; }

    .overview-section, .tech-specs-section, .phases-section, .case-studies, .special-components { padding: 2rem 0; }
    .overview-card, .specs-card, .case-study-card, .special-card, .info-card { padding: 1.5rem; }
    .overview-card h3, .specs-card h3, .case-study-card h3, .special-card h3 { font-size: 1.2rem; }

    .phase { margin-bottom: 2rem; }
    .phase > h3 { font-size: 1.3rem; padding: 1rem 1.5rem; }
    .phase > p { padding: 0 1.5rem 1rem 1.5rem; font-size: 1rem;}
    .phase-component { padding: 1rem 1.5rem 1.5rem 1.5rem; }
    .phase-component h4 { font-size: 1.1rem; }
    .phase-component p { font-size: 0.9rem; }

    .faq-section summary { padding: 15px 20px; font-size: 1rem; }
    .faq-section details .faq-answer { padding: 15px 20px 20px 20px; }

    .content-card { padding: 20px; }
    .content-card h3 { font-size: 1.25rem; }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    :root { --header-height: 50px; } /* Further reduce header height */
    .container, .page-container { margin-top: 50px; padding: 15px 15px; }
    .site-header { padding: 8px 15px; }
    .logo a { font-size: 1.3rem; }
    .page-title { font-size: 1.6rem; }
    .overview-section h2, .tech-specs-section h2, .phases-section h2, .case-studies h2, .special-components h2 { font-size: 1.5rem; } /* Adjust section titles */
    .introduction { padding: 15px; font-size: 0.95rem;}
    .controls button { padding: 9px 12px; font-size: 0.85rem; gap: 6px;}
    .chart-container { padding: 20px; }
    .key-concepts-section { padding: 20px; }
    .info-card { padding: 15px; }
    .info-card h3 { font-size: 1.05rem; }
    .example-box { padding: 12px; }
    .content-card { padding: 20px; }
    .content-card h3 { font-size: 1.2rem; }
    .terminology-list dt { font-size: 1.1rem;}
}