﻿/* Global Styles & Variables */
:root {
  --primary-color: #ffd800;
  --secondary-color: #065392;
  --accent-color: #a30a0a;
  --text-dark: #333333;
  --text-light: #ffffff;
  --bg-light: #f4f6f8;
  --bg-white: #ffffff;
  --glass-bg: rgba(255, 255, 255, 0.1);
  --glass-border: rgba(255, 255, 255, 0.2);
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
  --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
  --font-main: "Inter", system-ui, -apple-system, sans-serif;
  --font-display: "AvantGarde Md Bt", "Inter", sans-serif;
  --container-width: 1150px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  scroll-behavior: smooth;
}

main {
  flex: 1;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-light);
  color: var(--text-dark);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  text-decoration: none;
  color: inherit;
  transition: all 0.3s ease;
}

img {
  max-width: 100%;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-family: var(--font-display);
  margin-bottom: 1rem;
}

/* Header */
header {
  background-color: var(--bg-white);
  box-shadow: var(--shadow-sm);
  padding: 0.5rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.header-content {
  max-width: var(--container-width);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  padding: 0 1rem;
}

.logo-container img {
  max-height: 75px;
  width: auto;
}

nav.main-nav {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.nav-link {
  font-weight: 600;
  color: var(--secondary-color);
  padding: 0.4rem 0;
  border-radius: 50px;
  background: var(--bg-white);
  box-shadow: var(--shadow-sm);
  border: 1px solid transparent;
  font-size: 0.95rem;
  min-width: 140px;
  text-align: center;
  display: inline-block;
}

.nav-link:hover,
.nav-link.active {
  background-color: var(--secondary-color);
  color: var(--text-light);
  box-shadow: var(--shadow-md);
}

/* Mobile Nav Adjustment */
@media (max-width: 768px) {
  .header-content {
    padding: 0 0.5rem;
    /* Reduce side padding to give more space to nav */
  }

  nav.main-nav {
    flex-wrap: nowrap;
    overflow-x: auto;
    justify-content: space-between;
    padding: 10px 0;
    gap: 4px;
    /* Minimal gap */
    width: 100%;
    -webkit-overflow-scrolling: touch;
  }

  .nav-link {
    min-width: 0;
    /* Allow shrinking */
    padding: 0.4rem 0;
    /* Minimal horizontal padding */
    font-size: 0.8rem;
    /* Slightly smaller text */
    white-space: nowrap;
    flex: 1 1 0px;
    /* Force equal widths */
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

/* --- NEW MAIN HERO SECTION (Animated) --- */
.main-hero {
  background: linear-gradient(-45deg, #065392, #042d50, #ffd800, #a30a0a);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  color: white;
  text-align: center;
  padding: 5rem 1rem;
  margin: 0 auto 2rem;
  max-width: 100%;
  border-radius: 0 0 50% 50% / 10% 10% 10% 10%;
  /* Curved bottom */
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

@keyframes gradientBG {
  0% {
    background-position: 0% 50%;
  }

  50% {
    background-position: 100% 50%;
  }

  100% {
    background-position: 0% 50%;
  }
}

.main-hero h1 {
  font-size: 3.5rem;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
  font-weight: 800;
}

.main-hero p.hero-subtitle {
  font-size: 1.3rem;
  max-width: 800px;
  margin: 0 auto 2.5rem;
  opacity: 0.95;
  font-weight: 500;
}

.cta-button {
  display: inline-block;
  background: white;
  color: var(--secondary-color);
  padding: 15px 40px;
  border-radius: 50px;
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  border: none;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.cta-button:hover {
  background: var(--primary-color);
  color: var(--text-dark);
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* Category Hero */
.category-hero {
  max-width: var(--container-width);
  margin: 1rem auto;
  padding: 1rem;
  text-align: center;
  background: var(--bg-white);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.category-hero h1 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  font-size: 1.8rem;
}

.category-hero p {
  max-width: 800px;
  margin: 0 auto;
  color: var(--text-dark);
  font-size: 1rem;
}

/* Auto-Scrolling Marquee Bar */
/* Auto-Scrolling Marquee Bar */
.scrolling-wrapper {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto 0;
  /* Gaps removed completely */
  overflow-x: auto;
  /* Enable native scrolling */
  overflow-y: hidden;
  background: var(--bg-white);
  padding: 0.5rem 0;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  position: relative;
  border-radius: 0;
  scroll-behavior: auto !important;
  /* Critical for seamless loop reset */
  /* Hide scrollbar for Chrome, Safari and Opera */
  -ms-overflow-style: none;
  /* IE and Edge */
  scrollbar-width: none;
  /* Firefox */
}

.scrolling-wrapper::-webkit-scrollbar {
  display: none;
}

.marquee-text-bar {
  background: black;
  color: white;
  max-width: var(--container-width);
  margin: 0.5rem auto;
  /* Reduced from 1rem */
  border-radius: 0;
}

@keyframes scroll-left {
  0% {
    transform: translateX(100%);
  }

  100% {
    transform: translateX(-100%);
  }
}

.scrolling-content {
  display: inline-block;
  /* Animation removed for JS control */
}

.scroll-item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.5rem 0.5rem;
  margin: 0 0.5rem;
  /* Increased gap between items */
  background: var(--bg-light);
  border-radius: 0;
  cursor: pointer;
  font-weight: 600;
  color: var(--secondary-color);
  border: 1px solid var(--glass-border);
  transition: all 0.2s;
  font-size: 0.95rem;
  min-width: 180px;
  text-align: center;
}

.scroll-item:hover,
.scroll-item.active {
  background: var(--secondary-color);
  color: var(--text-light);
  transform: scale(1.05);
}

/* Dynamic Detail Section */
.detail-section {
  max-width: var(--container-width);
  margin: 0 auto 0;
  padding: 0 15px 15px 15px;
  /* Zero top padding */
  /* Uniform small gap: 15px sides & bottom */
  background: var(--bg-white);
  border-radius: 0;
  box-shadow: var(--shadow-lg);
  height: auto;
  /* Fixed height removed to collapse gaps */
  min-height: 550px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: flex-start;
  /* Align to top */
  animation: fadeIn 0.5s ease;
  overflow: hidden;
}

.detail-content {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-grow: 1;
}

.detail-content h1 {
  font-size: 2.2rem;
  color: var(--secondary-color);
  margin-bottom: 0.2rem;
  /* Reduced from 1rem */
  margin-top: 0;
  /* Ensure no top gap */
  position: relative;
  display: inline-block;
  padding-bottom: 4px;
  /* Decreased gap as requested */
}

.detail-content h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: linear-gradient(to right, var(--accent-color), var(--primary-color), var(--secondary-color));
  border-radius: 2px;
}

#detail-desc {
  font-size: 1.1rem;
  max-width: 850px;
  margin: 0 auto 0.2rem;
  /* Minimal bottom margin */
  /* Reduced from 2rem */
  line-height: 1.6;
  color: #555;
  line-height: 1.6;
  color: #555;
  height: 5.4rem;
  /* Exactly 3 lines (1.1rem * 1.6 * 3) + buffer */
  overflow: hidden;
  display: -webkit-box;
  line-clamp: 3;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  align-items: start;
  /* Align text to top */
  justify-content: center;
}



@media (max-width: 768px) {
  .detail-color-block {
    font-size: 2.5rem;
    /* Reduced for mobile */
    height: 350px;
    /* Reduced height to save vertical space on mobile */
    padding: 1rem;
    /* Prevent text touching edges */
    word-break: break-word;
    /* Ensure different words wrap */
  }

  #detail-desc {
    height: auto;
    line-clamp: unset;
    -webkit-line-clamp: unset;
    margin-bottom: 1rem;
  }
}

/* Replaced .detail-image with .detail-color-block */
/* Placeholder Block for Missing Images */
.detail-color-block {
  width: 100%;
  aspect-ratio: 1120 / 500;
  max-height: 500px;
  background-color: #065392;
  /* Raama Ads Brand Blue */
  color: #e0e0e0;
  /* White/Light Gray text */
  display: none;
  /* Hidden by default */
  align-items: center;
  justify-content: center;
  font-size: 4.5rem;
  /* Slightly increased text size */
  font-family: "Calibri", sans-serif;
  font-weight: bold;
  text-align: center;
  padding: 20px;
  box-shadow: var(--shadow-md);
  margin-bottom: 20px;
}

/* Detail Section Container */
/* Detail Section Container */
.detail-content {
  max-width: 1150px;
  margin: 0 auto;
  padding: 0 10px;
  /* Exact 10px Left/Right Margin */
  /* Prevent edge touching on mobile */
}

.detail-image {
  width: 100%;
  aspect-ratio: 1150 / 500;
  height: auto;
  object-fit: fill;
  border-radius: 0;
  box-shadow: var(--shadow-md);
  margin-bottom: 0;
  display: block;
  /* MARKER: Image Space #1 (Clean) */
  border: none !important;
  box-sizing: border-box;
  /* Corners removed */
}

@media (max-width: 768px) {
  .detail-image {
    max-height: 350px;
    height: auto;
    /* Allow auto height on mobile if 500px is too tall */
    aspect-ratio: 16/9;
  }
}

.detail-image-hidden {
  display: none;
}

/* Multi-Image Support for Detail Section */
/* Multi-Image Support for Detail Section */
.detail-sub-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  /* Matched to 10px Margin */
  width: 100%;
  max-width: 1150px;
  /* Enforce 1150px layout */
  margin-top: 10px;
  /* Space between Big and Small images */
  margin-bottom: 10px;
  /* Small Image Bottom Margin */
}

.sub-image {
  width: 100%;
  height: auto;
  aspect-ratio: 1150 / 500;
  /* Exact same shape as Top Image (Small Miniatures) */
  object-fit: fill;
  border-radius: 0;
  /* No Round Corners */
  box-shadow: var(--shadow-sm);
  background: #f5f5f5 !important;
  display: block !important;
  /* Keep visible but clean */
  border: none !important;
  /* No Border Line */
  opacity: 1 !important;
  /* Shown via JS if source exists */
  cursor: pointer;
}

@media (max-width: 600px) {
  .detail-sub-images {
    gap: 8px;
  }
}

/* Footer (3 Column) - VERY COMPACT */
footer {
  background: linear-gradient(135deg, var(--primary-color) 0%, #ffc107 100%);
  color: var(--secondary-color);
  color: var(--secondary-color);
  padding: 1rem 0;
  /* Reduced padding */
  margin-top: 1rem;
  /* Explicit small gap */
}

.footer-grid {
  max-width: var(--container-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1rem;
  padding: 0 1.5rem;
  align-items: stretch;
  /* All columns equal height = Symmetry */
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
}

.footer-logo {
  max-width: 160px;
  height: auto;
  margin: 0 auto 0.5rem;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
  display: block;
}

.footer-section.footer-center {
  display: flex;
  flex-direction: column;
  /* Logo on top, text below */
  align-items: center;
  justify-content: center;
}

.footer-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.footer-section h3 {
  color: var(--secondary-color);
  margin-bottom: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* Contact Form - COMPACT */
.whatsapp-form {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: rgba(255, 255, 255, 0.2);
  padding: 0.5rem;
  border-radius: 10px;
  width: 100%;
  box-shadow: var(--shadow-sm);
  flex: 1;
  /* Stretch to fill column height */
  height: auto;
}

.whatsapp-form input,
.whatsapp-form textarea {
  width: 100%;
  padding: 0.3rem 0.5rem;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 6px;
  font-family: var(--font-main);
  font-size: 0.75rem;
  background: rgba(255, 255, 255, 0.9);
}

.whatsapp-form textarea {
  height: 40px;
  resize: none;
  flex-grow: 1;
}

.whatsapp-btn,
.btn-whatsapp,
.btn-whatsapp-btn {
  background: #25d366;
  /* Official WhatsApp Green */
  color: white;
  padding: 0.4rem;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.75rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  text-decoration: none;
  width: 100%;
}

.whatsapp-btn:hover,
.btn-whatsapp:hover,
.btn-whatsapp-btn:hover {
  background: #128c7e;
  /* Darker WhatsApp Green */
  transform: translateY(-1px);
}

/* About Section - COMPACT */
.footer-center {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.about-text {
  font-size: 0.85rem;
  line-height: 1.4;
  background: rgba(255, 255, 255, 0.2);
  /* Matches others */
  padding: 0.5rem;
  /* Matches others */
  border-radius: 10px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  box-shadow: var(--shadow-sm);
  flex: 1;
  /* Stretch to fill column height */
  height: auto;
}

.about-text p {
  margin: 0;
  font-size: 0.8rem;
}

/* Map - COMPACT */
.map-container {
  border-radius: 10px;
  overflow: hidden;
  height: auto;
  flex: 1;
  /* Stretch to fill column height */
  width: 100%;
  padding: 0.5rem;
  /* Matches Form Padding */
  box-shadow: var(--shadow-sm);
  background: rgba(255, 255, 255, 0.2);
}

.map-container iframe {
  width: 100%;
  height: 100%;
  border: 0;
}


.footer-address strong {
  font-weight: 700;
  display: block;
  margin-bottom: 0.2rem;
}

.hero-card-img {
  width: 100%;
  aspect-ratio: 16 / 9;
  height: auto;
  object-fit: cover;
  margin-bottom: 0.4rem;
  border-radius: 12px;
  transition: transform 0.3s;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  background: #eee;
  position: relative;
}

.copyright {
  text-align: center;
  margin-top: 1rem;
  padding-top: 0.5rem;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  font-size: 0.8rem;
}

/* Index Hero specific override */
.hero-section {
  padding: 0 1rem;
  max-width: var(--container-width);
  margin: 1.5rem auto;
}

/* FORCE 3 Columns */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
    /* 2 columns on tablets */
  }
}

@media (max-width: 600px) {
  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .main-hero {
    border-radius: 0 0 20px 20px;
    padding: 3rem 1rem;
  }

  .main-hero h1 {
    font-size: 2.5rem;
  }
}

.hero-card {
  background: var(--bg-white);
  padding: 1rem;
  border-radius: 20px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
  text-align: center;
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  border: 1px solid white;
  position: relative;
  overflow: hidden;
  z-index: 1;
  display: flex;
  flex-direction: column;
}

/* Card Sub-images (the "Bottom 2" requested by user) */
.card-sub-images {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 8px;
  margin-bottom: 0.8rem;
}

.card-sub-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 8px;
  background: #eee;
}

.hero-card::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg,
      rgba(6, 83, 146, 0.03) 0%,
      rgba(255, 216, 0, 0.05) 100%);
  z-index: -1;
  opacity: 0;
  transition: opacity 0.4s;
}

.hero-card:hover::after {
  opacity: 1;
}

.hero-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  border-color: rgba(6, 83, 146, 0.1);
}

/* hero-icon removed and replaced by hero-card-img */

.hero-card:hover .hero-card-img {
  transform: scale(1.02);
}

.hero-card h3 {
  font-size: 1.1rem;
  margin-top: 0.4rem;
  font-weight: 700;
  color: var(--text-dark);
  padding: 0;
}

.hero-card p {
  font-size: 0.85rem;
  color: #666;
  line-height: 1.4;
  margin-top: 0.5rem;
}

/* Clients Section */
.clients-section {
  max-width: var(--container-width);
  margin: 3rem auto;
  padding: 0 1rem;
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.client-logo {
  background: #f4f6f8;
  height: 100px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  border: 1px solid #e1e4e8;
  color: #888;
  font-weight: 600;
  transition: all 0.3s;
}

.client-logo:hover {
  background: white;
  border-color: var(--primary-color);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
  color: var(--secondary-color);
  transform: translateY(-2px);
}

/* Testimonials Section */
.testimonials-section {
  max-width: var(--container-width);
  margin: 3rem auto;
  padding: 0 1rem;
}

.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.testimonial-card {
  background: white;
  padding: 1.5rem;
  border-radius: 12px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  border-left: 4px solid var(--primary-color);
  font-family: var(--font-main);
}

.review-text {
  font-style: italic;
  color: #555;
  margin-bottom: 1rem;
}

.reviewer {
  font-weight: 700;
  color: var(--secondary-color);
  font-size: 0.9rem;
}

.business-name {
  color: #888;
  font-weight: 500;
}

/* Floating WhatsApp Button */

/* Tablet & Standard Mobile Optimizations */

/* Tablet Viewport (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  .hero-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.2rem;
  }

  .main-hero h1 {
    font-size: 3rem;
  }

  .nav-link {
    min-width: 130px;
  }
}

/* Small Tablet / Large Mobile (451px - 767px) */
@media (min-width: 451px) and (max-width: 767px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }

  .nav-link {
    min-width: auto;
    font-size: 0.85rem;
    padding: 0.4rem 0.65rem;
  }

  .main-hero h1 {
    font-size: 2.5rem;
  }
}

/* 
   Mobile Viewport Optimized Range (335px - 450px) 
   User specifically requested this range.
   We apply compact styles here to ensure perfect fit.
*/
@media (min-width: 335px) and (max-width: 450px) {

  html,
  body {
    overflow-x: hidden;
    width: 100%;
  }

  .header-content {
    padding: 0 0.25rem;
    width: 100%;
    max-width: 100%;
  }

  .nav-link {
    font-size: 0.8rem;
    padding: 0.35rem 0.5rem;
    min-width: auto;
  }

  nav.main-nav {
    gap: 4px;
    justify-content: center;
  }

  .main-hero {
    padding: 3rem 1rem;
  }

  .main-hero h1 {
    font-size: 2.1rem;
    /* Slightly larger than smallest mobile */
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .main-hero {
    padding: 2.5rem 1rem;
    border-radius: 0 0 30px 30px;
  }

  .main-hero h1 {
    font-size: 2rem;
    letter-spacing: 1px;
  }

  .main-hero p.hero-subtitle {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
  }

  .cta-button {
    padding: 12px 30px;
    font-size: 1rem;
  }

  .hero-card {
    padding: 1rem;
  }

  .detail-section {
    padding: 0 0.5rem 1rem;
    min-height: auto;
  }

  .detail-content h1 {
    font-size: 1.6rem;
  }

  #detail-desc {
    font-size: 1rem;
    height: auto;
    line-clamp: none;
    -webkit-line-clamp: none;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    padding: 0 1rem;
    gap: 1.5rem;
  }
}

/* Smallest Mobile (Below 335px) */
@media (max-width: 334px) {
  .header-content {
    padding: 0 0.1rem;
  }

  .nav-link {
    font-size: 0.75rem;
    padding: 0.3rem 0.3rem;
    min-width: auto;
  }

  .main-hero h1 {
    font-size: 1.8rem;
  }

  .main-hero h1 {
    font-size: 1.8rem;
  }

  .footer-logo {
    max-width: 100px;
  }
}

/* User Request: Precise Footer Spacing */
.footer-grid,
.footer-section {
  margin-bottom: 0px !important;
  padding-bottom: 0px !important;
}

.whatsapp-form,
.about-text,
.map-container {
  margin-bottom: 10px !important;
}

.copyright {
  margin-top: 0px !important;
  padding-top: 2px !important;
  margin-bottom: 10px !important;
  padding-bottom: 0px !important;
}

footer {
  padding-bottom: 0px !important;
}