/* =========================================================
   POORVAM IDEAS - FOOTER & MOBILE NAVIGATION
   Version: 2.0 - Production Ready
   ========================================================= */

/* ===== CRITICAL RESETS ===== */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body.menu-open {
  overflow: hidden !important;
  height: 100vh !important;
  position: fixed !important;
  width: 100% !important;
}

@media (max-width: 768px) {
  body {
    padding-bottom: 85px;
  }
}

/* ===== ACCESSIBILITY ===== */
.skip-link {
  position: absolute;
  top: -100px;
  left: 0;
  background: #2F3E5C;
  color: #F6F1E7;
  padding: 8px 16px;
  text-decoration: none;
  z-index: 100000;
  border-radius: 0 0 4px 0;
  font-weight: 600;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 0;
}

/* ===== OFF-SCREEN MENU ===== */
#off-screen-menu {
  position: fixed !important;
  top: 0 !important;
  right: -100% !important;
  width: 85% !important;
  max-width: 380px !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: #F6F1E7 !important;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.2) !important;
  z-index: 100002 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  transition: right 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease !important;
  visibility: hidden !important;
  opacity: 0 !important;
  -webkit-overflow-scrolling: touch !important;
}

body.dark-mode #off-screen-menu {
  background: #1C1C1C !important;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.5) !important;
}

body.menu-open #off-screen-menu,
#off-screen-menu[aria-hidden="false"] {
  right: 0 !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Menu Header */
#off-screen-menu .menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, rgba(47, 62, 92, 0.08), rgba(90, 58, 46, 0.05));
  border-bottom: 2px solid rgba(90, 58, 46, 0.15);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(10px);
}

body.dark-mode #off-screen-menu .menu-header {
  background: linear-gradient(135deg, rgba(246, 241, 231, 0.08), rgba(90, 58, 46, 0.05));
  border-bottom-color: rgba(246, 241, 231, 0.15);
}

#off-screen-menu .menu-header h2 {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 700;
  color: #5A3A2E;
  letter-spacing: -0.5px;
}

body.dark-mode #off-screen-menu .menu-header h2 {
  color: #F6F1E7;
}

#off-screen-menu #close-menu {
  background: rgba(47, 62, 92, 0.1);
  border: none;
  font-size: 1.75rem;
  color: #5A3A2E;
  cursor: pointer;
  padding: 0;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  line-height: 1;
}

body.dark-mode #off-screen-menu #close-menu {
  color: #F6F1E7;
  background: rgba(246, 241, 231, 0.1);
}

#off-screen-menu #close-menu:hover {
  background: rgba(47, 62, 92, 0.2);
  transform: rotate(90deg);
}

/* Menu Content */
#off-screen-menu .menu-content {
  padding: 0.5rem 0 2rem;
}

#off-screen-menu .menu-content > div {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid rgba(90, 58, 46, 0.08);
}

body.dark-mode #off-screen-menu .menu-content > div {
  border-bottom-color: rgba(246, 241, 231, 0.08);
}

#off-screen-menu .menu-content h3 {
  margin: 0 0 1rem 0;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #6B6B6B;
}

body.dark-mode #off-screen-menu .menu-content h3 {
  color: #A0A0A0;
}

#off-screen-menu .menu-content ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

#off-screen-menu .menu-content ul li {
  margin-bottom: 0.5rem;
}

#off-screen-menu .menu-content ul li:last-child {
  margin-bottom: 0;
}

#off-screen-menu .menu-content a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0.85rem 1rem;
  text-decoration: none;
  color: #2F3E5C;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 10px;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
}

body.dark-mode #off-screen-menu .menu-content a {
  color: #F6F1E7;
}

#off-screen-menu .menu-content a::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 0;
  background: #2F3E5C;
  border-radius: 0 3px 3px 0;
  transition: height 0.25s ease;
}

body.dark-mode #off-screen-menu .menu-content a::before {
  background: #F6F1E7;
}

#off-screen-menu .menu-content a:hover {
  background: rgba(47, 62, 92, 0.1);
  transform: translateX(6px);
}

#off-screen-menu .menu-content a:hover::before {
  height: 100%;
}

body.dark-mode #off-screen-menu .menu-content a:hover {
  background: rgba(246, 241, 231, 0.1);
}

#off-screen-menu .menu-content a i {
  width: 22px;
  text-align: center;
  font-size: 1.15rem;
  flex-shrink: 0;
}

/* User Info Section */
#off-screen-menu .user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 1rem;
  background: rgba(47, 62, 92, 0.08);
  border-radius: 10px;
  margin-bottom: 1rem;
}

