/* B-TEC Electromechanical Solutions - Modern Web3 Design */

/* CSS Variables for Dark/Light Theme */
:root {
  /* Light Theme (default) */
  --bg-primary: #95ccda;
  --bg-secondary: #fffede;
  --bg-card: rgba(255, 255, 255, 0.95);
  --text-primary: #2c3e50;
  --text-secondary: #6c757d;
  --text-accent: #2D46C4;
  --border-color: rgba(0, 0, 0, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #cefffb 100%);
  --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --glass-bg: rgba(255, 255, 255, 0.25);
  --glass-border: rgba(255, 255, 255, 0.18);
}

/* Dark Theme */
[data-theme="dark"] {
  --bg-primary: #000000c9;
  --bg-secondary: #16213e;
  --bg-card: rgba(22, 33, 62, 0.95);
  --text-primary: #08a784;
  --text-secondary: #6075b4;
  --text-accent: #64b5f6;
  --border-color: rgba(255, 255, 255, 0.1);
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
  --gradient-accent: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
  --glass-bg: rgba(22, 33, 62, 0.25);
  --glass-border: rgba(255, 255, 255, 0.1);
}

/* Global Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Main Title Styles */
h1 {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.2;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Animated Background */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  overflow: hidden;
}

.gear {
  position: absolute;
  border: 2px solid rgba(102, 126, 234, 0.1);
  border-radius: 50%;
  animation: rotate 20s linear infinite;
}

.gear::before,
.gear::after {
  content: '';
  position: absolute;
  background: rgba(102, 126, 234, 0.05);
  border-radius: 50%;
}

.gear::before {
  width: 20px;
  height: 20px;
  top: -10px;
  left: 50%;
  transform: translateX(-50%);
}

.gear::after {
  width: 15px;
  height: 15px;
  bottom: -7.5px;
  right: -7.5px;
}

.gear-1 {
  width: 100px;
  height: 100px;
  top: 10%;
  left: 10%;
  animation-duration: 10s;
}

.gear-2 {
  width: 150px;
  height: 150px;
  top: 60%;
  right: 10%;
  animation-duration: 10s;
  animation-direction: reverse;
}

.gear-3 {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 15%;
  animation-duration: 10s;
}

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

/* Glassmorphism Card */
.glass-card {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.glass-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--glass-border);
  transition: all 0.3s ease;
}

[data-theme="dark"] .header {
  background: rgba(26, 26, 46, 0.85);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo-container {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.logo-video {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  object-fit: cover;
}

.logo-text {
  font-size: 1.5rem;
  font-weight: 700;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 2rem;
  align-items: center;
}

.nav-link {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.3s ease;
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--gradient-primary);
  transition: width 0.3s ease;
}

.nav-link:hover::after {
  width: 100%;
}

.theme-toggle {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  border-radius: 50px;
  padding: 0.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  color: var(--text-primary);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle:hover {
  background: var(--gradient-primary);
  color: white;
}

.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 2rem 2rem;
  position: relative;
}

.hero-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.hero-text {
  animation: fadeInLeft 1s ease-out;
}

.hero-title {
  font-size: 2.8rem;
  font-weight: 800;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-image {
  animation: fadeInRight 1s ease-out;
  position: relative;
}

.hero-image img {
  width: 100%;
  height: auto;
  border-radius: 20px;
  box-shadow: var(--shadow);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  border: none;
  cursor: pointer;
  font-size: 1rem;
}

.btn-primary {
  background: #2D46C4;
  color: white;
  box-shadow: 0 4px 15px rgba(45, 70, 196, 0.3);
}

.btn-primary:hover {
  background: #1e3296;
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(45, 70, 196, 0.4);
}

.btn-secondary {
  background: var(--glass-bg);
  color: var(--text-primary);
  border: 1px solid var(--glass-border);
  backdrop-filter: blur(16px);
}

.btn-secondary:hover {
  background: var(--gradient-primary);
  color: white;
  transform: translateY(-2px);
}

/* Sections */
.section {
  padding: 6rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.services-section {
  background: linear-gradient(135deg, 
    rgba(102, 126, 234, 0.03) 0%, 
    rgba(118, 75, 162, 0.05) 50%, 
    rgba(79, 172, 254, 0.03) 100%);
  border-radius: 32px;
  padding: 8rem 3rem;
  margin: 4rem auto;
  position: relative;
  overflow: hidden;
  max-width: 1400px;
}

.services-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 32px;
  z-index: -1;
}

.section-title {
  font-size: 2.4rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 1.5rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  position: relative;
  display: inline-block;
  width: 100%;
}

.section-title::after {
  content: '';
  position: absolute;
  bottom: -10px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--gradient-primary);
  border-radius: 2px;
}

.section-subtitle {
  text-align: center;
  color: var(--text-secondary);
  margin-bottom: 5rem;
  font-size: 1.25rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.6;
}

/* Service Grid */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2.5rem;
  margin-bottom: 4rem;
  padding: 1rem 0;
}

