﻿:root {
  --purple: #7B3FBF;
  --pink: #F0427A;
  --green: #2DBF7E;
  --orange: #FF8C2A;
  --yellow: #FFD600;
  --light-purple: #F3EAFF;
  --light-pink: #FFF0F5;
  --white: #ffffff;
  --dark: #1A1A2E;
  --gray: #6B7280;
  --light-gray: #F8F8FC;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Nunito', sans-serif;
  background: var(--white);
  color: var(--dark);
  overflow-x: hidden;
}

/* ========== TOP BAR ========== */
.topbar {
  background: var(--purple);
  color: white;
  text-align: center;
  padding: 8px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.5px;
  height: 35px;
}
.topbar span { color: var(--yellow); }

/* ========== HEADER ========== */
header {
  background: white;
  padding: 10px 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 20px rgba(123,63,191,0.1);
  position: sticky;
  top: 0;
  z-index: 100;
  height: 80px;
}

.logo {
  height:60px;
  display: flex;
  flex-direction: column;
}

.logo img {
  height: 50px;
}

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

/* Desktop Nav Icons */
.nav-icon-link {
  display: flex;
  align-items: center;
  background: transparent;
  border-radius: 50px;
  text-decoration: none;
  overflow: hidden;
  transition: max-width 0.4s ease, background 0.4s ease;
  height: 40px;
  max-width: 40px; /* Only shows icon initially */
}
.nav-icon-link:hover {
  max-width: 250px; /* Expands to show text */
  background: var(--light-gray);
}
.nav-icon-link .nav-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  flex-shrink: 0;
  font-size: 16px;
}
.nav-icon-link.purple .nav-icon { background: var(--purple); }
.nav-icon-link.orange .nav-icon { background: var(--orange); }
.nav-icon-link.green .nav-icon { background: var(--green); }
.nav-icon-link.pink .nav-icon { background: var(--pink); }
.nav-icon-link.yellow .nav-icon { background: var(--yellow); }
.nav-icon-link.blue .nav-icon { background: #4A90E2; }

.nav-icon-link .nav-text {
  color: #000;
  font-weight: 800;
  font-size: 13px;
  white-space: nowrap;
  opacity: 0;
  padding: 0 14px 0 8px;
  transition: opacity 0.3s ease;
  transition-delay: 0.1s;
}
.nav-icon-link:hover .nav-text {
  opacity: 1;
}

.search-icon {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--light-gray);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 16px;
  transition: background 0.2s;
  z-index: 2;
  position: relative;
}
.search-icon:hover { background: var(--light-purple); }

.search-dropdown {
  position: absolute;
  top: 130%;
  right: 0;
  background: white;
  padding: 15px;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.1);
  width: 300px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-10px);
  transition: all 0.3s ease;
  z-index: 1000;
  border: 1px solid rgba(0,0,0,0.05);
}
.search-dropdown.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.mobile-menu {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  background: white;
  box-shadow: 0 10px 20px rgba(0,0,0,0.05);
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  z-index: 99;
}
.mobile-menu.show {
  max-height: 400px;
}
.mobile-menu a {
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.mobile-menu a:last-child {
  border-bottom: none;
}
/* ========== HERO ========== */
.hero {
  background: url('../img/kids_hero.png'), linear-gradient(135deg, #F3EAFF 0%, #FFF0F5 50%, #EAFFF5 100%);
  padding: 20px 20px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  height: max(50vh, 400px);
  position: relative;
  overflow: hidden;
  background-position: 
    bottom right, /* PosiÃ§Ã£o da imagem */
    center center; /* PosiÃ§Ã£o do degradÃª */
  background-repeat: 
    no-repeat, /* NÃ£o repete a imagem */
    no-repeat; /* NÃ£o repete o degradÃª */
  background-size: 
    clamp(500px, 65%, 823px) auto, /* Imagem: MÃ­nimo, FlexÃ­vel, MÃ¡ximo */
    cover; /* Faz o degradÃª cobrir toda a div */
}

.hero::before {
  content: '';
  position: absolute;
  top: -80px; right: -80px;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255,140,42,0.15) 0%, transparent 70%);
  border-radius: 50%;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -60px; left: 30%;
  width: 300px; height: 300px;
  background: radial-gradient(circle, rgba(45,191,126,0.15) 0%, transparent 70%);
  border-radius: 50%;
}

.hero-cta{
  max-width:400px;
  position:relative;
  z-index:2;
  @media (max-width: 768px) {
    max-width:100%;
  }
}

