/* ==============================
   ROBOTICS PAGE – ORIGINAL STYLE (LIGHT THEME)
   ============================== */
:root {
  --primary: #0056b3;
  --secondary: #00a8e8;
  --accent: #ff6b35;
  --dark: #1a2b4d;
  --light: #f8f9fa;
  --gray: #6c757d;
  --transition: all 0.3s ease;
  --nav-h: 80px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html { scroll-behavior: smooth; }
body {
  line-height: 1.6;
  color: #333;
  background-color: #fff;
  overflow-x: hidden;
  padding-top: 0%;
}

h1, h2, h3, h4 {
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 1rem;
}
h1 { font-size: 3.5rem; }
h2 {
  font-size: 2.5rem;
  text-align: center;
  margin-bottom: 3rem;
  position: relative;
}
h2:after {
  content: '';
  position: absolute;
  bottom: -15px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 4px;
  background: var(--accent);
}
h3 { font-size: 1.8rem; }
p { margin-bottom: 1.5rem; }

.container {
  width: 90%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 15px;
}

.btn {
  display: inline-block;
  padding: 12px 30px;
  background: var(--primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-decoration: none;
}
.btn:hover {
  background: var(--secondary);
  transform: translateY(-3px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}
.btn-accent {
  background: var(--accent);
}
.btn-accent:hover {
  background: #e55a2b;
}

section { padding: 80px 0; }
.section-light { background-color: var(--light); }
.section-dark { background-color: var(--dark); color: white; }

/* ===== NAVBAR – SAME AS web_development.html ===== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  height: var(--nav-h);
}
.site-header.scrolled {
  background: rgba(255, 255, 255, 0.98);
  padding: 10px 0;
}

.nav {
  height: var(--nav-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 3vw;
}

/* LOGO */
.brand .logo {
  height: 600px; width: auto; object-fit: contain; margin-top: 11%; display: block;
  transform: translateX(-80px);
}
@media (min-width: 769px) {
  .brand .logo[src*="Logo with Name"] {
    height: clamp(450px, 25vw, 500px);
    transform: translateX(calc(-4.5vw + 19px));
  }
}
@media (min-width: 1200px) { .brand .logo[src*="Logo with Name"] { transform: translateX(-41px); } }
@media (min-width: 1600px) { .brand .logo[src*="Logo with Name"] { transform: translateX(-51px); } }
@media (max-width: 1024px) {
  .brand .logo { height: clamp(400px, 50vw, 500px); margin-top: clamp(5%, 8vw, 8%); }
  .brand .logo[src*="Logo with Name"] { height: clamp(360px, 46vw, 460px); }
}
@media (max-width: 768px) {
  .brand .logo:not([src*="Logo with Name"]) {
    height: auto !important; width: clamp(340px, 64vw, 540px) !important;
    max-width: 540px !important; min-width: 340px !important;
    transform: translateX(0) !important; margin-top: clamp(18px, 4.5vw, 40px) !important;
    margin-left: clamp(-29px, -7vw, -25px) !important; object-fit: contain;
  }
  .brand .logo[src*="Logo with Name"] {
    height: auto !important; width: clamp(250px, 53vw, 440px) !important;
    max-width: 440px !important; min-width: 250px !important;
    margin-top: clamp(6px, 1.5vw, 14px) !important; margin-left: clamp(-8px, -2vw, -4px) !important;
    transform: translateX(0) !important; object-fit: contain;
  }
}

/* NAV LINKS */
.nav-links {
  display: flex;
  list-style: none;
  gap: 36px;
  align-items: center;
}
.nav-link {
  font-weight: 600;
  color: var(--dark);
  position: relative;
  padding: 5px 0;
  transition: var(--transition);
  text-decoration: none;
}
.nav-link:hover, .nav-link.active { color: var(--primary); }
.nav-link:not(.has-sub)::after { content: none !important; }
.nav-link.has-sub::after {
  content: "";
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--primary);
  transition: width .3s ease;
}
.nav-link.has-sub:hover::after, .nav-link.has-sub.active::after { width: 100%; }

/* DROPDOWN */
.dropdown { position: relative; }
.dropdown-menu {
  position: absolute;
  left: 0;
  top: calc(100% + 10px);
  min-width: 260px;
  background: #fff;
  border: 1px solid #e5e8ed;
  border-radius: 10px;
  box-shadow: 0 4px 20px rgba(0,0,0,.08);
  list-style: none;
  padding: 10px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: var(--transition);
  z-index: 1001;
}
.dropdown:hover .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.dropdown-link {
  display: block;
  padding: 10px 14px;
  font-weight: 600;
  color: var(--dark);
  text-decoration: none;
}
.dropdown-link:hover, .dropdown-link.active {
  background: #f5f8fb;
  color: var(--primary);
}
.dropdown-link::after { display: none !important; }

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

/* ===== MOBILE MENU ===== */
@media (max-width: 768px) {
  .mobile-menu-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1.25rem, 4vw, 1.5rem);
    padding: clamp(4px, 1vw, 8px);
    min-width: clamp(36px, 9vw, 44px);
    min-height: clamp(36px, 9vw, 44px);
  }
  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    width: 100vw;
    background: #fff;
    flex-direction: column;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 20px 24px;
    gap: 12px;
    z-index: 999;
    max-height: calc(100vh - var(--nav-h));
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  }
  .nav-links.active { display: flex; }
  .nav-link {
    width: 100%;
    text-align: right;
    padding: 10px 0;
    font-size: clamp(0.9rem, 3vw, 1rem);
    font-weight: 600;
    color: var(--dark);
  }
  .nav-link:hover, .nav-link.active { color: var(--primary); }
  .dropdown > .nav-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
  }
  .dropdown .dropdown-menu {
    position: static;
    width: 100%;
    border: 1px solid #e5e8ed;
    border-radius: 8px;
    margin-top: 8px;
    background: #f9f9f9;
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    overflow: hidden;
    transition: opacity .3s ease, max-height .3s ease, padding .3s ease;
  }
  .dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    max-height: 600px;
    padding: 12px 0;
  }
  .dropdown-link {
    display: block;
    padding: 10px 20px;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--dark);
    text-align: right;
    border-right: 3px solid transparent;
  }
  .dropdown-link:hover, .dropdown-link.active {
    background: #eef2ff;
    color: var(--primary);
    border-right-color: var(--primary);
  }
}

