@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Plus+Jakarta+Sans:wght@500;600;700&display=swap');

:root {
  --primary: #22c55e;
  --primary-dark: #16a34a;
  --primary-light: #86efac;
 --bg-dark: #0A1520;
  --bg-card: #111C28;
  --text-primary: #E5E7EB;
  --text-secondary: #9CA3AF;
  --border-color: rgba(34, 197, 94, 0.2);
  --border-active: #22c55e;
  --shadow-sm: 0 2px 8px rgba(0,0,0,0.4);
  --shadow-md: 0 8px 24px rgba(0,0,0,0.5);
  --shadow-lg: 0 16px 40px rgba(0,0,0,0.6);
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  position: relative;
}

body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(ellipse at 20% 50%, rgba(34, 197, 94, 0.03) 0%, rgba(34, 197, 94, 0) 50%),
              radial-gradient(ellipse at 80% 80%, rgba(34, 197, 94, 0.02) 0%, rgba(34, 197, 94, 0) 50%);
  pointer-events: none;
  z-index: -1;
}

/* HEADER */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  background: var(--bg-dark);
  z-index: 1000;
  box-shadow: 0 4px 16px rgba(0,0,0,0.6);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  max-width: 1320px;
  height: 64px;
  margin: 0 auto;
  /* horizontal padding with safe-area support and responsive clamp */
  padding-left: calc(24px + env(safe-area-inset-left, 0px));
  padding-right: calc(24px + env(safe-area-inset-right, 0px));
  gap: 24px;
}

header .logo {
  display: flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

header .logo img {
  height: 40px;
  width: auto;
  object-fit: contain;
  transition: transform 0.3s ease;
}

header .logo:hover img {
  transform: scale(1.05);
}

header h1 {
  color: var(--primary);
  font-size: 20px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.5px;
  margin: 0;
}

nav {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  margin-left: auto;
}

nav a {
  color: var(--text-primary);
  padding: 8px 16px;
  margin-left: 0;
  text-decoration: none;
  font-weight: 500;
  font-size: 14px;
  transition: all 0.3s ease;
  border-radius: 6px;
  position: relative;
  white-space: nowrap;
}

nav a:hover {
  color: var(--primary);
}

nav a::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary);
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

nav a:hover::after {
  width: calc(100% - 32px);
}

nav a.active {
  color: var(--primary);
}

nav a.active::after {
  width: calc(100% - 32px);
}

/* MENU TOGGLE (HAMBURGER) */
.menu-toggle {
  display: none;
  flex-direction: column;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  gap: 5px;
  align-items: center;
  justify-content: center;
  margin-left: 12px; /* keep hamburger away from the right edge */
}

.menu-toggle span {
  width: 24px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
  transition: all 0.3s ease;
  display: block;
}

.menu-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(10px, 10px);
}

.menu-toggle.active span:nth-child(2) {
  opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(7px, -7px);
}

/* PAGE OFFSET */
.page {
  padding: 120px 8% 80px;
  text-align: center;
  min-height: 100vh;
  margin-top: 0;
}

/* SEARCH BOX */
.search-box {
  display: flex;
  gap: 12px;
  max-width: 600px;
  margin: 0 auto 60px;
  justify-content: center;
  width: 100%;
  box-sizing: border-box;
  padding: 0 16px;
}

.search-input {
  flex: 1;
  max-width: 400px;
  padding: 12px 18px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  transition: all 0.3s ease;
  box-sizing: border-box;
  width: 100%;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-btn {
  padding: 12px 32px;
  background: var(--primary);
  border: none;
  border-radius: 8px;
  color: var(--bg-dark);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

.search-btn:hover {
  background: var(--primary-light);
  transform: translateY(-2px);
}

/* NAVIGATION CARDS */
.nav-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 60px auto 0;
}

.nav-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px 32px;
  text-decoration: none;
  color: inherit;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.nav-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}

.nav-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2), var(--shadow-md);
  transform: translateY(-6px);
}

.nav-card:hover::before {
  transform: scaleX(1);
}

.nav-card span {
  font-size: 56px;
  margin-bottom: 20px;
  display: block;
  transition: transform 0.3s ease;
}

