/* Coverage Details Page Styles */

/* Additional coverage section */
.additional-coverage {
    margin-top: 20px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3a5a8c;
}

.additional-coverage h3 {
    margin-top: 0;
    margin-bottom: 12px;
    color: #2c3e50;
    font-size: 18px;
}

.additional-coverage p {
    margin-bottom: 12px;
    color: #555;
    line-height: 1.5;
}

.additional-coverage ul {
    margin: 0;
    padding-left: 20px;
}

.additional-coverage li {
    margin-bottom: 8px;
    color: #555;
    line-height: 1.4;
}

.additional-coverage strong {
    color: #2c3e50;
}

/* Modal Styles */
.state-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    position: relative;
    background: white;
    margin: 2rem auto;
    max-width: 800px;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: linear-gradient(135deg, #4a6fa5 0%, #2d4870 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 2rem;
    max-height: 70vh;
    overflow-y: auto;
}

.state-info-summary {
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 8px;
    margin-bottom: 2rem;
    border-left: 4px solid #4a6fa5;
}

.state-info-summary p {
    margin: 0.5rem 0;
    font-size: 1rem;
}

.court-list-section h3 {
    color: #2c3e50;
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 600;
}

/* Court List Styles */
.court-list {
    margin-top: 1rem;
}

.court-category {
    margin-bottom: 2rem;
}

.court-category h5 {
    color: #4a6fa5;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #e8f0fe;
}

.court-category ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.court-item {
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 3px solid #4a6fa5;
    transition: all 0.2s ease;
}

.court-item:hover {
    background: #e8f0fe;
    transform: translateX(4px);
}

.court-name {
    display: block;
    font-weight: 500;
    color: #2c3e50;
    margin-bottom: 0.25rem;
}

.court-subcategory {
    display: block;
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
}

/* Hero Section */
.coverage-details-hero {
    background-color: #4a6fa5;
    background-image: linear-gradient(135deg, #4a6fa5 0%, #2d4870 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-height: 260px;
    display: flex;
    align-items: center;
    margin-bottom: 2.5rem;
}

.coverage-details-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('../images/hero-pattern.svg');
    background-size: cover;
    opacity: 0.1;
    z-index: 1;
}

.coverage-details-hero .container {
    position: relative;
    z-index: 2;
}

.coverage-details-hero h1 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.coverage-details-hero p {
    font-size: 1.15rem;
    max-width: 640px;
    margin: 0 auto 1.25rem;
    opacity: 0.9;
    line-height: 1.6;
}

.coverage-list {
    list-style: none;
    padding-left: 0;
    margin: 0 auto 1.25rem;
    max-width: 420px;
    text-align: left;
}

.coverage-list li {
    position: relative;
    padding-left: 16px;
    margin: 6px 0;
}

.coverage-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.7em;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    transform: translateY(-50%);
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-top: 2.5rem;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hero-stat .stat-number {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.hero-stat .stat-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
    justify-content: center;
}

.hero-cta .btn {
    padding: 16px 32px;
    font-weight: 600;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-shadow: none;
}

.hero-cta .btn-primary {
    background-color: #0a2540;
    color: white;
    border: none;
}

.hero-cta .btn-secondary {
    background-color: transparent;
    color: white;
    border: 2px solid white;
}

.hero-cta .btn-primary:hover {
    background-color: #0f3a5f;
}

.hero-cta .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Coverage Navigation */
.coverage-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2rem 0;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-container {
    flex: 1;
    min-width: 250px;
}

.search-container input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}

.filter-container {
    display: flex;
    gap: 1rem;
}

.filter-container select {
    padding: 0.75rem 1rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 1rem;
    min-width: 180px;
}

/* State Cards */
.state-cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.state-card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    background-color: white;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.state-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.15);
}

.state-card-header {
    padding: 1.25rem;
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #4a6fa5 0%, #2d4870 100%);
}

.state-card-header .state-symbol {
    font-size: 1.8rem;
    font-weight: 700;
}

.state-card-header .state-name {
    font-size: 1.2rem;
    font-weight: 500;
}

.state-card-body {
    padding: 1.25rem;
    border-bottom: 1px solid #eee;
}

.circuit-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.circuit-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.circuit-name {
    font-size: 1rem;
    font-weight: 600;
    color: #4a6fa5;
}

