/* ==========================================================================
   Header / Navbar / Footer / Social Sidebar / Shared Modal Chrome
   ========================================================================== */

/* --- Page-enter fade --- */
body {
  opacity: 1;
}

.js-ready body,
html.js body {
  animation: pageEnter 0.35s ease both;
}

@keyframes pageEnter {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* --- Full-page loader (shown on page load/refresh, hidden once the page is ready) --- */
.page-loader {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: var(--white);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 1;
  transition: opacity 0.3s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.loader-cube-grid {
  width: 60px;
  height: 60px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 6px;
  margin-bottom: 20px;
}

.loader-cube-grid .cube {
  width: 100%;
  height: 100%;
  border-radius: 4px;
  animation: cubeGridScale 1.3s infinite ease-in-out;
}

.loader-cube-grid .cube1 { background-color: var(--bg-dark-grey); animation-delay: 0.2s; }
.loader-cube-grid .cube2 { background-color: #C182B5; animation-delay: 0.3s; }
.loader-cube-grid .cube3 { background-color: var(--logo-purple); animation-delay: 0s; }
.loader-cube-grid .cube4 { background-color: var(--accent-coral); animation-delay: 0.1s; }

@keyframes cubeGridScale {
  0%, 70%, 100% { transform: scale3d(1, 1, 1); opacity: 1; }
  35% { transform: scale3d(0, 0, 1); opacity: 0.2; }
}

.loader-text {
  font-size: 16px;
  font-weight: 700;
  color: var(--logo-purple);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  animation: fadeText 1.3s infinite ease-in-out;
}

@keyframes fadeText {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* --- Header / Navbar --- */
.site-header {
  background-color: var(--white);
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  border-bottom: 2px solid var(--bg-light-grey);
}

.nav-container {
  max-width: var(--container-max);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  gap: 20px;
}

.brand-link {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  text-decoration: none;
}

.brand-logo-img {
  height: 38px;
  width: auto;
  object-fit: contain;
}

@media (min-width: 576px) {
  .brand-logo-img { height: 42px; }
}

@media (min-width: 768px) {
  .brand-logo-img { height: 46px; }
}

@media (min-width: 1200px) {
  .brand-logo-img { height: 50px; }
}

.nav-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--bg-dark-grey);
  cursor: pointer;
  flex-shrink: 0;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
}

.nav-toggle .icon-close {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-open {
  display: none;
}

.nav-toggle[aria-expanded="true"] .icon-close {
  display: block;
}

@media (min-width: 992px) {
  .nav-toggle { display: none; }
}

.primary-nav {
  position: fixed;
  top: var(--header-height);
  left: 0;
  width: 100%;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  flex-direction: column;
  align-items: stretch;
  gap: 30px;
  max-height: calc(100vh - var(--header-height));
  overflow-y: auto;
  padding: 18px 20px 26px;
  display: none;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.06);
}

.primary-nav.is-open {
  display: flex;
}

@media (min-width: 992px) {
  .primary-nav {
    position: static;
    width: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    flex-direction: row;
    align-items: center;
    max-height: none;
    overflow: visible;
    padding: 0;
    display: flex;
    flex: 1;
    justify-content: flex-end;
  }
}

.nav-links {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

@media (min-width: 992px) {
  .nav-links {
    flex-direction: row;
    align-items: center;
    gap: 4px;
    margin-right: 24px;
  }
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  transition: all 0.2s ease;
  padding: 12px 14px;
  border-radius: 6px;
  display: block;
}

@media (min-width: 992px) {
  .nav-links a {
    font-size: 14px;
    padding: 8px 14px;
  }
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--logo-purple);
  background-color: var(--logo-purple-tint);
}

.nav-cta-btn {
  background-color: var(--logo-purple);
  color: var(--white);
  padding: 12px 20px;
  border-radius: 8px;
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: none;
  cursor: pointer;
  transition: all var(--transition);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 4px 12px rgba(104, 74, 144, 0.2);
  width: 100%;
}

@media (min-width: 992px) {
  .nav-cta-btn { width: auto; }
}

.nav-cta-btn:hover,
.nav-cta-btn:focus-visible {
  background-color: var(--logo-purple-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(104, 74, 144, 0.3);
}

.nav-cta-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.5;
}

.section-cta-container {
  text-align: center;
  margin: 40px 0 0;
}

main {
  margin-top: var(--header-height);
}

/* --- Sticky social sidebar ---
   Hidden below desktop: on narrow viewports a fixed right-edge rail overlaps
   page content (text, buttons, cards) with no reserved space for it. The
   same links already live in the footer on every page, and again in the
   Contact page's "Follow Us" row, so nothing is lost by hiding it. --- */
.social-sidebar {
  display: none;
}

@media (min-width: 1200px) {
  .social-sidebar {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 900;
    display: flex;
    flex-direction: column;
  }
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  color: white;
  transition: all 0.3s ease;
  border-radius: 8px 0 0 8px;
  margin-bottom: 6px;
  box-shadow: -2px 2px 8px rgba(0, 0, 0, 0.15);
}

@media (min-width: 768px) {
  .social-icon { width: 50px; height: 50px; }
}

.social-icon:hover,
.social-icon:focus-visible {
  width: 54px;
  transform: translateX(-5px);
}

.social-icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

@media (min-width: 768px) {
  .social-icon svg { width: 24px; height: 24px; }
}

.social-icon.whatsapp { background-color: var(--whatsapp-color); }
.social-icon.instagram { background-color: var(--instagram-color); }
.social-icon.linkedin { background-color: var(--linkedin-color); }
.social-icon.x-twitter { background-color: var(--x-color); }
.social-icon.you-tube { background-color: var(--youtube-color); }

/* --- Footer --- */
.site-footer {
  background: var(--bg-dark-grey);
  color: #94A3B8;
  padding: 40px 0 24px;
  margin-top: 0;
}

.footer-grid {
  display: grid;
  gap: 32px;
  margin-bottom: 28px;
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
}

.footer-brand p {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.6;
  max-width: 32ch;
}

.footer-heading {
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 14px;
}

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-links a {
  color: #94A3B8;
  text-decoration: none;
  font-size: 14.5px;
  transition: color 0.2s ease;
}

.footer-links a:hover,
.footer-links a:focus-visible {
  color: var(--white);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding-top: 20px;
  text-align: center;
  font-size: 13.5px;
}

/* --- Shared modal chrome --- */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(8px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: all 0.4s ease;
}

.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: #F1F5F9;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #64748B;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.modal-close-btn svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
}

.modal-close-btn:hover,
.modal-close-btn:focus-visible {
  background-color: #E2E8F0;
  color: var(--text-dark);
  transform: rotate(90deg);
}
