:root {
  --display-font: 'Bebas Neue', cursive;
  --body-font: 'Poppins', sans-serif;
  --primary-color: #1a1a2e; /* Darker blue for stronger theme */
  --secondary-color: #e67e22;
  --accent-color: #16a085; /* Adjusted green for better harmony */
  --background-color: #121212; /* Dark background for intensity */
  --text-color: #f0f0f0; /* Light text for contrast */
  --fluid-min-width: 320;
  --fluid-max-width: 1200;
  --fluid-min-size: 16;
  --fluid-max-size: 20;
}

html {
    font-size: calc(
        (var(--fluid-min-size) * 1px) + 
        (var(--fluid-max-size) - var(--fluid-min-size)) * 
        (100vw - var(--fluid-min-width) * 1px) / 
        (var(--fluid-max-width) - var(--fluid-min-width))
    );
}

/* Responsive font sizes for headings */
@media (max-width: 768px) {
  h2 {
    font-size: 2rem; /* Slightly smaller for smaller screens */
  }
  h3 {
    font-size: 1.4rem; /* Slightly smaller for smaller screens */
  }
}

/* Adjust main padding for smaller screens */
@media (max-width: 480px) {
  main {
    padding: 3rem 1rem 1rem 1rem;
  }
}

/* Adjust grid gap and min-width for better wrapping on small screens */
@media (max-width: 400px) {
  .grid-container {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

/* Base Styles */
body {
    font-family: var(--body-font);
    margin: 0;
    padding: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    transition: background-color 0.3s ease, color 0.3s ease;
    /* Respect user preference for reduced motion */
    @media (prefers-reduced-motion: reduce) {
        *, *::before, *::after {
            animation-duration: 0.001ms !important;
            animation-iteration-count: 1 !important;
            transition-duration: 0.001ms !important;
            scroll-behavior: auto !important;
        }
    }
}

/* Additional responsive adjustments */
@media (max-width: 1024px) {
  main {
    padding: 3rem 1.5rem 1rem 1.5rem;
  }
}

@media (max-width: 768px) {
  nav.navbar {
    padding: 0.5rem 1rem;
  }
}

@media (max-width: 480px) {
  nav.navbar {
    padding: 0.5rem 0.5rem;
  }
}

/* Pricing Grid Styles */
.pricing-grid {
    margin-bottom: 3rem; /* More spacing below */
    animation: slideUp 0.8s ease-out;
    padding: 3rem 2rem; /* Adjusted padding for breathing room */
    background-color: rgba(26, 26, 46, 0.6);
    border-radius: 12px;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.3);
    border: 1px solid rgba(255,255,255,0.1);
    margin-top: 2rem;
}

/* Section Divider */
.section-divider {
    height: 2px;
    background: linear-gradient(to right, var(--secondary-color), var(--accent-color));
    margin: 3rem 0;
    border-radius: 1px;
}

/* Responsive grid adjustments */
.grid-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); /* Slightly larger min width */
    gap: 2rem; /* Increased gap for breathing room */
}

@media (max-width: 1024px) {
    .grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .grid-container {
        grid-template-columns: 1fr;
    }
}

/* Pricing Card Styles - UPDATED */
/* Base card style */
.pricing-card {
    background: #29293d; /* Slightly lighter than before for better contrast */
    border-radius: 12px; /* Slightly more rounded */
    padding: 2rem; /* Increased padding */
    box-shadow: 0 8px 20px rgba(0,0,0,0.7);
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), 
                box-shadow 0.3s ease;
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
    display: flex;
    flex-direction: column;
    opacity: 0;
    animation: cardAppear 0.8s ease forwards;
    color: var(--text-color);
}

.pricing-card:nth-child(1) {
    animation-delay: 0.2s;
}
.pricing-card:nth-child(2) {
    animation-delay: 0.4s;
}
.pricing-card:nth-child(3) {
    animation-delay: 0.6s;
}
.pricing-card:nth-child(4) {
    animation-delay: 0.8s;
}
.pricing-card:nth-child(5) {
    animation-delay: 1s;
}
.pricing-card:nth-child(6) {
    animation-delay: 1.2s;
}
.pricing-card:nth-child(7) {
    animation-delay: 1.4s;
}
.pricing-card:nth-child(8) {
    animation-delay: 1.6s;
}

@keyframes cardAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Dynamic card size based on content */
.pricing-grid .pricing-card {
    min-height: 220px;
    padding-bottom: 3rem;
    height: auto;
}

