/* css/home.css */

/* ──────────── HERO SECTION ──────────── */
#hero {
  position: relative; 
  min-height: 100vh; min-height: 100dvh; 
  /* centered layout for modern feel */
  display: flex; align-items: center; justify-content: center;
  padding-top: calc(var(--nav-height) + 2rem); 
  padding-bottom: 5rem;
  overflow: hidden; background: var(--bg-main);
}

.hero-img-container {
  position: absolute; inset: 0; overflow: hidden; z-index: 0; background: #000;
}
.hero-animated-img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.35;
  animation: kenBurns 30s ease-in-out infinite alternate;
}
@keyframes kenBurns {
  0% { transform: scale(1) translate(0, 0); }
  100% { transform: scale(1.15) translate(-2%, -2%); }
}

/* Deepened Overlays for Modern Contrast */
.hero-gradient-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(11, 15, 25, 0.98) 0%, rgba(11, 15, 25, 0.7) 50%, rgba(239, 68, 68, 0.15) 100%);
}
.hero-glow {
  position: absolute; top: -20%; left: -10%; width: 60vw; height: 60vw;
  background: radial-gradient(circle, rgba(239,68,68,0.1) 0%, rgba(0,0,0,0) 70%);
  filter: blur(80px); z-index: 1;
}

.relative-z { position: relative; z-index: 2; }

