/* Reset */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Body */
body {
  font-family: 'Montserrat', sans-serif;
  background-color: #f8f9fa;
  color: #333;
  line-height: 1.6;
  padding: 20px;
}

/* Container */
.container {
  max-width: 1000px;
  margin: 30px auto;
  background-color: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Header */
header {
  text-align: center;
  margin-bottom: 30px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

header h1 {
  font-family: 'Playfair Display', serif;
  font-size: 2.2em;
  margin-bottom: 10px;
  color: #2c3e50;
}

header p {
  font-size: 1.1em;
  color: #666;
}

/* Form */
.form-group {
  margin-bottom: 25px;
}

form label {
  display: block;
  font-weight: 600;
  margin-bottom: 8px;
  color: #2c3e50;
}

form input[type="text"],
form textarea {
  width: 100%;
  padding: 12px 15px;
  font-size: 1em;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: 'Montserrat', sans-serif;
  transition: border 0.3s ease;
}

form input[type="text"]:focus,
form textarea:focus {
  border-color: #3498db;
  outline: none;
}

form textarea {
  min-height: 100px;
  resize: vertical;
}

/* Design Options */
.design-options h3 {
  margin-bottom: 15px;
  color: #2c3e50;
}

.design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin-bottom: 25px;
}

.design-option {
  text-align: center;
}

.design-option input[type="radio"] {
  display: none;
}

.design-option label {
  display: block;
  cursor: pointer;
  border-radius: 10px;
  overflow: hidden;
  border: 3px solid transparent;
  transition: all 0.3s ease;
  background: #fff;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.design-option img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.design-option label:hover {
  transform: translateY(-5px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.design-option input[type="radio"]:checked + label {
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.design-option span {
  display: block;
  margin-top: 8px;
  font-weight: 500;
  color: #444;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 24px;
  font-size: 1em;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  text-decoration: none;
}

.btn.primary {
  background-color: #3498db;
  color: white;
}

.btn.primary:hover {
  background-color: #2980b9;
  transform: translateY(-2px);
}

.btn.secondary {
  background-color: #ecf0f1;
  color: #2c3e50;
}

.btn.secondary:hover {
  background-color: #d5dbdb;
}

.action-buttons {
  display: flex;
  gap: 15px;
  justify-content: center;
  margin-top: 25px;
}

/* Preview Section */
.preview-section {
  margin-top: 30px;
  text-align: center;
  animation: fadeIn 0.5s ease;
}

.preview-section h2 {
  font-family: 'Playfair Display', serif;
  font-size: 1.8em;
  margin-bottom: 20px;
  color: #2c3e50;
}

.preview-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.card-preview {
  width: 100%;
  max-width: 500px;
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.card {
  width: 100%;
  height: auto;
  display: block;
}

.preview-instruction p {
  color: #666;
  font-size: 0.95em;
  margin-top: 10px;
}

/* Text Positioning for Different Designs */
/* .name-text {
  position: absolute;
  color: white;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  font-family: 'Montserrat', sans-serif;
} */

.name-text {
  position: absolute;
  color: white;
  font-weight: bold;
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
  font-family: 'Montserrat', sans-serif;
  z-index: 10; /* Pastikan di layer atas */
  visibility: visible !important; /* Override any hiding */
}

/* Design 1 & 2 (Ungu Putih) */
.design1 .name-text {
  bottom: 105px;
  left: 32%;
  transform: translateX(-50%);
  font-size: 1em;
  width: 60%;
  text-align: center;
}


.design2 .name-text {
  bottom: 200px;
  left: 32%;
  transform: translateX(-50%);
  font-size: 1em;
  width: 80%;
  text-align: center;
}

/* Design 3 & 4 (Jingga Putih) */
.design3 .name-text{
  bottom: 30px;
  right: 30px;
  font-size: 1em;
  text-align: right;
  max-width: 60%;
}

.design4 .name-text {
  bottom: 180px;
  right: 25px;
  font-size: 1em;
  text-align: right;
  max-width: 60%;
}

/* Design 5 & 6 (Hijau Kuning) */
.design5 .name-text{
  bottom: 120px;
  left: 32px;
  font-size: 1.1em;
  max-width: 70%;
}

.design6 .name-text {
  bottom: 350px;
  left: 30px;
  font-size: 1em;
  max-width: 70%;
}

/* Design Categories */
.design-category {
  margin-bottom: 30px;
  padding: 20px;
  background-color: #f8f9fa;
  border-radius: 10px;
}

.design-category h4 {
  margin-bottom: 15px;
  color: #2c3e50;
  display: flex;
  align-items: center;
  font-size: 1.1em;
}

.design-category h4 i {
  margin-right: 10px;
  font-size: 1.2em;
}

.icon-post::before {
  content: "📊";
}

.icon-story::before {
  content: "📱";
}

/* Adjust grid for better organization */
.design-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 20px;
}

/* Make sure all images maintain aspect ratio */
.design-option img {
  width: 100%;
  height: 160px; /* Fixed height for consistency */
  object-fit: cover;
  border-radius: 8px;
}


/* Responsive adjustments */
@media (max-width: 768px) {
  .design-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 480px) {
  .design-grid {
    grid-template-columns: 1fr;
  }
  
  .design-option img {
    height: 200px;
  }
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
  .container {
    padding: 20px;
  }
  
  .design-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .btn {
    width: 100%;
  }
}

@media (max-width: 480px) {
  header h1 {
    font-size: 1.8em;
  }
  
  .design-grid {
    grid-template-columns: 1fr;
  }
}

/* Mobile First Approach */
@media (max-width: 768px) {
  /* Design 1 & 2 (Ungu Putih) */
  .design1 .name-text {
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    text-align: center;
  }

  .design2 .name-text {
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    text-align: center;
  }

  /* Design 3 & 4 (Jingga Putih) */
  .design3 .name-text{
    bottom: 10%;
    right: 5%;
    text-align: right;
    max-width: 60%;
  }

  .design4 .name-text {
    bottom: 10%;
    right: 5%;
    text-align: right;
    max-width: 60%;
  }

  /* Design 5 & 6 (Hijau Kuning) */
  .design5 .name-text {
    bottom: 15%;
    left: 5%;
    max-width: 70%;
  }

  .design6 .name-text {
    bottom: 15%;
    left: 5%;
    max-width: 70%;
  }
}

/* Adjustments for very small screens */
@media (max-width: 480px) {
  .name-text {
    font-size: clamp(0.7em, 3vw, 0.9em);
  }

  /* Design 1 & 2 */
  .design1 .name-text {
    left: 31%;
    font-size: 0.5em;
    bottom: 22%;
    width: 85%;
  }

  .design2 .name-text {
    left: 31%;
    font-size: 0.5em;
    bottom: 23%;
    width: 85%;
  }

  /* Design 3 & 4 */
  .design3 .name-text {
    font-size: 0.5em;
    bottom: 5%;
    right: 6%;
    max-width: 65%;
  }

   .design4 .name-text {
    font-size: 0.5em;
    bottom: 21%;
    right: 5%;
    max-width: 65%;
  }

  /* Design 5 & 6 */
  .design5 .name-text {
    font-size: 0.5em;
    bottom:23%;
    left: 8%;
    max-width: 75%;
  }

   .design6 .name-text {
    font-size: 0.5em;
    bottom:38%;
    left: 7%;
    max-width: 75%;
  }
}

/* Special cases for landscape orientation */
@media (max-width: 768px) and (orientation: landscape) {
  .name-text {
    font-size: clamp(0.7em, 2.5vw, 0.9em);
  }
  
  /* Design 2 & 4 & 6 (Story designs) */
  .design2 .name-text,
  .design4 .name-text,
  .design6 .name-text {
    bottom: 25%;
  }
}