/*
Theme Name: Atmiya Industries
Theme URI: https://example.com/
Author: Atmiya Industries
Description: Custom WordPress theme converted from the supplied Atmiya Industries HTML/CSS/JS prototype. Includes all supplied pages and assets, automatic page setup, responsive navigation, product pages, and WordPress contact form handling.
Version: 1.1.1
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: atmiya-industries
*/

/* ========================================
   ATMIYA INDUSTRIES — SHARED CSS
   Portable to WordPress Customizer > Additional CSS
   ======================================== */

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', sans-serif;
  color: #1a2332;
  overflow-x: hidden;
}

/* --- Preloader --- */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.6s;
}

.preloader.fade-out {
  opacity: 0;
  visibility: hidden;
}

.preloader-gears {
  position: relative;
  width: 120px;
  height: 100px;
}

.gear-navy {
  position: absolute;
  top: 0;
  left: 0;
  width: 72px;
  height: 72px;
  animation: gearForwardNavy 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

.gear-orange {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 56px;
  height: 56px;
  animation: gearForwardOrange 2.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes gearForwardNavy {
  0% { transform: rotate(0deg); }
  35% { transform: rotate(180deg); }
  45% { transform: rotate(180deg); }
  75% { transform: rotate(90deg); }
  85% { transform: rotate(90deg); }
  100% { transform: rotate(120deg); }
}

@keyframes gearForwardOrange {
  0% { transform: rotate(0deg); }
  35% { transform: rotate(-180deg); }
  45% { transform: rotate(-180deg); }
  75% { transform: rotate(-90deg); }
  85% { transform: rotate(-90deg); }
  100% { transform: rotate(-120deg); }
}

/* --- Header --- */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.site-header.scrolled {
  background: rgba(19, 30, 74, 0.97);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.15);
}

.site-header.scrolled .header-inner {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

/* Internal pages: header starts solid */
.page-internal .site-header {
  background: rgba(19, 30, 74, 0.97);
  backdrop-filter: blur(12px);
}

/* --- Dropdown --- */
.nav-dropdown {
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item-dropdown:hover .nav-dropdown,
.nav-item-dropdown:focus-within .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

/* --- Hero --- */
.hero-section {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
}

.hero-video-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(19, 30, 74, 0.92) 0%, rgba(19, 30, 74, 0.7) 40%, rgba(19, 30, 74, 0.4) 100%);
  z-index: 2;
}

.hero-video-bg {
  position: absolute;
  inset: 0;
  z-index: 1;
}

.hero-video-bg video,
.hero-video-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

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

.hero-line {
  overflow: hidden;
}

.hero-line-inner {
  transform: translateY(100%);
  animation: heroReveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.hero-line-inner.delay-1 { animation-delay: 0.15s; }
.hero-line-inner.delay-2 { animation-delay: 0.3s; }
.hero-line-inner.delay-3 { animation-delay: 0.5s; }
.hero-line-inner.delay-4 { animation-delay: 0.7s; }

@keyframes heroReveal {
  to { transform: translateY(0); }
}

/* --- Page Hero (Internal Pages) --- */
.page-hero {
  position: relative;
  padding-top: 140px;
  padding-bottom: 80px;
  background: linear-gradient(135deg, #131E4A 0%, #1E2758 50%, #0A1030 100%);
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -15%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 95, 23, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 400px;
  height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 95, 23, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Breadcrumbs --- */
.breadcrumbs {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.breadcrumbs a {
  color: rgba(255, 255, 255, 0.5);
  text-decoration: none;
  font-size: 0.8125rem;
  transition: color 0.2s ease;
}

.breadcrumbs a:hover {
  color: #FD5F17;
}

.breadcrumbs .separator {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.75rem;
}

.breadcrumbs .current {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.8125rem;
  font-weight: 500;
}

/* --- Ticker --- */
.ticker-track {
  display: flex;
  animation: tickerScroll 30s linear infinite;
  width: max-content;
}

@keyframes tickerScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* --- Section Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* --- Product Explorer --- */
.product-tab {
  cursor: pointer;
  position: relative;
  padding: 1.25rem 0;
  border-bottom: 1px solid rgba(19, 30, 74, 0.1);
  transition: all 0.3s ease;
}

.product-tab::before {
  content: '';
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 0;
  height: 2px;
  background: #FD5F17;
  transition: width 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.product-tab:hover::before,
.product-tab.active::before {
  width: 100%;
}

.product-tab.active {
  padding-left: 1rem;
}

.product-tab.active .product-tab-number {
  color: #FD5F17;
}

.product-image-container {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
}

.product-image-container img {
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* --- Gallery Masonry --- */
.gallery-item {
  overflow: hidden;
  border-radius: 0.25rem;
}

.gallery-item img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-item:hover img {
  transform: scale(1.06);
}

/* --- Counter Animation --- */
.counter-value {
  font-variant-numeric: tabular-nums;
}

/* --- Floating Widget --- */
.floating-widget {
  position: fixed;
  bottom: 1.5rem;
  left: 1.5rem;
  z-index: 900;
}

.floating-widget-toggle {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #FD5F17;
  color: white;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(253, 95, 23, 0.4);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  z-index: 2;
}

.floating-widget-toggle:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(253, 95, 23, 0.5);
}

.floating-widget-toggle.open {
  background: #131E4A;
  box-shadow: 0 4px 20px rgba(19, 30, 74, 0.4);
}

.floating-widget-links {
  position: absolute;
  bottom: 64px;
  left: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-widget-links.open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.floating-widget-links a {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-decoration: none;
  transition: transform 0.2s ease;
  font-size: 1.1rem;
}

.floating-widget-links a:hover {
  transform: scale(1.15);
}

/* --- Mobile Menu --- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 1100;
  background: rgba(19, 30, 74, 0.98);
  backdrop-filter: blur(16px);
  transform: translateX(100%);
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.mobile-menu.open {
  transform: translateX(0);
}

.mobile-submenu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-submenu.open {
  max-height: 800px;
}

.mobile-submenu-toggle svg {
  transition: transform 0.3s ease;
}

.mobile-submenu-toggle.open svg {
  transform: rotate(180deg);
}

/* --- Industry Cards --- */
.industry-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.5rem;
  cursor: pointer;
}

.industry-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 30%, rgba(19, 30, 74, 0.85) 100%);
  transition: background 0.4s ease;
}

.industry-card:hover .industry-card-overlay {
  background: linear-gradient(180deg, transparent 10%, rgba(19, 30, 74, 0.92) 100%);
}

.industry-card img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

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

.industry-card-content {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1.5rem;
  z-index: 2;
}

/* --- Quality Section Dark --- */
.quality-section {
  background: linear-gradient(135deg, #131E4A 0%, #1E2758 50%, #0A1030 100%);
  position: relative;
  overflow: hidden;
}

.quality-section::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -20%;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(253, 95, 23, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

/* --- CTA Section --- */
.cta-section {
  background: linear-gradient(135deg, #FD5F17 0%, #E24E0B 50%, #B83E09 100%);
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  bottom: -30%;
  left: -10%;
  width: 500px;
  height: 500px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

/* --- Scroll indicator --- */
.scroll-indicator {
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(8px); }
}

/* --- Category Sub-Nav --- */
.category-subnav a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.625rem 1.25rem;
  border: 1px solid rgba(19, 30, 74, 0.15);
  border-radius: 9999px;
  font-size: 0.875rem;
  font-weight: 500;
  color: #3B487D;
  transition: all 0.25s ease;
  text-decoration: none;
}

.category-subnav a:hover,
.category-subnav a.active {
  background: #FD5F17;
  color: white;
  border-color: #FD5F17;
}

/* --- Machine Spec Card --- */
.machine-spec-card {
  border: 1px solid rgba(19, 30, 74, 0.08);
  border-radius: 0.75rem;
  overflow: hidden;
  transition: all 0.3s ease;
}

.machine-spec-card:hover {
  border-color: rgba(253, 95, 23, 0.3);
  box-shadow: 0 10px 40px rgba(19, 30, 74, 0.08);
}

/* --- Material Tag --- */
.material-tag {
  display: inline-flex;
  padding: 0.375rem 0.875rem;
  background: rgba(19, 30, 74, 0.04);
  border: 1px solid rgba(19, 30, 74, 0.1);
  border-radius: 9999px;
  font-size: 0.8125rem;
  color: #3B487D;
  font-weight: 500;
  transition: all 0.2s ease;
}

.material-tag:hover {
  background: rgba(253, 95, 23, 0.08);
  border-color: rgba(253, 95, 23, 0.3);
  color: #E24E0B;
}

/* --- Contact Form --- */
.contact-form input,
.contact-form textarea,
.contact-form select {
  width: 100%;
  padding: 0.875rem 1rem;
  border: 1px solid rgba(19, 30, 74, 0.15);
  border-radius: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  color: #1a2332;
  background: white;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus,
.contact-form select:focus {
  outline: none;
  border-color: #FD5F17;
  box-shadow: 0 0 0 3px rgba(253, 95, 23, 0.1);
}

.contact-form label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: #131E4A;
  margin-bottom: 0.375rem;
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .ticker-track {
    animation: none;
  }

  .hero-line-inner {
    transform: translateY(0);
  }

  .reveal {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Focus states --- */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #FD5F17;
  outline-offset: 2px;
}

/* --- Custom scrollbar --- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #131E4A;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #2A3466;
}
