/* ===== ESTILOS MODERNOS PARA IDEMA ===== */

/* Variables CSS modernas */
:root {
  --primary-color: #0dcaf0;
  --secondary-color: #6c757d;
  --accent-color: #fd3db5;
  --dark-color: #212529;
  --light-color: #f8f9fa;
  --gradient-primary: linear-gradient(135deg, #0dcaf0 0%, #0099cc 100%);
  --gradient-secondary: linear-gradient(135deg, #fd3db5 0%, #e91e63 100%);
  --shadow-light: 0 2px 20px rgba(0, 0, 0, 0.1);
  --shadow-medium: 0 4px 30px rgba(0, 0, 0, 0.15);
  --shadow-heavy: 0 8px 40px rgba(0, 0, 0, 0.2);
  --border-radius: 12px;
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Reset y configuración base */
* {
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--dark-color);
  background: #fff !important;
  overflow-x: hidden;
  margin: 0;
  padding: 0;
}

/* Hero Section modernizado */
.masthead {
  position: relative;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

#particles-js {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background: linear-gradient(135deg, #000428, #004e92);
}

.masthead::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 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>');
  opacity: 0.3;
  animation: float 20s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(180deg); }
}

.masthead .container {
  position: relative;
  z-index: 1;
  text-align: center;
  color: white;
}

.masthead .jumbotron {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  border-radius: var(--border-radius);
  padding: 3rem;
  margin-bottom: 2rem;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow: var(--shadow-medium);
  max-width: 600px;
  width: 100%;
  margin: 0 auto 2rem auto;
  box-sizing: border-box;
}

.masthead .lead {
  font-size: 1.5rem;
  font-weight: 300;
  margin-bottom: 1rem;
  opacity: 0.9;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: white !important;
}

.masthead .display-5 {
  font-size: 3.5rem;
  font-weight: 700;
  margin-bottom: 2rem;
  color: white !important;
  line-height: 1.2;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

/* Botones modernos */
.btn-container {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  padding: 1rem 2rem;
  border-radius: 50px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: var(--transition);
  border: none;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-light);
}

.btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
  transition: left 0.5s;
}

.btn:hover::before {
  left: 100%;
}

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

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
  color: white;
}

.btn-info {
  background: rgba(255, 255, 255, 0.2);
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-info:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: translateY(-3px);
  box-shadow: var(--shadow-medium);
  color: white;
}

/* Indicador de scroll en la parte izquierda */
.scroll-hint {
  position: fixed;
  left: 20px;
  bottom: 30px;
  z-index: 1000;
  color: #ffffff;
  font-size: 0.9rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  animation: gentlePulse 3s ease-in-out infinite;
  cursor: pointer;
  transition: all 0.3s ease;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
  background: rgba(255, 255, 255, 0.1);
  padding: 12px 6px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  backdrop-filter: blur(3px);
  opacity: 0;
  animation-delay: 2s;
  animation-fill-mode: forwards;
}

.scroll-hint:hover {
  color: #ffffff;
  transform: translateY(-5px);
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.6);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.scroll-hint::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  width: 2px;
  height: 35px;
  background: rgba(255, 255, 255, 0.6);
  margin-top: 12px;
  border-radius: 1px;
}

@keyframes gentlePulse {
  0%, 100% { 
    opacity: 0.8; 
    transform: scale(1);
  }
  50% { 
    opacity: 1; 
    transform: scale(1.02);
  }
}

/* Ocultar cuando no esté en el masthead */
.scroll-hint.hidden {
  opacity: 0 !important;
  pointer-events: none;
}

/* Ocultar en móviles */
@media (max-width: 768px) {
  .scroll-hint {
    display: none;
  }
}

/* Secciones mejoradas */
.page-section {
  padding: 5rem 0;
  position: relative;
}

.page-section.bg-light {
  background: transparent !important;
}

.section-heading {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark-color) !important;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.section-subheading {
  font-size: 1.2rem;
  color: var(--secondary-color) !important;
  margin-bottom: 3rem;
  font-weight: 300;
}

