/* Town of Dixmont Custom Styles */

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f8f9fa;
    --accent-color: #28a745;
    --text-color: #333;
    --light-gray: #f8f9fa;
    --border-color: #dee2e6;
}

/* Global Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    padding-top: 70px;
}

/* Header Styles */
.site-header {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1050;
    background-color: #2c5aa0;
}

.navbar-brand {
    font-weight: bold;
    font-size: 1.5rem;
}

.navbar-nav .nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: rgba(255,255,255,0.8) !important;
}

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 70px;
    left: 0;
    z-index: 1000;
    width: 200px;
    height: calc(100vh - 70px);
    max-height: calc(100vh - 70px);
    padding-top: 20px;
    padding-bottom: 20px;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    background-color: #f8f9fa !important;
    overflow-y: auto;
    transition: all 0.3s ease;
}


.sidebar .nav-link {
    color: var(--text-color);
    padding: 0.6rem 0.8rem;
    border-radius: 0.25rem;
    margin: 0.1rem 0;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    white-space: nowrap;
    font-size: 0.9rem;
}

.sidebar .nav-link:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateX(5px);
}

.sidebar .nav-link.active {
    background-color: var(--primary-color);
    color: white;
}

.sidebar .nav-link i {
    width: 18px;
    text-align: center;
    margin-right: 0.4rem;
    flex-shrink: 0;
}

.sidebar-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

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

.sidebar-section .nav-link {
    padding: 0.4rem 0.6rem;
    font-size: 0.75rem;
}

.sidebar-section .nav-link:hover {
    background-color: #e9ecef;
    color: var(--primary-color);
}

/* Main content adjustment for sidebar */
.main-content {
    margin-left: 0;
    padding-top: 1rem;
    min-height: calc(100vh - 70px);
    padding-bottom: 2rem;
}

@media (min-width: 768px) {
    .main-content {
        margin-left: 200px;
    }
}

@media (min-width: 992px) {
    .main-content {
        margin-left: 200px;
    }
}

/* Hero Banner Styles */
.hero-banner {
    min-height: 400px;
    display: flex;
    align-items: center;
    position: relative;
}

.hero-content {
    position: relative;
    z-index: 2;
}

.hero-banner::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(44,90,160,0.8), rgba(40,167,69,0.6));
    z-index: 1;
}

.hero-actions .btn {
    margin: 0.25rem;
    padding: 0.75rem 2rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 50px;
    transition: all 0.3s ease;
}

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

/* Quick Info Bar */
.quick-info {
    border-top: 3px solid var(--primary-color);
}

.quick-info i {
    color: var(--primary-color);
}

.quick-info h6 {
    color: var(--primary-color);
    font-weight: 600;
    margin-top: 0.5rem;
}

/* Content Block Styles */
.customizable-text-block {
    border-radius: 0.375rem;
    transition: all 0.3s ease;
}

