/* GF Group Custom Styles */

/* ========================================
   Layout & Background
   ======================================== */

/* Wood background for HTML element */
.bg-wood,
html.bg-wood {
  background-image: url(/assets/images/hout_142e2dc8.jpg);
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  background-repeat: no-repeat;
}

/* ========================================
   Hero Section
   ======================================== */

/* Hero section with dark gradient overlay */
.hero-section {
  position: relative;
  background: linear-gradient(
    135deg,
    rgba(0, 0, 0, 0.75) 0%,
    rgba(33, 37, 41, 0.65) 50%,
    rgba(0, 0, 0, 0.75) 100%
  );
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* Hero content container */
.hero-content {
  padding: 2rem 1rem;
}

/* Hero title with text shadow for maximum readability */
.hero-title {
  text-shadow:
    0 2px 4px rgba(0, 0, 0, 0.8),
    0 4px 8px rgba(0, 0, 0, 0.6),
    0 0 20px rgba(0, 0, 0, 0.4);
  letter-spacing: -0.02em;
}

/* Hero subtitle */
.hero-subtitle {
  text-shadow:
    0 1px 3px rgba(0, 0, 0, 0.8),
    0 2px 6px rgba(0, 0, 0, 0.5);
  font-weight: 300;
  opacity: 0.95;
}

/* Members header box */
.members-header {
  background: rgba(33, 37, 41, 0.95) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ========================================
   Typography & Readability
   ======================================== */

body {
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Improved text readability */
.content-text,
.content-box p {
  line-height: 1.7;
  max-width: 75ch; /* Optimal reading width */
}

.content-text h2,
.content-box h2 {
  margin-top: 1.5rem;
  margin-bottom: 1rem;
  font-weight: 600;
}

/* Better text contrast on dark backgrounds */
.text-white-50 {
  opacity: 0.85;
}

/* ========================================
   Components
   ======================================== */

/* Content boxes */
.content-box {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Member Cards */
.member-card {
  width: 17rem;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

.member-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.4) !important;
}

.member-card-link {
  color: inherit;
  position: relative;
}

/* Member card images - consistent sizing */
.member-card-image {
  object-fit: cover;
  height: 12.6rem;
  transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.member-card:hover .member-card-image {
  transform: scale(1.1);
}

/* Member card overlay link effect */
.member-card-overlay-link {
  background: rgba(0, 0, 0, 0.7);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.member-card:hover .member-card-overlay-link {
  opacity: 1;
}

.member-card-overlay-link .btn {
  transform: translateY(10px);
  transition: transform 0.3s ease;
  pointer-events: none;
}

.member-card:hover .member-card-overlay-link .btn {
  transform: translateY(0);
}

/* Lightbox link for image - sits below overlay */
.member-card-img-wrapper .glightbox {
  position: relative;
  z-index: 1;
  cursor: zoom-in;
}

/* Member card body */
.member-card .card-body {
  min-height: 4rem;
  transition: background-color 0.3s ease;
}

.member-card:hover .card-body {
  background-color: #1a1d20 !important;
}

/* Glass effect for dark containers */
.glass-effect {
  background: rgba(33, 37, 41, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* ========================================
   Buttons & CTA
   ======================================== */

.btn {
  transition: all 0.3s ease;
  font-weight: 500;
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
  border: none;
}

.btn-primary:hover {
  background: linear-gradient(135deg, #0a58ca 0%, #084298 100%);
}

.btn svg {
  transition: transform 0.3s ease;
}

.btn:hover svg {
  transform: translateX(3px);
}

/* ========================================
   Responsive Maps
   ======================================== */

/* Responsive iframe wrapper */
.responsive-map-wrapper {
  position: relative;
  padding-bottom: 75%; /* 4:3 aspect ratio */
  height: 0;
  overflow: hidden;
}

.responsive-map-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ========================================
   Navigation
   ======================================== */

/* Breadcrumbs */
.breadcrumb-nav {
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
}

.breadcrumb-item + .breadcrumb-item::before {
  content: "›";
  color: rgba(255, 255, 255, 0.5);
  font-size: 1.2em;
  padding: 0 0.5rem;
}

.breadcrumb-item a {
  transition: color 0.3s ease;
}

.breadcrumb-item a:hover {
  color: #fff !important;
}

/* Active nav link indicator */
.nav-link {
  position: relative;
  transition: color 0.3s ease;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #fff;
  transform: translateX(-50%);
  transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 80%;
}

.nav-link.active {
  font-weight: 600;
}

/* Navbar animation */
.navbar {
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

/* Hamburger menu animation */
.navbar-toggler {
  transition: opacity 0.3s ease;
}

.navbar-toggler:hover {
  opacity: 0.8;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 0.25rem rgba(255, 255, 255, 0.25);
}

/* ========================================
   Accessibility & UX
   ======================================== */

/* Ensure focus states are visible for keyboard navigation */
a:focus-visible,
button:focus-visible,
.nav-link:focus-visible {
  outline: 3px solid #0d6efd;
  outline-offset: 3px;
  border-radius: 2px;
}

/* Remove default focus for mouse users */
a:focus:not(:focus-visible),
button:focus:not(:focus-visible) {
  outline: none;
}

/* Skip to content link */
.skip-to-content {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: #0d6efd;
  color: #fff;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: 0 0 0.5rem 0.5rem;
  font-weight: 600;
  z-index: 10000;
  transition: top 0.3s ease;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.skip-to-content:focus {
  top: 0;
}

/* Reduced motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   Loading States & Feedback
   ======================================== */

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spinner 0.6s linear infinite;
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* Skeleton loading for images */
.skeleton {
  background: linear-gradient(
    90deg,
    #2a2d30 25%,
    #3a3d40 50%,
    #2a2d30 75%
  );
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Empty state */
.empty-state {
  text-align: center;
  padding: 3rem 1rem;
  color: #fff;
}

.empty-state-icon {
  font-size: 3rem;
  opacity: 0.5;
  margin-bottom: 1rem;
}

/* ========================================
   Performance Optimizations
   ======================================== */

/* Optimize repaints */
.navbar,
.card {
  will-change: auto;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* ========================================
   Print Styles
   ======================================== */

@media print {
  .navbar,
  footer {
    display: none;
  }

  html.bg-wood {
    background: white;
  }

  body {
    background: white;
    color: black;
  }
}

/* ========================================
   Mobile Optimizations
   ======================================== */

@media (max-width: 768px) {
  /* Hero section adjustments */
  .hero-title {
    font-size: 2.5rem !important;
  }

  .hero-subtitle {
    font-size: 1.25rem !important;
  }

  .hero-content {
    padding: 1.5rem 0.5rem;
  }

  .members-header {
    padding: 1rem !important;
  }

  /* Member cards responsive */
  .member-card {
    width: calc(50% - 0.75rem); /* 2 columns on mobile */
    min-width: 140px;
  }

  .member-card-image {
    height: 10rem; /* Slightly smaller on mobile */
  }

  /* CTA buttons stack on mobile */
  .btn-lg {
    font-size: 1rem;
    padding: 0.75rem 1.25rem;
  }

  /* Content padding */
  .content-box {
    padding: 1.5rem !important;
  }

  /* Larger touch targets */
  .nav-link {
    padding: 1rem !important;
    min-height: 48px;
    font-size: 1.1rem;
  }

  .footer a {
    padding: 0.75rem 0.5rem;
    min-height: 48px;
    display: inline-block;
  }

  /* Member grid spacing */
  .member-grid {
    gap: 0.75rem !important;
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .member-card {
    width: 100%; /* Full width on very small screens */
  }

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

  .hero-subtitle {
    font-size: 1.1rem !important;
  }
}

/* Tablet optimizations */
@media (min-width: 769px) and (max-width: 1199px) {
  .member-card {
    width: calc(33.333% - 1rem); /* 3 columns on tablet */
  }
}

/* Large desktop */
@media (min-width: 1400px) {
  .container {
    max-width: 1320px;
  }

  .member-card {
    width: 18rem; /* Slightly larger cards */
  }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
  /* Disable hover effects on touch devices */
  .member-card:hover {
    transform: none;
  }

  /* Show overlay button by default on touch */
  .member-card-overlay-link {
    opacity: 0.9;
  }

  /* Larger tap targets */
  .btn {
    min-height: 48px;
    min-width: 48px;
  }
}

/* Landscape mobile */
@media (max-height: 500px) and (orientation: landscape) {
  .navbar-brand img {
    height: 50px !important;
  }

  .py-4, .py-md-5 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
  }
}