/* Cards modernas para servicios */
.service-card {
  background: white;
  border-radius: var(--border-radius);
  padding: 2.5rem 2rem;
  text-align: center;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  border: 1px solid rgba(0, 0, 0, 0.05);
  height: 100%;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-heavy);
}

.service-card .fa-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  margin: -1.5rem auto 1.5rem auto;
  position: relative;
}
.service-card .fa-stack-2x {
  font-size: 5rem;
  position: static;
  left: auto;
  top: auto;
  transform: none;
  z-index: 1;
}
.service-card .fa-stack-1x {
  font-size: 2.2rem;
  position: absolute;
  z-index: 2;
}

.service-card h4 {
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--dark-color) !important;
  position: relative;
  z-index: 1;
}

.service-card p {
  color: var(--secondary-color) !important;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

/* Portfolio items mejorados */
.portfolio-item {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--shadow-light);
  transition: var(--transition);
  background: white;
}

.portfolio-item:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-heavy);
}

.portfolio-item img {
  transition: var(--transition);
}

.portfolio-item:hover img {
  transform: scale(1.05);
}

.portfolio-hover {
  background: linear-gradient(135deg, rgba(13, 202, 240, 0.9), rgba(253, 61, 181, 0.9));
  opacity: 0;
  transition: var(--transition);
}

.portfolio-item:hover .portfolio-hover {
  opacity: 1;
}

.portfolio-caption {
  padding: 1.5rem;
  background: white;
}

.portfolio-caption-heading {
  font-weight: 600;
  color: var(--dark-color) !important;
  margin-bottom: 0.5rem;
}

/* Info block modernizado */
.info-block {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  padding: 3rem;
  margin: 2rem auto;
  max-width: 800px;
  border: 1px solid rgba(0, 0, 0, 0.05);
}

.info-header h2 {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--dark-color) !important;
  margin-bottom: 1rem;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.info-content {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.info-item {
  display: flex;
  align-items: center;
  padding: 1rem;
  background: rgba(13, 202, 240, 0.05);
  border-radius: var(--border-radius);
  transition: var(--transition);
}

.info-item:hover {
  background: rgba(13, 202, 240, 0.1);
  transform: translateX(5px);
}

.info-item .icon {
  font-size: 2rem;
  margin-right: 1rem;
  color: var(--primary-color);
}

.info-item p {
  color: var(--dark-color) !important;
  font-weight: 500;
}

/* Navbar modernizado */
#mainNav {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-light);
  transition: var(--transition);
}

#mainNav.navbar-shrink {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: var(--shadow-medium);
}

#mainNav .navbar-brand img {
  height: 50px;
  transition: var(--transition);
}

#mainNav.navbar-shrink .navbar-brand img {
  height: 40px;
}

#mainNav .nav-link {
  font-weight: 500;
  color: var(--dark-color) !important;
  transition: var(--transition);
  position: relative;
}

#mainNav .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: var(--transition);
  transform: translateX(-50%);
}

#mainNav .nav-link:hover::after,
#mainNav .nav-link.active::after {
  width: 100%;
}

