/* ═══════════════════════════════════════════
   MOLARSTAR ENTERPRISES LDA — molarstar.pt
   Paleta: Vermelho #E31B23 + Laranja #F97316 (protagonistas)
          Verde-lima #84CC16 (acentos)
          Branco #FFFFFF + Cinzento escuro #2D2D2D
   Font: Inter
   ═══════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* ── Reset ── */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* ── Base ── */
:root {
  --red: #E31B23;
  --orange: #F97316;
  --orange-light: #FB923C;
  --green: #84CC16;
  --white: #FFFFFF;
  --bg: #FAFAF9;
  --dark: #2D2D2D;
  --gray: #888888;
  --gray-light: #CCCCCC;
  --gray-border: #EEEEEE;
  --gray-bg: #F5F5F3;
  --gradient-main: linear-gradient(135deg, var(--orange), var(--red));
  --gradient-bar: linear-gradient(90deg, var(--red), var(--orange), var(--green), var(--orange), var(--red));
  --gradient-footer: linear-gradient(90deg, var(--red), var(--orange), var(--green));
  --sidebar-width: 250px;
  --header-height: 62px;
  --footer-height: 46px;
  --radius: 12px;
  --radius-lg: 18px;
  --shadow-card: 0 2px 8px rgba(0,0,0,0.02);
  --shadow-hover: 0 12px 32px rgba(249,115,22,0.12);
  --transition: all 0.25s ease;
}

