@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;400i&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
    font-weight: 500; /* medium weight */
}

body {
    background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.3)), url('../medioak/fotozaharrak/113812_051.JPG');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: white;
    line-height: 1.6;
    padding: 1.5rem;
    position: relative;
    z-index: 0;
    transition: background-color 0.3s ease;
    overflow-x: hidden;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    
    pointer-events: none;
    z-index: 0;
}
main {
    position: relative;
    z-index: 1;
    
    padding: 1rem 2rem;
    border-radius: 8px;
}

header {
    padding: 2rem 0;
    text-align: center;
}

.logo {
    font-size: 2rem;
    letter-spacing: 2px;
}

.logo img {
    max-width: 250px;
    height: auto;
    display: inline-block;
}

main {
    max-width: 800px;
    margin: 0 auto;
}

section {
    margin-bottom: 5rem;
    text-align: center;
}

h2 {
    margin-bottom: 2rem;
    font-weight: 400;
    letter-spacing: 1px;
}

/* Editor interactivo */
#interactive-editor {
    padding: 1.5rem 0;
    margin-bottom: 0;
}

.canvas-container {
    max-width: 400px;
    max-height: 500px;
    margin: 0 auto 2rem;
    border: 1px solid #eee;
    aspect-ratio: 4 / 5;
    position: relative;
    overflow: hidden;
}

#editor-canvas {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #f9f9f9;
    touch-action: none;
}

.editor-controls {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.control-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.cover-selector {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
}

.cover-option {
    width: 60px;
    height: 75px;
    background-size: cover;
    background-position: center;
    cursor: pointer;
    border: 2px solid transparent;
    border-radius: 4px;
}

.cover-option.selected {
    border-color: black;
}

button {
    background-color: white;
    border: none;
    border-radius: 50%;
    color: black;
    width: 48px;
    height: 48px;
    padding: 0;
    cursor: pointer;
    font-weight: 400;
    transition: transform 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

button:hover {
    transform: scale(1.1);
}

input[type="color"] {
    -webkit-appearance: none;
    width: 48px;
    height: 48px;
    border: none;
    cursor: pointer;
    border-radius: 50%;
    padding: 0;
    margin: 0;
    vertical-align: middle;
    background-color: red;
}

input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

input[type="color"]::-webkit-color-swatch {
    border: none;
}

.contact-info a {
    display: inline-block;
    margin: 0 1rem;
    color: white; /* Icon color */
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

.contact-info a .iconify {
    font-size: 32px;
    color: inherit; /* inherit color from parent anchor */
    vertical-align: middle;
}

#add-text-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

#text-input-container {
    background: rgba(0, 0, 0, 0.8);
    padding: 1.5rem 2rem;
    border-radius: 12px;
    max-width: 320px;
    width: 90%;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.7);
    color: #eee;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    border: 1px solid #444;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

#text-input-container .modal-buttons {
    display: flex;
    flex-direction: row;
    justify-content: flex-end;
    gap: 1rem;
}

#text-input-container:hover,
#text-input-container:focus-within {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.9);
    border-color: #666;
}

#text-input {
    background: #222;
    border: 1px solid #555;
    border-radius: 6px;
    padding: 0.5rem 0.75rem;
    color: white;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    outline: none;
    transition: border-color 0.3s ease, background-color 0.3s ease;
}

#text-input:focus {
    border-color: #888;
    background-color: #333;
}

/* Carousel navigation icons */
.carousel-nav .iconify {
    font-size: 32px;
    color: white;
    pointer-events: none; /* Prevent interfering with button clicks */
    transition: color 0.3s ease;
}

/* Song links icons */
.song-links {
    display: flex;
    gap: 24px; /* increased gap between icons */
    justify-content: center;
}

.song-links a .iconify {
    font-size: 32px;
    color: white;
    transition: transform 0.3s ease, color 0.3s ease;
    vertical-align: middle;
}

.song-links a:hover .iconify {
    transform: scale(1.2);
    
}

/* Carousel container */
.carousel-container {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    overflow: hidden;
    display: block; /* changed from flex to block */
}

/* Carousel track */
.carousel-track {
    display: flex;
    width: 100%; /* ensure full width */
    transition: transform 0.5s ease;
    will-change: transform;
}

/* Carousel item */
.carousel-item {
    min-width: 100%;
    box-sizing: border-box;
    display: block; /* changed from flex to block */
    padding: 0 10px;
}

/* Navigation buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    color: black;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* increased z-index */
    transition: background-color 0.3s ease;
    border: 2px solid purple; /* debug border */
}

/* Carousel track */
.carousel-track {
    display: flex;
    transition: transform 0.5s ease;
    will-change: transform;
}

/* Carousel item */
.carousel-item {
    min-width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    padding: 0 10px;
}