.service-card {
  position: relative;
  overflow: hidden;
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  border-radius: 24px;
  padding: 2.5rem 2rem;
  text-align: center;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  color: inherit;
  color: white; /* Make text white for contrast */
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
  text-decoration: none; /* Remove underlines */
}

.service-card-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.service-card-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(0) brightness(1);   /* No blur by default */
  opacity: 1;                      /* Fully visible by default */
  transition: filter 0.4s, opacity 0.4s;
}

/* Blur on hover (desktop) */
.service-card:hover .service-card-bg img {
  filter: blur(14px) brightness(0.7);
  opacity: 0.7;
}

/* Blur on touch (mobile) */
.service-card:active .service-card-bg img,
.service-card:focus .service-card-bg img {
  filter: blur(14px) brightness(0.7);
  opacity: 0.7;
}

.service-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--gradient-primary);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.service-card::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(145deg, 
    rgba(10, 20, 40, 0.5) 0%, 
    rgba(20, 10, 30, 0.7) 100%);
  opacity: 1;
  transition: opacity 0.4s ease;
  z-index: 2;
}

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

.service-card:hover::after {
  opacity: 0.8;
}

.service-card:hover {
  transform: translateY(-12px) scale(1.02);
  box-shadow: 0 32px 64px rgba(0, 0, 0, 0.15);
  border-color: rgba(102, 126, 234, 0.3);
}

.service-card:hover .service-card-bg {
  transform: scale(1.05);
  filter: blur(2px) brightness(0.7);
}



.service-title {
  font-size: 1.375rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: white;
  transition: all 0.3s ease;
  position: relative; z-index: 3;
}

.service-description {
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.7;
  font-size: 1rem;
  transition: color 0.3s ease;
  position: relative; z-index: 3;
}

.service-card:hover .service-description {
  color: white;
}

/* Enhanced Service Grid Animation */
.service-card {
  animation: fadeInUp 0.6s ease-out forwards;
  opacity: 0;
  transform: translateY(30px);
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }
.service-card:nth-child(5) { animation-delay: 0.5s; }
.service-card:nth-child(6) { animation-delay: 0.6s; }
.service-card:nth-child(7) { animation-delay: 0.7s; }
.service-card:nth-child(8) { animation-delay: 0.8s; }

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

/* Contact Section */
.contact-section {
  background: var(--bg-secondary);
  border-radius: 30px;
  padding: 4rem;
  margin: 4rem 0;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}

.contact-form {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 2rem;
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--text-primary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 1rem;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  background: var(--bg-card);
  color: var(--text-primary);
  font-size: 1rem;
  transition: all 0.3s ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--text-accent);
  box-shadow: 0 0 0 3px rgba(45, 70, 196, 0.1);
}

.form-textarea {
  min-height: 120px;
  resize: vertical;
}

