:root {
    --primary-color: #1e3a5f;
    --secondary-color: #5a7b92;
    --accent-color: #c7622b;
    --accent-light: #e8a76a;
    --background-color: #f5f8fb;
    --text-color: #2d3748;
    --success-color: #2f855a;
}

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

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 5%;
    background: linear-gradient(135deg, rgba(30, 58, 95, 0.98) 0%, rgba(90, 123, 146, 0.98) 100%);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.nav-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.nav-links a {
    margin-left: 2rem;
    text-decoration: none;
    color: #ffffff;
    font-weight: 500;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
}

.nav-links a:hover {
    color: var(--accent-light);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* Hero Section */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(30, 58, 95, 0.55), rgba(30, 58, 95, 0.55)), url('https://images.unsplash.com/photo-1438232992991-995b7058bbb3?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    position: relative;
    color: white;
}

.hero-content {
    z-index: 1;
    animation: fadeIn 0.8s ease-out;
}

.hero-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInDown 1s ease-out;
    letter-spacing: 1px;
    text-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.4rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out;
    font-weight: 300;
    letter-spacing: 0.5px;
}

/* Animated Cross */
.animated-cross {
    width: 140px;
    height: 200px;
    margin: 2rem auto;
    position: relative;
    animation: glow 2s infinite;
}

.animated-cross::before,
.animated-cross::after {
    content: '';
    position: absolute;
    background: white;
    border-radius: 6px;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.7);
}

/* Vertical beam */
.animated-cross::before {
    width: 40px;
    height: 200px;
    left: 50px;
    top: 0;
}

/* Horizontal beam */
.animated-cross::after {
    width: 140px;
    height: 40px;
    left: 0;
    top: 60px;
}

/* About Section */
.about {
    padding: 6rem 10%;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f5f8fb 100%);
    position: relative;
    overflow: hidden;
}

.about::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(199, 98, 43, 0.05) 0%, transparent 70%);
    pointer-events: none;
}

.about h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.about h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
    margin: 1rem auto 0;
    border-radius: 2px;
}

.about p {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    color: var(--secondary-color);
    line-height: 1.8;
    position: relative;
    z-index: 1;
}

/* Devotional Section */
.devotional {
    padding: 6rem 10%;
    background: linear-gradient(135deg, #f5f8fb 0%, white 50%, #f5f8fb 100%);
}

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

.book-content h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 3rem;
    text-align: center;
}

.book-content h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
    margin: 1rem auto 0;
    border-radius: 2px;
}

