/* ====================================
   eSiteCraft – Polished Blue Theme
   ==================================== */

:root {
  --bg-main: #C9D6DE;
  --text: #1E2A32;
  --accent1: #3A6EA5;
  --accent2: #6BA8D1;
  --white: #ffffff;
  --blue-dark: #003087;
  --blue-bright: #2196F3;
}

/* ----------------------------
   Base Styles
----------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

h1, h2, h3, h4, p, a, li, button, input, textarea, label, span, div {
  font-family: 'Poppins', sans-serif !important;
}

body {
  background-color: var(--bg-main);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  font-size: 1rem;
}

a {
  color: inherit;
  text-decoration: none;
  scroll-behavior: smooth;
}

:target {
  scroll-margin-top: 80px;
}

/* ----------------------------
   Header
----------------------------- */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: var(--white);
  padding: 20px 40px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
  position: sticky;
  top: 0;
  z-index: 1000;
  border-bottom: 4px solid var(--accent1);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo {
  height: 60px;
  width: 60px;
  object-fit: contain;
}

.sitename {
  font-size: 1.75rem;
  font-weight: 500;
  color: var(--accent1);
}

nav {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  max-width: 100%;
}

nav a {
  margin-left: 20px;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  transition: color 0.3s ease;
}

nav a:hover {
  color: var(--accent1);
}

/* ----------------------------
   Section Layout
----------------------------- */
section {
  max-width: 1100px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* ----------------------------
   Hero
----------------------------- */
.hero {
  text-align: center;
  padding: 60px 20px;
}

.hero h1 {
  font-size: 2rem;
  color: var(--accent1);
  margin-bottom: 20px;
}

.hero p {
  max-width: 650px;
  margin: 0 auto 25px;
  font-size: 1.05em;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  border-radius: 4px;
  background-color: var(--accent1);
  color: var(--white);
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  font-size: 1em;
  transition: background 0.3s ease, transform 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: var(--accent2);
  transform: translateY(-2px);
}

/* ----------------------------
   About
----------------------------- */
.about {
  background-color: var(--white);
  border-radius: 8px;
  text-align: center;
  padding: 60px 20px;
  position: relative;
  overflow: hidden;
}

.about::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(to top, rgba(255, 255, 255, 0.9), transparent);
  z-index: 1;
}

.about > * {
  position: relative;
  z-index: 2;
}

.about h2 {
  color: var(--accent1);
  font-size: 2em;
  margin-bottom: 20px;
}

.about p {
  max-width: 800px;
  margin: 0 auto 20px;
  font-size: 1.05em;
  line-height: 1.8;
}

/* ----------------------------
   How It Works
----------------------------- */
.how {
  text-align: center;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.how::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.how > * {
  position: relative;
  z-index: 2;
}

.steps {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 30px;
  margin-top: 40px;
}

.step {
  background: var(--white);
  border-radius: 8px;
  border: none;
  border-left: 4px solid var(--accent1);
  width: 300px;
  padding: 25px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: all 0.25s ease;
}

.step:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 4px 12px rgba(58, 110, 165, 0.2);
}

.step img {
  width: 60px;
  margin-bottom: 15px;
}

.step h3 {
  margin-bottom: 10px;
  color: var(--accent1);
  font-size: 1.4em;
}

/* ----------------------------
   Portfolio
----------------------------- */
.portfolio {
  text-align: center;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.portfolio::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.portfolio > * {
  position: relative;
  z-index: 2;
}

.portfolio-grid {
  display: flex;
  justify-content: center;
  gap: 2rem;
  flex-wrap: wrap;
  margin-top: 30px;
}

.project {
  background: var(--white);
  border: none;
  border-left: 4px solid var(--accent1);
  border-radius: 8px;
  width: 360px;
  padding: 20px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
}

.project:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 4px 12px rgba(58, 110, 165, 0.2);
}

.project a {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  height: 100%;
}

.project img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.project img:hover {
  transform: scale(1.03);
}

.coming-soon {
  padding: 60px 0;
  font-weight: 600;
  color: var(--accent1);
  font-size: 1rem;
}

/* ----------------------------
   Packages
----------------------------- */
.packages {
  text-align: center;
  position: relative;
  border-radius: 8px;
  overflow: hidden;
}

.packages::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(255, 255, 255, 0.1);
  z-index: 1;
}

.packages > * {
  position: relative;
  z-index: 2;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem;
}

.card {
  background: var(--white);
  border-radius: 8px;
  border: none;
  border-left: 4px solid var(--accent1);
  padding: 25px;
  width: 300px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.08);
  transition: all 0.25s ease;
}

.card:hover {
  transform: translateY(-5px) scale(1.02);
  box-shadow: 0 4px 12px rgba(58, 110, 165, 0.2);
}

