/* 
  Glass Service Bošnjace - FAQ Stilovi
  Autor: Svilenkovic Dimitrije
  Verzija: 4.0 - Complete Modern Dark Redesign
*/

:root {
  --primary-dark: #181a20;
  --primary-light: #23262f;
  --accent-red: #c10000;
  --accent-blue: #3498db;
  --white: #fff;
  --gray: #bfc9d1;
  --input-bg: #23262f;
  --input-border: #353945;
  --input-focus: #3498db;
  --error: #ff4d4f;
  --success: #00c48c;
}

.faq-modern.section-universal {
  background: var(--primary-dark);
  color: var(--white);
  padding: 48px 0 80px 0;
  margin-top: 0;
  position: relative;
  overflow: hidden;
}

.faq-modern.section-universal::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(52, 152, 219, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(193, 0, 0, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

@media (max-width: 600px) {
  .faq-modern.section-universal {
    padding: 28px 0 40px 0;
    margin-top: 0;
  }
}

/* Header */
.faq-header {
  text-align: center;
  margin-bottom: 48px;
  position: relative;
  z-index: 2;
}

.faq-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: linear-gradient(135deg, var(--accent-red), var(--accent-blue));
  color: var(--white);
  font-weight: 600;
  font-size: 15px;
  padding: 10px 24px;
  border-radius: 16px;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 20px rgba(52, 152, 219, 0.3);
}

.faq-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 10px 0;
  color: var(--white);
  line-height: 1.2;
}

.faq-subtitle {
  color: var(--gray);
  font-size: 1.1rem;
  margin: 0 auto 32px auto;
  max-width: 600px;
  line-height: 1.6;
}

/* Categories */
.faq-categories {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 48px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.faq-category {
  background: var(--primary-light);
  border: 2px solid var(--input-border);
  border-radius: 20px;
  padding: 12px 24px;
  color: var(--gray);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.5px;
  position: relative;
  overflow: hidden;
}

.faq-category::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(52,152,219,0.1), transparent);
  transition: left 0.5s ease;
}

.faq-category:hover::before {
  left: 100%;
}

.faq-category:hover {
  border-color: var(--accent-blue);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(52,152,219,0.2);
}

.faq-category.active {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-blue));
  border-color: transparent;
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(193,0,0,0.3);
}

.faq-category i {
  font-size: 1rem;
}

/* FAQ Grid */
.faq-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
  position: relative;
  z-index: 2;
}

/* FAQ Cards */
.faq-card {
  background: var(--primary-light);
  border-radius: 28px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.18);
  border: 2px solid var(--input-border);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  cursor: pointer;
  user-select: none;
}

.faq-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(52,152,219,0.05), rgba(193,0,0,0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.faq-card:hover::before {
  opacity: 1;
}

.faq-card:hover {
  border-color: var(--accent-blue);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}

.faq-card.active {
  border-color: var(--accent-red);
  box-shadow: 0 6px 32px rgba(193,0,0,0.2);
}

.faq-card.active::before {
  opacity: 1;
  background: linear-gradient(135deg, rgba(193,0,0,0.08), rgba(52,152,219,0.08));
}

/* Card Content */
.faq-card-inner {
  padding: 32px;
  position: relative;
  z-index: 2;
}

.faq-question {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 20px;
  cursor: pointer;
  user-select: none;
}

.faq-icon {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-blue));
  color: var(--white);
  border-radius: 16px;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
  transition: all 0.3s ease;
  box-shadow: 0 4px 16px rgba(52,152,219,0.3);
}

.faq-card:hover .faq-icon {
  transform: scale(1.1);
  box-shadow: 0 6px 20px rgba(193,0,0,0.4);
}

.faq-question-content {
  flex: 1;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.faq-question h3 {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--white);
  margin: 0;
  line-height: 1.4;
  transition: color 0.3s ease;
}

.faq-card:hover .faq-question h3 {
  color: var(--accent-blue);
}

.faq-toggle {
  background: rgba(52,152,219,0.1);
  border: 1px solid var(--input-border);
  border-radius: 12px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
  cursor: pointer;
}

.faq-toggle:hover {
  background: var(--accent-blue);
  border-color: var(--accent-blue);
  transform: scale(1.1);
}

.toggle-icon {
  color: var(--gray);
  font-size: 0.9rem;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.faq-toggle:hover .toggle-icon {
  color: var(--white);
}

.faq-card.active .toggle-icon {
  color: var(--accent-red);
  transform: rotate(180deg);
}

/* Answer */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  padding-left: 68px;
  opacity: 0;
}

.faq-card.active .faq-answer {
  max-height: 500px;
  padding-bottom: 8px;
  opacity: 1;
}

