/* Professional Experience */
.experience-section {
  padding: 16rem 1.5rem;
  background: #0b0f19;
  /* Esto le dice al navegador: "Detente 80px antes de llegar al ID" */
  scroll-margin-top: -110px; 
  color: #f5f7ff;
}

/* Estilos para el efecto Dropdown */

/* 1. Ocultamos el contenido extra por defecto */
.experience-details {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 1s ease, opacity 0.3s ease, margin-top 0.3s ease;
}

/* 2. Ajuste del padding para que el card se vea bien colapsado */
.experience-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

/* 3. El estado HOVER */
.experience-item:hover .experience-details {
    max-height: 500px; /* Un valor lo suficientemente grande para cubrir el texto */
    opacity: 1;
    margin-top: 20px; /* Espacio que aparece al expandirse */
}

/* 4. Feedback visual opcional en la Card al hacer hover */
.experience-item:hover .experience-card {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    border-color: var(--accent-color); /* Usa tu variable de color azul si la tienes */
}

/* Asegurar que el header no se mueva bruscamente */
.experience-top {
    margin-bottom: 0;
    transition: margin-bottom 0.3s ease;
}

.experience-item:hover .experience-top {
    margin-bottom: 15px;
}

.experience-container {
  max-width: 1100px;
  margin: 0 auto;
}

.experience-header {
  text-align: center;
  margin-bottom: 3rem;
}

.experience-subtitle {
  margin-top: 0.8rem;
  color: rgba(255, 255, 255, 0.75);
  font-size: 1rem;
  max-width: 650px;
}

/* TIMELINE */
.experience-timeline {
  display: flex;
  flex-direction: column;
  gap: 2rem;
  position: relative;
}

/* ITEM */
.experience-item {
  position: relative;
}

.experience-dot {
  position: absolute;
  left: -22px;
  top: 28px;
  z-index: 100;
  width: 16px;
  height: 16px;
  background: var(--brand-2);
  border-radius: 50%;
  box-shadow: 0 0 0 6px rgba(94, 234, 212, 0.15);
}

/* CARD */
.experience-card {
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 1.8rem;
  border-radius: 18px;
  backdrop-filter: blur(10px);
  transition: all 0.3s ease;
}

.experience-card:hover {
  transform: translateY(-6px);
  border-color: rgba(15, 76, 207, 0.5);
  background-color: rgba(255, 255, 255, 0.02);
  box-shadow: 0px 10px 30px rgba(0, 0, 0, 0.35);
}

.experience-top {
  display: flex;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  align-items: flex-start;
}

.experience-role {
  font-size: 1.3rem;
  font-weight: 700;
}

.experience-company {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.7);
  margin-top: 0.3rem;
}

.experience-date {
  font-size: 0.95rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.15);
}

/* META */
.experience-meta {
  display: flex;
  gap: 1.5rem;
  margin-top: 0.8rem;
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.95rem;
}

.experience-location {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  color: rgba(255, 255, 255, 0.7);
}

.experience-location i {
  font-size: 18px;
}

.experience-type {
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

/* SUMMARY */
.experience-summary {
  margin-top: 1.1rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
}

/* TAGS */
.experience-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.2rem;
}

.experience-tags span {
  font-size: 0.85rem;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(94, 234, 212, 0.12);
}

/* ACTIONS */
.experience-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  gap: 1rem;
}

.btn-view {
  border: none;
  padding: 0.75rem 1.4rem;
  border-radius: 12px;
  font-family: var(--font-secundary);
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(90deg, #0f4ccf, #072a75);
  color: var(--ink);
  transition: 0.25s ease;
}

.btn-view:hover {
  transform: scale(1.04);
}

.btn-link {
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  text-decoration: none;
  transition: 0.2s ease;
}

.btn-link:hover {
  color: var(--ink);
}

/* MODAL */
:root {
  --tesla-white: #ffffff;
  --tesla-grey: #f4f4f4;
  --tesla-dark: #171a20;
  --tesla-accent: #3d3e44;
  --font-main: 'Montserrat', sans-serif;
  --font-mono: 'Roboto Mono', monospace; /* O cualquier fuente Mono */
}

/* Content Container */
.experience-modal-content {
  background: var(--tesla-white);
  width: 95%;
  max-width: 1200px;
  height: 90vh;
  position: relative;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.05);
}

.modal_experience-grid {
  display: grid;
  grid-template-rows: 0.3fr 1fr; /* Split screen */
  height: 100%;
}

/* Lado Visual */
.modal-visuals {
  background: var(--tesla-grey);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.modal-gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

/* Lado de Información */
.modal-info-container {
  padding: 60px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

.modal-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 2px;
  color: var(--tesla-accent);
  margin-bottom: 8px;
}

#modalTitle {
  font-family: var(--font-main);
  font-weight: 600;
  font-size: 32px;
  color: var(--tesla-dark);
  margin-bottom: 4px;
}

.company-name {
  font-family: var(--font-main);
  font-size: 18px;
  color: var(--tesla-accent);
  margin-bottom: 40px;
}

/* Typography & Sections */
h4 {
  font-family: var(--font-mono);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 15px;
  color: #8e8e8e;
}

.modal-section {
  margin-bottom: 35px;
}

#modalDesc {
  font-family: var(--font-main);
  line-height: 1.8;
  color: var(--tesla-accent);
  font-size: 15px;
}

.custom-list {
  list-style: none;
  padding: 0;
}

.custom-list li {
  font-family: var(--font-main);
  margin-bottom: 12px;
  padding-left: 20px;
  position: relative;
  font-size: 14px;
}

.custom-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 1px;
  background: var(--tesla-dark);
}

/* Tags / Tools */
.modal-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.modal-tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  padding: 6px 12px;
  background: var(--tesla-grey);
  border-radius: 4px;
  color: var(--tesla-dark);
}

/* Button */
.modal-btn-primary {
  display: inline-block;
  padding: 15px 40px;
  border: 1.5px solid var(--tesla-dark);
  color: var(--tesla-dark);
  text-decoration: none;
  font-family: var(--font-main);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  transition: all 0.3s ease;
  margin-top: 20px;
}

.modal-btn-primary:hover {
  background: var(--tesla-dark);
  color: var(--tesla-white);
}

/* Close Button */
.modal-close-btn {
  position: absolute;
  top: 30px;
  right: 30px;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 10;
}

/* RESPONSIVE DESIGN */
@media (max-width: 992px) {
  .modal_experience-grid {
    grid-template-columns: 1fr;
    grid-template-rows: 300px 1fr;
  }
  
  .modal-info-container {
    padding: 40px 30px;
  }

  .experience-modal-content {
    height: 95vh;
  }
}

@media (max-width: 480px) {
  #modalTitle {
    font-size: 24px;
  }
  
  .modal-visuals {
    display: none; /* En móviles muy pequeños, priorizamos el texto */
  }

  .modal_experience-grid {
    grid-template-rows: 1fr;
  }
}