:root {
    --primary-color: #B3E5FC;
    --primary-dark: #81D4FA;
    --secondary-color: #C8E6C9;
    --secondary-dark: #A5D6A7; 
    --accent-color: #FFF59D; 
    --text-dark: #2C3E50;
    --text-light: #2C3E50;
    --font-main: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Playfair Display', serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    /* Sfondo velato più trasparente per far risaltare l'immagine della chiesa */
    background: linear-gradient(rgba(255, 255, 255, 0.5), rgba(255, 255, 255, 0.5)), url('immagini/Chiesa.jpg') no-repeat center center fixed;
    background-size: cover;
    line-height: 1.6;
    display: flex;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: #1A5276;
    margin-bottom: 15px;
}

a {
    text-decoration: none;
    color: #1A5276;
    transition: color 0.3s ease;
}

a:hover {
    color: #117864;
}

/* -------------------------------------
   SIDEBAR NAVIGAZIONE A SINISTRA
   ------------------------------------- */
.sidebar {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 200px;
    height: calc(100vh - 40px);
    
    /* Sidebar molto più trasparente */
    background: linear-gradient(rgba(179, 229, 252, 0.3), rgba(200, 230, 201, 0.4));
    
    padding: 40px 20px;
    box-shadow: 4px 4px 15px rgba(0,0,0,0.1);
    z-index: 1000;
    border-radius: 30px; /* Tutti i lati arrotondati */
    display: flex;
    flex-direction: column;
}

.sidebar ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.sidebar ul li a {
    display: block;
    color: var(--text-dark);
    font-weight: 600;
    padding: 12px 20px;
    border-radius: 25px;
    transition: background-color 0.3s ease, transform 0.2s;
    text-align: center;
}

.sidebar ul li a:hover, .sidebar ul li a.active {
    background-color: var(--secondary-color);
    color: #1A5276;
    transform: translateX(5px);
}

/* -------------------------------------
   CONTENITORE PRINCIPALE
   ------------------------------------- */
.content-wrapper {
    margin-left: 240px; /* 20px(margine) + 200px(larghezza) + 20px(spazio) */
    width: calc(100% - 240px);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header (solo logo) */
header {
    background-color: transparent;
    padding: 30px 20px;
    text-align: left;
}

header .logo h1 {
    font-size: 28px;
    margin: 0;
}

header .logo span {
    color: #117864;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Hero Section ("Benvenuti") */
.hero {
    background: linear-gradient(rgba(179, 229, 252, 0.75), rgba(200, 230, 201, 0.85)), url('immagini/Chiesa.jpg') no-repeat center center;
    background-size: cover;
    height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 20px;
    border-radius: 35px;
    margin: 10px auto 30px;
    width: 95%;
    max-width: 1400px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    font-weight: 600;
    color: #2C3E50;
}

.btn {
    display: inline-block;
    padding: 14px 35px;
    background-color: var(--secondary-color);
    color: #1A5276;
    border-radius: 40px;
    font-weight: 700;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 6px 15px rgba(200, 230, 201, 0.6);
}

.btn:hover {
    background-color: var(--secondary-dark);
    transform: translateY(-3px);
}

/* Sections */
section { padding: 40px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 40px; color: #1A5276; }
.section-title::after { content: ''; display: block; width: 80px; height: 5px; background-color: var(--secondary-color); margin: 15px auto 0; border-radius: 10px; }

/* Cards */
.grid-container { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 30px; }
.card { background-color: rgba(255, 255, 255, 0.9); border-radius: 30px; padding: 35px; box-shadow: 0 8px 25px rgba(0,0,0,0.05); border: 3px solid transparent; transition: transform 0.3s ease, border-color 0.3s ease; }
.card:hover { transform: translateY(-8px); border-color: var(--primary-color); }
.card h3 { font-size: 1.6rem; color: #1A5276; margin-bottom: 10px; }
.card-date { font-size: 0.95rem; color: #117864; margin-bottom: 15px; display: block; font-weight: 600; }

/* Table */
.table-container { background-color: rgba(255, 255, 255, 0.9); border-radius: 30px; padding: 30px; box-shadow: 0 8px 25px rgba(0,0,0,0.05); overflow-x: auto; }
table { width: 100%; border-collapse: separate; border-spacing: 0; margin-top: 10px; }
th, td { padding: 18px 20px; text-align: left; border-bottom: 1px solid #f0f0f0; }
th { background-color: var(--primary-color); color: #1A5276; font-weight: 700; }
th:first-child { border-top-left-radius: 20px; } th:last-child { border-top-right-radius: 20px; }
tr:hover td { background-color: rgba(200, 230, 201, 0.3); }

/* Footer */
footer {
    background-color: var(--primary-color);
    color: var(--text-dark);
    padding: 40px 0 20px;
    text-align: center;
    border-top-left-radius: 30px;
    border-top-right-radius: 0;
    margin-top: auto;
}

/* Inputs */
input, textarea { border-radius: 20px !important; border: 2px solid #e0e0e0 !important; background-color: #fafafa; }
input:focus, textarea:focus { outline: none; border-color: var(--secondary-color) !important; background-color: #fff; }

.page-header { background-color: var(--primary-color); padding: 50px 20px; border-radius: 35px; margin: 30px auto; width: 95%; max-width: 1400px; text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }
.page-header h2 { color: #1A5276; margin: 0; font-size: 2.5rem; }

/* Responsive */
@media (max-width: 992px) {
    body { flex-direction: column; }
    .sidebar { position: relative; width: 100%; height: auto; border-radius: 0 0 30px 30px; padding: 20px; }
    .sidebar ul { flex-direction: row; flex-wrap: wrap; justify-content: center; }
    .content-wrapper { margin-left: 0; width: 100%; }
    header { text-align: center; }
}
