/* locality.css - Additional styles for the locality page */

/* Hero Section */
.locality-hero {
    background: linear-gradient(135deg, #34d399 0%, #10b981 100%); /* Lighter green gradient */
    min-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-top: 75px;
    padding: 4rem 0;
}

.locality-hero .hero-content {
    text-align: center;
    color: white;
    z-index: 10;
    position: relative;
}

.locality-hero h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.locality-hero p {
    font-size: 1.25rem;
    max-width: 800px;
    margin: 0 auto;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Animated Pins */
.animated-pins {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Reduce number of pins from 7 to 4 */
.pin {
    position: absolute;
    color: white;
    font-size: 2rem;
    opacity: 0;
    animation: pinDrop 4s ease-in-out forwards;
}

.pin-1 { top: 20%; left: 25%; }
.pin-2 { top: 15%; left: 60%; }
.pin-3 { top: 60%; left: 30%; }
.pin-4 { top: 70%; left: 70%; }

/* Update animation to run exactly twice and then fade out */
@keyframes pinDrop {
    0% { transform: translateY(-50px); opacity: 0; }
    10% { transform: translateY(0); opacity: 1; }
    40% { transform: translateY(0); opacity: 1; }
    50% { transform: translateY(50px); opacity: 0; }
    60% { transform: translateY(-50px); opacity: 0; }
    70% { transform: translateY(0); opacity: 1; }
    90% { transform: translateY(0); opacity: 1; }
    100% { transform: translateY(50px); opacity: 0; }
}

/* Overview Section */
.locality-overview {
    padding: 5rem 0;
    background-color: #f9fafb;
}

.overview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
}

@media (min-width: 992px) {
    .overview-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.overview-text h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 1.5rem;
}

.overview-text p {
    font-size: 1.1rem;
    color: #4b5563;
    margin-bottom: 2rem;
    line-height: 1.6;
}

/* Benefits */
.benefits {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.benefit-icon {
    background-color: #ecfdf5;
    color: #10b981;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.1);
}

.benefit-item h3 {
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.benefit-item p {
    color: #6b7280;
    margin-bottom: 0;
}

/* Map Container */
.map-container {
    position: relative;
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 100%;
    min-height: 400px;
}

.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.2) 0%, rgba(5, 150, 105, 0.2) 100%);
    z-index: 1;
}

.map-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.facility-marker {
    position: absolute;
    top: 69%;
    left: 38%;
    transform: translate(-50%, -50%);
    z-index: 2;
    background-color: #10b981;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.3), 0 0 0 10px rgba(16, 185, 129, 0.1);
    animation: pulse 2s infinite;
}

.facility-label {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background-color: #10b981;
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.875rem;
    font-weight: 600;
    margin-top: 0.5rem;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { box-shadow: 0 0 0 15px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Distance Grid Section */
.distance-grid-section {
    padding: 5rem 0;
    background-color: white;
    position: relative;
    overflow: hidden;
}

.hexagon-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('data:image/svg+xml;utf8,<svg width="60" height="60" xmlns="http://www.w3.org/2000/svg"><path d="M30 5L55 20v20L30 55L5 40V20L30 5z" fill="none" stroke="%2310b98120" stroke-width="1"/></svg>');
    background-size: 100px 100px;
    opacity: 0.2;
    z-index: 0;
}

.section-header {
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    z-index: 1;
}

.section-header h2 {
    font-size: 2.25rem;
    font-weight: 700;
    color: #10b981;
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 700px;
    margin: 0 auto;
}

.distance-grid-container {
    max-width: 900px;
    margin: 0 auto;
    background-color: white;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
    z-index: 1;
}

.distance-grid {
    width: 100%;
    border-collapse: collapse;
    overflow: hidden;
}

.grid-header {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    background-color: #10b981;
    color: white;
    font-weight: 600;
}

.grid-header .grid-cell {
    padding: 1rem;
    text-align: center;
    border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.grid-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid #e5e7eb;
    transition: background-color 0.3s ease;
}

.grid-row:hover {
    background-color: #f9fafb;
}

.grid-row:nth-child(even) {
    background-color: #f9fafb;
}

.grid-row:nth-child(even):hover {
    background-color: #f3f4f6;
}

.grid-cell {
    padding: 1rem;
    text-align: center;
    border-right: 1px solid #e5e7eb;
}

.grid-cell:last-child {
    border-right: none;
}

.grid-footnote {
    text-align: center;
    margin-top: 1rem;
    color: #6b7280;
    font-size: 0.875rem;
    font-style: italic;
}

.interactive-map {
    margin-top: 4rem;
    position: relative;
    z-index: 1;
}

.interactive-map h3 {
    text-align: center;
    font-size: 1.5rem;
    color: #374151;
    margin-bottom: 1.5rem;
}

.map-wrapper {
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Transport Integration Section */
.transport-integration {
    background-color: #f3f4f6;
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.integration-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    position: relative;
    z-index: 1;
}

@media (min-width: 768px) {
    .integration-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

.integration-item {
    background-color: white;
    border-radius: 1rem;
    padding: 2rem;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.integration-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.item-icon {
    background-color: #10b981;
    color: white;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin: 0 auto 1.5rem;
}

.integration-item h3 {
    color: #374151;
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.integration-item p {
    color: #6b7280;
}

/* Route Animation */
.route-animation {
    position: absolute;
    bottom: 50px;
    left: 0;
    width: 100%;
    height: 50px;
    z-index: 0;
}

.route-line {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    background: repeating-linear-gradient(to right, #10b981, #10b981 10px, transparent 10px, transparent 20px);
    transform: translateY(-50%);
}

.route-vehicle {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    color: #10b981;
    font-size: 2rem;
    z-index: 1;
}

/* CTA Section */
.locality-cta {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 5rem 0;
    color: white;
    text-align: center;
}

.cta-content {
    max-width: 800px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.cta-content p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn-secondary {
    background-color: transparent;
    border: 2px solid white;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: background-color 0.3s ease, color 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn-secondary:hover {
    background-color: white;
    color: #10b981;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .locality-hero h1 {
        font-size: 2rem;
    }

    .locality-hero p {
        font-size: 1rem;
    }

    .overview-text h2,
    .section-header h2,
    .cta-content h2 {
        font-size: 1.75rem;
    }

    .grid-header,
    .grid-row {
        font-size: 0.875rem;
    }

    .grid-cell {
        padding: 0.75rem 0.5rem;
    }

    .cta-content p {
        font-size: 1rem;
    }

    .pin {
        font-size: 1.5rem;
    }
}

/* For extremely small screens */
@media (max-width: 480px) {
    .grid-header,
    .grid-row {
        grid-template-columns: 1fr;
    }

    .grid-cell {
        border-right: none;
        border-bottom: 1px solid #e5e7eb;
    }

    .grid-header .grid-cell:first-child,
    .grid-row .grid-cell:first-child {
        background-color: #f3f4f6;
        font-weight: 600;
    }

    .grid-header .grid-cell:not(:first-child) {
        background-color: #10b981;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Animation for link hover states */
.integration-item .item-icon,
.benefit-icon {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.integration-item:hover .item-icon,
.benefit-item:hover .benefit-icon {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 16px rgba(16, 185, 129, 0.2);
}

/* Responsive images */
.map-image {
    max-width: 100%;
    height: auto;
}

/* Mobile nav adjustments */
@media (max-width: 768px) {
    .locality-hero {
        margin-top: 60px;
    }
}
