@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600&display=swap");

:root {
  /**
   * colors
   */
  --raw-seinna: hsl(24, 74%, 58%);
  --sizzling-sunrise: hsl(0, 91%, 70%);
  --scarlet: hsl(13, 96%, 47%);
  --black: hsla(191, 13%, 60%, 0.993);
  --white: #eff8e2;

  /**
   * typography
   */
  --ff-saira-stencil-one: "Saira Stencil One", sans-serif; 
  --ff-poppins: 'Poppins', sans-serif;
  --ff-roboto: 'Roboto', sans-serif;
  --ff-courier: 'Courier New', Courier, monospace;

  --fs-1: 2rem;
  --fs-2: calc(1.813rem + 1vw);
  --fs-3: calc(1.313rem + 1vw);
  --fs-4: 1.4rem;
  --fs-5: 1rem;
  --fs-6: 0.813rem;
  --fs-7: 0.75rem;

  --fw-400: 400;
  --fw-700: 700;

  /**
   * transition
   */
  --transition-1: 0.25s ease-in-out;

  /**
   * spacing
   */
  --section-padding: 80px;

  /**
   * radius
   */
  --radius-4: 4px;
  --radius-12: 12px;
}

/*-----------------------------------*\
 * #THEME COLORS
\*-----------------------------------*/

body.dark_theme {
  --bg-primary: var(--black);
  --bg-secondary: var(--black);
  --color-primary: hsl(103, 41%, 69%);
  --color-secondary: hsl(0, 0%, 62%);
  --card-shadow: hsla(0, 0%, 0%, 0.4);
  --input-bg: hsl(0, 0%, 16%);
  --shadow-1: 10px 10px 40px var(--card-shadow);
  --header-bg: #555555;
  --dropdown-bg: #222;
  --dropdown-text: hsl(103, 41%, 69%);
  --dropdown-border: #444;
}

body.light_theme {
  --bg-primary: hsl(0, 0%, 90%);
  --bg-secondary: hsl(32, 89%, 82%);
  --color-primary: hsl(0, 0%, 12%);
  --color-secondary: hsl(0, 0%, 37%);
  --card-shadow: hsla(0, 0%, 0%, 0.1);
  --input-bg: hsl(0, 0%, 93%);
  --shadow-1: 10px 10px 40px var(--card-shadow);
  --header-bg: #fff;
  --dropdown-bg: #fff;
  --dropdown-text: hsl(0, 0%, 12%);
  --dropdown-border: #ddd;
}

/*-----------------------------------*\
 * #RESET
\*-----------------------------------*/

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

li { list-style: none; }

a { text-decoration: none; }

a,
img,
time,
span,
input,
label,
select,
button,
textarea,
ion-icon { display: block; }

input,
button,
select,
textarea {
  background: none;
  border: none;
  font: inherit;
}

button,
select { cursor: pointer; }

input,
textarea { width: 100%; }

ion-icon { pointer-events: none; }

:is(a, button, select) {
  outline-color: var(--scarlet);
  outline-offset: 3px;
}

::selection {
  background: var(--color-primary);
  color: var(--bg-primary);
}

html {
  font-family: var(--ff-roboto);
  scroll-behavior: smooth;
}

/* Essential for sticky footer */
html, body {
  height: 100%;
  min-height: 100%;
}

body {
  background: var(--bg-primary);
  transition: var(--transition-1);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Page wrapper takes full viewport height */
.page-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Main content area that can grow to push footer down */
.main-content {
  flex-grow: 1;
}

body.active { overflow: hidden; }

/*-----------------------------------*\
 * #REUSED STYLE
\*-----------------------------------*/

/* General container */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
  box-sizing: border-box;
}

.h1 {
  font-size: var(--fs-1);
  line-height: 1.2;
  font-weight: 400;
}

.h2,
.h3,
.h4 {
  color: var(--color-primary);
  font-family: var(--ff-poppins);
  line-height: 1.2;
}

.h2 { font-size: var(--fs-2); }
.h3 { font-size: var(--fs-3); }
.h4 { font-size: var(--fs-5); }
.w-100 { width: 100%; }

.btn {
  max-width: max-content;
  color: var(--color-primary);
  font-weight: var(--fw-700);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 10px 25px;
  border: 1px solid transparent;
  border-radius: var(--radius-4);
  transition: var(--transition-1);
}

.btn-primary { border-color: var(--color-primary); }

.btn-primary:is(:hover, :focus) {
  background: var(--color-primary);
  color: var(--bg-primary);
}

.btn-secondary {
  background: var(--raw-seinna);
  border-color: var(--raw-seinna);
  color: var(--black);
}

.btn-secondary:is(:hover, :focus) { --raw-seinna: hsl(24, 74%, 64%); }

