/* ========================================
   BAYBORA ENERJİ - COMPONENTS
   Professional UI Components Library
   ======================================== */

/* ========== CAROUSEL COMPONENT ========== */
.carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--border-radius-lg);
}

.carousel-container {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.carousel-track {
  display: flex;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  position: relative;
  width: 100%;
  height: 100%;
}

.carousel-slide {
  min-width: 100%;
  max-width: 100%;
  width: 100%;
  flex-shrink: 0;
  flex-grow: 0;
  flex-basis: 100%;
  position: relative;
}

/* Carousel Navigation */
.carousel-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 50px;
  height: 50px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  cursor: pointer;
  transition: all var(--transition-medium);
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-nav:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.5);
}

.carousel-nav svg {
  width: 24px;
  height: 24px;
  stroke: var(--white);
  stroke-width: 2;
}

.carousel-prev {
  left: 20px;
}

.carousel-next {
  right: 20px;
}

/* Carousel Dots */
.carousel-dots {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 12px;
  z-index: 10;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  border: 2px solid rgba(255, 255, 255, 0.6);
  cursor: pointer;
  transition: all var(--transition-medium);
}

.carousel-dot.active {
  background: var(--accent-orange);
  border-color: var(--accent-orange);
  transform: scale(1.2);
}

.carousel-dot:hover {
  background: rgba(255, 255, 255, 0.7);
  transform: scale(1.1);
}

/* Hero Carousel - Full Width Background Image */
.hero-carousel {
  min-height: 85vh;
  border-radius: 0;
}

.hero-carousel .carousel-container {
  min-height: 85vh;
}

.hero-carousel .carousel-slide {
  min-height: 85vh;
}

/* ========== PAGE HERO (Sub-pages) ========== */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-medium) 100%);
  padding: 8rem 0 3rem;
  text-align: center;
  border-bottom: 3px solid var(--accent-orange);
  position: relative;
}

.page-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 30% 50%, rgba(255, 107, 0, 0.08) 0%, transparent 60%);
  pointer-events: none;
}

.page-hero-title {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  color: var(--white);
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.page-hero-subtitle {
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  color: var(--text-medium);
  max-width: 600px;
  margin: 0 auto;
}

/* ========== FILTER BUTTONS ========== */
.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 3rem;
  flex-wrap: wrap;
}

.filter-btn {
  padding: 0.75rem 1.75rem;
  background: transparent;
  border: 2px solid var(--neutral-light);
  border-radius: 50px;
  color: var(--text-medium);
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-heading);
  cursor: pointer;
  transition: all var(--transition-medium);
}

.filter-btn:hover {
  border-color: var(--accent-orange);
  color: var(--accent-orange);
}

.filter-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: var(--white);
}

/* ========== REFERENCES GRID ========== */
.references-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  align-items: center;
}

.reference-logo {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 1.5rem;
  background: var(--primary-medium);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--neutral-light);
  transition: all var(--transition-medium);
  text-align: center;
}

.reference-logo:hover {
  border-color: var(--accent-orange);
  transform: translateY(-3px);
}

.reference-logo .ref-icon {
  width: 48px;
  height: 48px;
  background: var(--accent-gradient);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--white);
}

.reference-logo span {
  font-size: 0.85rem;
  color: var(--text-medium);
  font-weight: 500;
}

/* ========== TABS COMPONENT ========== */
.tabs-container {
  margin-top: var(--spacing-xl);
}

.tabs-nav {
  display: flex;
  gap: var(--spacing-sm);
  border-bottom: 2px solid var(--neutral-light);
  margin-bottom: var(--spacing-lg);
  flex-wrap: wrap;
}

.tab-button {
  padding: var(--spacing-sm) var(--spacing-md);
  background: transparent;
  border: none;
  font-size: 1.125rem;
  font-weight: 600;
  font-family: var(--font-heading);
  color: var(--text-medium);
  cursor: pointer;
  transition: all var(--transition-medium);
  position: relative;
  border-radius: var(--border-radius-sm) var(--border-radius-sm) 0 0;
}

.tab-button::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform var(--transition-medium);
}

.tab-button:hover {
  color: var(--white);
}

.tab-button.active {
  color: var(--white);
}

.tab-button.active::after {
  transform: scaleX(1);
}

.tab-content {
  display: none;
  animation: fadeIn 0.5s ease;
}

.tab-content.active {
  display: block;
}

