/* Gujarat Website Solution - Custom Styles */

:root {
  --brand-dark: #051d40;
  --brand-azure: #145da0;
  --brand-light: #b1d4e0;
  --brand-white: #ffffff;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  overflow-x: hidden;
  max-width: 100%;
}

/* Prevent layout shifts and horizontal scroll caused by 100vw and transforms */
html,
body {
  width: 100%;
}

/* Universal containment for sections to avoid accidental overflow */
section,
header,
footer,
nav,
main,
.container,
.mx-auto {
  max-width: 100%;
  overflow-x: clip;
}

/* Images and media should never exceed viewport width */
img,
video,
iframe {
  max-width: 100%;
  height: auto;
}

/* Fix for elements that use translate/scale hover effects causing overflow */
[class*="transform"],
[class*="scale-"],
[class*="-translate-x"],
[class*="translate-x"],
[class*="translate-y"],
[class*="-translate-y"] {
  will-change: transform;
  backface-visibility: hidden;
}

/* Safe wrapper for full-width background sections */
.full-width-section {
  position: relative;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  width: 100vw;
  max-width: 100vw;
  overflow: hidden;
}

/* Hide accidental horizontal scrollbar on mobile zoom out */
@media (max-width: 1024px) {
  body {
    overscroll-behavior-x: none;
  }
}

/* Rounded Logo Styling */
img[src*="square_only brand logo"] {
  border-radius: 20px !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

img[src*="square_only brand logo"]:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile Menu Button Visibility - SHOW on mobile, HIDE on desktop */
.mobile-menu-btn-wrapper {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

.mobile-menu-btn-wrapper button {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}

@media (min-width: 768px) {
  .mobile-menu-btn-wrapper {
    display: none !important;
  }
}

/* Smooth Scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: var(--brand-azure);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--brand-dark);
}

/* Animations */
@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

@keyframes blob {
  0%,
  100% {
    transform: translate(0px, 0px) scale(1);
  }
  33% {
    transform: translate(30px, -50px) scale(1.1);
  }
  66% {
    transform: translate(-20px, 20px) scale(0.9);
  }
}

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-blob {
  animation: blob 7s infinite;
}

.animation-delay-2000 {
  animation-delay: 2s;
}

.animation-delay-4000 {
  animation-delay: 4s;
}

/* Gradient Text */
.gradient-text {
  background: linear-gradient(135deg, var(--brand-azure), var(--brand-light));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Navbar Scroll Effect */
#navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Navigation Link Active State */
.nav-link.active {
  color: var(--brand-azure);
  position: relative;
}

.nav-link.active::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--brand-azure);
  border-radius: 2px;
}

/* Button Hover Effects */
.btn-primary {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn-primary::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--brand-dark);
  transition: left 0.3s ease;
  z-index: -1;
}

.btn-primary:hover::before {
  left: 0;
}

/* Card Hover Effects */
.service-card {
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-10px);
}

/* Pulse Animation for CTA */
@keyframes pulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.05);
  }
}

.pulse {
  animation: pulse 2s ease-in-out infinite;
}

/* Loading Animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.loading {
  animation: spin 1s linear infinite;
}

/* Form Input Focus Effect */
input:focus,
textarea:focus,
select:focus {
  box-shadow: 0 0 0 3px rgba(20, 93, 160, 0.1);
}

/* Gradient Background Animations */
.gradient-bg {
  background: linear-gradient(
    -45deg,
    var(--brand-dark),
    var(--brand-azure),
    var(--brand-dark),
    var(--brand-light)
  );
  background-size: 400% 400%;
  animation: gradientShift 15s ease infinite;
}

@keyframes gradientShift {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* Scroll to Top Button */
#scrollToTop {
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

#scrollToTop.show {
  opacity: 1;
  visibility: visible;
}

#scrollToTop:hover {
  transform: translateY(-5px);
}

/* Mobile Menu Animation */
.mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease-out;
}

