/* ===== IMI Bearings - Global Industrial Website ===== */
/* Color Palette: Industrial Red */

:root {
  --primary: #7f1d1d;
  --primary-light: #b91c1c;
  --primary-dark: #450a0a;
  --accent: #dc2626;
  --accent-light: #ef4444;
  --steel: #4a5568;
  --steel-light: #718096;
  --bg-white: #ffffff;
  --bg-light: #f7f8fa;
  --bg-gray: #e8ecf1;
  --text-dark: #1a202c;
  --text-body: #2d3748;
  --text-muted: #718096;
  --text-light: #a0aec0;
  --border: #e2e8f0;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --transition: 0.2s ease;
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Inter', 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text-body);
  background: var(--bg-white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-light); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent); }

img { max-width: 100%; height: auto; display: block; }

ul, ol { list-style: none; }

/* Typography */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  color: var(--text-dark);
  line-height: 1.3;
}
h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.section-title {
  text-align: center;
  margin-bottom: 3rem;
}
.section-title h2 {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 0.5rem;
}
.section-title p {
  color: var(--text-muted);
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto;
}

/* Layout */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 2rem;
}

section {
  padding: 5rem 0;
}

/* ===== Header / Navigation ===== */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: var(--bg-white);
  border-bottom: 1px solid var(--border);
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition);
}
.header.scrolled {
  background: rgba(255,255,255,0.97);
  box-shadow: var(--shadow-sm);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}
.logo img {
  max-height: 42px;
  width: auto;
}
.footer-logo {
  max-height: 32px;
  width: auto;
  margin-bottom: 1rem;
  display: block;
}
.logo-text {
  font-size: 0.85rem;
  color: var(--text-muted);
  letter-spacing: 1px;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  gap: 2rem;
  align-items: center;
}
.nav-links a {
  color: var(--text-body);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  position: relative;
}
.nav-links a:hover,
.nav-links a.active {
  color: var(--primary);
}
.nav-links a.active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.5rem;
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  font-weight: 600;
  transition: all var(--transition);
  cursor: pointer;
  border: none;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-light);
  color: #fff;
}
.btn-outline {
  background: transparent;
  border: 1.5px solid var(--primary);
  color: var(--primary);
}
.btn-outline:hover {
  background: var(--primary);
  color: #fff;
}
.btn-large {
  padding: 0.85rem 2rem;
  font-size: 1rem;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 0.5rem;
  background: none;
  border: none;
}
.menu-toggle span {
  width: 24px;
  height: 2px;
  background: var(--text-dark);
  transition: all var(--transition);
  border-radius: 2px;
}

/* ===== Hero ===== */
.hero {
  position: relative;
  min-height: 600px;
  display: flex;
  align-items: center;
  padding-top: 70px;
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
  color: #fff;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('images/hero-bg.jpg') center/cover no-repeat;
  opacity: 0.15;
}
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 650px;
  padding: 0 2rem;
}
.hero h1 {
  font-size: 3rem;
  color: #fff;
  margin-bottom: 1.5rem;
  line-height: 1.2;
}
.hero h1 span {
  color: var(--accent);
}
.hero p {
  font-size: 1.2rem;
  opacity: 0.9;
  margin-bottom: 2rem;
  line-height: 1.7;
}
.hero-stats {
  display: flex;
  gap: 2rem;
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.2);
}
.hero-stat {
  text-align: center;
}
.hero-stat .number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}
.hero-stat .label {
  font-size: 0.85rem;
  opacity: 0.7;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}
.hero-btns .btn-primary { background: var(--accent); }
.hero-btns .btn-primary:hover { background: var(--accent-light); }
.hero-btns .btn-outline { border-color: #fff; color: #fff; }
.hero-btns .btn-outline:hover { background: #fff; color: var(--primary); }

/* ===== Products Section ===== */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.product-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  transition: all 0.3s ease;
  cursor: pointer;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.product-card .icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  font-size: 1.8rem;
  color: var(--primary);
}
.product-card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}
.product-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 1rem;
}
.product-card .learn-more {
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
}

/* ===== Why Choose Us ===== */
.why-section {
  background: var(--bg-light);
}

.advantages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.advantage-card {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  padding: 2rem;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
}
.advantage-card:hover {
  box-shadow: var(--shadow-md);
}
.advantage-card .icon-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 1.25rem;
}
.advantage-card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
}
.advantage-card p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ===== Factory Section ===== */
.factory-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.factory-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--bg-gray);
  aspect-ratio: 4/3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
}
.factory-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.factory-info h2 {
  color: var(--primary);
  margin-bottom: 1.5rem;
}
.factory-info p {
  color: var(--text-body);
  margin-bottom: 1rem;
  line-height: 1.7;
}
.factory-specs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}
.factory-spec {
  background: var(--bg-light);
  padding: 1rem;
  border-radius: var(--radius-md);
  text-align: center;
}
.factory-spec .value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}
.factory-spec .label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== CTA Section ===== */
.cta-section {
  background: var(--primary);
  color: #fff;
  text-align: center;
}
.cta-section h2 {
  color: #fff;
  margin-bottom: 1rem;
}
.cta-section p {
  opacity: 0.85;
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

/* ===== Footer ===== */
.footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 1.5rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-about p {
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}
.footer h4 {
  color: #fff;
  font-size: 0.95rem;
  margin-bottom: 1rem;
}
.footer-links a {
  color: rgba(255,255,255,0.6);
  font-size: 0.85rem;
  display: block;
  padding: 0.3rem 0;
}
.footer-links a:hover {
  color: var(--accent);
}
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
}

