*{
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Istok Web";
}

body{
  background-color: #f4f4f4;
}

nav {
  background-color: #800000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 20px;
  position: fixed; /* Keeps it fixed on top */
  top: 0;
  left: 0;
  width: 100%;
  height: 80px; /* Adjust as needed */
  z-index: 1000; /* Ensures it stays above other content */
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2); 
}

.logo-container{
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-container img {
  height: 70px; 
}

.logo-container div{
  display: flex;
  flex-direction: column;
  align-items: center;
}

.logo-container h1 {
    display: flex;
    flex-direction: column;
    align-items: center; 
    color: #ffffff; 
}

.logo-container .maru-health {
    font-size: 32px;
    font-weight: bold;
    line-height: 1.1; 
}

.logo-container .barangay-title {
    font-size: 11px; 
    font-weight: 400;
    line-height: 8px; 
}

.menu-toggle {
  display: none;
  color: white;
  font-size: 26px;
  cursor: pointer;
  transition: transform 0.3s ease;
  z-index: 1;
}

.menu-toggle.active {
  transform: rotate(90deg);
}

.menu-toggle i {
  transition: transform 0.3s ease, opacity 0.2s ease;
}

.menu-toggle.open {
  transform: rotate(90deg);
}

.nav-links{
  height: 100%;
}

.nav-links ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 100%;
}

.nav-links ul li {
  display: inline;
  padding: 10px;
}

.nav-links ul li a {
  text-decoration: none;
  color: white;
  font-weight: bold;
  display: flex;              /* Use flexbox for centering */
  justify-content: center;    /* Center horizontally */
  align-items: center;        /* Center vertically */
  height: 100%;          
}


.login-button {
  color: #800000 !important;
  background-color: white;
  padding: 5px 15px;
  border-radius: 5px;
  font-weight: bold;
  text-decoration: none;
  height: auto !important;
}

.nav-profile-pic {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-profile-name{
    display: none;
}

.address-contact{
  background-color: #720000;
  width: 100%;
  display: flex;
  justify-content: space-between;
  z-index: 1;
  padding: 0 40px;
}

.address-contact p{
  color: white;
}

/* footer */
footer {
  background: linear-gradient(to right, #b61924, #8b0000);
  color: white;
  font-family: 'Istok Web', sans-serif;
  padding-top: 20px;
}

.footer-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 30px;
  padding: 20px 100px;
}

.footer-logo-container{
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.footer-logo-section {
  display: flex;
  align-items: center;
  gap: 15px;
}

.footer-logo {
  width: 150px;
  height: 150px;
}

.footer-logo-section h3 {
  line-height: 1.3;
  font-size: 2rem;
}

.footer-text p {
  font-size: 20px;
}


.footer-links h4 {
  margin-bottom: 10px;
  font-weight: bold;
  font-size: 20px;
}

.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links ul li {
  margin-bottom: 6px;
}

.footer-links ul li a {
  color: white;
  text-decoration: none;
}

.footer-links ul li a:hover {
  text-decoration: underline;
}

.footer-bottom {
  padding: 15px 100px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 14px;
  background-color: #800000;
}

.footer-policy a {
  color: white;
  text-decoration: none;
  margin: 0 5px;
}

.footer-policy a:hover {
  text-decoration: underline;
}
  
@media (max-width: 1024px) {
  .nav-links ul {
    gap: 10px;
  }

  .logo-container img {
    height: 60px;
  }

  .logo-container div h1 {
    font-size: 20px;
  }
}

@media (max-width: 900px) {
  nav {
    height: auto;
    flex-wrap: wrap;
    padding: 10px 20px;
  }

  .menu-toggle {
    display: block;
    position: fixed;
    top: 20px;
    right: 20px;
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -300px;
    width: 300px;
    height: 100vh;
    background-color: #800000;
    flex-direction: column;
    padding-top: 60px;           /* ← moved up 50px */
    transition: right 0.3s ease-in-out;
    box-shadow: -2px 0 5px rgba(0,0,0,0.2);
  }

  .nav-links ul {
    flex-direction: column;
    width: 100%;
    gap: 0;
    padding: 10px 0;
  }

  .nav-links ul li {
    width: 100%;
    padding: 15px 25px;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
  }

  /* show profile entry above the rest when available */
  .nav-links ul li.profile-nav {
    order: -1;
    border-top: none;
    padding: 12px 25px 8px;
    position: relative;
    top: -5px;     
  }

  .nav-links ul li a {
    width: 100%;
    padding: 5px;
    justify-content: flex-start;
  }

  .nav-links ul li a.login-button {
    justify-content: center;
  }

  .nav-links ul li a.profile {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    color: white;
  }

  .nav-profile-name {
    display: flex;
    font-size: 14px;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .nav-links.active {
    display: flex;
    right: 0;
  }

  .logo-container {
    justify-content: space-between;
  }

  .nav-profile-pic {
    width: 40px;
    height: 40px;
  }

  .login-button {
    padding: 8px 12px;
    font-size: 14px;
  }
}

@media (max-width: 768px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 30px 20px;
  }

  .footer-logo {
    width: 120px;
    height: 120px;
  }

  .footer-logo-section {
      justify-content: center;
  }

  .footer-logo-section h3 {
    font-size: 1.2rem;
  }

  .footer-text p {
    font-size: 16px;
  }

  .footer-links h4 {
    margin-top: 15px;
    font-size: 18px;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
    gap: 10px;
    padding: 15px 20px;
  }
}

@media (max-width: 600px) {
  .logo-container img {
    height: 50px;
  }

  .logo-container div h1 {
    font-size: 18px;
    align-items: flex-start; 
  }

  .menu-toggle {
    font-size: 22px;
  }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInSlideDown {
  from { opacity: 1; transform: translateX(-500px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInSlideDown {
  from { opacity: 0; transform: translateY(-100px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes popUp {
  from { opacity: 0; transform: scale(0.92); }
  to   { opacity: 1; transform: scale(1); }
}

@keyframes fadeInUp {
  from {opacity: 0; transform: translateY(20px); }
  to   {opacity: 1; transform: translateY(0); }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

@keyframes shakeOnce {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-6px); }
    20%, 40%, 60%, 80%     { transform: translateX(6px); }
}

@keyframes logoAppear {
    0% {
        opacity: 0;
        transform: scale(0.7);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}