/* =============================================
   OPTIFY FRONTEND — MINIMALIST MODERN THEME
   ============================================= */

/* ── GOOGLE FONTS ── */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ── CSS VARIABLES ── */
:root {
  --font: 'Inter', 'Montserrat', sans-serif;
  --text: #111827;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --bg: #ffffff;
  --bg-soft: #F9FAFB;
  --bg-muted: #F3F4F6;
  --border: #E5E7EB;
  --border-soft: #F0F0F0;
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --shadow-xs: 0 1px 3px rgba(0,0,0,.06);
  --shadow-sm: 0 2px 8px rgba(0,0,0,.07);
  --shadow: 0 4px 20px rgba(0,0,0,.08);
  --shadow-lg: 0 8px 40px rgba(0,0,0,.10);
  --transition: 0.25s ease;
  --max-w: 1260px;

  /* FullCalendar compat */
  --light: #F3F4F6;
  --blue: #E5E7EB;
  --black: #111827;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  padding: 0;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

a { text-decoration: none; color: inherit; }

img { display: block; max-width: 100%; height: auto; }

p { margin: 0; }

/* ── UTILITY ── */
.responsive { max-width: 100%; width: auto; height: auto; }
.no-scroll { overflow: hidden; }


/* =============================================
   LAYOUT
   ============================================= */

.section-holder {
  padding: 80px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.section-holder .container,
.header-holder .container {
  width: 100%;
  max-width: var(--max-w);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 60px;
}

.section-holder .container .text,
.section-holder .container .image {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.section-holder .container .image img {
  border-radius: var(--radius-lg);
  width: 100%;
  object-fit: cover;
}

/* Section centered layout (FAQ, Gallery) */
.section-center .container {
  flex-direction: column;
  align-items: center;
}

.section-center .text {
  text-align: center;
  align-items: center;
  max-width: 640px;
}


/* =============================================
   SECTION TYPOGRAPHY
   ============================================= */

.section-holder .container .text .title-holder {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-holder .container .text .section-label {
  font-size: 13px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-holder .container .text .section-title {
  font-size: 48px;
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: inherit;
}

.section-holder .container .text .section-subtitle {
  font-size: 18px;
  line-height: 1.7;
  font-weight: 400;
  color: var(--text-muted);
}

.section-holder .container .text .buttons {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 8px;
}


/* =============================================
   HEADER & NAVIGATION
   ============================================= */

.header-holder {
  padding: 0 24px;
  display: flex;
  justify-content: center;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  border-bottom: 1px solid var(--border-soft);
}

.header-holder .container {
  gap: 32px;
  flex-wrap: nowrap;
  padding: 16px 0;
}

.logo-holder img { max-height: 40px; width: auto; }

.menu-holder .menu {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
}

.menu-holder .menu .menu-item a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-muted);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
  display: block;
}

.menu-holder .menu .menu-item a:hover {
  color: var(--text);
  background: var(--bg-muted);
}

.mobile-menu-trigger {
  font-size: 22px;
  cursor: pointer;
  color: var(--text);
  line-height: 1;
  padding: 4px;
}


/* =============================================
   BUTTONS
   ============================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  border-radius: var(--radius-sm);
  padding: 13px 28px;
  font-size: 14px;
  line-height: 1;
  font-weight: 600;
  letter-spacing: 0.01em;
  font-family: var(--font);
  transition: opacity var(--transition), transform var(--transition), box-shadow var(--transition);
  cursor: pointer;
  white-space: nowrap;
}

.btn:hover {
  opacity: 0.88;
  transform: translateY(-1px);
}

.btn:active {
  transform: translateY(0);
}

.btn.appointment {
  border: 2px solid transparent;
  box-shadow: var(--shadow-sm);
}

.btn.appointment:has(i) {
    display: inline-block;
}

.btn.appointment:hover {
  box-shadow: var(--shadow);
}

.btn.standard {
  background: transparent !important;
  border: 1.5px solid currentColor;
  color: inherit;
}

.btn.standard:hover {
  opacity: 0.7;
}

/* Small variant for service buttons */
.category-box-product .btn.appointment {
  padding: 7px 16px;
  font-size: 13px;
  border-radius: 6px;
}

.category-box-product .btn.appointment:hover {
  transform: none;
}


/* =============================================
   HERO SECTION
   ============================================= */

@media screen and (min-width: 768px) {
  #hero.section-holder {
    padding-top: 100px;
    padding-bottom: 100px;
  }
}

#hero.section-holder .section-title {
  font-size: 62px;
  letter-spacing: -0.03em;
}

#hero.section-holder .section-subtitle {
  max-width: 520px;
}