body.dark-mode #off-screen-menu .user-info {
  background: rgba(246, 241, 231, 0.08);
}

#off-screen-menu .user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2F3E5C, #5A3A2E);
  color: #F6F1E7;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 700;
  flex-shrink: 0;
}

#off-screen-menu .user-details {
  flex: 1;
  min-width: 0;
}

#off-screen-menu .user-details .user-name {
  font-weight: 700;
  font-size: 1rem;
  color: #2F3E5C;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-mode #off-screen-menu .user-details .user-name {
  color: #F6F1E7;
}

#off-screen-menu .user-details .user-email {
  font-size: 0.8rem;
  color: #6B6B6B;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

body.dark-mode #off-screen-menu .user-details .user-email {
  color: #A0A0A0;
}

/* Social Links */
#off-screen-menu .social-links {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

#off-screen-menu .social-links a {
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(47, 62, 92, 0.08);
  border-radius: 50%;
  color: #2F3E5C;
  font-size: 1.25rem;
  text-decoration: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  gap: 0;
}

body.dark-mode #off-screen-menu .social-links a {
  background: rgba(246, 241, 231, 0.08);
  color: #F6F1E7;
}

#off-screen-menu .social-links a:hover {
  background: #2F3E5C;
  color: #F6F1E7;
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 4px 12px rgba(47, 62, 92, 0.3);
}

body.dark-mode #off-screen-menu .social-links a:hover {
  background: #F6F1E7;
  color: #1C1C1C;
}

/* Theme Toggle */
#off-screen-menu #mobile-dark-mode-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 1rem 1.25rem;
  background: rgba(47, 62, 92, 0.08);
  border: 2px solid rgba(47, 62, 92, 0.15);
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  color: #2F3E5C;
  cursor: pointer;
  transition: all 0.25s ease;
}

body.dark-mode #off-screen-menu #mobile-dark-mode-toggle {
  background: rgba(246, 241, 231, 0.08);
  border-color: rgba(246, 241, 231, 0.15);
  color: #F6F1E7;
}

#off-screen-menu #mobile-dark-mode-toggle:hover {
  background: rgba(47, 62, 92, 0.15);
  transform: translateY(-2px);
}

#off-screen-menu #mobile-dark-mode-toggle .toggle-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

#off-screen-menu #mobile-dark-mode-toggle i {
  font-size: 1.3rem;
}

#off-screen-menu #mobile-dark-mode-toggle .toggle-indicator {
  width: 48px;
  height: 26px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 13px;
  position: relative;
  transition: background 0.3s ease;
}

body.dark-mode #off-screen-menu #mobile-dark-mode-toggle .toggle-indicator {
  background: rgba(246, 241, 231, 0.3);
}

#off-screen-menu #mobile-dark-mode-toggle .toggle-indicator::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  background: #2F3E5C;
  border-radius: 50%;
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.dark-mode #off-screen-menu #mobile-dark-mode-toggle .toggle-indicator::after {
  background: #F6F1E7;
  transform: translateX(22px);
}

/* Language Select */
#off-screen-menu .language-section select {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 2px solid rgba(90, 58, 46, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.7);
  color: #2F3E5C;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%232F3E5C' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

body.dark-mode #off-screen-menu .language-section select {
  background-color: rgba(0, 0, 0, 0.3);
  color: #F6F1E7;
  border-color: rgba(246, 241, 231, 0.2);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23F6F1E7' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
}

#off-screen-menu .language-section select:hover {
  border-color: #2F3E5C;
}

/* Menu Overlay */
#menu-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  background: rgba(0, 0, 0, 0) !important;
  z-index: 100001 !important;
  pointer-events: none !important;
  transition: all 0.35s ease !important;
  visibility: hidden !important;
  opacity: 0 !important;
  backdrop-filter: blur(0px) !important;
}

#menu-overlay[aria-hidden="false"],
body.menu-open #menu-overlay {
  background: rgba(0, 0, 0, 0.6) !important;
  pointer-events: auto !important;
  visibility: visible !important;
  opacity: 1 !important;
  backdrop-filter: blur(2px) !important;
}

/* ===== DESKTOP FOOTER ===== */
#site-footer .desktop-footer {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 2rem;
  padding: 2rem 3rem;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0.9));
  border-top: 1px solid rgba(90, 58, 46, 0.15);
  backdrop-filter: blur(10px);
}

body.dark-mode #site-footer .desktop-footer {
  background: linear-gradient(to bottom, rgba(28, 28, 28, 0.9), rgba(28, 28, 28, 0.95));
  border-top-color: rgba(90, 58, 46, 0.3);
}