html {
  height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--dark);
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a {
  text-decoration: none;
  color: inherit;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ── Animations ── */
@keyframes shimmer {
  0% { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ═══════ HEADER ═══════ */
.header {
  height: var(--header-height);
  min-height: var(--header-height);
  background: var(--white);
  display: flex;
  align-items: center;
  padding: 0 24px;
  border-bottom: 1px solid #F0EDE8;
  z-index: 100;
  position: relative;
}

.header__logo {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 230px;
  text-decoration: none;
}

.header__star {
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.header__brand {
  display: flex;
  flex-direction: column;
}

.header__name {
  font-weight: 900;
  font-size: 20px;
  letter-spacing: 0.5px;
  line-height: 1;
  color: var(--dark);
}

.header__name span {
  background: linear-gradient(90deg, var(--red), var(--orange));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.header__sub {
  font-size: 8px;
  color: #BBBBBB;
  font-weight: 600;
  letter-spacing: 1.5px;
}

.header__bar {
  flex: 1;
  height: 3px;
  border-radius: 4px;
  background: var(--gradient-bar);
  background-size: 200% 100%;
  animation: shimmer 6s linear infinite;
  margin: 0 24px;
}

.header__actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.header__search {
  background: var(--gray-bg);
  border-radius: var(--radius);
  padding: 9px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 180px;
  border: none;
  font-size: 13px;
  color: #BBBBBB;
  cursor: text;
}

.header__search-icon {
  font-size: 14px;
  opacity: 0.35;
}

.btn-enter {
  background: var(--gradient-main);
  color: var(--white);
  padding: 10px 24px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 14px rgba(249,115,22,0.25);
  transition: var(--transition);
}

.btn-enter:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(249,115,22,0.35);
}

/* Hamburger */
.header__hamburger {
  display: none;
  font-size: 22px;
  padding: 4px 8px;
  color: var(--dark);
  cursor: pointer;
}

/* ═══════ LAYOUT ═══════ */
.layout {
  display: flex;
  flex: 1;
  overflow: hidden;
}

/* ═══════ SIDEBAR ═══════ */
.sidebar {
  width: var(--sidebar-width);
  min-width: var(--sidebar-width);
  background: var(--white);
  border-right: 1px solid #F0EDE8;
  display: flex;
  flex-direction: column;
  padding: 16px 12px 12px;
  overflow-y: auto;
}

.sidebar__label {
  padding: 4px 12px 14px;
  font-size: 11px;
  font-weight: 800;
  background: linear-gradient(90deg, var(--orange), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.sidebar__item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  margin: 2px 0;
  border-radius: var(--radius);
  color: #999999;
  font-weight: 500;
  font-size: 13px;
  text-align: left;
  transition: var(--transition);
  width: 100%;
}

.sidebar__item:hover {
  background: rgba(249,115,22,0.03);
  color: #666666;
}

.sidebar__item.active {
  background: rgba(249,115,22,0.05);
  color: var(--dark);
  font-weight: 700;
}

.sidebar__icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: var(--gray-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #CCCCCC;
  flex-shrink: 0;
  transition: var(--transition);
}

.sidebar__item.active .sidebar__icon {
  color: var(--white);
  box-shadow: 0 3px 10px rgba(249,115,22,0.18);
}

/* Gradientes individuais para ícones ativos */
.sidebar__item.active .sidebar__icon.grad-1 { background: linear-gradient(135deg, var(--orange), var(--red)); }
.sidebar__item.active .sidebar__icon.grad-2 { background: linear-gradient(135deg, var(--orange), var(--orange-light)); }
.sidebar__item.active .sidebar__icon.grad-3 { background: linear-gradient(135deg, var(--green), var(--orange)); }
.sidebar__item.active .sidebar__icon.grad-4 { background: linear-gradient(135deg, var(--orange), var(--red)); }
.sidebar__item.active .sidebar__icon.grad-5 { background: linear-gradient(135deg, var(--green), var(--orange)); }
.sidebar__item.active .sidebar__icon.grad-6 { background: linear-gradient(135deg, var(--orange), var(--green)); }
.sidebar__item.active .sidebar__icon.grad-7 { background: linear-gradient(135deg, var(--red), var(--orange)); }
.sidebar__item.active .sidebar__icon.grad-8 { background: linear-gradient(135deg, var(--orange), var(--green)); }

.sidebar__bottom {
  margin-top: auto;
  padding-top: 12px;
}

.sidebar__card {
  background: linear-gradient(135deg, var(--orange), var(--red));
  border-radius: 14px;
  padding: 16px;
  color: var(--white);
}

.sidebar__card-title {
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sidebar__card-title .star-green {
  color: var(--green);
}

.sidebar__card-info {
  font-size: 10px;
  opacity: 0.9;
  line-height: 1.6;
}

/* ═══════ MAIN FEED ═══════ */
.main {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 22px 28px 14px;
  overflow: hidden;
}

.main__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 18px;
}

.main__title {
  font-size: 26px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--orange), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.main__subtitle {
  font-size: 13px;
  color: #AAAAAA;
  margin-top: 4px;
}

.btn-prev {
  background: var(--gradient-main);
  color: var(--white);
  border-radius: 10px;
  padding: 8px 18px;
  font-size: 12px;
  font-weight: 700;
  transition: var(--transition);
}

.btn-prev:hover {
  transform: scale(1.03);
}

/* ── Cards Grid ── */
.cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 18px;
  flex: 1;
  min-height: 0;
}

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: row;
  border: 1px solid var(--gray-border);
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-card);
  animation: fadeIn 0.3s ease forwards;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: rgba(132,204,22,0.4);
}

.card__visual {
  width: 35%;
  min-width: 140px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.card__emoji {
  font-size: 42px;
}

.card__tag {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: var(--white);
  font-size: 9px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 8px;
  letter-spacing: 0.8px;
  text-transform: uppercase;
}

.card__content {
  flex: 1;
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.card__title {
  font-size: 16px;
  font-weight: 700;
  margin-bottom: 8px;
  line-height: 1.3;
  color: var(--dark);
}

.card__desc {
  font-size: 12px;
  color: var(--gray);
  line-height: 1.6;
}

.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
}

.card__date {
  font-size: 11px;
  color: var(--gray-light);
  font-weight: 500;
}

.card__link {
  font-size: 11px;
  font-weight: 700;
  transition: color 0.2s;
}

.card__link--orange { color: var(--orange); }
.card__link--green { color: var(--green); }

/* Card gradients */
.card__visual--ro { background: linear-gradient(135deg, var(--red), var(--orange)); }
.card__visual--og { background: linear-gradient(135deg, var(--orange), var(--green)); }
.card__visual--go { background: linear-gradient(135deg, var(--green), var(--orange)); }
.card__visual--or { background: linear-gradient(135deg, var(--orange), var(--red)); }

/* ── Ver mais ── */
.main__more {
  text-align: center;
  padding-top: 14px;
}

.btn-more {
  background: var(--gradient-main);
  color: var(--white);
  padding: 12px 40px;
  border-radius: 14px;
  font-weight: 800;
  font-size: 14px;
  box-shadow: 0 6px 20px rgba(249,115,22,0.25);
  transition: var(--transition);
}

.btn-more:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 28px rgba(249,115,22,0.3);
}

/* ═══════ FOOTER ═══════ */
.footer {
  background: var(--gradient-footer);
  color: var(--white);
  padding: 11px 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--footer-height);
}

.footer__left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer__star {
  width: 18px;
  height: 18px;
}

.footer__copy {
  font-weight: 700;
  font-size: 11px;
}

.footer__links {
  display: flex;
  gap: 20px;
}

.footer__link {
  color: rgba(255,255,255,0.85);
  font-size: 11px;
  font-weight: 600;
  transition: color 0.15s;
}

.footer__link:hover {
  color: var(--white);
}

/* ═══════ MOBILE OVERLAY ═══════ */
.sidebar-overlay {
  display: none;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0,0,0,0.4);
  z-index: 90;
}

