/* Reset and base styles */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary-color: #1a365d;
    --accent-color: #e53e3e;
    --nav-width: 280px;
    --attention-color1: #e53e3e;
    --attention-color2: #ff6a3d;

    /* New variables from events page */
    --light-bg: #f8f9fa;
    --white: #ffffff;
    --text-dark: #2d3748;
    --text-medium: #4a5568;
    --text-light: #718096;
    --border-color: #e2e8f0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: all 0.3s ease;
    --dot-cont: #440303;
    --dot-sing: #1a365d;
}

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    min-height: 100vh;
}

/* Desktop Navigation (sidebar pushes content) */
@media (min-width: 1025px) {
    body {
        margin-left: var(--nav-width);
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: var(--nav-width);
        height: 100vh;
        background-color: var(--primary-color);
        color: white;
        padding: 2rem 0;
        z-index: 100;
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: var(--accent-color) var(--primary-color);
        transform: none !important;
        /* Override any transform */
    }

    .nav-toggle-btn {
        display: none;
        /* Hide toggle button on desktop */
    }
}



/* Custom scrollbar for Webkit browsers (Chrome, Safari) */
.main-nav::-webkit-scrollbar {
    width: 8px;
}

.main-nav::-webkit-scrollbar-track {
    background: var(--primary-color);
}

.main-nav::-webkit-scrollbar-thumb {
    background-color: var(--accent-color);
    border-radius: 4px;
}

/* Ensure the content doesn't get hidden behind the scrollbar */
.main-nav>* {
    padding-right: 8px;
    /* Match scrollbar width */
}

.collapsible-list {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 2rem;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
}

.collapsible-list:hover {
    color: var(--accent-color);
}

.collapsible-content {
    display: none;
}

.card-link {
    display: block;
    padding: 0.75rem 2rem;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
}

.card-link:hover {
    color: var(--accent-color);
}

.attention {
    color: white;
    width: 90%;
    padding: 10px;
    margin-right: 8px;
    border-radius: 8px;
    margin: 10px auto 2rem;
    background-color: var(--attention-color1);
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    0% {
        background-color: var(--attention-color1);
    }

    50% {
        background-color: var(--attention-color2);
    }

    100% {
        background-color: var(--attention-color1);
    }
}

.foglietto {
    max-width: 100%;
    height: auto;
    margin-bottom: 1rem;
}

.logo {
    padding: 0 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo img {
    width: 50px;
    height: auto;
    border-radius: 50%;
}

.logo h1 {
    font-size: 1.2rem;
    margin: 0;
    color: white;
}

.nav-list {
    list-style: none;
}

.nav-list a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 2rem;
    color: white;
    text-decoration: none;
    transition: background-color 0.3s;
    position: relative;
    transition: color 0.3s ease;
}

.nav-list a:hover,
.nav-list a.active {
    color: var(--accent-color);
}

.nav-list a:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-color);
    transition: width 0.3s ease;
}

.nav-list a:hover:after,
.nav-list a.active:after {
    width: 100%;
}

.nav-list a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-list i {
    width: 20px;
    text-align: center;
}

/* Main content */
.main-wrapper {
    min-height: 100vh;
    padding: 2rem;
    padding-bottom: calc(2rem + 300px);
    /* Space for footer */
    position: relative;
}

.content {
    max-width: 1200px;
    margin: 0 auto;
}

/* Content Styles */
.hero {
    text-align: center;
    padding: 4rem 2rem;
    background: linear-gradient(rgba(26, 54, 93, 0.9), rgba(26, 54, 93, 0.9)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    border-radius: 8px;
    margin-bottom: 3rem;
}



.hero h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: white;
}

.hero p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.card {
    background: white;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
}

.card.main-card {
    width: 100%;
}

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

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
}

.card-content p {
    margin-bottom: 1.5rem;
    color: #666;
}

.button {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

.button.primary {
    background: var(--accent-color);
    color: white;
}

.button.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.button.outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.button.foglietto {
    background: var(--accent-color);
    color: white;
    border: 2px solid var(--accent-color);
    font-weight: 500;
    font-size: 2rem;
    padding: 0.75rem 1.5rem;
    width: 100%;
}

.button.small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.button:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.events-section {
    margin-bottom: 3rem;
}

.events-section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
}

