/* Global Styles */
:root {
    --pink: #ff7eb3;
    --orange: #ff9e64;
    --light-bg: #f9f4f5;
    --dark-text: #333333;
    --light-text: #f9f4f5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: var(--light-bg);
    color: var(--dark-text);
    line-height: 1.6;
    padding-top: 56px;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.hero-header {
    position: relative;
    background-image: url('https://images.unsplash.com/photo-1636676287206-ef0b17dfc841?q=80&w=2670&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D');
    background-size: cover;
    background-position: center;
    color: white;
    padding: 120px 0;
    text-align: center;
    min-height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: -56px;
    padding-top: 56px; 
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 126, 179, 0.6), rgba(255, 158, 100, 0.6));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.profile-img {
    width: 250px;
    height: 250px;
    border-radius: 50%;
    object-fit: cover;
    border: 10px solid white;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.profile-container {
    position: relative;
    display: inline-block;
    margin-bottom: 40px;
}

.profile-container::before {
    content: "";
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    z-index: -1;
    box-shadow: 0 0 30px 10px rgba(255, 255, 255, 0.6);
}

h1 {
    font-size: 3.5rem;
    margin-bottom: 15px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.dates {
    font-size: 1.6rem;
    margin-bottom: 20px;
    font-weight: 300;
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.3);
}

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* Ensure navbar appears above other content */
    transition: all 0.3s ease;
  }

  .navbar.scrolled {
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    background-color: rgba(255, 255, 255, 0.95); /* Slightly transparent background */
  }
  section {
    scroll-margin-top: 60px; /* Ensures sections don't start directly under navbar */
  }

.nav {
    background-color: white;
    padding: 15px 0;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    width: 100%;
}

.nav ul {
    display: flex;
    justify-content: center;
    list-style: none;
    /* flex-wrap: wrap; */
    padding: 0;
margin: 0;
}

.nav li {
    margin: 0 20px;
/* padding: 8px 0; */
}

.nav a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;   
    font-size: 1.1rem;   
    padding: 5px 10px;  
    border-radius: 4px;    
}

.nav a:hover {
    color: var(--pink);
    color: var(--pink);
background-color: rgba(255, 126, 179, 0.1);
}

.nav-menu a {
    color: var(--dark-text);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

/* Hide menu toggle button on larger screens */
.menu-toggle {
    display: none;
    font-size: 24px;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    position: absolute;
    top: 15px;
    right: 20px;
}

/* Mobile Menu - Initially Hidden */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        background: white;
        position: absolute;
        top: 60px;
        left: 0;
        width: 100%;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        padding: 15px 0;
        text-align: center;
    }

    .nav-menu.show {
        display: flex;
    }

    .nav-menu li {
        margin: 10px 0;
    }
}

/* Section Styles */
section {
    padding: 60px 0;
}

h2 {
    text-align: center;
    font-size: 2.2rem;
    margin-bottom: 40px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

h2::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, var(--pink), var(--orange));
}

/* About Section */
.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
}

/* Gallery Section */
.gallery {
    column-count: 4;
    column-gap: 15px;
    margin-top: 40px;
    margin-bottom: 40px;
}

.gallery-item {
    width: 100%;
    margin-bottom: 15px;
    break-inside: avoid;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s;
    overflow: hidden;
    border-radius: 8px;
}

.gallery-item:hover {
    transform: scale(1.03);
}

.gallery-item img {
    width: 100%;
    display: block;
    border-radius: 8px;
}

/* HEIC fallback styles */
.heic-fallback {
    width: 100%;
    height: 100%;
    background-color: #f0f0f0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #666;
    border-radius: 8px;
}

.heic-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.heic-fallback p {
    font-size: 1rem;
    margin: 0;
}

/* Modal for gallery images */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 9999;
    padding: 50px;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.modal-content {
    display: block;
    max-width: 90%;
    max-height: 85vh;
    margin: 0 auto;
    object-fit: contain;
}

.close {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
}

/* Navigation buttons for modal */
.modal-nav {
    position: absolute;
    width: 100%;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 20px;
    pointer-events: none;
    z-index: 9999;
}

.nav-btn {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    pointer-events: auto;
    transition: background-color 0.3s;
    border: none;
    color: #333;
    z-index: 10000;
}

.nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.9);
}

/* Video Section */
.video-container {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* Memories Section */
.memories-form {
    max-width: 600px;
    margin: 0 auto 40px;
    background-color: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

input, textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

textarea {
    height: 150px;
    resize: vertical;
}

button {
    background: linear-gradient(135deg, var(--pink), var(--orange));
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: opacity 0.3s;
}

button:hover {
    opacity: 0.9;
}

.memories-wall {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.memory-card {
    background-color: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.memory-author {
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--pink);
}

.memory-text {
    margin-bottom: 10px;
}

.memory-date {
    font-size: 0.9rem;
    color: #777;
    text-align: right;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--pink), var(--orange));
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 60px;
}

/* Floating Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--pink);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.back-to-top.visible {
    opacity: 1;
}

/* Responsive Styles */
@media (max-width: 1200px) {
    .gallery {
        column-count: 3;
    }
}

@media (max-width: 900px) {
    .gallery {
        column-count: 2;
        display: flex;
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .gallery-item {
        height: auto;
        max-height: 350px;
        flex: 1 0 calc(50% - 15px);
    }
    
    .gallery-item img {
        object-fit: contain !important;
        max-height: 100%;
        width: 100%;
    }
}

@media (max-width: 768px) {
    h1 {
        font-size: 2.5rem;
    }
    
    .dates {
        font-size: 1.3rem;
    }
    
    section {
        padding: 40px 0;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    .about-content {
        font-size: 1.1rem;
    }
    
    .modal-content {
        max-width: 95%;
    }
    
    .memories-wall {
        grid-template-columns: 1fr;
    }
    
    .profile-img {
        width: 200px;
        height: 200px;
        border-width: 8px;
    }
    
    .nav-btn {
        width: 35px;
        height: 35px;
    }
    
    input, textarea, button {
        font-size: 16px; /* Prevents zoom on focus in iOS */
    }
    
    .modal {
        padding: 20px;
    }
}

@media (max-width: 600px) {
    .gallery {
        column-count: 1;
    }
    
    .gallery-item {
        flex: 1 0 100%;
        height: 250px;
    }
    
    .nav ul {
        flex-direction: column;
        align-items: center;
    }
    
    .nav li {
        margin: 5px 0;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    .profile-img {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .nav-btn {
        width: 30px;
        height: 30px;
        font-size: 14px;
        opacity: 0.7;
    }
    
    .close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    .modal {
        padding: 10px;
    }

    /* Music player controls */
  
  .music-toggle:hover {
    transform: translateY(-2px) translateX(-50%);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  }
  
  .music-toggle .icon {
    font-size: 18px;
  }
  
  /* State management */
  .music-toggle .Play-text,
  .music-toggle .pause-text,
  .music-toggle .Play-icon,
  .music-toggle .pause-icon {
    transition: opacity 0.3s;
  }
  
  /* .music-toggle.paused .Play-text,
  .music-toggle.paused .Play-icon {
    display: none;
  } */
  
  
  /* .music-toggle:not(.paused) .pause-text,
  .music-toggle:not(.paused) .pause-icon {
    display: none;
  } */
  
  /* Mobile responsiveness */
  @media (max-width: 768px) {
    .music-toggle {
      bottom: 15px;
      padding: 6px 12px;
      font-size: 14px;
    }
  }

  .music-player-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 20px auto;
    gap: 10px;
  }
  
  .music-toggle {
    padding: 8px 15px;
    border-radius: 25px;
    background: linear-gradient(135deg, var(--pink), var(--orange));
    color: white;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    font-size: 16px;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
  }
  
  .music-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
  }
  
  .playlist-controls {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 5px;
  }
  
  .playlist-btn {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    opacity: 0.8;
    transition: opacity 0.2s;

  }
  
  .playlist-btn:hover {
    opacity: 1;
  }
  
  .song-title {
    font-size: 14px;
    color: var(--dark-text);
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .music-toggle span {
    display: inline-block;
}
  /* State management - keep your existing CSS for this */
  /* .music-toggle.paused .Play-text,
  .music-toggle.paused .Play-icon {
    display: none;
  }
  
  .music-toggle:not(.paused) .pause-text,
  .music-toggle:not(.paused) .pause-icon {
    display: none;
  } */
  
}