/* ==========================================================================
   Balaji Globexim - Premium Design System
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&display=swap');

:root {
  /* Color Palette */
  --bg-dark: #070f1a;
  --bg-darker: #040911;
  --primary: #0f2b4d; /* Deep Blue */
  --primary-light: #164073;
  --accent: #d4af37; /* Gold/Bronze */
  --accent-hover: #f1c94f;
  --text-main: #f0f4f8;
  --text-muted: #a0aec0;
  
  /* Glassmorphism */
  --glass-bg: rgba(15, 43, 77, 0.4);
  --glass-border: rgba(255, 255, 255, 0.08);
  --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
  
  /* Typography */
  --font-sans: 'Inter', sans-serif;
  --font-serif: 'Playfair Display', serif;
  
  /* Utilities */
  --border-radius: 12px;
  --transition-fast: 0.2s ease;
  --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   RESET & BASE
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-darker);
  color: var(--text-main);
  line-height: 1.6;
  overflow-x: hidden; /* Prevent horizontal scrolling */
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
}

a {
  text-decoration: none;
  color: inherit;
  transition: color var(--transition-fast);
}

ul {
  list-style: none;
}

.section-title {
  font-size: clamp(2rem, 4vw, 2.5rem);
  text-align: center;
  margin-bottom: 1rem;
  color: var(--text-main);
  position: relative;
  display: inline-block;
  transform: translateX(-50%);
}

.section-title.left-align {
  left: 0;
  transform: none;
  text-align: left;
}

.section-title.left-align::after {
  left: 0;
  transform: none;
}

.page-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  margin-bottom: 15px;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 2px;
  background-color: var(--accent);
  transition: width var(--transition-normal);
}

.section-title:hover::after {
  width: 100px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ==========================================================================
   NAVBAR (GLASSMORPHISM)
   ========================================================================== */
nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 20px 5%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 1000;
  transition: all var(--transition-normal);
  background: transparent;
}

nav.scrolled {
  background: rgba(4, 9, 17, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  padding: 12px 5%;
  border-bottom: 1px solid var(--glass-border);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.brand {
  display: flex;
  align-items: center;
  gap: 15px;
}

.brand img {
  height: 45px;
  background: #fff;
  padding: 4px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
  transition: transform var(--transition-normal);
}

.brand img:hover {
  transform: scale(1.05);
}

.brand span {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: 1px;
  background: linear-gradient(90deg, #fff, var(--text-muted));
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
/* Menu Overlay */
.menu-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  z-index: 998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.4s cubic-bezier(0.77, 0, 0.175, 1);
}

.menu-overlay.active {
  opacity: 1;
  visibility: visible;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-links a {
  color: var(--text-main);
  font-size: 0.95rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1px;
  position: relative;
  padding-bottom: 5px;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--accent);
  transition: width var(--transition-fast);
}

.nav-links a:hover::after,
.nav-links a.active::after {
  width: 100%;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--accent);
}

.menu-toggle {
  display: none;
  font-size: 28px;
  color: var(--text-main);
  cursor: pointer;
  z-index: 1001;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero {
  height: 100vh;
  min-height: 600px;
  background: linear-gradient(135deg, rgba(4,9,17,0.9) 0%, rgba(15,43,77,0.7) 100%),
              url("images/hero.jpg") center/cover no-repeat fixed;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 0 20px;
  position: relative;
}

.hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 150px;
  background: linear-gradient(to top, var(--bg-darker), transparent);
}

.hero-content {
  z-index: 10;
  max-width: 900px;
  animation: fadeUp 1s ease forwards;
}

.hero h1 {
  font-size: clamp(3rem, 6vw, 5rem);
  margin-bottom: 20px;
  text-shadow: 0 10px 30px rgba(0,0,0,0.5);
  letter-spacing: -1px;
}

.hero h1 span {
  color: var(--accent);
}

.hero p {
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--text-muted);
  margin-bottom: 40px;
  max-width: 700px;
  margin-inline: auto;
  font-weight: 300;
}

.hero-buttons {
  display: flex;
  gap: 20px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 16px 36px;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  border-radius: 50px;
  transition: all var(--transition-normal);
  cursor: pointer;
  border: 1px solid transparent;
  backdrop-filter: blur(5px);
}

.btn-primary {
  background: var(--accent);
  color: #000;
  box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
  background: var(--accent-hover);
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(212, 175, 55, 0.4);
}

.btn-outline {
  background: rgba(255,255,255,0.05);
  color: var(--text-main);
  border-color: rgba(255,255,255,0.2);
}

.btn-outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: var(--text-main);
  transform: translateY(-5px);
}

