/* RESET BASE */
body {
  background: #f5f7fb;
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

/*=====================
  Controlador Global
======================*/
.app-container {
  max-width: 1400px;
  width: 95%;
  margin: 0 auto;
}

/* =========================
   HERO WRAPPER (PADRE)
========================= */
.hero-wrapper {
  margin: 30px 0;
  border-radius: 20px;
  overflow: hidden;

  background: url('/img/hero-bg.png') no-repeat center center;
  background-size: cover;

  box-shadow: 0 15px 40px rgba(0,0,0,0.15);
  position: relative;
}

/* FORMAS DECORATIVAS */
.hero-wrapper::before,
.hero-wrapper::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: 0.15;
}

/* izquierda */
.hero-wrapper::before {
  width: 300px;
  height: 300px;
  background: #ffffff;
  top: -100px;
  left: -100px;
}

/* derecha */
.hero-wrapper::after {
  width: 500px;
  height: 500px;
  background: #4da3ff;
  bottom: -200px;
  right: -150px;
}

/* =========================
   NAVBAR
========================= */
.main-navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;

  padding: 15px 30px;
  color: white;

  background: transparent;
}

/* IZQUIERDA */
.nav-left {
  display: flex;
  align-items: center;
  gap: 25px;
}

.logo {
  font-weight: bold;
  font-size: 20px;
  letter-spacing: 1px;
}

.nav-left a {
  color: white;
  text-decoration: none;
  font-size: 14px;
  opacity: 0.85;
  transition: 0.2s;
}

.nav-left a:hover {
  opacity: 1;
}

/* DERECHA */
.nav-right {
  font-weight: 500;
  font-size: 14px;
}

/* =========================
   HERO
========================= */
.hero {
  background: transparent;
  color: white;
  margin: 0;
  padding: 60px 20px 70px;
  text-align: center;
}

.hero h1 {
  margin: 0;
  font-size: 36px;
}

.hero p {
  margin-top: 10px;
  font-size: 16px;
  opacity: 0.9;
}

/* BUSCADOR */
.hero input {
  margin-top: 20px;
  padding: 12px 15px;
  width: 320px;
  border-radius: 10px;
  border: none;
  outline: none;
}

.main-content {
  margin: -60px 0 40px; /* ya NO centrado */
  padding: 30px;

  background: #f2f3f5;
  box-shadow: 0 20px 60px rgba(0,0,0,0.15);

  position: relative;
  z-index: 2;
}

/* =========================
   QUICK ACCESS
========================= */
.quick-access {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 20px;
  margin: 30px auto;
}

.quick-card {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;

  padding: 18px 20px; /* 👈 más compacto */

  background: white;
  border-radius: 16px;

  font-weight: bold;
  cursor: pointer;
  text-decoration: none;
  color: black;

  box-shadow: 0 8px 20px rgba(0,0,0,0.08);
  transition: all 0.25s ease;
}

