* {
    box-sizing: border-box;
  }

  body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #f5f7fa;
    color: #1f2937;
  }

  .grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    height: 50vh;
    width: 84%;
    margin-top: 8%;
    margin-left: 8%;
    margin-right: 8%;
    padding: 0;
  }

  .panel {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: all 0.4s ease;
    border-radius: 0;
    font-family: 'Century Gothic', sans-serif;
  }

  .panel-content .titulo {
    font-size: 2em;
    font-weight: 800;
    color: white;
    margin-top: -10px;
    margin-bottom: 15px;
    font-family: 'Century Gothic', sans-serif;
  }

  .panel-content .subtitulo {
    font-size: 1.4em;
    font-weight: 400;
    color: white;
    margin-top: -10px;
    margin-bottom: 15px;
    font-family: 'Montserrat', sans-serif;
  }
  
  .panel:hover {
    transform: scale(1.01);
  }

  .panel.expanded {
    position: fixed;
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    width: 84%;
    height: 50vh;
    z-index: 10;
    padding: 7px;
    background: linear-gradient(to bottom right, #1f775a, #0075a8, #2fa496);
    display: flex;
    justify-content: center;
    align-items: center;
    animation: panelIn 0.4s ease forwards;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
  }

  .panel.expanded .panel-content-wrapper {
    background: #ffffff;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
    position: relative;
  }

  .panel-content {
    max-width: 800px;
    text-align: center;
    padding: 10px;
  }

    .panel-content .titulo.expandido,
    .panel-content .subtitulo.expandido {
        color: #1f2937; /* gris oscuro casi negro */
    }

  .close-boton {
    position: absolute;
    top: 16px;
    right: 16px;
    font-size: 1.2em;
    padding: 0.4em 0.7em;
    border: none;
    background: linear-gradient(to right, #1f775a, #0075a8, #2fa496);
    color: white; /* ✅ Esto hace que el aspa se vea blanca y no roja */
    cursor: pointer;
    font-weight: bold;
    line-height: 1;
    border-radius: 8px;
    transition: transform 0.2s ease;
  }  

  .close-boton:hover {
    transform: scale(1.2);
  }

  .hidden {
    display: none;
  }

  /* Colores únicos para cada panel */
  .panel-1 {
    background: linear-gradient(135deg, #1f775a, #2fa496);
  }

  .panel-2 {
    background: linear-gradient(135deg, #0075a8, #4fd1c5);
  }

  .panel-3 {
    background: linear-gradient(135deg, #2fa496, #1f775a);
  }

  .panel-4 {
    background: linear-gradient(135deg, #005f88, #0075a8);
  }

  .panel-5 {
    background: linear-gradient(135deg, #1f775a, #0075a8);
  }

  .panel-6 {
    background: linear-gradient(135deg, #2fa496, #00c9a7);
  }

  @keyframes panelIn {
    from {
      opacity: 0;
      transform: translate(-50%, -50%) scale(0.95);
    }
    to {
      opacity: 1;
      transform: translate(-50%, -50%) scale(1);
    }
  }

  @media (max-width: 768px) {
    .grid-container {
      grid-template-columns: 1fr 1fr;
      grid-template-rows: repeat(3, 1fr);
    }
  }

  @media (max-width: 480px) {
    .grid-container {
      grid-template-columns: 1fr;
    }
  }