.pricing-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('./images/logo.png') center/contain no-repeat, 
                #121212;
    border-radius: 12px;
    backface-visibility: hidden;
    transform: translateZ(20px);
    transition: transform 0.8s cubic-bezier(0.25, 0.1, 0.25, 1);
    z-index: 2;
    box-shadow: 0 0 30px rgba(0,0,0,0.3);
    will-change: transform;
    background: linear-gradient(45deg, 
        rgba(255,255,255,0.05),
        rgba(255,255,255,0.02));
}

.pricing-card:hover::before {
    transform: rotateX(10deg) rotateY(10deg) translateZ(30px);
}

.pricing-card:hover::before {
    transform: rotateY(180deg);
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.4);
    will-change: transform, box-shadow;
}

.pricing-card h3 {
    color: var(--secondary-color);
    margin-top: 0;
    font-weight: 700;
}

.price {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--accent-color);
    position: absolute;
    left: 1.5rem;
    bottom: 1.5rem;
    margin: 0;
    position: relative;
    display: inline-block;
}

.price::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right,
        var(--accent-color),
        #ff6b6b);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    border-radius: 2px;
}

.price {
    animation: priceGlow 2s infinite;
}

.pricing-card:hover .price::after {
    transform: scaleX(1);
}

.pricing-card ul {
    padding-left: 1.5rem;
}

.pricing-card li {
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.pricing-card li i {
    margin-right: 0.75rem;
    color: var(--secondary-color);
}

/* Promo card variation */
.pricing-card.promo {
    border: 2px solid var(--secondary-color);
    background-color: #3a4a5a; /* Slightly lighter blue-gray */
}

/* Popular card variation */
.pricing-card.popular {
    border: 2px solid var(--accent-color);
    background-color: #1f4d4d; /* Slightly lighter teal */
}

/* Badge Styles */
.card-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    color: white;
    display: none;
}

.pricing-card:hover .card-badge {
    display: block;
}

.order-now-container {
    text-align: center;
    margin-top: 20px;
  }
  
.order-now-button {
    background-color: #2ecc71;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
  }
  
.order-now-button:hover {
    background-color: #27ae60; /* Efek hover sedikit lebih gelap */
  }

.order-now-integrated {
  background-color: #2ecc71;
  color: white;
  padding: 15px;
  text-align: center;
  text-decoration: none;
  display: block;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
  margin-top: auto;
  font-weight: 600;
  font-size: 1.1rem;
  transition: background-color 0.3s ease;
}

.order-now-integrated:hover {
  background-color: #27ae60;
}

/* Remove absolute positioning from whatsapp-button to avoid separation */
.whatsapp-button {
  position: static;
  background-color: transparent;
  box-shadow: none;
  padding: 0;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  height: 0;
  overflow: hidden;
}

/* Animate tooltip fade in/out */
[data-tooltip]:hover::after {
    animation: tooltipFadeIn 0.3s forwards;
}

[data-tooltip]:not(:hover)::after {
    animation: tooltipFadeOut 0.3s forwards;
}

/* Preload Styles */
.preload {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(18, 18, 18, 0.95);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

/* Subtle animations and micro-interactions */
.pricing-card, .whatsapp-button {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.pricing-card:focus-within, .whatsapp-button:focus {
    outline: 3px solid var(--secondary-color);
    outline-offset: 2px;
    box-shadow: 0 0 10px var(--secondary-color);
    transform: scale(1.05);
}

.pricing-card:hover, .whatsapp-button:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    will-change: transform, box-shadow;
}

/* Fixed Top Navbar Styles */
nav[aria-label="Primary navigation"] {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    z-index: 1100;
    padding: 0.5rem 2rem;
}

.nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    gap: 2rem;
}

@media (max-width: 768px) {
    nav[aria-label="Primary navigation"] {
        padding: 0.5rem 1rem;
    }
    .nav-menu {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    nav[aria-label="Primary navigation"] {
        padding: 0.5rem 0.5rem;
    }
    .nav-menu {
        gap: 0.5rem;
    }
}

/* Dropdown Section Styles */
.dropdown-section {
    margin-bottom: 2rem;
}

.dropdown-header {
    cursor: pointer;
    background-color: var(--primary-color);
    color: var(--text-color);
    padding: 1rem 2rem;
    font-size: 1.5rem;
    font-weight: 700;
    border-radius: 8px;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.dropdown-header::after {
    content: "▼";
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.dropdown-header[aria-expanded="true"]::after {
    transform: rotate(180deg);
}

.dropdown-content {
    overflow: hidden;
    transition: none;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.dropdown-content.collapsed {
    display: none;
    padding: 0;
    margin: 0;
}
