/* ROOT VARIABLES */
:root {
  --bg: #fff;
  --fg: #E88C00;
  --accent: #0000ff;
  --panel: #f4f4f4;
  --max-width: 1200px;
  --nav-height: 72px;
  --transition: .3s ease;
}

/* GLOBAL STYLES */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  overflow-x: hidden; /* Prevent horizontal scroll */
  font-family: "Poppins", sans-serif;
  background: var(--bg);
  color: var(--fg);
  line-height: 1.5;
  scroll-behavior: smooth;
}

.container {
  width: 92%;
  max-width: var(--max-width);
  margin: 0 auto;
  box-sizing: border-box;
  /* Ensure no overflow */
}

/* NAVBAR */
.navbar {
  background: #0a0a0a;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-height);
  display: flex;
  align-items: center;
  z-index: 1200;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .12);
  padding: 0 16px; /* small horizontal padding */
}

.nav-inner {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  color: #fff;
  text-decoration: none;
}

.logo-img {
  height: 36px;
  transition: transform var(--transition);
}

.logo:hover .logo-img {
  transform: scale(1.05);
}

.nav-list {
  display: flex;
  gap: 22px;
  list-style: none;
  transition: transform var(--transition);
}

.nav-list li a {
  color: var(--fg);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  transition: color var(--transition);
}

.nav-list li a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}

.nav-list li a:hover {
  color: var(--accent);
}

.nav-list li a:hover::after {
  width: 100%;
}

/* Dropdown */
.dropdown {
  position: relative;
}

.dropdown-menu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #0a0a0a;
  padding: 10px 0;
  border-radius: 6px;
  min-width: 180px;
  z-index: 1300;
}

.dropdown-menu li a {
  display: block;
  padding: 8px 16px;
  color: #fff;
  text-decoration: none;
  transition: background var(--transition);
}

.dropdown-menu li a:hover {
  background: var(--accent);
  color: #fff;
}

.dropdown:hover .dropdown-menu {
  display: block;
}

/* Hamburger Toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--g);
  font-size: 1.8rem;
  cursor: pointer;
  transition: color var(--transition);
}

.nav-toggle.active {
  color: var(--accent);
}

/* MOBILE NAV */
@media (max-width: 700px) {
  .nav-toggle {
    display: block;
  }

  .nav-list {
    position: fixed;
    top: var(--nav-height);
    left: -100%;
    height: calc(100% - var(--nav-height));
    width: 250px;
    background: #0a0a0a;
    flex-direction: column;
    padding-top: 20px;
    transition: left var(--transition);
    gap: 14px;
    z-index: 1000;
    overflow-y: auto;
  }

  .nav-list.active {
    left: 0;
  }

  .nav-list li a {
    padding: 12px 24px;
    display: block;
    color: var(--bg);
    font-weight: 600;
  }

  .dropdown-menu {
    position: relative;
    top: 0;
    left: 0;
    background: transparent;
    box-shadow: none;
    padding: 0;
    display: none;
  }

  .dropdown.open .dropdown-menu {
    display: block;
  }
}

/* HERO SECTION */
.hero-section-web {
  padding-top: var(--nav-height);
  text-align: left;
  background: linear-gradient(rgba(0, 0, 0, .3), rgba(0, 0, 0, .5)), url("/images/hero-web.jpg");
  background-size: cover;
  background-position: center;
  color: #fff;
  min-height: 90vh;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 16px;
  padding-right: 16px;
  box-sizing: border-box;
  overflow: hidden;
}

.hero-inner {
  max-width: 100%;
  margin: 0 auto;
  padding: 40px 20px;
  opacity: 0;
  transform: translateY(30px);
  animation: fadeIn 1s forwards;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 8px;
}

.hero-title {
  font-size: clamp(24px, 6vw, 48px);
  font-weight: 900;
  margin-bottom: 20px;
}

.hero-lead {
  font-size: clamp(14px, 4vw, 18px);
  font-weight: 300;
  margin-bottom: 30px;
  color: #e6e8ee;
  line-height: 1.4;
}

.cta {
  display: inline-block;
  background: #0033ff;
  color: #fff;
  padding: 12px 28px;
  font-weight: 600;
  border-radius: 8px;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transition: background 0.25s;
  white-space: nowrap;
}

.cta:hover {
  background: #0050ff;
}

/* PROJECT CARDS */
.projects-container {
  margin-top: 50px;
}

