/* =========================
   VARIABLES Y GLOBALES
   ========================= */
:root {
  --bg: #eef2f7;
  --surface: #ffffff;
  --text: #0f172a;
  --muted: #475569;
  --border: #e2e8f0;
  --shadow: 0 1px 2px rgba(15, 23, 42, .10);
  --radius: 12px;
  --info: #0ea5e9;
  --info-600: #0284c7;
  --footer: #111827;
  --footer-text: #e5e7eb;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* =========================
   NAVBAR
   ========================= */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--surface);
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 16px;
}

.navbar__left { flex: 0 0 auto; }

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 10px;
  border-radius: 10px;
  text-decoration: none;
}
.brand img { height: 32px; width: auto; display: block; }

.navbar__right {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: nowrap;
  min-width: 0;
}

.navbar__title {
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  white-space: nowrap;
  margin-right: 8px;
  color: var(--text);
}

.login {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: nowrap;
  min-width: 0;
}

.login .input {
  width: 260px;
  max-width: 260px;
  min-width: 180px;
}

.login .btn {
  white-space: nowrap;
  flex: 0 0 auto;
}

@media (max-width: 900px) {
  .navbar__right { flex-wrap: wrap; }
  .login { flex-wrap: wrap; }
  .login .input { width: 180px; max-width: 100%; }
}

/* =========================
   INPUTS & BUTTONS
   ========================= */
.input {
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #fff;
  outline: none;
  min-width: 160px;
}
@media (max-width: 640px) {
  .input { min-width: 110px; }
}

.btn {
  height: 38px;
  padding: 0 14px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: #f1f5f9;
  color: var(--text);
  cursor: pointer;
  font-weight: 600;
}
.btn:active { transform: translateY(1px); }

.btn--info {
  background: var(--info);
  color: #fff;
}
.btn--info:hover { background: var(--info-600); }

.btn--ghost {
  background: transparent;
  border-color: transparent;
}
.btn--ghost.btn--info { color: var(--info-600); }
.btn--ghost.btn--info:hover { background: rgba(14,165,233,.10); }

/* =========================
   LAYOUT
   ========================= */
.main { flex: 1; }

.container {
  width: 100%;
  max-width: 1152px;
  margin: 0 auto;
  padding: 16px 24px;
}

.main .container:first-child {
  padding-top: 22px;
}

/* =========================
   CAROUSEL 
   ========================= */
#myCarousel.carousel {
  width: calc(100% - 48px);
  max-width: 1104px;
  margin: 24px auto 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;

  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

#myCarousel.carousel {
  height: auto;
  aspect-ratio: 16 / 6;   
  min-height: 360px;
  max-height: 520px;
}

@media (max-width: 900px){
  #myCarousel.carousel{
    height: 30vh;
    min-height: 220px;
    max-height: 620px;
  }}
  
  
  

#myCarousel .carousel-item {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  scroll-snap-align: start;
  overflow: hidden;
}

#myCarousel .carousel-item img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: center; 
  object-position: center;
  background: transparent;
  position: relative;
  z-index: 1;
}


#myCarousel .carousel__nav {
  position: absolute;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
  padding: 0 12px;
}

#myCarousel .carousel__btn {
  pointer-events: auto;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  background: rgba(0,0,0,.25);
  color: #fff;
  font-size: 20px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

#myCarousel .carousel__btn:hover {
  background: rgba(0,0,0,.45);
}

#myCarousel .carousel__error {
  padding: 12px;
  color: #b91c1c;
  background: #fee2e2;
  border: 1px solid #fecaca;
  border-radius: 12px;
  width: 100%;
}

@media (max-width: 640px) {
  #myCarousel.carousel { aspect-ratio: 16 / 8; }
  #myCarousel .carousel__btn { width: 34px; height: 34px; font-size: 18px; }
}

/* =========================
   CARDS GRID
   ========================= */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}
@media (min-width: 640px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1024px) {
  .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card {
  display: flex;
  gap: 16px;
  width: 100%;
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  padding: 14px;
}

.card__media {
  width: 96px;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  align-self: stretch;
  padding: 10px;
  flex: 0 0 auto;
}

.card__media img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.card__body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 2px 2px;
  min-width: 0;
}

.card__title {
  margin: 0;
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .2px;
}

.card__text {
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.card__actions {
  margin-top: auto;
  display: flex;
  justify-content: flex-end;
}

/* =========================
   FOOTER
   ========================= */
.footer {
  margin-top: auto;
  background: var(--footer);
  color: var(--footer-text);
  padding: 28px 24px;
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}

.footer__col { min-width: 260px; }

.footer__title {
  margin: 0 0 10px 0;
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .8px;
  opacity: .9;
}

.iconrow {
  display: flex;
  gap: 14px;
  align-items: center;
}

.iconrow a {
  display: inline-flex;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  background: rgba(255,255,255,.06);
}

.iconrow a:hover { background: rgba(255,255,255,.10); }
.iconrow svg { fill: currentColor; }