/*
Theme Name: Tzion Construction theme
Theme URI: https://tzionconstruction.com/
Author: ToloSolutions LLC
Description: A professional construction company theme converted from React/Vite.
Version: 1.0.0
Text Domain: tzion-theme
*/

/* ========================================================
   1. BASE & TYPOGRAPHY
   ======================================================== */
html {
  scroll-behavior: smooth;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* Consistent heading letter-spacing */
h1,
h2,
h3,
h4,
h5,
h6 {
  letter-spacing: 0.02em;
}

/* ========================================================
   2. ANIMATIONS
   ======================================================== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }

  100% {
    background-position: 200% 0;
  }
}

@keyframes pulseGlow {

  0%,
  100% {
    box-shadow: 0 0 0 0 rgba(232, 106, 31, 0.4);
  }

  50% {
    box-shadow: 0 0 0 8px rgba(232, 106, 31, 0);
  }
}

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

.animate-bounce-slow {
  animation: bounceSlow 3s ease-in-out infinite;
}

.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-500 { animation-delay: 0.5s; }

.text-gradient {
  background: linear-gradient(to right, #e86a1f, #f0803c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.animate-fade-in-up {
  animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out forwards;
}

.animate-slide-in-left {
  animation: slideInLeft 0.8s ease-out forwards;
}

.animate-slide-in-right {
  animation: slideInRight 0.8s ease-out forwards;
}

/* Scroll-triggered reveal animations */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* ========================================================
   3. TEXT SHADOWS
   ======================================================== */
.text-shadow {
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.text-shadow-lg {
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

/* ========================================================
   4. SOCIAL MEDIA BRAND COLORS
   ======================================================== */

/* Facebook — #1877F2 */
.social-icon-fb {
  color: #1877F2;
}

.social-icon-fb:hover {
  background-color: #1877F2 !important;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(24, 119, 242, 0.35);
}

/* Twitter / X — #000 */
.social-icon-x {
  color: #e4e4e7;
}

.social-icon-x:hover {
  background-color: #000 !important;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35);
}

/* LinkedIn — #0A66C2 */
.social-icon-li {
  color: #0A66C2;
}

.social-icon-li:hover {
  background-color: #0A66C2 !important;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(10, 102, 194, 0.35);
}

/* Instagram — gradient */
.social-icon-ig {
  color: #E4405F;
}

.social-icon-ig:hover {
  background: linear-gradient(135deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888) !important;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(228, 64, 95, 0.35);
}

/* WhatsApp — #25D366 */
.social-icon-wa {
  color: #25D366;
}

.social-icon-wa:hover {
  background-color: #25D366 !important;
  color: #fff;
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(37, 211, 102, 0.35);
}

.hover-glow {
  transition: all 0.3s ease;
}

.hover-glow:hover {
  box-shadow: 0 0 25px rgba(232, 106, 31, 0.4);
}

/* WhatsApp button pulse — only when visible */
#whatsapp-button.opacity-100 {
  animation: pulseGlow 2s infinite;
}

/* ========================================================
   5. PROJECT CARDS & INTERACTIVE ELEMENTS
   ======================================================== */
.project-card, .service-card, .equipment-card, .about-card, .gallery-item {
  position: relative;
  will-change: transform, opacity;
  transition: all 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.project-card img {
  will-change: transform;
}

/* ── Mobile touch: eliminate 300ms delay on all interactive cards ── */
.project-trigger,
.gallery-trigger,
.equipment-trigger,
.lightbox-trigger {
  touch-action: manipulation;
  -webkit-tap-highlight-color: rgba(232, 106, 31, 0.15);
  cursor: pointer;
}

/* Lightbox panel: cursor should be default (no navigation on click) */
#lightbox-panel {
  cursor: default;
}

#lightbox-panel a,
#lightbox-panel button {
  cursor: pointer;
}

.project-card::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, 0.06);
  pointer-events: none;
  transition: border-color 0.5s;
}

.project-card:hover::after {
  border-color: rgba(232, 106, 31, 0.3);
}

/* ========================================================
   6. IMAGE LOADING SKELETON
   ======================================================== */
