/* Base layout */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f5f5f5;
  color: #222222;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.main-container {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px 0;
}

.app {
  width: min(375px, 100%);
  height: min(812px, 100vh);
  background: #ffffff;
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow:
    0 35px 100px rgba(0, 0, 0, 0.4),
    0 15px 35px rgba(0, 0, 0, 0.25),
    0 5px 15px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.app-body {
  flex: 1;
  overflow-y: auto;
  padding-bottom: 86px; /* Reservar espacio para la navegación inferior */
}

section.header {
  padding: 18px 20px;
  background: linear-gradient(90deg, #f70059 0%, #ff0163 100%);
  border-bottom-left-radius: 24px;
  border-bottom-right-radius: 24px;
}

.cont-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

h1.title {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}

.subtitle {
  display: block;
  margin-top: 4px;
  font-size: 0.85rem;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
}

.num-icon {
  display: flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.18);
  padding: 6px 10px;
  border-radius: 999px;
}

.num-icon .number {
  font-weight: 700;
  color: #ffffff;
}

.num-icon .icon {
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.95);
}

.section {
  padding: 10px 18px 16px;
}

.section:not(:last-of-type) {
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.anuncios-container {
  overflow: hidden;
  padding: 0 10px;
}

.carousel {
  display: flex;
  gap: 12px;
  transition: transform 0.6s ease;
  will-change: transform;
  padding: 12px 0;
}

.carousel-item {
  flex: 0 0 78%;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.promo-slide {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  aspect-ratio: 722 / 294;
  padding: 14px 16px;
  color: #ffffff;
  text-decoration: none;
}

.promo-slide strong {
  font-size: 1.3rem;
  line-height: 1.1;
}

.promo-slide span {
  font-size: 0.8rem;
  opacity: 0.9;
}

.promo-slide--one {
  background: linear-gradient(135deg, #ff1f8e, #6c2bd9);
}

.promo-slide--two {
  background: linear-gradient(135deg, #6c2bd9, #1fb6ff);
}

.promo-slide--three {
  background: linear-gradient(135deg, #ff7a00, #ff1f8e);
}

.carousel-item.active {
  transform: scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.section-title {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: #666666;
  margin-bottom: 10px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.banner {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.banner h2 {
  margin: 0;
  font-size: 1.05rem;
  color: #ffffff;
}

.banner p {
  margin: 0;
  line-height: 1.4;
  color: #ffffff;
  font-size: 0.9rem;
}

.promo-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: linear-gradient(90deg, #f70059 0%, #ff0163 100%);
  border-radius: 16px;
  padding: 14px 16px;
  color: #ffffff;
  box-shadow: 0 8px 20px rgba(247, 0, 89, 0.2);
}

.promo-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
}

.promo-subtitle {
  margin: 0;
  opacity: 0.9;
}

.plan-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 18px 16px 14px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.plan-balance {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.plan-balance-info {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plan-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  color: #222222;
}

.plan-amount {
  margin: 0;
  font-size: 1.75rem;
  font-weight: 800;
  color: #222222;
}

.plan-info {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding-top: 14px;
  margin-top: 14px;
}

.plan-expiry {
  margin: 0;
  font-size: 0.85rem;
  color: #666666;
  margin-bottom: 10px;
}

.plan-services {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.plan-service {
  background: rgba(247, 0, 89, 0.08);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 0.75rem;
  color: #222222;
  border: 1px solid rgba(247, 0, 89, 0.24);
}

.plan-usage {
  margin-top: 18px;
}

.dashboards-carousel {
  overflow: hidden;
  width: 100%;
}

.dashboards-track {
  display: flex;
  gap: 12px;
  transition: transform 0.4s ease;
  will-change: transform;
}

.dashboard-card {
  flex: 0 0 calc(50% - 6px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.tuenti-circle-container {
  position: relative;
  width: 120px;
  height: 120px;
}

.tuenti-circle-svg {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.tuenti-circle-bg {
  fill: none;
  stroke: #e6e6e6;
  stroke-width: 8;
}

.tuenti-circle-progress {
  fill: none;
  stroke: #f70059;
  stroke-width: 8;
  stroke-linecap: round;
}

.tuenti-circle-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.25rem;
}

.tuenti-circle-main {
  font-weight: 700;
  font-size: clamp(1rem, 3vw, 1.4rem);
  line-height: 1;
}

.tuenti-circle-unit {
  font-size: clamp(0.6rem, 2vw, 0.8rem);
}

.tuenti-circle-sub {
  font-size: clamp(0.5rem, 1.5vw, 0.7rem);
  opacity: 0.7;
}

.usage-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #666666;
}

.dashboards-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.dashboard-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.dashboard-dot--active {
  width: 12px;
  height: 12px;
  background: #f70059;
}

.tuenti-circle-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  pointer-events: none;
}

.usage-title {
  font-size: 0.75rem;
  font-weight: 700;
  color: #666666;
}

.usage-value {
  font-size: 1.2rem;
  font-weight: 800;
  color: #222222;
}

.usage-total {
  font-size: 0.7rem;
  color: #888888;
}

.usage-dot-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  border: none;
  padding: 0;
  cursor: pointer;
}

.indicator-dot.active {
  width: 12px;
  height: 12px;
  background: #f70059;
}

.usage-detail {
  margin-top: 12px;
  text-align: center;
}

.usage-detail-link {
  font-size: 0.85rem;
  color: #f70059;
  text-decoration: none;
  font-weight: 600;
}

.usage-detail-link:hover {
  text-decoration: underline;
}

.usage-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #666666;
}

.usage-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #222222;
}

.usage-total {
  font-size: 0.8rem;
  color: #888888;
}

.usage-dot-container {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.indicator-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.15);
  border: none;
  padding: 0;
  cursor: pointer;
}

.indicator-dot.active {
  width: 12px;
  height: 12px;
  background: #f70059;
}

.usage-detail {
  margin-top: 12px;
  text-align: center;
}

.usage-detail-link {
  font-size: 0.85rem;
  color: #f70059;
  text-decoration: none;
  font-weight: 600;
}

.usage-detail-link:hover {
  text-decoration: underline;
}

.project-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, 0.12);
}

.project-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.project-title h3 {
  margin: 0;
  font-size: 1.05rem;
  color: #222222;
}

.project-description {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #666666;
}

.tech-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tech-item {
  font-size: 0.75rem;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(247, 0, 89, 0.12);
  border: 1px solid rgba(247, 0, 89, 0.25);
  color: #222222;
}

.cta-btn {
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid rgba(247, 0, 89, 0.35);
  background: #f70059;
  color: #ffffff;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.cta-btn:hover {
  background: #ff0163;
  transform: translateY(-1px);
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.service-card {
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

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

.service-icon {
  font-size: 1.5rem;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: rgba(247, 0, 89, 0.12);
  color: #f70059;
}

.service-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #222222;
}

.menu-nav {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 10px 0;
  background: #ffffff;
  border-top: 1px solid rgba(0, 0, 0, 0.08);
  display: flex;
  gap: 0;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 -6px 16px rgba(0, 0, 0, 0.06);
}

.nav-btn {
  flex: 1 1 20%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  color: #666666;
  font-size: 0.75rem;
  cursor: pointer;
  padding: 10px 4px;
  border-radius: 0;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-btn .icon {
  font-size: 1.2rem;
  color: inherit;
}

.nav-btn.active {
  color: #f70059;
}

.nav-btn.active .icon {
  color: #f70059;
}

.nav-btn:hover {
  background: rgba(247, 0, 89, 0.08);
}

.btn-comprar-mas {
  width: 120px;
  height: 42px;
  background: linear-gradient(135deg, #f70059, #ff0163);
  border: none;
  border-radius: 24px;
  color: white !important;
  font-weight: 700;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(247, 0, 89, 0.4);
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-comprar-mas:hover {
  transform: scale(1.05);
  box-shadow: 0 6px 16px rgba(247, 0, 89, 0.6);
}

.btn-comprar-mas:active {
  transform: scale(0.98);
}

/* Responsive breakpoints */
@media (max-width: 375px) {
  .app {
    width: 100%;
    height: 100vh;
    border-radius: 0;
    box-shadow: none;
  }

  .main-container {
    padding: 0;
  }

  .app-header {
    padding: 16px 16px 10px;
  }

  .section {
    padding: 10px 14px 14px;
  }

  .services-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 320px) {
  .section {
    padding: 10px 12px 12px;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .menu-nav {
    padding: 10px 0;
  }
}
