:root {
    --primary-color: #7ab97a;
    --secondary-color: #f4d03f;
    --text-color: #2c3e50;
    --accent-color: #d5b8ff;
    --background-color: #f9f9f9;
    --heading-font: 'Cinzel', serif;
    --text-font: 'Playfair Display', serif;
    --script-font: 'Great Vibes', cursive;
}

body {
    font-family: var(--text-font);
    background: linear-gradient(to bottom, var(--background-color), var(--primary-color) 200%);
    color: var(--text-color);
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

body.campo-ricordi {
    background: linear-gradient(135deg, #b8e6ab 0%, #a3e090 50%, #8fd87a 100%);
    background-attachment: fixed;
}

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

header {
    background: linear-gradient(rgba(122, 185, 122, 0.9), rgba(122, 185, 122, 0.7));
    padding: 1rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.memorial {
    background: rgba(255, 255, 255, 0.95);
    border: 2px solid #d4c1a1;
    border-radius: 15px;
    padding: 2em;
    margin: 20px 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    text-align: center;
}

.memorial::before {
    content: '✝';
    display: block;
    text-align: center;
    font-size: 2em;
    color: #8b6b4d;
    margin-bottom: 0.5em;
}

.memorial:hover {
    transform: translateY(-5px);
}

.memorial-image {
    width: 100%;
    max-width: 300px;
    margin: 0 auto 20px;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.memorial-image img {
    width: 100%;
    height: 300px;
    object-fit: contain;
    background-color: rgba(255, 255, 255, 0.9);
    padding: 10px;
    display: block;
    transition: transform 0.3s ease;
}

.memorial {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 25px;
    text-align: center;
}

.btn-candle {
    background: linear-gradient(45deg, #ffd54f, #ffb74d);
    color: #5d4037;
    border: none;
    padding: 12px 25px;
    border-radius: 30px;
    font-family: var(--heading-font);
    font-size: 1em;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(255, 193, 7, 0.3);
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    margin: 10px 0;
    text-decoration: none;
}

.btn-candle:before {
    content: "🕯️";
    margin-right: 10px;
    font-size: 1.3em;
}

.btn-candle:hover {
    background: linear-gradient(45deg, #ffb74d, #ffa726);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.4);
}

.candle-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
    padding: 15px;
    border-top: 1px solid rgba(139, 107, 77, 0.2);
}

.candle-count {
    color: #8b6b4d;
    font-family: var(--script-font);
    font-size: 1.2em;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.05);
}

@keyframes candleGlow {
    0% { box-shadow: 0 0 5px var(--secondary-color); }
    50% { box-shadow: 0 0 15px var(--secondary-color); }
    100% { box-shadow: 0 0 5px var(--secondary-color); }
}

.candle-lit {
    animation: candleGlow 2s infinite;
}

form {
    background: rgba(255, 255, 255, 0.9);
    padding: 30px;
    border-radius: 15px;
    max-width: 600px;
    margin: 20px auto;
}

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

.form-group label {
    font-family: var(--heading-font);
    color: #4a4a4a;
    display: block;
    margin-bottom: 5px;
}

input, textarea {
    width: 100%;
    padding: 12px;
    margin: 8px 0;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--text-font);
}

.btn {
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 16px;
    font-family: var(--heading-font);
    letter-spacing: 1px;
    transition: all 0.3s ease;
}

.btn:hover {
    background: #689f68;
    transform: scale(1.05);
}

.memorial-name {
    font-family: var(--script-font);
    font-size: 2.2em;
    margin: 0.5em 0;
    color: #4a4a4a;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
}

.memorial-dates {
    font-family: var(--heading-font);
    font-size: 1.1em;
    color: #666;
    margin-bottom: 1em;
}

.memorial-message {
    font-family: var(--text-font);
    font-style: italic;
    line-height: 1.8;
    color: #333;
    margin: 1em 0;
}

.memorials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    padding: 20px;
}

.hero {
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)), url('img/sfondo1.webp');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 100px 0;
    margin-bottom: 40px;
}

.hero h1 {
    font-family: var(--script-font);
    font-size: 4em;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 20px;
}

nav ul {
    list-style: none;
    padding: 0;
    display: flex;
    gap: 20px;
}

nav ul li a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
}

.memorial-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    justify-content: center;
}

.btn-edit {
    background: var(--primary-color);
}

.btn-delete {
    background: #e74c3c;
}

