/* ==========================================================================
   PATEL WELDING WORKS - OFFICIAL STYLESHEET
   Harmonized with Official Company Brand:
   - Primary Metallic Gold: #C59B58 / #B8860B / #DFB76C
   - Industrial Emerald Green: #16A34A / #15803D / #22C55E
   - Welding Arc Blue: #0284C7 / #0369A1
   - Welding Spark Red: #DC2626 / #EF4444
   - Base White / Slate: #FFFFFF / #F8FAFC / #0F172A
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Cinzel:wght@600;700;800&family=Oswald:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;600&display=swap');

:root {
  --bg-main: #FFFFFF;
  --bg-subtle: #F8FAFC;
  --bg-card: #FFFFFF;
  --border-light: #E2E8F0;
  --text-main: #0F172A;
  --text-muted: #475569;
  --gold: #C59B58;
  --gold-dark: #9A7232;
  --gold-light: #DFB76C;
  --green: #16A34A;
  --green-dark: #15803D;
  --blue-arc: #0284C7;
  --red-spark: #DC2626;
  --font-brand: 'Cinzel', serif;
  --font-heading: 'Oswald', sans-serif;
  --font-body: 'Plus Jakarta Sans', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

html {
  scroll-behavior: smooth;
  font-family: var(--font-body);
  background-color: var(--bg-main);
  color: var(--text-main);
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
}

h1, h2, h3, h4, .font-heading {
  font-family: var(--font-heading);
  letter-spacing: 0.025em;
  color: #0F172A;
}

.font-brand {
  font-family: var(--font-brand);
  letter-spacing: 0.05em;
}

/* Light Engineering Grid Background */
.bg-grid-light {
  background-size: 40px 40px;
  background-image: 
    linear-gradient(to right, rgba(197, 155, 88, 0.08) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(22, 163, 74, 0.06) 1px, transparent 1px);
}