.mobile-menu.active {
  max-height: 500px;
  transition: max-height 0.3s ease-in;
}

/* Typography Enhancements */
h1,
h2,
h3,
h4,
h5,
h6 {
  line-height: 1.2;
  font-weight: 700;
}

p {
  line-height: 1.7;
}

/* Link Hover Effect */
a {
  transition: all 0.3s ease;
}

/* Image Optimization */
img {
  max-width: 100%;
  height: auto;
}

/* Section Spacing */
section {
  position: relative;
}

/* Glass Morphism Effect */
.glass {
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Shadow Effects */
.shadow-custom {
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.shadow-custom-hover:hover {
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

/* Pricing Badge */
.price-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  background: linear-gradient(135deg, #ff6b6b, #ee5a6f);
  color: white;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: bold;
  transform: rotate(10deg);
}

/* Stats Counter Animation */
@keyframes countUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.stat-counter {
  animation: countUp 0.6s ease-out;
}

/* Testimonial Card */
.testimonial-card {
  position: relative;
  background: white;
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: -20px;
  left: 20px;
  font-size: 100px;
  color: var(--brand-light);
  font-family: Georgia, serif;
  opacity: 0.3;
}

/* Feature Icon */
.feature-icon {
  transition: transform 0.3s ease;
}

.feature-icon:hover {
  transform: rotate(360deg);
}

/* Section Divider */
.section-divider {
  position: relative;
  height: 80px;
  overflow: hidden;
}

.section-divider svg {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Badge Styles */
.badge {
  display: inline-block;
  padding: 5px 15px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
}

.badge-primary {
  background: var(--brand-azure);
  color: white;
}

.badge-success {
  background: #10b981;
  color: white;
}

/* Form Success/Error Messages */
.alert {
  padding: 15px 20px;
  border-radius: 10px;
  margin-top: 15px;
}

.alert-success {
  background: #d1fae5;
  color: #065f46;
  border-left: 4px solid #10b981;
}

.alert-error {
  background: #fee2e2;
  color: #991b1b;
  border-left: 4px solid #ef4444;
}

/* Loading Spinner */
.spinner {
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top: 3px solid white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 0.8s linear infinite;
}

/* Responsive Video Container */
.video-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* Custom List Styles */
.custom-list {
  list-style: none;
  padding-left: 0;
}

.custom-list li {
  padding-left: 30px;
  position: relative;
  margin-bottom: 10px;
}

.custom-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--brand-azure);
  font-weight: bold;
  font-size: 1.2rem;
}

/* Responsive Utilities */
@media (max-width: 768px) {
  h1 {
    font-size: 2rem;
  }

  h2 {
    font-size: 1.75rem;
  }

  h3 {
    font-size: 1.5rem;
  }

  .mobile-menu.active {
    display: block;
  }
}

/* Print Styles */
@media print {
  .no-print {
    display: none;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* Focus Visible */
*:focus-visible {
  outline: 2px solid var(--brand-azure);
  outline-offset: 2px;
}

/* Selection Color */
::selection {
  background: var(--brand-azure);
  color: white;
}

::-moz-selection {
  background: var(--brand-azure);
  color: white;
}

/* Preloader */
.preloader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: white;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  transition: opacity 0.3s, visibility 0.3s;
}

.preloader.hidden {
  opacity: 0;
  visibility: hidden;
}

/* Tooltip */
.tooltip {
  position: relative;
  display: inline-block;
}

.tooltip .tooltiptext {
  visibility: hidden;
  background-color: var(--brand-dark);
  color: white;
  text-align: center;
  border-radius: 6px;
  padding: 5px 10px;
  position: absolute;
  z-index: 1;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.875rem;
  white-space: nowrap;
}

.tooltip:hover .tooltiptext {
  visibility: visible;
  opacity: 1;
}

/* Ripple Effect */
.ripple {
  position: relative;
  overflow: hidden;
}

.ripple::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.5);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
  width: 200px;
  height: 200px;
}
