/* ---------- GLOBAL: prevent horizontal scroll & clamp elements ---------- */
/* Put this at the very top of style.css */

html, body {
  max-width: 100%;
  overflow-x: hidden;       /* Kills horizontal scrolling caused by stray overflow */
  position: relative;
  -webkit-text-size-adjust: 100%;
  box-sizing: border-box;
}

/* ensure box-sizing is applied everywhere */
*, *::before, *::after {
  box-sizing: inherit;
}

/* Prevent any media from overflowing its container */
img, picture, svg, video, iframe, canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Ensure buttons, inputs, selects never force wider than viewport */
button, input, textarea, select, .btn, .btn-outline {
  max-width: 100%;
  box-sizing: border-box;
}

/* Make sure your main container uses padding rather than width that can overflow */
.container, .wrap {
  width: 100%;
  max-width: 1200px; /* keep your existing max */
  padding-left: 16px;   /* small side gutters ensure no content touches edges */
  padding-right: 16px;
  margin-left: auto;
  margin-right: auto;
}

/* Guard elements that scale on hover */
.gallery-item, .service-card, .appointment-img, .hero {
  overflow: hidden; /* prevents children scaling beyond parent from creating page overflow */
}

/* Grid safety: avoid minmax causing overflow on tiny screens */
.gallery-grid, .services-grid {
  gap: 12px;
  grid-auto-rows: 1fr;
}

/* Mobile specific fixes */
@media (max-width: 900px) {
  /* stack buttons vertically and remove left margins that add width */
  .hero-buttons { display: flex; flex-direction: column; gap: 10px; align-items: center; }
  .btn, .btn-outline { margin: 0; max-width: 320px; width: 100%; }

  /* nav links should wrap and center instead of stretching horizontally */
  .nav-links { flex-wrap: wrap; justify-content: center; padding: 0; margin: 0 auto; }
  .nav-links li { min-width: auto; }

  /* Reduce big section padding to avoid accidental overflow due to padding + fixed widths */
  section { padding-left: 16px; padding-right: 16px; }

  /* ensure grids don't create a 3rd column on small screens */
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .services-grid { grid-template-columns: repeat(2, 1fr); }
}

/* --- Debug helper (temporary) --- 
If you still see overflow after this patch, paste the block below into the CSS (temporarily) 
to visually show the offending element (uncomment to use):
html { outline: 4px solid rgba(0,0,0,0.03); }
body * { outline: 1px solid rgba(255,0,0,0.04); }
*/

/* General Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Poppins', sans-serif;
  color: #333;
  line-height: 1.6;
  background: #fff;
}
.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
}
h2, h3 {
  font-weight: 700;
  text-align: center;
}
.section-subtitle {
  text-align: center;
  margin-bottom: 3rem;
  font-size: 1rem;
  color: #777;
}

/* Header */
header {
  background: #fff;
  padding: 1rem 0;
  border-bottom: 1px solid #eee;
}
.logo {
  font-weight: 700;
  font-size: 1.5rem;
}
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
}
.nav-links a {
  text-decoration: none;
  color: #333;
  font-weight: 500;
  transition: color 0.3s;
}
.nav-links a:hover {
  color: #d6336c;
}

/* Hero */
.hero {
  background: url('images/hero.png') no-repeat center center/cover;
  color: white;
  height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding-top: 2rem;
  padding-bottom: 2rem;
}
.hero h2 span {
  color: #e6a4b4;
}
.hero h2 {
    background: #d6336c;
}
.hero p {
    background: black
}
.hero-buttons {
  margin-top: 1.5rem;
}
.btn, .btn-outline {
  padding: 0.7rem 1.5rem;
  border: none;
  text-decoration: none;
  cursor: pointer;
  font-weight: 600;
  border-radius: 5px;
}
.btn {
  background: #d6336c;
  color: white;
  transition: 0.3s;
}
.btn:hover {
  background: black;
  color: #e6a4b4;
}
.btn-outline {
  border: 1px solid #333;
  color: #333;
  margin-left: 1rem;
  transition: 0.3s;
}
.btn-outline:hover {
  background: black;
  color: #e6a4b4;
}

/* Section Spacing */
section {
  padding: 5rem 0;
}

/* Services */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
}
.service-card {
  background: #fff;
  padding: 2rem 1.5rem;
  border-radius: 10px;
  text-align: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.service-card i {
  font-size: 2.2rem;
  color: #d6336c;
  margin-bottom: 0.8rem;
}

/* Appointment */
.appointment {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 2rem;
  margin-top: 3rem;
  padding: 4rem 0;   /* ✅ Adds even top & bottom spacing */
}

.appointment-img {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
}
.appointment-img img {
  width: 100%;
  max-width: 500px;
  height: auto;
  border-radius: 10px;
  object-fit: cover;
}

.appointment-form {
  flex: 1;
  background: #f9f9f9;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
}
.appointment-form h2 {
  margin-bottom: 1.5rem;
  color: #d6336c;
}

.appointment-form form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}
.form-group {
  display: flex;
  flex-direction: column;
}
.appointment-form input,
.appointment-form select {
  padding: 0.9rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  font-size: 0.95rem;
  font-family: 'Poppins', sans-serif;
  transition: border-color 0.3s;
}
.appointment-form input:focus,
.appointment-form select:focus {
  border-color: #d6336c;
  outline: none;
}
.appointment-form button {
  margin-top: 1rem;
  width: 100%;
}

/* Responsive */
@media(max-width: 900px) {
  .appointment {
    flex-direction: column;
  }
  .appointment-img img {
    max-width: 100%;
  }
}

/* Gallery */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}
.gallery-item {
  overflow: hidden;
  border-radius: 10px;
  position: relative;
}
.gallery-item img {
  width: 100%;
  display: block;
  border-radius: 0; /* the wrapper already has radius */
  transform: scale(1);
  transition: transform 0.6s ease, filter 0.6s ease;
  will-change: transform;
}
.gallery-item:hover img,
.gallery-item:focus-within img {
  transform: scale(1.08); /* slow zoom in */
  filter: brightness(1.02);
}

/* social icons */
.social-icons {
  text-align: center;
  margin-top: 2rem;
}
.social-icons a {
  font-size: 2.5rem; /* larger size */
  margin: 0 1rem;
  color: #d6336c;
  transition: color 0.3s, transform 0.3s;
}
.social-icons a:hover {
  color: black;
  transform: translateY(-4px);
}

/* Footer */
footer {
  background: #222;
  color: #fff;
  padding: 4rem 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
}
.footer-grid h3 {
  margin-bottom: 1rem;
}

/* === NEW: center the paragraph text under each footer heading === */
.footer-grid > div p {
  text-align: center;
  margin: 0 0 0.6rem 0;
  color: #e6dfe1;
}

/* keep newsletter form's alignment tidy */
.footer-grid > div form {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 0.6rem;
}
footer input {
  padding: 0.6rem;
  flex: 1;
  border-radius: 5px;
  border: none;
}
footer .btn {
  background: #d6336c;
}
footer .btn:hover {
  background: black;
  color: #e6a4b4;
}
.copyright {
  text-align: center;
  margin-top: 2rem;
  font-size: 0.9rem;
}

/* Responsive */
@media(max-width: 768px) {
  .appointment {
    flex-direction: column;
  }
  nav {
    flex-direction: column;
  }
  .nav-links {
    margin-top: 1rem;
  }
}
