/**
 * Site-wide responsive fixes — Sri Gayathri Infra
 * Loaded after custom.css on all public pages.
 */

/* ── Global ── */
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  overflow-x: hidden;
}

img,
video,
svg {
  max-width: 100%;
  height: auto;
}

.container,
.container-fluid {
  padding-left: 15px;
  padding-right: 15px;
}

/* ── Tablet + mobile header / logo (≤1024px) ── */
@media (max-width: 1024px) {
  #sisf-page-header-inner {
    padding: 12px 0 !important;
    background-color: #fff;
  }

  #sisf-page-header-inner .container.p-0,
  .sisf-main-header .sisf-skin--dark .container,
  .sisf-main-header .sisf-skin--light .container {
    position: relative;
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    flex-wrap: nowrap;
    width: 100%;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .sisf-main-header .navbar-brand.mobile-block.sisf-header-logo-link {
    display: flex !important;
    align-items: center;
    flex: 0 1 auto;
    min-width: 0;
    max-width: calc(100% - 60px);
    margin: 0;
    padding: 0;
    order: 1;
  }

  .sisf-main-header .navbar-brand.mobile-block.sisf-header-logo-link img {
    width: auto !important;
    max-width: 180px !important;
    height: auto !important;
    max-height: 50px !important;
    object-fit: contain;
    object-position: left center;
    display: block;
  }

  .sisf-main-header .sisf-centered-header-wrapper {
    display: none !important;
  }

  /* SlickNav puts the hamburger in .navbar-toggle and the dropdown in .responsive-menu */
  .sisf-main-header .navbar-toggle {
    display: block !important;
    position: static !important;
    flex: 0 0 auto;
    margin-left: auto;
    order: 2;
    width: auto;
    height: auto;
  }

  .sisf-main-header .navbar-toggle .slicknav_btn {
    float: none !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin: 0;
    padding: 0;
    background: transparent;
  }

  .sisf-main-header .navbar-toggle .slicknav_icon-bar {
    background-color: #e67e22 !important;
  }

  .sisf-main-header .responsive-menu {
    position: absolute !important;
    top: 100%;
    left: 0;
    right: 0;
    width: 100% !important;
    flex: none;
    margin: 0;
    order: 3;
    z-index: 1100;
  }

  .sisf-main-header .responsive-menu .slicknav_menu {
    position: static;
    padding: 0;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.1);
  }

  .sisf-main-header .responsive-menu .slicknav_nav {
    position: static;
    background: #fff;
  }

  #sisf-page-header-inner .container.p-0 {
    position: relative;
  }

  .sisf-main-header {
    z-index: 1000;
  }
}

@media (max-width: 767px) {
  .sisf-main-header .navbar-brand.mobile-block.sisf-header-logo-link img {
    max-width: 150px !important;
    max-height: 44px !important;
  }
}

/* ── Large tablet / small laptop (1025px–1199px) — fix tiny logo ── */
@media (min-width: 1025px) and (max-width: 1199px) {
  .sisf-centered-header-wrapper .sisf-header-logo-link.navbar-brand img {
    width: auto !important;
    max-width: 160px !important;
    height: auto !important;
    max-height: 46px !important;
    object-fit: contain;
  }
}

.social-sidebar {
  position: fixed;
  top: 50%;
  left: 0;
  transform: translateY(-50%);
  z-index: 9998;
}

.social-sidebar a {
  display: block;
  color: #fff;
  padding: 12px 15px;
  text-decoration: none;
  margin: 2px 0;
  font-size: 18px;
  transition: opacity 0.2s;
}

.social-sidebar a:hover {
  opacity: 0.85;
}