.event-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.events-grid.large .event-card {
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    background: var(--accent-color);
    color: white;
    border-radius: 0.5rem;
    min-width: 60px;
}

.event-date .day {
    font-size: 1.5rem;
    font-weight: bold;
    line-height: 1;
}

.event-date .month {
    font-size: 0.875rem;
    text-transform: uppercase;
}

.event-details h4 {
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.event-details p {
    color: #666;
    font-size: 0.875rem;
}

.link-arrow {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
}

.link-arrow:after {
    content: '→';
    transition: transform 0.3s ease;
}

.link-arrow:hover {
    color: var(--accent-color);
}

.link-arrow:hover:after {
    transform: translateX(4px);
}

/* Events Page */
.calendar-section {
    margin: 2rem 0;
}

.calendar-filters {
    margin: 1rem 0;
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.filter-btn {
    padding: 0.5rem 1rem;
    border: 2px solid var(--primary-color);
    background: none;
    color: var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color);
    color: white;
}

.events-grid.large .event-card {
    padding: 1.5rem;
    margin-bottom: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 2rem;
    background: white;
}

.events-grid.large .event-date {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 100px;
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border-radius: 4px;
}

.events-grid.large .event-date .day {
    font-size: 2rem;
    font-weight: bold;
}

.events-grid.large .event-details {
    flex: 1;
}

.events-grid.large .event-details h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
}

.events-grid.large .event-details .time {
    color: #666;
    margin-bottom: 1rem;
}

.events-grid.large .event-details .description {
    margin-bottom: 1rem;
}

/* About Page */
/* .about-hero removed, replaced by .hero.hero-solid */

.mission-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.mission-content ul {
    list-style: none;
    padding: 0;
}

.mission-content li {
    margin: 1rem 0;
    padding-left: 2rem;
    position: relative;
}

.mission-content li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: var(--accent-color);
}

.mission-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.team-section {
    margin: 3rem 0;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.team-member {
    text-align: center;
}

.team-member img {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    margin-bottom: 1rem;
    object-fit: cover;
}

.team-member .role {
    color: var(--accent-color);
    margin-bottom: 0.5rem;
}

/* Modern Timeline Styles - Mobile Layout for All Devices */
.timeline-container {
    position: relative;
    max-width: 900px;
    margin: 3rem auto;
    padding: 2rem 1rem;
}

.timeline-line {
    position: absolute;
    left: 30px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-color), var(--accent-color));
    border-radius: 2px;
    z-index: 1;
}

.timeline {
    position: relative;
    z-index: 2;
}

.timeline-item {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin: 3rem 0;
    position: relative;
}

.timeline-marker {
    position: absolute;
    left: 0;
    top: 20px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 3;
    transition: all 0.3s ease;
}

.timeline-marker:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.timeline-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1rem;
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    margin-left: 90px;
    max-width: calc(100% - 90px);
    text-align: left;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.timeline-year {
    background: linear-gradient(135deg, var(--accent-color), #ff6a3d);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.9rem;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin-bottom: 1rem;
}

.timeline-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
    font-weight: 600;
    text-align: left;
}

.timeline-content p {
    color: #666;
    line-height: 1.6;
    margin: 0;
    font-size: 1rem;
    text-align: left;
}

/* Contact Page */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.contact-info .info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-info .info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
}

.contact-form {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.map-section {
    margin: 3rem 0;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
}

.faq-section {
    margin: 3rem 0;
}

.faq-grid {
    display: grid;
    gap: 1rem;
}

.faq-item {
    background: white;
    padding: 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.faq-item h3 {
    margin: 0 0 1rem 0;
    color: var(--primary-color);
}

.quick-contact {
    background: #f8f9fa;
    padding: 3rem;
    border-radius: 8px;
    margin: 3rem 0;
}

.quick-contact .contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.newsletter-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    align-items: center;
}

.newsletter-form {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

/* Footer */
footer {
    bottom: 0;
    left: 0;
    right: 0;
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    padding: 3rem 2rem;
}

.footer-links {
    text-decoration: none;
    color: #c53030;
}

.footer-links a {
    text-decoration: none;
    color: white;
}

.quick-links ul {
    list-style: none;
    padding: 0;
}

.quick-links li {
    margin: 0.5rem 0;
}

.quick-links a {
    color: white;
    text-decoration: none;
    transition: color 0.3s ease;
}

.quick-links a:hover {
    color: var(--accent-color);
}

.footer-bottom {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-section,
.newsletter-section,
.contact-section {
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 2rem;
}

.contact-section {
    border-bottom: none;
}

.footer-content h3 {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.9);
}

.social-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
}

.social-links a {
    color: white;
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--accent-color);
}

