/* ============================================== */
/* TERATAI SPA Beauty & Wellness Theme (v2 Clean) */
/* ============================================== */

/* ----- Global Styles ----- */
:root {
  --primary: #12466d;
  --primary-dark: #0d3350;
  --bg-light: #f7f7f7;
  --bg-page: #fafafa;
  --text-dark: #333;
  --shadow: rgba(18, 70, 109, 0.1);
}

body {
  margin: 0;
  font-family: 'Segoe UI', Arial, sans-serif;
  color: var(--text-dark);
  background: var(--bg-page);
  line-height: 1.6;
}

.container {
  width: 90%;
  max-width: 1200px;
  margin: auto;
  padding: 0 24px;
}

h1, h2, h3 {
  font-family: 'Georgia', serif;
  color: var(--primary);
  margin: 0 0 16px;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.2rem; }

/* ============================================== */
/* NAVBAR */
/* ============================================== */
.navbar {
  background: #fff;
  border-bottom: 1px solid #eee;
  position: sticky;
  top: 0;
  z-index: 2000;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
}

.logo img {
  height: 56px;
}

/* Nav links */
nav ul {
  display: flex;
  align-items: center;
  gap: 18px;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav ul li a {
  text-decoration: none;
  color: var(--text-dark);
  padding: 6px 10px;
  border-radius: 6px;
  transition: background 0.2s, color 0.2s;
}
nav ul li a:hover {
  color: var(--primary);
  background: rgba(18,70,109,0.05);
}
nav ul li a.active {
  color: #fff;
  background: var(--primary);
  box-shadow: 0 2px 8px var(--shadow);
}

/* Login button */
.nav-login-btn {
  background: var(--primary);
  color: #fff !important;
  padding: 8px 14px;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.3s;
}
.nav-login-btn:hover {
  background: var(--primary-dark);
}

/* Dropdown */
.dropdown {
  position: relative;
}
.dropdown-toggle {
  cursor: pointer;
  color: var(--text-dark);
  padding: 6px 8px;
  border-radius: 4px;
}
.dropdown-menu {
  display: none;
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  min-width: 160px;
  padding: 8px 0;
  z-index: 2100;
}
.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
  display: block;
}
.dropdown-menu button {
  width: 100%;
  border: none;
  background: none;
  color: var(--primary);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  border-radius: 6px;
  cursor: pointer;
}
.dropdown-menu button:hover {
  background: var(--primary);
  color: #fff;
}

/* Hamburger */
.menu-toggle {
  display: none;
  font-size: 26px;
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
}

/* ============================================== */
/* MODAL */
/* ============================================== */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  justify-content: center;
  align-items: center;
  z-index: 3000;
  animation: fadeInBg 0.3s forwards;
}
.modal.open { display: flex; }
.modal-content {
  background: #fff;
  border-radius: 12px;
  padding: 24px;
  max-width: 420px;
  width: 90%;
  position: relative;
  animation: fadeInScale 0.4s forwards;
}
.modal-content h2 { color: var(--primary); margin-bottom: 12px; }
.modal-content input {
  width: 100%;
  padding: 10px 12px;
  margin: 8px 0;
  border: 1px solid #ddd;
  border-radius: 8px;
}
.modal-content button {
  width: 100%;
  padding: 11px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
  transition: background 0.3s;
}
.modal-content button:hover { background: var(--primary-dark); }
.modal-content .close {
  position: absolute;
  right: 12px;
  top: 10px;
  font-size: 22px;
  color: #666;
  cursor: pointer;
}

/* Switch links */
.switch { margin-top: 15px; font-size: 0.9rem; }
.switch a {
  color: var(--primary);
  font-weight: bold;
  text-decoration: none;
}
.switch a:hover { text-decoration: underline; }