/* ===== HERO ===== */
.hero {
  height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
              url('https://images.unsplash.com/photo-1485827404703-89b55fcc595e?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80') no-repeat center center/cover;
  color: white;
  text-align: center;
  position: relative;
}
.hero-content {
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 {
  font-size: 3.5rem;
  margin-bottom: 1.5rem;
  text-shadow: 2px 2px 5px rgba(0, 0, 0, 0.5);
}
.hero p {
  font-size: 1.3rem;
  margin-bottom: 2.5rem;
}
.scroll-down {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  font-size: 2rem;
  animation: bounce 2s infinite;
}

/* ===== INTRO – REDUCED IMAGE SIZE ===== */
.intro-content {
  display: flex;
  align-items: center;
  gap: 40px;
  flex-wrap: wrap;
}
.intro-text {
  flex: 1;
  min-width: 300px;
}

.intro-image {
  flex: 0 0 400px;           /* Fixed width */
  max-width: 800px;
  height: 400px;             /* Fixed height */
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
  margin: 0 auto;
}
.intro-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;         /* Ensures image fills box without distortion */
  display: block;
  transition: var(--transition);
}
.intro-image:hover img {
  transform: scale(1.06);
}

/* === The Challenge We Solve section === */
.challenge-section p {
  font-size: 1.15rem;        /* Increase this number for larger text (e.g., 1.25rem or 1.3rem) */
  line-height: 1.8;          /* Improves readability */
  color: #1a1a1a;            /* Optional: makes the text darker */
  font-weight: 400;          /* Keeps it clean */
  max-width: 800px;          /* Keeps the text block tidy */
}

.challenge-section h2 {
  font-size: 2.2rem;         /* Title size */
  font-weight: 800;
  color: #222;
}

/* Mobile – Stack & smaller image */
@media (max-width: 768px) {
  .intro-content {
    flex-direction: column;
    text-align: center;
    gap: 30px;
  }
  .intro-image {
    flex: 0 0 280px;
    height: 220px;
    max-width: 100%;
  }
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 30px;
}
.service-card {
  background: white;
  border-radius: 10px;
  padding: 30px;
  box-shadow: 0 5px 15px rgba(0,0,0,.05);
  transition: var(--transition);
  text-align: center;
}
.service-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,.1);
}
.service-icon {
  font-size: 3rem;
  color: var(--primary);
  margin-bottom: 20px;
}