#newsletter-form {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    max-width: 400px;
    margin: 0 auto;
}

#newsletter-form input {
    flex: 1;
    padding: 0.75rem;
    border: 0px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.1);
    color: black;
}

#newsletter-form button {
    padding: 0.75rem 1.5rem;
    background: var(--accent-color);
    border: none;
    border-radius: 4px;
    color: white;
    cursor: pointer;
    transition: background-color 0.3s;
    white-space: nowrap;
}

#newsletter-form button:hover {
    background-color: #c53030;
}

address {
    font-style: normal;
    line-height: 1.8;
}

address p {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
}

/* Section Headers */
section h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
    position: relative;
    padding-bottom: 1rem;
}

section h2:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: var(--accent-color);
}

.section-footer {
    text-align: center;
    margin-top: 2rem;
}

/* Responsive Design */
@media (max-width: 768px) {

    .contact-grid,
    .mission-section {
        grid-template-columns: 1fr;
    }

    .hero {
        padding: 2rem 1rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 1rem;
    }

    .quick-contact .contact-grid {
        grid-template-columns: 1fr;
    }

    .newsletter-form {
        flex-direction: column;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    /* Mobile Timeline Styles */
    .timeline-container {
        padding: 1rem;
    }

    .timeline-line {
        left: 30px;
        width: 2px;
    }

    .timeline-item {
        flex-direction: column;
        align-items: flex-start;
        margin: 2rem 0;
    }

    .timeline-item:nth-child(even) .timeline-content {
        flex-direction: column;
        text-align: left;
    }

    .timeline-item:nth-child(even) .timeline-content h3,
    .timeline-item:nth-child(even) .timeline-content p {
        text-align: left;
    }

    .timeline-marker {
        left: 30px;
        top: 20px;
        width: 40px;
        height: 40px;
        font-size: 1rem;
        transform: none;
    }

    .timeline-marker:hover {
        transform: scale(1.05);
    }

    .timeline-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 1.5rem;
        margin-left: 60px;
        max-width: none;
        text-align: left;
    }

    .timeline-content:hover {
        transform: none;
    }

    .timeline-year {
        margin-bottom: 0.5rem;
        font-size: 0.85rem;
    }

    .timeline-content h3 {
        font-size: 1.1rem;
        margin-bottom: 0.5rem;
    }

    .timeline-content p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* Activities Grid */
.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
}

.activity-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.activity-card i {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.activity-card h3 {
    margin-bottom: 0.5rem;
}

.activity-card p {
    color: #666;
}

:root {
    --primary-color: #1a365d;
    --dark-primary-color: #0b2a555e;
    --text-color: #333;
    --secondary-text: #666;
    --background: #f5f5f5;
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    --spacing: 2rem;
    --border-radius: 1rem;
}

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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    background-color: var(--background);
    min-height: 100vh;
    padding: var(--spacing);
    color: var(--text-color);
}

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

.page-title {
    text-align: center;
    color: var(--primary-color);
    margin-bottom: var(--spacing);
    font-size: 2.5rem;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--spacing);
    margin: var(--spacing) auto;
    justify-content: center;
}

.card {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    flex-shrink: 0;
}

.card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.card-content h3 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.25rem;
}

.card-content p {
    color: var(--secondary-text);
    margin-bottom: 1rem;
    flex-grow: 1;
}

.card-link {
    text-decoration: none;
    color: inherit;
    display: flex;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.card-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.card-link:hover::after {
    transform: scaleX(1);
}

.card.main-card {
    width: 100%;
}

.card-image.main-card {
    height: 320px;
}

@media (min-width: 768px) {
    .cards-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
}

@media (max-width: 767px) {
    .cards-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: var(--spacing) auto;
    }

    .page-title {
        font-size: 2rem;
    }
}

/* Additional styles specific to PDF viewer */
.pdf-container {
    display: flex;
    flex-direction: column;
    margin: 10px 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #ddd;
    background-color: #f5f5f5;
    transition: all 0.3s ease;
}

