/* ===== GOOGLE FONTS ===== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* ===== VARIABLES CSS ===== */
:root {
  --header-height: 3rem;

  /* ========== Colors ========== */
  --primary-color: #1e3a8a;
  --primary-color-alt: #1e40af;
  --accent-color: #10b981;
  --accent-color-alt: #059669;
  --white-color: #ffffff;
  --text-color: #374151;
  --text-color-light: #6b7280;
  --body-color: #f9fafb;
  --container-color: #ffffff;
  --border-color: #e5e7eb;
  --shadow-color: rgba(0, 0, 0, 0.1);

  /* ========== Font and typography ========== */
  --body-font: 'Poppins', sans-serif;
  --biggest-font-size: 2.5rem;
  --h1-font-size: 2.25rem;
  --h2-font-size: 1.5rem;
  --h3-font-size: 1.25rem;
  --normal-font-size: 1rem;
  --small-font-size: 0.875rem;
  --smaller-font-size: 0.813rem;

  /* ========== Font weight ========== */
  --font-light: 300;
  --font-normal: 400;
  --font-medium: 500;
  --font-semi-bold: 600;
  --font-bold: 700;

  /* ========== Margins Bottom ========== */
  --mb-0-25: 0.25rem;
  --mb-0-5: 0.5rem;
  --mb-0-75: 0.75rem;
  --mb-1: 1rem;
  --mb-1-5: 1.5rem;
  --mb-2: 2rem;
  --mb-2-5: 2.5rem;
  --mb-3: 3rem;

  /* ========== z index ========== */
  --z-tooltip: 10;
  --z-fixed: 100;
  --z-modal: 1000;
}

/* Font size for large devices */
@media screen and (min-width: 968px) {
  :root {
    --biggest-font-size: 3rem;
    --h1-font-size: 2.25rem;
    --h2-font-size: 1.5rem;
    --h3-font-size: 1.25rem;
    --normal-font-size: 1rem;
    --small-font-size: 0.875rem;
    --smaller-font-size: 0.813rem;
  }
}

/* ===== BASE ===== */
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0 0 var(--header-height) 0;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  background-color: var(--body-color);
  color: var(--text-color);
  line-height: 1.6;
}

h1, h2, h3, h4 {
  color: var(--primary-color);
  font-weight: var(--font-semi-bold);
}

ul {
  list-style: none;
}

a {
  text-decoration: none;
}

img {
  max-width: 100%;
  height: auto;
}

/* ===== REUSABLE CSS CLASSES ===== */
.container {
  max-width: 1200px;
  margin-left: var(--mb-1-5);
  margin-right: var(--mb-1-5);
}

.section {
  padding: 4rem 0 2rem;
}

.section__title {
  font-size: var(--h1-font-size);
  color: var(--primary-color);
  text-align: center;
  margin-bottom: var(--mb-3);
  position: relative;
}

.section__title::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
  border-radius: 2px;
}

.btn {
  display: inline-block;
  background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
  color: var(--white-color);
  padding: 1rem 2rem;
  border-radius: 0.5rem;
  font-weight: var(--font-medium);
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  text-align: center;
  box-shadow: 0 4px 15px rgba(30, 58, 138, 0.3);
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.4);
}

/* ===== HEADER & NAV ===== */
.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  z-index: var(--z-fixed);
  background-color: var(--white-color);
  box-shadow: 0 2px 10px var(--shadow-color);
  transition: all 0.3s ease;
}