.btn-whatsapp {
  background: #25d366;
  color: #fff;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
  background: #20b858;
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
}

/* ==========================================================================
   MARQUEE (TRUST SIGNALS)
   ========================================================================== */
.marquee-wrapper {
  background: var(--primary-light);
  color: var(--text-main);
  padding: 12px 0;
  width: 100%;
  overflow: hidden;
  position: relative;
  z-index: 10;
  border-top: 1px solid rgba(255,255,255,0.1);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.marquee-content {
  display: flex;
  align-items: center;
  white-space: nowrap;
  animation: marquee-scroll 25s linear infinite;
  width: max-content;
}

.marquee-content span {
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin: 0 20px;
}

.marquee-content .dot {
  color: var(--accent);
  margin: 0 10px;
  font-size: 1.2rem;
}

@keyframes marquee-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); } /* Scrolls half its width, as content is duplicated */
}

/* ==========================================================================
   LAYOUT SECTIONS
   ========================================================================== */
.section {
  padding: 100px 5%;
  position: relative;
}

.section-bg-alt {
  background-color: var(--bg-dark);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
}

/* ==========================================================================
   GLASS CARDS & GRIDS
   ========================================================================== */
.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 30px;
  align-items: start; /* Prevent sibling cards from stretching when one expands */
}

.glass-card {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 40px 30px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: var(--glass-shadow);
  transition: all var(--transition-normal);
  position: relative;
  overflow: hidden; /* Restore hidden so expanding content doesn't break border radius */
  display: flex;
  flex-direction: column;
}

.glass-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, transparent 100%);
  opacity: 0;
  transition: opacity var(--transition-normal);
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
}

.glass-card:hover {
  transform: translateY(-8px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 15px 35px rgba(212, 175, 55, 0.1), 0 5px 15px rgba(0,0,0,0.4);
}

.glass-card:hover::before {
  opacity: 1;
}

.product-card {
  padding: 0;
  cursor: pointer;
  z-index: 10;
}

.product-img-wrapper {
  height: 220px;
  overflow: hidden;
  position: relative;
  border-radius: inherit;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}

.product-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}

.product-card:hover img {
  transform: scale(1.05); /* Smoother, premium zoom instead of 1.1 */
}

.product-info {
  padding: 25px;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
}

.product-info h3 {
  font-size: 1.5rem; /* Larger title for hierarchy */
  margin-bottom: 12px;
  color: var(--accent);
}

.product-info p {
  color: #cadcf2; /* Lighter color for better readability against dark bg */
  font-size: 0.95rem;
  margin-bottom: 20px; /* Increased spacing inside cards */
}

.product-meta {
  margin-top: auto;
}

.product-description {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding: 0 25px;
  font-size: 0.9rem;
  color: var(--text-muted);
  transition: all var(--transition-normal);
  background: rgba(255, 255, 255, 0.02); /* Soft integration */
  border-top: 1px solid transparent;
}

.product-card {
  z-index: 10;
}

/* ==========================================================================
   CATEGORY SECTION HEADINGS (Services Page)
   ========================================================================== */
.category-section {
  margin-bottom: 70px;
}

.category-header {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-bottom: 40px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--glass-border);
  position: relative;
}

.category-header::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 60px;
  height: 2px;
  background: var(--accent);
}

.category-header h2 {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}


.product-card.expanded {
  z-index: 20;
}

.product-card.expanded .product-description {
  max-height: 400px;
  opacity: 1;
  padding: 25px;
  border-top: 1px solid var(--glass-border);
}

/* Category Specificity & Separation */
.category-section {
  position: relative;
  padding: 80px 0;
  margin-bottom: 40px;
  border-radius: var(--border-radius);
  transition: background var(--transition-normal);
}

.category-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border), transparent);
}

.category-section:last-child::after {
  display: none;
}

.category-header {
  margin-bottom: 40px;
  display: flex;
  align-items: center;
  gap: 15px;
}

.category-icon {
  font-size: 2rem;
  background: rgba(212, 175, 55, 0.1);
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, 0.2);
}

/* Specific Backgrounds for Categories */
#agro-section {
  background: linear-gradient(180deg, rgba(15, 43, 77, 0.1) 0%, transparent 100%);
}

#alu-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02) 0%, transparent 100%);
}

#copper-section {
  background: linear-gradient(180deg, rgba(184, 115, 51, 0.05) 0%, transparent 100%);
}

/* ==========================================================================
   ABOUT SNIPPET (Image + Text split)
   ========================================================================== */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}

