/* =====================
   STONEWELL MACHINERY
   Custom Styles
   ===================== */

:root {
  --primary: #1a365d;
  --primary-light: #2a4a7f;
  --primary-dark: #0f1f3d;
  --secondary: #4a5568;
  --accent: #f59e0b;
  --accent-hover: #d97706;
  --light: #f8fafc;
  --light-gray: #e2e8f0;
  --dark: #0f172a;
  --text: #334155;
  --text-light: #64748b;
  --white: #ffffff;
  --success: #10b981;
  --font-heading: 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
  --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
  --shadow-xl: 0 20px 60px rgba(0,0,0,0.15);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Typography ---- */
body {
  font-family: var(--font-body);
  color: var(--text);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary-dark);
}

/* ---- Navigation ---- */
.navbar {
  transition: var(--transition);
  padding: 1rem 0;
}

.navbar.scrolled {
  background: rgba(26, 54, 93, 0.97) !important;
  padding: 0.5rem 0;
  box-shadow: var(--shadow-lg);
}

.navbar .nav-link {
  position: relative;
  color: rgba(255,255,255,0.85) !important;
  font-weight: 500;
  font-size: 0.9rem;
  padding: 0.5rem 1rem !important;
  transition: var(--transition);
}

.navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 1rem;
  right: 1rem;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.navbar .nav-link:hover::after,
.navbar .nav-link.active::after {
  transform: scaleX(1);
}

.navbar .nav-link:hover {
  color: #fff !important;
}

/* ---- Hero Section ---- */
.hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #0f1f3d 0%, #1a365d 40%, #2a4a7f 100%);
}

.hero-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 80% 20%, rgba(245, 158, 11, 0.08) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(26, 54, 93, 0.3) 0%, transparent 50%);
}

.hero-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.03;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 40px, rgba(255,255,255,0.1) 40px, rgba(255,255,255,0.1) 41px),
    repeating-linear-gradient(90deg, transparent, transparent 40px, rgba(255,255,255,0.1) 40px, rgba(255,255,255,0.1) 41px);
}

.hero-accent-shape {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(245,158,11,0.06) 0%, transparent 70%);
  top: -200px;
  right: -200px;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: rgba(245, 158, 11, 0.15);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 50px;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 1.5rem;
}

.hero-title {
  font-size: clamp(2.5rem, 6vw, 4rem);
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 1.5rem;
}

.hero-title .highlight {
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: clamp(1rem, 1.8vw, 1.2rem);
  color: rgba(255,255,255,0.7);
  line-height: 1.7;
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.hero-stats {
  display: flex;
  gap: 3rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.hero-stat-item h3 {
  font-size: 2rem;
  color: var(--accent);
  margin-bottom: 0.25rem;
}

.hero-stat-item p {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin: 0;
}

/* ---- Hero Image ---- */
.hero-image-wrapper {
  position: relative;
}

.hero-image-wrapper .main-image {
  border-radius: 12px;
  box-shadow: var(--shadow-xl);
  transform: perspective(1000px) rotateY(-5deg);
  transition: transform 0.5s ease;
}

.hero-image-wrapper:hover .main-image {
  transform: perspective(1000px) rotateY(0deg);
}

.hero-image-wrapper .floating-card {
  position: absolute;
  background: var(--white);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: var(--shadow-lg);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  animation: float 3s ease-in-out infinite;
}

.hero-image-wrapper .floating-card:nth-child(2) {
  bottom: -20px;
  left: -20px;
}

.hero-image-wrapper .floating-card:nth-child(3) {
  top: 20%;
  right: -30px;
  animation-delay: 1.5s;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---- Sections ---- */
.section-padding {
  padding: 5rem 0;
}

.section-title {
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  margin-bottom: 0.75rem;
}

.section-subtitle {
  color: var(--text-light);
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
}

.section-header {
  margin-bottom: 3.5rem;
}

/* ---- Buttons ---- */
.btn-accent {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  color: var(--primary-dark);
  font-weight: 600;
  border: none;
  border-radius: 8px;
  transition: var(--transition);
  text-decoration: none;
  cursor: pointer;
}

.btn-accent:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(245, 158, 11, 0.35);
  color: var(--primary-dark);
}

.btn-outline-light {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 2rem;
  background: transparent;
  color: var(--white);
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.3);
  border-radius: 8px;
  transition: var(--transition);
  text-decoration: none;
}

.btn-outline-light:hover {
  border-color: var(--white);
  background: rgba(255,255,255,0.1);
  color: var(--white);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.btn-ghost:hover {
  color: var(--accent-hover);
  gap: 0.75rem;
}

/* ---- Feature Cards ---- */
.feature-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.feature-card:hover::before {
  transform: scaleX(1);
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-md);
}

.feature-icon {
  width: 60px;
  height: 60px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.25rem;
}

/* ---- Product Cards ---- */
.product-card {
  background: var(--white);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
  transition: var(--transition);
  cursor: pointer;
}

.product-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-lg);
}