img {
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

img[src] {
  animation: none;
  background: none;
}

/* ========================================================
   7. BUTTON POLISH
   — Excludes fixed-position elements (scroll-to-top, WhatsApp)
     and the nav Get A Quote button to prevent layout issues
   ======================================================== */
a[class*="bg-primary"]:not(.fixed):not([class*="fixed"]):not(#whatsapp-button):not(#scroll-to-top),
button[class*="bg-primary"]:not(.fixed):not([class*="fixed"]):not(#whatsapp-button):not(#scroll-to-top) {
  position: relative;
  overflow: hidden;
}

a[class*="bg-primary"]:not(.fixed):not([class*="fixed"]):not(#whatsapp-button):not(#scroll-to-top)::before,
button[class*="bg-primary"]:not(.fixed):not([class*="fixed"]):not(#whatsapp-button):not(#scroll-to-top)::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
  opacity: 0;
  transition: opacity 0.3s;
}

a[class*="bg-primary"]:not(.fixed):not([class*="fixed"]):not(#whatsapp-button):not(#scroll-to-top):hover::before,
button[class*="bg-primary"]:not(.fixed):not([class*="fixed"]):not(#whatsapp-button):not(#scroll-to-top):hover::before {
  opacity: 1;
}

/* Powered by credit — pointer cursor */
footer a[href*="tolollc"] {
  cursor: pointer;
}

/* ========================================================
   8. NAV POLISH
   ======================================================== */
#main-nav {
  will-change: transform;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

/* ========================================================
   9. RESPONSIVE — MOBILE FIXES (max-width: 639px)
   ======================================================== */
@media (max-width: 639px) {

  /* Hero Section */
  #home h1 {
    font-size: 2rem !important;
    line-height: 1.2;
  }

  #home p {
    font-size: 0.95rem;
  }

  /* Hero CTA buttons — stack and full width */
  #home .flex.flex-wrap {
    flex-direction: column;
    gap: 0.75rem;
  }

  #home .flex.flex-wrap a {
    width: 100%;
    text-align: center;
    padding: 0.875rem 1.5rem;
    font-size: 0.875rem;
  }

  /* Stats bar — proper spacing */
  .grid.grid-cols-2.lg\\:grid-cols-4.divide-x {
    gap: 0;
  }

  .grid.grid-cols-2.lg\\:grid-cols-4.divide-x>div {
    padding: 0.75rem 0.5rem;
  }

  .grid.grid-cols-2.lg\\:grid-cols-4.divide-x .text-2xl {
    font-size: 1.25rem;
  }

  /* Equipment grid */
  .grid.grid-cols-2.md\\:grid-cols-3.lg\\:grid-cols-6 {
    grid-template-columns: repeat(2, 1fr);
  }

  /* Section padding reduction */
  section {
    padding-top: 3rem;
    padding-bottom: 3rem;
  }

  section.py-24 {
    padding-top: 3.5rem;
    padding-bottom: 3.5rem;
  }

  /* Footer grid — full width columns */
  footer .grid {
    gap: 2rem;
  }

  /* Footer bottom bar — center align */
  footer .pt-8 {
    text-align: center;
  }

  /* CTA section */
  .flex.flex-wrap.justify-center.gap-4 {
    flex-direction: column;
    gap: 0.75rem;
  }

  .flex.flex-wrap.justify-center.gap-4 a {
    width: 100%;
    text-align: center;
  }

  /* Project bento grid — single column */
  .grid.auto-rows-\[280px\] {
    grid-auto-rows: auto;
  }

  /* Testimonial cards */
  .grid.grid-cols-1.md\:grid-cols-3>div {
    padding: 1.5rem;
  }

  /* Service cards */
  .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-4 {
    gap: 1rem;
  }

  /* Trusted by section */
  .flex.flex-wrap.justify-center.items-center.gap-12 {
    gap: 1.5rem;
  }

  /* Why choose us grid */
  .grid.grid-cols-1.sm\:grid-cols-2.gap-6 {
    gap: 1.5rem;
  }
}

/* ========================================================
  10. RESPONSIVE — TABLET FIXES (640px - 1023px)
   ======================================================== */
@media (min-width: 640px) and (max-width: 1023px) {

  /* Hero heading */
  #home h1 {
    font-size: 2.5rem !important;
  }

  /* Stats bar spacing */
  .grid.grid-cols-2.lg\:grid-cols-4.divide-x>div {
    padding: 1rem;
  }

  /* Project bento — 2 column even on tablet */
  .grid.auto-rows-\[280px\] {
    grid-auto-rows: 260px;
  }

  /* Footer grid */
  footer .grid.grid-cols-1.md\:grid-cols-2.lg\:grid-cols-12 {
    gap: 2rem;
  }
}

/* ========================================================
  11. RESPONSIVE — SMALL PHONES (max-width: 374px)
   ======================================================== */