.social-sidebar a:nth-child(1) { background: #3b5998; }
.social-sidebar a:nth-child(2) { background: #E1306C; }
.social-sidebar a:nth-child(3) { background: #0077b5; }

@media (max-width: 991px) {
  .social-sidebar {
    top: auto;
    bottom: 90px;
    left: auto;
    right: 12px;
    transform: none;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .social-sidebar a {
    padding: 10px 12px;
    margin: 0;
    border-radius: 8px;
    font-size: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  }
}

@media (max-width: 480px) {
  .social-sidebar {
    bottom: 80px;
    right: 10px;
  }

  .social-sidebar a {
    padding: 8px 10px;
    font-size: 14px;
  }
}

/* ── Hero slider — full viewport, text clears navbar ── */
.hero.hero-slider {
  min-height: 100vh !important;
  min-height: 100svh !important;
}

.hero-slider-layout .hero-slide,
.hero.hero-slider .hero-slider-layout .hero-slide {
  min-height: 100vh !important;
  height: 100vh !important;
  min-height: 100svh !important;
  padding-bottom: 70px;
}

.hero-slide .hero-slider-image,
.hero-slide .hero-slider-image img {
  min-height: 100%;
  height: 100% !important;
}

/* Header is position:absolute over hero — push content down */
.hero-slide > .container {
  top: 50% !important;
  transform: translateY(-50%) !important;
  padding-top: 90px !important;
  padding-bottom: 48px !important;
}

.hero-slide .hero-content h1,
.hero-slide .section-title h1 {
  font-size: clamp(1.75rem, 3.5vw, 3rem) !important;
  line-height: 1.15 !important;
}

.hero-slide .hero-content p {
  font-size: clamp(1rem, 2vw, 1.125rem) !important;
  max-width: 100% !important;
}

@media (max-width: 1024px) {
  .hero.hero-slider,
  .hero-slider-layout .hero-slide {
    min-height: 92vh !important;
    height: 92vh !important;
    min-height: 92svh !important;
  }

  .hero-slide > .container {
    padding-top: 100px !important;
  }
}

@media (max-width: 767px) {
  .hero.hero-slider,
  .hero-slider-layout .hero-slide {
    min-height: 88vh !important;
    height: 88vh !important;
    min-height: 88svh !important;
  }

  .hero-slide > .container {
    top: 52% !important;
    padding-top: 80px !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
  }

  .hero-slide .hero-content h1,
  .hero-slide .section-title h1 {
    font-size: clamp(1.5rem, 7vw, 2.25rem) !important;
  }
}

/* ── Breadcrumbs / page banners ── */
.breadcrumb-section,
.breadcrumb-area,
.project-banner {
  padding-top: clamp(50px, 12vw, 100px) !important;
  padding-bottom: clamp(50px, 12vw, 100px) !important;
}

.breadcrumb-section h1,
.breadcrumb-area h1,
.breadcrumb-content h1,
.project-banner h1 {
  font-size: clamp(1.65rem, 5vw, 2.625rem) !important;
  line-height: 1.2 !important;
  word-wrap: break-word;
}

.breadcrumb-section ol,
.breadcrumb-area ol,
.breadcrumb-links,
.project-banner ol {
  flex-wrap: wrap !important;
  justify-content: center !important;
  font-size: clamp(0.85rem, 2.5vw, 1rem) !important;
}

/* ── Section spacing & headings ── */
section[style*="padding: 80px"],
section[style*="padding: 100px"],
section[style*="padding: 60px"] {
  padding-top: clamp(40px, 8vw, 80px) !important;
  padding-bottom: clamp(40px, 8vw, 80px) !important;
}

section h2[style*="font-size: 36px"],
section h2[style*="font-size: 32px"],
section h2[style*="font-size: 28px"] {
  font-size: clamp(1.35rem, 4.5vw, 2.25rem) !important;
  line-height: 1.25 !important;
}

section h5[style*="letter-spacing"] {
  font-size: clamp(0.75rem, 2vw, 0.875rem) !important;
}

/* ── Flex / grid content blocks (inline layouts) ── */
@media (max-width: 767px) {
  section div[style*="display: flex"],
  section div[style*="display:flex"] {
    gap: clamp(20px, 4vw, 40px) !important;
  }

  section div[style*="min-width: 320px"],
  section div[style*="min-width: 350px"],
  section div[style*="min-width: 300px"],
  section div[style*="min-width:280px"] {
    min-width: 100% !important;
    flex: 1 1 100% !important;
  }

  section div[style*="padding: 50px"],
  section div[style*="padding: 40px"],
  section div[style*="padding: 35px"] {
    padding: clamp(20px, 5vw, 35px) !important;
  }
}

/* ── Property / projects page ── */
.cta-box {
  padding: clamp(24px, 5vw, 50px) !important;
}

.location-list {
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)) !important;
}

#dynamic-active-projects h3 {
  font-size: clamp(1.25rem, 4vw, 1.75rem) !important;
}

#dynamic-all-projects > div[style*="grid"],
#dynamic-completed-projects {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)) !important;
}

