@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/* Estilo general */
body {
  margin: 0;
  padding: 0;
  font-family: 'Poppins', sans-serif;
  background-color: #f6f6f6;
  color: #333;
  padding-bottom: 80px;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode {
  background-color: #1a1a1a;
  color: #eaeaea;
}

/* Buscador */
.search-container {
  max-width: 1200px;
  margin: 30px auto -10px;
  text-align: center;
}

.search-container input[type="text"] {
  font-family: 'Poppins', sans-serif;
  padding: 12px 20px;
  width: 80%;
  max-width: 500px;
  border-radius: 25px;
  border: 1px solid #ccc;
  font-size: 16px;
  box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
  outline: none;
  transition: all 0.3s ease;
}

.search-container input[type="text"]:focus {
  box-shadow: 0 0 10px #aaa;
}

/* Animaciones */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* CEM SVG Animado */
.letter {
  transform: translateY(2px);
}

.inline-block {
  display: inline-block;
}

.absolute {
  position: absolute;
}

.dash {
  animation: dashArray 2s ease-in-out infinite, dashOffset 2s linear infinite;
}

@keyframes dashArray {
  0% { stroke-dasharray: 0 1 359 0; }
  50% { stroke-dasharray: 0 359 1 0; }
  100% { stroke-dasharray: 359 1 0 0; }
}

@keyframes dashOffset {
  0% { stroke-dashoffset: 365; }
  100% { stroke-dashoffset: 5; }
}

/* Header */
.cem-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 40px;
  background-color: #fff;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

body.dark-mode .cem-header {
  background-color: #222;
  box-shadow: 0 4px 6px rgba(255, 255, 255, 0.1);
}

.cem-logo {
  display: flex;
  gap: 0.1em;
  align-items: center;
}

.cem-nav {
  display: flex;
  gap: 15px;
}

.btn-header {
  padding: 10px 20px;
  text-decoration: none;
  border-radius: 25px;
  font-weight: 500;
  transition: background-position 0.5s, transform 0.2s;
  border: 1px solid #ccc;
}

.btn-header:nth-child(1) {
  background: #fff;
  color: #555;
}

.btn-header:nth-child(2) {
  background: linear-gradient(90deg, #731dff, #ff0099, #fb87ff, #731dff);
  background-size: 300%;
  color: white;
  border: none;
}

.btn-header:hover {
  transform: scale(1.05);
}

.btn-header:nth-child(2):hover {
  background-position: right center;
}

/* Main grid */
.main-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 25px;
  padding: 40px;
  max-width: 1200px;
  margin: auto;
}

.block-card {
  background-color: white;
  padding: 30px 20px;
  border-radius: 12px;
  box-shadow: inset 0 0 10px rgba(0,0,0,0.04), 4px 4px 10px rgba(0,0,0,0.1);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
  color: #333;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  animation: fadeUp 0.5s ease forwards;
  opacity: 0;
}

.block-card i {
  font-size: 28px;
  margin-bottom: 12px;
  transition: transform 0.3s ease;
  cursor: pointer;
}

.block-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
}

.block-card:hover i {
  transform: rotate(10deg) scale(1.1);
  animation: pulse 0.5s ease;
}

.block-card:active {
  box-shadow: inset 0 3px 8px rgba(0,0,0,0.2);
  transform: scale(0.97);
}

/* Estilo dark para cards */
body.dark-mode .block-card {
  background-color: #2a2a2a;
  color: #000;
}

