/* =============================
  VARIABLES & RESET
============================= */
:root {
  --color-primary: #A2D7F3;
  --color-dark-bg: #1f1f1f;
  --color-dark-text: #A2D7F3;
  --color-light-bg: #F4F4F4;
  --color-light-text: rgba(0, 0, 0, 0.75);
  --color-overlay: rgba(0, 0, 0, 0.6);
  --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  --shadow-strong: 0 4px 8px rgba(0, 0, 0, 0.2);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  box-sizing: border-box;
  overflow-x: hidden;
}

body {
  font-family: 'Montserrat', sans-serif;
  background: var(--color-light-bg);
  color: var(--color-light-text);
  transition: background 0.3s, color 0.3s, opacity 0.5s ease;
  box-sizing: border-box;
  overflow-x: hidden;

}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* =============================
  THEME DARK
============================= */
body.dark {
  background: var(--color-dark-bg);
  color: var(--color-light-bg);
}

body.dark .navbar,
body.dark .navbar-menu,
body.dark .card,
body.dark .gallery img {
  background: var(--color-light-text);
  color: var(--color-light-bg);
}

body.dark .navbar-menu a {
  color: var(--color-light-bg);
}

/* =============================
  UTILITIES
============================= */
.container {
  padding: 1rem;
  margin: auto;
  max-width: 1200px;
}

.section-title {
  text-align: center;
  margin-bottom: 2rem;
}

/* =============================
  LOADER
============================= */
#loader {
  position: fixed;
  inset: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.loader-logo {
  width: 100px;
  max-width: 80vw; 
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* =============================
  TOGGLE THEME BUTTON
============================= */
#toggleTheme {
  position: fixed;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 100;
  background: var(--color-primary);
  border: none;
  color: var(--color-light-text);
  padding: 0.5rem;
  border-radius: 50%;
  cursor: pointer;
}

/* =============================
  NAVBAR
============================= */
.navbar {
  background: var(--color-light-text);
  position: sticky;
  top: 0;
  z-index: 10;
}

.navbar__container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.5rem 1rem;
}

.navbar__brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--color-primary);
}

.logo {
  width: 40px;
  margin-right: 0.5rem;
}

.navbar__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--color-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

.navbar__menu {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.navbar__menu li a {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--color-light-bg);
  text-decoration: none;
  font-weight: 500;
}

/* Mobile Navbar */
@media (max-width: 768px) {
  .navbar__toggle {
    display: block;
  }

  .navbar__menu {
    position: absolute;
    top: 60px;
    right: -100%;
    flex-direction: column;
    background: var(--color-light-text);
    width: 200px;
    padding: 1rem;
    transition: right 0.3s ease;
  }

  .navbar__menu.open {
    right: 0;
  }
}

/* =============================
  CAROUSEL
============================= */
.carousel-section {
  position: relative;
  height: 60vh;
  overflow: hidden;
}

.carousel {
  width: 100%;
  height: 100%;
  position: relative;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1s ease;
}

.slide.active {
  opacity: 1;
}

.carousel__overlay {
  position: absolute;
  inset: 0;
  background: var(--color-overlay);
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
  padding: 1rem;
}

.overlay-text h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

/* Carousel Responsif */
@media (max-width: 768px) {
  .navbar__toggle {
    display: block;
  }
  .navbar__menu {
    position: absolute;
    top: 60px;
    right: -100%;
    flex-direction: column;
    background: var(--color-light-text);
    width: 200px;
    padding: 1rem;
    transition: right 0.3s ease;
    overflow-x: hidden;
  }
  .navbar__menu.open {
    right: 0;
  }
  .overlay-text h1 {
    font-size: 1.4rem;
  }

  .overlay-text p {
    font-size: 0.9rem;
  }
   .services__grid { grid-template-columns: 1fr; padding: 0.5rem; }
  .profile-card { flex-direction: column; align-items: center; padding: 1rem; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
   .profile-card {
    flex-direction: column;
    text-align: center;
  }

  .profile-card__image {
    max-width: 100%;
    margin-bottom: 1rem;
  }

  .profile-card__body {
    align-items: center;
  }

  .profile-card__text {
    font-size: 0.95rem;
    color: black;
  }

  .profile-card__button {
    width: 100%;
    color: var(--color-light-text);
    max-width: 250px;
  }
}

/* =============================
  SERVICES
============================= */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr); 
  gap: 10px; 
  padding: 1rem;
}

.card {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: center;
}

