/*
Theme Name: Ecostewards Maldives
Theme URI: https://ecostewards.mv
Author: Ecostewards Team
Author URI: https://ecostewards.mv
Description: Liquid Glass, Times New Roman aesthetic, high performance theme for Ecostewards Maldives Environmental Organization. Built with stationary hero ocean background and custom CMS integration.
Version: 1.0.0
Text Domain: ecostewards
*/

:root {
  /* Premium Color Palette */
  --c-ocean-deep: #052436;      /* Darker, richer navy */
  --c-ocean-blue: #0A4361;      /* Secondary navy */
  --c-turquoise: #02C39A;       /* Vibrant Maldivian teal */
  --c-turquoise-dark: #009877;  /* Accessible dark teal */
  --c-green-natural: #2A9D8F;
  --c-coral: #E76F51;
  --c-sunset: #F4A261;
  --c-sand: #EAE6D5;            /* Sand tone */
  --c-sand-light: #F7F5EF;      /* Subtle off-white sand */
  --c-white: #FFFFFF;
  --c-text-main: #1D2A32;       /* High-contrast rich charcoal */
  --c-text-muted: #4A5B64;      /* Clear readable muted */
  
  /* Liquid Glass System Tokens */
  --glass-blur: 16px;
  --glass-bg-white: rgba(255, 255, 255, 0.78);
  --glass-bg-white-subtle: rgba(255, 255, 255, 0.62);
  --glass-bg-sand: rgba(247, 245, 239, 0.82);
  --glass-bg-ocean: rgba(5, 36, 54, 0.82);
  --glass-bg-ocean-subtle: rgba(5, 36, 54, 0.65);
  --glass-bg-turquoise: rgba(2, 195, 154, 0.15);
  --glass-border-light: rgba(255, 255, 255, 0.55);
  --glass-border-ocean: rgba(5, 36, 54, 0.12);
  --glass-border-turquoise: rgba(2, 195, 154, 0.35);
  --glass-shadow: 0 10px 32px 0 rgba(2, 27, 43, 0.08), inset 0 1px 1px 0 rgba(255, 255, 255, 0.6);
  --glass-shadow-hover: 0 18px 45px 0 rgba(2, 27, 43, 0.14), inset 0 1px 2px 0 rgba(255, 255, 255, 0.8);
  --glass-shadow-ocean: 0 12px 36px 0 rgba(2, 27, 43, 0.35), inset 0 1px 1px 0 rgba(255, 255, 255, 0.2);

  /* Typography - Times New Roman across entire site */
  --font-heading: 'Times New Roman', Times, Georgia, serif;
  --font-body: 'Times New Roman', Times, Georgia, serif;
  
  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;

  /* Transitions */
  --transition-fast: 0.15s ease-out;
  --transition-normal: 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-slow: 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  
  /* Border Radii */
  --br-sm: 8px;
  --br-md: 16px;
  --br-lg: 24px;
  --br-xl: 36px;
  --br-full: 9999px;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-body);
  font-size: 1.1rem;
  line-height: 1.65;
  color: var(--c-text-main);
  background-color: var(--c-ocean-deep);
  position: relative;
  min-height: 100vh;
}

/* Global Fixed Non-Moving Hero Ocean Background */
.global-fixed-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-image: url('assets/hero.jpg');
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  z-index: -999;
  pointer-events: none;
  transform: translate3d(0, 0, 0);
  will-change: transform;
}

.global-fixed-backdrop::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    180deg,
    rgba(5, 36, 54, 0.38) 0%,
    rgba(5, 36, 54, 0.50) 45%,
    rgba(5, 36, 54, 0.68) 100%
  );
  pointer-events: none;
}

/* Top Navigation Bar */
.navbar-top {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 1.25rem 0;
  z-index: 1000;
  pointer-events: none;
  transition: all var(--transition-normal);
}

.navbar-top.scrolled {
  padding: 0.85rem 0;
  background: linear-gradient(180deg, rgba(5, 36, 54, 0.55) 0%, rgba(5, 36, 54, 0) 100%);
  backdrop-filter: blur(4px);
}

.navbar-top-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.navbar-logo {
  font-family: var(--font-heading);
  font-size: 1.7rem;
  font-weight: 800;
  color: #FFFFFF;
  text-decoration: none;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.9);
  pointer-events: auto;
}

.navbar-logo span {
  color: var(--c-turquoise);
}

.navbar-top-right {
  display: flex;
  align-items: center;
  gap: 1rem;
  pointer-events: auto;
}

.admin-top-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(5, 36, 54, 0.8);
  backdrop-filter: blur(16px);
  color: #FFFFFF;
  padding: 8px 16px;
  border-radius: var(--br-full);
  font-size: 0.85rem;
  font-weight: 700;
  border: 1px solid rgba(2, 195, 154, 0.5);
  text-decoration: none;
  transition: all var(--transition-fast);
}

.admin-top-trigger:hover {
  background: var(--c-turquoise);
  color: var(--c-ocean-deep);
  transform: translateY(-2px);
}

.admin-pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-turquoise);
  animation: adminPulse 2s infinite;
}

@keyframes adminPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 195, 154, 0.7); }
  70% { transform: scale(1.1); box-shadow: 0 0 0 6px rgba(2, 195, 154, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(2, 195, 154, 0); }
}

/* Bottom Center Floating Liquid Glass Dock */
.navbar-bottom-dock {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  pointer-events: none;
  display: flex;
  justify-content: center;
  align-items: center;
  max-width: 96vw;
  width: auto;
}