.hero-cta :is(h1, h2, h3, h4, h5, h6){
  font-weight:800;
}

.hero-cta h1 span{
  color:var(--purple);
}

.btn-primary {
  background: var(--purple);
  display: inline-block;
  color: white;
  border: none;
  padding: 14px 30px;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(123,63,191,0.3);
}
.btn-primary:hover {
  box-shadow: 0 10px 28px rgba(123,63,191,0.4);
}
.btn-secondary {
  background: white;
  color: var(--purple);
  border: 2.5px solid var(--purple);
  padding: 14px 30px;
  border-radius: 50px;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.2s;
}
.btn-secondary:hover { background: var(--light-purple); transform: translateY(-3px); }


/* ========== CATEGORIAS ========== */
.categories-strip { padding: 40px 40px 20px; }
.section-title { font-family:'Fredoka One',cursive; font-size:28px; color:var(--dark); margin-bottom:8px; }
.section-sub { color:var(--gray); font-weight:600; font-size:14px; margin-bottom:28px; }
.cards-grid {
  display:grid;
  grid-template-columns:repeat(6,1fr);
  gap:16px;
  }
.cat-card {
  aspect-ratio:1/1.75;
  background:white; border-radius:20px;
  text-align:center;
  box-shadow:0 4px 20px rgba(0,0,0,0.06);
  cursor:pointer; transition:all 0.25s;
  border:2px solid transparent;
  text-decoration:none; color:inherit; display:block;
  transition:all 0.25s;
  position:relative;
  @media (max-width: 767px) {
    aspect-ratio:auto; border:0px;
  }
}
.cat-img {border-top-left-radius: 20px; border-top-right-radius: 20px;}
.cat-card:hover {box-shadow:0 12px 35px rgba(0,0,0,0.12); }
.cat-card.purple:hover { border-color:var(--purple); }
.cat-card.pink:hover   { border-color:var(--pink); }
.cat-card.green:hover  { border-color:var(--green); }
.cat-card.orange:hover { border-color:var(--orange); }
.cat-card.yellow:hover { border-color:var(--yellow); }
.cat-card.blue:hover   { border-color:#4A90E2; }
.cat-icon {
  width:56px;height:56px;border-radius:28px;
  margin:-28px auto 12px; color:#fff;
  display:flex;align-items:center;justify-content:center;font-size:24px;position:relative;z-index:2;
  @media (max-width: 767px) {
    margin: 5px auto;
  }
}
.cat-icon.purple{background:var(--purple);} .cat-icon.pink{background:var(--pink);}
.cat-icon.green{background:var(--green);} .cat-icon.orange{background:var(--orange);}
.cat-icon.yellow{background:var(--yellow);} .cat-icon.blue{background:#4A90E2;}
.cat-title { font-weight:800; font-size:13px; color:var(--dark); margin-bottom:4px; line-height:1.3; }
.cat-desc  { font-size:11px; color:var(--gray); font-weight:600; line-height:1.4; }
.ver-mais  { display:inline-block; margin-top:8px; font-size:11px; font-weight:800; color:var(--purple); }
.ver-mais.pink{color:var(--pink);} .ver-mais.green{color:var(--green);} .ver-mais.orange{color:var(--orange);}

/* ========== DESTAQUES ========== */
.destaques { padding:40px; background:var(--light-gray); }
.destaques-header { display:flex; justify-content:space-between; align-items:flex-end; margin-bottom:28px; }
.ver-tudo {
  color:var(--purple); font-weight:800; font-size:14px;
  text-decoration:none; display:flex; align-items:center; gap:4px; transition:gap 0.2s;
}
.ver-tudo:hover { gap:8px; }
.articles-grid { display:grid; grid-template-columns:2fr 1fr 1fr; gap:20px; }
.article-card {
  background:white; border-radius:20px; overflow:hidden;
  box-shadow:0 4px 20px rgba(0,0,0,0.06);
  cursor:pointer; transition:all 0.25s;
  text-decoration:none; color:inherit; display:block;
}
.article-card:hover { transform:translateY(-4px); box-shadow:0 12px 35px rgba(0,0,0,0.12); }
.article-img {
  height:220px; display:flex; align-items:center;
  justify-content:center; font-size:50px; position:relative;
}
.article-card.small .article-img { height:160px; font-size:36px; }
.article-img.purple{background:linear-gradient(135deg,#E8D5FF,#C9A8FF);}
.article-img.pink  {background:linear-gradient(135deg,#FFD6E7,#FFB3CC);}
.article-img.green {background:linear-gradient(135deg,#C8FFE5,#95F5CB);}
.article-img.orange{background:linear-gradient(135deg,#FFE5C8,#FFCC95);}
.article-badge {
  position:absolute; top:12px; left:12px;
  padding:4px 12px; border-radius:50px;
  font-size:11px; font-weight:800; color:white;
}
.badge-purple{background:var(--purple);} .badge-pink{background:var(--pink);}
.badge-green{background:var(--green);}  .badge-orange{background:var(--orange);}
.article-body { padding:20px; }
.article-card.small .article-body { padding:14px; }
.article-title { font-weight:800; font-size:16px; line-height:1.4; margin-bottom:8px; color:var(--dark); }
.article-card.small .article-title { font-size:14px; }
.article-excerpt { font-size:13px; color:var(--gray); line-height:1.6; margin-bottom:12px; }
.article-card.small .article-excerpt { display:none; }
.article-meta { display:flex; justify-content:space-between; font-size:12px; color:var(--gray); font-weight:700; }

/* ========== REVISTA ========== */
.revista-section {
  padding:60px 40px;
  background:linear-gradient(135deg,var(--purple) 0%,#5B2D9F 100%);
  color:white;
  display:grid; grid-template-columns:1fr 1fr; gap:60px; align-items:center;
}
.revista-section h2 { font-family:'Fredoka One',cursive; font-size:40px; margin-bottom:16px; line-height:1.2; }
.revista-section h2 span { color:var(--yellow); }
.revista-section p { font-size:16px; opacity:0.85; line-height:1.7; margin-bottom:28px; font-weight:600; }
.btn-white {
  background:white; color:var(--purple); border:none;
  padding:14px 30px; border-radius:50px;
  font-family:'Nunito',sans-serif; font-weight:800; font-size:15px;
  cursor:pointer; transition:all 0.2s; display:inline-block; text-decoration:none;
}
.btn-white:hover { transform:translateY(-3px); box-shadow:0 10px 28px rgba(0,0,0,0.2); }
.revista-editions { display:grid; grid-template-columns:repeat(3,1fr); gap:16px; }
.edition-card {
  background:rgba(255,255,255,0.15); backdrop-filter:blur(10px);
  border-radius:16px; padding:20px; text-align:center;
  border:1px solid rgba(255,255,255,0.2);
  transition:all 0.2s; cursor:pointer;
}
.edition-card:hover { background:rgba(255,255,255,0.25); transform:translateY(-4px); }
.edition-cover {
  width:60px;height:80px;border-radius:8px;
  margin:0 auto 10px;display:flex;align-items:center;justify-content:center;font-size:28px;
}
.edition-cover.e1{background:linear-gradient(135deg,#FFD6E7,#FFB3CC);}
.edition-cover.e2{background:linear-gradient(135deg,#C8FFE5,#95F5CB);}
.edition-cover.e3{background:linear-gradient(135deg,#FFE5C8,#FFCC95);}
.edition-num  { font-size:12px; font-weight:800; opacity:0.8; margin-bottom:4px; }
.edition-name { font-size:13px; font-weight:800; }

/* ========== FAIXAS ETÃRIAS ========== */
.faixas { padding:60px 40px; }
.faixas-grid { display:grid; grid-template-columns:repeat(4,1fr); gap:20px; margin-top:28px; }
.faixa-card {
  border-radius:24px; padding:28px 22px; text-align:center;
  cursor:pointer; transition:all 0.25s; position:relative; overflow:hidden;
}
.faixa-card:hover { transform:translateY(-6px); box-shadow:0 16px 40px rgba(0,0,0,0.12); }
.faixa-card.f1{background:linear-gradient(135deg,#F3EAFF,#E0C8FF);}
.faixa-card.f2{background:linear-gradient(135deg,#FFF0F5,#FFD6E7);}
.faixa-card.f3{background:linear-gradient(135deg,#EAFFF5,#C8FFE5);}
.faixa-card.f4{background:linear-gradient(135deg,#FFF5EA,#FFE5C8);}
.faixa-emoji { font-size:40px; margin-bottom:12px; display:block; }
.faixa-age { font-family:'Fredoka One',cursive; font-size:24px; margin-bottom:6px; }
.faixa-card.f1 .faixa-age{color:var(--purple);} .faixa-card.f2 .faixa-age{color:var(--pink);}
.faixa-card.f3 .faixa-age{color:var(--green);}  .faixa-card.f4 .faixa-age{color:var(--orange);}
.faixa-label { font-weight:800; font-size:14px; color:var(--dark); margin-bottom:6px; }
.faixa-desc  { font-size:12px; color:var(--gray); font-weight:600; line-height:1.5; }

/* ========== VALORES ========== */
.valores {
  background:var(--light-gray); padding:40px;
  display:flex; justify-content:space-around; flex-wrap:wrap; gap:20px;
}
.valor-item { display:flex; align-items:center; gap:12px; flex:1; min-width:200px; }
.valor-icon {
  width:44px;height:44px;border-radius:12px;
  display:flex;align-items:center;justify-content:center;font-size:20px;flex-shrink:0;
}
.valor-icon.purple{background:var(--light-purple);} .valor-icon.pink{background:var(--light-pink);}
.valor-icon.green{background:#EAFFF5;} .valor-icon.orange{background:#FFF5EA;} .valor-icon.yellow{background:#FFFBE5;}
.valor-text { font-size:13px; font-weight:700; color:var(--dark); line-height:1.4; }

/* ========== FOOTER ========== */
footer { background:var(--dark); color:white; padding:50px 40px 30px; }
.footer-top { display:grid; grid-template-columns:4fr 1fr 1fr; gap:40px; margin-bottom:40px; }
.footer-logo { font-family:'Fredoka One',cursive; font-size:28px; margin-bottom:12px; }
.footer-logo span:nth-child(1){color:var(--purple);} .footer-logo span:nth-child(2){color:var(--pink);}
.footer-logo span:nth-child(3){color:var(--orange);} .footer-logo span:nth-child(4){color:var(--green);}
.footer-desc { font-size:13px; color:rgba(255,255,255,0.6); line-height:1.7; margin-bottom:20px; font-weight:600; }
.social-links { display:flex; gap:10px; }
.social-btn {
  width:38px;height:38px;border-radius:10px;background:rgba(255,255,255,0.1);
  display:flex;align-items:center;justify-content:center;font-size:16px;
  cursor:pointer;transition:background 0.2s;text-decoration:none;
}
.social-btn:hover { background:var(--purple); }
.footer-col h4 { font-size:14px; font-weight:800; margin-bottom:16px; color:rgba(255,255,255,0.9); }
.footer-col a {
  display:block; font-size:13px; color:rgba(255,255,255,0.55);
  text-decoration:none; font-weight:600; margin-bottom:10px; transition:color 0.2s;
}
.footer-col a:hover { color:white; }
.footer-bottom {
  border-top:1px solid rgba(255,255,255,0.1); padding-top:24px;
  display:flex; justify-content:space-between; align-items:center;
  font-size:12px; color:rgba(255,255,255,0.4); font-weight:600;
}

/* ========== ANIMAÃ‡Ã•ES ========== */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(30px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes float {
  0%,100% { transform:translateY(0); }
  50%     { transform:translateY(-10px); }
}
.hero-content    { animation:fadeUp 0.6s ease both; }
.hero-image-area { animation:fadeUp 0.6s ease 0.2s both; }
.hero-visual     { animation:float 4s ease-in-out infinite; }
.cat-card { animation:fadeUp 0.5s ease both; }
.cat-card:nth-child(1){animation-delay:0.05s;} .cat-card:nth-child(2){animation-delay:0.10s;}
.cat-card:nth-child(3){animation-delay:0.15s;} .cat-card:nth-child(4){animation-delay:0.20s;}
.cat-card:nth-child(5){animation-delay:0.25s;} .cat-card:nth-child(6){animation-delay:0.30s;}

/* ========== RESPONSIVO ========== */
@media (max-width:1024px) {
  .cards-grid    { grid-template-columns:repeat(3,1fr); }
  .articles-grid { grid-template-columns:1fr 1fr; }
  .faixas-grid   { grid-template-columns:repeat(2,1fr); }
  .footer-top    { grid-template-columns:1fr 1fr; }
}
@media (max-width:768px) {
  header { padding:12px 20px; }
  nav    { display:none; }
  .hero  { grid-template-columns:1fr; padding:40px 20px; }
  .hero-image-area { display:none; }
  .hero h1 { font-size:36px; }
  .cards-grid    { grid-template-columns:repeat(3,1fr); }
  .articles-grid { grid-template-columns:1fr; }
  .revista-section { grid-template-columns:1fr; padding:40px 20px; }
  .faixas-grid   { grid-template-columns:repeat(2,1fr); }
  .footer-top    { grid-template-columns:1fr; }
  .categories-strip,.destaques,.faixas { padding:30px 20px; }
}
/* Estilos migrados do header */


  .article-hero {
    height: 40vh;
    min-height: 300px;
    background-size: cover;
    background-position: center;
    position: relative;
  }
  .article-hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, transparent 50%, rgba(0,0,0,0.5) 100%);
  }
  .share-buttons a {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 50%;
    background: var(--light-gray);
    color: var(--dark);
    text-decoration: none;
    transition: all 0.2s;
  }
  .share-buttons a:hover {
    background: var(--purple);
    color: white !important;
    transform: translateY(-2px);
  }
  .article-content p {
    font-size: 18px;
    line-height: 1.8;
    color: #4a4a5a;
    margin-bottom: 24px;
  }
  .sidebar-widget-title {
    font-family: 'Fredoka One', cursive;
    color: var(--dark);
    border-bottom: 2px solid var(--light-gray);
    padding-bottom: 12px;
    margin-bottom: 24px;
  }
  .sidebar-link-group:hover h6 {
    color: var(--purple) !important;
  }


/* CSS Grid for the Category Index */
.category-grid {
  display: grid;
  gap: 24px;
  grid-template-columns: repeat(1, 1fr);
}

/* Mobile Breakpoint (max-width: 767px) */
@media (max-width: 767px) {
  .category-grid > .item .article-img {
    height: 140px;
  }
  .category-grid > .item:nth-child(-n+3) .article-img {
    height: 240px; /* First 3 taller on mobile */
  }
  .category-grid > .item:nth-child(n+4) .article-excerpt {
    display: none; /* Hide excerpt for the rest on mobile */
  }
}

/* Tablet Breakpoint (md: 768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  .category-grid {
    grid-template-columns: repeat(6, 1fr);
  }
  .category-grid > .item:nth-child(-n+2) {
    grid-column: span 3; /* 2 columns (first row) */
  }
  .category-grid > .item:nth-child(n+3) {
    grid-column: span 2; /* 3 columns (subsequent rows) */
  }
  
  .category-grid > .item .article-img { height: 160px; }
  .category-grid > .item:nth-child(-n+2) .article-img { height: 240px; }
  
  .category-grid > .item .article-excerpt { display: none; }
  .category-grid > .item:nth-child(-n+2) .article-excerpt { display: block; }
}

/* Desktop Breakpoint (lg: 992px+) */
@media (min-width: 992px) {
  .category-grid {
    grid-template-columns: repeat(15, 1fr); /* 15 is LCM of 3 and 5 */
  }
  .category-grid > .item:nth-child(-n+3) {
    grid-column: span 5; /* 3 items in first row */
  }
  .category-grid > .item:nth-child(n+4) {
    grid-column: span 3; /* 5 items per row in subsequent rows */
  }

  .category-grid > .item .article-img { height: 140px; }
  .category-grid > .item:nth-child(-n+3) .article-img { height: 240px; }

  .category-grid > .item .article-excerpt { display: none; }
  .category-grid > .item:nth-child(-n+3) .article-excerpt { display: block; }
  
  .category-grid > .item:nth-child(n+4) .article-title {
    font-size: 13px;
    line-height: 1.3;
    margin-bottom: 6px;
  }
  .category-grid > .item:nth-child(n+4) .article-body {
    padding: 12px;
  }
}


/* Couch Paginator Global Styles */
.couch-paginator {
    display: flex;
    justify-content: center;
    gap: 0;
}
.couch-paginator a, .couch-paginator span {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    font-size: 1.25rem;
    background-color: #fff;
    border: 1px solid #dee2e6;
    color: var(--dark);
    text-decoration: none;
    margin-left: -1px;
}
.couch-paginator span.page_current {
    background-color: var(--green);
    border-color: var(--green);
    color: white;
    z-index: 2;
    position: relative;
}
.couch-paginator a:hover {
    background-color: #e9ecef;
    border-color: #dee2e6;
    z-index: 1;
    position: relative;
}
.couch-paginator > :first-child {
    border-radius: 50px 0 0 50px;
}
.couch-paginator > :last-child {
    border-radius: 0 50px 50px 0;
}

/* Paginator Responsiveness */
.couch-paginator {
    flex-wrap: nowrap;
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px; /* for scrollbar */
}
@media (max-width: 767.98px) {
    .couch-paginator a, .couch-paginator span {
        padding: 0.4rem 0.75rem;
        font-size: 1rem;
    }
}
@media (max-width: 575.98px) {
    .couch-paginator a, .couch-paginator span {
        padding: 0.3rem 0.6rem;
        font-size: 0.85rem;
    }
}

.card-body p{
  font-size: 11px; line-height: 1.3;
}