.benefits-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
.benefit-item {
  text-align: center;
  padding: 30px 20px;
  background: rgba(255,255,255,.1);
  border-radius: 10px;
  transition: var(--transition);
}
.benefit-item:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,.15);
}
.benefit-icon {
  font-size: 2.5rem;
  color: var(--accent);
  margin-bottom: 20px;
}

.process-steps {
  display: flex;
  justify-content: space-between;
  position: relative;
  margin-top: 50px;
}
.process-steps:before {
  content: '';
  position: absolute;
  top: 40px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--primary);
  z-index: 1;
}
.step {
  text-align: center;
  position: relative;
  z-index: 2;
  flex: 1;
  max-width: 200px;
}
.step-number {
  width: 80px;
  height: 80px;
  background: var(--primary);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0 auto 20px;
  transition: var(--transition);
}
.step:hover .step-number {
  background: var(--accent);
  transform: scale(1.1);
}

.tech-logos {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 40px;
}
.tech-logo {
  font-size: 3rem;
  color: var(--gray);
  transition: var(--transition);
}
.tech-logo:hover {
  color: var(--primary);
  transform: scale(1.2);
}

.applications-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 30px;
}
.application-card {
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,.1);
  transition: var(--transition);
  position: relative;
}
.application-card:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 30px rgba(0,0,0,.15);
}
.application-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}
.application-content {
  padding: 20px;
  background: white;
}

.cta-section {
  text-align: center;
  padding: 100px 0;
  background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)),
              url('https://images.unsplash.com/photo-1485827404703-89b55fcc595e?ixlib=rb-4.0.3&auto=format&fit=crop&w=2070&q=80') no-repeat center center/cover;
  color: white;
}
.cta-section h2 { color: white; }
.cta-section h2:after { background: var(--accent); }

/* ===== FOOTER ===== */
footer {
  background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
  color: var(--text-light); padding-top: 60px;
}
.footer-content {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; padding-bottom: 40px;
}
.footer-col h3 {
  color: var(--primary-light); font-size: 1.15rem; margin-bottom: 16px;
  position: relative; padding-bottom: 10px;
}
.footer-col h3::after {
  content: ""; position: absolute; bottom: 0; left: 0;
  width: 40px; height: 2px; background: var(--primary-light);
}
.footer-links { list-style: none; }
.footer-links a {
  opacity: .9; transition: var(--transition); color: inherit; text-decoration: none;
}
.footer-links a:hover { opacity: 1; color: var(--primary-light); padding-left: 5px; }
.footer-social { display: flex; gap: 15px; margin-top: 20px; }
.social-icon {
  width: 40px; height: 40px; border-radius: 50%; background: rgba(255,255,255,.1);
  color: #fff; display: flex; align-items: center; justify-content: center;
  transition: var(--transition);
}
.social-icon:hover { background: var(--primary); transform: translateY(-3px); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0;
  text-align: center; font-size: .95rem; opacity: .75;
}

@media (max-width: 1024px) { .footer-content { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 768px) {
  .footer-content { grid-template-columns: 1fr; text-align: center; justify-items: center; }
  .footer-col h3::after { left: 50%; transform: translateX(-50%); }
  .footer-links a:hover { padding-left: 0; }
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  .flip-inner, * { transition: none !important; }
}
/* ===== ANIMATIONS ===== */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
  40% { transform: translateY(-20px) translateX(-50%); }
  60% { transform: translateY(-10px) translateX(-50%); }
}
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 992px) {
  h1 { font-size: 2.8rem; }
  h2 { font-size: 2.2rem; }
  .intro-content { flex-direction: column; }
  .process-steps { flex-wrap: wrap; justify-content: center; gap: 30px; }
  .process-steps:before { display: none; }
}
@media (max-width: 768px) {
  .hero h1 { font-size: 2.5rem; }
  .hero p { font-size: 1.1rem; }
  .hero-btns { flex-direction: column; align-items: center; }
  .services-grid, .applications-grid { grid-template-columns: 1fr; }
}

/* =======================================================================
   APPENDED OVERRIDES & SLIDE-UP EFFECTS (keeps original colors & layout)
   ======================================================================= */