.navbar-floating-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(28px) saturate(200%);
  -webkit-backdrop-filter: blur(28px) saturate(200%);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: var(--br-full);
  padding: 0.4rem 0.6rem 0.4rem 0.8rem;
  box-shadow: 0 16px 40px rgba(2, 27, 43, 0.28), inset 0 1px 2px rgba(255, 255, 255, 0.95);
  pointer-events: auto;
  transition: all var(--transition-normal);
  white-space: nowrap;
}

.navbar-floating-pill:hover {
  background: rgba(255, 255, 255, 0.96);
  transform: translateY(-2px);
}

.navbar-links {
  display: flex;
  gap: 0.2rem;
  align-items: center;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--c-ocean-deep);
  text-decoration: none;
  padding: 0.45rem 0.65rem;
  border-radius: var(--br-full);
  transition: all var(--transition-fast);
}

.nav-icon {
  display: none;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
}

.nav-link:hover, .nav-link.active {
  color: var(--c-turquoise-dark);
  background: rgba(2, 195, 154, 0.16);
}

.nav-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 1.1rem;
  font-size: 0.88rem;
  font-weight: 700;
  border-radius: var(--br-full);
  background: var(--c-coral);
  color: #FFFFFF;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(231, 111, 81, 0.35);
  transition: all var(--transition-fast);
}

.nav-btn-icon {
  display: none;
}

.nav-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(231, 111, 81, 0.45);
}

/* Tablet and Large Mobile Floating Dock Optimization (Icon + Text or Compact Text) */
@media (max-width: 1024px) {
  .nav-link {
    padding: 0.4rem 0.5rem;
    font-size: 0.85rem;
    gap: 0.25rem;
  }
  .nav-btn {
    padding: 0.4rem 0.9rem;
    font-size: 0.82rem;
  }
}

/* Mobile & Tablet Compact View (Icon-First Liquid Glass Dock) */
@media (max-width: 820px) {
  .navbar-bottom-dock {
    bottom: 1rem;
    max-width: 98vw;
  }
  
  .navbar-floating-pill {
    padding: 0.35rem 0.5rem;
    gap: 0.25rem;
    border-radius: 40px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 12px 36px rgba(2, 27, 43, 0.32);
  }

  .navbar-links {
    gap: 0.15rem;
  }

  .nav-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
  }

  .nav-text {
    display: none; /* Hide long names on mobile to fit seamlessly */
  }

  .nav-link {
    padding: 0.55rem;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .nav-link.active {
    background: var(--c-ocean-deep);
    color: var(--c-turquoise);
    transform: scale(1.08);
  }

  .nav-btn-text {
    display: none;
  }

  .nav-btn-icon {
    display: inline-block;
    font-size: 1.1rem;
  }

  .nav-btn {
    padding: 0.55rem;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(231, 111, 81, 0.4);
  }
}

@media (max-width: 380px) {
  .nav-link {
    width: 34px;
    height: 34px;
    padding: 0.4rem;
  }
  .nav-icon {
    width: 17px;
    height: 17px;
  }
  .nav-btn {
    width: 34px;
    height: 34px;
  }
}

/* Glass Cards & Containers */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.page-header {
  padding: 120px 0 60px;
  text-align: center;
}

.page-header h1, h1 {
  color: #FFFFFF !important;
  font-weight: 700;
  text-shadow: 0 4px 20px rgba(0, 0, 0, 0.7), 0 1px 3px rgba(0, 0, 0, 0.9);
  margin-bottom: 0.5rem;
}

.page-header p, .lead {
  color: #FFFFFF !important;
  font-weight: 600;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7);
  max-width: 750px;
  margin: 0 auto;
}

.glass-card, .list-card, .person-card, .filter-card, .form-wrapper, .detail-card {
  background: var(--glass-bg-white) !important;
  backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(160%);
  border: 1px solid var(--glass-border-light) !important;
  border-radius: var(--br-lg);
  box-shadow: var(--glass-shadow);
  color: var(--c-text-main);
  padding: 2rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: inherit;
  font-weight: 700;
  padding: 0.75rem 1.5rem;
  border-radius: var(--br-full);
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: all var(--transition-fast);
}

.btn-primary {
  background: var(--c-ocean-deep);
  color: #FFFFFF;
}

.btn-primary:hover {
  background: var(--c-turquoise-dark);
  color: #FFFFFF;
  transform: translateY(-2px);
}

.btn-accent {
  background: var(--c-coral);
  color: #FFFFFF;
}

/* Grids */
.list-grid, .people-grid, .features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 2rem;
}

/* Mobile & Responsive Adjustments */
@media (max-width: 768px) {
  .navbar-top-container {
    padding: 0.75rem 1rem;
  }
  .navbar-logo {
    font-size: 1.35rem;
  }
  .admin-top-trigger {
    padding: 5px 12px;
    font-size: 0.75rem;
  }
  .page-header {
    padding: 90px 0 35px;
  }
  .page-header h1, h1 {
    font-size: 1.9rem;
  }
  .section {
    padding: 3rem 0;
  }
  .glass-card, .list-card, .person-card, .filter-card, .form-wrapper, .detail-card {
    padding: 1.25rem;
  }
  .list-grid, .people-grid, .features-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }
  .site-footer {
    padding-bottom: 6.5rem; /* Ensure bottom dock never overlaps footer text */
  }
}

/* Footer */
.site-footer {
  background: rgba(5, 36, 54, 0.92);
  backdrop-filter: blur(16px);
  color: #FFFFFF;
  padding: 4rem 0 7rem;
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.site-footer a {
  color: var(--c-turquoise);
  text-decoration: none;
}