.btn-secondary {
    background: #95a5a6;
    margin-left: 10px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    overflow: hidden;
}

.admin-table th,
.admin-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.admin-table th {
    background: var(--primary-color);
    color: white;
}

.admin-table tr:hover {
    background: rgba(255, 255, 255, 0.95);
}

.admin-stats {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 20px;
    text-align: center;
    z-index: 1000;
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.cookie-content button {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
}

.cookie-content a {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .container {
        padding: 10px;
    }

    .memorial {
        margin: 10px;
    }

    form {
        padding: 20px;
        margin: 10px;
    }

    .hero {
        padding: 50px 0;
    }

    .hero h1 {
        font-size: 2em;
    }

    nav ul {
        flex-direction: column;
        text-align: center;
    }

    .memorial-actions {
        flex-direction: column;
    }
}

.features-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin: 40px 0;
    flex-wrap: wrap;
}

.feature-card {
    flex: 1;
    min-width: 300px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    padding: 25px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.feature-card h2 {
    font-family: var(--heading-font);
    color: #4a4a4a;
    margin-bottom: 15px;
}

.feature-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

.btn-feature {
    display: inline-block;
    background: linear-gradient(45deg, var(--primary-color), #68a368);
    color: white;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-feature:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 768px) {
    .features-grid {
        flex-direction: column;
    }
    
    .feature-card {
        min-width: auto;
    }
}
.feature-emoji {
    font-size: 4em;
    margin-bottom: 20px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.feature-card {
    text-align: center;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
}


.contact-section {
    max-width: 800px;
    margin: 40px auto;
    padding: 20px;
}

.contact-intro {
    text-align: center;
    margin-bottom: 30px;
    font-style: italic;
    color: #666;
}

.contact-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    margin-bottom: 40px;
}

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

.contact-form label {
    display: block;
    margin-bottom: 8px;
    color: #4a4a4a;
    font-family: var(--heading-font);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--text-font);
    transition: border-color 0.3s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary-color);
    outline: none;
}

.error-message {
    background-color: #fee;
    color: #c00;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.success-message {
    background-color: #e8f5e9;
    color: #2e7d32;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.contact-methods {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 30px;
}

.contact-method {
    text-align: center;
    flex: 1;
    min-width: 250px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.contact-emoji {
    font-size: 2.5em;
    margin-bottom: 15px;
    display: block;
}

.contact-info {
    text-align: center;
    margin-top: 40px;
}

.contact-info h2 {
    margin-bottom: 30px;
    color: #4a4a4a;
}


.home-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.home-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    background: #689f68;
}

.home-button span {
    font-size: 24px;
}

.home-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--primary-color);
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

.home-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    background: #689f68;
}

.home-button span {
    font-size: 24px;
}


.login-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: #4a4a4a;
    font-family: var(--heading-font);
}

.login-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--text-font);
    transition: border-color 0.3s ease;
}

.login-form input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.form-footer {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.form-footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.form-footer a:hover {
    text-decoration: underline;
}

.register-container {
    max-width: 500px;
    margin: 40px auto;
    padding: 30px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 15px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

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

.register-form label {
    display: block;
    margin-bottom: 8px;
    color: #4a4a4a;
    font-family: var(--heading-font);
}

.register-form input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: var(--text-font);
    transition: border-color 0.3s ease;
}

.register-form input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.register-form input:invalid {
    border-color: #ff6b6b;
}

.register-form input:invalid:focus {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 2px rgba(255, 107, 107, 0.2);
}

.site-footer {
    background: linear-gradient(rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.9)), url('img/sfondo1.webp');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 60px 0 20px;
    margin-top: 80px;
    position: relative;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 40px;
}

.footer-section h3 {
    color: #fff;
    font-family: var(--heading-font);
    margin-bottom: 20px;
    font-size: 1.4em;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h3::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background: var(--primary-color);
}

.footer-section ul li {
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.footer-section ul li:hover {
    transform: translateX(5px);
}

.footer-section a {
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.social-links {
    margin-top: 25px;
    display: flex;
    gap: 15px;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    font-size: 20px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 40px;
    padding: 20px 40px;
    text-align: center;
    font-size: 0.9em;
}

.footer-bottom p {
    margin: 0;
}

.footer-contact {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-contact p {
    display: flex;
    align-items: center;
    gap: 10px;
}

.footer-contact i {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 0 20px;
    }
    
    .footer-section h3::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-contact p {
        justify-content: center;
    }
}