/*
 * Professional Enhancements for Worldwide Access To Clean Water
 * Modern, trustworthy, impactful design system
 */

:root {
  /* Refined professional palette - water-inspired, trustworthy */
  --prof-primary: #0e7c86;
  --prof-primary-dark: #0a5f66;
  --prof-primary-light: #e6f4f5;
  --prof-secondary: #1e3a4c;
  --prof-accent: #0891b2;
  --prof-accent-light: #e0f2fe;
  --prof-success: #059669;
  --prof-warm: #f59e0b;
  
  /* Neutrals - warmer, more sophisticated */
  --prof-gray-50: #f8fafc;
  --prof-gray-100: #f1f5f9;
  --prof-gray-200: #e2e8f0;
  --prof-gray-600: #475569;
  --prof-gray-700: #334155;
  --prof-gray-900: #0f172a;
  
  /* Shadows - softer, more modern */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
  --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
  
  /* Radius */
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
}

/* ============ TYPOGRAPHY ============ */
body {
  font-family: 'Metropolis', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  color: var(--prof-gray-700);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--prof-gray-900);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  position: relative;
}

h2::after {
  content: '';
  display: block;
  width: 60px;
  height: 4px;
  background: linear-gradient(90deg, var(--prof-primary), var(--prof-accent));
  border-radius: 2px;
  margin-top: 12px;
}

.text-center h2::after {
  margin-left: auto;
  margin-right: auto;
}

/* ============ NAVIGATION ============ */
.navbar {
  background: rgba(255, 255, 255, 0.95) !important;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--prof-gray-200);
  padding: 12px 0;
  transition: all 0.3s ease;
}

.site-header {
  background: var(--prof-primary-dark) !important;
}

.site-header-inner,
.site-header-contact,
.site-header-tools {
  display: flex;
  align-items: center;
}

.site-header-inner {
  justify-content: space-between;
  gap: 24px;
  min-height: 42px;
}

.site-header-contact {
  flex: 1 1 auto;
  gap: 24px;
  min-width: 0;
}

.site-header-address,
.site-header-email {
  display: flex;
  align-items: center;
  margin: 0;
  color: white;
  font-size: 0.875rem;
  line-height: 1.35;
}

.site-header-address {
  white-space: nowrap;
}

.site-header-email a {
  color: white;
  overflow-wrap: anywhere;
}

.site-header-tools {
  flex: 0 0 auto;
  gap: 18px;
}

.site-header-language select {
  width: 160px;
  min-height: 38px;
  padding-top: 6px;
  padding-bottom: 6px;
}

.site-header-social {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 0;
}

.site-header-social .social-icon-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: transparent;
  color: white;
  font-size: 1rem;
  line-height: 1;
  margin: 0;
}

.site-header-social .social-icon-link:hover {
  background: rgb(255 255 255 / 0.14);
  color: white;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar-brand img.logo {
  width: 48px;
  height: 48px;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}

.navbar-brand span {
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--prof-gray-900);
  line-height: 1.3;
}