.sidebar-overlay.active {
  display: block;
}

/* ═══════ PAGE CONTENT (for inner pages) ═══════ */
.page-content {
  flex: 1;
  padding: 28px 32px;
  overflow-y: auto;
}

.page-content h1 {
  font-size: 28px;
  font-weight: 900;
  background: linear-gradient(90deg, var(--orange), var(--red));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 8px;
}

.page-content h2 {
  font-size: 20px;
  font-weight: 800;
  color: var(--dark);
  margin: 28px 0 12px;
}

.page-content p {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 16px;
  max-width: 720px;
}

.page-content ul {
  padding-left: 20px;
  margin-bottom: 16px;
}

.page-content li {
  font-size: 14px;
  color: var(--gray);
  line-height: 1.7;
  margin-bottom: 6px;
}

.page-content li::marker {
  color: var(--orange);
}

/* ═══════ CONTACT FORM ═══════ */
.form-group {
  margin-bottom: 18px;
  max-width: 500px;
}

.form-group label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--dark);
  margin-bottom: 6px;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--gray-border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  color: var(--dark);
  background: var(--white);
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(249,115,22,0.08);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.btn-submit {
  background: var(--gradient-main);
  color: var(--white);
  padding: 12px 32px;
  border-radius: var(--radius);
  font-weight: 700;
  font-size: 14px;
  box-shadow: 0 4px 14px rgba(249,115,22,0.25);
  transition: var(--transition);
}

.btn-submit:hover {
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(249,115,22,0.35);
}

/* ═══════ RESPONSIVE ═══════ */
@media (max-width: 1024px) {
  .cards {
    gap: 14px;
  }
  .card__visual {
    min-width: 120px;
  }
  .main {
    padding: 18px 20px 12px;
  }
}

@media (max-width: 768px) {
  body {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
  }

  .header__hamburger {
    display: block;
  }

  .header__bar {
    margin: 0 12px;
  }

  .header__search {
    display: none;
  }

  .header__logo {
    min-width: auto;
  }

  .header__sub {
    display: none;
  }

  .sidebar {
    position: fixed;
    top: var(--header-height);
    left: -280px;
    width: 270px;
    min-width: 270px;
    height: calc(100vh - var(--header-height));
    z-index: 95;
    transition: left 0.3s ease;
    box-shadow: 4px 0 20px rgba(0,0,0,0.1);
  }

  .sidebar.open {
    left: 0;
  }

  .layout {
    flex-direction: column;
  }

  .main {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
  }

  .cards {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 14px;
    flex: none;
  }

  .card {
    min-height: 120px;
  }

  .card__visual {
    width: 30%;
    min-width: 100px;
  }

  .card__emoji {
    font-size: 32px;
  }

  .main__title {
    font-size: 22px;
  }

  .footer {
    flex-direction: column;
    gap: 8px;
    padding: 14px 20px;
    text-align: center;
  }

  .footer__links {
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
  }

  .page-content {
    padding: 20px 16px;
  }
}

@media (max-width: 480px) {
  .header {
    padding: 0 14px;
  }

  .header__name {
    font-size: 17px;
  }

  .card__content {
    padding: 14px;
  }

  .card__title {
    font-size: 14px;
  }

  .card__desc {
    font-size: 11px;
  }
}