.nav-card:hover span {
  transform: scale(1.15);
}

.nav-card h3 {
  color: var(--primary);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 8px 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
  line-height: 1.3;
}

.nav-card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0;
  line-height: 1.5;
}

/* ABOUT PAGE LAYOUT */
.about-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
  max-width: 1200px;
  margin: 40px auto 80px;
}

.about-image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.about-image img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  max-height: 400px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  border: 1px solid var(--border-color);
}

.about-image img:hover {
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2), var(--shadow-lg);
  transform: translateY(-8px);
  border-color: var(--primary);
}

.about-text {
  text-align: left;
}

.about-text p {
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.8;
  margin-bottom: 20px;
}

.about-text strong {
  color: var(--primary);
  font-weight: 600;
}

/* VALUES SECTION */
.values-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 32px;
  max-width: 1200px;
  margin: 60px auto 0;
}

.value-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  position: relative;
  overflow: hidden;
}

.value-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}

.value-card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2), var(--shadow-md);
  transform: translateY(-6px);
}

.value-card:hover::before {
  transform: scaleX(1);
}

.value-card h3 {
  color: var(--primary);
  font-size: 18px;
  font-weight: 600;
  margin: 0 0 16px 0;
  font-family: 'Plus Jakarta Sans', sans-serif;
}

.value-card p {
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.7;
  margin: 0;
}

/* TITLES */
.section-title {
  font-size: 42px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  margin-bottom: 16px;
  color: var(--primary);
  letter-spacing: -1px;
}

.section-sub {
  color: var(--text-secondary);
  margin-bottom: 60px;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  font-size: 16px;
  line-height: 1.7;
}

/* CARDS */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 32px;
  justify-content: center;
  max-width: 1200px;
  margin: 0 auto;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px;
  box-shadow: var(--shadow-sm);
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  text-align: center;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}

.card:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.3), var(--shadow-md);
  transform: translateY(-4px);
}

.card:hover::before {
  transform: scaleX(1);
}

.card span {
  font-size: 40px;
  display: block;
  margin-bottom: 16px;
  filter: brightness(1);
  transition: transform 0.3s ease;
}

.card:hover span {
  transform: scale(1.15);
}

.card h3 {
  margin-bottom: 12px;
  color: var(--primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  margin-top: 0;
}

.card p {
  color: var(--text-secondary);
  font-size: 14px;
  margin: 0 0 16px 0;
}

/* EXPAND DETAILS */
.details {
  margin-top: 16px;
  display: none;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-secondary);
  animation: slideIn 0.3s ease;
  text-align: left;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.card.active .details {
  display: block;
}

.details ul {
  list-style: none;
  padding: 0;
  margin: 12px 0 0 0;
}

.details li {
  padding: 6px 0;
  color: var(--text-primary);
}

.details li:before {
  content: '• ';
  color: var(--primary);
  font-weight: bold;
  margin-right: 8px;
}

.details li:hover {
  color: var(--primary);
  transition: color 0.2s ease;
}

.details li a {
  color: inherit;
  text-decoration: none;
  display: inline;
  transition: all 0.3s ease;
  border-bottom: 2px solid transparent;
}

.details li a:hover {
  color: var(--primary);
  border-bottom-color: var(--primary);
}

.details li:hover a {
  color: var(--primary);
}

/* BOX */
.box {
  max-width: 900px;
  margin: 0 auto;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 50px;
  box-shadow: var(--shadow-sm);
  line-height: 1.9;
  text-align: left;
  color: var(--text-primary);
  animation: fadeInUp 0.8s ease;
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* CONTACT */
.contact-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-top: 40px;
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  max-width: 450px;
}

.contact-info .box {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 40px 32px;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
  position: relative;
  overflow: hidden;
}

.contact-info .box::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--primary);
  transform: scaleX(0);
  transition: transform 0.4s ease;
  transform-origin: left;
}

.contact-info .box:hover {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2), var(--shadow-md);
  transform: translateY(-4px);
}

.contact-info .box:hover::before {
  transform: scaleX(1);
}

.contact-info .box h3 {
  margin-bottom: 24px;
  color: var(--primary);
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 600;
  font-size: 18px;
}