.navbar-brand small {
  display: block;
  font-weight: 500;
  font-size: 0.75rem;
  color: var(--prof-primary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.navbar-nav .nav-link {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--prof-gray-700) !important;
  padding: 8px 16px !important;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.navbar-nav .nav-link:hover {
  color: var(--prof-primary) !important;
  background: var(--prof-primary-light);
}

/* ============ COOKIE CONSENT ============ */
.cookie-banner {
  position: fixed;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 1040;
  padding: 16px 0;
  color: white;
  background: var(--prof-gray-900);
  box-shadow: 0 -8px 24px rgb(15 23 42 / 0.18);
}

.cookie-content {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.cookie-content p {
  max-width: 820px;
  color: var(--prof-gray-200);
}

.cookie-content a {
  color: white;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cookie-actions {
  display: flex;
  flex-shrink: 0;
  gap: 8px;
}

/* ============ BUTTONS ============ */
.custom-btn {
  background: linear-gradient(135deg, var(--prof-primary), var(--prof-primary-dark)) !important;
  color: white !important;
  font-weight: 600 !important;
  padding: 14px 32px !important;
  border-radius: 50px !important;
  border: none !important;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
  text-transform: none !important;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.custom-btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg) !important;
  background: linear-gradient(135deg, var(--prof-primary-dark), var(--prof-primary)) !important;
  color: white !important;
}

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

.custom-border-btn {
  background: transparent !important;
  color: var(--prof-primary) !important;
  border: 2px solid var(--prof-primary) !important;
  box-shadow: none !important;
}

.custom-border-btn:hover {
  background: var(--prof-primary) !important;
  color: white !important;
  transform: translateY(-2px);
  box-shadow: var(--shadow-md) !important;
}

/* ============ HERO SECTION ============ */
.hero-section {
  position: relative;
}

.hero-section .carousel-item {
  height: 92vh;
  min-height: 600px;
}

.hero-section .carousel-image {
  object-fit: cover;
  height: 100%;
  width: 100%;
  filter: brightness(0.85);
}

#hero-slide .carousel-caption {
  background: linear-gradient(to top, rgba(15, 23, 42, 0.85) 0%, rgba(15, 23, 42, 0.4) 50%, transparent 100%);
  left: 0;
  right: 0;
  bottom: 0;
  top: 0;
  min-width: 0;
  min-height: 0;
  padding: 80px;
  clip-path: none;
  display: flex !important;
  flex-direction: column;
  justify-content: flex-end;
  align-items: flex-start;
  text-align: left;
}

.hero-section .carousel-caption h1 {
  font-size: 4rem;
  font-weight: 800;
  color: white;
  text-shadow: 0 2px 20px rgba(0,0,0,0.3);
  margin-bottom: 16px;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-section .carousel-caption p {
  font-size: 1.25rem;
  color: rgba(255,255,255,0.9);
  max-width: 600px;
  font-weight: 400;
  text-shadow: 0 1px 10px rgba(0,0,0,0.3);
}

.carousel-control-prev,
.carousel-control-next {
  width: 56px;
  height: 56px;
  background: rgba(255,255,255,0.15);
  backdrop-filter: blur(8px);
  border-radius: 50%;
  top: 50%;
  transform: translateY(-50%);
  margin: 0 24px;
  border: 1px solid rgba(255,255,255,0.2);
  transition: all 0.3s ease;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
  background: var(--prof-primary);
  border-color: var(--prof-primary);
}

/* ============ FEATURED BLOCKS ============ */
.featured-block {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--prof-gray-200);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
}

.featured-block:hover {
  transform: translateY(-8px);
  box-shadow: var(--shadow-xl);
  border-color: var(--prof-primary-light);
}

.featured-block-image {
  width: 72px;
  height: 72px;
  object-fit: contain;
  margin-bottom: 16px;
  padding: 12px;
  background: var(--prof-primary-light);
  border-radius: 16px;
  transition: transform 0.3s ease;
}

.featured-block:hover .featured-block-image {
  transform: scale(1.1) rotate(-5deg);
}

.featured-block-text {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--prof-gray-900);
  margin: 0;
}

.featured-block-text strong {
  color: var(--prof-primary);
}

/* ============ CUSTOM TEXT BOX ============ */
.custom-text-box {
  background: white;
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--prof-gray-200);
  margin-bottom: 24px;
}

.custom-text-box-image {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  transition: transform 0.5s ease;
}

.information-pamphlet-image {
  display: block;
  width: min(100%, 28rem);
  max-height: 36rem;
  height: auto;
  object-fit: contain;
  margin-inline: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
}

.custom-text-box-image:hover {
  transform: scale(1.02);
}

.custom-list-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--prof-gray-100);
  font-weight: 500;
}

.custom-list-item:last-child {
  border-bottom: none;
}

.custom-text-box-icon {
  color: var(--prof-primary);
  font-size: 1.25rem;
  background: var(--prof-primary-light);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

/* ============ CAUSE CARDS ============ */
.custom-block-wrap {
  background: white;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  border: 1px solid var(--prof-gray-200);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.custom-block-wrap:hover {
  transform: translateY(-10px);
  box-shadow: var(--shadow-xl);
}

.custom-block-image {
  height: 240px;
  object-fit: cover;
  width: 100%;
  transition: transform 0.6s ease;
}

.custom-block-wrap:hover .custom-block-image {
  transform: scale(1.05);
}

.custom-block {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
}

.custom-block-body h5 {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--prof-gray-900);
  margin-bottom: 12px;
}

.custom-block-body p {
  color: var(--prof-gray-600);
  font-size: 0.95rem;
  line-height: 1.7;
  flex: 1;
}

.progress {
  height: 8px;
  border-radius: 100px;
  background: var(--prof-gray-100);
  overflow: hidden;
}

.progress-bar {
  background: linear-gradient(90deg, var(--prof-primary), var(--prof-accent)) !important;
  border-radius: 100px;
}

/* ============ CTA SECTION ============ */
.cta-section {
  background: linear-gradient(135deg, var(--prof-secondary) 0%, var(--prof-primary-dark) 100%) !important;
  position: relative;
  overflow: hidden;
}

.cta-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.cta-section h2 {
  color: white !important;
  font-size: 2.75rem;
}

.cta-section h2::after {
  background: rgba(255,255,255,0.3);
}

/* ============ FORMS ============ */
.custom-form .form-control,
.auth-form .form-control {
  border: 2px solid var(--prof-gray-200);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  font-size: 1rem;
  transition: all 0.2s ease;
  background: var(--prof-gray-50);
}

.custom-form .form-control:focus,
.auth-form .form-control:focus {
  border-color: var(--prof-primary);
  background: white;
  box-shadow: 0 0 0 4px rgba(14, 124, 134, 0.1);
  outline: none;
}

.custom-form .form-control::placeholder,
.auth-form .form-control::placeholder {
  color: #94a3b8;
}

.auth-panel h1 {
  margin-bottom: 12px;
  font-size: 2rem;
}

.auth-intro,
.auth-alternate {
  color: var(--prof-gray-600);
}

.auth-form .form-label {
  color: var(--prof-gray-900);
  font-weight: 600;
}

.auth-form .form-text,
.auth-form ul {
  color: var(--prof-gray-600);
  font-size: 0.875rem;
  line-height: 1.5;
}

.auth-alternate {
  margin: 20px 0 0;
}

.auth-alternate a {
  color: var(--prof-primary-dark);
  font-weight: 600;
}

.input-group-file label {
  color: var(--prof-gray-700);
}

.contact-info-wrap {
  background: white;
  border-radius: var(--radius-xl);
  padding: 36px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--prof-gray-200);
}