/* =============================================
   CATEGORIES & SERVICES
   ============================================= */

.categories-holder {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  width: 100%;
}

.categories-holder .category-box {
  flex: 1;
  min-width: min(580px, 100%);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  background: var(--bg);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
  overflow: hidden;
}

.categories-holder .category-box:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.categories-holder .category-box > a {
  display: block;
}

.categories-holder .category-box img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  display: block;
  border-radius: 0;
}

.category-box-text {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.category-box-title {
  font-size: 17px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.category-box-description {
  font-size: 14px;
  line-height: 1.6;
  font-weight: 400;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.category-box-product {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-soft);
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
}

.category-box-product:last-child {
  border-bottom: none;
}

.category-box-product-price {
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
  font-size: 14px;
}


/* =============================================
   TEAM / USERS
   ============================================= */

.users-holder {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

a.user-box-link {
  color: inherit;
  text-decoration: none;
  display: flex;
}

a.user-box-link .user-box {
  transition: box-shadow var(--transition), transform var(--transition);
}

a.user-box-link:hover .user-box {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.users-holder .user-box {
  background: var(--bg);
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.users-holder .user-box img,
.user-box.doctor img,
.user-box.location img {
  width: 240px;
  height: 310px;
  object-fit: cover;
  border-radius: var(--radius-sm);
}

.users-holder .user-box .user-box-text {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: 240px;
}

.users-holder .user-box .user-box-title {
  font-size: 15px;
  line-height: 1.4;
  font-weight: 700;
  color: var(--text);
}

.users-holder .user-box .user-box-separator {
  display: block;
  width: 32px;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}

.users-holder .user-box .user-box-description {
  font-size: 13px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-muted);
}

.users-holder .user-box.location img {
  width: 100%;
  height: auto;
}

.users-holder .user-box.location {
  flex: 1;
  min-width: 240px;
}


/* =============================================
   FAQ ACCORDION
   ============================================= */

.faq-items {
  width: 100%;
  max-width: 760px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 16px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  overflow: hidden;
  transition: border-color var(--transition);
}

.faq-item.open {
  border-color: #D1D5DB;
}

.faq-question {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 22px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  gap: 16px;
  user-select: none;
  transition: background var(--transition);
}

.faq-question:hover {
  background: var(--bg-soft);
}

.faq-question i {
  flex-shrink: 0;
  font-size: 13px;
  color: var(--text-muted);
  transition: transform 0.3s ease;
}

.faq-item.open .faq-question i {
  transform: rotate(45deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s ease;
}

.faq-item.open .faq-answer {
  max-height: 600px;
}

.faq-answer p {
  padding: 0 22px 20px;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text-muted);
}


/* =============================================
   GALLERY
   ============================================= */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  margin-top: 16px;
}

.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 1 / 1;
  background: var(--bg-muted);
}

.gallery-item a {
  display: block;
  width: 100%;
  height: 100%;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
  cursor: pointer;
}

.gallery-item:hover img {
  transform: scale(1.05);
}


/* =============================================
   FOOTER
   ============================================= */

#footer.section-holder {
  padding: 60px 24px 40px;
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
}

#footer.section-holder .container {
  align-items: flex-start;
  gap: 40px;
}

.footer-box {
  display: flex;
  flex-direction: column;
  gap: 16px;
  min-width: 140px;
}

.logo-holder.footer-box {
  justify-content: flex-start;
}

.footer-box-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.footer-box-menu,
.footer-box.social .anpc-icons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-menu-item {
  font-size: 14px;
  line-height: 1.5;
  font-weight: 400;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-menu-item:hover {
  color: var(--text);
}

.footer-box.social .footer-box-menu {
  flex-direction: row;
  gap: 12px;
}

.footer-box.social .footer-box-menu i {
  font-size: 20px;
  color: var(--text-muted);
  transition: color var(--transition);
}

.footer-box.social .footer-box-menu a:hover i {
  color: var(--text);
}

.copyright {
  font-size: 13px;
  color: var(--text-light);
}


/* =============================================
   MOBILE MENU
   ============================================= */

@media screen and (min-width: 769px) {
  .mobile-menu-trigger { display: none; }
  .mobile-menu { display: none !important; }
}

@media screen and (max-width: 768px) {
  .menu-holder,
  #header .container > .btn.appointment {
    display: none;
  }

  .mobile-menu {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 32px;
    position: fixed;
    inset: 0;
    background: var(--bg);
    height: 100vh;
    padding: 24px;
    box-sizing: border-box;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 200;
  }

  .mobile-menu.open {
    transform: translateX(0);
  }

  .mobile-menu .close-menu {
    font-size: 24px;
    text-align: right;
    color: var(--text-muted);
    cursor: pointer;
  }

  .mobile-menu .close-menu i {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    background: var(--bg-muted);
  }

  .mobile-menu .menu {
    display: flex;
    flex-direction: column;
    text-align: center;
    gap: 4px;
  }

  .mobile-menu .menu .menu-item a {
    font-size: 20px;
    font-weight: 600;
    padding: 12px;
    display: block;
  }

  .mobile-menu .btn {
    text-align: center;
    width: 100%;
  }
}