.split-text h2 {
  font-size: 2.5rem;
  margin-bottom: 25px;
  color: var(--accent);
}

.split-text p {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--text-muted);
}

.split-image {
  position: relative;
  border-radius: var(--border-radius);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}

.split-image::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  pointer-events: none;
}

.split-image img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--transition-slow);
}

.split-image:hover img {
  transform: scale(1.05);
}

/* ==========================================================================
   CONTACT FORM
   ========================================================================== */
.contact-wrapper {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 50px;
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: var(--border-radius);
  padding: 50px;
  backdrop-filter: blur(10px);
}

.contact-info h3 {
  font-size: 1.8rem;
  margin-bottom: 20px;
  color: var(--accent);
}

.contact-info p {
  color: var(--text-muted);
  margin-bottom: 30px;
}

.info-item {
  display: flex;
  align-items: flex-start;
  gap: 15px;
  margin-bottom: 20px;
}

.info-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(212, 175, 55, 0.1);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.form-group {
  margin-bottom: 20px;
}

.form-control {
  width: 100%;
  padding: 15px 20px;
  background: rgba(0,0,0,0.2);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-sans);
  font-size: 1rem;
  transition: all var(--transition-fast);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent);
  background: rgba(0,0,0,0.4);
}

.form-control::placeholder {
  color: rgba(255,255,255,0.3);
}

textarea.form-control {
  resize: vertical;
  min-height: 150px;
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
footer {
  background: #02050a;
  border-top: 1px solid rgba(255,255,255,0.05);
  padding: 40px 5%;
  text-align: center;
}

.footer-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  background-position: center;
}

.footer-logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  color: var(--text-main);
  letter-spacing: 1px;
}

.footer-logo span {
  color: var(--accent);
}

.footer-links {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
}

.footer-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.copyright {
  color: rgba(255,255,255,0.4);
  font-size: 0.85rem;
}

/* ==========================================================================
   UTILITIES & ANIMATIONS
   ========================================================================== */
.floating-whatsapp {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 60px;
  height: 60px;
  background: #25d366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  box-shadow: 0 4px 15px rgba(37, 211, 102, 0.4);
  z-index: 999;
  transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.floating-whatsapp:hover {
  transform: scale(1.15) rotate(-10deg);
}


/* Reveal Animations triggered by JS */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform; /* Performance optimization */
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

/* Float Animation */
@keyframes float {
  0% { transform: translateY(0px); }
  50% { transform: translateY(-15px); }
  100% { transform: translateY(0px); }
}

.float-anim {
  animation: float 6s ease-in-out infinite;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 992px) {
  .split-layout {
    grid-template-columns: 1fr;
  }
  
  .contact-wrapper {
    grid-template-columns: 1fr;
    padding: 30px;
  }
}

@media (max-width: 1024px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  /* Animated Hamburger Icon */
  .menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 32px;
    height: 22px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1000;
  }
  
  .menu-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    transform-origin: left center;
  }
  
  .menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg);
  }
  
  .menu-toggle.active span:nth-child(2) {
    opacity: 0;
    width: 0;
  }
  
  .menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg);
  }

  .nav-links {
    position: fixed;
    top: 0;
    right: -100%;
    width: 300px;
    max-width: 80vw;
    height: 100vh;
    background: rgba(4, 9, 17, 0.95);
    backdrop-filter: blur(20px); /* Enhanced glass blur */
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    box-shadow: -10px 0 40px rgba(0,0,0,0.8);
    border-left: 1px solid rgba(255,255,255,0.05);
    z-index: 999;
  }

  .nav-links.active {
    right: 0;
  }

  .nav-links a {
    font-size: 1.5rem; /* Larger font for readability */
    margin: 15px 0;
    padding: 15px 40px; /* Min 44px tap target */
    width: 100%;
    text-align: center;
    border-radius: 8px;
  }
  
  .nav-links a:hover, .nav-links a.active {
    background: rgba(212, 175, 55, 0.1);
  }

  .hero h1 {
    font-size: 2.5rem;
  }
  
  .section {
    padding: 70px 5%;
  }

  .btn {
    width: 100%;
    margin-bottom: 10px;
  }
}

@media (max-width: 640px) {
  .section {
    padding: 50px 5%;
  }
  .hero h1 {
    font-size: 2rem;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 25px; /* Increased from 20px to prevent mobile cramping */
  }
  .glass-card {
    padding: 30px 20px; /* Thicker top padding for mobile */
  }
  .product-img-wrapper {
    height: 200px;
  }
  .split-text h2 {
    font-size: 2rem;
  }
}
