/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1565C0;
    --secondary-color: #4CAF50;
    --accent-color: #FF5722;
    --dark-bg: #1a1a1a;
    --light-bg: #f5f5f5;
    --text-dark: #333;
    --text-light: #666;
    --border-radius: 10px;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.2);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background-color: #fff;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.header {
    background: linear-gradient(135deg, var(--primary-color), #0D47A1);
    color: white;
    padding: 20px 0;
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 5px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}


/* Hero Section */
.hero {
    background: url('background.jpg');
    background-size: cover;
    background-position: center 40%;
    color: white;
    padding: 180px 0;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45); /* Adjusted overlay for better text and button contrast */
}

.hero h2 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.8), 0 0 20px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.hero p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 1;
    text-shadow: 1px 1px 6px rgba(0, 0, 0, 0.7);
    font-weight: 500;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 1;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn-primary, .btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid transparent;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border: 2px solid var(--primary-color);
}

/* About Section */
.about {
    padding: 80px 0;
    background: var(--light-bg);
}

.ccmn-about {
    padding-bottom: 0;
    background: white; /* Override the grey background to create alternating sections */
}

.about h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: var(--text-dark);
}

.about-description {
    max-width: 900px;
    margin: 0 auto 50px;
    text-align: center;
    font-size: 1.2rem;
    line-height: 1.8;
    color: var(--text-dark);
}

.about-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.about-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.about-card .icon {
    font-size: 3rem;
    margin-bottom: 20px;
}

.about-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--primary-color);
}

.feature-quote {
    font-size: 0.9rem;
    color: var(--primary-color);
    font-style: italic;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #e0e0e0;
}

/* Repeaters Section */
.repeaters {
    padding: 80px 0;
}

.repeaters h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.repeater-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.repeater-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.repeater-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary-color);
}

.repeater-card h3 {
    background: linear-gradient(135deg, var(--primary-color), #0D47A1);
    color: white;
    padding: 15px 20px;
    margin: 0;
    font-size: 1.3rem;
    line-height: 1.4;
}

.repeater-info {
    padding: 20px;
}

.repeater-info p {
    margin: 8px 0;
    color: var(--text-dark);
}

/* Repeater info sections */
.repeater-info .info-section {
    padding: 8px 0;
}

.repeater-info hr {
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 10px 0;
}

.repeater-info .radio-section p,
.repeater-info .operator-section p,
.repeater-info .status-section p {
    padding-left: 4px;
}

.repeater-info strong {
    color: var(--text-dark);
    font-weight: 600;
}

.status-active {
    background: #6c757d;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

.status-planned {
    background: #FFC107;
    color: #333;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Map Section */
.map-section {
    padding: 80px 0;
    background: var(--light-bg);
}

.map-section h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.map-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.map {
    height: 700px;
    width: 100%;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.map-legend {
    background: white;
    padding: 15px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    width: auto;
    max-width: 400px;
    margin: 0 auto;
}

.map-legend h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: var(--text-dark);
}

.legend-item {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.legend-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    margin-right: 10px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.legend-text {
    font-size: 14px;
    color: var(--text-dark);
}

@media (max-width: 768px) {
    .map-legend {
        width: 100%;
    }
    
    .map {
        height: 500px;
    }
}

/* Contact Section */
.contact {
    padding: 80px 0;
}

.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
    color: var(--text-dark);
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.contact-card {
    background: white;
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border-left: 5px solid var(--primary-color);
}

.contact-card h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.5rem;
}

.contact-card ol {
    margin-left: 20px;
}

.contact-card ol li {
    margin: 10px 0;
    color: var(--text-dark);
}

/* MeshCore Channel styles */
.channel-hash {
    background: #f0f5ff;
    border: 1px solid #d0e0ff;
    border-radius: 5px;
    padding: 15px;
    margin: 15px 0;
    text-align: center;
}

.channel-hash code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 1.1rem;
    color: var(--primary-color);
    font-weight: 600;
    letter-spacing: 0.5px;
    word-break: break-all;
}

.channel-note {
    font-style: italic;
    color: var(--text-light);
    margin-top: 15px;
    font-size: 0.9rem;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    text-align: center;
    padding: 40px 0;
}

.footer p {
    margin: 10px 0;
    line-height: 1.8;
}

/* Mobile break for header */
.mobile-break {
    display: inline;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .mobile-break {
        display: block;
    }
    .hero h2 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

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

    .btn {
        width: 200px;
        text-align: center;
    }

    .about h2, .repeaters h2, .map-section h2, .contact h2 {
        font-size: 2rem;
    }

    .repeater-grid {
        grid-template-columns: 1fr;
    }

    .map {
        height: 400px;
    }

    .logo {
        font-size: 1.5rem;
    }

    .tagline {
        font-size: 1rem;
    }
}

/* Leaflet Map Custom Styles */
.leaflet-popup-content {
    font-size: 14px;
    line-height: 1.5;
}

.leaflet-popup-content h4 {
    margin: 0 0 10px 0;
    color: var(--primary-color);
}

.leaflet-popup-content p {
    margin: 5px 0;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero, .about-card, .repeater-card, .contact-card {
    animation: fadeIn 0.8s ease-out;
}
