/* 
  Trua Mineral - B2B Calcite Distributor Homepage
  Design System & Stylesheet
*/

/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  /* Color Palette */
  --navy-primary: #0f2042;
  --navy-dark: #071124;
  --blue-accent: #0072ff;
  --blue-light: #e6f0ff;
  --text-dark: #1e293b;
  --text-muted: #506580;
  --white: #ffffff;
  
  /* Fonts */
  --font-primary: 'Inter', sans-serif;
  --font-heading: 'Outfit', sans-serif;
  
  /* Shadows & Transitions */
  --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
  --shadow-md: 0 10px 15px -3px rgba(15, 32, 66, 0.1), 0 4px 6px -2px rgba(15, 32, 66, 0.05);
  --shadow-lg: 0 20px 25px -5px rgba(15, 32, 66, 0.15), 0 10px 10px -5px rgba(15, 32, 66, 0.04);
  --shadow-hover: 0 20px 30px -5px rgba(15, 32, 66, 0.22), 0 10px 15px -5px rgba(0, 114, 255, 0.15);
  --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-primary);
  color: var(--text-dark);
  background-color: #f7fafc;
  line-height: 1.5;
  overflow-x: hidden;
}

/* Sticky Header with Glassmorphism */
.header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.1rem 5%; /* Increased padding to give the larger logo container breathing room */
  z-index: 1000;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: rgba(255, 255, 255, 0.92); /* Slightly higher opacity for clean separation */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.5);
  box-shadow: 0 4px 30px rgba(15, 32, 66, 0.05);
  transition: var(--transition-smooth);
}

.logo-container {
  display: flex;
  align-items: center;
  max-width: 600px; /* Expanded to fit the larger brand section */
  animation: fadeInDown 0.8s ease;
}

.logo-container a {
  display: flex;
  align-items: center;
  gap: 1.3rem; /* Spacing between larger logo graphic and text */
  text-decoration: none;
  width: 100%;
}

.logo-img {
  width: auto;
  height: 120px;
  max-height: 130px;
  object-fit: contain;
  image-rendering: -webkit-optimize-contrast;
  flex-shrink: 0;
}

.logo-text-block {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: left;
  line-height: 1.15;
  gap: 0.2rem; /* Proportional gap for larger fonts */
  flex-shrink: 0;
}

.logo-text-title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.75rem; /* Significantly enlarged bold title */
  color: var(--navy-primary);
  letter-spacing: 0.5px;
}

.logo-text-subtitle {
  font-family: var(--font-primary);
  font-weight: 600;
  font-size: 0.85rem; /* Proportional scale-up */
  color: var(--text-muted);
  letter-spacing: 1.8px;
  text-transform: uppercase;
}

.logo-text-slogan {
  font-family: var(--font-primary);
  font-weight: 700;
  font-size: 0.92rem; /* Proportional scale-up */
  color: var(--blue-accent);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  animation: fadeInDown 0.8s ease 0.1s;
  animation-fill-mode: both;
}

.nav-list {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 1.8rem; /* Enhanced spacing between navigation items */
}

.nav-link {
  text-decoration: none;
  font-size: 1.05rem; /* Larger, sharper, and highly legible links */
  font-weight: 600; /* Increased font-weight to 600 as requested */
  text-transform: uppercase;
  color: var(--navy-primary);
  transition: var(--transition-smooth);
  letter-spacing: 0.8px;
  padding: 0.4rem 0.6rem;
}

.nav-link:hover {
  color: var(--blue-accent);
}

.nav-separator {
  color: rgba(15, 32, 66, 0.25);
  font-weight: 300;
  font-size: 1rem;
  user-select: none;
}

/* Hero Section with Video Background */
.hero-section {
  position: relative;
  width: 100%;
  height: 100vh;
  min-height: 600px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  color: var(--white);
  text-align: center;
}

.hero-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

/* 45% Opacity Black Overlay Mask */
.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.45);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  max-width: 900px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-top: 4rem; /* offset for header */
}

