/* === Base body & font-family (used by city pages, inner pages) === */
body { font-family: "Manrope", "Plus Jakarta Sans", "Noto Sans Telugu", "Noto Sans Devanagari", "Noto Sans Malayalam", "Noto Sans Kannada", "Noto Sans Tamil", sans-serif; background: #f5fced; color: #2a3625; }
.font-headline { font-family: "Plus Jakarta Sans", "Noto Sans Telugu", "Noto Sans Devanagari", "Noto Sans Malayalam", "Noto Sans Kannada", "Noto Sans Tamil", sans-serif; }
html[lang="te"] body { font-family: "Noto Sans Telugu", "Manrope", sans-serif; }
html[lang="te"] .font-headline { font-family: "Noto Sans Telugu", "Plus Jakarta Sans", sans-serif; }
html[lang="hi"] body { font-family: "Noto Sans Devanagari", "Manrope", sans-serif; }
html[lang="ml"] body { font-family: "Noto Sans Malayalam", "Manrope", sans-serif; }
html[lang="kn"] body { font-family: "Noto Sans Kannada", "Manrope", sans-serif; }
html[lang="ta"] body { font-family: "Noto Sans Tamil", "Manrope", sans-serif; }
.hero-bg {
  background:
    radial-gradient(circle at 80% 20%, rgba(254, 179, 0, 0.35) 0%, transparent 45%),
    radial-gradient(circle at 20% 80%, rgba(157, 241, 151, 0.25) 0%, transparent 50%),
    linear-gradient(135deg, #eef7e5 0%, #f5fced 50%, #fff7e3 100%);
}

.material-symbols-outlined {
    display: inline-block;
    width: 1em;
    height: 1em;
    overflow: hidden;
    line-height: 1;
    vertical-align: -0.125em;
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  }
  html:not(.icons-ready) .material-symbols-outlined { color: transparent !important; }
  .glass-nav { background: #ffffff; border-bottom: 1px solid rgba(0,0,0,0.07); }

  /* Active nav link (scroll spy) */
  .nav-link {
    position: relative;
    padding-bottom: 2px;
  }
  .nav-link.is-active {
    color: #1c6d25;
    font-weight: 700;
  }
  .nav-link.is-active::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -6px;
    height: 3px;
    background: #1c6d25;
    border-radius: 2px;
  }
  .mobile-link.is-active {
    background: rgba(157, 241, 151, 0.35);
    color: #1c6d25;
    font-weight: 700;
  }

  /* Hero sky gradient */
  .hero-sky {
    background:
      radial-gradient(circle at 80% 20%, rgba(254, 179, 0, 0.35) 0%, transparent 45%),
      radial-gradient(circle at 20% 80%, rgba(157, 241, 151, 0.25) 0%, transparent 50%),
      linear-gradient(135deg, #eef7e5 0%, #f5fced 50%, #fff7e3 100%);
  }

  /* Sun + rays */
  .sun-orb {
    background: radial-gradient(circle, #ffd966 0%, #feb300 50%, rgba(254, 179, 0, 0) 75%);
    filter: blur(2px);
    animation: sun-pulse 6s ease-in-out infinite;
  }
  @keyframes sun-pulse {
    0%, 100% { transform: scale(1); opacity: 0.85; }
    50%      { transform: scale(1.08); opacity: 1; }
  }
  .sun-ray {
    position: absolute; left: 50%; top: 50%;
    width: 2px; height: 140px;
    background: linear-gradient(to bottom, rgba(254, 179, 0, 0.8), transparent);
    transform-origin: top center;
    animation: ray-rotate 30s linear infinite;
  }
  @keyframes ray-rotate { to { transform: rotate(360deg); } }

  /* 3D Solar Panel grid */
  .panel-stage { perspective: 1400px; }
  .panel-3d {
    transform: rotateX(58deg) rotateZ(-22deg);
    transform-style: preserve-3d;
    animation: panel-float 6s ease-in-out infinite;
  }
  @keyframes panel-float {
    0%, 100% { transform: rotateX(58deg) rotateZ(-22deg) translateZ(0); }
    50%      { transform: rotateX(56deg) rotateZ(-22deg) translateZ(20px); }
  }
  .solar-cell {
    background:
      linear-gradient(135deg, rgba(255,255,255,0.25) 0%, rgba(255,255,255,0) 40%),
      linear-gradient(180deg, #1e3a8a 0%, #0c1e4f 100%);
    border: 1px solid rgba(80, 130, 220, 0.5);
    box-shadow:
      inset 0 0 12px rgba(100, 160, 255, 0.25),
      0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
  }
  .solar-cell::before {
    content: "";
    position: absolute; inset: 6%;
    background-image:
      linear-gradient(to right, rgba(255,255,255,0.08) 1px, transparent 1px),
      linear-gradient(to bottom, rgba(255,255,255,0.08) 1px, transparent 1px);
    background-size: 25% 33.33%;
  }
  .solar-cell::after {
    content: "";
    position: absolute; inset: 0;
    background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,0.4) 50%, transparent 70%);
    transform: translateX(-100%);
    animation: shimmer 4s ease-in-out infinite;
  }
  @keyframes shimmer { 50%, 100% { transform: translateX(100%); } }

  /* Floating stat chips */
  .float-chip { animation: chip-float 5s ease-in-out infinite; }
  .float-chip.delay { animation-delay: 1.5s; }
  @keyframes chip-float {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(-12px); }
  }

  /* Marquee */
  .scrolling-wrapper { display: flex; width: calc(250px * 10); animation: scroll 30s linear infinite; }
  @keyframes scroll { 0% { transform: translateX(0); } 100% { transform: translateX(calc(-250px * 5)); } }

  /* 3D card hover lift */
  .card-3d {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    transform-style: preserve-3d;
    box-shadow: 0 10px 24px -10px rgba(28, 109, 37, 0.18), 0 4px 12px -6px rgba(0,0,0,0.08);
  }
  .card-3d:hover, .card-3d:active {
    transform: perspective(1000px) translateY(-10px) rotateX(4deg) rotateY(-4deg) scale(1.02);
    box-shadow:
      0 30px 60px -15px rgba(28, 109, 37, 0.35),
      0 18px 36px -18px rgba(0, 0, 0, 0.25);
  }
  @media (max-width: 768px) {
    .card-3d {
      box-shadow: 0 14px 30px -12px rgba(28, 109, 37, 0.28), 0 6px 16px -8px rgba(0,0,0,0.12);
    }
  }

  /* Pretty number input spinners */
  input[type="number"].pretty-spin {
    -moz-appearance: textfield;
    appearance: textfield;
  }
  input[type="number"].pretty-spin::-webkit-inner-spin-button,
  input[type="number"].pretty-spin::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
  }
  .spin-wrap { position: relative; display: inline-flex; flex: 1; align-items: center; }
  .spin-buttons {
    display: flex; flex-direction: column; gap: 3px;
    margin-left: 4px;
    flex-shrink: 0;
  }
  .spin-btn {
    width: 28px; height: 22px;
    border-radius: 8px;
    background: #1c6d25;
    color: white;
    display: inline-flex; align-items: center; justify-content: center;
    box-shadow: 0 2px 6px -2px rgba(28, 109, 37, 0.4);
    transition: transform 0.15s ease, opacity 0.15s ease;
    cursor: pointer; border: none;
  }
  .spin-btn .material-symbols-outlined { font-size: 18px; }
  .spin-btn:hover { transform: scale(1.08); }
  .spin-btn:active { transform: scale(0.92); opacity: 0.85; }
  @media (min-width: 640px) {
    .spin-buttons { gap: 4px; margin-left: 8px; }
    .spin-btn { width: 32px; height: 24px; border-radius: 10px; }
  }

  /* Carousel-on-hover for installations */
  .install-card .install-img { position: absolute; inset: 0; opacity: 0; transition: opacity 0.6s ease; }
  .install-card .install-img:first-child { opacity: 1; }
  .install-card:hover .install-img { animation: install-cycle 4.5s linear infinite; }
  .install-card:hover .install-img:nth-child(1) { animation-delay: 0s; }
  .install-card:hover .install-img:nth-child(2) { animation-delay: 1.5s; }
  .install-card:hover .install-img:nth-child(3) { animation-delay: 3s; }
  @keyframes install-cycle {
    0%, 28%   { opacity: 1; }
    33%, 95%  { opacity: 0; }
    100%      { opacity: 1; }
  }

  /* Mobile-only carousel — desktop/tablet keeps grid layout */
  .mobile-carousel-wrap { position: relative; padding: 1rem 0 1.5rem; }
  .mobile-carousel-track {
    display: flex;
    align-items: stretch;
    overflow-x: auto;
    overflow-y: visible;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    scrollbar-width: none;
    -ms-overflow-style: none;
    gap: 0.75rem;
    padding: 0.75rem 1rem 0.75rem;
    scroll-padding: 0 1rem;
  }
  .mobile-carousel-track::-webkit-scrollbar { display: none; }
  .mobile-carousel-track > * {
    flex: 0 0 calc(100% - 5rem);
    scroll-snap-align: center;
    scroll-snap-stop: always;
    max-width: 380px;
    margin: 0 auto;
    position: relative;
    z-index: 10;
  }
  /* Fluid mobile typography — scales with viewport width so small & large phones both look right */
  @media (max-width: 767px) {
    .mobile-carousel-track > .card-3d {
      padding: clamp(1.25rem, 5vw, 1.75rem) clamp(0.875rem, 3.5vw, 1.25rem) clamp(0.875rem, 3.5vw, 1.25rem) !important;
    }
    .mobile-carousel-track > .card-3d h3 {
      font-size: clamp(1.25rem, 5.5vw, 1.75rem) !important;
      line-height: 1.15 !important;
      margin-bottom: 0.375rem !important;
    }
    .mobile-carousel-track > .card-3d > p,
    .mobile-carousel-track > .card-3d .text-on-surface-variant,
    .mobile-carousel-track > .card-3d .text-on-primary\/80,
    .mobile-carousel-track > .card-3d .text-on-secondary\/80 {
      font-size: clamp(0.8125rem, 3.4vw, 1rem) !important;
      line-height: 1.35 !important;
    }
    .mobile-carousel-track > .card-3d ul li {
      gap: clamp(0.5rem, 2vw, 0.75rem) !important;
      font-size: clamp(0.8125rem, 3.4vw, 1rem) !important;
      line-height: 1.3 !important;
    }
    .mobile-carousel-track > .card-3d ul {
      margin-bottom: clamp(1rem, 3.5vw, 1.5rem) !important;
    }
    /* Icon container — target the rounded square (NOT the absolute-positioned badge) */
    .mobile-carousel-track > .card-3d > div:not([class*="absolute"]) {
      width: clamp(2.5rem, 10vw, 3.5rem) !important;
      height: clamp(2.5rem, 10vw, 3.5rem) !important;
      margin-bottom: clamp(0.75rem, 3vw, 1.25rem) !important;
    }
    .mobile-carousel-track > .card-3d > div:not([class*="absolute"]) .material-symbols-outlined {
      font-size: clamp(1.375rem, 5.5vw, 1.875rem) !important;
    }
    /* Button at bottom of card */
    .mobile-carousel-track > .card-3d > span:last-child,
    .mobile-carousel-track > .card-3d > a:last-child {
      font-size: clamp(0.875rem, 3.8vw, 1.125rem) !important;
      padding-top: clamp(0.75rem, 3vw, 1rem) !important;
      padding-bottom: clamp(0.75rem, 3vw, 1rem) !important;
    }
    /* Badges at top-right of card (BEST CHOICE / COMMERCIAL) */
    .mobile-carousel-track > .card-3d > div[class*="absolute"][class*="top-0"] {
      font-size: clamp(0.6875rem, 2.8vw, 0.875rem) !important;
      padding: clamp(0.3125rem, 1.4vw, 0.5rem) clamp(0.75rem, 3.2vw, 1.25rem) !important;
    }
  }
  /* Desktop/Tablet: grid */
  @media (min-width: 768px) {
    .mobile-carousel-track {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 1.5rem;
      padding: 0;
      overflow: visible;
      scroll-snap-type: none;
    }
    .mobile-carousel-track > * {
      flex: initial;
      width: auto !important;
      max-width: none;
      margin: 0;
      scroll-snap-align: none;
    }
    .mobile-carousel-track.cols-3 { grid-template-columns: repeat(3, 1fr); }
  }
  @media (min-width: 1024px) {
    .mobile-carousel-track.cols-4 { grid-template-columns: repeat(4, 1fr); }
  }
  /* Hide duplicates on desktop */
  .mobile-carousel-track .carousel-dup {
    display: none;
  }
  @media (max-width: 767px) {
    .mobile-carousel-track .carousel-dup {
      display: block;
    }
  }
  .carousel-arrow {
    position: absolute; top: 50%; transform: translateY(-50%);
    z-index: 20; width: 36px; height: 36px; border-radius: 50%;
    background: rgba(255,255,255,0.95); border: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.18);
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: background 0.2s;
  }
  .carousel-arrow:hover, .carousel-arrow:active { background: #1c6d25; }
  .carousel-arrow:hover svg, .carousel-arrow:active svg { stroke: white; }
  .carousel-arrow.prev { left: 4px; }
  .carousel-arrow.next { right: 4px; }
  /* Carousel dots */
  .carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 1rem;
  }
  .carousel-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: #d1d5db;
    border: none;
    padding: 0;
    cursor: pointer;
    transition: background 0.3s, transform 0.3s, width 0.3s;
  }
  .carousel-dot.active {
    background: #1c6d25;
    width: 24px;
    border-radius: 4px;
    transform: none;
  }
  @media (min-width: 768px) {
    .carousel-dots { display: none !important; }
  }
  /* Ensure BEST CHOICE / COMMERCIAL badges always sit above carousel arrows */
  .mobile-carousel-track > .card-3d > div[class*="absolute"][class*="top-0"] {
    z-index: 15;
  }
  @media (min-width: 768px) {
    .carousel-arrow { display: none !important; }
  }

  @supports (content-visibility: auto) {
    #services, #calculator, #reviews, #faq, #contact, footer {
      content-visibility: auto;
      contain-intrinsic-size: auto 900px;
    }
  }