/* Song card */
.song-card {
    
    border-radius: 8px;
    padding: 20px;
    box-shadow: none;
    max-width: 400px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.song-title {
    margin-bottom: 0.5rem;
}

.song-links {
    margin-bottom: 0.5rem;
    display: flex;
    gap: 24px;
    justify-content: center;
}

.lyrics-toggle {
    margin-top: 0.5rem;
}

/* Song video container */
.song-video {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5;
    overflow: hidden;
    border-radius: 4px;
    margin-bottom: 15px;
}

/* Video element */
.song-video video {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Navigation buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(255, 255, 255, 0.7);
    color: black;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    transition: background-color 0.3s ease;
}

.carousel-nav:hover {
    background-color: rgba(255, 255, 255, 0.9);
    transform: translateY(-50%) scale(1.1);
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.prev-btn {
    left: 10px;
}

.next-btn {
    right: 10px;
}

/* Responsive styles */
/* Navigation menu styles */
.main-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-top: 1rem;
}

.menu-list {
    list-style: none;
    display: flex;
    gap: 2rem;
}

.menu-list li a {
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    display: inline-block;
    transition: transform 0.3s ease;
}

.menu-list li a:hover,
.menu-list li a:focus {
    outline: none;
    transform: scale(1.1);
}

.menu-list li a:hover,
.menu-list li a:focus {
    outline: none;
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Hamburger button styles */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile styles */
@media (max-width: 767px) {
    .hamburger {
        display: flex;
        position: relative;
        z-index: 1001;
    }
    .menu-list {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(255, 255, 255, 0.9);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 1.5rem;
        max-height: 0;
        overflow-y: hidden;
        transition: max-height 0.3s ease;
        border-radius: 0;
        z-index: 10000;
        padding-top: 0;
        pointer-events: none;
    }
    .menu-list.open {
        max-height: 100vh;
        overflow-y: auto;
        pointer-events: auto;
    }
    .menu-list li {
        border-bottom: 1px solid #ccc;
    }
    .menu-list li a {
        display: block;
        padding: 1rem;
        font-size: 1.2rem;
        color: black;
    }
    .close-menu-item {
        display: block;
        position: absolute;
        top: 1rem;
        right: 1rem;
        border: none;
        background: transparent;
        font-size: 2rem;
        cursor: pointer;
        color: black;
        z-index: 10001;
    }
    #close-menu-btn {
        font-weight: bold;
        line-height: 1;
        padding: 0;
        border: none;
        background: transparent;
        cursor: pointer;
        color: black;
    }

    /* Additional mobile performance improvements */
    /* Remove background image removal on mobile to keep same as desktop */
    body {
        /* background-image: none; */
        /* background-color: #f0f0f0;  lighter background for mobile */
    }

    /* Show cover selector on mobile */
    .cover-selector {
        display: flex; /* show cover selector on mobile */
    }

    .canvas-container {
        max-width: 100%;
        max-height: none;
        border: none;
    }

    .song-video video {
        width: 100%;
        height: auto;
        object-fit: contain;
    }
}
@media (min-width: 768px) {
    .close-menu-item {
        display: none;
    }
}

/* Desktop styles */
@media (min-width: 768px) {
    .menu-list {
        max-height: none !important;
        position: static;
        flex-direction: row;
        background: none;
        border-radius: 0;
    }
}

/* Upcoming concerts section */
#upcoming-concerts {
    max-width: 800px;
    margin: 2rem auto 5rem auto;
    padding: 1rem 2rem;
    
    border-radius: 8px;
    color: white;
    text-align: center;
}

#upcoming-concerts h2 {
    margin-bottom: 1rem;
    font-weight: 600;
    font-size: 1.8rem;
    letter-spacing: 1px;
}

#upcoming-concerts .concert-list {
    list-style: none;
    padding: 0;
    margin: 0;
    font-size: 1.1rem;
}

#upcoming-concerts .concert-list li {
    margin-bottom: 0.75rem;
}

#upcoming-concerts .concert-link {
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: color 0.3s ease, transform 0.3s ease;
}

#upcoming-concerts .concert-link:hover,
#upcoming-concerts .concert-link:focus {
    color: #ffcc00;
    transform: scale(1.05);
    outline: none;
}

@media (max-width: 767px) {
    #upcoming-concerts {
        padding: 1rem 0.5rem;
        font-size: 1rem;
        max-width: 95%;
        margin: 1rem auto;
    }
    #upcoming-concerts h2 {
        font-size: 1.5rem;
    }
    #upcoming-concerts .concert-list li {
        margin-bottom: 0.5rem;
        line-height: 1.6;
        padding: 0.5rem 0.75rem;
        font-weight: 600;
    }
}

#music-carousel .section-title img {
    max-width: 400px;
    height: auto;
    display: block;
    margin: 0 auto;
    pointer-events: none;
}

#music-carousel .section-title {
    margin-bottom: 1rem;
}

/* Hide lyrics container by default */
.song-lyrics {
    max-height: 0;
    overflow: hidden;
    margin-top: 10px;
    text-align: left;
    font-size: 0.9rem;
    color: #ddd;
    opacity: 0;
    transform: translateY(-20px);
    transition: max-height 0.5s ease, opacity 0.5s ease, transform 0.5s ease;
}

/* Show lyrics when .show class is added */
.song-lyrics.show {
    display: block;
    max-height: 1000px; /* large enough to show content */
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 767px) {
    #music-carousel .section-title img {
        max-width: 90%;
        height: auto;
    }
}

/* Custom styles for song links and footer icons */
.song-links a img,
.contact-info a img {
    filter: brightness(0) invert(1); /* make icons white */
    transition: transform 0.3s ease, filter 0.3s ease;
    width: 32px;
    height: 32px;
}

.song-links a:hover img,
.contact-info a:hover img {
    transform: scale(1.2);
    filter: brightness(0) invert(0.7); /* slightly different on hover */
}

@media (max-width: 767px) {
    .contact-info {
        display: flex;
        flex-wrap: nowrap;
        justify-content: center;
        margin: 0 auto;
    }
    .contact-info a {
        margin: 0 0.7rem;
    }
    .contact-info a img {
        width: 40px;
        height: 40px;
    }
}