.card h3 {
  margin: 0.5rem 0;
}

.card p {
  font-size: 0.95rem;
}

/* Dark mode override */
body.dark .card {
  background-color: var(--color-light-text);
}

body.dark .profile-card {
  background: var(--color-light-text);
}

body.dark .profile-card__text {
  color: var(--color-light-bg);
}



/* =============================
  GALLERY
============================= */
.gallery {
  padding: 2rem 1rem;
}

.gallery h2 {
  text-align: center;
  margin-bottom: 1rem;
}

.gallery-row.full img {
  width: 100%;
  margin-bottom: 1rem;
  box-shadow: var(--shadow-strong);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

.gallery-grid img {
  box-shadow: var(--shadow);
  transition: transform 0.3s;
}

.gallery-grid img:hover {
  transform: scale(1.03);
}

/* Gallery responsive */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
    .profile-card {
    flex-direction: column;
    text-align: center;
  }

  .profile-card__image {
    width: 100%;
    max-height: 250px;
  }

  .profile-card__body {
    padding: 1rem;
  }
}

@media (max-width: 480px) {
  .loader-logo {
    width: 60px;
    max-width: 50vw;
  }
  .gallery-grid {
    grid-template-columns: 1fr;
  }
}


/* PROFILE */
.profile-card {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  background: white;
  box-shadow: var(--shadow-strong);
  border-radius: 10px;
  width: calc(100% - 8px); /* Full width minus 4px margin kiri-kanan */
  margin: 2rem 4px;
  padding: 1rem;
  gap: 1rem;
  overflow: hidden;
}

.profile-card__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
  flex: 1;
}

.profile-card__text {
  color: var(--color-dark-bg);
  font-size: 1rem;
  line-height: 1.6;
}

.profile-card__button {
  background: var(--color-primary);
  color: black;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 6px;
  text-align: center;
  width: fit-content;
  font-weight: bold;
  transition: background 0.3s;
}

.profile-card__image {
  max-width: 50%;
  height: auto;
  border-radius: 8px;
}

/* Konten teks */
.profile-card__body {
  flex: 1;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

/* Paragraf */
.profile-card__text {
  font-size: 1rem;
  line-height: 1.6;
}

/* Tombol */
.profile-card__button {
  background: var(--color-primary);
  color: black;
  text-decoration: none;
  padding: 0.75rem 1.5rem;
  border-radius: 5px;
  font-weight: bold;
  text-align: center;
  width: fit-content;
  transition: background 0.3s;
}

.profile-card__button:hover {
  background: #80c8ed;
}

/* Gambar */
.profile-card__image {
  height: 200px;
  width: 200px;
  object-fit: cover;
}

/* =============================
  CONTACT
============================= */
.contact {
  padding: 2rem 1rem;
  max-width: 600px;
  margin: auto;
}

.contact h2 {
  text-align: center;
  margin-bottom: 1rem;
}

#contactForm {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

#contactForm input,
#contactForm textarea {
  padding: 0.75rem;
  border: 1px solid #ccc;
  border-radius: 5px;
  font-size: 1rem;
}

#contactForm button {
  background: var(--color-primary);
  border: none;
  padding: 0.75rem;
  color: var(--color-light-text);
  font-weight: bold;
  cursor: pointer;
  border-radius: 5px;
  transition: background 0.3s;
}

#contactForm button:hover {
  background: #80c8ed;
}


@media (max-width: 480px) {
  .loader-logo {
    width: 60px;
    max-width: 50vw;
  }
}

/* footer */
.footer {
  background: var(--color-light-text);
  color: var(--color-light-bg);
  padding: 2rem 1rem;
  margin-top: 2rem;
}

.footer__container {
  max-width: 1200px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

.footer__brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}

.footer__brand img {
  width: 50px;
  height: auto;
}

.footer__links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  justify-content: center;
}

.footer__links a {
  color: var(--color-light-bg);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.3s;
}

.footer__links a:hover {
  color: var(--color-primary);
}

.footer__info p {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.6);
}

/* Dark Mode */
body.dark .footer {
  background: var(--color-dark-bg);
  color: var(--color-light-bg);
}

body.dark .footer__links a {
  color: var(--color-light-bg);
}

body.dark .footer__links a:hover {
  color: var(--color-dark-text);
}


@media (max-width: 576px) {
  .services__grid {
    grid-template-columns: 1fr;
  }

  .profile-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .profile-card__image {
    width: 100%;
    height: auto;
  }
}