.section-subtitle {
  position: relative;
  color: var(--color-secondary);
  text-transform: uppercase;
  padding-bottom: 5px;
  margin-bottom: 20px;
}

.section-subtitle::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 0;
  width: 60px;
  height: 2px;
  background: var(--color-secondary);
}

.section-title {
  max-width: 350px;
  margin-bottom: 30px;
}

.section-text {
  color: var(--color-secondary);
  line-height: 1.8;
  margin-bottom: 30px;
}

/*-----------------------------------*\
 * #HEADER
\*-----------------------------------*/

.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  background: var(--header-bg);
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  padding-block: 15px;
  transition: var(--transition-1);
}

.header.active {
  padding-block: 12px;
  background: var(--bg-secondary);
  box-shadow: var(--shadow-1);
}

.header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}

.logo {
  position: relative;
  min-width: 77px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.logo a {
  color: var(--color-primary);
  font-family: var(--ff-saira-stencil-one);
}

.logo span {
  display: inline-block;
  color: var(--raw-seinna);
  margin-left: 2px;
}

.logo-img {
  max-width: 60px;
  height: auto;
  display: block;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-left: auto;
}

.navbar-actions select {
  color: var(--color-primary);
  width: 60px;
  height: 40px;
  border-radius: 20px;
  font-size: var(--fs-5);
  padding: 5px;
  background-color: var(--bg-secondary);
  border: 1px solid var(--color-secondary);
  cursor: pointer;
  transition: all 0.3s ease;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg fill='gray' height='24' viewBox='0 0 24 24' width='24' xmlns='http://www.w3.org/2000/svg'><path d='M7 10l5 5 5-5z'/></svg>");
  background-repeat: no-repeat;
  background-position: right 5px top 50%;
  text-align: center;
  padding-right: 15px;
}

.navbar-actions select:hover {
  border-color: var(--raw-seinna);
}

.navbar-actions option {
  background: var(--bg-primary);
  color: var(--color-primary);
  padding: 10px;
}

.theme-btn {
  padding: 4px;
  width: 48px;
  background: var(--bg-secondary);
  border-radius: 100px;
  transition: var(--transition-1);
  cursor: pointer;
  border: 1px solid var(--color-secondary);
}

.header.active .theme-btn { background: var(--bg-primary); }

.theme-btn .icon {
  position: relative;
  left: 0;
  width: 20px;
  height: 20px;
  border-radius: 50px;
  box-shadow: inset 9px -6px var(--color-primary);
  transition: var(--transition-1);
  transform: translateX(0);
}

.theme-btn.active .icon {
  left: 20px;
  box-shadow: inset 20px -20px var(--sizzling-sunrise);
  transform: translateX(4px);
}

.nav-toggle-btn {
  position: relative;
  transform: rotate(-55deg);
  transition: var(--transition-1);
  z-index: 2;
}

.nav-toggle-btn.active { transform: rotate(-45deg); }

.nav-toggle-btn span {
  width: 20px;
  height: 2px;
  background: var(--color-primary);
  margin: 5px;
  transition: var(--transition-1);
}

.nav-toggle-btn :is(.one, .three) { width: 10px; }

.nav-toggle-btn .one {
  margin-left: auto;
  transform-origin: left;
}

.nav-toggle-btn .three { transform-origin: right; }

.nav-toggle-btn.active .one { transform: rotate(90deg) translateX(-3px); }
.nav-toggle-btn.active .three { transform: rotate(90deg) translateX(3px); }

.navbar {
  position: fixed;
  background: var(--bg-secondary);
  top: 100%;
  left: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  visibility: hidden;
  transition: 0.75s cubic-bezier(0.71, 0.01, 0.24, 0.99);
  transition-delay: 0.5s;
  z-index: 1;
}

.navbar.active {
  top: 0;
  visibility: visible;
  transition-delay: 0s;
}

.navbar-list > li {
  margin-block: 20px;
  padding-inline: 50px;
  overflow: hidden;
}

.navbar-link {
  position: relative;
  width: max-content;
  margin-inline: auto;
  color: var(--color-primary);
  font-family: var(--ff-poppins);
  font-size: var(--fs-1);
  padding: 10px;
  transition: color var(--transition-1);
}

.navbar-link:is(:hover, :focus) {
  color: var(--raw-seinna);
}

/* HERO SECTION */
.hero {
  position: relative;
  width: 100%;
  min-height: 60vh;
  margin-top: 100px;
  background: url("../img/work on.png") no-repeat center top/cover;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--color-primary, #222);
  border: 5px solid var(--raw-seinna, #ffb366);
  box-sizing: border-box;
  padding: 2rem 1rem;
}

.hero h1 {
  font-size: 2.5rem;
  margin-bottom: 0.5em;
}

.hero p {
  font-size: 1.2rem;
  margin-bottom: 1em;
}

.cta-button {
  padding: 10px 24px;
  font-size: 1rem;
  border-radius: 24px;
  background: var(--raw-seinna, #ffb366);
  color: #fff;
  border: none;
  cursor: pointer;
  transition: background 0.2s;
}

.cta-button:hover {
  background: var(--sizzling-sunrise, #ffe066);
  color: var(--black, #222);
}

/* SERVICES SECTION */
.services {
  padding: 40px 0;
  text-align: center;
  font-family: var(--ff-courier);
}

.services-container {
  display: flex;
  width: 100%;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.services-box {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  width: 30%;
  min-width: 220px;
  height: 250px;
  background: var(--color-white, #fff);
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  margin-bottom: 20px;
  transition: box-shadow 0.3s;
  color: var(--color-primary);
}

.services-box > i {
  font-size: 50px;
  color: #C8DBD7;
  margin-bottom: 25px;
}

.services-box h3 {
  font-family: var(--ff-courier);
}

.services-box p {
  color: var(--color-secondary);
  font-family: var(--ff-courier);
}

.service-overlay {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: #C8DBD7;
  color: #fff;
  font-family: var(--ff-courier);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(100%);
  transition: opacity 0.3s, transform 0.4s;
  font-size: 1.1rem;
  z-index: 2;
  text-align: center;
  padding: 20px;
}

.services-box:hover .service-overlay,
.services-box:focus .service-overlay,
.services-box.active .service-overlay {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.services-box:hover > :not(.service-overlay),
.services-box:focus > :not(.service-overlay),
.services-box.active > :not(.service-overlay) {
  opacity: 0.2;
  transition: opacity 0.3s;
}

/* CONTACT SECTION */
.contact {
  width: 100%;
  padding: 40px 0;
  box-sizing: border-box;
  text-align: center;
  font-family: var(--ff-courier);
}

.contact .section-subtitle,
.contact .section-title,
.contact .section-text,
.contact label,
.contact button {
  font-family: var(--ff-courier);
}

body.dark_theme .contact .section-subtitle,
body.dark_theme .contact .section-title,
body.dark_theme .contact .section-text,
body.dark_theme .contact label,
body.dark_theme .contact button {
  color: var(--color-primary);
}

.contact-content {
  max-width: 800px;
  margin: 0 auto;
}

.contact-form {
  width: 100%;
  max-width: 500px;
  margin: 0 auto;
}

.form-wrapper {
  margin-bottom: 20px;
  text-align: left;
}

.form-label {
  display: block;
  margin-bottom: 8px;
  color: var(--color-primary);
}

.input-field,
textarea.input-field {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid #ccc;
  background-color: var(--input-bg);
  color: var(--color-primary);
  font-size: 1rem;
  box-sizing: border-box;
  font-family: var(--ff-courier);
}

/* FOOTER - FIXED VERSION */
.footer {
  background-color: transparent;
  color: var(--color-primary);
  text-align: center;
  padding: 24px 0;
  margin-top: auto;
}

.footer p,
.footer .copyright {
  color: var(--color-primary);
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
}

.footer a,
.footer .footer-link {
  color: var(--color-primary);
  text-decoration: none;
  font-weight: 700;
  display: inline;
}

.footer a:hover,
.footer a:focus {
  text-decoration: underline;
  color: var(--raw-seinna);
}

/* Explicitly set dark theme footer colors */
body.dark_theme .footer,
body.dark_theme .footer p,
body.dark_theme .footer a {
  color: hsl(103, 41%, 69%);
}

/* Responsive adjustments */
@media (max-width: 992px) {
  .navbar-list {
    gap: 12px;
  }
  
  .services-container {
    flex-direction: column;
    align-items: center;
  }
  
  .services-box {
    width: 80%;
  }
  
  .hero {
    min-height: 50vh;
    margin-top: 80px;
    padding: 1.5rem 0.5rem;
    border-width: 4px;
  }
  
  .hero h1 {
    font-size: 2rem;
  }
}

@media (max-width: 768px) {
  .header .container {
    padding-inline: 12px;
  }
  
  #home {
    height: 70vh;
    background-position: center;
  }
}

@media (max-width: 600px) {
  .container {
    padding-inline: 8px;
  }
  
  .hero {
    min-height: 40vh;
    margin-top: 60px;
    padding: 1rem 0.5rem;
    border-width: 3px;
  }
  
  .hero h1 {
    font-size: 1.3rem;
  }
  
  .hero p {
    font-size: 1rem;
  }
  
  .cta-button {
    padding: 8px 16px;
    font-size: 1rem;
  }
  
  .services-box {
    width: 90%;
  }
}

/* Make images responsive */
img {
  max-width: 100%;
  height: auto;
  display: block;
}
