/* ----------------------------- */
/*   RESET GENERAL               */
/* ----------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--text);
  transition: 0.3s ease-in-out;
  min-height: 100vh;
}

/* ----------------------------- */
/*   VARIABLES MODO CLARO/OSCURO */
/* ----------------------------- */
body.dark {
  --bg: #0d0d0d;
  --card: rgba(30, 30, 30, 0.85);
  --border: #333;
  --text: #f5f5f5;
  --accent: #6ab8ff;
}

body.light {
  --bg: #e1d0e2;
  --card: #e6c8ff;
  --border: #e6c8ff;
  --text: #3a2d3f;
  --accent: #c26bff;
}

/* ----------------------------- */
/*   PARTICULAS DEL FONDO        */
/* ----------------------------- */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -2;
}

/* ----------------------------- */
/*   HEADER                      */
/* ----------------------------- */
.mp-header {
  padding: 25px;
  text-align: center;
  position: relative;
}

.mp-back {
  position: absolute;
  left: 20px;
  top: 20px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 18px;
}

.top-controls {
  position: absolute;
  right: 20px;
  top: 15px;
  display: flex;
  gap: 10px;
}

.theme-toggle,
.lang-select {
  padding: 6px 10px;
  font-size: 16px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
}

.mp-title {
  font-size: 38px;
  margin-top: 70px;
  font-weight: 700;
  letter-spacing: -1px;
}

.mp-sub {
  font-size: 18px;
  opacity: 0.8;
}

/* ----------------------------- */
/*   MAIN                        */
/* ----------------------------- */
.mp-main {
  width: 95%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px 0 50px;
}

/* ----------------------------- */
/*   SECCIONES                   */
/* ----------------------------- */
.mp-section {
  margin-bottom: 50px;
}

.mp-section h2 {
  font-size: 26px;
  margin-bottom: 10px;
  color: var(--accent);
}

/* ----------------------------- */
/*   BLOQUES SQL MODERNOS        */
/* ----------------------------- */
.sql-container {
  display: flex;
  flex-direction: column;
  gap: 35px;
}

.sql-block {
  background: var(--card);
  padding: 30px;
  border-radius: 24px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 28px rgba(0,0,0,0.2);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sql-block:hover {
  transform: translateY(-5px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.3);
}

.sql-block h3 {
  font-size: 22px;
  margin-bottom: 18px;
  color:  (--accent);
  font-weight: 700;
  letter-spacing: -0.5px;
  border-bottom: 2px solid var(--accent);
  padding-bottom: 6px;
}

/* ----------------------------- */
/*   FLEX SQL + IMG               */
/* ----------------------------- */
.sql-flex {
  display: flex;
  gap: 30px;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
}

/* ----------------------------- */
/*   BLOQUES DE TEXTO ESTILO NOTA */
/* ----------------------------- */
.sql-code-container {
  flex: 1 1 48%;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(15px);
  padding: 24px 28px;
  border-radius: 18px;
  border-left: 6px solid var(--accent);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
  font-family: 'Lora', serif;
  font-size: 16px;
  line-height: 1.8;
  color: var(--text);
  text-align: justify;
  transition: all 0.3s ease;
  position: relative;
}

body.dark .sql-code-container {
  background: rgba(30,30,30,0.75);
  border-left: 6px solid var(--accent);
  box-shadow: 0 8px 22px rgba(0,0,0,0.35);
}

body.light .sql-code-container {
  background: rgba(255,255,255,0.6);
  border-left: 6px solid var(--accent);
  box-shadow: 0 8px 22px rgba(0,0,0,0.15);
}

.sql-code-container p {
  margin-bottom: 16px;
  font-size: 16px;
  line-height: 1.8;
}

.sql-code-container strong {
  color: var(--accent);
  font-weight: 600;
}

.sql-code-container:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(0,0,0,0.3);
}

/* ----------------------------- */
/*   IMÁGENES                    */
/* ----------------------------- */
.img-wrapper {
  flex: 1 1 48%;
  position: relative;
  transition: transform 0.3s ease;
}

.img-wrapper:hover {
  transform: scale(1.03);
}

.sql-img {
  width: 100%;
  max-width: 450px; /* límite de ancho */
  max-height: 280px; /* límite de alto */
  object-fit: contain;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.15);
  box-shadow: 0 6px 18px rgba(0,0,0,0.2);
  display: block;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

/* ----------------------------- */
/*   BOTÓN PROYECTOS             */
/* ----------------------------- */
.mp-btn {
  display: inline-block;
  background: var(--accent);
  color: white;
  padding: 12px 20px;
  border-radius: 12px;
  text-decoration: none;
  font-weight: 600;
  transition: 0.2s;
}

.mp-btn:hover { opacity: 0.85; }

/* ----------------------------- */
/*   FOOTER                      */
/* ----------------------------- */
.mp-footer {
  padding: 30px 0;
  text-align: center;
  opacity: 0.6;
}

/* ----------------------------- */
/*   MODAL (POPUP)               */
/* ----------------------------- */
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000000bb;
  backdrop-filter: blur(4px);
  justify-content: center;
  align-items: center;
  z-index: 2000;
}

.modal-content {
  background: var(--card);
  padding: 20px;
  border-radius: 16px;
  width: 92%;
  max-width: 720px;
  max-height: 88vh;
  overflow: auto;
  position: relative;
  border: 1px solid var(--border);
}

.modal-close {
  position: absolute;
  top: 12px;
  right: 14px;
  cursor: pointer;
  font-size: 20px;
  color: var(--text);
}

.modal-img {
  max-width: 85vw;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 12px;
  margin: 20px auto;
  display: block;
}

.modal-sql {
  white-space: pre-wrap;
  font-family: "Fira Code", monospace;
  font-size: 16px;
  color: var(--text);
}

/* ----------------------------- */
/*   RESPONSIVE                  */
/* ----------------------------- */
@media (max-width: 1024px) {
  .sql-flex {
    flex-direction: column;
    gap: 20px;
  }
  .sql-code-container, .img-wrapper {
    max-width: 100%;
    flex: 1 1 100%;
  }
}

@media (max-width: 600px) {
  .mp-title {
    font-size: 30px;
    margin-top: 50px;
  }
  .mp-sub {
    font-size: 16px;
  }
}