.contact-map {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}

.contact-item {
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(34, 197, 94, 0.1);
  text-align: center;
}

.contact-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.contact-item strong {
  color: var(--primary);
  font-weight: 600;
}

.whatsapp-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 28px;
  background: linear-gradient(135deg, var(--primary), #16a34a);
  color: var(--bg-dark);
  text-decoration: none;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  margin-top: 28px;
  transition: all 0.3s cubic-bezier(0.23, 1, 0.320, 1);
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.whatsapp-button:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(34, 197, 94, 0.4);
}

/* FOOTER */
footer {
  background: linear-gradient(180deg, rgba(10,21,32,0) 0%, rgba(10,21,32,0.8) 100%),
              var(--bg-dark);
  color: var(--text-secondary);
  text-align: center;
  padding: 40px 32px;
  border-top: 1px solid var(--border-color);
  font-size: 14px;
  margin-top: 60px;
}

/* WHATSAPP FLUTUANTE (GLOBAL) */
.floating-whatsapp {
  position: fixed;
  bottom: 25px;
  right: 25px;
  background: var(--primary);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  text-decoration: none;
  color: var(--bg-dark);
  box-shadow: var(--shadow-lg);
  z-index: 2000;
  transition: all 0.3s ease;
  border: none;
}

.floating-whatsapp:hover {
  background: var(--primary-light);
  transform: scale(1.1);
  box-shadow: 0 20px 50px rgba(34, 197, 94, 0.5);
}

/* ARTICLES PAGE LAYOUT */
.article-page {
  min-height: calc(100vh - 200px);
  background: var(--bg-dark);
  color: var(--text-primary);
}

.article-container {
  display: grid;
  grid-template-columns: 70% 30%;
  gap: 40px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 60px 40px;
}

.article-content {
  grid-column: 1;
}

.article-sidebar {
  grid-column: 2;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* BREADCRUMB */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--text-secondary);
  margin-bottom: 30px;
  flex-wrap: wrap;
}

.breadcrumb a {
  color: var(--primary);
  text-decoration: none;
  transition: all 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--primary-light);
  text-decoration: underline;
}

.breadcrumb-sep {
  color: var(--text-secondary);
}

.breadcrumb-current {
  color: var(--text-primary);
  font-weight: 500;
}

/* ARTICLE HEADER */
.article-header {
  margin-bottom: 40px;
  padding-bottom: 30px;
  border-bottom: 1px solid var(--border-color);
}

.article-header h1 {
  font-size: 36px;
  font-weight: 700;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-primary);
  margin-bottom: 20px;
  line-height: 1.3;
}

/* ARTICLE META */
.article-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 14px;
  color: var(--text-secondary);
}

.meta-item {
  display: flex;
  gap: 6px;
}

.meta-item strong {
  color: var(--primary);
  font-weight: 600;
}

/* ARTICLE BODY */
.article-body {
  margin-bottom: 40px;
}

.article-body-wrapper {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 32px;
  margin-bottom: 30px;
}

.article-body p {
  font-size: 16px;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 20px;
  text-align: justify;
}

.article-body h2 {
  font-size: 24px;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 40px;
  margin-bottom: 20px;
}

/* SECTION NUMBERING */
.section-header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-top: 40px !important;
  margin-bottom: 20px !important;
  font-size: 24px !important;
  font-weight: 600 !important;
  color: var(--text-primary) !important;
}

.section-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 700;
  font-size: 26px;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  min-width: 50px;
}

/* SIDEBAR CARDS */
.sidebar-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 24px;
  transition: all 0.3s ease;
}

.sidebar-card:hover {
  border-color: rgba(34, 197, 94, 0.5);
  box-shadow: 0 8px 24px rgba(34, 197, 94, 0.15);
}

.sidebar-card h3 {
  font-size: 16px;
  font-weight: 600;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--primary);
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid rgba(34, 197, 94, 0.2);
}

/* SEARCH CARD */
.search-card {
  padding: 16px;
}

.search-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg-dark);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-primary);
  font-size: 14px;
  font-family: 'Inter', sans-serif;
  transition: all 0.3s ease;
}

