/* Reset dan Base Styles */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  overflow-x: hidden;
  font-family: 'Inter', sans-serif;
}

/* Remix Icons */
:where([class^="ri-"])::before {
  content: "\f3c2";
}

/* Hero Section */
.hero-section {
  background-image: linear-gradient(to right, rgba(255, 255, 255, 0.9) 40%, rgba(255, 255, 255, 0.7) 60%, rgba(255, 255, 255, 0.3) 80%, rgba(255, 255, 255, 0) 100%), url('https://public.readdy.ai/ai/img_res/3c81358816331f4f5896aeea40659e52.jpg');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  width: 100%;
  max-width: 100%;
  min-height: 100vh;
}

/* Navbar - Transparent di hero, solid saat scroll */
.navbar {
  background: transparent;
  backdrop-filter: none;
  box-shadow: none;
  transition: all 0.3s ease;
}

.navbar.scrolled {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Navbar text color adjustment */
.navbar a {
  color: #1f2937;
  transition: color 0.3s ease;
}

.navbar.scrolled a {
  color: #1f2937;
}

#logo {
  color: #0ea5e9;
}

/* Mobile menu background */
#mobile-menu {
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(12px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

/* Section Containers */
section {
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.container, [class*="max-w-"] {
  width: 100%;
  max-width: 100%;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

/* Grid Fixes */
.grid {
  width: 100%;
  max-width: 100%;
}

.gallery-grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  width: 100%;
}

/* Flex Fixes */
.flex {
  min-width: 0;
}

/* Cards */
.service-card {
  transition: all 0.3s ease;
}

.service-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.testimonial-card {
  transition: all 0.3s ease;
}

.testimonial-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 25px rgba(0, 0, 0, 0.1);
}

.gallery-item {
  overflow: hidden;
  border-radius: 12px;
  transition: all 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.gallery-item img {
  transition: transform 0.5s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Animations */
.fade-in {
  opacity: 1;
  transform: scale(1);
  transition: all 0.3s ease-in-out;
}

.fade-out {
  opacity: 0;
  transform: scale(0.95);
  transition: all 0.3s ease-in-out;
}

/* Custom Checkbox */
.custom-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid #cbd5e0;
  border-radius: 4px;
  outline: none;
  transition: all 0.2s;
  position: relative;
  flex-shrink: 0;
}

.custom-checkbox:checked {
  background-color: #0ea5e9;
  border-color: #0ea5e9;
}

.custom-checkbox:checked::after {
  content: '';
  position: absolute;
  top: 40%;
  left: 50%;
  transform: translate(-50%, -50%) rotate(45deg);
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
}

/* Switch Toggle */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 30px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
  border-radius: 34px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 22px;
  width: 22px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background-color: #0ea5e9;
}

input:checked + .slider:before {
  transform: translateX(30px);
}

/* Accordion */
.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.5s ease-in-out, padding 0.3s ease;
}

.accordion-content.open {
  max-height: 1000px;
}

.accordion-header i {
  transition: transform 0.3s ease;
}

.accordion-header.active i {
  transform: rotate(180deg);
}

/* Filter Buttons */
.filter-btn {
  transition: all 0.3s ease;
}

.filter-btn.active {
  background-color: #0ea5e9;
  color: white;
  transform: scale(1.05);
}

.filter-btn:not(.active):hover {
  background-color: #f3f4f6;
  transform: translateY(-1px);
}

/* Scroll to Top Button */
#scrollToTopBtn {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  color: white;
  border: none;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.3);
  z-index: 1000;
}

#scrollToTopBtn:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(14, 165, 233, 0.4);
}

#scrollToTopBtn.show {
  opacity: 1;
  visibility: visible;
}

/* Typography Fixes */
h1, h2, h3, h4, h5, h6, p {
  word-wrap: break-word;
  overflow-wrap: break-word;
}

/* Enhanced hover effects */
.hover-lift {
  transition: all 0.3s ease;
}

.hover-lift:hover {
  transform: translateY(-2px);
}

/* Button enhancements */
.btn-primary {
  background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
  transition: all 0.3s ease;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(14, 165, 233, 0.3);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .hero-section {
    background-attachment: scroll;
    background-position: center;
    min-height: 100vh;
    padding: 1rem 0;
  }
  
  /* Navbar mobile adjustments */
  .navbar {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
  }
  
  .navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
  }
  
  .container, [class*="max-w-"] {
    padding-left: 1rem;
    padding-right: 1rem;
    max-width: 100vw;
    overflow-x: hidden;
  }
  
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  .grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }
  
  /* Stats grid in hero */
  .hero-section .grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Mobile menu */
  #mobile-menu {
    left: 0;
    right: 0;
    width: 100%;
    max-width: 100vw;
    margin: 0;
    border-radius: 0 0 12px 12px;
  }
  
  /* Button fixes */
  .flex-col.sm\:flex-row {
    flex-direction: column;
    gap: 0.75rem;
  }
  
  .flex-col.sm\:flex-row a {
    width: 100%;
    text-align: center;
  }
  
  /* Testimonial grid */
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
  
  /* Filter buttons mobile */
  .filter-btn {
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
  }
}

/* Extra Small Mobile */
@media (max-width: 480px) {
  .container, [class*="max-w-"] {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }
  
  .hero-section .grid {
    grid-template-columns: 1fr;
  }
  
  #scrollToTopBtn {
    width: 45px;
    height: 45px;
    bottom: 20px;
    right: 20px;
    font-size: 16px;
  }
  
  /* Font size adjustments */
  h1 {
    font-size: 2rem;
    line-height: 1.2;
  }
  
  h2 {
    font-size: 1.75rem;
  }
  
  .text-lg {
    font-size: 1rem;
  }
  
  .text-xl {
    font-size: 1.125rem;
  }
  
  /* Navbar brand smaller */
  .navbar .text-3xl {
    font-size: 1.875rem;
  }
}

/* Large Mobile */
@media (min-width: 640px) and (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .hero-section .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1024px) {
  .container, [class*="max-w-"] {
    padding-left: 2rem;
    padding-right: 2rem;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  /* Navbar di tablet tetap semi-transparent */
  .navbar {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(6px);
  }
}

/* Desktop */
@media (min-width: 1024px) {
  .hero-section {
    background-attachment: fixed;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  
  /* Navbar desktop - fully transparent in hero */
  .navbar {
    background: transparent;
    backdrop-filter: none;
  }
  
  .navbar.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    box-shadow: 0 4px 25px rgba(0, 0, 0, 0.08);
  }
}

/* Enhanced animations for desktop */
@media (min-width: 1024px) {
  .hover-lift:hover {
    transform: translateY(-4px);
  }
  
  .service-card:hover {
    transform: translateY(-8px);
  }
  
  .testimonial-card:hover {
    transform: translateY(-6px);
  }
}

::-webkit-scrollbar {
  display: none;
}

html {
  scrollbar-width: none; 
  -ms-overflow-style: none;
}