/* =============================================
   RESPONSIVE — TABLET & MOBILE
   ============================================= */

@media screen and (max-width: 1090px) {
  .section-holder .container {
    flex-direction: column;
    gap: 40px;
  }

  .section-holder .container .text,
  .section-holder .container .image {
    flex: none;
    width: 100%;
  }

  /* Footer and centered sections keep their own layout */
  #footer.section-holder .container {
    flex-direction: row;
    gap: 32px;
  }

  .section-center .container {
    gap: 32px;
  }
}

@media screen and (max-width: 900px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
  }
}

@media screen and (max-width: 768px) {
  .section-holder { padding: 56px 20px; }

  #hero.section-holder { padding-top: 60px; padding-bottom: 60px; }

  .section-holder .container .text .section-label { font-size: 12px; }

  .section-holder .container .text .section-title { font-size: 32px; }

  #hero.section-holder .section-title { font-size: 36px; }

  .section-holder .container .text .section-subtitle { font-size: 16px; }

  .categories-holder,
  .users-holder { gap: 14px; }

  .categories-holder .category-box img { height: auto; aspect-ratio: 4 / 3; }

  .users-holder .user-box { width: 100%; }

  .users-holder .user-box img { width: 100%; height: auto; aspect-ratio: 3 / 4; }

  #footer.section-holder .container { flex-direction: row; flex-wrap: wrap; }

  .footer-box { align-items: flex-start; }

  #contact.section-holder .text { text-align: left; }
}

@media screen and (max-width: 500px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .section-holder .container .text .section-title { font-size: 28px; }
  #hero.section-holder .section-title { font-size: 30px; }
}


/* =============================================
   FULLCALENDAR OVERRIDES
   ============================================= */

#calendar {
  width: 100%;
  max-width: 800px;
}

.calendar-box {
  width: 100%;
  display: flex;
  gap: 20px;
  justify-content: center;
}

#hours {
  width: 200px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex;
  flex-direction: column;
  padding: 12px;
  max-height: 600px;
  overflow-y: auto;
}

#hours .hour {
  display: flex;
  gap: 4px;
  flex-direction: column;
}

#available-hours select {
  padding: 10px;
  font-size: 15px;
  margin-top: 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}

.step-container { display: none; }
.step-container.active { display: block; }

.service button,
.service button:hover {
  padding: 5px 10px;
  font-size: 14px;
}

.inactive-event { opacity: 1 !important; border: none !important; }
.inactive-event .fc-event-title { color: #333 !important; }
.fc-day-today { background: #f0fdf4 !important; border: none !important; }

.fc .fc-col-header-cell-cushion {
  font-size: 13px;
  font-weight: 600;
}

.fc .fc-col-header-cell {
  background: var(--bg-muted);
  padding: 10px;
}

.fc .fc-daygrid-day.fc-day-today,
.fc .fc-timegrid-col.fc-day-today {
  background: #f0fdf4;
}

.fc-daygrid-event-dot { display: none; }

.fc-event {
  background: var(--bg-muted);
  border: none;
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
  cursor: pointer;
  margin: 2px;
}

.fc-event:hover {
  background: var(--bg-muted);
  color: var(--text);
}

.fc-event > div,
.fc-v-event .fc-event-main {
  white-space: initial;
  height: auto;
}

.fc-event-time { display: flex; gap: 4px; }
.fc-event .editurl { display: none; }

.fc .fc-button-primary {
  background: var(--bg-muted) !important;
  color: var(--text) !important;
  font-size: 13px !important;
  outline: none !important;
  border-color: var(--border) !important;
  border-radius: var(--radius-sm) !important;
}

.fc-timegrid-event,
.fc-event-main-frame {
  display: flex;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  color: var(--text);
  padding: 2px;
}

.fc-event-main-frame { padding: 0 !important; }

@media screen and (max-width: 500px) {
  .calendar-box { flex-direction: column; }
}