/* Animaciones */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(50px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive improvements */
@media (max-width: 768px) {
  .masthead .display-5 {
    font-size: 2.5rem;
  }
  
  .masthead .jumbotron {
    max-width: 95vw;
    padding: 1.5rem;
  }
  
  .btn-container {
    flex-direction: column;
    align-items: center;
  }
  
  .btn {
    width: 100%;
    max-width: 300px;
  }
  
  .info-content {
    grid-template-columns: 1fr;
  }
  
  .section-heading {
    font-size: 2rem;
  }
  
  .typing-animation {
    font-size: 2rem;
  }
}

@media (max-width: 576px) {
  .masthead .display-5 {
    font-size: 2rem;
  }
  
  .masthead .lead {
    font-size: 1.2rem;
  }
  
  .info-block {
    padding: 2rem;
    margin: 1rem;
  }
  
  .masthead .jumbotron {
    max-width: 99vw;
    padding: 1rem;
  }
  
  .typing-animation {
    font-size: 1.2rem;
  }
}

/* Efectos de scroll suave */
html {
  scroll-behavior: smooth;
}

/* Mejoras para el footer */
.footer-main {
  background: #181a1b;
  color: #f5f6fa;
  padding: 3rem 0 1.5rem 0;
  border-radius: 1.5em 1.5em 0 0;
  box-shadow: 0 -2px 24px rgba(0,0,0,0.18);
}
.footer-title {
  color: #fff;
  font-size: 1.3rem;
  font-weight: 800;
  margin-bottom: 1.2rem;
  letter-spacing: 1px;
  text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.footer-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}
.footer-list li {
  margin-bottom: 0.7em;
}
.footer-list a {
  color: #f5f6fa;
  text-decoration: none;
  transition: color 0.2s;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.footer-list a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}
.footer-section {
  margin-bottom: 2rem;
  border-right: 1px solid rgba(255,255,255,0.08);
  padding-right: 1.5rem;
}
.footer-section:last-child {
  border-right: none;
  padding-right: 0;
}
.footer-main img {
  max-height: 60px;
  margin-bottom: 1rem;
}
.copyright {
  color: #e0e0e0;
  font-size: 1rem;
  margin-top: 1.5rem;
  letter-spacing: 1px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.18);
}
@media (max-width: 768px) {
  .footer-main {
    text-align: center;
    padding: 2rem 0 1rem 0;
  }
  .footer-section {
    margin-bottom: 1.5rem;
    border-right: none;
    padding-right: 0;
  }
}

/* WhatsApp button modernizado */
.whatsapp-btn {
  position: fixed;
  bottom: 32px;
  right: 32px;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 999;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  box-shadow: 0 4px 16px rgba(0,0,0,0.18);
  cursor: pointer;
  border: none;
  transition: transform 0.2s, box-shadow 0.2s;
  color: #fff !important;
  font-size: 2.2rem;
}
.whatsapp-btn i {
  color: #fff !important;
  font-size: 2.4rem;
  line-height: 1;
}
.whatsapp-btn:hover {
  transform: scale(1.12);
  box-shadow: 0 8px 24px rgba(0,0,0,0.28);
}
@media (max-width: 600px) {
  .whatsapp-btn {
    width: 56px;
    height: 56px;
    bottom: 18px;
    right: 18px;
    font-size: 1.7rem;
  }
  .whatsapp-btn i {
    font-size: 2rem;
  }
}

/* Loading animation */
.loading {
  opacity: 0;
  transform: translateY(20px);
  transition: var(--transition);
}

.loading.loaded {
  opacity: 1;
  transform: translateY(0);
}

/* Smooth reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: var(--transition);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Asegurar que los textos tengan buen contraste */
.text-muted {
  color: #6c757d !important;
}

.text-black {
  color: #000 !important;
}

/* Mejorar visibilidad de títulos en secciones */
.page-section h2,
.page-section h3,
.page-section h4 {
  color: var(--dark-color) !important;
}

/* Asegurar que el texto del hero sea visible */
.masthead h1,
.masthead h2,
.masthead h3,
.masthead p {
  color: white !important;
}

/* Efectos de hover para cards */
.card-hover {
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

.card-hover::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(13, 202, 240, 0.1), rgba(253, 61, 181, 0.1));
  opacity: 0;
  transition: opacity 0.3s ease;
  border-radius: inherit;
  z-index: -1;
}

.card-hover:hover::before {
  opacity: 1;
}

