/* Smooth scrolling for navigation */
html {
    scroll-behavior: smooth;
}

body {
    padding-top: 60px;
}

/* Hide third calendar on screens smaller than 1400px */
@media (max-width: 1399px) {
    .calendar-third {
        display: none;
    }
}

/* Sticky Navigation Bar */
.navbar-sticky {
    background: linear-gradient(135deg, rgba(255,137,74,0.95) 0%, rgba(38,166,154,0.95) 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    backdrop-filter: blur(10px);
}

.navbar-sticky .nav-link {
    color: white !important;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.navbar-sticky .nav-link:hover {
    color: #fff !important;
    transform: translateY(-2px);
}

.navbar-sticky .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: white;
    transition: width 0.3s ease;
}

.navbar-sticky .nav-link:hover::after {
    width: 100%;
}

/* Original card styles */
.card > a {
    text-decoration: none;
    color: #212529;
}

a.muted {
    text-decoration: none;
    color: #212529;
}

.card .place {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.card .time {
    white-space: nowrap;
}

/* Community Card Styles */
.community-card {
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    background-size: cover;
    background-position: center;
    min-height: 250px;
    position: relative;
}

.community-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0,0,0,0.3) 0%, rgba(0,0,0,0.6) 100%);
    z-index: 1;
    transition: opacity 0.3s ease;
}

.community-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.2);
}

.community-card:hover::before {
    opacity: 0.5;
}

.community-card-body {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    flex-grow: 1;
    padding: 20px;
    color: white;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.community-card-title {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 8px;
    transition: all 0.3s ease;
    color: white !important;
}

.community-card-desc {
    font-size: 0.9rem;
    opacity: 0.95;
    margin-bottom: 12px;
    line-height: 1.4;
    color: white !important;
}

.community-card-links {
    display: flex;
    gap: 12px;
}

.community-card-links a {
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
}

.community-card-links a:hover {
    background: rgba(255,255,255,0.4);
    transform: scale(1.15);
    color: white !important;
}

/* Gradient backgrounds for specific communities */
.community-gdg {
    background: linear-gradient(135deg, #EA4435 0%, #FBBC04 100%);
}

.community-mtg {
    background: linear-gradient(135deg, #0078D4 0%, #50E6FF 100%);
}

.community-agile {
    background: linear-gradient(135deg, #FF6B6B 0%, #C92A2A 100%);
}

.community-tgd {
    background: linear-gradient(135deg, #76FF03 0%, #00E676 100%);
}

.community-ruby {
    background: linear-gradient(135deg, #CC342D 0%, #FF6B6B 100%);
}

.community-jug {
    background: linear-gradient(135deg, #FF6B35 0%, #004E89 100%);
}

.community-python {
    background: linear-gradient(135deg, #3776AB 0%, #FFD43B 100%);
}

.community-js {
    background: linear-gradient(135deg, #F7DF1E 0%, #000000 100%);
}

.community-default {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Calendar Styles */
.calendar-month {
    background: white;
    border-radius: 12px;
    padding: 14px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.calendar-month:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
}

.calendar-month-title {
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    margin-bottom: 12px;
    color: #212529;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    text-align: center;
    font-weight: 600;
    font-size: 0.7rem;
    color: #555;
    padding: 4px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.calendar-day {
    aspect-ratio: 1;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    padding: 3px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 50px;
    position: relative;
}

.calendar-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.calendar-day.calendar-empty {
    background: #fafafa;
    border-color: #ececec;
    cursor: default;
}

.calendar-day.calendar-empty:hover {
    transform: none;
    box-shadow: none;
}

.calendar-day.calendar-weekend {
    background: #f9f9f9;
    border-color: #ddd;
}

.calendar-day.calendar-weekend:hover {
    background: #f5f5f5;
}

.calendar-day.calendar-today {
    border: 2px solid #7c3aed;
    background: #f3e8ff;
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.2), 0 0 0 3px rgba(124, 58, 237, 0.1);
    font-weight: 600 !important;
}

.calendar-day.calendar-today .calendar-day-number {
    color: #6d28d9 !important;
    font-weight: 700 !important;
}

.calendar-day.calendar-today:hover {
    box-shadow: inset 0 0 0 1px rgba(124, 58, 237, 0.3), 0 4px 12px rgba(124, 58, 237, 0.2);
}

/* Today takes precedence over event colors and weekend */
.calendar-day.calendar-today.calendar-weekend,
.calendar-day.calendar-today.calendar-events-1,
.calendar-day.calendar-today.calendar-events-2,
.calendar-day.calendar-today.calendar-events-4,
.calendar-day.calendar-today.calendar-events-7 {
    border: 2px solid #7c3aed;
    background: #f3e8ff;
}

/* Event level coloring */
.calendar-day.calendar-events-1 {
    background: #e8f5e9;
    border-color: #90ee90;
}

.calendar-day.calendar-events-1:hover {
    background: #c8e6c9;
    border-color: #66bb6a;
}

.calendar-day.calendar-events-2 {
    background: #fff3e0;
    border-color: #ffb84d;
}

.calendar-day.calendar-events-2:hover {
    background: #ffe0b2;
    border-color: #ffa726;
}

.calendar-day.calendar-events-4 {
    background: #ffebee;
    border-color: #ff6b6b;
}

.calendar-day.calendar-events-4:hover {
    background: #ffcdd2;
    border-color: #ef5350;
}

.calendar-day.calendar-events-7 {
    background: #fce4ec;
    border-color: #c92a2a;
}

.calendar-day.calendar-events-7:hover {
    background: #f8bbd0;
    border-color: #ad1457;
}

.calendar-day-number {
    font-weight: 600;
    font-size: 0.9rem;
    color: #212529;
    order: 1;
}

.calendar-badge {
    font-size: 0.7rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 10px;
    min-width: 20px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    order: 2;
    margin-top: 2px;
}

.calendar-badge-empty {
    display: none;
}

.calendar-badge-1 {
    background: #66bb6a;
}

.calendar-badge-2,
.calendar-badge-3 {
    background: #ffa726;
}

.calendar-badge-4,
.calendar-badge-5,
.calendar-badge-6 {
    background: #ef5350;
}

.calendar-badge-7,
.calendar-badge-8,
.calendar-badge-9,
.calendar-badge-10 {
    background: #ad1457;
}