.card ul {
  text-align: left;
  margin: 15px 0;
  padding-left: 20px;
  list-style-type: disc;
}

.card li {
  margin-bottom: 8px;
}

.card h4 {
  color: var(--accent1);
  margin-top: 10px;
  font-size: 1.3em;
}

/* ----------------------------
   Contact
----------------------------- */
.cta {
  text-align: center;
  background-color: var(--accent1);
  color: var(--white);
  padding: 40px 20px 20px;
  border-radius: 8px;
  position: relative;
  background-image: url('contact-bg.jpg');
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgb(58, 110, 165);
  backdrop-filter: blur(8px);
  z-index: 1;
}

.cta::after {
  content: "Ready to launch your website? Start with a free consultation.";
  display: block;
  background: rgba(58, 110, 165, 0.1);
  padding: 15px;
  margin-top: 0;
  border-left: 4px solid var(--accent1);
  text-align: center;
  font-weight: 600;
  font-family: 'Poppins', sans-serif;
  z-index: 2;
}

.cta > * {
  position: relative;
  z-index: 2;
}

.cta h2 {
  color: var(--white);
  font-size: 2em;
  margin-bottom: 20px;
}

.cta p {
  max-width: 650px;
  margin: 0 auto 20px;
  font-size: 1.1em;
}

.contact-icons {
  display: flex;
  justify-content: center;
  gap: 35px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.contact-icons img {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.contact-icons img:hover {
  transform: scale(1.1);
}

.contact-form {
  max-width: 600px;
  margin: 20px auto 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
  position: relative;
}

.form-group {
  text-align: left;
  display: flex;
  flex-direction: column;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 5px;
  color: var(--white);
}

.form-group input,
.form-group textarea {
  padding: 12px;
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 4px;
  background: rgba(255,255,255,0.15);
  color: var(--white);
  font-size: 1rem;
  font-family: 'Poppins', sans-serif;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: rgba(255,255,255,0.7);
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--white);
  box-shadow: 0 0 5px var(--white);
}

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

/* Fallback if contact-bg.jpg is missing */
.cta {
  background-image: url('contact-bg.jpg'), linear-gradient(45deg, #3A6EA5, #6BA8D1);
}
.cta:where(:not(:has(*[src="contact-bg.jpg"]))) {
  background-image: linear-gradient(45deg, #3A6EA5, #6BA8D1);
}

.h-captcha {
  display: flex;
  justify-content: center;
  background-color: var(--white);
  border-radius: 8px;
  padding: 10px;
  margin-top: 5px;
}

.contact-details {
  font-size: 0.95em;
  text-align: center;
  margin: 10px 0 0;
  color: var(--white);
}

.contact-details a {
  color: var(--white);
  text-decoration: none;
}

.contact-details a:hover {
  text-decoration: underline;
}

.whatsapp-link img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
  vertical-align: middle;
}

.whatsapp-link img:hover {
  transform: scale(1.1);
}

/* ----------------------------
   Footer
----------------------------- */
footer {
  background: var(--blue-dark);
  color: var(--white);
  text-align: center;
  padding: 20px;
  font-size: 0.95em;
  border-top: 4px solid var(--accent1);
}

footer a {
  color: var(--blue-bright);
  font-weight: 500;
}

footer a:hover {
  text-decoration: underline;
}

/* ----------------------------
   Animations
----------------------------- */
.fade-in {
  opacity: 0;
  animation: fadeIn 1s ease forwards;
}

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

/* ----------------------------
   Responsive
----------------------------- */
@media (max-width: 768px) {
  .header {
    flex-direction: column;
    align-items: center;
    padding: 20px;
    gap: 10px;
    width: 100%;
    min-height: 100px;
    box-sizing: border-box;
  }

  nav {
    justify-content: center;
    max-width: 100%;
  }

  nav a {
    margin: 0 5px;
    font-size: 0.95rem;
  }

  .hero {
    padding: 60px 15px;
  }

  .hero h1 {
    font-size: 1.8em;
  }

  .steps,
  .cards,
  .portfolio-grid {
    flex-direction: column;
    align-items: center;
  }

  .step,
  .card,
  .project {
    width: 100%;
    max-width: 350px;
  }

  .cta {
    padding: 40px 15px 15px;
  }

  .contact-icons {
    gap: 25px;
  }

  .whatsapp-link {
    display: block;
    margin: 10px auto 0;
    text-align: center;
  }

  .whatsapp-link img {
    width: 50px;
    height: 50px;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.6em;
  }

  .btn {
    padding: 10px 22px;
    font-size: 0.95rem;
  }

  .contact-icons img {
    width: 50px;
    height: 50px;
  }

  .contact-details {
    font-size: 0.9rem;
  }

  footer {
    font-size: 0.9rem;
  }
}