.card-hover:hover {
  transform: translateY(-8px) scale(1.02);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* --- HERO TYPING ANIMATION RESPONSIVE FIX --- */
.typing-animation {
  display: block;
  max-width: 100%;
  white-space: normal !important;
  overflow-wrap: break-word;
  word-break: break-word;
  text-align: center;
}

/* --- HERO FLEX LAYOUT & NOTICIA DESTACADA --- */
.masthead-flex {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2.5rem;
  min-height: 70vh;
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 4rem;
  padding-bottom: 2rem;
}
.masthead-left {
  flex: 1 1 350px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}
.masthead-right {
  flex: 1 1 350px;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.highlight-news {
  background: rgba(255,255,255,0.95);
  border-radius: 1.2em;
  box-shadow: 0 4px 24px rgba(0,0,0,0.13);
  padding: 2rem 1.5rem 1.5rem 1.5rem;
  max-width: 350px;
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: fadeInUp 1s;
}
.highlight-title, .highlight-news .highlight-title {
  color: #000 !important;
}
.highlight-close-btn {
  position: absolute;
  top: 0.5em;
  right: 0.7em;
  background: transparent;
  border: none;
  font-size: 1.5em;
  color: #004e92;
  cursor: pointer;
  z-index: 2;
}
.highlight-content a.btn {
  margin-top: 0.7em;
  font-size: 1em;
  padding: 0.5em 1.2em;
}
@media (max-width: 992px) {
  .masthead-flex {
    flex-direction: column;
    align-items: stretch;
    gap: 2rem;
    padding-top: 2rem;
  }
  .masthead-left, .masthead-right {
    align-items: center;
    justify-content: center;
  }
  .highlight-news {
    margin: 0 auto;
  }
}
@media (max-width: 600px) {
  .masthead-flex {
    padding-top: 1rem;
    gap: 1.2rem;
  }
  .highlight-news {
    padding: 1.2rem 0.7rem 1rem 0.7rem;
    max-width: 98vw;
  }
}

/* --- NEWS SECTION: fondo blanco y títulos oscuros --- */
#news.page-section.bg-light {
  background: #fff !important;
}

/* --- RESPONSIVIDAD MASTHEAD Y NOTICIA DESTACADA --- */
@media (max-width: 600px) {
  .masthead-flex {
    flex-direction: column;
    align-items: stretch;
    gap: 1.2rem;
    padding-top: 1rem;
  }
  .masthead-left, .masthead-right {
    align-items: center;
    justify-content: center;
    width: 100%;
  }
  .highlight-news {
    position: fixed;
    left: 50%;
    bottom: 2.5rem;
    transform: translateX(-50%);
    z-index: 9999;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    max-width: 95vw;
    width: 95vw;
    padding: 1.2rem 0.7rem 1rem 0.7rem;
    animation: fadeInUp 0.7s;
    border: 2px solid #004e92;
  }
  .highlight-close-btn {
    display: block !important;
  }
}
@media (min-width: 601px) {
  .highlight-news {
    position: static;
    left: auto;
    bottom: auto;
    transform: none;
    z-index: auto;
    box-shadow: 0 4px 24px rgba(0,0,0,0.13);
    max-width: 350px;
    width: 100%;
    border: none;
  }
  .highlight-close-btn {
    display: none !important;
  }
}

.arbol-habilidades-img-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 1rem;
  margin-bottom: 1rem;
}
.arbol-habilidades-img {
  max-width: 400px;
  width: 100%;
  height: auto;
  border-radius: 1.2em;
  box-shadow: 0 4px 24px rgba(0,0,0,0.10);
  transition: transform 0.2s;
}
.arbol-habilidades-img:hover {
  transform: scale(1.03) rotate(-1deg);
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
@media (max-width: 600px) {
  .arbol-habilidades-img {
    max-width: 95vw;
  }
}

/* ===== FORMULARIO DE CONTACTO MODERNO ===== */
#contact .container {
  background: #fff;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-medium);
  padding: 2.5rem 2rem 2rem 2rem;
  max-width: 700px;
  margin: 0 auto 3rem auto;
}
#contact .section-heading {
  color: var(--primary-color) !important;
  font-size: 2.2rem;
  font-weight: 700;
  margin-bottom: 0.5em;
}
#contact .section-subheading {
  color: var(--secondary-color) !important;
  font-size: 1.1rem;
  margin-bottom: 2em;
}
#contact .form-control {
  border-radius: 2em;
  border: 1.5px solid #e0e0e0;
  padding: 1rem 1.5rem;
  font-size: 1.1rem;
  background: #f8f9fa;
  box-shadow: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#contact .form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(13,202,240,0.15);
  background: #fff;
}
#contact .form-group {
  margin-bottom: 1.5rem;
}
#contact .btn-primary {
  padding: 0.9rem 2.5rem;
  font-size: 1.1rem;
  border-radius: 2em;
  font-weight: 700;
  letter-spacing: 1px;
  box-shadow: var(--shadow-light);
}
#contact .btn-primary:hover {
  background: var(--gradient-primary);
  color: #fff;
  transform: translateY(-2px) scale(1.03);
  box-shadow: var(--shadow-medium);
}
@media (max-width: 600px) {
  #contact .container {
    padding: 1.2rem 0.5rem;
  }
}