/* ========== BADGE & PILL COMPONENTS ========== */
.badge {
  display: inline-block;
  padding: 0.375rem 0.75rem;
  border-radius: var(--border-radius-sm);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.badge-primary {
  background: var(--primary-medium);
  color: var(--white);
}

.badge-secondary {
  background: var(--neutral-medium);
  color: var(--white);
}

.badge-success {
  background: #4CAF50;
  color: var(--white);
}

.badge-info {
  background: var(--accent-orange);
  color: var(--white);
}

.badge-outline {
  background: transparent;
  border: 2px solid var(--accent-orange);
  color: var(--accent-orange);
}

/* ========== TOAST NOTIFICATIONS ========== */
.toast-container {
  position: fixed;
  bottom: 30px;
  right: 30px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: var(--spacing-sm);
}

.toast {
  background: var(--primary-medium);
  padding: var(--spacing-md);
  border-radius: var(--border-radius-md);
  border: 1px solid var(--neutral-light);
  min-width: 300px;
  max-width: 400px;
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  animation: slideInRight 0.3s ease;
  border-left: 4px solid var(--accent-orange);
}

.toast-success {
  border-left-color: #4CAF50;
}

.toast-error {
  border-left-color: #d32f2f;
}

.toast-warning {
  border-left-color: #FFA000;
}

.toast-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
}

.toast-content {
  flex: 1;
}

.toast-title {
  font-weight: 600;
  color: var(--white);
  margin-bottom: 0.25rem;
}

.toast-message {
  font-size: 0.95rem;
  color: var(--text-medium);
}

.toast-close {
  background: transparent;
  border: none;
  width: 24px;
  height: 24px;
  cursor: pointer;
  color: var(--text-medium);
  transition: color var(--transition-fast);
}

.toast-close:hover {
  color: var(--white);
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(100%);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ========== MODAL & LIGHTBOX ========== */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition-medium);
}

.modal-overlay.active {
  opacity: 1;
  visibility: visible;
}

.modal {
  background: var(--primary-medium);
  border-radius: var(--border-radius-lg);
  max-width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  border: 1px solid var(--neutral-light);
  transform: scale(0.9);
  transition: transform var(--transition-medium);
}

.modal-overlay.active .modal {
  transform: scale(1);
}

.modal-header {
  padding: var(--spacing-md);
  border-bottom: 1px solid var(--neutral-light);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.5rem;
  color: var(--white);
  margin: 0;
}

.modal-close {
  background: transparent;
  border: none;
  width: 32px;
  height: 32px;
  cursor: pointer;
  color: var(--text-medium);
  transition: color var(--transition-fast);
}

.modal-close:hover {
  color: var(--white);
}

.modal-body {
  padding: var(--spacing-md);
}

.modal-footer {
  padding: var(--spacing-md);
  border-top: 1px solid var(--neutral-light);
  display: flex;
  justify-content: flex-end;
  gap: var(--spacing-sm);
}

.lightbox-image {
  width: 100%;
  max-height: 80vh;
  object-fit: contain;
}

/* ========== RESPONSIVE DESIGN ========== */

/* Mobile (< 768px) */
@media (max-width: 768px) {
  /* Hero Carousel */
  .hero-carousel {
    min-height: 60vh;
  }

  .hero-carousel .carousel-container {
    min-height: 60vh;
  }

  .hero-carousel .carousel-slide {
    min-height: 60vh;
  }

  /* Page Hero */
  .page-hero {
    padding: 6rem 0 2rem;
  }

  .page-hero-title {
    font-size: 2rem;
  }

  /* Carousel Navigation */
  .carousel-nav {
    width: 40px;
    height: 40px;
  }

  .carousel-prev {
    left: 10px;
  }

  .carousel-next {
    right: 10px;
  }

  .carousel-dots {
    bottom: 10px;
    gap: 8px;
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
  }

  /* Filter Buttons */
  .filter-buttons {
    gap: 0.5rem;
  }

  .filter-btn {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
  }

  /* References Grid */
  .references-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }

  /* Tabs */
  .tabs-nav {
    flex-direction: column;
    gap: 0;
  }

  .tab-button {
    width: 100%;
    text-align: left;
    border-radius: 0;
    border-bottom: 1px solid var(--neutral-light);
  }

  /* Toast */
  .toast-container {
    bottom: 20px;
    right: 20px;
    left: 20px;
  }

  .toast {
    min-width: 100%;
  }

  /* Modal */
  .modal {
    max-width: 95%;
    max-height: 95vh;
  }

  .modal-header,
  .modal-body,
  .modal-footer {
    padding: var(--spacing-sm);
  }
}

/* Tablet (768px - 1024px) */
@media (min-width: 768px) and (max-width: 1024px) {
  /* References Grid */
  .references-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Small Mobile (< 480px) */
@media (max-width: 480px) {
  .btn-group {
    flex-direction: column;
  }

  .btn {
    width: 100%;
  }

  .carousel-nav {
    width: 35px;
    height: 35px;
  }

  .references-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .reference-logo {
    padding: 1rem;
  }

  .filter-buttons {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-btn {
    text-align: center;
  }
}

/* Landscape Mobile */
@media (max-width: 896px) and (orientation: landscape) {
  .hero-carousel {
    min-height: 50vh;
  }

  .hero-carousel .carousel-container,
  .hero-carousel .carousel-slide {
    min-height: 50vh;
  }
}
