/* General Body and Container for context */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f7fa; /* Light background for the whole page */
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

/* Base Styles for buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn-primary {
    background-color: #007bff; /* Our unique blue */
    color: #fff;
}

.btn-primary:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: #0056b3; /* A darker shade of blue for contrast */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-secondary:hover {
    background-color: #003d80;
    transform: translateY(-2px);
}

.btn-secondary i {
    margin-left: 10px;
}

.full-width {
    width: 100%;
}

/* Events Hub Section */
.events-hub-section {
    padding: 60px 0;
    background-color: #f4f7fa;
}

.events-hub-section .section-title {
    font-size: 2.8rem;
    color: #2c3e50;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 700;
}

.events-hub-section .section-subtitle {
    font-size: 1.2rem;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 40px;
}

.events-content-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr 0.8fr; /* Calendar, Events List, Newsletter */
    gap: 30px;
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    padding: 30px;
}

/* Card Styling */
.events-calendar-card,
.events-list-card,
.newsletter-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

/* Calendar Card */
.events-calendar-card {
    grid-column: 1;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h3 {
    font-size: 1.5rem;
    color: #34495e;
    margin: 0;
}

.calendar-nav button {
    background: none;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 1rem;
    color: #555;
    margin-left: 5px;
    transition: background-color 0.2s;
}

.calendar-nav button:hover {
    background-color: #f0f0f0;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    text-align: center;
}

.day-name {
    font-weight: 600;
    color: #7f8c8d;
    padding: 10px 0;
    font-size: 0.9rem;
}

.date {
    padding: 12px 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    font-weight: 500;
}

.date:hover:not(.empty) {
    background-color: #e6f2ff;
    color: #007bff;
}

.date.empty {
    visibility: hidden;
}

.date.has-event {
    position: relative;
    font-weight: 600;
}

.date.has-event::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    width: 6px;
    height: 6px;
    background-color: #007bff; /* Event indicator */
    border-radius: 50%;
}

.date.current-day {
    background-color: #007bff;
    color: #fff;
    font-weight: 700;
}

.date.current-day.has-event::after {
    background-color: #fff; /* Event indicator for current day */
}

.rsvp-button {
    margin-top: 25px;
    width: 100%;
}

/* Events List Card */
.events-list-card {
    grid-column: 2;
}

.events-list-card h3 {
    font-size: 1.6rem;
    color: #34495e;
    margin-bottom: 25px;
}

.event-item {
    display: flex;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.event-item:last-child {
    border-bottom: none;
}

.event-icon {
    background-color: #e6f2ff; /* Light blue background for icons */
    color: #007bff;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    margin-right: 15px;
    flex-shrink: 0;
}

.event-details {
    flex-grow: 1;
}

.event-details h4 {
    font-size: 1.1rem;
    color: #34495e;
    margin: 0 0 5px 0;
    font-weight: 600;
}

.event-details p {
    font-size: 0.9rem;
    color: #7f8c8d;
    margin: 0;
}

.btn-rsvp, .btn-sync {
    background-color: #007bff;
    color: #fff;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s;
    flex-shrink: 0;
}

.btn-rsvp:hover, .btn-sync:hover {
    background-color: #0056b3;
}

.event-item.attending .event-icon {
    background-color: #d4edda; /* Light green for attending */
    color: #28a745;
}

.event-item.attending .btn-sync {
    background-color: #28a745; /* Green sync button */
}

.event-item.attending .btn-sync:hover {
    background-color: #218838;
}

/* Newsletter Card */
.newsletter-card {
    grid-column: 3;
    background-color: #007bff; /* Blue background for the newsletter form */
    color: #fff;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.newsletter-card h3 {
    font-size: 1.8rem;
    margin-top: 0;
    margin-bottom: 10px;
    font-weight: 700;
    color: #fff;
}

.newsletter-card p {
    font-size: 1rem;
    margin-bottom: 30px;
    line-height: 1.5;
    color: #e6f2ff;
}

.newsletter-form .form-group {
    margin-bottom: 15px;
    position: relative;
}

.newsletter-form input[type="email"],
.newsletter-form input[type="tel"],
.newsletter-form select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, background-color 0.3s;
}

.newsletter-form input::placeholder,
.newsletter-form select {
    color: rgba(255, 255, 255, 0.7);
}

.newsletter-form input:focus,
.newsletter-form select:focus {
    border-color: #fff;
    background-color: rgba(255, 255, 255, 0.2);
}

.newsletter-form .sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.select-sync {
    position: relative;
}

.select-sync select {
    padding-right: 40px; /* Make space for the icon button */
    appearance: none; /* Remove default arrow */
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="white" width="24px" height="24px"><path d="M7 10l5 5 5-5z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
}

.select-sync .btn-icon {
    position: absolute;
    right: 1px;
    top: 1px;
    bottom: 1px;
    background-color: transparent;
    border: none;
    color: #fff;
    padding: 0 10px;
    font-size: 1.1rem;
    cursor: pointer;
    transition: background-color 0.2s;
    border-radius: 0 8px 8px 0;
}

.select-sync .btn-icon:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.calendar-sync-options {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    gap: 10px;
}

.sync-option-btn {
    flex: 1;
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 8px;
    padding: 10px 15px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, border-color 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sync-option-btn i {
    margin-right: 8px;
    font-size: 1.1rem;
}

.sync-option-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: #fff;
}

/* Font Awesome for icons (if you're using it) */
/* Make sure to link Font Awesome in your HTML <head> */
/* <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"> */


/* Responsive Adjustments */
@media (max-width: 992px) {
    .events-content-wrapper {
        grid-template-columns: 1fr; /* Stack cards on smaller screens */
    }

    .events-calendar-card,
    .events-list-card,
    .newsletter-card {
        grid-column: auto;
    }

    .newsletter-card {
        padding: 25px;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 600px) {
    .events-hub-section {
        padding: 40px 0;
    }

    .events-content-wrapper {
        padding: 20px;
        gap: 20px;
    }

    .calendar-grid {
        gap: 5px;
    }

    .day-name, .date {
        padding: 8px 0;
        font-size: 0.85rem;
    }

    .newsletter-card h3 {
        font-size: 1.5rem;
    }

    .newsletter-card p {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }

    .sync-option-btn {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .sync-option-btn i {
        margin-right: 5px;
    }
}