/* Google Fonts for minimalist typography */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@100;200;300;400;500;600;700;800;900&display=swap');

/* CSS Variables */
:root {
    --primary-blue: #1e4a72;
    --secondary-blue: #2d5aa0;
    --accent-blue: #4472c4;
    --light-blue: #e8f2ff;
    --dark-blue: #0f2543;
    --gray-light: #f8f9fa;
    --gray-medium: #6c757d;
    --green-success: #28a745;
    --orange-warning: #fd7e14;
    --white: #ffffff;
    --border-color: #dee2e6;
}

/* Base Styles */
body {
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #333;
    line-height: 1.6;
    background-color: #f8f9fa;
}

/* Header Styles */
.header-top {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    color: white;
    padding: 10px 0;
    font-size: 14px;
}

.header-top a {
    color: white;
    text-decoration: none;
}

.header-top a:hover {
    color: #ccc;
    text-decoration: underline;
}

.header-main {
    position: relative;
    border-bottom: 4px solid var(--primary-blue);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    overflow: hidden;
}

/* Full-width logo header styles with improvements */
.hero-logo-section {
    position: relative;
    min-height: 300px; /* Increased by 50% from 200px */
    display: flex;
    align-items: center;
    overflow: hidden;
}

.logo-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.full-width-logo {
    width: 100%;
    height: 300px; /* Increased by 50% from 200px */
    object-fit: cover;
    object-position: center;
    filter: brightness(0.4) contrast(1.1); /* Less filtered to show more of the image */
}

.logo-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        rgba(30, 74, 114, 0.45) 0%, /* More transparent - reduced from 0.85 to 0.45 */
        rgba(45, 90, 160, 0.35) 50%, /* More transparent - reduced from 0.75 to 0.35 */
        rgba(68, 114, 196, 0.25) 100%); /* More transparent - reduced from 0.65 to 0.25 */
    z-index: 2;
}

.logo-content {
    position: relative;
    z-index: 3;
    width: 100%;
    padding: 60px 0; /* Increased padding to match taller section */
}