.hero-title-main {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: clamp(2.6rem, 5.5vw, 4.4rem); /* Proportionally balanced size */
  line-height: 1.15;
  letter-spacing: 1.5px; /* Elegantly spaced */
  color: var(--white);
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.45); /* High-contrast sharpness */
  animation: fadeInUp 1s ease 0.1s both;
}

.hero-subtitle {
  font-family: var(--font-heading);
  font-weight: 600; /* Medium-bold for hierarchy contrast */
  font-size: clamp(1.2rem, 2.2vw, 1.9rem); /* Balanced height ratio */
  color: var(--white);
  letter-spacing: 3px; /* Elegant widely spaced typography */
  text-transform: uppercase;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  animation: fadeInUp 1s ease 0.2s both;
}

.hero-description {
  font-size: clamp(0.95rem, 1.3vw, 1.15rem);
  color: rgba(255, 255, 255, 0.85);
  font-weight: 500;
  max-width: 580px;
  padding: 0.6rem 2rem;
  border-top: 1.5px solid rgba(255, 255, 255, 0.25);
  border-bottom: 1.5px solid rgba(255, 255, 255, 0.25);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  letter-spacing: 1px;
  animation: fadeInUp 1s ease 0.3s both;
}

.scroll-down-btn {
  margin-top: 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  color: var(--white);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  opacity: 0.85;
  transition: var(--transition-smooth);
  animation: fadeInUp 1s ease 0.4s both;
}

.scroll-down-btn:hover {
  opacity: 1;
  color: var(--blue-accent);
}

.scroll-down-btn svg {
  animation: bounce 2s infinite;
}

/* Applications Section */
.applications-section {
  padding: 7rem 6% 6rem;
  position: relative;
  background-image: linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.92)), 
                    url('https://images.unsplash.com/photo-1590082742585-238b1893c72a?auto=format&fit=crop&w=1920&q=80');
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
  z-index: 5;
}

.section-header {
  text-align: center;
  max-width: 800px;
  margin: 0 auto 4.5rem;
}

.section-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 3.5vw, 2.8rem);
  font-weight: 800;
  color: var(--navy-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.05rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Grid of 12 Application Cards */
.app-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 3rem;
  max-width: 1300px;
  margin: 0 auto;
  justify-items: center;
  text-align: center;
}



.app-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  cursor: pointer;
  text-decoration: none; /* Keep text clean for links */
  color: inherit;
}

/* Circular Card Component */
.app-card-circle {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  overflow: hidden;
  background-color: var(--white);
  border: 4px solid var(--white);
  box-shadow: var(--shadow-md);
  transition: var(--transition-smooth);
  position: relative;
  z-index: 10;
}

/* No internal dark overlays on circles */
.app-card-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition-smooth);
}

/* Card Label Below Daires */
.app-card-label {
  margin-top: 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--navy-primary);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  transition: color 0.3s ease;
  z-index: 10;
}

/* Hover State Interactions */
/* Only scale the circle, keeping the text static */
.app-card:hover .app-card-circle {
  transform: translateY(-8px) scale(1.05);
  box-shadow: var(--shadow-hover);
  border-color: var(--blue-accent);
}

.app-card:hover .app-card-circle img {
  transform: scale(1.12);
}

.app-card:hover .app-card-label {
  color: var(--blue-accent); /* Color highlights, text size remains static */
}

/* B2B Call-to-Action Section */
.cta-section {
  padding: 6.5rem 6%;
  background: #f8fafc;
  border-top: 1px solid #e2e8f0;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  position: relative;
  z-index: 10;
}