/* Force Services into 2×2 layout on desktop/tablet */
@media (min-width: 769px){
  .services-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* Replace simple service card with slide-up structure */
.service-card{
  position: relative;
  padding: 0 !important;           /* content controlled by layers */
  min-height: 340px;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 5px 15px rgba(0,0,0,.05);
  background: #ffffff;
}

/* Sticky robotics background */
.service-bg{
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-attachment: fixed;    /* sticky */
  will-change: transform;
}

/* Always-visible header (title + icon) over image */
.service-card .box-head{
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 16px 18px;
  display: flex; align-items: center; gap: 12px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,.55), rgba(0,0,0,0));
  z-index: 2;
  transition: opacity .35s ease;
}
.service-card .box-head h3{margin:0;font-size:1.25rem;font-weight:800;text-shadow:0 1px 2px rgba(0,0,0,.45)}
.service-icon{
  width: 44px; height: 44px; border-radius: 10px;
  display:grid; place-items:center;
  font-size: 1.2rem; color:#fff;
  background: rgba(0,0,0,.25); border:1px solid rgba(255,255,255,.2);
}

/* Slide-up content (hidden until hover/focus) */
.service-card .hid-box{
  position: absolute;
  left:0; right:0; bottom:0;
  padding: 22px 22px 24px;
  color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,.25), rgba(0,0,0,.45));
  backdrop-filter: blur(1.2px);
  border-top: 1px solid rgba(255,255,255,.12);
  transform: translateY(100%);
  transition: transform .45s ease;
  z-index: 3;
}
.service-card:hover .hid-box,
.service-card:focus-within .hid-box{
  transform: translateY(0);
}
/* optional fade of the header as content slides up */
.service-card:hover .box-head,
.service-card:focus-within .box-head{
  opacity: 0;
}

/* -------------------------
   Key Benefits slide-up
-------------------------- */
.benefits-grid{
  display:grid;
  grid-template-columns: repeat(4, minmax(0,1fr));
  gap:30px;
}
@media (max-width:1100px){ .benefits-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width:680px){ .benefits-grid{ grid-template-columns: 1fr; } }

.benefit-card{
  position:relative;
  min-height:260px;
  border-radius:12px;
  overflow:hidden;
  background: rgba(255,255,255,.08); /* keep your dark look */
  box-shadow: 0 6px 18px rgba(0,0,0,.18);
}
.benefit-card .box-head{
  position:absolute; inset:0 0 auto 0;
  padding:26px 24px 34px;
  display:flex; flex-direction:column; align-items:center; justify-content:center; gap:14px;
  color:#fff;
}
.benefit-card .box-head.center{ text-align:center; }
.benefit-card .box-head h3{ margin:0; text-align:center; }
.benefit-icon{ font-size:2.5rem; color:var(--accent); }

.benefit-card .hid-box{
  position:absolute; left:0; right:0; bottom:0;
  padding:22px 22px 26px;
  color:#fff; text-align:center;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.28));
  border-top:1px solid rgba(255,255,255,.12);
  transform: translateY(100%);
  transition: transform .45s ease;
}
.benefit-card:hover .hid-box,
.benefit-card:focus-within .hid-box{
  transform: translateY(0);
}

/* === Mobile/touch fallback for slide-up === */
.service-card.open .hid-box,
.benefit-card.open .hid-box { transform: translateY(0); }

.service-card.open .box-head { opacity: 0; }

/* Optional: make tap targets show a hand cursor on devices that emulate hover */
.service-card, .benefit-card { cursor: pointer; }

/* Also trigger while finger is down (iOS often fires :active briefly) */
@media (hover: none) and (pointer: coarse) {
  .service-card:active .hid-box,
  .benefit-card:active .hid-box { transform: translateY(0); }
  .service-card:active .box-head { opacity: 0; }
}

/* ===== Image zoom on hover (no layout shift) ===== */

/* Applications cards */
.application-image{
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-size .55s ease;
  will-change: background-size;
}
.application-card:hover .application-image,
.application-card:focus-within .application-image{
  background-size: 112%;      /* zoom in */
}
@media (hover:none) and (pointer:coarse){
  .application-card:active .application-image{ background-size:112%; }
}

/* Services cards with sticky bg */
.service-bg{
  background-size: 100%;
  background-position: center;
  background-repeat: no-repeat;
  transition: background-size .6s cubic-bezier(.2,.65,.25,1);
  will-change: background-size;
}
.service-card:hover .service-bg,
.service-card:focus-within .service-bg{
  background-size: 112%;      /* zoom in */
}
@media (hover:none) and (pointer:coarse){
  .service-card:active .service-bg{ background-size:112%; }
}

/* (Optional) slightly ease back to 100% when not hovered — already handled by the transition */