.search-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.1);
}

.search-input::placeholder {
  color: var(--text-secondary);
}

.search-results {
  margin-top: 12px;
  max-height: 300px;
  overflow-y: auto;
}

.search-results a {
  display: block;
  padding: 10px 12px;
  background: rgba(34, 197, 94, 0.05);
  border-radius: 6px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 13px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
}

.search-results a:hover {
  background: rgba(34, 197, 94, 0.15);
  color: var(--primary);
}
.related-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.related-list li {
  margin: 0;
}

.related-list a {
  display: block;
  padding: 12px;
  background: rgba(34, 197, 94, 0.05);
  border-left: 3px solid transparent;
  border-radius: 6px;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 14px;
  line-height: 1.5;
  transition: all 0.3s ease;
}

.related-list a:hover {
  border-left-color: var(--primary);
  background: rgba(34, 197, 94, 0.1);
  padding-left: 16px;
  color: var(--primary);
}

/* SHARE BUTTONS */
.share-buttons {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.share-btn {
  padding: 12px 16px;
  border: 1px solid var(--border-color);
  background: rgba(34, 197, 94, 0.05);
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.3s ease;
}

.share-btn img {
  width: 18px;
  height: 18px;
  object-fit: contain;
}

.share-btn span {
  display: block;
}

.share-btn:hover {
  background: rgba(34, 197, 94, 0.15);
  border-color: rgba(34, 197, 94, 0.4);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.share-btn.share-whatsapp:hover {
  background: rgba(34, 197, 94, 0.2);
}

.share-btn.linkedin:hover {
  background: rgba(34, 197, 94, 0.2);
}

.share-btn.facebook:hover {
  background: rgba(34, 197, 94, 0.2);
}

.share-btn.copy-link:hover {
  background: rgba(34, 197, 94, 0.2);
}

/* Share WhatsApp Button - não usar position fixed */
.share-whatsapp {
  position: static !important;
  bottom: auto !important;
  right: auto !important;
}

/* ARTICLE NAVIGATION */
.article-nav {
  display: flex;
  gap: 20px;
  margin-top: 50px;
  padding-top: 30px;
  border-top: 1px solid var(--border-color);
  justify-content: space-between;
}

.nav-btn {
  flex: 1;
  padding: 16px 24px;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  text-align: center;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-btn:hover {
  background: rgba(34, 197, 94, 0.1);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.prev-btn {
  justify-content: flex-start;
  padding-left: 16px;
}

.next-btn {
  justify-content: flex-end;
  padding-right: 16px;
}

@media (max-width: 768px) {
  header {
    height: 64px;
  }

  .header-container {
    height: 64px;
    /* safe-area aware horizontal padding for tablet */
    padding-left: calc(16px + env(safe-area-inset-left, 0px));
    padding-right: calc(16px + env(safe-area-inset-right, 0px));
    flex-direction: row;
  }

  header .logo img {
    height: 36px;
  }

  nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    width: 100%;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 999;
    animation: slideDown 0.3s ease;
  }

  @keyframes slideDown {
    from {
      opacity: 0;
      transform: translateY(-10px);
    }
    to {
      opacity: 1;
      transform: translateY(0);
    }
  }

  nav.active {
    display: flex;
  }

  nav a {
    padding: 14px 20px;
    font-size: 14px;
    white-space: normal;
    border-radius: 0;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid rgba(34, 197, 94, 0.1);
    transition: all 0.3s ease;
  }

  nav a:hover {
    background: rgba(34, 197, 94, 0.1);
    padding-left: 24px;
  }

  .menu-toggle {
    display: flex;
  }

  .page {
    padding: 80px 5% 60px;
  }

  .section-title {
    font-size: 32px;
  }

  .section-sub {
    font-size: 15px;
    margin-bottom: 40px;
  }

  .search-box {
    flex-direction: column;
    margin-bottom: 40px;
    max-width: 100%;
  }

  .search-input {
    max-width: 100%;
    width: 100%;
  }

  .search-btn {
    width: 100%;
  }

  .nav-cards {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .nav-card {
    padding: 24px 16px;
  }

  .nav-card span {
    font-size: 36px;
  }

  .nav-card h3 {
    font-size: 16px;
  }

  .nav-card p {
    font-size: 13px;
  }

  .cards {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .card {
    padding: 32px;
  }

  /* Article improvements: breadcrumb mobile and article card layout */
  @media (max-width: 900px) {
    /* collapse to single column and tighten padding on small tablets/phones */
    .article-container {
      grid-template-columns: 1fr;
      padding: 32px 20px;
      gap: 24px;
    }

    .article-sidebar {
      order: 2;
    }

    .article-content {
      order: 1;
      width: 100%;
    }

    /* Breadcrumb: smaller, wrap and avoid overlap */
    .breadcrumb {
      font-size: 13px;
      gap: 6px;
      margin-bottom: 18px;
    }

    .breadcrumb a {
      font-size: 13px;
    }

    .breadcrumb-current {
      font-size: 13px;
    }
  }

  /* Improve reading experience: constrain measure and style card */
  .article-content .article-body-wrapper {
    max-width: 65ch;
    margin-left: 0;
    margin-right: 0;
    padding: 28px;
    box-shadow: var(--shadow-sm);
  }

  .article-content {
    display: block;
  }

  /* On wide screens, center the readable column within the left column */
  @media (min-width: 901px) {
    .article-content {
      max-width: 800px;
    }
    .article-body-wrapper {
      margin: 0 0 24px 0;
    }
  }

  /* Reduce h1 size on very small devices to avoid overflow */
  @media (max-width: 420px) {
    .article-header h1 {
      font-size: 26px;
      line-height: 1.25;
    }
    .article-body p {
      font-size: 15px;
    }
  }

  .about-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .about-image img {
    max-height: 300px;
  }

  .about-text {
    text-align: left;
  }

  .values-container {
    grid-template-columns: 1fr;
  }

  .value-card {
    padding: 28px;
  }

  .box {
    padding: 32px;
  }

  footer {
    padding: 24px 5%;
    font-size: 12px;
  }

  .floating-whatsapp {
    bottom: 20px;
    right: 20px;
    width: 56px;
    height: 56px;
    font-size: 24px;
  }

  /* Article responsive tablet */
  .article-container {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 40px 20px;
  }

  .article-content {
    grid-column: 1;
  }

  .article-sidebar {
    grid-column: 1;
  }

  .breadcrumb {
    font-size: 13px;
    gap: 4px;
    margin-bottom: 20px;
  }

  .article-header h1 {
    font-size: 28px;
  }

  .article-body-wrapper {
    padding: 24px;
  }

  .article-body p {
    font-size: 15px;
  }

  .article-body h2 {
    font-size: 20px;
  }

  .section-header {
    font-size: 20px !important;
  }

  .section-num {
    font-size: 22px;
    min-width: 40px;
  }

  .article-nav {
    flex-direction: column;
  }

  .nav-btn {
    width: 100%;
  }

  /* Mobile breadcrumb fixes */
  .breadcrumb {
    position: relative;
    margin-top: 16px;
    padding: 0 16px;
    white-space: normal;
    line-height: 1.4;
  }

  .breadcrumb a,
  .breadcrumb span {
    display: inline;
  }

  .breadcrumb-sep {
    word-break: break-word;
  }

  /* Mobile article page spacing - compensate for fixed header (64px) */
  .article-page {
    padding-top: 80px;
  }

  .article-container {
    padding-top: 0;
  }
}

@media (max-width: 480px) {
  header {
    height: 64px;
  }

  .header-container {
    height: 64px;
    /* safe-area aware horizontal padding for small screens */
    padding-left: calc(12px + env(safe-area-inset-left, 0px));
    padding-right: calc(12px + env(safe-area-inset-right, 0px));
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    gap: 0;
  }

  header .logo img {
    height: 32px;
  }

  nav {
    display: none;
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    background: var(--bg-dark);
    flex-direction: column;
    width: 100%;
    padding: 0;
    border-bottom: 1px solid var(--border-color);
    max-height: calc(100vh - 64px);
    overflow-y: auto;
    z-index: 999;
    animation: slideDown 0.3s ease;
  }

  nav.active {
    display: flex;
  }

  nav a {
    padding: 12px 16px;
    font-size: 12px;
    white-space: nowrap;
    border-bottom: 1px solid rgba(34, 197, 94, 0.1);
  }

  nav a:last-child {
    border-bottom: none;
  }

  .page {
    padding: 70px 4% 50px;
  }

  .section-title {
    font-size: 26px;
    margin-bottom: 12px;
  }

  .section-sub {
    font-size: 13px;
    margin-bottom: 30px;
  }

  .search-box {
    margin-bottom: 30px;
    gap: 8px;
  }

  .search-input {
    padding: 10px 12px;
    font-size: 13px;
  }

  .search-btn {
    padding: 10px 20px;
    font-size: 12px;
  }

  .nav-cards {
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 40px;
  }

  .nav-card {
    padding: 20px 12px;
  }

  .nav-card span {
    font-size: 32px;
    margin-bottom: 12px;
  }

  .nav-card h3 {
    font-size: 15px;
    margin-bottom: 6px;
  }

  .nav-card p {
    font-size: 12px;
  }

  .cards {
    gap: 16px;
  }

  .card {
    padding: 24px;
  }

  .card span {
    font-size: 32px;
  }

  .card h3 {
    font-size: 16px;
  }

  .card p {
    font-size: 13px;
  }

  .details {
    font-size: 13px;
  }

  .about-image {
    margin-bottom: 20px;
  }

  .about-image img {
    max-height: 250px;
  }

  .about-text p {
    font-size: 14px;
    margin-bottom: 16px;
  }

  .values-container {
    gap: 16px;
  }

  .value-card {
    padding: 20px;
    text-align: center;
  }

  .value-card h3 {
    font-size: 15px;
    margin-bottom: 10px;
  }

  .value-card p {
    font-size: 13px;
  }

  .contact-info {
    max-width: 100%;
  }

  .contact-info .box {
    padding: 24px 16px;
    margin: 0 auto;
  }

  .contact-item {
    text-align: left;
    font-size: 13px;
  }

  .whatsapp-button {
    width: auto;
    padding: 12px 20px;
    font-size: 14px;
    margin-top: 20px;
  }

  .box {
    padding: 24px;
  }

  .contact-item {
    margin-bottom: 16px;
    padding-bottom: 16px;
  }

  .contact-container {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .contact-map iframe {
    height: 300px;
  }

  .whatsapp-button {
    width: 100%;
    justify-content: center;
  }

  footer {
    padding: 20px 3%;
    font-size: 11px;
  }

  .whatsapp {
    width: 52px;
    height: 52px;
    font-size: 22px;
  }

  /* Article mobile styles */
  .article-page {
    min-height: auto;
  }

  .article-container {
    grid-template-columns: 1fr;
    padding: 20px 3%;
    gap: 20px;
  }

  .article-header h1 {
    font-size: 22px;
    margin-bottom: 16px;
  }

  .article-meta {
    font-size: 12px;
    gap: 8px;
  }

  .article-body p {
    font-size: 14px;
    line-height: 1.6;
  }

  .article-body h2 {
    font-size: 18px;
    margin-top: 30px;
  }

  .section-header {
    font-size: 18px !important;
    gap: 8px;
  }

  .section-num {
    font-size: 18px;
    min-width: 35px;
  }

  .breadcrumb {
    font-size: 12px;
    margin-bottom: 20px;
  }

  .sidebar-card {
    padding: 16px;
  }

  .sidebar-card h3 {
    font-size: 14px;
    margin-bottom: 12px;
  }

  .share-btn {
    font-size: 12px;
    padding: 10px 12px;
  }

  .article-nav {
    flex-direction: column;
    gap: 12px;
    margin-top: 30px;
    padding-top: 20px;
  }

  .nav-btn {
    font-size: 12px;
    padding: 12px 16px;
  }
}

/* Instagram Section */
.instagram-section {
  display: flex;
  justify-content: center;
  margin: 60px 0 40px;
}

.instagram-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 80px;
  height: 80px;
  background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
  border-radius: 50%;
  font-size: 40px;
  color: white;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
  text-decoration: none;
}

.instagram-link:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.instagram-link i {
  color: white;
}