/* Colores personalizados */
.card1 { background: linear-gradient(145deg, #ffe1ec, #f8c6dc); }
.card2 { background: linear-gradient(145deg, #e5d4ff, #d4b1ff); }
.card3 { background: linear-gradient(145deg, #d3efff, #addfff); }
.card4 { background: linear-gradient(145deg, #caffd3, #a3fbb4); }
.card5 { background: linear-gradient(145deg, #fff5c2, #ffe49e); }
.card6 { background: linear-gradient(145deg, #ffd4e5, #ffb1ce); }
.card7 { background: linear-gradient(145deg, #d4fff7, #affff2); }
.card8 { background: linear-gradient(145deg, #d9e2ff, #b8cdff); }
.card9 { background: linear-gradient(145deg, #ffecd9, #ffd4b8); }
.card10 { background: linear-gradient(145deg, #fff, #fff); }

.card11 { background: linear-gradient(145deg, #e1d0ff, #c6a7ff); }
.card12 { background: linear-gradient(145deg, #aee6ff, #92ccff); }
.card13 { background: linear-gradient(145deg, #b9f7e6, #98e3d1); }
.card14 { background: linear-gradient(145deg, #ffd3a1, #ffb777); }
.card15 { background: linear-gradient(145deg, #ffb9d3, #ff8db8); }
.card16 { background: linear-gradient(145deg, #b9ffd9, #99e6b7); }
.card17 { background: linear-gradient(145deg, #b1c9ff, #99b2ff); }
.card18 { background: linear-gradient(145deg, #e1c7ff, #d0a4ff); }
.card19 { background: linear-gradient(145deg, #ffebc1, #ffdb96); }
.card20 { background: linear-gradient(145deg, #e1f2f7, #c0dbf0); }
.card21 { background: linear-gradient(145deg, #f2e8f0, #ff4e50); }
.card22 { background: linear-gradient(145deg, #f2e8f0, #d3c0e3); }

@media (max-width: 768px) {
  .cem-header {
    flex-direction: column;
    align-items: center;
    padding: 30px 20px;
  }

  .cem-logo {
    justify-content: center;
    flex: unset;
    margin-bottom: 30px;
  }

  .cem-nav {
    justify-content: center;
    flex-direction: row;
    gap: 15px;
    flex: unset;
  }
}

/* Panel Estilo APP */
.app-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background: #000;
  display: flex;
  justify-content: space-around;
  align-items: center;
  padding: 10px 0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
}

.app-button {
  font-family: 'Montserrat', sans-serif;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: none;
  border: none;
  color: #fff;
  font-size: 12px;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s ease, color 0.3s ease;
  animation: fadeUp 1s ease forwards;
}

.app-button svg {
  margin-bottom: 5px;
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease;
}

.app-button span {
  font-family: 'Poppins', sans-serif;
}

.app-button:hover {
  transform: scale(1.1);
  color: #ffffff;
}

.app-button:active svg {
  animation: pulse 0.4s ease;
}
    
    
    @keyframes pulse-block {
    0% { transform: scale(1); }
    50% { transform: scale(1.015); }
    100% { transform: scale(1); }
    }
    
    @keyframes pulse-icon {
      0% { transform: scale(1); }
      50% { transform: scale(1.2); }
      100% { transform: scale(1); }
    }


/* Estilo del switch visual */

.switch {
  font-size: 17px;
  position: relative;
  display: inline-block;
  width: 4em;
  height: 2.2em;
  border-radius: 30px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #2a2a2a;
  transition: 0.4s;
  border-radius: 30px;
  overflow: hidden;
}

.slider:before {
  position: absolute;
  content: "";
  height: 1.2em;
  width: 1.2em;
  border-radius: 20px;
  left: 0.5em;
  bottom: 0.5em;
  transition: 0.4s;
  transition-timing-function: cubic-bezier(0.81, -0.04, 0.38, 1.5);
  box-shadow: inset 8px -4px 0px 0px #fff;
}

.switch input:checked + .slider {
  background-color: #00a6ff;
}

.switch input:checked + .slider:before {
  transform: translateX(1.8em);
  box-shadow: inset 15px -4px 0px 15px #ffcf48;
}

.star {
  background-color: #fff;
  border-radius: 50%;
  position: absolute;
  width: 5px;
  height: 5px;
  transition: all 0.4s;
}

.star_1 { left: 2.5em; top: 0.5em; }
.star_2 { left: 2.2em; top: 1.2em; }
.star_3 { left: 3em;   top: 0.9em; }

.switch input:checked ~ .slider .star {
  opacity: 0;
}

.cloud {
  width: 3.5em;
  position: absolute;
  bottom: -1.4em;
  left: -1.1em;
  opacity: 0;
  transition: all 0.4s;
}

.switch input:checked ~ .slider .cloud {
  opacity: 1;
}