.contact-info-wrap h2 {
  font-size: 1.75rem;
}

.avatar-image {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--prof-primary-light);
}

/* ============ SECTION SPACING ============ */
.section-padding {
  padding: 72px 0;
}

.section-bg {
  background: var(--prof-gray-50) !important;
  position: relative;
}

/* ============ FOOTER ============ */
.site-footer {
  background: linear-gradient(180deg, var(--prof-gray-900) 0%, #0b1220 100%) !important;
  padding-top: 80px;
}

.site-footer .logo {
  display: block;
  width: 120px;
  height: auto;
}

.site-footer .site-footer-title {
  color: white;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 20px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.site-footer-bottom {
  background: var(--prof-gray-900) !important;
  color: var(--prof-gray-100);
}

.site-footer-bottom a {
  color: var(--prof-gray-100);
}

.site-footer a {
  color: #94a3b8;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: white;
  text-decoration: none;
}

/* ============ VOLUNTEER / PARTNER FORMS ============ */
.testimonial-section {
  background: white;
}

.volunteer-form,
.custom-form {
  background: white;
  border-radius: var(--radius-xl);
  padding: 40px;
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--prof-gray-200);
}

/* ============ NEWS CARDS ============ */
.news-block {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: all 0.3s ease;
  background: white;
  border: 1px solid var(--prof-gray-200);
}

.news-block:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-xl);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 575px) {
  .site-header-inner {
    gap: 12px;
    min-height: 42px;
  }

  .site-header-contact {
    flex: 1 1 auto;
    gap: 0;
  }

  .site-header-address,
  .site-header-social {
    display: none !important;
  }

  .site-header-email {
    font-size: 0.75rem;
  }

  .site-header-tools {
    gap: 0;
  }

  .site-header-language select {
    width: 132px;
    max-width: 38vw;
    font-size: 0.75rem;
  }

  .navbar .container {
    gap: 8px;
  }

  .navbar-brand {
    flex: 1 1 auto;
    max-width: calc(100% - 48px);
    min-width: 0;
    margin-right: 0;
    gap: 8px;
    white-space: normal;
  }

  .navbar-brand img.logo {
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
  }

  .navbar-brand span {
    min-width: 0;
    font-size: 0.9rem;
    line-height: 1.15;
  }

  .navbar-brand small {
    font-size: 0.65rem;
    line-height: 1.15;
  }

  .navbar-toggler {
    flex: 0 0 auto;
    margin-left: auto;
  }
}

@media (max-width: 991px) {
  .site-header-address {
    display: none !important;
  }
}

@media (max-width: 768px) {
  .site-footer {
    padding-top: 40px;
  }

  .cookie-banner {
    padding: 12px 0;
  }

  .cookie-content {
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
  }

  .cookie-actions {
    flex-wrap: wrap;
  }

  h2 {
    font-size: 2rem;
  }
  
  #hero-slide .carousel-caption {
    padding: 40px 24px;
  }
  
  #hero-slide .carousel-caption h1 {
    font-size: 2.5rem;
  }
  
  .hero-section .carousel-caption p {
    font-size: 1.1rem;
  }
  
  .section-padding {
    padding: 48px 0;
  }
  
  .custom-form,
  .volunteer-form,
  .contact-info-wrap {
    padding: 24px;
  }
}

/* ============ ANIMATIONS ============ */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section-padding > .container {
  animation: fadeInUp 0.6s ease-out;
}

/* ============ ACCESSIBILITY ============ */
a:focus,
button:focus,
.form-control:focus {
  outline: 2px solid var(--prof-primary);
  outline-offset: 2px;
}

/* ============ SCROLLBAR ============ */
::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: var(--prof-gray-100);
}

::-webkit-scrollbar-thumb {
  background: var(--prof-primary);
  border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--prof-primary-dark);
}
