:root {
    --primary-color: #004C98;
    /* Greek Blue */
    --primary-dark: #003366;
    --accent-color: #D4AF37;
    /* Gold */
    --text-color: #333333;
    --bg-color: #F4F6F8;
    --card-bg: #FFFFFF;
    --white: #FFFFFF;
    --danger: #DC3545;
    --success: #28a745;
    --font-heading: 'Cinzel', serif;
    --font-body: 'Lato', sans-serif;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --radius: 8px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: var(--primary-color);
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color);
}

/* Layout */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Home Grid Layout */
.home-grid {
    display: grid;
    grid-template-columns: 2fr 2fr 1fr;
    /* Events | News | Calendar */
    gap: 2rem;
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: var(--shadow-sm);
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 2rem;
}

nav a {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-color);
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: width 0.3s ease;
}

nav a:hover::after,
nav a.active::after {
    width: 100%;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 4rem 0;
    text-align: center;
    margin-bottom: 2rem;
}

.hero h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 1rem;
}

.hero p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    margin-bottom: 2rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.event-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}

.event-date {
    display: inline-block;
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: bold;
    margin-bottom: 1rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input[type="text"],
input[type="password"],
input[type="date"],
input[type="datetime-local"],
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
}

footer p {
    opacity: 0.8;
}

/* Calendar Styling */
.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-header {
    background: var(--primary-color);
    color: white;
    padding: 10px;
    text-align: center;
    font-weight: bold;
}

.calendar-day {
    background: var(--white);
    padding: 10px;
    min-height: 100px;
    border: 1px solid #eee;
}

.calendar-day.empty {
    background: transparent;
    border: none;
}

.calendar-day.today {
    border: 2px solid var(--accent-color);
}

.calendar-event {
    display: block;
    background: var(--primary-color);
    color: white;
    font-size: 0.8em;
    padding: 2px 4px;
    margin-top: 2px;
    border-radius: 4px;
    text-decoration: none;
}

/* Login Page specific */
.login-container {
    max-width: 400px;
    margin: 4rem auto;
}

/* Sidebar Calendar Widget */
.calendar-widget {
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    max-width: 300px;
    /* Limit width */
    margin-bottom: 3rem;
    border: 1px solid #eee;
}

.widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 0.5rem;
}

.widget-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary-color);
}

.widget-header span {
    font-weight: bold;
    color: var(--text-color);
    font-size: 0.9rem;
}

.calendar-mini-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    /* Tighter gap */
}

.cal-head {
    font-size: 0.75rem;
    font-weight: bold;
    text-align: center;
    color: #888;
    margin-bottom: 0.25rem;
}

.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    border-radius: 4px;
    cursor: default;
    background: #f9f9f9;
    /* Slight background for days */
}

.cal-day.event-day {
    background-color: var(--danger);
    /* Red as requested */
    color: white;
    cursor: help;
    /* Indicates tooltip */
    font-weight: bold;

}

/* Responsive Design */
@media (max-width: 768px) {

    /* Layout */
    .container {
        width: 95%;
        padding: 0 10px;
    }

    /* Header */
    header .container {
        flex-direction: column;
        gap: 1rem;
    }

    .logo {
        margin-bottom: 0.5rem;
    }

    nav ul {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    nav a {
        font-size: 0.9rem;
    }

    /* Main Content Grid (Sidebar Stacking) */
    .home-grid {
        grid-template-columns: 1fr;
        /* Force single column */
        gap: 2rem;
    }

    /* Admin Dashboard Grid */
    .container>div[style*="grid-template-columns: 1fr 1fr"] {
        grid-template-columns: 1fr !important;
    }

    /* Hero */
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    /* Calendar Widget */
    .calendar-widget {
        max-width: 100%;
        /* Full width on mobile */
        margin: 0 auto 2rem auto;
    }

    .calendar-mini-grid {
        gap: 1px;
    }

    .cal-day {
        font-size: 0.9rem;
        /* Slightly larger targets */
    }

    /* Forms */
    input[type="text"],
    input[type="password"],
    input[type="date"],
    input[type="datetime-local"],
    textarea,
    select {
        font-size: 16px;

        /* Prevent zoom on iOS */
        select {
            font-size: 16px;
            /* Prevent zoom on iOS */
        }
    }

    /* Social Actions */
    .event-actions {
        display: flex;
        gap: 1rem;
        margin-top: 1rem;
        border-top: 1px solid #f0f0f0;
        padding-top: 0.5rem;
    }

    .action-btn {
        background: none;
        border: none;
        cursor: pointer;
        font-size: 0.9rem;
        color: #666;
        display: flex;
        align-items: center;
        gap: 0.25rem;
        transition: color 0.2s;
        font-family: var(--font-body);
    }

    .action-btn:hover {
        color: var(--primary-color);
    }

    .action-btn.liked {
        color: var(--danger);
    }