/* Reset some default styles */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  scroll-behavior: smooth;
  color: #333;
}

/* Background animation */
.animated-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(270deg, #0ea5e9, #3b82f6, #0ea5e9);
  background-size: 600% 600%;
  animation: gradientShift 15s ease infinite;
  z-index: -1;
  filter: brightness(0.9);
}

@keyframes gradientShift {
  0% {background-position: 0% 50%;}
  50% {background-position: 100% 50%;}
  100% {background-position: 0% 50%;}
}

/* Container layout */
.container {
  display: flex;
  min-height: 100vh;
  max-width: 1200px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  border-radius: 12px;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 280px;
  background: #0ea5e9;
  color: white;
  padding: 2rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform 0.3s ease;
  position: relative;
  z-index: 10;
}

.sidebar.open {
  transform: translateX(0);
}

.profile {
  text-align: center;
}

.profile-img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  border: 4px solid white;
  object-fit: cover;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: transform 0.3s ease;
}

.profile-img:hover {
  transform: scale(1.05);
}

.profile h1 {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
  font-weight: 700;
  letter-spacing: 1px;
}

.profile p {
  font-size: 0.9rem;
  margin: 0.2rem 0;
  font-weight: 500;
  opacity: 0.9;
}

.profile-buttons {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.profile-buttons a img {
  width: 32px;
  height: 32px;
  filter: drop-shadow(0 0 1px rgba(0,0,0,0.3));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.profile-buttons a:hover img {
  transform: scale(1.2);
  filter: drop-shadow(0 0 5px #fff);
}

/* Flip-Flop Address Card */
.address-card {
  perspective: 1000px;
  margin-top: 2rem;
}

.card-inner {
  position: relative;
  width: 100%;
  height: 140px;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  cursor: pointer;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  background: rgba(255, 255, 255, 0.15);
  color: white;
  padding: 1rem;
  user-select: none;
}

.address-card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 1rem;
}

.card-front {
  background: rgba(14, 165, 233, 0.85);
}

.card-back {
  background: rgba(3, 105, 161, 0.85);
  transform: rotateY(180deg);
}

/* Overlay for mobile */
.overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(14, 165, 233, 0.5);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease;
  z-index: 5;
}

.overlay.show {
  opacity: 1;
  visibility: visible;
}

/* Main content */
.main-content {
  flex: 1;
  padding: 2rem 3rem;
  overflow-y: auto;
  max-height: 100vh;
  scroll-behavior: smooth;
}

/* Navbar */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2rem;
  position: sticky;
  top: 0;
  background: white;
  padding: 0.5rem 0;
  z-index: 20;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-radius: 8px;
}

.hamburger {
  font-size: 1.8rem;
  cursor: pointer;
  display: none;
  user-select: none;
  padding: 0 1rem;
  color: #0ea5e9;
  transition: color 0.3s ease;
}

.hamburger:hover {
  color: #0284c7;
}

.card-grid {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.card-grid .card {
  background: #f0f9ff;
  border-radius: 12px;
  padding: 1rem 1.5rem;
  box-shadow: 0 4px 12px rgba(14, 165, 233, 0.15);
  transition: box-shadow 0.3s ease;
  cursor: default;
}

.card-grid .card:hover {
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.3);
}

.card-grid .card a.btn {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 1rem;
  background: #0ea5e9;
  color: white;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 600;
  transition: background 0.3s ease;
}

.card-grid .card a.btn:hover {
  background: #0284c7;
}

/* Section styles */
.section {
  margin-bottom: 3rem;
}

.section h1, .section h2 {
  color: #0ea5e9;
  margin-bottom: 1rem;
  font-weight: 700;
}

.section h1 span {
  color: #0284c7;
}

.section p {
  line-height: 1.6;
  margin-bottom: 1rem;
  font-size: 1rem;
  color: #444;
}

/* Contact links */
#contact a {
  color: #0ea5e9;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.3s ease;
}

#contact a:hover {
  color: #0284c7;
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 900px) {
  .container {
    flex-direction: column;
    max-width: 100%;
    border-radius: 0;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    transform: translateX(-100%);
    z-index: 15;
    box-shadow: 4px 0 12px rgba(0,0,0,0.2);
  }

  .hamburger {
    display: block;
  }

  .main-content {
    padding: 1.5rem 1.5rem 3rem;
  }

  .card-grid {
    flex-direction: column;
  }
}

/* Footer */
.end_sidebar {
  text-align: center;
  padding: 1rem 0;
  font-size: 0.9rem;
  color: #666;
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
  margin-top: 2rem;
  user-select: none;
}

.end_sidebar p {
  margin: 0.2rem 0;
}

/* Button hover effect */
.btn {
  cursor: pointer;
  user-select: none;
}