.product-card .img-wrapper {
  position: relative;
  overflow: hidden;
  height: 260px;
  background: var(--light-gray);
}

.product-card .img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.product-card:hover .img-wrapper img {
  transform: scale(1.08);
}

.product-card .badge-tag {
  position: absolute;
  top: 1rem;
  left: 1rem;
  padding: 0.35rem 0.75rem;
  background: var(--accent);
  color: var(--primary-dark);
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 4px;
}

.product-card .overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 31, 61, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.product-card:hover .overlay {
  opacity: 1;
}

.product-card .card-body {
  padding: 1.5rem;
}

.product-card .card-body h5 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.product-card .card-body p {
  font-size: 0.9rem;
  color: var(--text-light);
  margin-bottom: 0;
}

/* ---- Stats Section ---- */
.stats-section {
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  position: relative;
  overflow: hidden;
}

.stats-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 50%, rgba(245,158,11,0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 50%, rgba(255,255,255,0.03) 0%, transparent 50%);
}

.stat-item {
  text-align: center;
  position: relative;
}

.stat-item h3 {
  font-size: 2.5rem;
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

.stat-item p {
  color: rgba(255,255,255,0.7);
  font-size: 0.95rem;
  margin: 0;
}

.stat-item:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 60px;
  width: 1px;
  background: rgba(255,255,255,0.15);
}

/* ---- Testimonials ---- */
.testimonial-card {
  background: var(--white);
  border-radius: 16px;
  padding: 2rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
  position: relative;
}

.testimonial-card::before {
  content: '"';
  position: absolute;
  top: 1rem;
  right: 1.5rem;
  font-size: 4rem;
  line-height: 1;
  color: var(--primary);
  opacity: 0.08;
  font-family: Georgia, serif;
}

/* ---- Certification Badges ---- */
.cert-card {
  background: var(--white);
  border-radius: 12px;
  padding: 2rem 1.5rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--light-gray);
  transition: var(--transition);
}

.cert-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.cert-card .cert-icon {
  font-size: 3rem;
  margin-bottom: 1rem;
}

.cert-card h6 {
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.cert-card p {
  font-size: 0.8rem;
  color: var(--text-light);
  margin: 0;
}

/* ---- Contact Form ---- */
.contact-form {
  background: var(--white);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--light-gray);
}

.contact-form .form-control {
  padding: 0.85rem 1rem;
  border: 1px solid var(--light-gray);
  border-radius: 8px;
  transition: var(--transition);
  font-size: 0.95rem;
}

.contact-form .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(26, 54, 93, 0.1);
}

.contact-form .form-control::placeholder {
  color: #a0aec0;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--primary-dark);
  color: rgba(255,255,255,0.7);
  padding: 4rem 0 0;
}

.site-footer h5 {
  color: var(--white);
  font-size: 1.1rem;
  margin-bottom: 1.25rem;
}

.site-footer a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: var(--transition);
}

.site-footer a:hover {
  color: var(--accent);
  padding-left: 4px;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 1.5rem 0;
  margin-top: 3rem;
}

/* ---- Page Hero (inner pages) ---- */
.page-hero {
  padding: 10rem 0 4rem;
  background: linear-gradient(135deg, var(--primary-dark), var(--primary));
  position: relative;
  overflow: hidden;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--accent), var(--primary-light), var(--accent));
}