.customizable-text-block:hover {
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.customizable-image-block {
    transition: all 0.3s ease;
}

.customizable-image-block:hover {
    transform: translateY(-2px);
}

/* Calendar Styles */
.calendar-section {
    border-top: 1px solid var(--border-color);
}

.full-calendar {
    background: white;
    border-radius: 0.375rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    padding: 1rem;
}

.fc-toolbar {
    margin-bottom: 1rem !important;
}

.fc-toolbar-chunk {
    display: flex;
    align-items: center;
}

.fc-button {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.fc-button:hover {
    background-color: #1e3d73 !important;
    border-color: #1e3d73 !important;
}

.fc-button-active {
    background-color: #1e3d73 !important;
    border-color: #1e3d73 !important;
}

.fc-event {
    border-radius: 0.25rem !important;
    border: none !important;
    font-weight: 500 !important;
}

.fc-daygrid-event {
    margin-bottom: 2px !important;
}

/* Event List Styles */
.event-list {
    max-height: 500px;
    overflow-y: auto;
}

.event-item {
    transition: all 0.3s ease;
    border-radius: 0.375rem;
    padding: 1rem !important;
}

.event-item:hover {
    background-color: var(--light-gray);
    transform: translateX(5px);
}

.event-date-badge {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-title {
    font-weight: 600;
    color: var(--primary-color);
}

.event-time, .event-location, .event-description {
    font-size: 0.875rem;
}

/* Mini Calendar Styles */
.mini-calendar {
    background: rgba(255,255,255,0.1);
    border-radius: 0.375rem;
    padding: 1rem;
}

.calendar-grid {
    font-size: 0.875rem;
}

.calendar-day {
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

.calendar-day:hover {
    background-color: rgba(255,255,255,0.2) !important;
}

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

.event-indicator {
    position: absolute;
    bottom: 2px;
    right: 2px;
}

/* News Section */
.news-section .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.news-section .card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.news-section .card-title {
    color: var(--primary-color);
    font-weight: 600;
}

/* Footer Styles */
.site-footer {
    background: linear-gradient(135deg, #1a1a2e, var(--primary-color)) !important;
    color: white;
    width: 100%;
    clear: both;
    position: relative;
    z-index: 1050;
    margin-left: 0 !important;
}

.site-footer h5 {
    color: white;
    border-bottom: 2px solid rgba(255,255,255,0.2);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}

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

.site-footer a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-footer a:hover {
    color: white;
}

/* Search Results */
.search-result {
    transition: all 0.3s ease;
}

.search-result:hover {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.search-result h4 a {
    color: var(--primary-color);
    text-decoration: none;
}

.search-result h4 a:hover {
    text-decoration: underline;
}

/* Town Staff Page Styles */
.town-staff-page .banner-section {
    min-height: 300px;
    display: flex;
    align-items: center;
    position: relative;
}

.town-staff-page .staff-card {
    transition: all 0.3s ease;
    height: 100%;
}

.town-staff-page .staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

.town-staff-page .staff-photo img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.town-staff-page .staff-avatar {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.town-staff-page .contact-item a {
    color: #6c757d;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.town-staff-page .contact-item a:hover {
    color: var(--primary-color);
}

.town-staff-page .card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.town-staff-page .intro-section {
    font-size: 1.1rem;
    color: #6c757d;
    line-height: 1.7;
}

.town-staff-page .term-badge .badge {
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #dee2e6;
}

.town-staff-page .staff-info h5 {
    color: var(--text-color);
    font-size: 1.2rem;
}

.town-staff-page .staff-info h6 {
    color: var(--primary-color);
    font-size: 1rem;
}

/* Officer Block Enhancements */
.officer-card .officer-avatar img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border: 3px solid #f8f9fa;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.officer-card {
    transition: all 0.3s ease;
}

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

.officer-card .card {
    border: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
    border-radius: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-banner {
        min-height: 300px;
        text-align: center;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .hero-actions .btn {
        display: block;
        margin: 0.5rem auto;
        width: 200px;
    }
    
    .quick-info .row > div {
        margin-bottom: 1rem;
    }
    
    .event-item .d-flex {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .event-date-badge {
        margin-bottom: 1rem;
        margin-right: 0 !important;
    }
    
    .mini-calendar {
        margin-top: 2rem;
    }
    
    /* Town Staff Mobile Styles */
    .town-staff-page .staff-photo {
        margin-right: 1rem !important;
    }
    
    .town-staff-page .staff-photo img,
    .town-staff-page .staff-avatar {
        width: 60px;
        height: 60px;
    }
    
    .town-staff-page .staff-avatar i {
        font-size: 3rem !important;
    }
    
    .town-staff-page .card-body {
        padding: 1.5rem !important;
    }
    
    .town-staff-page .banner-section {
        min-height: 250px;
    }
    
    .town-staff-page .banner-section h1 {
        font-size: 2rem;
    }
}

/* Accessibility */
.btn:focus,
.form-control:focus {
    box-shadow: 0 0 0 0.2rem rgba(44,90,160,0.25);
    border-color: var(--primary-color);
}

/* Print Styles */
@media print {
    .site-header,
    .site-footer,
    .hero-actions,
    .btn {
        display: none !important;
    }
    
    .hero-banner {
        background: white !important;
        color: black !important;
        min-height: auto;
        padding: 1rem 0;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}