/* Custom Styles for GRCConsult */

:root {
  --primary-color: #0d6efd;
  --secondary-color: #6c757d;
  --success-color: #198754;
  --danger-color: #dc3545;
  --warning-color: #ffc107;
  --info-color: #0dcaf0;
  --light-color: #f8f9fa;
  --dark-color: #212529;
}

/* Global Styles */
body {
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  line-height: 1.6;
  padding-top: 76px; /* Account for fixed navbar */
}

/* Navigation */
.navbar-brand img {
  max-height: 40px;
  width: auto;
}

.navbar-nav .nav-link {
  font-weight: 500;
  transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
  color: rgba(255, 255, 255, 0.8) !important;
}

/* Hero Section */
.hero-slide {
  height: 70vh;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
}

/* Hero Slider Styles */
.carousel-item {
  transition: transform 0.6s ease-in-out;
}

.carousel-control-prev,
.carousel-control-next {
  width: 5%;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
  width: 2rem;
  height: 2rem;
}

.carousel-indicators {
  bottom: 2rem;
}

.carousel-indicators [data-bs-target] {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  margin: 0 4px;
}

/* Responsive adjustments for slider */
@media (max-width: 768px) {
  .hero-slide {
    height: 50vh;
    min-height: 400px !important;
  }

  .hero-slide .row {
    min-height: 400px !important;
  }

  .hero-slide .display-4 {
    font-size: 2rem;
  }

  .hero-slide .lead {
    font-size: 1rem;
  }

  .display-4 {
    font-size: 2rem;
  }

  .admin-sidebar {
    min-height: auto;
  }
}

@media (max-width: 576px) {
  .hero-slide {
    height: 40vh;
  }

  .container {
    padding-left: 15px;
    padding-right: 15px;
  }
}

/* Cards */
.card {
  transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
  border: none;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1) !important;
}

.card-img-top {
  height: 200px;
  object-fit: cover;
}

/* Buttons */
.btn {
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  transition: all 0.3s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn.loading {
  pointer-events: none;
  opacity: 0.6;
}

/* Forms */
.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Footer */
footer {
  margin-top: auto;
  background-color: #1e293b;
  color: white;
}

footer a {
  color: rgba(255, 255, 255, 0.8);
  text-decoration: none;
  transition: color 0.3s ease;
}

footer a:hover {
  color: white;
}

/* Main content spacing */
.main-content {
  padding-top: 76px; /* Account for fixed navbar */
}

/* Admin Panel Styles */
.admin-sidebar {
  min-height: calc(100vh - 76px);
  background: var(--dark-color);
}

.admin-sidebar .nav-link {
  color: rgba(255, 255, 255, 0.8);
  padding: 0.75rem 1rem;
  border-radius: 0.375rem;
  margin-bottom: 0.25rem;
  transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover {
  color: white;
  background-color: rgba(255, 255, 255, 0.1);
}

.admin-sidebar .nav-link.active {
  color: white;
  background-color: rgba(255, 255, 255, 0.2);
}

.admin-sidebar .nav-link i {
  width: 20px;
  margin-right: 0.5rem;
}

/* Tables */
.table th {
  border-top: none;
  font-weight: 600;
  background-color: #f8f9fa;
}

/* Alerts */
.alert {
  border: none;
  border-radius: 0.5rem;
}

/* Loading Spinner */
.spinner-border-sm {
  width: 1rem;
  height: 1rem;
}

/* Image Upload Preview */
.image-preview {
  max-width: 200px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 0.375rem;
}

/* Blog Post Styles */
.blog-post-content {
  font-size: 1.1rem;
  line-height: 1.8;
}

.blog-post-content h1,
.blog-post-content h2,
.blog-post-content h3,
.blog-post-content h4,
.blog-post-content h5,
.blog-post-content h6 {
  margin-top: 2rem;
  margin-bottom: 1rem;
}

.blog-post-content p {
  margin-bottom: 1.5rem;
}

.blog-post-content img {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
  margin: 1rem 0;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .navbar-collapse {
    background-color: rgba(13, 110, 253, 0.95);
    margin-top: 1rem;
    border-radius: 0.5rem;
    padding: 1rem;
  }
}

/* Print Styles */
@media print {
  .navbar,
  .admin-sidebar,
  footer,
  #backToTop,
  .btn,
  .carousel-control-prev,
  .carousel-control-next,
  .carousel-indicators {
    display: none !important;
  }

  .admin-content {
    margin-left: 0 !important;
  }

  .main-content {
    padding-top: 0 !important;
  }
}

/* Accessibility */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus styles for better accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
  outline: 2px solid var(--primary-color);
  outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    border: 2px solid var(--dark-color);
  }

  .btn-outline-primary {
    border-width: 2px;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Featured badge styling */
.badge {
  font-size: 0.75em;
}
