/* ----------------------------------
   Custom Typography Overrides
----------------------------------- */
@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Sora:wght@500;600;700&display=swap");

:root {
  --custom-body-font: "Poppins", sans-serif;
  --custom-heading-font: "Sora", sans-serif;
}

body,
p,
li,
input,
textarea,
select,
button {
  font-family: var(--custom-body-font);
}

html {
  scroll-behavior: smooth;
}

h1,
h2,
h3,
h4,
h5,
h6,
.section-title h2,
.header-main .main-menu ul li a,
.header-main .main-menu ul li .submenu li a {
  font-family: var(--custom-heading-font);
  letter-spacing: -0.1px;
}

.ag-title-accent {
  color: inherit;
}

h2 .ag-title-accent,
.section-title .ag-title-accent {
  background: linear-gradient(90deg, var(--theme-2) 0%, #8dcf49 38%, var(--theme) 68%, #2f8d5a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.ag-gradient-title {
  background: linear-gradient(90deg, var(--theme-2) 0%, #8dcf49 38%, var(--theme) 68%, #2f8d5a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent !important;
}

/* Prevent clipping on small uppercase section labels */
.section-title span {
  line-height: 1.3;
  padding-top: 2px;
  padding-bottom: 2px;
}

/* Remove negative offset that clips text inside .fix containers */
.section-title {
  margin-top: 0 !important;
}

/* Slightly smaller text scale for better readability */
body {
  font-size: 14px;
  line-height: 27px;
}

h1 {
  font-size: 56px;
  line-height: 1.15;
}

h2,
.section-title h2 {
  font-size: 40px;
  line-height: 1.2;
}

h3 {
  font-size: 21px;
}

.header-main .main-menu ul li a,
.header-main .main-menu ul li .submenu li a {
  font-size: 15px;
}

.hero-1 .hero-content h1,
.hero-3 .hero-content h1 {
  font-size: clamp(34px, 5vw, 58px);
  letter-spacing: -1.2px;
}

.page-banner-wrap h1 {
  font-size: clamp(30px, 4.2vw, 48px);
}

@media (max-width: 767px) {
  body {
    font-size: 15px;
    line-height: 26px;
  }

  h2,
  .section-title h2 {
    font-size: 32px;
  }
}

/* ----------------------------------
   Motion Enhancements
----------------------------------- */
:root {
  --ag-motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes agFloat {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-8px);
  }
}

@keyframes agGlowPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(91, 155, 55, 0.28);
  }
  70% {
    box-shadow: 0 0 0 14px rgba(91, 155, 55, 0);
  }
}

@keyframes agBgDrift {
  0% {
    background-position: 50% 50%;
  }
  50% {
    background-position: 56% 46%;
  }
  100% {
    background-position: 50% 50%;
  }
}

.hero-section.hero-2 {
  animation: agBgDrift 18s ease-in-out infinite;
  background-size: cover;
}

.dot-shape,
.contact-shape-1,
.contact-shape-2,
.left-shape,
.right-shape {
  animation: agFloat 6s ease-in-out infinite;
}

.contact-shape-2,
.right-shape {
  animation-delay: 1.2s;
}

.section-title span {
  position: relative;
}

.section-title span::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--theme), transparent);
  animation: agBgDrift 5s ease-in-out infinite;
}

.theme-btn {
  animation: agGlowPulse 3.2s ease-in-out infinite;
}

.theme-btn:hover {
  animation-play-state: paused;
  transform: translateY(-2px);
}

.service-box-items,
.project-thumb,
.news-box-items,
.testimonial-card-items,
.about-card-items {
  transition: transform 0.45s var(--ag-motion-ease), box-shadow 0.45s var(--ag-motion-ease);
  will-change: transform;
}

.service-box-items:hover,
.project-thumb:hover,
.news-box-items:hover,
.testimonial-card-items:hover,
.about-card-items:hover {
  transform: translateY(-10px);
  box-shadow: 0 18px 38px rgba(31, 36, 44, 0.12);
}

.service-box-items .service-image img:last-child {
  transition: transform 0.8s var(--ag-motion-ease);
}

.service-box-items:hover .service-image img:last-child {
  transform: scale(1.06);
}

/* Scroll reveal helper classes (applied by JS) */
.ag-motion-init {
  opacity: 0;
  transform: translateY(24px) scale(0.98);
  filter: blur(2px);
  transition:
    opacity 0.7s var(--ag-motion-ease),
    transform 0.7s var(--ag-motion-ease),
    filter 0.7s var(--ag-motion-ease);
  transition-delay: var(--motion-delay, 0ms);
}

.ag-motion-in {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter: blur(0);
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* ----------------------------------
   Home Enquiry Popup + Floating Actions
----------------------------------- */
.ag-enquiry-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 31, 0.58);
  opacity: 0;
  visibility: hidden;
  transition: all 0.35s ease;
  z-index: 9998;
}

.ag-enquiry-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(460px, calc(100% - 24px));
  max-height: min(82vh, 680px);
  background: #efefef;
  border-radius: 12px;
  overflow: hidden;
  transform: translate(-50%, -46%) scale(0.94);
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s var(--ag-motion-ease);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28);
}