.pdf-scroll-container {
    width: 100%;
    height: 100%;
    overflow: auto;
    touch-action: auto;
    cursor: default;
}

.pdf-scroll-container.zoomed {
    cursor: move;
}

#pdf-viewer {
    width: 100%;
    height: 600px;
    position: relative;
    background-color: #525659;
    transition: all 0.3s ease;
    overflow: hidden;
}

#pdf-canvas {
    margin: 0 auto;
    display: block;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.pdf-controls {
    display: flex;
    padding: 10px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    z-index: 100;
}

.pdf-controls button {
    padding: 8px 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pdf-controls button:hover {
    background-color: var(--accent-color);
}

.pdf-controls .page-info {
    margin: 0 15px;
    font-weight: 500;
}

.pdf-controls input {
    width: 60px;
    padding: 6px;
    text-align: center;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.pdf-list table {
    width: 100%;
    border-collapse: collapse;
}

.pdf-list th,
.pdf-list td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e1e4e8;
}

.pdf-list th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--primary-color);
}

.loading-spinner {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    border: 6px solid #f3f3f3;
    border-top: 6px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Fullscreen styles */
.fullscreen-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    flex-direction: column;
}

.fullscreen-container .pdf-controls {
    background-color: rgba(0, 0, 0, 0.7);
    border-bottom: 1px solid #444;
    color: white;
}

.fullscreen-container #pdf-viewer {
    flex: 1;
    height: calc(100vh - 65px);
    background-color: #333;
}

.exit-fullscreen-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10000;
}

.exit-fullscreen-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

/* Mobile button text and fullscreen button control */
@media (max-width: 768px) {
    #pdf-viewer {
        height: 500px;
    }

    .pdf-controls {
        padding: 8px;
    }

    /* Hide button text on mobile, only show icons */
    .pdf-controls button .button-text {
        display: none;
    }

    /* Make buttons more compact */
    .pdf-controls button {
        padding: 8px;
        min-width: 36px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .pdf-controls {
        padding: 5px;
    }

    .pdf-controls button {
        padding: 6px;
        font-size: 0.9em;
    }

    .pdf-list th,
    .pdf-list td {
        padding: 8px;
    }
}

/* Zoom indicator */
.zoom-level {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 100;
    pointer-events: none;
}

.zoom-level.visible {
    opacity: 1;
}

/* Parishes Section */
.parishes {
    background-color: #f8f9fa;
    padding: 4rem 2rem;
    border-radius: 8px;
    margin-bottom: 3rem;
    text-align: center;
}

.parishes h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
}