.page-hero h1 {
  color: var(--white);
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.page-hero p {
  color: rgba(255,255,255,0.7);
  font-size: 1.1rem;
}

/* ---- Category Filter (Products) ---- */
.category-filter .btn-filter {
  padding: 0.5rem 1.25rem;
  border: 1px solid var(--light-gray);
  background: var(--white);
  border-radius: 50px;
  font-size: 0.9rem;
  color: var(--text);
  transition: var(--transition);
  cursor: pointer;
}

.category-filter .btn-filter:hover,
.category-filter .btn-filter.active {
  background: var(--primary);
  color: var(--white);
  border-color: var(--primary);
}

/* ---- Product Detail ---- */
.spec-table {
  width: 100%;
  border-collapse: collapse;
}

.spec-table tr {
  border-bottom: 1px solid var(--light-gray);
}

.spec-table td {
  padding: 1rem 0.75rem;
  font-size: 0.95rem;
}

.spec-table td:first-child {
  font-weight: 600;
  color: var(--primary-dark);
  width: 40%;
}

/* ---- Timeline (About) ---- */
.timeline {
  position: relative;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--light-gray);
}

.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--accent);
  border: 3px solid var(--white);
  box-shadow: 0 0 0 2px var(--accent);
}

.timeline-item .year {
  font-weight: 700;
  color: var(--accent);
  font-size: 1.2rem;
}

/* ---- Scroll Animations ---- */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- Floating Inquiry Button ---- */
.floating-inquiry {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 1000;
}

.floating-inquiry .btn-inquiry {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), #fbbf24);
  color: var(--primary-dark);
  border: none;
  font-size: 1.5rem;
  box-shadow: var(--shadow-lg);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}

.floating-inquiry .btn-inquiry:hover {
  transform: scale(1.1) rotate(-10deg);
  box-shadow: 0 12px 35px rgba(245, 158, 11, 0.4);
}

.floating-inquiry .tooltip-text {
  position: absolute;
  right: 75px;
  top: 50%;
  transform: translateY(-50%);
  background: var(--primary-dark);
  color: var(--white);
  padding: 0.5rem 1rem;
  border-radius: 8px;
  font-size: 0.85rem;
  white-space: nowrap;
  opacity: 0;
  pointer-events: none;
  transition: var(--transition);
}

.floating-inquiry:hover .tooltip-text {
  opacity: 1;
}

/* ---- Breadcrumbs ---- */
.breadcrumb-custom {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  color: rgba(255,255,255,0.6);
  margin-bottom: 1rem;
}

.breadcrumb-custom a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  transition: var(--transition);
}

.breadcrumb-custom a:hover {
  color: var(--accent);
}

/* ---- Responsive ---- */
@media (max-width: 991.98px) {
  .hero-stats {
    gap: 1.5rem;
    flex-wrap: wrap;
  }

  .hero-image-wrapper .floating-card {
    display: none;
  }

  .stat-item:not(:last-child)::after {
    display: none;
  }

  .section-padding {
    padding: 3rem 0;
  }

  .page-hero {
    padding: 8rem 0 3rem;
  }
}

@media (max-width: 767.98px) {
  .navbar {
    padding: 0.5rem 0;
  }
}

/* ---- Loading Spinner ---- */
.loading-spinner {
  display: inline-block;
  width: 24px;
  height: 24px;
  border: 3px solid rgba(255,255,255,0.3);
  border-radius: 50%;
  border-top-color: var(--white);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---- Toast Notification ---- */
.toast-notification {
  position: fixed;
  bottom: 6rem;
  right: 2rem;
  padding: 1rem 1.5rem;
  border-radius: 12px;
  color: var(--white);
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  transform: translateY(100px);
  opacity: 0;
  transition: all 0.4s ease;
  z-index: 2000;
}

.toast-notification.show {
  transform: translateY(0);
  opacity: 1;
}

.toast-notification.success {
  background: var(--success);
}

.toast-notification.error {
  background: #ef4444;
}

/* ---- Image Placeholders ---- */
.img-placeholder {
  background: linear-gradient(135deg, var(--light-gray) 0%, #cbd5e1 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-light);
  font-size: 0.9rem;
}