/* Gold Gradient Heading */
.text-gold-gradient {
  background: linear-gradient(135deg, #B8860B 0%, #C59B58 50%, #9A7232 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Green Gradient Heading */
.text-green-gradient {
  background: linear-gradient(135deg, #16A34A 0%, #15803D 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Luxury White Cards */
.card-light {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 0.875rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04), 0 2px 4px -2px rgba(0, 0, 0, 0.04);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-light:hover {
  border-color: rgba(197, 155, 88, 0.5);
  transform: translateY(-4px);
  box-shadow: 0 16px 28px -6px rgba(15, 23, 42, 0.09), 0 0 15px -3px rgba(197, 155, 88, 0.2);
}

/* Photo Gallery Cards */
.photo-card {
  position: relative;
  overflow: hidden;
  border-radius: 0.875rem;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  cursor: pointer;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.photo-card:hover {
  transform: translateY(-5px);
  border-color: rgba(197, 155, 88, 0.6);
  box-shadow: 0 20px 30px -10px rgba(15, 23, 42, 0.12), 0 0 20px -4px rgba(197, 155, 88, 0.25);
}

.photo-card img {
  transition: transform 0.45s ease;
}

.photo-card:hover img {
  transform: scale(1.06);
}

/* Dual Brand Corner Accents in Gold & Green */
.corner-accent {
  position: relative;
}
.corner-accent::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 12px;
  height: 12px;
  border-top: 3px solid var(--gold);
  border-left: 3px solid var(--gold);
  border-top-left-radius: 4px;
  z-index: 2;
}
.corner-accent::after {
  content: '';
  position: absolute;
  bottom: 0;
  right: 0;
  width: 12px;
  height: 12px;
  border-bottom: 3px solid var(--green);
  border-right: 3px solid var(--green);
  border-bottom-right-radius: 4px;
  z-index: 2;
}

/* Buttons */
.btn-gold {
  background: linear-gradient(135deg, #DFB76C 0%, #C59B58 100%);
  color: #070B14;
  font-weight: 700;
  box-shadow: 0 4px 14px -2px rgba(197, 155, 88, 0.35);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-gold:hover {
  background: linear-gradient(135deg, #F0C980 0%, #B8860B 100%);
  box-shadow: 0 6px 20px 0px rgba(197, 155, 88, 0.45);
  transform: translateY(-2px);
}

.btn-gold:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px -1px rgba(197, 155, 88, 0.3);
}

.btn-outline-gold {
  border: 1.5px solid #C59B58;
  color: #9A7232;
  background: #FFFFFF;
  font-weight: 700;
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-outline-gold:hover {
  background: #FEF9F0;
  color: #78551E;
  border-color: #B8860B;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px -2px rgba(197, 155, 88, 0.25);
}

.btn-whatsapp {
  background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
  color: #FFFFFF;
  font-weight: 700;
  box-shadow: 0 4px 14px -2px rgba(37, 211, 102, 0.4);
  transition: all 0.2s ease;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-whatsapp:hover {
  background: linear-gradient(135deg, #2EE070 0%, #0E7163 100%);
  box-shadow: 0 6px 20px 0px rgba(37, 211, 102, 0.55);
  transform: translateY(-2px);
  color: #FFFFFF;
}

/* Badges */
.badge-gold {
  background: #FEF9F0;
  border: 1px solid rgba(197, 155, 88, 0.4);
  color: #9A7232;
}

.badge-green {
  background: #F0FDF4;
  border: 1px solid rgba(22, 163, 74, 0.35);
  color: #15803D;
}

.badge-blue {
  background: #F0F9FF;
  border: 1px solid rgba(2, 132, 199, 0.35);
  color: #0369A1;
}

.badge-red {
  background: #FEF2F2;
  border: 1px solid rgba(220, 38, 38, 0.4);
  color: #DC2626;
}

/* Subtle Highlights */
.glow-gold-light {
  box-shadow: 0 10px 30px -5px rgba(197, 155, 88, 0.25);
}

/* Modal Overlay */
.modal-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* =========================================================================
   SCROLL-TO-TOP BUTTON
   ========================================================================= */
.scroll-to-top-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  z-index: 45;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #DFB76C 0%, #C59B58 100%);
  color: #070B14;
  border: 2px solid rgba(255, 255, 255, 0.3);
  box-shadow: 0 4px 16px -2px rgba(197, 155, 88, 0.4);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(20px) scale(0.8);
  transition: opacity 0.3s ease, transform 0.3s ease, box-shadow 0.2s ease;
  pointer-events: none;
}

.scroll-to-top-btn.visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.scroll-to-top-btn:hover {
  box-shadow: 0 6px 24px -2px rgba(197, 155, 88, 0.55);
  transform: translateY(-3px) scale(1.05);
}

.scroll-to-top-btn:active {
  transform: translateY(0) scale(1);
}

.scroll-to-top-btn svg {
  width: 22px;
  height: 22px;
}

/* =========================================================================
   FLOATING WHATSAPP BUTTON & POPUP
   ========================================================================= */
.floating-whatsapp {
  position: fixed;
  bottom: 5.5rem;
  right: 2rem;
  z-index: 45;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.floating-whatsapp-btn {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: #25D366;
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.4);
  cursor: pointer;
  border: 2px solid #FFFFFF;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.floating-whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 8px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-popup {
  width: 290px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
  margin-bottom: 12px;
  padding: 16px;
  display: none;
  animation: fadeIn 0.2s ease-out;
}

.whatsapp-popup.active {
  display: block;
}

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

/* =========================================================================
   SCROLL REVEAL ANIMATIONS
   ========================================================================= */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), 
              transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal-on-scroll.revealed {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered delay utility classes */
.reveal-on-scroll[data-reveal-delay="100"] { transition-delay: 0.1s; }
.reveal-on-scroll[data-reveal-delay="200"] { transition-delay: 0.2s; }
.reveal-on-scroll[data-reveal-delay="300"] { transition-delay: 0.3s; }
.reveal-on-scroll[data-reveal-delay="400"] { transition-delay: 0.4s; }

/* =========================================================================
   MACHINERY SECTION STYLING
   ========================================================================= */
.machinery-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.machinery-card:hover {
  border-color: #C59B58;
  box-shadow: 0 8px 18px -4px rgba(197, 155, 88, 0.15);
  transform: translateY(-2px);
}

.machinery-num {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 0.85rem;
  color: #B8860B;
  background: #FEF9F0;
  border: 1px solid rgba(197, 155, 88, 0.3);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* =========================================================================
   PROJECT REFERENCE TABLE & TABS
   ========================================================================= */
.ref-table-container {
  overflow-x: auto;
  border-radius: 0.875rem;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.04);
}

.ref-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 0.875rem;
}

.ref-table thead {
  background: #F8FAFC;
  border-bottom: 2px solid #E2E8F0;
}

.ref-table th {
  padding: 0.875rem 1rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #0F172A;
}

.ref-table td {
  padding: 0.875rem 1rem;
  border-bottom: 1px solid #F1F5F9;
  color: #334155;
}

.ref-table tr:hover {
  background-color: #FEFBF6;
}

.tab-btn {
  padding: 0.625rem 1.25rem;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 0.9rem;
  border-radius: 0.5rem;
  border: 1px solid #E2E8F0;
  background: #FFFFFF;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s ease;
}

.tab-btn:hover {
  color: #0F172A;
  border-color: #C59B58;
}

.tab-btn.active {
  background: linear-gradient(135deg, #DFB76C 0%, #C59B58 100%);
  color: #070B14;
  border-color: #C59B58;
  box-shadow: 0 4px 12px rgba(197, 155, 88, 0.3);
}

/* =========================================================================
   CLIENTS SHOWCASE GRID & LOGO PLACEHOLDERS
   ========================================================================= */
.client-card {
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.client-card:hover {
  border-color: #C59B58;
  transform: translateY(-4px);
  box-shadow: 0 12px 24px -6px rgba(15, 23, 42, 0.08), 0 0 15px -3px rgba(197, 155, 88, 0.2);
}

.client-logo-box {
  width: 100%;
  height: 68px;
  background: #F8FAFC;
  border: 1.5px dashed #CBD5E1;
  border-radius: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
  transition: all 0.2s ease;
  padding: 6px;
}

.client-card:hover .client-logo-box {
  border-color: #C59B58;
  background: #FEF9F0;
}

/* =========================================================================
   FAQ ACCORDION STYLES
   ========================================================================= */
.faq-item {
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  background: #FFFFFF;
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-item:hover {
  border-color: rgba(197, 155, 88, 0.5);
}

.faq-question {
  width: 100%;
  padding: 1.25rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  text-align: left;
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.05rem;
  color: #0F172A;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: color 0.2s ease;
}

.faq-question:hover {
  color: #B8860B;
}

.faq-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #F1F5F9;
  color: #475569;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 700;
  flex-shrink: 0;
  transition: all 0.25s ease;
}

.faq-item.active .faq-icon {
  transform: rotate(45deg);
  background: #FEF9F0;
  color: #B8860B;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(0.16, 1, 0.3, 1), padding 0.35s ease;
  padding: 0 1.5rem;
  color: #475569;
  font-size: 0.925rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 500px;
  padding: 0 1.5rem 1.25rem 1.5rem;
}

/* =========================================================================
   ACTIVE NAV LINK STYLING
   ========================================================================= */
nav a.nav-active {
  color: var(--gold-dark) !important;
  position: relative;
}

/* =========================================================================
   FORM FOCUS ENHANCEMENTS
   ========================================================================= */
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--gold) !important;
  box-shadow: 0 0 0 3px rgba(197, 155, 88, 0.15);
}

/* =========================================================================
   PULSE DOT
   ========================================================================= */
.pulse-dot {
  position: relative;
}

.pulse-dot::after {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 50%;
  background: inherit;
  animation: pulse-ring 2s ease-out infinite;
}

@keyframes pulse-ring {
  0% { transform: scale(1); opacity: 0.6; }
  70% { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

/* =========================================================================
   FOOTER SOCIAL ICONS
   ========================================================================= */
.social-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #E2E8F0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #475569;
  background: #F8FAFC;
  transition: all 0.2s ease;
}

.social-icon:hover {
  border-color: #C59B58;
  color: #B8860B;
  background: #FEF9F0;
  transform: translateY(-2px);
  box-shadow: 0 4px 8px -2px rgba(197, 155, 88, 0.2);
}

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

  .reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
  }

  .card-light:hover,
  .photo-card:hover,
  .btn-gold:hover,
  .btn-outline-gold:hover {
    transform: none !important;
  }

  .scroll-to-top-btn.visible {
    transform: none;
  }
}

/* =========================================================================
   RESPONSIVE FIXES
   ========================================================================= */
@media (max-width: 640px) {
  .scroll-to-top-btn {
    bottom: 1.25rem;
    right: 1.25rem;
    width: 42px;
    height: 42px;
  }
  
  .scroll-to-top-btn svg {
    width: 18px;
    height: 18px;
  }

  .floating-whatsapp {
    bottom: 4.5rem;
    right: 1.25rem;
  }

  .floating-whatsapp-btn {
    width: 46px;
    height: 46px;
  }
}

/* Image loading placeholder */
img {
  background-color: #F1F5F9;
  transition: opacity 0.3s ease;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 4px;
}
