/* ===== BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

:root {
    --primary: #d84315;
    --primary-light: #e67e22;
    --dark: #000000;
    --dark-light: #1a1a1a;
    --text: #ffffff;
    --text-light: rgba(255,255,255,0.9);
}

body {
    font-family: 'Segoe UI', 'Playfair Display', sans-serif;
    background-color: var(--dark);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    animation: fadeIn 1s ease-out;
    background-image: url('images/dolci.PNG');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow-x: hidden;
}

.dolci-allergeni {
    margin-top: 10px;
    font-size: 0.85em;
    color: #888;
    letter-spacing: 0.3px;
}

footer .powered {
    color: #d84315;
    font-size: 0.98rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    margin-top: 10px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* ===== HEADER ===== */
header {
    background: linear-gradient(to bottom, var(--dark), var(--dark-light));
    padding: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid var(--primary);
    box-shadow: 0 2px 15px rgba(216, 67, 21, 0.2);
    animation: slideDown 0.5s ease-out;
}

@keyframes slideDown {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.logo {
    height: 70px;
    filter: brightness(0) invert(1);
    animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ===== HERO SECTION ===== */
.hero-dolci {
    background: linear-gradient(rgba(0,0,0,0.85), rgba(0,0,0,0.85)), 
                url('images/dolci-bg.jpg') center/cover no-repeat;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 5rem 2rem;
    position: relative;
    animation: bgPan 30s infinite alternate ease-in-out;
}

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

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.hero-dolci h1 {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.5rem, 5vw, 3.5rem);
    color: var(--text);
    margin-bottom: 1rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.8);
    letter-spacing: 1px;
    animation: fadeInUp 0.8s ease-out;
}

.hero-dolci p {
    font-size: clamp(1.1rem, 2vw, 1.3rem);
    color: var(--text-light);
    margin-bottom: 0;
    font-weight: 300;
    animation: fadeInUp 0.8s ease-out 0.3s both;
}

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

/* ===== DOLCI CONTAINER ===== */
.dolci-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    animation: fadeIn 0.8s ease-out;
}

.dolci-category {
    margin-bottom: 3rem;
    animation: fadeInUp 0.8s ease-out;
}

.dolci-category h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary);
    position: relative;
}

.dolci-category h2::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-light);
}

.dolci-items {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}

.dolci-item {
    background: rgba(30,30,30,0.7);
    border-radius: 10px;
    padding: 1.2rem;
    transition: all 0.3s ease;
    border: 1px solid #333;
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.dolci-item:hover {
    transform: translateY(-5px);
    border-color: var(--primary);
    box-shadow: 0 8px 20px rgba(216, 67, 21, 0.3);
}

.dolci-name {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.3rem;
    color: var(--text);
}

.dolci-price {
    font-size: 1.1rem;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 0.3rem;
}

.dolci-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    font-style: italic;
}

/* ===== BACK BUTTON ===== */
.back-button {
    text-align: center;
    margin-top: 2rem;
}

.return-btn {
    display: inline-flex;
    align-items: center;
    padding: 0.8rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text);
    background: rgba(216, 67, 21, 0.8);
    border-radius: 50px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(216, 67, 21, 0.3);
}

.return-btn:hover {
    transform: translateY(-3px);
    background: rgba(216, 67, 21, 1);
    box-shadow: 0 6px 15px rgba(216, 67, 21, 0.5);
}

.btn-icon {
    margin-right: 0.5rem;
    transition: transform 0.3s ease;
}

.return-btn:hover .btn-icon {
    transform: translateX(-5px);
}

/* ===== FOOTER ===== */
footer {
    background: linear-gradient(to top, var(--dark), var(--dark-light));
    padding: 1.5rem;
    text-align: center;
    border-top: 1px solid #333;
    position: relative;
    animation: slideUp 0.6s ease-out;
}

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

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent, var(--primary), transparent);
    animation: glow 3s infinite alternate;
}

@keyframes glow {
    from { opacity: 0.5; }
    to { opacity: 1; }
}

.footer-content p {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-light);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-dolci {
        padding: 4rem 1.5rem;
    }
    
    .dolci-items {
        grid-template-columns: 1fr;
    }
    
    .dolci-item {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .hero-dolci h1 {
        font-size: 2rem;
    }
    
    .hero-dolci p {
        font-size: 1rem;
    }
    
    .dolci-category h2 {
        font-size: 1.7rem;
    }
    
    .dolci-name {
        font-size: 1.1rem;
    }
}