#site-footer .footer-left p {
  margin: 0;
  font-size: 0.9rem;
  color: #6B6B6B;
  font-weight: 500;
}

body.dark-mode #site-footer .footer-left p {
  color: #A0A0A0;
}

#site-footer .site-logo {
  text-decoration: none;
  transition: transform 0.3s ease;
  display: inline-block;
}

#site-footer .site-logo:hover {
  transform: scale(1.05);
}

#site-footer .logo-text {
  font-size: 2rem;
  font-weight: 800;
  background: linear-gradient(135deg, #5A3A2E, #2F3E5C);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

body.dark-mode #site-footer .logo-text {
  background: linear-gradient(135deg, #F6F1E7, #A0A0A0);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#site-footer .footer-links ul {
  display: flex;
  gap: 2rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

#site-footer .footer-links a {
  font-size: 0.9rem;
  text-decoration: none;
  color: #2F3E5C;
  font-weight: 600;
  position: relative;
  transition: color 0.2s ease;
}

#site-footer .footer-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: #2F3E5C;
  transition: width 0.3s ease;
}

body.dark-mode #site-footer .footer-links a {
  color: #F6F1E7;
}

body.dark-mode #site-footer .footer-links a::after {
  background: #F6F1E7;
}

#site-footer .footer-links a:hover::after {
  width: 100%;
}

/* ===== MOBILE FOOTER ===== */
#site-footer .mobile-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  display: none;
  z-index: 1000;
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

body.menu-open #site-footer .mobile-footer {
  transform: translateY(100%);
}

#site-footer .wave-background {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 80px;
  overflow: hidden;
  pointer-events: none;
}

#site-footer .wave-shape {
  width: 100%;
  height: 100%;
  background: linear-gradient(to bottom, rgba(246,241,231,0.97), rgba(246,241,231,1));
  border-top-left-radius: 50% 40%;
  border-top-right-radius: 50% 40%;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
}

body.dark-mode #site-footer .wave-shape {
  background: linear-gradient(to bottom, rgba(28,28,28,0.97), rgba(28,28,28,1));
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.3);
}

#site-footer .mobile-footer-nav {
  position: relative;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  padding: 12px 0 calc(env(safe-area-inset-bottom) + 12px);
}

#site-footer .nav-item {
  width: 60px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
  font-size: 0.7rem;
  font-weight: 600;
  color: #5A3A2E;
  text-decoration: none;
  background: transparent;
  border: none;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 6px 4px;
  border-radius: 12px;
  position: relative;
}

body.dark-mode #site-footer .nav-item {
  color: #F6F1E7;
}

#site-footer .nav-item i {
  font-size: 1.4rem;
}

#site-footer .nav-item:hover,
#site-footer .nav-item.active {
  color: #2F3E5C;
  transform: translateY(-3px);
}

body.dark-mode #site-footer .nav-item:hover,
body.dark-mode #site-footer .nav-item.active {
  color: #F6F1E7;
}

#site-footer .nav-item.active::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: #2F3E5C;
  border-radius: 50%;
}

body.dark-mode #site-footer .nav-item.active::before {
  background: #F6F1E7;
}

/* Explore Button */
#site-footer .explore-container {
  position: absolute;
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  z-index: 10;
}

#site-footer .explore-button {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2F3E5C, #5A3A2E);
  color: #F6F1E7;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 3px;
  text-decoration: none;
  box-shadow: 0 6px 20px rgba(47, 62, 92, 0.4);
  transition: all 0.3s ease;
  border: 3px solid #F6F1E7;
}

body.dark-mode #site-footer .explore-button {
  background: linear-gradient(135deg, #F6F1E7, #A0A0A0);
  color: #1C1C1C;
  border-color: #1C1C1C;
}

#site-footer .explore-button:hover {
  transform: translateX(-50%) translateY(-4px) scale(1.08);
  box-shadow: 0 10px 28px rgba(47, 62, 92, 0.5);
}

#site-footer .explore-button i {
  font-size: 1.4rem;
}

#site-footer .explore-button span {
  font-size: 0.65rem;
  font-weight: 700;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  #site-footer .desktop-footer {
    display: none;
  }
  #site-footer .mobile-footer {
    display: block;
  }
}

@media (min-width: 769px) {
  #site-footer .mobile-footer {
    display: none !important;
  }
  body {
    padding-bottom: 0 !important;
  }
}

/* ===== UTILITY ===== */
html {
  scroll-behavior: smooth;
}

*:focus-visible {
  outline: 2px solid #2F3E5C;
  outline-offset: 2px;
}

body.dark-mode *:focus-visible {
  outline-color: #F6F1E7;
}