.logo-text-overlay {
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.logo-text-overlay .main-title {
    font-family: 'Inter', sans-serif; /* Minimalist font */
    font-size: 4.5rem; /* Increased from 3.5rem */
    font-weight: 200; /* Much lighter weight for minimalist style */
    letter-spacing: 4px; /* Increased letter spacing */
    margin: 0;
    line-height: 1.1;
    text-transform: uppercase;
    background: linear-gradient(45deg, #ffffff, #e8f2ff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(2px 2px 4px rgba(0,0,0,0.3));
}

.logo-text-overlay .sub-title {
    font-family: 'Inter', sans-serif; /* Minimalist font */
    font-size: 2.2rem; /* Slightly increased */
    font-weight: 300; /* Lighter weight */
    letter-spacing: 2px; /* Increased letter spacing */
    margin: 10px 0 20px 0; /* Increased margins */
    color: #e8f2ff;
    text-transform: uppercase;
}

.title-divider {
    width: 150px; /* Increased width */
    height: 4px;
    background: linear-gradient(90deg, #ffffff, #4472c4, #ffffff);
    margin: 20px 0; /* Increased margin */
    border-radius: 2px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.logo-text-overlay .tagline {
    font-family: 'Inter', sans-serif; /* Minimalist font */
    font-size: 1.3rem; /* Slightly increased */
    font-weight: 300; /* Lighter weight */
    color: #ffffff;
    margin: 0;
    opacity: 0.95;
    font-style: normal; /* Removed italic for cleaner look */
    letter-spacing: 1px; /* Added letter spacing */
}

.header-actions {
    margin-top: 30px; /* Increased margin */
}

.header-actions .btn {
    font-weight: 500; /* Lighter weight */
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 14px 28px; /* Slightly larger */
    border-radius: 25px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.header-actions .btn-outline-light {
    border: 2px solid rgba(255,255,255,0.8);
    color: white;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
}

.header-actions .btn-outline-light:hover {
    background: rgba(255,255,255,0.2);
    border-color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

.header-actions .btn-light {
    background: rgba(255,255,255,0.95);
    color: var(--primary-blue);
    border: none;
    font-weight: 600;
}

.header-actions .btn-light:hover {
    background: white;
    color: var(--dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Navigation Styles */
.main-nav {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.main-nav .navbar-nav .nav-link {
    color: white !important;
    font-weight: 600;
    padding: 18px 25px;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    border-right: 1px solid rgba(255,255,255,0.2);
    transition: all 0.3s ease;
}

.main-nav .navbar-nav .nav-link:hover,
.main-nav .navbar-nav .nav-link.active {
    background-color: rgba(255,255,255,0.15);
    color: white !important;
    transform: translateY(-2px);
}

.main-nav .navbar-nav .nav-item:last-child .nav-link {
    border-right: none;
}

.navbar-toggler {
    border-color: rgba(255,255,255,0.3);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255, 255, 255, 0.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Content Area */
.content-wrapper {
    min-height: calc(100vh - 450px); /* Adjusted for taller header */
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--light-blue), white);
    border-bottom: 1px solid var(--border-color);
    padding: 40px 0;
}

.hero-section h1 {
    color: var(--primary-blue);
    font-size: 3rem;
    font-weight: bold;
    margin-bottom: 20px;
}

.hero-section .lead {
    font-size: 1.3rem;
    color: var(--gray-medium);
    margin-bottom: 30px;
}

/* Cards and Service Sections */
.service-card {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    background: white;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.service-card .card-header {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: white;
    font-weight: bold;
    border-bottom: none;
    padding: 20px 25px;
}

.service-card .card-body {
    padding: 30px;
}

/* Buttons */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    border: none;
    color: white;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 15px 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
}

.btn-outline-primary-custom {
    border: 3px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 12px 27px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-outline-primary-custom:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
}

/* Alert/Notice Styles */
.vab-alert {
    background: linear-gradient(135deg, var(--orange-warning), #ff8c42);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 20px;
    margin: 20px 0;
}

.vab-alert h5 {
    color: white;
    font-weight: bold;
}

/* Footer */
.footer {
    background: linear-gradient(135deg, var(--dark-blue), var(--primary-blue));
    color: white;
    padding: 50px 0 25px;
    margin-top: 60px;
}

.footer h5 {
    color: white;
    font-weight: bold;
    margin-bottom: 25px;
    border-bottom: 3px solid var(--secondary-blue);
    padding-bottom: 10px;
    display: inline-block;
}

.footer a {
    color: #ccc;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.2);
    padding-top: 25px;
    margin-top: 40px;
}

/* Utility Classes */
.text-primary-custom {
    color: var(--primary-blue) !important;
}

.bg-light-custom {
    background-color: var(--light-blue) !important;
}

.border-primary-custom {
    border-color: var(--primary-blue) !important;
}

/* VAB Specific Styles */
.petition-deadline {
    background: linear-gradient(135deg, #dc3545, #c82333);
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin: 20px 0;
}

.important-date {
    background: var(--green-success);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    margin: 10px 0;
}

/* Animation Classes */
.fade-in {
    animation: fadeInAnimation 0.8s ease-in;
}

.slide-in-left {
    animation: slideInLeftAnimation 0.8s ease-out;
}

/* Additional utility classes */
.timeline-item {
    position: relative;
    padding-left: 20px;
    margin-bottom: 15px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    background: var(--primary-blue);
    border-radius: 50%;
}

.timeline-date {
    font-weight: bold;
    font-size: 14px;
}

.timeline-content {
    font-size: 14px;
    color: var(--gray-medium);
}

.process-steps .step-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 25px;
}

.step-number {
    min-width: 40px;
    width: 40px;
    height: 40px;
    font-weight: bold;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
    margin-left: 15px;
}

.resource-icon {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-item {
    text-align: center;
    padding: 20px;
}

.stat-icon {
    margin-bottom: 15px;
}

.stat-item h3 {
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.icon-circle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.news-item,
.info-item {
    padding-bottom: 15px;
}

.news-item:last-child,
.info-item:last-child {
    border-bottom: none !important;
    padding-bottom: 0;
}

.board-member {
    padding: 15px 0;
}

.board-member:not(:last-child) {
    border-bottom: 1px solid var(--border-color);
}

.contact-info p {
    margin-bottom: 15px;
}

.contact-info p:last-child {
    margin-bottom: 0;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    background: rgba(255,255,255,0.2);
    transform: translateY(-2px);
}

/* Calendar Specific Styles */
.calendar-table td {
    height: 120px;
    vertical-align: top;
    position: relative;
    padding: 8px;
}

.calendar-date {
    font-weight: bold;
    margin-bottom: 5px;
}

.hearing-item {
    font-size: 11px;
    padding: 2px 4px;
    margin: 1px 0;
    border-radius: 3px;
    cursor: pointer;
    transition: opacity 0.3s ease;
}

.hearing-item:hover {
    opacity: 0.8;
}

.hearing-real { background-color: #007bff; color: white; }
.hearing-exemption { background-color: #28a745; color: white; }
.hearing-personal { background-color: #17a2b8; color: white; }
.hearing-agricultural { background-color: #ffc107; color: black; }

.legend-box {
    width: 20px;
    height: 15px;
    border-radius: 3px;
}

.today {
    background-color: #e8f2ff !important;
}

.other-month {
    color: #ccc;
}

/* Table Sorting Styles - Fixed for proper visibility and rigid layout */
.table-responsive {
    overflow-x: auto;
}

/* Rigid table layout - prevents resizing based on content */
#resultsTable {
    table-layout: fixed !important;
    width: 100% !important;
    font-size: 0.9rem; /* Slightly smaller base font */
}

#resultsTable th,
#resultsTable td {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 12px 8px !important;
    vertical-align: middle !important;
}

/* Fixed column widths for consistent layout - optimized for header content */
#resultsTable th:nth-child(1),
#resultsTable td:nth-child(1) { 
    width: 15% !important; /* Petition # */
}

#resultsTable th:nth-child(2),
#resultsTable td:nth-child(2) { 
    width: 9% !important; /* Tax Year */
}

#resultsTable th:nth-child(3),
#resultsTable td:nth-child(3) { 
    width: 24% !important; /* Petitioner Name - wider for names */
}

#resultsTable th:nth-child(4),
#resultsTable td:nth-child(4) { 
    width: 18% !important; /* Type */
}

#resultsTable th:nth-child(5),
#resultsTable td:nth-child(5) { 
    width: 12% !important; /* Status */
}

#resultsTable th:nth-child(6),
#resultsTable td:nth-child(6) { 
    width: 12% !important; /* Filed Date */
}

#resultsTable th:nth-child(7),
#resultsTable td:nth-child(7) { 
    width: 10% !important; /* Actions */
}

/* Sortable column styles - Fixed hover colors and layout */
.sortable {
    cursor: pointer;
    user-select: none;
    transition: background-color 0.2s ease, color 0.2s ease;
    position: relative;
    white-space: nowrap !important;
    font-size: 0.85rem !important; /* Smaller font for headers */
    line-height: 1.2 !important;
    padding: 8px 4px !important; /* Tighter padding */
}

/* Fixed hover effect - use darker background with white text for visibility */
.sortable:hover {
    background-color: rgba(0, 0, 0, 0.2) !important;
    color: #ffffff !important;
}

.sortable:hover * {
    color: #ffffff !important;
}

/* Header text and icon layout - keep on same line */
.sortable i.fas:not(.sort-icon) {
    margin-right: 2px !important; /* Smaller margin for icons */
    font-size: 0.8em !important; /* Smaller icons */
}

/* Sort icon styles - positioned to avoid wrapping */
.sort-icon {
    opacity: 0.6;
    transition: opacity 0.2s ease, color 0.2s ease;
    margin-left: 2px !important;
    font-size: 0.75em !important; /* Smaller sort icons */
    display: inline-block;
    width: 10px; /* Fixed width to prevent wrapping */
}

.sortable:hover .sort-icon {
    opacity: 1;
    color: #ffffff !important;
}

/* Active sort indicators */
.sortable .fa-sort-up,
.sortable .fa-sort-down {
    opacity: 1;
    color: #ffc107 !important;
}

.sortable:hover .fa-sort-up,
.sortable:hover .fa-sort-down {
    color: #ffc107 !important;
}

/* Compact header content layout */
.sortable .header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.sortable .header-text {
    flex: 1;
    min-width: 0; /* Allow text to shrink */
    margin-right: 4px;
}

.sortable .header-icon {
    flex-shrink: 0;
    width: 12px;
}

/* Ensure text in table cells is properly visible */
#resultsTable tbody td {
    vertical-align: middle;
    padding: 10px 6px;
    font-size: 0.85rem;
}

/* Badge styling in table */
#resultsTable .badge {
    font-size: 0.7em;
    white-space: nowrap;
    padding: 0.25em 0.5em;
}

/* Button styling in table */
#resultsTable .btn-sm {
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    white-space: nowrap;
}

/* Responsive Design */
@media screen and (max-width: 992px) {
    .hero-logo-section {
        min-height: 270px; /* Proportionally increased */
    }
    
    .full-width-logo {
        height: 270px; /* Proportionally increased */
    }
    
    .logo-text-overlay .main-title {
        font-size: 3.5rem;
    }
    
    .logo-text-overlay .sub-title {
        font-size: 1.8rem;
    }
    
    .header-actions {
        text-align: center;
        margin-top: 25px;
    }
}

@media screen and (max-width: 768px) {
    .hero-logo-section {
        min-height: 240px; /* Proportionally increased */
    }
    
    .full-width-logo {
        height: 240px; /* Proportionally increased */
    }
    
    .logo-content {
        padding: 45px 0; /* Proportionally increased */
    }
    
    .logo-text-overlay .main-title {
        font-size: 2.8rem;
        letter-spacing: 2px;
    }
    
    .logo-text-overlay .sub-title {
        font-size: 1.5rem;
    }
    
    .logo-text-overlay .tagline {
        font-size: 1.1rem;
    }
    
    .title-divider {
        width: 100px;
        height: 3px;
    }
    
    .header-actions .btn {
        display: block;
        width: 100%;
        margin: 5px 0;
    }
    
    .main-nav .navbar-nav .nav-link {
        border-right: none;
        border-bottom: 1px solid rgba(255,255,255,0.2);
        padding: 15px 20px;
        transform: none !important;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .header-actions {
        text-align: center;
        margin-top: 15px;
    }

    .header-actions .btn {
        display: block;
        width: 100%;
        margin: 5px 0;
    }

    /* Responsive table adjustments */
    #resultsTable {
        font-size: 0.8rem;
    }
    
    #resultsTable th,
    #resultsTable td {
        font-size: 0.75rem;
        padding: 8px 4px;
    }
    
    .sortable {
        font-size: 0.75rem !important;
        padding: 6px 2px !important;
    }
    
    .sortable i.fas:not(.sort-icon) {
        font-size: 0.7em !important;
    }
    
    .sort-icon {
        font-size: 0.65em !important;
    }
}

@media screen and (max-width: 576px) {
    .hero-logo-section {
        min-height: 210px; /* Proportionally increased */
    }
    
    .full-width-logo {
        height: 210px; /* Proportionally increased */
    }
    
    .logo-content {
        padding: 30px 0; /* Proportionally increased */
    }
    
    .logo-text-overlay .main-title {
        font-size: 2.2rem;
    }
    
    .logo-text-overlay .sub-title {
        font-size: 1.3rem;
    }
    
    .logo-text-overlay .tagline {
        font-size: 1rem;
    }
    
    .hero-section {
        padding: 30px 0;
    }

    .hero-section h1 {
        font-size: 1.8rem;
    }

    .hero-section .lead {
        font-size: 1.1rem;
    }

    .service-card .card-body {
        padding: 20px;
    }

    .footer {
        padding: 40px 0 20px;
    }

    .header-top {
        font-size: 12px;
        text-align: center;
    }

    .header-top .col-md-6 {
        margin-bottom: 5px;
    }

    /* Mobile table adjustments - even more compact */
    #resultsTable {
        font-size: 0.7rem;
    }
    
    #resultsTable th,
    #resultsTable td {
        padding: 6px 2px;
        font-size: 0.7rem;
    }
    
    .sortable {
        font-size: 0.7rem !important;
        padding: 4px 1px !important;
        line-height: 1.1 !important;
    }
    
    .sortable i.fas:not(.sort-icon) {
        display: none; /* Hide icons on very small screens */
    }
    
    .sort-icon {
        font-size: 0.6em !important;
        margin-left: 1px !important;
    }
    
    #resultsTable .btn-sm {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
    
    #resultsTable .badge {
        font-size: 0.6em;
        padding: 0.2em 0.4em;
    }
}

/* Keyframe Animations */
@keyframes fadeInAnimation {
    from { 
        opacity: 0; 
        transform: translateY(30px); 
    }
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

@keyframes slideInLeftAnimation {
    from { 
        opacity: 0; 
        transform: translateX(-40px); 
    }
    to { 
        opacity: 1; 
        transform: translateX(0); 
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animation effects for logo */
.logo-text-overlay {
    animation: fadeInUp 1s ease-out;
}

.logo-text-overlay .main-title {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.logo-text-overlay .sub-title {
    animation: fadeInUp 1s ease-out 0.4s both;
}

.title-divider {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.logo-text-overlay .tagline {
    animation: fadeInUp 1s ease-out 0.8s both;
}

.header-actions {
    animation: fadeInUp 1s ease-out 1s both;
}