/* ============================================== */
/* HERO */
/* ============================================== */
.hero {
  height: 90vh;
  background: url('images/hero1.jpg') center/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  position: relative;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(108, 128, 143, 0.55);
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 700px;
  padding: 20px;
}
.hero h1 { font-size: 2.5rem; margin-bottom: 16px; }
.hero p { font-size: 1.2rem; margin-bottom: 24px; }
.hero .btn {
  background: #fff;
  color: var(--primary);
  padding: 12px 24px;
  border-radius: 8px;
  font-weight: bold;
  text-decoration: none;
  transition: 0.3s;
}
.hero .btn:hover {
  background: var(--primary);
  color: #fff;
}

/* ============================================== */
/* SECTIONS */
/* ============================================== */
section {
  padding: 60px 20px;
}
.services, .products {
  background: var(--bg-light);
}

/* Grid Cards */
.service-grid, .product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 30px;
  max-width: 1200px;
  margin: 0 auto;
}
.service-card, .product-card {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 10px var(--shadow);
  text-align: center;
  padding: 28px 20px;
  transition: transform 0.3s, box-shadow 0.3s;
}
.service-card:hover, .product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px var(--shadow);
}
.service-card img, .product-card img {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  margin-bottom: 20px;
  transition: transform 0.3s;
}
.service-card:hover img, .product-card:hover img {
  transform: scale(1.08);
}
.price {
  display: inline-block;
  margin-top: 10px;
  padding: 6px 12px;
  background: #e6eef5;
  border-radius: 8px;
  color: var(--primary);
  font-weight: bold;
  font-size: 1.1rem;
}

/* ===== View All Services Button ===== */
.services .btn {
  display: inline-block;
  margin-top: 30px;
  background: #12466d;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 12px 24px;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(18,70,109,0.15);
}

.services .btn:hover {
  background: #0d3350;
  box-shadow: 0 6px 16px rgba(18,70,109,0.25);
  transform: translateY(-3px);
}

.services .btn:active {
  transform: translateY(0);
  box-shadow: 0 3px 8px rgba(18,70,109,0.2);
}


/* ============================================== */
/* CONTACT + FOOTER */
/* ============================================== */
.contact {
  text-align: center;
}
.contact a {
  color: var(--primary);
  text-decoration: none;
}
.contact a:hover {
  text-decoration: underline;
}
footer {
  background: var(--primary);
  color: #fff;
  text-align: center;
  padding: 20px;
}
footer a {
  color: #fff;
  text-decoration: none;
}
footer a:hover { text-decoration: underline; }

/* ============================================== */
/* ANIMATIONS */
/* ============================================== */
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: scale(1); }
}
@keyframes fadeInBg {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ============================================== */
/* RESPONSIVE DESIGN */
/* ============================================== */
@media (max-width: 900px) {
  .navbar .container {
    flex-direction: column;
    align-items: flex-start;
    position: relative;
  }
  nav ul {
    flex-direction: column;
    width: 100%;
    background: #fff;
    border-top: 1px solid #eee;
    padding: 10px 0;
    display: none;
  }
  nav ul.show {
    display: flex;
  }
  .menu-toggle {
    display: block;
    margin-left: auto;
  }
  nav ul li { width: 100%; }
  nav ul li a {
    display: block;
    padding: 10px 14px;
  }

  /* Dropdown inside mobile */
  .dropdown-menu {
    position: static;
    box-shadow: none;
    padding: 0;
  }
  .dropdown-menu button {
    background: #fff;
    margin: 4px 0;
  }

  .hero { height: 70vh; padding: 30px 15px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }

  .service-grid, .product-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .modal-content {
    max-width: 90%;
    padding: 20px;
  }
}

@media (min-width: 901px) {
  .menu-toggle { display: none; }
}

/* Smooth scroll behavior for anchor links */
html {
  scroll-behavior: smooth;
}

/* Active nav link transition */
.navbar nav ul li a.active {
  background: var(--primary);
  color: #fff !important;
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(18,70,109,0.12);
  transition: background 0.3s, color 0.3s;
}

/* Fade animations for scroll entrance */
.fade-up, .fade-left {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-left { transform: translateX(30px); }
.fade-up.visible, .fade-left.visible {
  opacity: 1;
  transform: none;
}