.nav {
  height: var(--header-height);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.nav__logo {
  color: var(--primary-color);
  font-weight: var(--font-bold);
  font-size: var(--h3-font-size);
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo__text {
  font-weight: var(--font-bold);
  color: var(--primary-color);
  font-size: var(--h3-font-size);
}

.nav__list {
  display: flex;
  column-gap: 2rem;
}

.nav__link {
  color: var(--text-color);
  font-weight: var(--font-medium);
  transition: all 0.3s ease;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -0.5rem;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-color);
  transition: width 0.3s ease;
}

.nav__link:hover::after,
.nav__link.active::after {
  width: 100%;
}

.nav__link:hover,
.nav__link.active {
  color: var(--primary-color);
}

.nav__toggle,
.nav__close {
  display: none;
  cursor: pointer;
}

/* ===== HERO ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-color-alt) 100%);
  padding-top: calc(var(--header-height) + 2rem);
  min-height: 100vh;
  display: flex;
  align-items: center;
}

.hero__container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  align-items: center;
}

.hero__content {
  color: var(--white-color);
}

.hero__title {
  font-size: var(--biggest-font-size);
  color: var(--white-color);
  margin-bottom: var(--mb-1);
  line-height: 1.2;
}

.hero__subtitle {
  font-size: var(--h3-font-size);
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: var(--mb-2);
  font-weight: var(--font-light);
}

.hero__cta {
  background: var(--accent-color);
  color: var(--white-color);
  font-size: var(--normal-font-size);
}

.hero__cta:hover {
  background: var(--accent-color-alt);
  transform: translateY(-2px);
}

.hero__image {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero__image-wrapper {
  position: relative;
  width: 400px;
  height: 300px;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.hero__image-wrapper:hover .hero__img {
  transform: scale(1.05);
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, rgba(30, 58, 138, 0.3), rgba(16, 185, 129, 0.3));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.hero__image-wrapper:hover .hero__overlay {
  opacity: 1;
}

@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-20px); }
}

/* ===== ABOUT ===== */
.about {
  background-color: var(--white-color);
}

.about__container {
  text-align: center;
}

.about__description {
  font-size: var(--normal-font-size);
  color: var(--text-color-light);
  margin-bottom: var(--mb-2-5);
  line-height: 1.8;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.about__values {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-top: var(--mb-2);
}

.about__value {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background-color: var(--body-color);
  border-radius: 0.5rem;
  transition: all 0.3s ease;
}

.about__value:hover {
  transform: translateY(-5px);
  box-shadow: 0 10px 25px var(--shadow-color);
}

.about__value-icon {
  color: var(--accent-color);
  font-size: 1.5rem;
}

.about__value span {
  font-weight: var(--font-medium);
  color: var(--text-color);
}

/* ===== PRODUCTS ===== */
.products {
  background-color: var(--body-color);
}

.products__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2rem;
}

.product__card {
  background-color: var(--white-color);
  padding: 2rem;
  border-radius: 1rem;
  text-align: center;
  box-shadow: 0 4px 20px var(--shadow-color);
  transition: all 0.3s ease;
  border: 2px solid transparent;
  overflow: hidden;
}

.product__card:hover {
  transform: translateY(-10px);
  border-color: var(--accent-color);
  box-shadow: 0 10px 30px rgba(16, 185, 129, 0.2);
}

.product__image {
  width: 100%;
  height: 200px;
  margin-bottom: var(--mb-1);
  border-radius: 0.5rem;
  overflow: hidden;
}

.product__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.product__card:hover .product__img {
  transform: scale(1.1);
}

.product__icon {
  color: var(--accent-color);
  margin-bottom: var(--mb-1);
  display: inline-block;
  padding: 1rem;
  background-color: rgba(16, 185, 129, 0.1);
  border-radius: 50%;
}

.product__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
  color: var(--primary-color);
}

.product__description {
  color: var(--text-color-light);
  line-height: 1.6;
}

/* ===== TESTIMONIALS ===== */
.testimonials {
  background-color: var(--white-color);
}

.testimonials__container {
  position: relative;
  max-width: 800px;
  margin: 0 auto;
}

.testimonials__slider {
  position: relative;
  overflow: hidden;
  border-radius: 1rem;
}

.testimonial__card {
  background: linear-gradient(135deg, var(--primary-color), var(--primary-color-alt));
  padding: 3rem 2rem;
  border-radius: 1rem;
  text-align: center;
  color: var(--white-color);
  opacity: 0;
  transform: translateX(100%);
  transition: all 0.5s ease;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

.testimonial__card.active {
  opacity: 1;
  transform: translateX(0);
  position: relative;
}

.testimonial__text {
  font-size: var(--normal-font-size);
  line-height: 1.8;
  margin-bottom: var(--mb-2);
  font-style: italic;
}

.testimonial__name {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-0-25);
  color: var(--white-color);
}

.testimonial__position {
  font-size: var(--small-font-size);
  color: rgba(255, 255, 255, 0.8);
}

.testimonials__controls {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-top: var(--mb-2);
}

.testimonial__btn {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: none;
  background-color: var(--border-color);
  cursor: pointer;
  transition: all 0.3s ease;
}

.testimonial__btn.active {
  background-color: var(--accent-color);
  transform: scale(1.2);
}

/* ===== CONTACT ===== */
.contact {
  background-color: var(--body-color);
}

.contact__container {
  max-width: 600px;
  margin: 0 auto;
}

.contact__form {
  background-color: var(--white-color);
  padding: 2rem;
  border-radius: 1rem;
  box-shadow: 0 4px 20px var(--shadow-color);
}

.contact__group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: var(--mb-1-5);
}

.contact__input,
.contact__textarea {
  width: 100%;
  padding: 1rem;
  border: 2px solid var(--border-color);
  border-radius: 0.5rem;
  font-family: var(--body-font);
  font-size: var(--normal-font-size);
  transition: all 0.3s ease;
}

