/* Map Styles */
.acf-map {
    width: 100%;
    height: 400px;
    border: 1px solid #9eafa2;
    margin: 20px 0;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(30, 69, 128, 0.1); /* dark blue shadow */
}

/* Fixes potential theme css conflict */
.acf-map img {
    max-width: inherit !important;
}

/* Info Window Styles */
.rep-info-window {
    max-width: 300px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.5;
}

.rep-info-window h3 {
    margin: 0 0 12px 0;
    color: var(--contrast-2);
    font-size: 18px;
    font-weight: 600;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 8px;
}

.rep-info-window p {
    margin: 10px 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--contrast-2);
}

.rep-info-window strong {
    color: var(--accent);
    font-weight: 600;
}

.rep-info-window a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.rep-info-window a:hover {
    color: var(--med-green);
    text-decoration: underline;
}

/* Container Styles */
.representatives-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Directory Styles */
.representatives-directory {
    margin-top: 50px;
}

.directory-header {
    margin-bottom: 35px;
}

.directory-header h2 {
    margin: 0 0 25px 0;
    font-size: 32px;
    font-weight: 700;
    color: var(--contrast-2);
    border-bottom: 3px solid var(--accent);
    padding-bottom: 12px;
    position: relative;
}

.directory-header h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--yellow);
}

/* Directory Controls */
.directory-controls {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
    margin-bottom: 30px;
}

.search-filter,
.country-filter {
    position: relative;
}

.search-filter input,
.country-filter select {
    padding: 14px 18px;
    border: 2px solid #9eafa2;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    min-width: 220px;
    background: #f7f8f9;
    color: var(--contrast-2);
    transition: all 0.3s ease;
}

.search-filter input:focus,
.country-filter select:focus {
    outline: none;
    border-color: var(--accent);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(29, 116, 179, 0.1);
}

.search-filter input::placeholder {
    color: #9eafa2;
}

/* Representatives Grid */
.representatives-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
    margin-top: 25px;
}

/* Representative Cards */
.rep-card {
    background: linear-gradient(135deg, #ffffff 0%, #f7f8f9 100%);
    border: 1px solid #9eafa2;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 4px 12px rgba(30, 69, 128, 0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.rep-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent) 0%, var(--med-green) 50%, var(--yellow) 100%);
}

.rep-card:hover {
    box-shadow: 0 8px 25px rgba(30, 69, 128, 0.15);
    transform: translateY(-4px);
    border-color: var(--accent);
}

/* Card Header */
.rep-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 22px;
    gap: 15px;
}

.rep-card-header h3 {
    margin: 0;
    font-size: 22px;
    font-weight: 600;
    color: var(--contrast-2);
    line-height: 1.3;
    flex: 1;
}

.country-badge {
    background: linear-gradient(135deg, var(--accent) 0%, var(--med-green) 100%);
    color: #ffffff;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    white-space: nowrap;
    box-shadow: 0 2px 6px rgba(29, 116, 179, 0.3);
}

/* Card Content */
.rep-card-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.address {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.6;
    font-size: 15px;
}

.address .icon {
    margin-top: 2px;
    flex-shrink: 0;
}

/* Contact Info */
.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item a {
    color: var(--accent);
    text-decoration: underline;
    font-weight: 500;
    font-size: 15px;
    transition: all 0.2s ease;
}

.contact-item a:hover {
    color: var(--med-green);
    text-decoration: underline;
}

/* Icons */
.icon {
    color: #9eafa2;
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.contact-item:hover .icon {
    color: var(--accent);
}

/* Locate on Map Button */
.locate-on-map {
    background: linear-gradient(135deg, #f7f8f9 0%, #f0f0f0 100%);
    border: 2px solid #9eafa2;
    color: var(--accent);
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.locate-on-map:hover {
    background: linear-gradient(135deg, var(--accent) 0%, var(--med-green) 100%);
    border-color: var(--accent);
    color: #ffffff;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(29, 116, 179, 0.3);
}

.locate-on-map:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(29, 116, 179, 0.3);
}

.locate-on-map .icon {
    transition: all 0.3s ease;
}

.locate-on-map:hover .icon {
    color: #ffffff;
}

/* No Results Message */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #9eafa2;
    font-style: italic;
    font-size: 18px;
    background: #f7f8f9;
    border-radius: 12px;
    border: 2px dashed #9eafa2;
}

/* Focus Styles for Better Accessibility */
.locate-on-map:focus,
.search-filter input:focus,
.country-filter select:focus {
    outline: 3px solid var(--yellow);
    outline-offset: 2px;
}