.ag-enquiry-head {
  background: linear-gradient(90deg, #1f8a45 0%, #7cc748 100%);
  padding: 10px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ag-enquiry-head h3 {
  color: var(--white);
  font-size: clamp(20px, 2.2vw, 28px);
  line-height: 1.1;
}

.ag-enquiry-close {
  color: rgba(31, 36, 44, 0.72);
  font-size: 24px;
  transition: transform 0.25s ease, color 0.25s ease;
}

.ag-enquiry-close:hover {
  transform: rotate(90deg);
  color: var(--header);
}

.ag-enquiry-body {
  padding: 12px;
  overflow-y: auto;
}

.ag-enquiry-form {
  background: #f7f7f7;
  border-radius: 10px;
  padding: 10px;
}

.ag-enquiry-field {
  margin-bottom: 10px;
}

.ag-enquiry-field input,
.ag-enquiry-field textarea {
  width: 100%;
  border: 1px solid #262626;
  border-radius: 9px;
  background: #f5f5f5;
  color: #5e6469;
  font-size: 15px;
  line-height: 1.35;
  padding: 10px 12px;
}

.ag-enquiry-field textarea {
  min-height: 90px;
  resize: vertical;
}

.ag-enquiry-form .theme-btn {
  border-radius: 8px;
  min-width: 150px;
  font-size: 14px;
  font-weight: 700;
  padding: 10px 16px;
  animation: none;
}

body.ag-home-enquiry-open .ag-enquiry-overlay {
  opacity: 1;
  visibility: visible;
}

body.ag-home-enquiry-open .ag-enquiry-modal {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
  visibility: visible;
}

body.ag-home-enquiry-open {
  overflow: hidden;
}

.ag-float-actions {
  position: fixed;
  right: 14px;
  bottom: 84px;
  z-index: 9997;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ag-float-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  color: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
  transition: transform 0.25s ease;
}

.ag-float-btn:hover {
  transform: translateY(-3px);
  color: #fff;
}

.ag-enquiry-toggle {
  position: fixed;
  left: 0;
  right: auto;
  top: 50%;
  transform: translate3d(0, -50%, 0);
  width: 44px;
  min-width: 44px;
  height: 96px;
  padding: 0;
  background: linear-gradient(90deg, #1f8a45 0%, #7cc748 100%);
  font-size: 0;
  font-weight: 700;
  letter-spacing: 0;
  white-space: nowrap;
  writing-mode: initial;
  text-orientation: mixed;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  border-radius: 0 18px 18px 0;
  z-index: 9997;
  overflow: hidden;
}

.ag-enquiry-toggle::before {
  content: "Enquiry";
  display: block;
  font-size: 14px;
  line-height: 1;
  color: #fff;
  transform: rotate(-90deg);
  transform-origin: center;
}

.ag-enquiry-toggle:hover {
  transform: translate3d(0, -50%, 0) scale(1.03);
}

.ag-call-btn,
.ag-wa-btn {
  width: 46px;
  height: 46px;
  font-size: 20px;
}

.ag-call-btn {
  background: #0c65b6;
}

.ag-wa-btn {
  background: #169c42;
  transition: transform 0.25s ease;
}

@media (max-width: 991px) {
  .ag-enquiry-head h3 {
    font-size: 22px;
  }

  .ag-enquiry-field input,
  .ag-enquiry-field textarea {
    font-size: 14px;
  }

  .ag-enquiry-form .theme-btn {
    font-size: 13px;
    width: 100%;
  }
}

@media (max-width: 575px) {
  .ag-enquiry-modal {
    width: calc(100% - 16px);
    max-height: 84vh;
  }

  .ag-enquiry-head {
    padding: 12px 16px;
  }

  .ag-enquiry-head h3 {
    font-size: 19px;
  }

  .ag-enquiry-body {
    padding: 14px;
  }

  .ag-enquiry-field {
    margin-bottom: 12px;
  }

  .ag-enquiry-field input,
  .ag-enquiry-field textarea {
    font-size: 13px;
    padding: 10px 12px;
  }

  .ag-enquiry-form .theme-btn {
    font-size: 12px;
    padding: 10px 14px;
  }

  .ag-enquiry-toggle {
    left: 0;
    top: auto;
    bottom: 98px;
    transform: none;
    width: 38px;
    min-width: 38px;
    height: 84px;
    padding: 0;
    font-size: 0;
    letter-spacing: 0;
    writing-mode: initial;
    text-orientation: mixed;
    border-radius: 0 16px 16px 0;
  }

  .ag-enquiry-toggle::before {
    font-size: 12px;
    transform: rotate(-90deg);
  }

  .ag-enquiry-toggle:hover {
    transform: scale(1.03);
  }

  .ag-float-actions {
    bottom: 74px;
    right: 12px;
    gap: 7px;
  }

  .ag-call-btn,
  .ag-wa-btn {
    width: 42px;
    height: 42px;
    font-size: 18px;
  }
}