.book-details {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-top: 3rem;
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.book-details img {
    max-width: 280px;
    box-shadow: 0 10px 25px rgba(30, 58, 95, 0.2);
    transition: transform 0.3s ease;
    border-radius: 8px;
}

.book-details img:hover {
    transform: scale(1.08) rotate(1deg);
}

.book-text {
    flex: 1;
}

.book-text h3 {
    font-family: 'Playfair Display', serif;
    color: var(--accent-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    letter-spacing: 2px;
}

.book-text p {
    color: var(--secondary-color);
    line-height: 1.8;
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.cta-button {
    display: inline-block;
    padding: 1rem 2.5rem;
    margin-top: 2rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, #d17e3d 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 12px rgba(199, 98, 43, 0.2);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(199, 98, 43, 0.3);
}

/* Media Section */
.media {
    padding: 6rem 10%;
    background: linear-gradient(135deg, white 0%, #f5f8fb 100%);
}

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

.social-section {
    text-align: center;
    margin-bottom: 4rem;
}

.social-section h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.social-section h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-color), var(--accent-light));
    margin: 1rem auto 0;
    border-radius: 2px;
}

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

.social-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 2rem;
    text-decoration: none;
    color: white;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-link:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

.social-link i {
    font-size: 1.3rem;
}

.rumble {
    background: linear-gradient(135deg, #85c742, #6fb02e);
}

.youtube {
    background: linear-gradient(135deg, #FF0000, #dd0000);
}

.facebook {
    background: linear-gradient(135deg, #1877f2, #1563d8);
}

/* Streams Section */
.streams-section {
    margin-top: 80px;
    padding: 4rem 10%;
    background-color: white;
}

.streams-container {
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

.streams-container h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 2.5rem;
    margin-bottom: 2rem;
}

.streams-embed {
    position: relative;
    width: 100%;
    max-width: 1000px;
    margin: 0 auto 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.streams-embed iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

.streams-link {
    margin-top: 2rem;
    text-align: center;
}

.streams-link p {
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, rgba(30, 58, 95, 0.9) 100%);
    color: white;
    padding: 5rem 10% 2rem;
    position: relative;
    overflow: hidden;
}

footer::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(199, 98, 43, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 3rem;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.footer-section {
    padding: 0 1rem;
}

.footer-section h4 {
    font-family: 'Playfair Display', serif;
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    color: var(--accent-light);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.85);
    line-height: 1.8;
}

.footer-section a {
    display: block;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    margin-bottom: 0.75rem;
    transition: all 0.3s ease;
    font-weight: 500;
}

.footer-section a:hover {
    color: var(--accent-light);
    padding-left: 0.5rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.75);
    position: relative;
    z-index: 1;
}

/* Calendar Styles */
.calendar-container {
    max-width: 1200px;
    margin: 100px auto 40px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

.calendar-header h2 {
    font-family: 'Playfair Display', serif;
    color: var(--primary-color);
    font-size: 2rem;
}

.calendar-nav {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 8px 16px;
    background-color: var(--primary-color);
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.nav-btn:hover {
    background-color: var(--accent-color);
}

.calendar-grid {
    width: 100%;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    text-align: center;
    font-weight: bold;
    color: var(--primary-color);
    padding: 10px 0;
    border-bottom: 1px solid #eee;
}

.days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 10px;
    padding-top: 10px;
}

.day {
    min-height: 120px;
    padding: 10px;
    border: 1px solid #eee;
    border-radius: 5px;
    position: relative;
}

.day.empty {
    background: #f9f9f9;
}

.day.past {
    background: #f5f5f5;
    color: #999;
}

.day-number {
    position: absolute;
    top: 5px;
    right: 5px;
    font-weight: bold;
    color: var(--secondary-color);
}

.day-events {
    margin-top: 25px;
    font-size: 0.9em;
}

.day-event {
    background: var(--primary-color);
    color: white;
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.day-event:hover {
    transform: translateY(-2px);
}

.day-event .event-title {
    font-weight: 500;
    display: block;
    margin-bottom: 2px;
}

.recurrence-options {
    background: #f8fafc;
    padding: 15px;
    border-radius: 5px;
    margin-top: 10px;
    border: 1px solid #e2e8f0;
}

#submitBtn {
    background-color: var(--accent-color);
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.3s ease;
}

#submitBtn:hover {
    background-color: #b7791f;
}

.event {
    background: var(--primary-color);
    color: white;
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 3px;
    font-size: 0.85em;
}

.event.cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.cancelled-x {
    color: #dc3545;
    font-weight: bold;
    font-size: 1.2em;
    margin-right: 5px;
}

.cancellation-info {
    display: flex;
    align-items: center;
    font-size: 0.9em;
    margin-top: 2px;
    padding-top: 2px;
    border-top: 1px solid #f5c6cb;
}

.cancel-reason {
    margin: 0;
    font-style: italic;
    color: #721c24;
}

/* Calendar Management Styles */
.manage-calendar-container {
    max-width: 90%;
    margin: 100px auto 40px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.admin-calendar-grid {
    width: 100%;
    margin-top: 30px;
}

.admin-calendar-grid .days {
    gap: 15px;
}

.admin-calendar-grid .day {
    min-height: 150px;
    padding: 15px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.admin-calendar-grid .day:hover:not(.empty):not(.past) {
    background-color: #f0f4f8;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    position: relative;
    background-color: white;
    margin: 2% auto;
    width: 90%;
    max-width: 500px;
    border-radius: 10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    transform: translateY(-20px);
    opacity: 0;
    transition: all 0.3s ease;
    height: 90vh;
    display: flex;
    flex-direction: column;
}

.modal-content > form {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modal-content h3 {
    position: sticky;
    top: 0;
    background: white;
    padding: 20px 30px;
    margin: 0;
    border-bottom: 1px solid #e2e8f0;
    border-radius: 10px 10px 0 0;
    z-index: 2;
}

.form-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 30px;
    margin-bottom: 0;
}

.form-content::-webkit-scrollbar {
    width: 8px;
}

.form-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.form-content::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

.form-content::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}

.modal-buttons {
    background: white;
    padding: 20px 30px;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 10px 10px;
    z-index: 2;
    margin-top: 0;
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    z-index: 3;
}

.form-group:first-child {
    margin-top: 0;
}

@media (max-height: 600px) {
    .modal-content {
        height: 95vh;
        margin: 10px auto;
    }
}

.modal.show .modal-content {
    transform: translateY(0);
    opacity: 1;
}

.modal h3 {
    color: var(--primary-color);
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.modal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.modal-buttons button {
    flex: 1;
    min-width: 150px;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
    color: white;
    font-weight: 500;
}

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

.secondary-btn:hover {
    background-color: #4a5568;
}

.delete-btn {
    background-color: #e53e3e;
}

.delete-btn:hover {
    background-color: #c53030;
}

.cancel-occurrence-btn {
    background-color: var(--accent-color);
}

.cancel-occurrence-btn:hover {
    background-color: #b7791f;
}

.close {
    position: absolute;
    right: 20px;
    top: 10px;
    font-size: 28px;
    font-weight: bold;
    color: var(--secondary-color);
    cursor: pointer;
}

.close:hover {
    color: var(--primary-color);
}

/* Form Styles */
.login-container {
    max-width: 600px;
    margin: 100px auto 40px;
    padding: 30px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 15px;
}

.form-group label {
    font-weight: bold;
    color: var(--primary-color);
}

.form-group input,
.form-group textarea,
.form-group select {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background-color: #f8fafc;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 2px rgba(214, 158, 46, 0.1);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
}

.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23718096' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10l-5 5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

.error {
    color: #e53e3e;
    margin-bottom: 15px;
}

.success {
    color: #2f855a;
    background: #c6f6d5;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
}

/* Management Buttons */
.management-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

.management-btn {
    display: inline-block;
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: background-color 0.3s ease;
    width: 100%;
    text-align: center;
}

.management-btn:hover {
    background-color: var(--accent-color);
}

.logout-btn {
    background-color: #e53e3e;
}

.logout-btn:hover {
    background-color: #c53030;
}

.logout-form {
    width: 100%;
}

/* Calendar CTA */
.calendar-cta {
    text-align: center;
    margin-top: 30px;
}

.calendar-cta a {
    display: inline-block;
    padding: 1.1rem 3rem;
    background: linear-gradient(135deg, var(--accent-color) 0%, #d17e3d 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-size: 1.05rem;
    box-shadow: 0 4px 15px rgba(199, 98, 43, 0.25);
}

.calendar-cta a:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(199, 98, 43, 0.35);
}

/* Animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes glow {
    0%, 100% {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.8));
    }
    50% {
        filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.8));
    }
}

/* Responsive Design */
/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
}

.hamburger {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    position: relative;
    transition: background 0.2s ease-out;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 24px;
    height: 2px;
    background: var(--primary-color);
    transition: all 0.2s ease-out;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    bottom: -6px;
}

/* Mobile menu active states */
.mobile-menu-active .hamburger {
    background: transparent;
}

.mobile-menu-active .hamburger::before {
    top: 0;
    transform: rotate(45deg);
}

.mobile-menu-active .hamburger::after {
    bottom: 0;
    transform: rotate(-45deg);
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        background: white;
        padding: 80px 20px 20px;
        display: flex;
        flex-direction: column;
        gap: 20px;
        transition: right 0.3s ease-out;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.1);
        z-index: 1001;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links a {
        margin: 0;
        padding: 10px;
        border-bottom: 1px solid #eee;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .book-details {
        flex-direction: column;
        text-align: center;
    }
    
    .social-links {
        flex-direction: column;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .streams-embed {
        margin: 0 -5% 2rem;
        border-radius: 0;
    }

    .calendar-container {
        margin: 80px 5px 20px;
        padding: 8px;
        overflow-x: hidden;
        max-width: 100%;
    }

    .calendar-header {
        flex-direction: column;
        gap: 12px;
        text-align: center;
        padding-bottom: 15px;
    }

    .calendar-header h2 {
        font-size: 1.4rem;
        margin: 0;
    }

    .calendar-nav {
        width: 100%;
        justify-content: space-between;
        gap: 5px;
    }

    .nav-btn {
        font-size: 0.9em;
        padding: 8px 12px;
        flex: 1;
        text-align: center;
        white-space: nowrap;
    }

    .weekdays {
        font-size: 0.75em;
        gap: 2px;
        padding: 4px 0;
    }

    .weekdays div {
        padding: 2px;
        text-align: center;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .calendar-grid {
        margin-top: 5px;
    }

    .days {
        gap: 2px;
        padding-top: 5px;
    }

    .day {
        min-height: 80px;
        font-size: 0.85em;
        padding: 4px;
        position: relative;
    }

    .day-number {
        position: absolute;
        top: 2px;
        right: 4px;
        font-size: 0.9em;
        color: var(--secondary-color);
        background: rgba(255, 255, 255, 0.8);
        padding: 2px 4px;
        border-radius: 3px;
    }

    .day-events {
        margin-top: 20px;
        padding: 0 2px;
    }

    .event {
        padding: 4px 6px;
        margin: 2px 0;
        font-size: 0.8em;
        line-height: 1.3;
    }

    .event-content {
        overflow: hidden;
    }

    .event-content strong {
        display: block;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-bottom: 2px;
    }

    .event-content p {
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
        font-size: 0.9em;
    }

    /* Improve touch targets */
    .nav-btn {
        padding: 10px 20px;
        min-width: 44px;
        min-height: 44px;
    }

    /* Do not hide empty days on mobile */
    .day.empty {
        display: block;
    }
    
    /* Ensure ALL days have identical fixed height regardless of content */
    .day, .day.empty {
        min-height: 40px;
        height: 40px;
        max-height: 40px;
        overflow: hidden;
        padding: 2px;
    }
    
    /* Position day number consistently */
    .day-number {
        position: static;
        text-align: center;
        font-size: 0.9em;
        display: block;
        margin: 0;
        font-weight: bold;
    }
    
    /* Make days with events tappable to view details */
    .day {
        position: relative;
    }
    
    /* Hide event content on mobile grid view */
    .day-events {
        display: none;
    }
    
    /* Add indicator for days with events */
    .day:has(.day-events) .day-number::after {
        content: "•";
        display: block;
        color: var(--accent-color);
        font-size: 14px;
        line-height: 1;
        text-align: center;
    }

    /* Make past events more subtle */
    .day.past .day-event {
        opacity: 0.7;
    }

    /* Modal adjustments for mobile */
    .modal-content {
        margin: 0;
        width: 100%;
        height: 100vh;
        border-radius: 0;
    }

    .modal-content h3 {
        border-radius: 0;
        padding: 15px 20px;
    }

    .form-content {
        padding: 15px 20px;
    }

    .modal-buttons {
        flex-direction: column;
        padding: 15px 20px;
        border-radius: 0;
    }

    .modal-buttons button {
        width: 100%;
    }

    /* Ensure form content doesn't overflow under buttons */
    .form-content {
        max-height: calc(100vh - 60px - 180px); /* Subtract header and buttons height */
    }
}
