/* Norway Maps - Main Stylesheet */

/* CSS Variables */
:root {
    --primary-color: #ba0c2f;
    --primary-dark: #8a0922;
    --secondary-color: #00205b;
    --accent-color: #0057b8;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f8f9fa;
    --white: #fff;
    --border-color: #ddd;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-color);
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-color);
}

img {
    max-width: 100%;
    height: auto;
}

ul {
    list-style: none;
}

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

/* Header */
.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
}

.logo h1 {
    font-size: 1.5rem;
    color: var(--secondary-color);
}

.logo h1 span {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    margin: 2px 0;
    transition: var(--transition);
}

.nav-menu {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    color: var(--text-color);
    font-weight: 500;
    padding: 10px 0;
    display: block;
}

.nav-menu > li > a:hover,
.nav-menu > li > a.active {
    color: var(--primary-color);
}

/* Dropdown */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    min-width: 180px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 15px;
    color: var(--text-color);
    border-bottom: 1px solid var(--border-color);
}

.dropdown-menu li:last-child a {
    border-bottom: none;
}

.dropdown-menu li a:hover {
    background: var(--bg-color);
    color: var(--primary-color);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2.5rem;
    margin-bottom: 15px;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 700px;
    margin: 0 auto;
}

/* Map Section */
.map-section {
    padding: 40px 0;
}

.main-map {
    height: 500px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 20px;
}

.map-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.map-btn {
    padding: 10px 20px;
    border: 2px solid var(--secondary-color);
    background: var(--white);
    color: var(--secondary-color);
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: 500;
    transition: var(--transition);
}

.map-btn:hover,
.map-btn.active {
    background: var(--secondary-color);
    color: var(--white);
}

/* Page Map (for subpages) */
.page-map {
    height: 450px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 30px;
}

/* Features Section */
.features {
    padding: 60px 0;
    background: var(--white);
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--secondary-color);
}

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

.feature-card {
    background: var(--bg-color);
    padding: 30px;
    border-radius: var(--radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid var(--border-color);
    display: block;
    color: var(--text-color);
}

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

.feature-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.feature-card h3 {
    color: var(--secondary-color);
    margin-bottom: 10px;
}

.feature-card p {
    color: var(--text-light);
}

/* City Highlights */
.city-highlights {
    padding: 60px 0;
}

.city-highlights h2 {
    text-align: center;
    font-size: 2rem;
    margin-bottom: 40px;
    color: var(--secondary-color);
}

.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
}

.city-card {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    display: block;
}

.city-card:hover {
    transform: scale(1.02);
    box-shadow: var(--shadow-lg);
}

.city-info {
    padding: 25px;
    color: var(--white);
}

.city-info h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
}

.city-info p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* About Norway */
.about-norway {
    padding: 60px 0;
    background: var(--white);
}

.about-norway h2 {
    font-size: 2rem;
    margin-bottom: 30px;
    color: var(--secondary-color);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: start;
}

.about-text p {
    margin-bottom: 15px;
    color: var(--text-light);
}

.about-text h3 {
    color: var(--secondary-color);
    margin: 20px 0 15px;
}

.about-text ul {
    list-style: disc;
    padding-left: 20px;
}

.about-text li {
    margin-bottom: 8px;
    color: var(--text-light);
}

.about-map {
    height: 300px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

#mini-map {
    height: 300px;
    border-radius: var(--radius);
}

/* Page Header (for subpages) */
.page-header {
    background: linear-gradient(135deg, var(--secondary-color), var(--accent-color));
    color: var(--white);
    padding: 40px 0;
}

.page-header h1 {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.page-header p {
    opacity: 0.9;
    max-width: 700px;
}

.breadcrumb {
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.breadcrumb a {
    color: rgba(255, 255, 255, 0.8);
}

.breadcrumb a:hover {
    color: var(--white);
}

.breadcrumb span {
    color: rgba(255, 255, 255, 0.6);
    margin: 0 8px;
}

/* Content Section */
.content-section {
    padding: 50px 0;
}

.content-section h2 {
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.content-section h3 {
    font-size: 1.4rem;
    color: var(--secondary-color);
    margin: 25px 0 15px;
}

.content-section p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.content-section ul {
    list-style: disc;
    padding-left: 25px;
    margin-bottom: 20px;
}

.content-section li {
    color: var(--text-light);
    margin-bottom: 8px;
}

/* Info Grid */
.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin: 30px 0;
}

.info-card {
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    border-left: 4px solid var(--primary-color);
}

.info-card h4 {
    color: var(--secondary-color);
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.info-card p {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 0;
}

/* POI List */
.poi-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin: 30px 0;
}

.poi-item {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: flex;
    gap: 15px;
    transition: var(--transition);
}

.poi-item:hover {
    transform: translateX(5px);
    box-shadow: var(--shadow-lg);
}

.poi-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.poi-content h4 {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.poi-content p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 5px;
}

.poi-coords {
    font-size: 0.8rem;
    color: var(--accent-color);
    font-family: monospace;
}

/* Related Links */
.related-links {
    padding: 50px 0;
    background: var(--bg-color);
}

.related-links h2 {
    text-align: center;
    font-size: 1.8rem;
    color: var(--secondary-color);
    margin-bottom: 30px;
}

.links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.link-card {
    background: var(--white);
    padding: 20px;
    border-radius: var(--radius);
    text-align: center;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: block;
    color: var(--text-color);
}

.link-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--primary-color);
}