/* ===== Contact Form ===== */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 3rem;
}
.contact-info-item {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
  align-items: flex-start;
}
.contact-info-item .icon {
  width: 40px;
  height: 40px;
  background: var(--bg-light);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--primary);
  font-size: 1.1rem;
}
.contact-info-item h4 {
  font-size: 0.95rem;
  margin-bottom: 0.25rem;
}
.contact-info-item p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.form-group {
  margin-bottom: 1.25rem;
}
.form-group label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-body);
  margin-bottom: 0.5rem;
}
.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 0.9rem;
  color: var(--text-body);
  background: var(--bg-white);
  transition: border-color var(--transition);
  font-family: inherit;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: 0 0 0 3px rgba(185,28,28,0.15);
}
.form-group textarea {
  resize: vertical;
  min-height: 120px;
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.contact-form-wrapper {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
}

/* ===== Quality Page ===== */
.quality-process {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  position: relative;
}
.quality-step {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  position: relative;
}
.quality-step .step-number {
  width: 36px;
  height: 36px;
  background: var(--accent);
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  font-weight: 700;
  margin: 0 auto 1rem;
}
.quality-step h4 {
  font-size: 1rem;
  margin-bottom: 0.5rem;
}
.quality-step p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.cert-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}
.cert-card {
  background: var(--bg-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-align: center;
}
.cert-card h4 {
  margin-bottom: 0.5rem;
}
.cert-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===== Product Detail Page ===== */
.product-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 3rem;
  align-items: start;
}
.product-detail-image {
  background: var(--bg-gray);
  border-radius: var(--radius-lg);
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
}
.product-detail-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product-specs-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1.5rem;
}
.product-specs-table th,
.product-specs-table td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
}
.product-specs-table th {
  background: var(--bg-light);
  color: var(--text-body);
  font-weight: 600;
  width: 40%;
}

/* ===== Page Header (inner pages) ===== */
.page-header {
  background: var(--primary);
  color: #fff;
  padding: 4rem 0 3rem;
  text-align: center;
  margin-top: 70px;
}
.page-header h1 {
  color: #fff;
  font-size: 2.2rem;
  margin-bottom: 0.5rem;
}
.page-header p {
  opacity: 0.8;
  font-size: 1.1rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 2rem;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb span { color: var(--text-body); }

/* ===== Responsive ===== */
@media (max-width: 992px) {
  .factory-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .product-detail-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2.2rem; }
}

@media (max-width: 768px) {
  section { padding: 3.5rem 0; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .nav-links { display: none; }
  .menu-toggle { display: flex; }

  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 70px;
    left: 0;
    right: 0;
    background: var(--bg-white);
    padding: 1.5rem 2rem;
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    gap: 1rem;
  }

  .hero { min-height: 500px; }
  .hero h1 { font-size: 1.8rem; }
  .hero p { font-size: 1rem; }
  .hero-stats { gap: 1rem; }
  .hero-stat .number { font-size: 1.5rem; }

  .products-grid { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
  .advantages-grid { grid-template-columns: 1fr; }

  .factory-specs { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: 0.5rem; text-align: center; }
}

@media (max-width: 480px) {
  .container { padding: 0 1rem; }
  .hero h1 { font-size: 1.5rem; }
  .hero-btns { flex-direction: column; }
  .hero-btns .btn { width: 100%; justify-content: center; }
  .hero-stats { flex-direction: column; gap: 0.75rem; }
  .products-grid { grid-template-columns: 1fr 1fr; }
}

/* ===== Utility ===== */
.text-center { text-align: center; }
.text-accent { color: var(--accent); }
.bg-light { background: var(--bg-light); }
.bg-primary { background: var(--primary); color: #fff; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 2rem; }

/* Scroll animations */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== Floating WhatsApp Button ===== */
.whatsapp-float {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  z-index: 999;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-decoration: none;
}
.whatsapp-float:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 16px rgba(0,0,0,0.3);
}
.whatsapp-float svg {
  width: 30px;
  height: 30px;
  fill: #fff;
}
@media (max-width: 480px) {
  .whatsapp-float {
    bottom: 16px;
    right: 16px;
    width: 48px;
    height: 48px;
  }
  .whatsapp-float svg {
    width: 26px;
    height: 26px;
  }
}
