﻿:root {
  /* Color Palette */
  --primary-color: #2c3e50;
  /* Deep Slate */
  --accent-color: #3498db;
  /* Bright Blue */
  --accent-hover: #2980b9;
  --bg-color: #f8f9fa;
  /* Soft Gray */
  --surface-color: #ffffff;
  --text-main: #2d3436;
  --text-muted: #636e72;
  --border-color: #e9ecef;

  /* Shadows */
  --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

  /* Typography */
  --font-heading: 'Outfit', sans-serif;
  --font-body: 'Inter', sans-serif;

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 20px;
}

html {
  font-size: 16px;
  position: relative;
  min-height: 100%;
  height: 100%;
}

body {
  font-family: var(--font-body);
  background-color: var(--bg-color);
  color: var(--text-main);
  /* margin-bottom: 80px; Removed for flex sticky footer */
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main {
  flex: 1;
}

h1,
h2,
h3,
h4,
h5,
h6,
.navbar-brand {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--primary-color);
}

/* Navbar Modernization */
.navbar {
  background-color: rgba(44, 62, 80, 0.95) !important;
  /* Dark background */
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 2px solid transparent !important;
  border-image: linear-gradient(to right, var(--accent-color), #8e44ad) 1;
  /* Updated gradient */
  box-shadow: var(--shadow-sm);
  padding: 1rem 0;
}

/* Fix Hamburger Icon Visibility (Light for dark bg) */
.navbar-toggler {
  border-color: rgba(255, 255, 255, 0.5);
  padding: 0.5rem 0.75rem;
}

.navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}

.navbar-brand {
  font-size: 1.6rem;
  letter-spacing: -0.5px;
  position: relative;
  overflow: hidden;
  color: #fff !important;
  /* White text */
}

.navbar-brand::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-color), transparent);
  transform: translateX(-100%);
  transition: transform 0.3s ease;
}

.navbar-brand:hover::after {
  transform: translateX(0);
}

.navbar-brand i {
  color: var(--accent-color);
  margin-right: 5px;
}

.nav-link {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.8) !important;
  /* Light text */
  transition: all 0.2s ease;
  border-radius: var(--radius-sm);
  padding: 0.5rem 1rem !important;
}

.nav-link:hover {
  color: #fff !important;
  background-color: rgba(255, 255, 255, 0.1);
  /* Light hover bg */
}

.nav-link i {
  margin-right: 6px;
  color: var(--accent-color);
}

/* Mobile Menu Improvements */
@media (max-width: 576px) {
  .navbar-collapse {
    margin-top: 1rem;
    background: transparent;
  }

  .nav-link {
    padding: 1rem !important;
    /* Larger touch target */
    margin-bottom: 0.5rem;
    background-color: rgba(0, 0, 0, 0.2);
    /* Dark styling for mobile menu items */
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: block;
    /* Full width */
    text-align: center;
    font-size: 1.1rem;
    color: #fff !important;
  }

  .input-group {
    margin-top: 1rem;
  }

  /* Prevent zoom on input focus for iOS Safari */
  .form-control {
    font-size: 16px;
  }
}

/* Form Elements */
.form-control {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  padding: 0.6rem 1rem;
  font-size: 0.95rem;
  transition: all 0.2s;
  background-color: var(--surface-color);
}

.form-control:focus {
  border-color: var(--accent-color);
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
}

.btn {
  border-radius: var(--radius-sm);
  font-weight: 500;
  padding: 0.6rem 1.2rem;
  transition: all 0.2s ease;
  font-family: var(--font-heading);
}

.btn-secondary {
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
}

.btn-secondary:hover {
  background-color: var(--border-color);
  color: var(--text-main);
}

/* Cards & Containers */
.card {
  border: none;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  background-color: var(--surface-color);
  overflow: hidden;
  transition: transform 0.2s, box-shadow 0.2s;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-header {
  background-color: transparent;
  border-bottom: 1px solid var(--border-color);
  padding: 1rem 1.5rem;
  font-weight: 600;
}

.card-header a {
  color: var(--text-main);
  text-decoration: none;
}

.card-body {
  padding: 1.5rem;
  font-size: 1rem;
}

/* Footer */
.footer {
  background-color: #1a252f;
  /* Dark footer */
  border-top: none;
  margin-top: auto;
  font-family: var(--font-heading);
  color: #bdc3c7;
  /* Light text */
}

.footer p {
  line-height: 1.6;
  color: #bdc3c7;
}

.footer .text-muted {
  color: #95a5a6 !important;
}

.footer .h6 {
  color: #fff;
}

/* Utilities */
.yymm a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  display: block;
  padding: 4px 0;
  transition: color 0.2s;
}

.yymm a:hover {
  color: var(--accent-color);
}

mark {
  background-color: rgba(255, 234, 167, 0.4);
  color: var(--text-main);
  padding: 0 4px;
  border-radius: 4px;
}

/* Scroll Buttons */
.scroll-btn {
  position: fixed;
  right: 25px;
  width: 45px;
  height: 45px;
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  transition: all 0.2s ease;
  z-index: 1000;
  opacity: 0.9;
}

.scroll-btn:hover {
  transform: scale(1.1);
  opacity: 1;
}

#scroll-top {
  bottom: 90px;
  background-color: var(--surface-color);
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

#scroll-bottom {
  bottom: 30px;
  background-color: var(--primary-color);
  color: white;
}