.contact__input:focus,
.contact__textarea:focus {
  outline: none;
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.contact__textarea {
  resize: vertical;
  margin-bottom: var(--mb-1-5);
}

.contact__btn {
  width: 100%;
  font-size: var(--normal-font-size);
}

/* ===== FOOTER ===== */
.footer {
  background-color: var(--primary-color);
  color: var(--white-color);
  padding: 2rem 0 1rem;
}

.footer__container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  margin-bottom: var(--mb-2);
}

.footer__logo {
  font-size: var(--h2-font-size);
  font-weight: var(--font-bold);
  margin-bottom: var(--mb-1);
}

.footer__description {
  color: rgba(255, 255, 255, 0.8);
  line-height: 1.6;
}

.footer__title {
  font-size: var(--h3-font-size);
  margin-bottom: var(--mb-1);
}

.footer__social-links {
  display: flex;
  gap: 1rem;
}

.footer__social-link {
  display: inline-flex;
  padding: 0.5rem;
  background-color: rgba(255, 255, 255, 0.1);
  border-radius: 0.5rem;
  color: var(--white-color);
  transition: all 0.3s ease;
}

.footer__social-link:hover {
  background-color: var(--accent-color);
  transform: translateY(-2px);
}

.footer__bottom {
  text-align: center;
  padding-top: var(--mb-2);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.8);
}

/* ===== RESPONSIVE ===== */
@media screen and (max-width: 968px) {
  .container {
    margin-left: var(--mb-1);
    margin-right: var(--mb-1);
  }

  .nav__menu {
    position: fixed;
    top: -100%;
    left: 0;
    width: 100%;
    background-color: var(--white-color);
    padding: 2rem 1.5rem 4rem;
    box-shadow: 0 4px 10px var(--shadow-color);
    border-radius: 0 0 1rem 1rem;
    transition: 0.3s;
  }

  .nav__menu.show-menu {
    top: var(--header-height);
  }

  .nav__list {
    flex-direction: column;
    row-gap: 1.5rem;
  }

  .nav__link {
    color: var(--text-color);
  }

  .nav__close {
    position: absolute;
    top: 1rem;
    right: 1.3rem;
    display: block;
    width: 20px;
    height: 20px;
  }

  .nav__close span {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 2px;
    background-color: var(--text-color);
    transform: translate(-50%, -50%);
  }

  .nav__close span:first-child {
    transform: translate(-50%, -50%) rotate(45deg);
  }

  .nav__close span:last-child {
    transform: translate(-50%, -50%) rotate(-45deg);
  }

  .nav__toggle {
    display: flex;
    flex-direction: column;
    gap: 3px;
    cursor: pointer;
  }

  .nav__toggle span {
    width: 20px;
    height: 2px;
    background-color: var(--text-color);
    transition: 0.3s;
  }

  .hero__container {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .hero__content {
    text-align: center;
  }

  .hero__image {
    order: -1;
  }

  .hero__image-wrapper {
    width: 300px;
    height: 200px;
  }

  .contact__group {
    grid-template-columns: 1fr;
  }
}

@media screen and (max-width: 576px) {
  .hero__title {
    font-size: var(--h1-font-size);
  }

  .hero__subtitle {
    font-size: var(--normal-font-size);
  }

  .section__title {
    font-size: var(--h2-font-size);
  }

  .products__container {
    grid-template-columns: 1fr;
  }

  .about__values {
    grid-template-columns: 1fr;
  }

  .about__value {
    text-align: center;
    flex-direction: column;
  }

  .hero__image-wrapper {
    width: 250px;
    height: 180px;
  }

  .product__image {
    height: 150px;
  }
}

/* ===== SCROLL UP ===== */
.scrollup {
  position: fixed;
  right: 1rem;
  bottom: -20%;
  background-color: var(--accent-color);
  opacity: 0.8;
  padding: 0.3rem;
  border-radius: 0.4rem;
  z-index: var(--z-tooltip);
  transition: 0.4s;
}

.scrollup:hover {
  background-color: var(--accent-color-alt);
}

.scrollup__icon {
  font-size: 1.5rem;
  color: var(--white-color);
}

.show-scroll {
  bottom: 5rem;
}

/* ===== SCROLL BAR ===== */
::-webkit-scrollbar {
  width: 0.6rem;
  background-color: var(--border-color);
  border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb {
  background-color: var(--accent-color);
  border-radius: 0.5rem;
}

::-webkit-scrollbar-thumb:hover {
  background-color: var(--accent-color-alt);
}

/* ===== SELECTION ===== */
::selection {
  background-color: var(--accent-color);
  color: var(--white-color);
}