.cta-container {
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.cta-title {
  font-family: var(--font-heading);
  font-size: clamp(1.8rem, 3.2vw, 2.6rem);
  font-weight: 800;
  color: var(--navy-primary);
  line-height: 1.2;
}

.cta-text {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 820px;
  font-weight: 500;
}

.cta-buttons {
  display: flex;
  gap: 1.25rem;
  margin-top: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.btn {
  display: inline-block;
  padding: 0.95rem 2.2rem;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  border-radius: 50px;
  text-decoration: none;
  transition: var(--transition-smooth);
  cursor: pointer;
  border: 2px solid transparent;
}

.btn-primary {
  background: var(--blue-accent);
  color: var(--white);
  box-shadow: 0 4px 15px rgba(0, 114, 255, 0.25);
}

.btn-primary:hover {
  background: var(--navy-primary);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(15, 32, 66, 0.18);
}

.btn-secondary {
  background: transparent;
  color: var(--navy-primary);
  border-color: var(--navy-primary);
}

.btn-secondary:hover {
  background: var(--navy-primary);
  color: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(15, 32, 66, 0.1);
}

/* Sub-Applications Tabs */
.sub-apps-container {
  display: flex;
  gap: 0.8rem;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 1.8rem;
}

.sub-app-btn {
  background: var(--white);
  color: var(--navy-primary);
  border: 1.5px solid rgba(15, 32, 66, 0.15);
  padding: 0.6rem 1.3rem;
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 50px;
  cursor: pointer;
  transition: var(--transition-smooth);
  letter-spacing: 0.5px;
  outline: none;
}

.sub-app-btn:hover {
  border-color: var(--blue-accent);
  color: var(--blue-accent);
  background: var(--blue-light);
}

.sub-app-btn.active {
  background: var(--blue-accent);
  color: var(--white);
  border-color: var(--blue-accent);
  box-shadow: 0 4px 15px rgba(0, 114, 255, 0.2);
}

/* Active State for Application Circular Card Link */
.app-card.active .app-card-circle {
  border-color: var(--blue-accent);
  box-shadow: 0 0 25px rgba(0, 114, 255, 0.45);
  transform: translateY(-8px) scale(1.06);
}

.app-card.active .app-card-label {
  color: var(--blue-accent);
}

/* Drill-down Interactive Container */
.drilldown-container {
  margin-top: 4.5rem;
  padding: 4.5rem 5%;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  border: 1px solid rgba(15, 32, 66, 0.08);
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 1300px;
  margin-left: auto;
  margin-right: auto;
  animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.active-sector-header {
  text-align: center;
  margin-bottom: 3.5rem;
  border-bottom: 2px solid var(--blue-light);
  padding-bottom: 1.8rem;
}

.active-sector-title {
  font-family: var(--font-heading);
  font-size: 2rem;
  color: var(--navy-primary);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.active-sector-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  margin-top: 0.6rem;
  font-weight: 500;
  max-width: 780px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Level 2: Product Grid and Cards */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 2rem;
  margin-bottom: 5rem;
}

.product-card {
  background: var(--white);
  border: 1px solid rgba(15, 32, 66, 0.08);
  border-radius: 14px;
  padding: 2.2rem 2rem;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: var(--transition-smooth);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1.1rem;
  text-align: left;
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-5px);
  border-color: var(--blue-accent);
  box-shadow: var(--shadow-md);
}

.product-card.selected {
  border: 2px solid var(--blue-accent);
  background: var(--blue-light);
  box-shadow: 0 8px 24px rgba(0, 114, 255, 0.12);
}

.product-card.selected::before {
  content: "SELECTED";
  position: absolute;
  top: 0;
  right: 0;
  background: var(--blue-accent);
  color: var(--white);
  font-size: 0.62rem;
  font-weight: 800;
  padding: 0.25rem 0.75rem;
  border-bottom-left-radius: 8px;
  letter-spacing: 0.5px;
}

.product-grade {
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--navy-primary);
  letter-spacing: 0.5px;
}

.product-type {
  font-size: 0.72rem;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--blue-accent);
  background: var(--blue-light);
  padding: 0.28rem 0.8rem;
  border-radius: 50px;
  letter-spacing: 0.8px;
}

.product-card.selected .product-type {
  background: var(--white);
}

.product-spec {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
}

/* Level 3: Static B2B Inquiry Form */
.inquiry-form-container {
  width: 100%;
  border-top: 1px solid rgba(15, 32, 66, 0.1);
  padding-top: 4rem;
}

.inquiry-form-title {
  font-family: var(--font-heading);
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--navy-primary);
  text-align: center;
  margin-bottom: 0.6rem;
}

