/* ========================================
   Llibreria de la Plaça — Custom Styles
   Classic & Elegant · Midnight Blue + Mint
   ======================================== */

/* --- Reset & Base --- */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 0;
}

body {
    overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: #061829;
}
::-webkit-scrollbar-thumb {
    background: rgba(168, 213, 186, 0.2);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: rgba(168, 213, 186, 0.4);
}

/* --- Side Navigation --- */
.side-nav {
    background: linear-gradient(180deg, #061829 0%, #0A2540 50%, #061829 100%);
}

.nav-link {
    color: rgba(168, 213, 186, 0.5);
}

.nav-link:hover {
    color: rgba(168, 213, 186, 0.9);
    background: rgba(168, 213, 186, 0.05);
}

.nav-link.active {
    color: #A8D5BA;
    background: rgba(168, 213, 186, 0.1);
    border-right: 2px solid rgba(168, 213, 186, 0.4);
}

.nav-link.active svg {
    color: #A8D5BA;
}

/* --- Buttons --- */
.btn-primary {
    box-shadow: 0 4px 20px rgba(168, 213, 186, 0.2);
}

.btn-primary:hover {
    box-shadow: 0 8px 32px rgba(168, 213, 186, 0.3);
    transform: translateY(-1px);
}

.btn-secondary:hover {
    transform: translateY(-1px);
}

/* --- Hero --- */
.hero-section {
    position: relative;
}

.hero-content {
    animation: heroFadeIn 1s ease-out forwards;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- About Section --- */
.about-image {
    animation: aboutImageIn 0.8s ease-out forwards;
}

@keyframes aboutImageIn {
    from {
        opacity: 0;
        transform: scale(0.97);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.about-content {
    animation: aboutContentIn 0.8s ease-out 0.2s forwards;
    opacity: 0;
}

@keyframes aboutContentIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Collection Cards --- */
.collection-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.collection-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.collection-card:nth-child(1) { transition-delay: 0s; }
.collection-card:nth-child(2) { transition-delay: 0.1s; }
.collection-card:nth-child(3) { transition-delay: 0.2s; }
.collection-card:nth-child(4) { transition-delay: 0.3s; }
.collection-card:nth-child(5) { transition-delay: 0.4s; }
.collection-card:nth-child(6) { transition-delay: 0.5s; }

/* --- Services --- */
.service-card {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.service-card.visible {
    opacity: 1;
    transform: translateY(0);
}

.service-card:nth-child(1) { transition-delay: 0s; }
.service-card:nth-child(2) { transition-delay: 0.1s; }
.service-card:nth-child(3) { transition-delay: 0.2s; }
.service-card:nth-child(4) { transition-delay: 0.3s; }
.service-card:nth-child(5) { transition-delay: 0.4s; }
.service-card:nth-child(6) { transition-delay: 0.5s; }

/* --- Events --- */
.event-item {
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.event-item.visible {
    opacity: 1;
    transform: translateX(0);
}

.event-item:nth-child(1) { transition-delay: 0s; }
.event-item:nth-child(2) { transition-delay: 0.15s; }
.event-item:nth-child(3) { transition-delay: 0.3s; }

/* --- Scroll Gallery --- */
@keyframes scroll {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(calc(-268px * 6));
    }
}

.animate-scroll {
    animation: scroll 30s linear infinite;
}

.animate-scroll:hover {
    animation-play-state: paused;
}

/* --- Mobile Menu --- */
.mobile-menu-btn {
    z-index: 60;
}

.mobile-overlay {
    transition: opacity 0.3s ease, pointer-events 0.3s ease;
}

/* --- Section Headers --- */
.collection-header,
.services-header,
.events-header,
.contact-header {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.collection-header.visible,
.services-header.visible,
.events-header.visible,
.contact-header.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1023px) {
    .mobile-menu-btn {
        display: flex;
    }
    
    #sidebar {
        box-shadow: none;
    }
    
    #sidebar.open {
        box-shadow: 4px 0 40px rgba(0, 0, 0, 0.5);
    }
}

@media (min-width: 1024px) {
    .mobile-menu-btn {
        display: none;
    }
}

/* --- Focus Styles --- */
input:focus,
textarea:focus {
    outline: none;
}

/* --- Selection --- */
::selection {
    background: rgba(168, 213, 186, 0.3);
    color: #E8EDF2;
}
