/* GLOBAL */

:root {
    --primary-color: #04a6d6;
}

body {
    font-family: 'Montserrat', sans-serif;
    margin: 0;
    background: linear-gradient(#eef5ff, #ffffff);
    color: #1d2a3a;
}

.container {
    width: 90%;
    max-width: 1300px;
    margin: auto;
}

/* LOGO */
.logo-center img {
    width: 500px;
    display: block;
    margin: 70px auto 40px;
}

/* HEADINGS */
h2 {
    text-align: center;
    font-size: 34px;
    font-weight: 700;
    margin-bottom: 50px;
    margin-top: 80px;
}

/* ABOUT TEXT */
.about-developer p {
    text-align: center !important;
    max-width: 900px;
    margin: auto;
    line-height: 1.8;
    font-size: 16px;
    opacity: 0.85;
}

/* STATS */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    text-align: center;
    gap: 18px;
    margin: 25px 35px;
}

.stat-box {
    background: #ffffff;
    border: 1px solid #d5e1f5;
    border-radius: 14px;
    padding: 22px 10px;
    text-align: center;
    transition: 0.3s;
    line-height: 180%;
}

.stat-box:hover {
    box-shadow: 0px 6px 18px rgba(0, 53, 124, 0.15);
}

.stat-box span {
    font-size: 26px;
    font-weight: 700;
    color: var(--primary-color);
}

/* PROJECT CARDS */
.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.project-card {
    background: #fff;
    border-radius: 14px;
    overflow: hidden;
    transition: 0.35s;
    display: flex;
    flex-direction: column;
    box-shadow: 0px 5px 18px rgba(0,0,0,0.06);
}

.project-card:hover {
    box-shadow: 0px 12px 28px rgba(0,0,0,0.25);
}

.img-box {
    height: 240px;
    overflow: hidden;
    position: relative;
}

.img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .6s ease; /* smooth zoom */
}

/* Zoom effect on hover */
.project-card:hover .img-box img {
    transform: scale(1.08);
}

/* NEW LAUNCH TAG */
.tag {
    position: absolute;
    top: 12px;
    right: 12px;
    background: var(--primary-color);
    color: #fff;
    padding: 6px 12px;
    font-size: 12px;
    border-radius: 6px;
}

/* CARD CONTENT */
.content {
    padding: 18px 20px;
}

.content h3 {
    margin: 4px 0;
    font-size: 20px;
    color: var(--primary-color);
}

.content p {
    margin: 2px 0 10px;
    opacity: 0.8;
}

.content ul {
    list-style: none;
    padding-left: 0;
    opacity: 0.85;
    line-height: 1.6;
    font-size: 14px;
}

/* KNOW MORE BUTTON */
.know-btn {
    margin-top: auto;
    display: inline-block;
    background: var(--primary-color);
    color: #fff;
    text-align: center;
    padding: 12px 15px;
    width: calc(100% - 30px);
    border-radius: 8px;
    cursor: pointer;
    transition: 0.3s;
    font-weight: 600;
    margin: 12px 10px 20px 0px;
}