.project-card {
  min-width: 0;
}

/* ── Contact page ── */
.contact-card {
  min-width: 0;
}

section div[style*="padding: 50px"][style*="border-radius: 20px"] {
  padding: clamp(24px, 5vw, 50px) !important;
}

/* Google map embed */
.map-embed-wrap,
div[style*="height: 450px"]:has(iframe[src*="google.com/maps"]) {
  height: clamp(260px, 55vw, 450px) !important;
}

iframe[src*="google.com/maps"] {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

/* ── Gallery ── */
#dynamic-gallery-filters {
  padding: 0 4px;
}

#dynamic-gallery-filters .gallery-filter {
  font-size: clamp(0.8rem, 2.5vw, 0.95rem) !important;
  padding: 8px 14px !important;
}

#dynamic-gallery-grid .gallery-card {
  margin-bottom: 20px;
}

/* ── Project detail page ── */
body[data-page="project-detail"] .project-banner h1 {
  padding: 0 10px;
}

body[data-page="project-detail"] section[style*="padding:80px"] {
  padding-top: clamp(40px, 8vw, 80px) !important;
  padding-bottom: clamp(40px, 8vw, 80px) !important;
}

body[data-page="project-detail"] .gallery-grid .gallery-item {
  min-width: min(100%, 280px);
  max-width: 100% !important;
}

/* ── Footer ── */
.main-footer .location-text {
  word-break: break-word;
}

.footer-copyright-text,
.footer-privacy-policy ul {
  text-align: center !important;
}

@media (max-width: 767px) {
  .main-footer .col-lg-3,
  .main-footer .col-md-6 {
    margin-bottom: 8px;
  }

  .footer-links h3,
  .footer-contact h3 {
    margin-top: 16px !important;
  }
}

/* ── Get in touch (home) ── */
.get-in-touch-section .sisf-m-title {
  font-size: clamp(1.35rem, 4vw, 1.75rem) !important;
}

/* ── WhatsApp button spacing with social icons ── */
@media (max-width: 991px) {
  .whatsapp-sticky {
    bottom: 20px;
    right: 16px;
  }
}

/* ── Touch devices: disable custom cursor ── */
@media (hover: none), (pointer: coarse) {
  .cb-cursor,
  .cursor-dot,
  .cursor-outline,
  #cursor {
    display: none !important;
  }

  body {
    cursor: auto !important;
  }
}

/* ── About / leadership cards ── */
@media (max-width: 767px) {
  section div[style*="padding-right: 30px"] {
    padding-right: 0 !important;
  }

  .director-card {
    min-width: 100% !important;
    flex: 1 1 100% !important;
  }

  .director-card img[style*="width: 180px"] {
    width: 140px !important;
    height: 140px !important;
  }

  .value-card {
    min-width: 100% !important;
  }
}

/* ── Testimonials / swiper ── */
@media (max-width: 767px) {
  .swiper-slide .sisf-e-inner {
    padding: 0 8px;
  }
}

@media (max-width: 375px) {
  .btn-slider,
  .btn-default,
  .submit-btn {
    width: 100%;
    text-align: center;
    justify-content: center;
  }

  .page-header-box h1 {
    font-size: 28px !important;
  }
}