.inquiry-form-desc {
  font-size: 1.05rem;
  color: var(--text-muted);
  text-align: center;
  margin-bottom: 3.2rem;
  font-weight: 500;
}

.inquiry-form {
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.8rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.8rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  text-align: left;
}

.form-group label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy-primary);
  text-transform: uppercase;
  letter-spacing: 0.8px;
}

.form-group input, 
.form-group textarea {
  padding: 0.95rem 1.3rem;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 1px solid rgba(15, 32, 66, 0.15);
  font-family: var(--font-primary);
  outline: none;
  transition: var(--transition-smooth);
  background: #fafbfc;
}

.form-group input:focus, 
.form-group textarea:focus {
  border-color: var(--blue-accent);
  box-shadow: 0 0 0 3px rgba(0, 114, 255, 0.12);
  background: var(--white);
}

.btn-submit {
  align-self: center;
  margin-top: 1.8rem;
  padding: 1.1rem 3.2rem;
  font-size: 0.95rem;
  width: 100%;
  max-width: 320px;
  box-shadow: 0 4px 15px rgba(0, 114, 255, 0.25);
}

/* Keyframe Animations */
@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(35px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes bounce {
  0%, 20%, 50%, 80%, 100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
  60% {
    transform: translateY(-4px);
  }
}

/* Responsive Overrides */
@media (max-width: 991px) {
  .header {
    padding: 1rem 4%;
  }
  .logo-container {
    max-width: 420px; /* Allow wider container for side-by-side logo text */
  }
  .nav-list {
    gap: 0.8rem;
  }
  .nav-link {
    font-size: 0.85rem;
  }
}

@media (max-width: 768px) {
  .header {
    flex-direction: column;
    gap: 0.8rem;
    padding: 0.8rem 2%;
  }
  .logo-container {
    justify-content: center;
    max-width: 100%;
  }
  .logo-container a {
    justify-content: center;
    gap: 0.9rem;
  }
  .logo-img {
    height: 58px; /* scaled down from 80px on tablet */
  }
  .logo-text-title {
    font-size: 1.35rem;
  }
  .logo-text-subtitle {
    font-size: 0.68rem;
  }
  .logo-text-slogan {
    font-size: 0.72rem;
  }
  .hero-content {
    margin-top: 6rem;
  }
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
  }
  .app-card-circle {
    width: 150px;
    height: 150px;
  }
  .form-row {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
  .drilldown-container {
    padding: 2.5rem 1.5rem;
    margin-top: 3rem;
  }
  .active-sector-header {
    margin-bottom: 2.5rem;
  }
  .products-grid {
    gap: 1.5rem;
    margin-bottom: 3.5rem;
  }
  .inquiry-form-container {
    padding-top: 3rem;
  }
}

@media (max-width: 480px) {
  .logo-img {
    height: 48px; /* Scale down logo icon */
  }
  .logo-container a {
    gap: 0.7rem; /* Reduce spacing between icon and text */
  }
  .logo-text-title {
    font-size: 1.15rem; /* Scale down brand title */
  }
  .logo-text-subtitle {
    font-size: 0.58rem; /* Scale down subtitle */
    letter-spacing: 1px;
  }
  .logo-text-slogan {
    font-size: 0.62rem; /* Adjusted for better legibility on mobile */
    letter-spacing: 0.5px;
  }
  .nav-list {
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem;
  }
  .nav-separator {
    display: none;
  }
  .nav-link {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
  }
  .hero-content {
    margin-top: 8rem;
  }
  .app-card-circle {
    width: 130px;
    height: 130px;
  }
  .app-card-label {
    font-size: 0.85rem;
  }
}


/* Grid Responsiveness */
@media (max-width: 992px) {
  .app-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 576px) {
  .app-grid {
    grid-template-columns: 1fr;
  }
}

/* Floating WhatsApp Button */
.whatsapp-fab {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 1000;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background-color: #25D366;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.25s ease;
  text-decoration: none;
}

.whatsapp-fab:hover {
  transform: scale(1.12);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.45);
}

.whatsapp-fab svg {
  width: 32px;
  height: 32px;
  fill: #ffffff;
}