.know-btn:hover {
    background: color-mix(in srgb, var(--primary-color) 80%, #000 20%);
}

/* FOOTER */
.disclaimer {
    font-size: 11px;
    text-align: center;
    padding: 18px;
    background: #eef5ff;
    opacity: 0.8;
}

/* RESPONSIVE */
@media(max-width: 992px){
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .stats {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media(max-width: 600px){
    .project-grid {
        grid-template-columns: 1fr;
    }
    .stats {
        grid-template-columns: 1fr;
    }
    .logo-center img {
        width: 200px;
    }
}

/* Prevent any accidental horizontal scroll on the base page */
html,body{
  margin:0;
  padding:0;
  box-sizing:border-box;
  overflow-x:hidden; /* important: stop right-scroll */
  -webkit-text-size-adjust:100%;
}

/* ---------- BACKDROP / LAYOUT ---------- */
.popup {
  position: fixed;
  inset: 0;
  display: none;
  justify-content: center;
  align-items: center;            /* center vertically by default */
  background: rgba(10,20,30,0.65);
  backdrop-filter: blur(6px);
  z-index: 9999;
  padding: 28px;                  /* keeps gap around popup */
  box-sizing: border-box;
}

/* ensure no horizontal overflow caused by shadows etc. */
.popup.active {
  display: flex;
  overflow-x: hidden;
  overflow-y: auto;               /* allow vertical scroll if viewport is tiny */
  -webkit-overflow-scrolling: touch;
}

/* ---------- INNER BOX ---------- */
.popup-inner {
  width: 100%;
  max-width: 460px;                      /* slightly wider on desktop */
  background: #fff;
  border-radius: 14px;
  padding: 26px 24px;
  position: relative;
  box-shadow: 0 14px 48px rgba(0,0,0,0.24);
  font-family: "Montserrat", sans-serif;
  transform: translateY(0);
  animation: popIn .28s cubic-bezier(.2,.9,.3,1);
  box-sizing: border-box;

  /* IMPORTANT: size and scrolling */
  max-height: calc(100vh - 120px);      /* keep 60px gap top & bottom on tall viewports */
  overflow-y: auto;                     /* scroll inside popup if content too tall */
  overflow-x: hidden;                   /* never horizontal scroll inside popup */
  -webkit-overflow-scrolling: touch;
}

/* small visual padding at edges so scrolled content isn't flush to corners */
.popup-inner:focus { outline: none; }

/* ---------- TITLE ---------- */
.popup-inner h2 {
  margin: 0 0 18px 0;
  padding: 0;
  text-align: center;
  font-size: 20px;
  font-weight: 600;
  color: #0b2540;
  line-height: 1.1;
}

/* ---------- FORM ---------- */
.form-group { margin-bottom: 14px; }
.form-control {
  width: 100%;
  background: #f8fbfc;
  border: 2px solid #e7edf2;
  border-radius: 8px;
  padding: 12px 14px;
  font-size: 16px;            /* 16px prevents mobile auto-zoom */
  outline: none;
  transition: border-color .18s ease, box-shadow .18s ease;
  box-sizing: border-box;
}
.form-control:focus {
  border-color: var(--primary-color);
  background: #fff;
  box-shadow: 0 10px 30px rgba(4,166,214,0.06);
}

/* textarea */
textarea.form-control { min-height: 86px; resize: none; }

/* small error text */
.text-danger { font-size: 12px; color: #d23f4a; margin-top: 6px; display:block; }

/* checkbox row */
.ckbox { display:flex; gap:8px; align-items:flex-start; margin-top:6px; }
.ckbox input { width:18px; height:18px; margin-top:3px; accent-color:var(--primary-color); }
.ckbox span { font-size:13px; color:#555; line-height:1.3; }

/* submit */
.btns2 {
  display:inline-block;
  width:100%;
  padding:12px;
  font-size:15px;
  font-weight:700;
  color:#fff;
  background:var(--primary-color);
  border-radius:10px;
  border:none;
  cursor:pointer;
  box-shadow: 0 8px 22px rgba(0,120,212,0.18);
  transition: transform .12s ease, box-shadow .12s ease;
}
.btns2:hover { transform: translateY(-2px); box-shadow:0 12px 30px rgba(0,120,212,0.22); }

/* ---------- CLOSE BUTTON - perfectly centered in circle ---------- */
.popup-close {
  position:absolute;
  top:14px;
  right:14px;
  width:36px;
  height:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:50%;
  background: rgba(0,0,0,0.05);
  color:#222;
  font-weight:700;
  font-size:18px;
  text-decoration:none;
  cursor:pointer;
  box-sizing:border-box;
}
.popup-close:hover { background: rgba(0,0,0,0.09); color:var(--primary-color); transform:scale(1.03); }

/* ---------- ANIMATION ---------- */
@keyframes popIn {
  from { transform: translateY(10px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

/* ---------- RESPONSIVE TWEAKS ---------- */
@media (max-width: 900px) {
  .popup-inner { max-width: 420px; max-height: calc(100vh - 96px); padding:22px; }
}

@media (max-width: 600px) {
  .popup { padding:18px; }
  .popup-inner {
    max-width: 96%;
    border-radius: 12px;
    padding:18px;
    max-height: calc(100vh - 80px); /* keep comfortable gap for mobile status bar / controls */
  }
  .popup-inner h2 { font-size:18px; margin-bottom:14px; }
  .form-control { font-size:16px; padding:12px; }
  textarea.form-control { min-height:70px; }
  .popup-close { top:10px; right:10px; width:32px; height:32px; font-size:16px; }
}

/* VERY SMALL DEVICES - ensure internal scrolling works smoothly */
@media (max-height: 500px) and (orientation: portrait) {
  .popup { align-items: flex-start; padding-top:12px; padding-bottom:12px; }
  .popup-inner { margin-top: 12px; max-height: calc(100vh - 48px); }
}

.know-btn {
    text-decoration: none;
}

.know-btn:hover {
    text-decoration: none;
}