/* Modern Glass Pill Subtitle */
.glass-pill {
  display: inline-flex; align-items: center; gap: 10px; 
  padding: clamp(8px, 1vw, 12px) clamp(16px, 3vw, 24px);
  background: rgba(255, 255, 255, 0.05); 
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
  border-radius: 50px; font-size: clamp(0.8rem, 1.5vw, 0.9rem); 
  font-weight: 600; letter-spacing: 1px; color: var(--text-main); 
  margin-bottom: clamp(1.5rem, 4vw, 2.5rem); 
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}
.pulse-dot {
  width: 9px; height: 9px; background-color: var(--accent-color);
  border-radius: 50%; box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
  animation: pulseDot 2s infinite;
}
@keyframes pulseDot {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

/* Headline & SVG Underline */
.hero-title { margin-bottom: clamp(1.2rem, 3vw, 1.8rem); line-height: 1.15; }
.title-underline {
  position: absolute; bottom: -8px; left: 0; width: 100%; height: auto;
  stroke-dasharray: 200; stroke-dashoffset: 200;
  animation: drawLine 1.5s ease-out forwards; animation-delay: 1s;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }

.hero-desc { 
  font-size: clamp(1.05rem, 2.2vw, 1.2rem); color: rgba(255,255,255,0.85); 
  margin-bottom: clamp(2.5rem, 6vw, 3.5rem); max-width: 700px; line-height: 1.8;
}

/* Button Enhancements */
.btn-glow { position: relative; overflow: hidden; transition: all 0.3s ease; }
.btn-glow::after {
  content: ''; position: absolute; top: 0; left: -100%; width: 50%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transform: skewX(-20deg); transition: 0.5s;
}
.btn-glow:hover::after { left: 150%; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 25px rgba(239, 68, 68, 0.4); }
.btn-primary:hover .transition-icon { transform: translateX(4px); transition: transform 0.3s ease; }

.btn-outline:hover { transform: translateY(-3px); border-color: #fff; color: #fff; background: rgba(255,255,255,0.05); }

/* New Staggered Animations */
.fade-in-up {
  opacity: 0;
  transform: translateY(25px);
  animation: fadeInUp 0.8s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Mobile Adjustments */
@media (max-width: 991px) {
  #hero .d-flex { flex-direction: column; width: 100%; }
  .btn-primary, .btn-outline { width: 100%; justify-content: center; padding: 0.8rem !important; }
}

/* ──────────── ABOUT SECTION ──────────── */
.about-image-wrapper {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: 0 20px 40px rgba(0,0,0,0.4); border: 1px solid var(--border-color);
}
.about-image-wrapper img { width: 100%; height: auto; display: block; filter: brightness(0.85); transition: var(--transition); }
.about-image-wrapper:hover img { filter: brightness(1); transform: scale(1.02); }
.about-stats {
  position: absolute; bottom: 0; left: 0; width: 100%; background: rgba(11, 15, 25, 0.9);
  backdrop-filter: blur(10px); padding: clamp(1rem, 3vw, 1.5rem); display: flex; justify-content: space-around;
  border-top: 1px solid var(--border-color);
}
.about-stat-item { text-align: center; }
.about-stat-item h4 { color: var(--accent-color); font-size: clamp(1.4rem, 4vw, 1.8rem); margin-bottom: 0; }
.about-stat-item span { font-size: clamp(0.7rem, 1.5vw, 0.8rem); color: var(--text-muted); text-transform: uppercase; letter-spacing: 1px; }

/* ──────────── WHY CHOOSE US ──────────── */
.why-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: clamp(1.5rem, 4vw, 2rem); height: 100%;
  transition: var(--transition); display: flex; align-items: flex-start; gap: clamp(1rem, 2vw, 1.25rem);
}
.why-card:hover { transform: translateY(-5px); border-color: rgba(239, 68, 68, 0.4); box-shadow: var(--shadow-hover); background: var(--bg-hover); }
.why-icon {
  width: clamp(48px, 6vw, 54px); height: clamp(48px, 6vw, 54px); 
  background: rgba(239, 68, 68, 0.1); color: var(--accent-color);
  border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.4rem, 3vw, 1.6rem); flex-shrink: 0; transition: var(--transition);
}
.why-card:hover .why-icon { background: var(--accent-color); color: #fff; }
.why-content h4 { margin-bottom: 0.5rem; font-size: clamp(1.05rem, 2vw, 1.15rem); }
.why-content p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.6; margin: 0; }

/* ──────────── SERVICES ──────────── */
.service-card {
  background: var(--bg-main); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); padding: clamp(1.5rem, 4vw, 2.5rem) clamp(1.2rem, 3vw, 2rem); height: 100%;
  transition: var(--transition); position: relative; overflow: hidden;
}
.service-card::before {
  content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 3px;
  background: var(--accent-color); transform: scaleX(0); transform-origin: left; transition: transform 0.4s ease;
}
.service-card:hover { transform: translateY(-5px); background: var(--bg-card); box-shadow: var(--shadow-hover); border-color: rgba(255,255,255,0.1); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon-block {
  width: clamp(50px, 8vw, 60px); height: clamp(50px, 8vw, 60px); 
  background: rgba(255, 255, 255, 0.03); color: var(--text-main);
  border-radius: var(--radius-sm); border: 1px solid var(--border-color);
  display: flex; align-items: center; justify-content: center;
  font-size: clamp(1.5rem, 4vw, 1.8rem); margin-bottom: clamp(1rem, 3vw, 1.5rem); transition: var(--transition);
}
.service-card:hover .service-icon-block { background: var(--accent-color); color: #fff; border-color: var(--accent-color); }
.service-card h4 { font-size: clamp(1.1rem, 2.5vw, 1.25rem); margin-bottom: 1rem; }
.service-card p { color: var(--text-muted); font-size: clamp(0.875rem, 1.5vw, 0.95rem); line-height: 1.6; margin: 0; }

/* ──────────── PRODUCTS ──────────── */
.product-card {
  background: var(--bg-card); border: 1px solid var(--border-color);
  border-radius: var(--radius-md); overflow: hidden; height: 100%; 
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s ease;
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-8px); box-shadow: var(--shadow-hover); border-color: rgba(255,255,255,0.1); }
.product-img-wrap { width: 100%; height: 220px; overflow: hidden; border-bottom: 1px solid var(--border-color); background: #000; }
.product-img {
  width: 100%; height: 100%; object-fit: cover; opacity: 0.85;
  transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.4s ease;
}
.product-card:hover .product-img { transform: scale(1.12); opacity: 1; }
.product-info { padding: clamp(1rem, 3vw, 1.5rem); display: flex; flex-direction: column; flex-grow: 1; }
.product-category { font-size: 0.7rem; font-weight: 700; color: var(--accent-color); text-transform: uppercase; margin-bottom: 0.5rem; letter-spacing: 0.1em; }
.product-info h5 { font-size: clamp(1rem, 2.5vw, 1.1rem); margin-bottom: 0.75rem; color: #fff; }
.product-info p { font-size: clamp(0.8rem, 2vw, 0.85rem); color: var(--text-muted); margin-bottom: 1.5rem; flex-grow: 1; line-height: 1.5; }
.btn-view-details {
  width: 100%; background: var(--bg-main); border: 1px solid var(--border-color); color: var(--text-main);
  padding: 0.75rem; border-radius: var(--radius-sm); font-size: clamp(0.75rem, 1.5vw, 0.85rem); font-weight: 600;
  text-align: center; transition: var(--transition); text-transform: uppercase; letter-spacing: 0.5px; border: none;
}
.product-card:hover .btn-view-details { background: var(--accent-color); color: #fff; }

/* ──────────── PRODUCT TABS & ANIMATIONS ──────────── */
.filter-container {
  display: inline-flex;
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 50px;
  padding: clamp(4px, 1vw, 6px);
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px;
}
.filter-btn {
  background: transparent; border: none; color: var(--text-muted);
  font-family: 'Plus Jakarta Sans', sans-serif; font-weight: 600;
  font-size: clamp(0.8rem, 1.5vw, 0.875rem); padding: clamp(0.5rem, 2vw, 0.6rem) clamp(1rem, 3vw, 1.5rem);
  border-radius: 50px; cursor: pointer; transition: all 0.3s ease;
}
.filter-btn.active {
  background: var(--accent-color); color: #fff;
  box-shadow: 0 4px 15px rgba(239, 68, 68, 0.3);
}
.filter-btn:not(.active):hover { background: rgba(255, 255, 255, 0.05); color: #fff; }

.product-item {
  transition: opacity 0.4s ease, transform 0.4s ease;
  will-change: opacity, transform;
}
.product-item.filtering-hide {
  opacity: 0 !important;
  transform: scale(0.8) !important;
  pointer-events: none;
}

/* ──────────── BENEFITS & CONTACT ──────────── */
.benefits-wrapper {
  background: url('../images/asiatech-benefits.webp') center/cover no-repeat;
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  border: 1px solid var(--border-color);
}
.benefits-overlay {
  background: linear-gradient(90deg, rgba(11, 15, 25, 0.95) 0%, rgba(11, 15, 25, 0.85) 100%);
  padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 4vw, 3rem); width: 100%; height: 100%;
}
.benefit-list-item {
  display: flex; align-items: center; gap: clamp(0.75rem, 2vw, 1rem); margin-bottom: clamp(1rem, 3vw, 1.5rem);
  background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.05);
  padding: clamp(0.75rem, 2vw, 1rem) clamp(1rem, 3vw, 1.5rem); border-radius: var(--radius-sm); backdrop-filter: blur(5px);
  transition: var(--transition);
}
.benefit-list-item:hover { background: rgba(255,255,255,0.08); transform: translateX(5px); border-color: rgba(239, 68, 68, 0.3); }
.benefit-list-item i { color: var(--accent-color); font-size: clamp(1rem, 2.5vw, 1.25rem); }
.benefit-list-item h6 { margin: 0; font-size: clamp(0.95rem, 2vw, 1.05rem); color: #fff; line-height: 1.4; }

.contact-wrapper { background: var(--bg-card); border: 1px solid var(--border-color); border-radius: var(--radius-lg); overflow: hidden; }
.contact-info { 
  background: linear-gradient(135deg, var(--bg-hover) 0%, var(--bg-main) 100%); 
  padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem); height: 100%; border-right: 1px solid var(--border-color); 
}
.contact-detail { 
  display: flex; 
  align-items: center; /* Centers the icon with the text perfectly */
  gap: 1.25rem; 
  margin-bottom: clamp(1.25rem, 3vw, 2rem); 
}

.contact-detail i { 
  color: var(--accent-color); 
  font-size: clamp(1.2rem, 3vw, 1.5rem); 
  background: rgba(239, 68, 68, 0.1); 
  padding: clamp(10px, 2vw, 12px); 
  border-radius: 8px; 
  flex-shrink: 0; /* Prevents the icon from squishing on mobile */
}

/* Upgraded text styles since the h6 is gone */
.contact-detail span, 
.contact-detail a { 
  color: #fff; /* Changed from muted to bright white */
  font-size: clamp(0.95rem, 2vw, 1.05rem); /* Increased font size slightly */
  text-decoration: none; 
  transition: var(--transition); 
  line-height: 1.6;
}

.contact-detail a:hover { 
  color: var(--accent-color); 
}

.contact-form { padding: clamp(2rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3rem); }
.form-label { font-weight: 500; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.form-control, .form-select {
  border: 1px solid var(--border-color); border-radius: var(--radius-sm);
  padding: clamp(0.6rem, 2vw, 0.8rem) 1rem; font-size: clamp(0.875rem, 2vw, 0.95rem); color: #fff; background-color: var(--bg-main);
  transition: var(--transition); width: 100%;
}
.form-control::placeholder { color: #475569; }
.form-control:focus, .form-select:focus {
  background-color: #0f172a; border-color: var(--accent-color);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2); outline: none; color: #fff;
}
textarea.form-control { min-height: 120px; resize: vertical; }

/* Scroll Animations */
@keyframes slideUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.fade-up { opacity: 0; transform: translateY(30px); transition: opacity 0.7s ease-out, transform 0.7s ease-out; }
.fade-up.visible { opacity: 1; transform: translateY(0); }

/* ──────────── MOBILE SPECIFIC RESPONSIVENESS (PHONES) ──────────── */
@media (max-width: 767px) {
  
  /* Hero Specific Fixes - Adds padding so text isn't cramped */
  #hero {
    align-items: flex-start;
    padding-top: calc(var(--nav-height) + 3rem);
    padding-bottom: 3rem;
  }
  #hero .d-flex { flex-direction: column; width: 100%; gap: 0.75rem !important; }
  
  /* Product Tabs Fix: Swipeable Horizontal Scroll on Mobile */
  .filter-container { 
    display: flex; 
    flex-wrap: nowrap; 
    overflow-x: auto; 
    justify-content: flex-start; 
    padding: 8px; 
    width: 100%; 
    border-radius: 12px;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    gap: 8px;
    background: rgba(255, 255, 255, 0.04);
  }
  /* Hide the scrollbar for aesthetics */
  .filter-container::-webkit-scrollbar { display: none; }
  .filter-container { -ms-overflow-style: none; scrollbar-width: none; }
  
  .filter-btn { 
    flex: 0 0 auto; 
    scroll-snap-align: center;
    font-size: 0.85rem; 
    padding: 0.6rem 1.25rem; 
    margin: 0;
    white-space: nowrap; 
  }
  
  /* Product Cards Fix: Prevent huge vertical heights */
  .product-img-wrap { height: 140px; } 
  .product-info { padding: 0.85rem; }
  .product-category { font-size: 0.55rem; margin-bottom: 0.25rem; letter-spacing: 0; }
  .product-info h5 { font-size: 0.85rem; margin-bottom: 0.35rem; line-height: 1.3; }
  
  /* CLAMP TEXT: Forces description to exactly 2 lines, adds '...' if longer */
  .product-info p { 
    font-size: 0.7rem; 
    line-height: 1.4; 
    margin-bottom: 0.75rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }
  
  .btn-view-details { padding: 0.5rem; font-size: 0.7rem; letter-spacing: 0; }
}