/* Footer */
.footer {
    background: var(--secondary-color);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h4 {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--white);
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-section ul li {
    margin-bottom: 8px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
}

.footer-section a:hover {
    color: var(--white);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.8);
}

/* Leaflet Customizations */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius);
}

.leaflet-popup-content {
    margin: 15px;
}

.marker-popup h4 {
    color: var(--secondary-color);
    margin-bottom: 5px;
}

.marker-popup p {
    color: var(--text-light);
    font-size: 0.9rem;
    margin: 0;
}

.marker-popup .popup-link {
    display: inline-block;
    margin-top: 10px;
    color: var(--accent-color);
    font-weight: 500;
}

/* Custom Markers */
.custom-marker {
    background: transparent;
}

.marker-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--white);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    cursor: pointer;
}

.marker-icon svg {
    width: 20px;
    height: 20px;
}

/* Marker hover effects */
.marker-icon:hover {
    transform: scale(1.3);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000 !important;
}

/* City markers - dark blue */
.marker-icon.city {
    background: linear-gradient(135deg, #00205b 0%, #003380 100%);
}

.marker-icon.city:hover {
    background: linear-gradient(135deg, #003380 0%, #0044aa 100%);
}

/* Fjord markers - ocean blue */
.marker-icon.fjord {
    background: linear-gradient(135deg, #0057b8 0%, #0077cc 100%);
}

.marker-icon.fjord:hover {
    background: linear-gradient(135deg, #0077cc 0%, #0099ee 100%);
}

/* Attraction markers - red (pin style) */
.marker-icon.attraction {
    background: linear-gradient(135deg, #ba0c2f 0%, #e01040 100%);
    border-radius: 50% 50% 50% 0;
    transform: rotate(-45deg);
}

.marker-icon.attraction svg {
    transform: rotate(45deg);
}

.marker-icon.attraction:hover {
    background: linear-gradient(135deg, #e01040 0%, #ff2050 100%);
    transform: rotate(-45deg) scale(1.3);
}

/* Ski resort markers - green */
.marker-icon.ski {
    background: linear-gradient(135deg, #2e7d32 0%, #4CAF50 100%);
}

.marker-icon.ski:hover {
    background: linear-gradient(135deg, #4CAF50 0%, #66BB6A 100%);
}

/* Northern lights markers - purple */
.marker-icon.aurora {
    background: linear-gradient(135deg, #7b1fa2 0%, #9c27b0 100%);
}

.marker-icon.aurora:hover {
    background: linear-gradient(135deg, #9c27b0 0%, #ba68c8 100%);
}

/* Airport markers - orange */
.marker-icon.airport {
    background: linear-gradient(135deg, #e65100 0%, #ff9800 100%);
}

.marker-icon.airport:hover {
    background: linear-gradient(135deg, #ff9800 0%, #ffb74d 100%);
}

/* Leaflet marker container z-index fix for hover */
.leaflet-marker-icon:hover {
    z-index: 1000 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 20px;
        box-shadow: var(--shadow);
        display: none;
        gap: 0;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu > li {
        width: 100%;
    }

    .nav-menu > li > a {
        padding: 12px 0;
        border-bottom: 1px solid var(--border-color);
    }

    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding-left: 20px;
        display: none;
    }

    .dropdown:hover .dropdown-menu,
    .dropdown.active .dropdown-menu {
        display: block;
    }

    .hero h2 {
        font-size: 1.8rem;
    }

    .main-map {
        height: 350px;
    }

    .about-content {
        grid-template-columns: 1fr;
    }

    .page-header h1 {
        font-size: 1.8rem;
    }

    .poi-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .hero {
        padding: 40px 0;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

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

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

    .main-map {
        height: 300px;
    }

    .map-controls {
        flex-direction: column;
    }

    .map-btn {
        width: 100%;
    }
}

/* Print Styles */
@media print {
    .header,
    .footer,
    .map-controls {
        display: none;
    }

    .main-map,
    .page-map {
        height: 400px;
        box-shadow: none;
        border: 1px solid #000;
    }
}
