/* layout.css - Header, Footer, Drawer Navigation */

/* Header */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  background: var(--clr-white);
  box-shadow: var(--shadow-sm);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.header.hide {
  transform: translateY(-100%);
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 80px;
}

.logo {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--clr-dark);
}

.logo img {
  height: 48px;
  width: auto;
}

/* Desktop Navigation */
.nav-links {
  display: none;
  list-style: none;
  margin: 0; padding: 0;
  align-items: center;
  gap: var(--space-md);
}

.nav-links a {
  color: var(--clr-dark);
  font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--clr-green);
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }
}

/* Hamburger Icon */
.hamburger {
  display: block;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 1002;
}

.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--clr-dark);
  margin: 5px 0;
  transition: 0.3s;
}

@media (min-width: 900px) {
  .hamburger {
    display: none;
  }
}

/* Mobile Drawer Nav */
.drawer-backdrop {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 1001;
  opacity: 0;
  visibility: hidden;
  transition: 0.3s;
}

.drawer-backdrop.active {
  opacity: 1;
  visibility: visible;
}

.drawer {
  position: fixed;
  top: 0; right: -320px;
  width: 320px;
  max-width: 88vw;
  height: 100%;
  height: 100vh;
  height: 100dvh;
  max-height: 100dvh;
  background: var(--clr-white);
  z-index: 1002;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 1.25rem 1.25rem;
  padding-bottom: max(1.5rem, env(safe-area-inset-bottom, 1.5rem));
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 25px rgba(0,0,0,0.18);
  box-sizing: border-box;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}

.drawer.active {
  right: 0;
}

.drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(0,0,0,0.08);
  margin-bottom: 0.75rem;
  flex-shrink: 0;
}

.drawer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--clr-dark);
}

.drawer-brand img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.drawer-close {
  background: #f1f3f4;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  color: var(--clr-dark);
  cursor: pointer;
  transition: all 0.2s ease;
  line-height: 1;
}

.drawer-close:hover,
.drawer-close:focus {
  background: var(--clr-orange);
  color: #FFFFFF;
  transform: rotate(90deg);
}

.drawer-links {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.drawer-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.65rem;
  font-size: 1.05rem;
  color: var(--clr-dark);
  font-weight: 500;
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
}

.drawer-links a:hover {
  background: rgba(46, 125, 50, 0.08);
  color: var(--clr-green);
  padding-left: 0.95rem;
}

.drawer-footer {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(0,0,0,0.08);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  flex-shrink: 0;
  padding-bottom: max(0.75rem, env(safe-area-inset-bottom, 0.75rem));
}

.drawer-footer .btn {
  padding: 0.7rem 1rem;
  font-size: 0.95rem;
}

/* Footer (Smile Foundation Style) */
.footer {
  background-color: var(--clr-footer-bg); /* #383838 neutral matte charcoal */
  color: #FFFFFF;
  padding: 3rem 0 0;
  font-family: var(--font-body);
}

.footer-content {
  display: flex;
  flex-direction: column;
}

.footer-columns {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-col-title {
  color: #FFFFFF;
  font-size: 0.92rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.75px;
  margin-bottom: 1rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid rgba(255, 255, 255, 0.25);
  display: inline-block;
  font-family: var(--font-body);
}

.footer-col-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-col-links li {
  margin: 0;
}

.footer-col-links a {
  color: #CCCCCC;
  font-size: 0.88rem;
  text-decoration: none;
  transition: color 0.2s ease, padding-left 0.2s ease;
  display: inline-block;
}

.footer-col-links a:hover {
  color: #FBB040;
  padding-left: 4px;
}

.footer-badge-text {
  font-size: 0.78rem;
  color: #A3D9A5;
  background: rgba(46, 125, 50, 0.2);
  padding: 0.2rem 0.5rem;
  border-radius: 3px;
  display: inline-block;
}

.footer-divider {
  width: 100%;
  height: 1px;
  background: rgba(255, 255, 255, 0.12);
  margin: 1.25rem 0 1.75rem;
}

.footer-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin-bottom: 1.75rem;
}

.footer-org-name {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #FFFFFF;
  font-size: 1.15rem;
  font-weight: 700;
  margin: 0 0 0.4rem;
}