/* ===== FOOTER MODERNO ===== */
.footer-main {
  background: linear-gradient(135deg, #232526 0%, #414345 100%);
  color: #fff;
  padding: 3rem 0 1.5rem 0;
  border-radius: 1.5em 1.5em 0 0;
  box-shadow: 0 -2px 24px rgba(0,0,0,0.10);
}
.footer-title {
  color: var(--primary-color);
  font-size: 1.2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  letter-spacing: 1px;
}
.footer-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1.5rem 0;
}
.footer-list li {
  margin-bottom: 0.7em;
}
.footer-list a {
  color: #e0e0e0;
  text-decoration: none;
  transition: color 0.2s;
  font-size: 1rem;
}
.footer-list a:hover {
  color: var(--primary-color);
  text-decoration: underline;
}
.footer-section {
  margin-bottom: 2rem;
}
.footer-main img {
  max-height: 60px;
  margin-bottom: 1rem;
}
.copyright {
  color: #bbb;
  font-size: 0.95rem;
  margin-top: 1.5rem;
  letter-spacing: 1px;
}
@media (max-width: 768px) {
  .footer-main {
    text-align: center;
    padding: 2rem 0 1rem 0;
  }
  .footer-section {
    margin-bottom: 1.5rem;
  }
}

/* ===== ESTILOS MODERNOS PARA ÁRBOL DE HABILIDADES (idema-educa) ===== */
body.arbol-habilidades {
  display: flex;
  background: var(--light-color);
  min-height: 100vh;
}
.sidebar {
  background: linear-gradient(135deg, #232526 0%, #414345 100%);
  color: #fff;
  padding: 2.5rem 1.5rem;
  width: 260px;
  min-width: 220px;
  height: 100vh;
  box-sizing: border-box;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  border-radius: 0 2em 2em 0;
  box-shadow: 2px 0 24px rgba(0,0,0,0.08);
}
.sidebar button {
  background: var(--primary-color);
  border: none;
  color: #fff;
  padding: 0.7rem 1.2rem;
  margin: 0.5rem 0;
  width: 100%;
  cursor: pointer;
  border-radius: 2em;
  font-weight: 700;
  font-size: 1rem;
  letter-spacing: 1px;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  box-shadow: var(--shadow-light);
}
.sidebar button:hover {
  background: var(--accent-color);
  color: #fff;
  box-shadow: var(--shadow-medium);
}
.sidebar button.morado { background: #8A2BE2; }
.sidebar button.morado:hover { background: #6d1bbd; }
.sidebar button.azul { background: #2196f3; }
.sidebar button.azul:hover { background: #1976d2; }
.sidebar button.verde { background: #4caf50; }
.sidebar button.verde:hover { background: #388e3c; }

.tree-container {
  flex-grow: 1;
  padding: 2.5rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-content: flex-start;
  justify-content: flex-start;
  background: var(--light-color);
}
.node {
  background: #fff;
  color: var(--dark-color);
  border-radius: 1.2em;
  padding: 1.2rem 1.2rem 1.2rem 1.2rem;
  width: 260px;
  min-height: 130px;
  box-shadow: var(--shadow-light);
  position: relative;
  transition: var(--transition);
  cursor: pointer;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  border: 2px solid #e0e0e0;
}
.node:hover {
  transform: translateY(-6px) scale(1.03);
  box-shadow: var(--shadow-medium);
  border-color: var(--primary-color);
  z-index: 2;
}
.node h4 {
  margin: 0 0 0.7rem 0;
  font-size: 1.1rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary-color);
  letter-spacing: 1px;
}
.tags {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}
.tag {
  background: var(--primary-color);
  color: #fff;
  font-size: 0.8rem;
  padding: 0.25rem 0.7rem;
  border-radius: 1em;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 1px 4px rgba(13,202,240,0.08);
}
.tag.agropecuarias { background: #4caf50; }
.tag.salud { background: #2196f3; }
.tag.empresariales { background: #8A2BE2; }
.descripcion {
  font-size: 0.97rem;
  color: var(--dark-color);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  transition: opacity 0.3s, max-height 0.3s;
  margin-top: 0.5rem;
}
.node:hover .descripcion {
  opacity: 1;
  max-height: 200px;
}
/* Modal moderno */
.modal {
  position: fixed;
  top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}
.modal-content {
  background: #fff;
  padding: 2.2rem 1.5rem;
  border-radius: 1.2em;
  width: 95vw;
  max-width: 500px;
  box-shadow: var(--shadow-heavy);
  position: relative;
  animation: fadeInUp 0.5s;
  margin: 0 auto;
  left: unset;
  transform: none;
  max-height: 90vh;
  overflow-y: auto;
}
.modal-content h2 {
  margin-top: 0;
  color: var(--primary-color);
  font-size: 1.5rem;
  font-weight: 700;
}
.close-btn {
  position: absolute;
  top: 10px;
  right: 15px;
  background: none;
  border: none;
  font-size: 1.7rem;
  cursor: pointer;
  color: var(--accent-color);
  transition: color 0.2s;
}
.close-btn:hover {
  color: var(--primary-color);
}
.filtro-container {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 0.7rem;
  padding: 1rem 2rem 0;
  width: 100%;
  color: var(--dark-color);
}
.filtro-container select {
  padding: 0.7rem 1.2rem;
  border-radius: 1em;
  border: 1.5px solid #e0e0e0;
  font-weight: 600;
  background: #f8f9fa;
  color: var(--dark-color);
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(0,0,0,0.07);
  transition: background 0.2s, border 0.2s;
}
.filtro-container select:focus {
  border-color: var(--primary-color);
  background: #fff;
}
@media (max-width: 900px) {
  body.arbol-habilidades {
    flex-direction: column;
  }
  .sidebar {
    width: 100%;
    min-width: unset;
    height: auto;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border-radius: 0 0 2em 2em;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 24px rgba(0,0,0,0.08);
  }
  .tree-container {
    padding: 1.2rem 0.5rem;
    justify-content: center;
  }
}
@media (max-width: 600px) {
  .node {
    width: 100%;
    min-width: unset;
    max-width: 350px;
  }
  .sidebar button {
    max-width: 90vw;
  }
  .modal-content {
    max-width: 98vw;
    max-height: 95vh;
    padding: 1.2rem 0.5rem;
  }
}

/* Mejora de legibilidad para el título en el sidebar de idema-educa */
.sidebar .section-heading {
  color: #fff !important;
  font-size: 1.4rem;
  font-weight: 900;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  letter-spacing: 1px;
  margin-bottom: 1.2rem;
}

.filtro-label {
  color: #fff !important;
  font-weight: 700;
  font-size: 1.05rem;
  text-shadow: 0 2px 8px rgba(0,0,0,0.25);
  letter-spacing: 0.5px;
  margin-bottom: 0.2em;
  display: block;
}

/* Estilos para el menú desplegable de herramientas */
.dropdown-menu {
    border: none;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    border-radius: 10px;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    color: #333;
    transition: all 0.3s ease;
    border-radius: 0;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #0dcaf0;
    transform: translateX(5px);
}

.dropdown-item i {
    width: 20px;
    text-align: center;
}

.dropdown-divider {
    margin: 0.5rem 0;
    border-color: #e9ecef;
}

/* Animación del menú desplegable */
.dropdown-menu.show {
    animation: slideDown 0.3s ease;
}

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

/* Responsive para el menú desplegable */
@media (max-width: 991.98px) {
    .dropdown-menu {
        border: none;
        box-shadow: none;
        background-color: transparent;
        padding: 0;
        margin: 0;
        position: static !important;
        transform: none !important;
        width: 100%;
        min-width: unset;
        max-width: none;
    }
    
    .dropdown-item {
        color: var(--dark-color);
        padding: 0.5rem 1rem;
        border-radius: 0;
        margin: 0;
        font-size: 0.9rem;
    }
    
    .dropdown-item:hover {
        background-color: rgba(13, 202, 240, 0.05);
        color: var(--primary-color);
        transform: none;
    }
    
    .dropdown-divider {
        border-color: rgba(0,0,0,0.1);
        margin: 0.25rem 0;
    }

    /* Estilos específicos para el navbar colapsado */
    .navbar-collapse {
        background-color: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        border-radius: 0 0 10px 10px;
        margin-top: 0.5rem;
        padding: 1rem 0;
        box-shadow: var(--shadow-light);
    }

    .navbar-nav {
        padding: 0 1rem;
    }

    .nav-item {
        margin-bottom: 0.5rem;
    }

    .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(0,0,0,0.1);
        color: var(--dark-color) !important;
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .nav-link:hover {
        color: var(--primary-color) !important;
    }

    /* Estilos para el dropdown en móvil */
    .dropdown-toggle::after {
        float: right;
        margin-top: 0.5rem;
    }

    .dropdown-menu.show {
        display: block !important;
        animation: none;
    }

    /* Asegurar que el dropdown se muestre correctamente */
    .navbar-nav .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
        background-color: transparent;
        border: none;
        box-shadow: none;
    }
}

/* Estilos adicionales para pantallas muy pequeñas */
@media (max-width: 576px) {
  .navbar-collapse {
    margin-top: 0.25rem;
    padding: 0.5rem 0;
  }

  .navbar-nav {
    padding: 0 0.5rem;
  }

  .nav-link {
    padding: 0.5rem 0;
    font-size: 0.9rem;
  }

  .dropdown-item {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
  }
}

/* Carreras: 5 por fila en escritorio */
.row-carreras {
  display: flex;
  flex-wrap: wrap;
  margin-left: -10px;
  margin-right: -10px;
}
.col-carrera {
  flex: 0 0 20%;
  max-width: 20%;
  padding-left: 10px;
  padding-right: 10px;
  box-sizing: border-box;
}
@media (max-width: 1200px) {
  .col-carrera {
    flex: 0 0 25%;
    max-width: 25%;
  }
}
@media (max-width: 992px) {
  .col-carrera {
    flex: 0 0 33.3333%;
    max-width: 33.3333%;
  }
}
@media (max-width: 768px) {
  .col-carrera {
    flex: 0 0 50%;
    max-width: 50%;
  }
}
@media (max-width: 576px) {
  .col-carrera {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

/* Cards de valores modernos */
.card-valor {
  background: white;
  border-radius: var(--border-radius);
  box-shadow: var(--shadow-light);
  padding: 2.5rem 2rem 2rem 2rem;
  text-align: center;
  position: relative;
  overflow: hidden;
  transition: var(--transition);
}
.card-valor:hover {
  box-shadow: var(--shadow-heavy);
  background: linear-gradient(135deg, rgba(13,202,240,0.10), rgba(253,61,181,0.10));
}
.icon-valor {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem auto;
  width: 5rem;
  height: 5rem;
  position: relative;
}
.icon-valor .fa-stack {
  width: 5rem;
  height: 5rem;
  font-size: 2.5rem;
  position: relative;
}
.icon-valor .fa-stack-2x {
  font-size: 5rem;
  color: var(--primary-color);
  z-index: 1;
}
.icon-valor .fa-stack-1x {
  font-size: 2.2rem;
  color: #fff;
  z-index: 2;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}
.card-valor h4 {
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--dark-color) !important;
}
.card-valor p {
  color: var(--secondary-color) !important;
  line-height: 1.6;
}

/* Responsive navbar styles - ÚNICO bloque para móvil */