.map-container {
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}

.map-container iframe {
  width: 100%;
  height: 400px;
  border: none;
}

/* Footer */
.footer {
  background: var(--bg-secondary);
  padding: 4rem 2rem 2rem;
  margin-top: 4rem;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 3rem;
}

.footer-section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: var(--text-primary);
}

.footer-section p,
.footer-section a {
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.6;
}

.footer-section a:hover {
  color: var(--text-accent);
}

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  text-align: center;
  color: var(--text-secondary);
}

.developer-credit {
  color: var(--text-accent);
  text-decoration: none;
  font-weight: 500;
}

.developer-credit:hover {
  text-decoration: underline;
}

/* Newsletter */
.newsletter {
  background: var(--gradient-primary);
  color: white;
  padding: 4rem 2rem;
  border-radius: 30px;
  text-align: center;
  margin: 4rem 0;
}

.newsletter-form {
  display: flex;
  gap: 1rem;
  max-width: 400px;
  margin: 2rem auto 0;
}

.newsletter-input {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
}

.newsletter-btn {
  background: white;
  color: var(--text-accent);
  border: none;
  border-radius: 50px;
  padding: 1rem 2rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.newsletter-btn:hover {
  background: rgba(255, 255, 255, 0.9);
  transform: translateY(-2px);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

/* Responsive Design */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: block;
  }

  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    border-radius: 0 0 16px 16px;
    flex-direction: column;
    padding: 2rem;
    gap: 1rem;
  }

  .nav-menu.active {
    display: flex;
  }

  .hero-content {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 2rem;
  }

  .hero-title {
    font-size: 2.5rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .newsletter-form {
    flex-direction: column;
  }

  .section {
    padding: 4rem 1rem;
  }

  .services-section {
    padding: 5rem 2rem;
    margin: 2rem auto;
  }

  .section-title {
    font-size: 2.25rem;
  }

  .nav-container {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 2rem;
  }

  .services-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .service-card {
    padding: 2rem 1.5rem;
  }

  .services-section {
    padding: 4rem 1.5rem;
    margin: 1rem;
  }

  .section-title {
    font-size: 2rem;
  }

  .service-icon {
    width: 70px;
    height: 70px;
    font-size: 1.8rem;
  }

  .contact-section {
    padding: 2rem;
    margin: 2rem 1rem;
  }

  .newsletter {
    padding: 3rem 1.5rem;
    margin: 2rem 1rem;
  }
}

/* Page Transitions */
.page-transition {
  animation: pageLoad 0.6s ease-out;
}

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

/* Service Detail Pages */
.service-detail {
  padding: 8rem 2rem 4rem;
}

.service-hero {
  text-align: center;
  margin-bottom: 4rem;
}

.service-hero h1 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.service-content {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-main {
  background: var(--glass-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--glass-border);
  border-radius: 20px;
  padding: 3rem;
}

.service-sidebar {
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

.service-image {
  width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 16px;
  margin-bottom: 2rem;
}

.features-list {
  list-style: none;
  padding: 0;
}

.features-list li {
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
  position: relative;
  padding-left: 2rem;
}

.features-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: #2D46C4;
  font-weight: bold;
}

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

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--gradient-primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--gradient-secondary);
}

/* Utility Classes */
.text-center { text-align: center; }
.text-gradient {
  background: var(--gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.mb-2 { margin-bottom: 1rem; }
.mb-4 { margin-bottom: 2rem; }
.mt-4 { margin-top: 2rem; }

/* Responsive Typography */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2.2rem;
  }
  
  .section-title {
    font-size: 2rem;
  }
  
  h1 {
    font-size: 2rem;
  }
}

@media (max-width: 480px) {
  .hero-title {
    font-size: 1.8rem;
  }
  
  .section-title {
    font-size: 1.6rem;
  }
  
  h1 {
    font-size: 1.6rem;
  }
}