.state-stat {
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.state-stat:last-child {
    margin-bottom: 0;
}

.state-stat .stat-label {
    color: #666;
    font-size: 0.9rem;
}

.state-stat .stat-value {
    font-weight: 600;
    color: #333;
}

.state-card-footer {
    padding: 1rem;
    text-align: center;
}

.view-details-btn {
    background-color: #4a6fa5;
    color: white;
    border: none;
    padding: 0.75rem 1.25rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.view-details-btn:hover {
    background-color: #3a5a8c;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Summary Stats */
.coverage-summary {
    background-color: #f8f9fa;
    padding: 2rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.coverage-summary h2 {
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
}

.summary-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}

.summary-stat {
    text-align: center;
    padding: 1.5rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.summary-stat .stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: #4a6fa5;
    margin-bottom: 0.5rem;
}

.summary-stat .stat-label {
    font-size: 1rem;
    color: #666;
}

/* State Detail Section */
.state-detail-section {
    display: none;
    padding: 2rem 0;
}

.state-detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 2rem;
}

.back-button {
    background-color: transparent;
    border: 1px solid #ddd;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    margin-right: 1rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.back-button:hover {
    background-color: #f5f5f5;
}

.state-detail-card {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.state-detail-header {
    padding: 2rem;
    color: white;
    display: flex;
    align-items: center;
}

.state-symbol-large {
    font-size: 3rem;
    font-weight: 700;
    margin-right: 1.5rem;
}

.state-info h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.8rem;
}

.state-info p {
    margin: 0;
    opacity: 0.9;
}

.state-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    padding: 2rem;
    background-color: #f8f9fa;
}

.state-stat-item {
    display: flex;
    align-items: center;
    background-color: white;
    padding: 1.25rem;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.stat-icon {
    font-size: 1.8rem;
    margin-right: 1rem;
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-info .stat-label {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.25rem;
}

.stat-info .stat-value {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
}

.state-detail-section {
    padding: 2rem;
    border-bottom: 1px solid #eee;
}

.state-detail-section h4 {
    margin-top: 0;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.coverage-progress {
    margin-top: 1.5rem;
}

.progress-label {
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.progress-bar {
    height: 12px;
    background-color: #e9ecef;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.progress-fill {
    height: 100%;
    background-color: #4a6fa5;
    border-radius: 6px;
}

.progress-value {
    text-align: right;
    font-weight: 600;
    font-size: 0.9rem;
}

.court-types {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.court-type {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 6px;
    text-align: center;
}

.court-type-name {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 0.5rem;
}

.court-type-count {
    font-size: 1.5rem;
    font-weight: 600;
    color: #4a6fa5;
}

.state-detail-actions {
    padding: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: #4a6fa5;
    color: white;
}

.btn-secondary {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #ddd;
}

/* Circuit Colors */
.circuit-1 { background-color: #4a6fa5; }
.circuit-2 { background-color: #5d8fc9; }
.circuit-3 { background-color: #6a99d0; }
.circuit-4 { background-color: #77a3d7; }
.circuit-5 { background-color: #84adde; }
.circuit-6 { background-color: #91b7e5; }
.circuit-7 { background-color: #9ec1ec; }
.circuit-8 { background-color: #abcbf3; }
.circuit-9 { background-color: #b8d5fa; }
.circuit-10 { background-color: #c5dfff; }
.circuit-11 { background-color: #d2e9ff; }
.circuit-dc { background-color: #3a5a8c; }
.circuit-fc { background-color: #2d4870; }

/* Responsive Adjustments */
@media (max-width: 768px) {
    .coverage-nav {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-container {
        flex-direction: column;
    }
    
    .state-cards-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .state-card {
        max-width: 100%;
        margin: 0 auto;
    }
    
    .state-stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }
    
    .state-detail-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .state-symbol-large {
        margin-bottom: 1rem;
    }
    
    .state-detail-actions {
        flex-direction: column;
    }
    
    .hero-stats {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
    
    .hero-stat {
        flex: 1 0 40%;
    }
    
    .coverage-details-hero h1 {
        font-size: 2.2rem;
    }
    
    .coverage-details-hero p {
        font-size: 1.1rem;
    }
    
    .hero-cta {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-cta .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .state-cards-container {
        grid-template-columns: 1fr;
        gap: 0.75rem;
        padding: 0 0.5rem;
    }
    
    .state-card {
        min-width: 0;
        width: 100%;
    }
    
    .state-card-header {
        padding: 1rem;
    }
    
    .state-card-body {
        padding: 1rem;
    }
    
    .state-card-footer {
        padding: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: 1rem;
    }
    
    .hero-stat {
        flex: 1 0 100%;
    }
    
    .coverage-details-hero {
        padding: 3rem 0;
    }
    
    .coverage-nav {
        padding: 0 0.5rem;
    }
    
    .search-container input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}