.quick-card:hover {
  transform: translateY(-6px) scale(1.02);
  background: linear-gradient(135deg, #4da3ff, #2f6fa3);
  color: white;
}

/* ICONOS */

/* COLORES */
.instalaciones i { color: #3498db; }
.tutoriales i { color: #2ecc71; }
.herramientas i { color: #e67e22; }
.addons i { color: #9b59b6; }

/* =========================
   SECCIONES
========================= */
.section-header {
  margin: 20px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 10px;
}

.section-header h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.section-header a {
  text-decoration: none;
  color: #2f6fa3;
  font-size: 14px;
}

.section-header .icon-box {
  width: 32px;
  height: 32px;
  font-size: 14px;
  border-radius: 10px;
}

section {
  margin-top: 10px;
}

/* =========================
   GRID
========================= */
.grid {
  margin: 0 auto;

  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  padding: 0 10px;
  max-width: 1000px;
}

/* =========================
   CARDS
========================= */
.card {
  background: white;
  border-radius: 14px;
  overflow: hidden;

  display: flex;
  flex-direction: column;
  justify-content: space-between;

  transition: all 0.25s ease;
  cursor: pointer;
  text-decoration: none;
  color: inherit;

  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 28px rgba(0,0,0,0.12);
}

/* IMAGEN */
.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;

  padding: 12px;
  background: #f5f7fb;

  border-radius: 16px 16px 0 0;

  display: flex;
  align-items: center;
  justify-content: center;
}


/* CONTENIDO */
.card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.card-body h3 {
  font-size: 18px;
  margin: 0 0 10px;
}

.card-body p {
  font-size: 14px;
  color: #666;
  margin: 0;
}

.card-footer-date {
  margin-top: auto;
  padding: 10px;
  background: #f1f3f5;
  border-radius: 8px;
  font-size: 13px;
  color: #777;
}

/* ICONO CONTENEDOR */
.icon-box {
  width: 45px;
  height: 45px;
  border-radius: 12px;

  display: flex;
  align-items: center;
  justify-content: center;

  flex-shrink: 0; /* 👈 clave */

  color: white;
  font-size: 18px;

  box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

/* COLORES POR CATEGORÍA */
.instalaciones .icon-box {
  background: linear-gradient(135deg, #4da3ff, #2f6fa3);
}

.tutoriales .icon-box {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.herramientas .icon-box {
  background: linear-gradient(135deg, #f39c12, #e67e22);
}

.addons .icon-box {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

/*Colores iconos titulos cada seccion */

.icon-box.instalaciones {
  background: linear-gradient(135deg, #4da3ff, #2f6fa3);
}


.icon-box.tutoriales {
  background: linear-gradient(135deg, #2ecc71, #27ae60);
}

.icon-box.herramientas {
  background: linear-gradient(135deg, #f39c12, #e67e22);
}

.icon-box.addons {
  background: linear-gradient(135deg, #9b59b6, #8e44ad);
}

/* ICONO */
.icon-box i {
  font-size: 18px;
  color: white;
}

.tool-card img{
  width: 100%;
  height: 160px;
  object-fit: contain;
  background: #f4f4f4;
  padding: 10px;
}

.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
}

.mini-grid {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.mini-card {
  display: flex;
  gap: 20px;
  align-items: flex-start;

  background: white;
  border-radius: 14px;
  padding: 15px;

  text-decoration: none;
  color: inherit;

  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: 0.2s;

}

.mini-card:hover {
  transform: translateY(-3px);
}

.mini-card img {
  width: 70px;
  height: 70px;
  object-fit: contain;

  background: #f4f4f4;
  padding: 10px;
  border-radius: 12px;

  flex-shrink: 0;
}

.mini-card .img-box {
  width: 70px;
  height: 70px;
  padding: 10px;

  background: #eef1f5;
  border-radius: 16px;

  display: flex;
  align-items: center;
  justify-content: center;
}

.mini-card .img-box img {
  width: 200%;
  height: 200%;
  object-fit: contain;
}

.mini-body h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.mini-body p {
  margin: 6px 0;
  font-size: 13px;
  color: #666;
}

.mini-date {
  background: #eef1f5;
  padding: 8px;
  border-radius: 8px;
  font-size: 12px;
  color: #666;
}

/*=========================
  BARRA DE BUSQUEDA
=========================*/

.search-box {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  align-items: stretch;
}

/* INPUT */
.search-box input {
  height: 42px; /*  altura fija */
  padding: 0 15px;
  width: 320px;

  border-radius: 10px 0 0 10px;
  border: none;
  outline: none;

  display: block;
}

/* BOTÓN */
.search-box button {
  height: 42px;
  padding: 0 18px;

  border: none;
  background: #2f6fa3;
  color: white;

  border-radius: 0 10px 10px 0;

  cursor: pointer;

  font-size: 14px;
  font-weight: 500;

  display: block; 
  line-height: 42px;

  transition: 0.2s;
}

.search-box button:hover {
  transform: translateY(-6px) scale(1.02);
  background: linear-gradient(135deg, #4da3ff, #2f6fa3);
  color: white;
}

/* =========================
  USER DROPDOWN MENÚ
========================= */

.user-menu {
  position: relative;
  cursor: pointer;
}

.user-name {
  font-weight: 500;
}

/* dropdown oculto */
.dropdown {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 5px;

  background: white;
  border-radius: 10px;
  padding: 10px;

  box-shadow: 0 10px 30px rgba(0,0,0,0.15);

  display: none;
  flex-direction: column;
  min-width: 150px;
}

.dropdown.active {
  display: flex;
}

/* links */
.dropdown a {
  text-decoration: none;
  color: #333;
  padding: 8px 10px;
  border-radius: 6px;
  transition: 0.2s;
}

.dropdown a:hover {
  background: #f1f3f5;
}

/* mostrar al hover */
.user-menu:hover .dropdown {
  display: flex;
}

.user-menu::after {
  content: "";
  position: absolute;
  top: 100%;
  right: 0;
  width: 100%;
  height: 10px;
}

/* =========================
  RESPONSIVE FINAL PRO
========================= */

/* Tablets */
@media (max-width: 900px) {
  .two-columns {
    grid-template-columns: 1fr;
  }
}

/* Móviles */
@media (max-width: 600px) {

  .hero input {
    width: 90%;
  }

  .nav-left {
    gap: 10px;
  }

  .hero h1 {
    font-size: 26px;
  }

  .mini-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
  }

  .mini-card img {
    width: 110px;
    height: 110px;
  }

  .mini-body {
    width: 100%;
  }

  .mini-date {
    width: 100%;
  }
}