/* Global reference code - Start */

/* Frontend Styles for TERAL Global References */

.teral-gr-references {
  margin: 20px 0;
}

.references-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 30px;
  margin-top: 30px;
}

.reference-item {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.reference-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.reference-image {
  position: relative;
  height: 250px;
  overflow: hidden;
}

.reference-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

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

.reference-content {
  padding: 25px;
}

.reference-title {
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 15px 0;
  color: #333;
  line-height: 1.3;
}

.reference-meta {
  margin-bottom: 15px;
}

.reference-meta p {
  margin: 5px 0;
  font-size: 0.9em;
  color: #666;
}

.reference-meta strong {
  color: #333;
  font-weight: 600;
}

.reference-description {
  margin-bottom: 20px;
  color: #555;
  line-height: 1.6;
}

.reference-actions {
  text-align: center;
}

.btn {
  display: inline-block;
  padding: 12px 24px;
  text-decoration: none;
  border-radius: 5px;
  font-weight: 500;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
}

.btn-primary {
  background: #0073aa;
  color: white;
}

.btn-primary:hover {
  background: #005a87;
  color: white;
  text-decoration: none;
}

.btn-secondary {
  background: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background: #545b62;
  color: white;
  text-decoration: none;
}

/* Single Reference Detail Page */
.global-reference-detail {
  padding: 40px 0;
  background: #f8f9fa;
  min-height: 100vh;
}

.reference-header {
  text-align: center;
  margin-bottom: 40px;
  padding: 40px 0;
  background: linear-gradient(135deg, #0073aa 0%, #005a87 100%);
  color: white;
}

.reference-header h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 10px 0;
}

.reference-subtitle {
  font-size: 1.2em;
  opacity: 0.9;
  margin: 0;
}

.container {
  max-width: 1200px;
  margin: 80px auto;
  padding: 0 20px;
}

.reference-overview,
.reference-description,
.reference-details,
.reference-benefits,
.reference-images {
  background: white;
  /* padding: 30px; */
  margin-bottom: 30px;
  border-radius: 10px;
  /* box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); */
}

.reference-overview h2,
.reference-description h2,
.reference-details h2,
.reference-benefits h2,
.reference-images h2 {
  color: #333;
  margin: 0 0 20px 0;
  font-size: 1.5em;
  font-weight: 600;
  border-bottom: 2px solid #0073aa;
  padding-bottom: 10px;
}

.overview-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}

.overview-image img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.description-content,
.benefits-content {
  font-size: 1.1em;
  line-height: 1.7;
  color: #555;
}

.details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.detail-item {
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  border-left: 4px solid #0073aa;
}

.detail-item strong {
  display: block;
  color: #333;
  font-weight: 600;
  margin-bottom: 5px;
}

.detail-item span {
  color: #666;
}

.before-images,
.after-images {
  margin-bottom: 30px;
}

.before-images h2,
.after-images h2 {
  color: #dc3545;
  border-bottom-color: #dc3545;
}

.after-images h2 {
  color: #28a745;
  border-bottom-color: #28a745;
}

.images-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 20px;
}

.image-item img {
  width: 100%;
  height: 200px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease;
}

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

.reference-navigation {
  text-align: center;
  margin-top: 40px;
}

/* Responsive Design */
@media (max-width: 768px) {
  .references-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .reference-header h1 {
    font-size: 2em;
  }

  .reference-header {
    padding: 30px 0;
  }

  .container {
    padding: 0 15px;
  }

  .reference-overview,
  .reference-description,
  .reference-details,
  .reference-benefits,
  .reference-images {
    padding: 20px;
    margin-bottom: 20px;
  }

  .details-grid {
    grid-template-columns: 1fr;
  }

  .overview-images {
    grid-template-columns: 1fr;
  }

  .images-grid {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  }

  .image-item img {
    height: 150px;
  }
}

@media (max-width: 480px) {
  .reference-header h1 {
    font-size: 1.8em;
  }

  .reference-subtitle {
    font-size: 1em;
  }

  .images-grid {
    grid-template-columns: 1fr;
  }

  .btn {
    padding: 10px 20px;
    font-size: 0.9em;
  }
}

/* Lightbox Styles */
.teral-gr-lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  z-index: 10000;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 100%;
  border-radius: 8px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  font-size: 24px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s ease;
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 1);
}

body.lightbox-open {
  overflow: hidden;
}

/* Loading Animation */
body.loading::after {
  content: "";
  position: fixed;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 4px solid #0073aa;
  border-top: 4px solid transparent;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  z-index: 9999;
}

/* Message Styles */
.teral-gr-message {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 15px 20px;
  border-radius: 5px;
  color: white;
  font-weight: 500;
  z-index: 10000;
  animation: slideIn 0.3s ease;
}

.teral-gr-message.success {
  background: #28a745;
}

.teral-gr-message.error {
  background: #dc3545;
}

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

/* Form Error Styles */
input.error,
textarea.error {
  border-color: #dc3545 !important;
  box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

/* Image placeholder */
.image-placeholder {
  width: 100%;
  height: 200px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6c757d;
  font-size: 14px;
  text-align: center;
  border: 2px dashed #dee2e6;
  border-radius: 8px;
}

/* Global reference code - End */