.projects-title {
  text-align: center;
  font-size: 28px;
  margin-bottom: 40px;
  font-weight: 700;
  padding: 0 16px;
}

.project-card {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  background: var(--panel);
  margin-bottom: 40px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .1);
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .6s, transform .6s;
  max-width: 100%; /* prevent overflow */
  box-sizing: border-box;
}

.project-card img {
  flex: 1 1 320px;
  width: 100%;
  object-fit: cover;
  max-width: 100%;
  height: auto;
  display: block;
}

.project-info {
  flex: 1 1 320px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-sizing: border-box;
}

.project-info h3 {
  margin-bottom: 12px;
  font-weight: 600;
  word-wrap: break-word;
}

.project-info p {
  color: #555;
  margin-bottom: 16px;
}

.project-info .view-more {
  display: inline-block;
  padding: 10px 20px;
  background: var(--fg);
  color: #fff;
  text-decoration: none;
  border-radius: 6px;
  transition: transform .3s, background .3s;
  white-space: nowrap;
}

.project-info .view-more:hover {
  transform: translateY(-2px);
  background: #E88C00;
}

/* CTA SECTION */
.cta-section {
  text-align: center;
  padding: 72px 20px;
  background: var(--panel);
}

.cta-section h2 {
  font-size: 28px;
  margin-bottom: 16px;
}

.cta-section p {
  max-width: 600px;
  margin: 0 auto 20px;
  color: #555;
  padding: 0 10px;
  box-sizing: border-box;
}

/* FOOTER */
.site-footer {
  background: var(--fg);
  color: #fff;
  padding: 48px 20px 26px;
  margin-top: 40px;
  font-size: 14px;
  box-sizing: border-box;
}

.footer-top {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(3, minmax(160px, 1fr));
  gap: 32px;
  padding: 0 10px;
  box-sizing: border-box;
}

.footer-logo {
  font-weight: 900;
  font-size: 1.2rem;
  margin-bottom: 10px;
  display: block;
}

.footer-desc {
  color: #f0f0f0;
  line-height: 1.6;
  margin-bottom: 12px;
}

.footer-links h4 {
  margin-bottom: 12px;
  font-weight: 700;
}

.footer-links ul {
  list-style: none;
  padding-left: 0;
}

.footer-links ul li {
  margin-bottom: 6px;
}

.footer-links ul li a {
  color: #fff;
  text-decoration: none;
  transition: color var(--transition);
}

.footer-links ul li a:hover {
  color: var(--accent);
}

.footer-bottom {
  margin-top: 28px;
  border-top: 1px solid rgba(255, 255, 255, .2);
  padding-top: 16px;
  text-align: center;
  font-size: 1rem;
}

.socials {
  display: flex;
  gap: 14px;
}

.socials a {
  color: #fff;
  text-decoration: none;
  transition: color var(--transition);
}

.socials a:hover {
  color: var(--accent);
  transform: translateY(-2px);
}

/* WHATSAPP FLOAT */
.whatsapp-float {
  position: fixed;
  bottom: 22px;
  right: 22px;
  width: 56px;
  height: 56px;
  background: #25D366;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  z-index: 1500;
  cursor: pointer;
  box-shadow: 0 15px 35px rgba(0, 0, 0, .35);
  transition: transform .3s ease, box-shadow .3s ease;
}

.whatsapp-float:hover {
  transform: translateY(-6px) scale(1.05);
  box-shadow: 0 20px 45px rgba(0, 0, 0, .45);
}

/* ANIMATIONS */
@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: translateY(20px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeLeft {
  0% {
    opacity: 0;
    transform: translateX(-50px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeRight {
  0% {
    opacity: 0;
    transform: translateX(50px);
  }

  100% {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-left {
  animation: fadeLeft 1s forwards;
}

.animate-fade-right {
  animation: fadeRight 1s forwards;
}

.animate-fade-up {
  animation: fadeUp 1s forwards;
}

/* RESPONSIVENESS */
@media (max-width: 700px) {
  .project-card {
    flex-direction: column;
  }

  .project-card img,
  .project-info {
    flex: 1 1 100%;
  }

  .hero-inner {
    padding: 60px 20px;
  }

  .hero-title {
    font-size: clamp(24px, 5vw, 36px);
    text-align: center;
  }

  .hero-lead {
    font-size: 1rem;
    margin-bottom: 20px;
    text-align: center;
  }

  .cta,
  .view-more {
    width: 100%;
    text-align: center;
  }

  .footer-top {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}
