/* Estilos base para JMT Portal Sections v2 */

.jmt-portal {
  margin: 2rem auto;
  padding: 1.5rem;
  border-radius: 18px;
  max-width: 1200px;
  background: #fff3c7;
  color: #1e2a3a;
  box-shadow: 0 12px 30px rgba(0,0,0,0.12);
  transition: background 0.3s ease, color 0.3s ease;
  position: relative;
  overflow: hidden;
}

.jmt-portal--dark,
body.jmt-portal-dark .jmt-portal {
  background: #1e2a3a;
  color: #ffd65a;
}

.jmt-portal__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.jmt-portal__brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.jmt-portal__logo-circle {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #1e2a3a;
  display: flex;
  align-items: center;
  justify-content: center;
}

body.jmt-portal-dark .jmt-portal__logo-circle {
  background: #ffd65a;
}

.jmt-portal__logo-icon {
  color: #ffd65a;
  font-size: 22px;
}

body.jmt-portal-dark .jmt-portal__logo-icon {
  color: #1e2a3a;
}

.jmt-portal__brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.jmt-portal__brand-main {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.9rem;
}

.jmt-portal__brand-sub {
  font-size: 0.8rem;
  opacity: 0.8;
}

.jmt-portal__header-right {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.jmt-portal__section-title {
  font-size: 1.3rem;
  margin: 0;
}

.jmt-portal__mode-toggle {
  border: 0;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  background: rgba(0,0,0,0.08);
}

body.jmt-portal-dark .jmt-portal__mode-toggle {
  background: rgba(255,255,255,0.1);
}

.jmt-portal__mode-icon {
  font-size: 1rem;
  opacity: 0.6;
}

.jmt-portal__mode-icon--sun {
  display: inline-block;
}

body.jmt-portal-dark .jmt-portal__mode-icon--sun {
  opacity: 0.3;
}

body.jmt-portal-dark .jmt-portal__mode-icon--moon {
  opacity: 1;
}

.jmt-portal__intro,
.jmt-portal__outro {
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}

.jmt-portal__ads {
  margin: 1rem 0;
  text-align: center;
}

.jmt-portal__windy {
  margin-bottom: 1.5rem;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,0.08);
}

body.jmt-portal-dark .jmt-portal__windy {
  border-color: rgba(255,255,255,0.1);
}

.jmt-portal__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
  margin-bottom: 1.5rem;
}

.jmt-portal__card {
  border-radius: 16px;
  background: rgba(255,255,255,0.9);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

body.jmt-portal-dark .jmt-portal__card {
  background: rgba(11,18,30,0.95);
}

.jmt-portal__card-image-wrap {
  position: relative;
  padding-top: 56%;
  overflow: hidden;
}

.jmt-portal__card-image-wrap img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.jmt-portal__card-image-wrap--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.07);
}

body.jmt-portal-dark .jmt-portal__card-image-wrap--placeholder {
  background: rgba(255,255,255,0.06);
}

.jmt-portal__card-placeholder-icon {
  font-size: 1.8rem;
  opacity: 0.7;
}

.jmt-portal__card-body {
  padding: 0.8rem 0.95rem 0.9rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.jmt-portal__card-source {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  opacity: 0.7;
  margin-bottom: 0.35rem;
}

.jmt-portal__card-title {
  font-size: 0.98rem;
  margin: 0 0 0.4rem;
}

.jmt-portal__card-title a {
  text-decoration: none;
  color: inherit;
}

.jmt-portal__card-title a:hover {
  text-decoration: underline;
}

.jmt-portal__card-summary {
  font-size: 0.9rem;
  opacity: 0.9;
  margin-bottom: 0.7rem;
}

.jmt-portal__card-footer {
  margin-top: auto;
}

.jmt-portal__card-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 600;
  background: #1e2a3a;
  color: #ffd65a;
}

body.jmt-portal-dark .jmt-portal__card-button {
  background: #ffd65a;
  color: #1e2a3a;
}

.jmt-portal__card-button:hover {
  opacity: 0.9;
}

.jmt-portal__empty,
.jmt-portal__manual {
  text-align: center;
  padding: 1rem 0.5rem;
  font-size: 0.95rem;
  opacity: 0.9;
}

@media (max-width: 600px) {
  .jmt-portal {
    padding: 1rem;
  }
  .jmt-portal__header {
    flex-direction: column;
    align-items: flex-start;
  }
  .jmt-portal__header-right {
    align-self: stretch;
    justify-content: space-between;
  }
}