.faq-answer p {
  color: var(--gray);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0;
  padding-top: 16px;
  border-top: 1px solid var(--input-border);
  transition: all 0.3s ease;
}

/* More Info Section */
.faq-more {
  position: relative;
  z-index: 2;
}

.faq-more-card {
  background: var(--primary-light);
  border-radius: 28px;
  box-shadow: 0 4px 32px rgba(0,0,0,0.18);
  padding: 48px;
  text-align: center;
  border: 2px solid var(--accent-blue);
  position: relative;
  overflow: hidden;
  transition: all 0.3s ease;
}

.faq-more-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(193,0,0,0.05), rgba(52,152,219,0.05));
  opacity: 0;
  transition: opacity 0.3s ease;
}

.faq-more-card:hover::before {
  opacity: 1;
}

.faq-more-card:hover {
  border-color: var(--accent-red);
  transform: translateY(-4px);
  box-shadow: 0 8px 40px rgba(0,0,0,0.25);
}

.more-icon {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-blue));
  color: var(--white);
  border-radius: 50%;
  width: 80px;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  margin: 0 auto 24px auto;
  position: relative;
  z-index: 2;
  transition: all 0.4s ease;
  box-shadow: 0 8px 32px rgba(52,152,219,0.3);
}

.faq-more-card:hover .more-icon {
  transform: scale(1.1) rotate(10deg);
  box-shadow: 0 12px 40px rgba(193,0,0,0.4);
}

.faq-more-card h3 {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--white);
  margin: 0 0 16px 0;
  position: relative;
  z-index: 2;
}

.faq-more-card p {
  color: var(--gray);
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0 0 32px 0;
  position: relative;
  z-index: 2;
}

/* Buttons */
.more-buttons {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
  z-index: 2;
}

.btn-primary, .btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 32px;
  border-radius: 16px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  border: none;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent-red), var(--accent-blue));
  color: var(--white);
  box-shadow: 0 4px 16px rgba(52,152,219,0.3);
}

.btn-primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
  transition: left 0.5s ease;
}

.btn-primary:hover::before {
  left: 100%;
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(193,0,0,0.4);
}

.btn-secondary {
  background: transparent;
  color: var(--accent-blue);
  border: 2px solid var(--accent-blue);
}

.btn-secondary:hover {
  background: var(--accent-blue);
  color: var(--white);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(52,152,219,0.3);
}

/* Animations */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-animate {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.8s cubic-bezier(.4,0,.2,1), transform 0.8s cubic-bezier(.4,0,.2,1);
  transition-delay: var(--delay, 0s);
}

.section-animate.visible {
  opacity: 1;
  transform: none;
}

/* Responsive Design */
@media (max-width: 992px) {
  .faq-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
  
  .faq-categories {
    gap: 12px;
  }
  
  .faq-category {
    padding: 10px 16px;
    font-size: 0.85rem;
  }
  
  .faq-title {
    font-size: 2rem;
  }
  
  .faq-more-card {
    padding: 36px 24px;
  }
}

@media (max-width: 768px) {
  .faq-categories {
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 8px;
  }
  
  .faq-categories::-webkit-scrollbar {
    height: 4px;
  }
  
  .faq-categories::-webkit-scrollbar-track {
    background: var(--input-border);
    border-radius: 2px;
  }
  
  .faq-categories::-webkit-scrollbar-thumb {
    background: var(--accent-blue);
    border-radius: 2px;
  }
  
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .faq-header {
    margin-bottom: 32px;
  }
  
  .faq-title {
    font-size: 1.8rem;
  }
  
  .faq-subtitle {
    font-size: 1rem;
  }
  
  .faq-card-inner {
    padding: 24px;
  }
  
  .faq-question {
    gap: 16px;
  }
  
  .faq-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
  
  .faq-question h3 {
    font-size: 1.1rem;
  }
  
  .faq-answer {
    padding-left: 56px;
  }
  
  .faq-more-card {
    padding: 32px 20px;
  }
  
  .more-icon {
    width: 64px;
    height: 64px;
    font-size: 1.6rem;
  }
  
  .faq-more-card h3 {
    font-size: 1.5rem;
  }
  
  .more-buttons {
    flex-direction: column;
    align-items: center;
  }
  
  .btn-primary, .btn-secondary {
    width: 100%;
    max-width: 280px;
    justify-content: center;
  }
}

/* Hide/Show FAQ cards based on category */
.faq-card[style*="display: none"] {
  display: none !important;
}

/* Smooth transitions for category filtering */
.faq-card {
  transition: all 0.3s ease, max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-card.hiding {
  opacity: 0;
  transform: scale(0.9);
  pointer-events: none;
}

.faq-card.showing {
  opacity: 1;
  transform: scale(1);
}