  /* Global Styles */
  * {
      margin: 0;
      padding: 0;
      box-sizing: border-box;
  }

  body {
      font-family: 'Poppins', sans-serif;
      background: linear-gradient(135deg, #1a2a6c, #b21f1f, #fdbb2d);
      color: #fff;
      overflow-x: hidden;
      background-attachment: fixed;
      background-size: 400% 400%;
      animation: gradientBG 15s ease infinite;
  }

  @keyframes gradientBG {
      0% {
          background-position: 0% 50%;
      }

      50% {
          background-position: 100% 50%;
      }

      100% {
          background-position: 0% 50%;
      }
  }

  .container {
      max-width: 1200px;
      margin: 0 auto;
      padding: 0 20px;
  }

  section {
      padding: 80px 0;
  }

  h1,
  h2,
  h3 {
      font-weight: 700;
      margin-bottom: 20px;
      text-align: center;
  }

  h1 {
      font-size: 4.5rem;
      text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  }

  h2 {
      font-size: 3rem;
      margin-bottom: 50px;
      position: relative;
  }

  h2:after {
      content: "";
      position: absolute;
      bottom: -15px;
      left: 50%;
      transform: translateX(-50%);
      width: 100px;
      height: 4px;
      background: #ffcc00;
      border-radius: 2px;
  }

  p {
      font-size: 1.1rem;
      line-height: 1.8;
      margin-bottom: 20px;
  }

  .btn {
      display: inline-block;
      padding: 15px 30px;
      background: #ffcc00;
      color: #1a2a6c;
      border-radius: 50px;
      text-decoration: none;
      font-weight: 600;
      font-size: 1.1rem;
      transition: all 0.3s ease;
      border: none;
      cursor: pointer;
      box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  }

  .btn:hover {
      transform: translateY(-5px);
      box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
      background: #ffd84d;
  }



  /* Mobile menu button - hidden by default */
  .mobile-menu-btn {
      display: none;
      background: none;
      border: none;
      color: white;
      font-size: 1.8rem;
      cursor: pointer;
      position: absolute;
      right: 20px;
      top: 50%;
      transform: translateY(-50%);
      z-index: 1001;
  }

  /* Mobile styles */
  @media (max-width: 768px) {

      /* Show mobile menu button */
      .mobile-menu-btn {
          display: block;
      }

      /* Position logo properly */
      .logo {
          margin-left: 15px;
      }

      /* Hide regular nav by default */
      .nav-menu {
          position: fixed;
          top: 0;
          right: -100%;
          width: 70%;
          height: 100vh;
          background: rgba(26, 42, 108, 0.98);
          flex-direction: column;
          padding: 80px 20px 20px;
          box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
          transition: right 0.5s cubic-bezier(0.25, 0.1, 0.25, 1);
          /* Smoother easing */
          z-index: 1000;
          will-change: right;
          /* Optimize for animation */
      }

      .nav-menu::before {
          content: '';
          position: fixed;
          top: 0;
          left: 0;
          width: 100%;
          height: 100%;
          background: rgba(0, 0, 0, 0.5);
          z-index: -1;
          opacity: 0;
          transition: opacity 0.3s ease;
          pointer-events: none;
      }

       .nav-menu.show::before {
        opacity: 1;
        transition: opacity 0.3s ease 0.1s; /* Slight delay */
    }
     .nav-menu.show li:nth-child(1) { transition-delay: 0.2s; }
    .nav-menu.show li:nth-child(2) { transition-delay: 0.25s; }
    .nav-menu.show li:nth-child(3) { transition-delay: 0.3s; }
    .nav-menu.show li:nth-child(4) { transition-delay: 0.35s; }
    .nav-menu.show li:nth-child(5) { transition-delay: 0.4s; }

      .nav-menu.show {
          right: 0;
      }

      .nav-menu li {
          margin: 20px 0;
          text-align: center;
      }

      /* Close button style */
      .mobile-menu-btn .fa-times {
          display: none;
      }

      .mobile-menu-btn.show .fa-bars {
          display: none;
      }

      .mobile-menu-btn.show .fa-times {
          display: block;
      }

      /* Prevent scrolling when menu is open */
      body.menu-open {
          overflow: hidden;
      }

      /* Header adjustments */
      .header-content {
          position: relative;
      }
  }




  /* Header Styles */
  header {
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      padding: 20px 0;
      z-index: 1000;
      transition: all 0.3s ease;
  }

  header.scrolled {
      background: rgba(26, 42, 108, 0.95);
      padding: 15px 0;
      box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
  }

  .header-content {
      display: flex;
      justify-content: space-between;
      align-items: center;
  }

  .logo {
      font-family: 'Dancing Script', cursive;
      font-size: 2.5rem;
      font-weight: 700;
      color: #ffcc00;
  }

  nav ul {
      display: flex;
      list-style: none;
  }

  nav ul li {
      margin-left: 30px;
  }

  nav ul li a {
      color: #fff;
      text-decoration: none;
      font-weight: 600;
      font-size: 1.1rem;
      transition: all 0.3s ease;
      padding: 5px 10px;
      border-radius: 5px;
  }

  nav ul li a:hover {
      color: #ffcc00;
      background: rgba(255, 255, 255, 0.1);
  }

  /* Hero Section */
  #hero {
      height: 100vh;
      display: flex;
      align-items: center;
      justify-content: center;
      text-align: center;
      position: relative;
      overflow: hidden;
      padding-top: 80px;
  }

  .hero-content {
      position: relative;
      z-index: 2;
      max-width: 900px;
  }

  .hero-content h1 {
      font-size: 5rem;
      margin-bottom: 20px;
      animation: fadeInDown 1s ease;
  }

  .hero-content p {
      font-size: 1.5rem;
      margin-bottom: 40px;
      animation: fadeInUp 1s ease 0.3s both;
      text-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  }

  .hero-content .btn {
      animation: fadeInUp 1s ease 0.6s both;
  }

  .hero-image {
      width: 200px;
      height: 200px;
      border-radius: 50%;
      border: 5px solid #ffcc00;
      margin: 0 auto 30px;
      overflow: hidden;
      animation: pulse 2s infinite;
  }

  /* Memories Section */
  #memories {
      background: rgba(255, 255, 255, 0.05);
      backdrop-filter: blur(10px);
      border-radius: 20px;
      margin: 50px auto;
      padding: 60px 40px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }

  .memories-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
      gap: 30px;
      margin-top: 40px;
  }

  .memory-card {
      background: rgba(255, 255, 255, 0.1);
      border-radius: 15px;
      overflow: hidden;
      transition: all 0.3s ease;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  .memory-card:hover {
      transform: translateY(-10px);
      box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
      background: rgba(255, 255, 255, 0.15);
  }

  .memory-card:hover .memory-img img {
      transform: scale(1.1);
      /* Slight zoom on hover */
  }

  .memory-img {
      height: 200px;
      /* Remove the gradient background */
      display: flex;
      align-items: center;
      justify-content: center;
      overflow: hidden;
      /* Ensures image doesn't overflow */
  }

  .memory-img img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      /* Maintains aspect ratio while filling container */
      transition: transform 0.5s ease;
      /* Smooth zoom effect on hover */
  }

  .memory-content {
      padding: 20px;
  }

  .memory-content h3 {
      color: #ffcc00;
      margin-bottom: 10px;
      text-align: left;
  }

  /* Timeline Section */
  .timeline {
      position: relative;
      max-width: 800px;
      margin: 0 auto;
  }

  .timeline::after {
      content: '';
      position: absolute;
      width: 6px;
      background: #ffcc00;
      top: 0;
      bottom: 0;
      left: 50%;
      margin-left: -3px;
      border-radius: 3px;
  }

  .timeline-item {
      padding: 20px 40px;
      position: relative;
      width: 50%;
      animation: fadeIn 1s ease both;
  }

  .timeline-item:nth-child(odd) {
      left: 0;
  }

  .timeline-item:nth-child(even) {
      left: 50%;
  }

  .timeline-content {
      padding: 20px;
      background: rgba(255, 255, 255, 0.1);
      border-radius: 15px;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  }

  .timeline-content h3 {
      color: #ffcc00;
      margin-bottom: 10px;
  }

  .timeline-item::after {
      content: '';
      position: absolute;
      width: 20px;
      height: 20px;
      background: #ffcc00;
      border: 4px solid #1a2a6c;
      top: 30px;
      border-radius: 50%;
      z-index: 1;
  }

  .timeline-item:nth-child(odd)::after {
      right: -10px;
  }

  .timeline-item:nth-child(even)::after {
      left: -10px;
  }

  /* Gallery Section */
  .gallery {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      grid-auto-rows: 10px;
      /* Base row height */
      gap: 20px;
      margin-top: 40px;
  }

  .gallery-item {
      border-radius: 10px;
      overflow: hidden;
      position: relative;
      box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
      transition: all 0.3s ease;
  }

  .gallery-img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
      transition: transform 0.3s ease;
  }

  /* Calculate grid-row-end based on aspect ratio */
  .gallery-item {
      grid-row-end: span calc(var(--row-span) + 1);
  }

  /* Optional: Add hover zoom effect */
  .gallery-item:hover .gallery-img {
      transform: scale(1.05);
      transition: transform 0.3s ease;
  }

  /* Ensure all images have the same height */
  .gallery {
      display: grid;
      grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
      gap: 20px;
      margin-top: 40px;
      grid-auto-rows: 250px;
      /* Fixed height for all rows */
  }

  /* Wishes Section */
  #wishes {
      background: rgba(255, 255, 255, 0.05);
      backdrop-filter: blur(10px);
      border-radius: 20px;
      margin: 50px auto;
      padding: 60px 40px;
      box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
  }

  .wishes-container {
      max-width: 800px;
      margin: 0 auto;
      text-align: center;
  }

  .wish-form {
      margin-top: 40px;
  }

  textarea {
      width: 100%;
      height: 150px;
      padding: 15px;
      border-radius: 15px;
      border: 2px solid rgba(255, 255, 255, 0.2);
      background: rgba(255, 255, 255, 0.1);
      color: white;
      font-size: 1.1rem;
      resize: none;
      margin-bottom: 20px;
  }

  textarea::placeholder {
      color: rgba(255, 255, 255, 0.6);
  }

  /* Footer */
  footer {
      background: rgba(26, 42, 108, 0.9);
      padding: 40px 0;
      text-align: center;
  }

  .social-icons {
      display: flex;
      justify-content: center;
      gap: 20px;
      margin: 30px 0;
  }

  .social-icons a {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 50px;
      height: 50px;
      border-radius: 50%;
      background: rgba(255, 255, 255, 0.1);
      color: #ffcc00;
      font-size: 1.5rem;
      transition: all 0.3s ease;
  }

  .social-icons a:hover {
      background: #ffcc00;
      color: #1a2a6c;
      transform: translateY(-5px);
  }

  .hero-image img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      /* Ensures the image covers the container without distortion */
  }

  /* Animations */
  @keyframes fadeIn {
      from {
          opacity: 0;
          transform: translateY(20px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  @keyframes fadeInDown {
      from {
          opacity: 0;
          transform: translateY(-20px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  @keyframes fadeInUp {
      from {
          opacity: 0;
          transform: translateY(20px);
      }

      to {
          opacity: 1;
          transform: translateY(0);
      }
  }

  @keyframes pulse {
      0% {
          box-shadow: 0 0 0 0 rgba(255, 204, 0, 0.7);
      }

      70% {
          box-shadow: 0 0 0 20px rgba(255, 204, 0, 0);
      }

      100% {
          box-shadow: 0 0 0 0 rgba(255, 204, 0, 0);
      }
  }

  /* Responsive */
  @media (max-width: 768px) {
      h1 {
          font-size: 3rem;
      }

      h2 {
          font-size: 2.2rem;
      }

      .timeline::after {
          left: 31px;
      }

      .timeline-item {
          width: 100%;
          padding-left: 70px;
          padding-right: 25px;
      }

      .timeline-item:nth-child(even) {
          left: 0;
      }

      .timeline-item::after {
          left: 21px !important;
      }

      nav ul {
          display: none;
      }

      .hero-content h1 {
          font-size: 3.5rem;
      }
  }

  /* Mobile Responsiveness Enhancements */
  @media (max-width: 768px) {
      body {
          background: linear-gradient(135deg, #1a2a6c, #b21f1f);
          background-attachment: fixed;
      }

      h1 {
          font-size: 2.8rem;
          line-height: 1.2;
      }

      h2 {
          font-size: 2rem;
      }

      h2:after {
          width: 70px;
          bottom: -10px;
      }

      .header-content {
          padding: 0 15px;
      }

      .logo {
          font-size: 2rem;
      }

      nav ul {
          display: none;
          position: absolute;
          top: 100%;
          left: 0;
          right: 0;
          background: rgba(26, 42, 108, 0.95);
          flex-direction: column;
          padding: 20px 0;
          box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
      }

      nav ul.show {
          display: flex;
      }

      nav ul li {
          margin: 10px 0;
          text-align: center;
      }



      #hero {
          padding-top: 100px;
          height: auto;
          min-height: 100vh;
      }

      .hero-content h1 {
          font-size: 2.8rem;
      }

      .hero-content p {
          font-size: 1.2rem;
          padding: 0 15px;
      }



      section {
          padding: 50px 0;
      }

      #memories,
      #wishes {
          margin: 30px 15px;
          padding: 40px 20px;
      }

      .memories-grid {
          grid-template-columns: 1fr;
      }

      .memory-card {
          margin-bottom: 20px;
      }

      .timeline::after {
          left: 20px;
      }

      .timeline-item {
          width: 100%;
          padding-left: 60px;
          padding-right: 20px;
      }

      .timeline-item:nth-child(even) {
          left: 0;
      }

      .timeline-item::after {
          left: 11px !important;
      }

      .gallery {
          grid-template-columns: 1fr 1fr;
          gap: 10px;
      }

      .gallery-item {
          height: 250px;
      }

      .wish-form textarea {
          height: 120px;
      }

      .social-icons {
          flex-wrap: wrap;
      }

      .memory-img,
      .gallery-img {
          font-size: 2.5rem;
      }
  }

  @media (max-width: 480px) {
      h1 {
          font-size: 2.3rem;
      }

      h2 {
          font-size: 1.8rem;
      }

      .gallery {
          grid-template-columns: 1fr;
      }

      .hero-content h1 {
          font-size: 2.3rem;
      }

      .hero-content p {
          font-size: 1.1rem;
      }

      .btn {
          padding: 12px 25px;
          font-size: 1rem;
      }

      .timeline-content {
          padding: 15px;
      }
  }