@media (max-width: 374px) {
  #home h1 {
    font-size: 1.75rem !important;
  }

  /* Force single column for stats */
  .grid.grid-cols-2.lg\:grid-cols-4 {
    grid-template-columns: 1fr;
  }

  .grid.grid-cols-2.lg\:grid-cols-4.divide-x {
    border: none;
  }

  .grid.grid-cols-2.lg\:grid-cols-4.divide-x>div {
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding: 0.75rem 1rem;
  }

  /* Equipment grid single col */
  .grid.grid-cols-2.md\\:grid-cols-3.lg\\:grid-cols-6 {
    grid-template-columns: 1fr;
  }

  /* Nav logo text */
  .nav-logo-text {
    display: none;
  }
}

/* ========================================================
  12. PRINT STYLES
   ======================================================== */
@media print {

  #main-nav,
  #whatsapp-button,
  #scroll-to-top {
    display: none !important;
  }
}

/* ========================================================
  13. PREMIUM UI UTILITIES
   ======================================================== */

/* Premium Animations & Reveals */
.reveal {
    opacity: 0;
    transform: translateY(30px) scale(0.98);
    transition: all 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform, opacity;
}

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

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

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-float-delayed {
    animation: float 6s ease-in-out infinite;
    animation-delay: 2s;
}

/* Premium Card Interactions */
.card-lift {
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.card-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
}

/* Glow Effects */
.hover-glow:hover {
    box-shadow: 0 0 20px rgba(232, 106, 31, 0.4);
}

.icon-glow:hover i {
    filter: drop-shadow(0 0 8px rgba(232, 106, 31, 0.6));
}

/* Image Smoothness */
img {
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.5s ease;
}

/* Process Step Interaction */
.process-step-hover {
    transition: all 0.4s ease;
}

.process-step-hover:hover .step-icon {
    transform: scale(1.1) rotate(5deg);
    background-color: var(--color-primary);
}

/* Button Refinement */
.btn-premium {
    position: relative;
    overflow: hidden;
}

.btn-premium::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300%;
    height: 300%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    transition: transform 0.6s ease;
}

.btn-premium:hover::after {
    transform: translate(-50%, -50%) scale(1);
}

/* Glassmorphism Refinement */
.glass-morphism {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
}

.text-gradient {
  background: linear-gradient(135deg, #e86a1f, #ff9d5c);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

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

.animate-bounce-slow {
  animation: bounceSlow 4s ease-in-out infinite;
}

/* Bento Grid Dense Flow */
.grid-flow-dense {
  grid-auto-flow: dense;
}

/* Lightbox Specific transitions */
#premium-lightbox {
  perspective: 1000px;
  transition: opacity 0.5s ease-in-out, backdrop-filter 0.5s ease-in-out;
}

#premium-lightbox.flex {
  opacity: 1;
}

#lightbox-panel {
  transform-style: preserve-3d;
  will-change: transform, opacity;
  transition: all 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

#premium-lightbox.flex #lightbox-panel {
  transform: scale(1) translateY(0);
}

/* Custom Scrollbar for Lightbox */
#premium-lightbox::-webkit-scrollbar {
  width: 6px;
}

#premium-lightbox::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.1);
}

#premium-lightbox::-webkit-scrollbar-thumb {
  background: rgba(232, 106, 31, 0.5);
  border-radius: 10px;
}

/* Smooth Hover for Service Cards */
.service-card-img-overlay {
    background: linear-gradient(to top, rgba(15, 26, 36, 0.8), transparent);
    transition: all 0.5s ease;
}

.group:hover .service-card-img-overlay {
    background: linear-gradient(to top, rgba(232, 106, 31, 0.4), transparent);
}

/* ========================================================
  14. MISC POLISH
   ======================================================== */

/* Selection color */
::selection {
  background: rgba(232, 106, 31, 0.15);
  color: inherit;
}

/* Focus visible for accessibility */
a:focus-visible,
button:focus-visible {
  outline: 2px solid #e86a1f;
  outline-offset: 2px;
  border-radius: 4px;
}

/* Smooth image loading */
img {
  transition: opacity 0.3s;
}

/* Footer link underline effect */
footer a:not([class*="social-icon"]):not([class*="bg-"]):not([class*="flex"]):hover {
  text-decoration: none;
}

/* Global Scrollbar styling */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #1a2a3a;
}

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

::-webkit-scrollbar-thumb:hover {
  background: #c45514;
}

/* Max-sm utility for footer description */
.max-sm {
  font-size: 0.875rem;
}