.footer-org-logo {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

.footer-address-text {
  color: #CCCCCC;
  font-size: 0.88rem;
  margin: 0 0 0.35rem;
  line-height: 1.5;
}

.footer-contact-text {
  color: #DDDDDD;
  font-size: 0.86rem;
  margin: 0 0 0.5rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

.footer-sep {
  color: rgba(255, 255, 255, 0.3);
}

.footer-status-pill {
  color: #E2E8F0;
  font-size: 0.82rem;
  margin: 0.4rem 0 0;
  display: inline-block;
  background: rgba(255, 255, 255, 0.08);
  padding: 0.3rem 0.7rem;
  border-radius: 4px;
}

.footer-social-icons {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.social-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #222222;
  color: #FFFFFF !important;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.social-circle i {
  color: #FFFFFF !important;
  font-size: 1.25rem;
  line-height: 1;
}

.social-circle svg {
  width: 18px;
  height: 18px;
  fill: #FFFFFF;
  display: block;
}

.social-circle:hover {
  background: var(--clr-orange);
  color: #FFFFFF !important;
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(247, 147, 30, 0.4);
}

.social-circle:hover svg {
  fill: #FFFFFF;
}

/* Newsletter row */
.footer-newsletter-row {
  background: rgba(0, 0, 0, 0.2);
  border-radius: var(--radius-sm);
  padding: 1.25rem 1.5rem;
  margin-bottom: 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.newsletter-title {
  font-size: 1rem;
  font-weight: 600;
  color: #FFFFFF;
  white-space: nowrap;
}

.footer-newsletter-form {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex: 1;
  max-width: 620px;
  justify-content: flex-end;
}

.newsletter-input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.4);
  color: #FFFFFF;
  padding: 0.45rem 0.25rem;
  font-size: 0.88rem;
  outline: none;
  flex: 1;
  min-width: 130px;
  transition: border-color 0.2s;
}

.newsletter-input:focus {
  border-bottom-color: #FBB040;
}

.newsletter-input::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.newsletter-btn {
  background: #7CB342; /* Smile Foundation warm green CTA */
  color: #FFFFFF;
  border: none;
  border-radius: 4px;
  padding: 0.6rem 1.35rem;
  font-weight: 700;
  font-size: 0.82rem;
  letter-spacing: 0.5px;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.newsletter-btn:hover {
  background: #689F38;
  transform: translateY(-1px);
}

/* Bottom Strip */
.footer-bottom-strip {
  background-color: var(--clr-footer-strip); /* #262626 */
  padding: 1.15rem 0;
  font-size: 0.84rem;
  color: #999999;
}

.footer-bottom-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-bottom-inner p {
  margin: 0;
}

.footer-bottom-links {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-bottom-links a {
  color: #AAAAAA;
  text-decoration: none;
  transition: color 0.2s;
}

.footer-bottom-links a:hover {
  color: #FFFFFF;
}

/* Mobile Responsiveness (Compact, space-saving Smile Foundation layout) */
@media (max-width: 768px) {
  .footer {
    padding: 2.25rem 0 0;
  }

  .footer-columns {
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem 0.85rem;
    margin-bottom: 1.5rem;
  }

  .footer-col-title {
    font-size: 0.86rem;
    margin-bottom: 0.65rem;
    padding-bottom: 0.3rem;
  }

  .footer-col-links {
    gap: 0.4rem;
  }

  .footer-col-links a {
    font-size: 0.82rem;
  }

  .footer-divider {
    margin: 1rem 0 1.25rem;
  }

  .footer-info-row {
    flex-direction: column;
    text-align: center;
    gap: 1.15rem;
    margin-bottom: 1.25rem;
    width: 100%;
  }

  .footer-org-name {
    justify-content: center;
    font-size: 1.05rem;
    text-align: center;
  }

  .footer-address-text {
    font-size: 0.84rem;
    line-height: 1.45;
    word-break: break-word;
    max-width: 320px;
    margin: 0 auto 0.4rem;
  }

  .footer-contact-text {
    justify-content: center;
    font-size: 0.82rem;
    gap: 0.35rem;
    flex-direction: column;
    margin: 0 auto;
  }

  .footer-sep {
    display: none;
  }

  .footer-status-pill {
    font-size: 0.76rem;
    line-height: 1.4;
    max-width: 320px;
    margin: 0.4rem auto 0;
  }

  .footer-social-icons {
    justify-content: center;
    gap: 0.75rem;
  }

  .social-circle {
    width: 38px;
    height: 38px;
    font-size: 1.15rem;
  }

  .footer-newsletter-row {
    flex-direction: column;
    align-items: stretch;
    padding: 1.15rem 1rem;
    margin-bottom: 1.5rem;
    gap: 0.85rem;
    text-align: center;
  }

  .newsletter-title {
    font-size: 0.95rem;
  }

  .footer-newsletter-form {
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    gap: 0.75rem;
  }

  .newsletter-input {
    width: 100%;
    text-align: center;
  }

  .newsletter-btn {
    width: 100%;
    padding: 0.7rem;
  }

  .footer-bottom-inner {
    flex-direction: column;
    text-align: center;
    gap: 0.4rem;
  }
}

/* Floating WhatsApp Button */
.whatsapp-float {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background-color: #25d366;
  color: #fff;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  transition: transform var(--transition-fast);
}

.whatsapp-float:hover {
  transform: translateY(-5px) scale(1.05);
  color: #fff;
}
