:root{
  --primary:#001f3f;
  --accent:#00ffff;
  --light:#f8f9fa;
  --shadow:rgba(0,31,63,.18);
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:'Montserrat',sans-serif;
  background:var(--light);
  color:#333;
  opacity:0;
  transition:.4s ease;
}
body.loaded{opacity:1}
img{max-width:100%;display:block}
/* ========== LOADER ========== */
.loading{
  position:fixed;
  inset:0;
  background:var(--primary);
  display:flex;
  align-items:center;
  justify-content:center;
  z-index:9999;
}
.spinner{
  width:50px;
  height:50px;
  border:5px solid var(--accent);
  border-top-color:transparent;
  border-radius:50%;
  animation:spin 1s linear infinite;
}
@keyframes spin{to{transform:rotate(360deg)}}
/* ========== HEADER ========== */
header{
  position:fixed;
  top:0;
  width:100%;
  background:rgba(0,31,63,.95);
  z-index:1000;
}
.header-inner{
  max-width:1200px;
  margin:auto;
  padding:14px 20px;
  display:flex;
  justify-content:space-between;
  align-items:center;
}
.logo{
  color:#fff;
  font-weight:900;
  letter-spacing:2px;
}
nav ul{
  list-style:none;
  display:flex;
  margin:0;
  padding:0;
}
nav li{margin-left:20px}
nav a{
  color:#fff;
  font-weight:700;
}
.menu-btn{
  display:none;
  font-size:28px;
  color:#fff;
  cursor:pointer;
}
/* ========== HERO ========== */
.hero{
  min-height:100vh;
  padding:140px 20px 80px;
  background:
    linear-gradient(rgba(0,0,0,.55),rgba(0,0,0,.55)),
    url("https://www.panelmatic.com/wp-content/uploads/2025/03/Industrial-Control-Panel-Design-FI-1024x768.jpg")
    center/cover no-repeat;
  color:#fff;
  text-align:center;
}
.hero h1{
  font-size:clamp(32px,6vw,72px);
  font-weight:900;
  text-shadow:0 0 20px var(--accent);
}
.hero h2{color:#ff4c4c;margin:20px 0}
.hero p{max-width:800px;margin:auto}
.cta{
  display:inline-block;
  margin-top:25px;
  padding:14px 30px;
  background:var(--accent);
  color:#001f3f;
  font-weight:700;
}
/* ========== WAVE ========== */
.wave{
  height:120px;
  background: radial-gradient(
    120% 120% at 50% 0%,
    transparent 60%,
    #001f3f 61%
  );
}

/* ========== SECTIONS ========== */
section{padding:100px 20px;text-align:center}
.section-light{background:var(--light)}
.section-dark{background:var(--primary);color:#fff}
.section-title{
  font-size:clamp(28px,5vw,48px);
  color:var(--accent);
  margin-bottom:40px;
}
/* ========== PRODUCTS (FIXED SIZE) ========== */
.carousel{
  overflow:hidden;
  max-width:1200px;
  margin:auto;
}
.carousel-inner{
  display:flex;
  width:max-content;
  animation:scroll 35s linear infinite;
}
.carousel-item{
  min-width:260px;
  max-width:260px;
  margin:0 15px;
  background:#fff;
  border-radius:10px;
  box-shadow:0 6px 18px var(--shadow);
  overflow:hidden;
  transition:.3s;
}
.carousel-item:hover{transform:translateY(-6px)}
.carousel-item img{
  width:100%;
  height:160px;
  object-fit:cover;
}
.carousel-item .content{
  padding:15px;
}
.carousel-item h4{
  margin:0 0 8px;
  color:#001f3f;
}
.carousel-item p{
  font-size:14px;
  color:#555;
}
@keyframes scroll{
  from{transform:translateX(0)}
  to{transform:translateX(-50%)}
}
/* ========== SERVICES ========== */
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(280px,1fr));
  gap:40px;
  max-width:1200px;
  margin:auto;
}
.service{
  background:#fff;
  padding:30px;
  border-radius:8px;
  box-shadow:0 6px 20px var(--shadow);
  transition:.3s;
}
.service:hover{transform:translateY(-6px)}
/* ========== CONTACT ========== */
form{
  max-width:600px;
  margin:auto;
  display:grid;
  gap:16px;
}
input,textarea{
  padding:14px;
  border-radius:6px;
  border:1px solid #ccc;
}
button{
  padding:14px;
  background:var(--accent);
  border:none;
  font-weight:700;
}
/* ========== FOOTER ========== */
footer{
  background:var(--primary);
  color:#fff;
  text-align:center;
  padding:60px 20px;
}
/* ========== MOBILE ========== */
@media(max-width:768px){
  nav ul{
    display:none;
    position:absolute;
    top:70px;
    right:0;
    background:var(--primary);
    flex-direction:column;
    width:100%;
  }
  nav ul.show{display:flex}
  nav li{margin:15px 0}
  .menu-btn{display:block}
}
/* ===== SERVICES WITH MODAL ===== */
.service-card{
  background:#fff;
  border-radius:10px;
  overflow:hidden;
  box-shadow:0 6px 20px var(--shadow);
  transition:all .4s ease;
  animation:fadeUp .8s ease both;
}
.service-card:hover{
  transform:translateY(-8px);
  box-shadow:0 14px 35px var(--shadow);
}
.service-card img{
  width:100%;
  height:180px;
  object-fit:cover;
}
.service-card .content{
  padding:20px;
}
.service-card h3{
  margin:0 0 10px;
  color:var(--primary);
}
.service-card p{
  font-size:14px;
  color:#555;
}
.more-btn{
  margin-top:12px;
  display:inline-block;
  padding:8px 16px;
  background:var(--accent);
  color:#001f3f;
  font-weight:700;
  border-radius:4px;
  cursor:pointer;
}
/* ===== MODAL ===== */
.modal{
  position:fixed;
  inset:0;
  background:rgba(0,0,0,.6);
  display:none;
  align-items:center;
  justify-content:center;
  z-index:9999;
}
.modal.active{display:flex}
.modal-box{
  background:#fff;
  max-width:600px;
  width:90%;
  border-radius:10px;
  overflow:hidden;
  animation:zoomIn .4s ease;
}
.modal-box img{
  width:100%;
  height:250px;
  object-fit:cover;
}
.modal-content{
  padding:20px;
}
.modal-content h3{
  color:var(--primary);
}
.close-btn{
  position:absolute;
  top:15px;
  right:20px;
  font-size:26px;
  cursor:pointer;
}
/* ===== ANIMATIONS ===== */
@keyframes fadeUp{
  from{opacity:0;transform:translateY(40px)}
  to{opacity:1;transform:translateY(0)}
}
@keyframes zoomIn{
  from{transform:scale(.8);opacity:0}
  to{transform:scale(1);opacity:1}
}
/* FORCE CLOSE BUTTON ABOVE EVERYTHING */
.close-btn{
  position: fixed;
  top: 110px; /* adjust if needed */
  right: 40px;
  width: 42px;
  height: 42px;
  background: #00ffff;
  color: #001f3f;
  font-size: 26px;
  font-weight: 900;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 999999; /* ABOVE EVERYTHING */
  box-shadow: 0 6px 18px rgba(0,0,0,.45);
}
.close-btn:hover{
  background:#ff3b3b;
  color:#fff;
}
/* CONTACT STATIC INFO */
.contact-info{
  max-width:800px;
  margin:0 auto 40px;
  font-size:18px;
  line-height:1.8;
}
.contact-info p{
  margin-bottom:20px;
}
/* GOOGLE MAP */
.map-container{
  max-width:900px;
  margin:0 auto;
  border-radius:12px;
  overflow:hidden;
  box-shadow:0 10px 30px rgba(0,0,0,.4);
}
.map-container iframe{
  width:100%;
  height:380px;
  border:0;
}
/* ===== BEAUTIFUL FOOTER ===== */
.site-footer{
  background: linear-gradient(
    135deg,
    #001f3f 0%,
    #002f5f 50%,
    #001a33 100%
  );
  color:#ffffff;
  padding:60px 20px;
  text-align:center;
}
.footer-inner{
  max-width:1000px;
  margin:auto;
}
.site-footer h3{
  margin:0;
  font-size:28px;
  font-weight:900;
  letter-spacing:1px;
  color:#00ffff;
}
.footer-tagline{
  margin:10px 0 25px;
  font-size:15px;
  color:#ccefff;
  letter-spacing:.5px;
}
.footer-divider{
  width:80px;
  height:3px;
  background:#00ffff;
  margin:0 auto 25px;
  border-radius:10px;
}
.footer-copy{
  font-size:14px;
  color:#d0eaff;
  line-height:1.7;
}
/* ===== GALLERY SECTION ===== */
.gallery-subtitle{
  max-width:700px;
  margin:0 auto 50px;
  font-size:16px;
  color:#555;
}
.gallery-grid{
  max-width:1200px;
  margin:auto;
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(260px,1fr));
  gap:30px;
}
.gallery-card{
  position:relative;
  overflow:hidden;
  border-radius:12px;
  box-shadow:0 12px 30px rgba(0,0,0,.15);
  cursor:pointer;
  transform:translateY(30px);
  opacity:0;
  animation:galleryFade .8s ease forwards;
}
.gallery-card:nth-child(1){animation-delay:.1s}
.gallery-card:nth-child(2){animation-delay:.2s}
.gallery-card:nth-child(3){animation-delay:.3s}
.gallery-card:nth-child(4){animation-delay:.4s}
.gallery-card img{
  width:100%;
  height:220px;
  object-fit:cover;
  transition:transform .6s ease;
}
.gallery-overlay{
  position:absolute;
  inset:0;
  background:linear-gradient(
    to top,
    rgba(0,31,63,.85),
    rgba(0,31,63,.2)
  );
  display:flex;
  align-items:flex-end;
  padding:20px;
  opacity:0;
  transition:.4s ease;
}
.gallery-overlay span{
  color:#00ffff;
  font-weight:700;
  font-size:16px;
  letter-spacing:.5px;
}
.gallery-card:hover img{
  transform:scale(1.12);
}
.gallery-card:hover .gallery-overlay{
  opacity:1;
}
/* Entrance animation */
@keyframes galleryFade{
  from{
    opacity:0;
    transform:translateY(40px);
  }
  to{
    opacity:1;
    transform:translateY(0);
  }
}
.wave.flip{
  transform: rotate(180deg) scaleX(1);
}
.wave{
  height:120px;
  background: radial-gradient(
    120% 120% at 50% 0%,
    transparent 60%,
    #001f3f 61%
  );
}