.parishes ul {
    list-style: none;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.parishes li {
    background-color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    font-size: 1.1rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.parishes li:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.parishes p {
    max-width: 800px;
    margin: 0 auto;
    color: #666;
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .parishes {
        padding: 3rem 1.5rem;
    }

    .parishes ul {
        flex-direction: column;
        gap: 1rem;
    }

    .parishes li {
        width: 100%;
    }
}

/* Mobile Navigation (overlay) */
@media (max-width: 1024px) {
    .main-nav {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background-color: var(--primary-color);
        color: white;
        padding: 2rem 0;
        z-index: 1000;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .main-nav.active {
        transform: translateX(0);
    }

    .nav-toggle-btn {
        display: block;
        position: fixed;
        top: 1rem;
        left: 1rem;
        z-index: 1100;
        background: var(--primary-color);
        color: white;
        border: 1px solid var(--dark-primary-color);
        padding: 0.75rem;
        border-radius: 4px;
        cursor: pointer;
        box-shadow: 2px 2px 5px var(--dark-primary-color);
    }

    /* Overlay effect when nav is open */
    .nav-open::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 999;
        pointer-events: none;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .nav-open.nav-open::after {
        opacity: 1;
        pointer-events: auto;
    }

    .main-wrapper {
        padding: 2.5%;
    }
}

/* Eventi Page Styles */
/* .page-header removed, replaced by .hero */

.hero h1 {
    font-size: 2rem;
    margin-bottom: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.hero .page-subtitle {
    font-size: 1rem;
    opacity: 0.9;
    margin: 0;
}

.events-layout {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.calendar-section {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.calendar-section:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.calendar-header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.calendar-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0;
}

.calendar-nav {
    display: flex;
    gap: 0.5rem;
}

.nav-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: var(--transition);
}

.nav-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.calendar-grid {
    padding: 1rem;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.weekday {
    text-align: center;
    font-weight: 600;
    color: var(--text-medium);
    padding: 0.5rem;
    font-size: 0.9rem;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
    min-height: 70px;
}

.calendar-day:hover {
    background: var(--light-bg);
    transform: scale(1.05);
}

.calendar-day.today {
    background: #e6fffa;
    border: 2px solid #38b2ac;
    font-weight: bold;
}

.calendar-day.other-month {
    color: var(--text-light);
    opacity: 0.5;
}

.calendar-day.has-events {
    background: #fef5e7;
    border: 2px solid var(--accent-color);
}

.calendar-day.has-single-events {
    background: #4299e1;
    color: white;
    border: 2px solid #3182ce;
}

.calendar-day.has-continuous-events {
    background: var(--accent-color);
    color: white;
    border: 2px solid #c53030;
}

.calendar-day.has-mixed-events {
    background: #ed8936;
    color: white;
    border: 2px solid #dd6b20;
}

/* Improved dot colors for better visibility */
.calendar-day.has-single-events .event-dot {
    background: #ffffff;
}

.calendar-day.has-continuous-events .event-dot {
    background: #ffffff;
}

.calendar-day.has-mixed-events .event-dot {
    background: #2d3748;
}

.calendar-day.event-start {
    position: relative;
}

.calendar-day.event-start::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(26, 54, 93, 0.6);
}

.calendar-day.event-end {
    position: relative;
}

.calendar-day.event-end::after {
    content: '';
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 0 4px rgba(229, 62, 62, 0.6);
}

.calendar-day.selected {
    background: var(--primary-color) !important;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(26, 54, 93, 0.3);
}

.day-number {
    font-size: 1.1rem;
    font-weight: 500;
    margin-bottom: 0.25rem;
}

.event-indicators {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
}

.event-dot {
    width: 6px;
    height: 6px;
    background: var(--accent-color);
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(255, 255, 255, 0);
}

.events-sidebar {
    background: var(--white);
    border-radius: 12px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
}

.events-sidebar:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.sidebar-header {
    background: var(--primary-color);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.sidebar-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    line-height: 1.3;
    text-align: center;
}

.events-container {
    max-height: 600px;
    overflow-y: auto;
    padding: 1rem;
}

.events-container::-webkit-scrollbar {
    width: 6px;
}

.events-container::-webkit-scrollbar-track {
    background: var(--light-bg);
    border-radius: 3px;
}

.events-container::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

.event-card {
    background: var(--light-bg);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--accent-color);
    transition: var(--transition);
    cursor: pointer;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 0.75rem;
    align-items: start;
}

.event-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.event-section {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-height: 80px;
}

.event-section-1 {
    border-right: 1px solid var(--border-color);
    padding-right: 0.75rem;
}

.event-section-2 {
    border-right: 1px solid var(--border-color);
    padding-right: 0.75rem;
}

.event-section-3 {
    padding-left: 0;
}

.event-type {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.event-type.continuous {
    background: var(--accent-color);
    color: white;
}

.event-type.single {
    background: var(--primary-color);
    color: white;
}

.event-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 0.5rem 0;
    line-height: 1.3;
}

.event-meta {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.event-datetime {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.datetime-row {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-medium);
}

.datetime-label {
    font-weight: 600;
    min-width: 50px;
    color: var(--text-dark);
}

.datetime-value {
    color: var(--text-medium);
    font-weight: 500;
}

.day-counter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #e6fffa;
    color: #2b6cb0;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    align-self: flex-start;
}

.duration-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #fef5e7;
    color: #d69e2e;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.8rem;
    align-self: flex-start;
}

.event-place {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-medium);
    font-weight: 500;
}

.event-description {
    margin-top: 0.5rem;
    color: var(--text-light);
    font-size: 0.85rem;
    line-height: 1.4;
}

.duration-badge {
    display: inline-block;
    background: #fef5e7;
    color: #d69e2e;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

.no-events {
    text-align: center;
    padding: 2rem;
    color: var(--text-light);
}

.no-events i {
    font-size: 3rem;
    margin-bottom: 1rem;
    opacity: 0.5;
}

@media (max-width: 1024px) {
    .events-layout {
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    .page-header {
        padding: 2rem 1rem;
    }

    .page-header h1 {
        font-size: 2rem;
        flex-direction: column;
        gap: 0.5rem;
    }

    .page-subtitle {
        font-size: 1rem;
    }

    .calendar-header {
        padding: 1rem;
    }

    .calendar-title {
        font-size: 1.2rem;
    }

    .calendar-grid {
        padding: 0.5rem;
    }

    .calendar-day {
        min-height: 60px;
        padding: 0.25rem;
        aspect-ratio: 1;
    }

    .sidebar-header {
        padding: 1rem;
    }

    .sidebar-title {
        font-size: 1.1rem;
    }

    .events-container {
        padding: 0.5rem;
    }

    .event-card {
        padding: 0.75rem;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .event-section {
        min-height: auto;
        border-right: none !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
        border-bottom: 1px solid var(--border-color);
        padding-bottom: 1rem;
        margin-bottom: 0.5rem;
    }

    .event-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 0;
    }

    .event-section-1,
    .event-section-2,
    .event-section-3 {
        border-right: none !important;
        padding-right: 0 !important;
        padding-left: 0 !important;
    }
}

@media (max-width: 640px) {
    .calendar-days {
        grid-template-columns: repeat(7, minmax(35px, 1fr));
        gap: 2px;
    }

    .weekdays {
        grid-template-columns: repeat(7, minmax(35px, 1fr));
        gap: 2px;
    }

    .calendar-day {
        min-height: 45px;
        padding: 0.2rem;
        aspect-ratio: 1;
    }

    .day-number {
        font-size: 0.9rem;
        margin-bottom: 0.1rem;
    }

    .event-dot {
        width: 4px;
        height: 4px;
    }

    .calendar-day.event-start::before,
    .calendar-day.event-end::after {
        width: 4px;
        height: 4px;
    }
}

@media (max-width: 480px) {
    .calendar-nav {
        gap: 0.25rem;
    }

    .nav-btn {
        width: 32px;
        height: 32px;
        font-size: 0.9rem;
    }

    .calendar-days {
        grid-template-columns: repeat(7, minmax(30px, 1fr));
        gap: 1px;
    }

    .weekdays {
        grid-template-columns: repeat(7, minmax(30px, 1fr));
        gap: 1px;
    }

    .calendar-day {
        min-height: 40px;
        padding: 0.15rem;
    }

    .day-number {
        font-size: 0.8rem;
        margin-bottom: 0.1rem;
    }

    .weekday {
        font-size: 0.75rem;
        padding: 0.25rem 0.1rem;
    }

    .event-dot {
        width: 3px;
        height: 3px;
    }

    .calendar-day.event-start::before,
    .calendar-day.event-end::after {
        width: 3px;
        height: 3px;
    }
}

@media (max-width: 360px) {
    .calendar-days {
        grid-template-columns: repeat(7, minmax(25px, 1fr));
        gap: 1px;
    }

    .weekdays {
        grid-template-columns: repeat(7, minmax(25px, 1fr));
        gap: 1px;
    }

    .calendar-day {
        min-height: 35px;
        padding: 0.1rem;
    }

    .day-number {
        font-size: 0.75rem;
        margin-bottom: 0.05rem;
    }

    .weekday {
        font-size: 0.7rem;
        padding: 0.2rem 0.05rem;
    }
}

/* Admin UI Styles */
.attention {
    color: white;
    width: 90%;
    padding: 10px;
    margin-right: 8px;
    border-radius: 8px;
    margin: 10px auto 2rem;
    background-color: var(--attention-color1);
    animation: pulse 2s infinite alternate;
}

@keyframes pulse {
    0% {
        background-color: var(--attention-color1);
    }

    50% {
        background-color: var(--attention-color2);
    }

    100% {
        background-color: var(--attention-color1);
    }
}

.alert {
    padding: 1rem;
    margin-bottom: 1rem;
    border-radius: 4px;
    border: 1px solid transparent;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border-color: #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border-color: #f5c6cb;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
    border-color: #ffeaa7;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}

.admin-table th,
.admin-table td {
    padding: 0.75rem;
    border-bottom: 1px solid var(--border-color);
    text-align: left;
}

.admin-table th {
    background-color: var(--light-bg);
    font-weight: 600;
}

/* Login Page Specifics */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--light-bg);
}

.login-card {
    width: 100%;
    max-width: 400px;
}

.password-container {
    position: relative;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--primary-color);
}