/* GPS Maze Åland - Modern Geocaching Style */

/* CSS Variables för enkel anpassning */
:root {
    --primary-color: #2E7D32;      /* Geocaching grön */
    --secondary-color: #FF6F00;   /* Orange accent */
    --accent-color: #1976D2;      /* Blå accent */
    --dark-bg: #1A1A1A;           /* Mörk bakgrund */
    --light-bg: #F5F5F5;         /* Ljus bakgrund */
    --text-primary: #333333;     /* Primär text */
    --text-secondary: #666666;   /* Sekundär text */
    --text-light: #FFFFFF;       /* Ljus text */
    --border-color: #E0E0E0;     /* Kantfärg */
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 15px rgba(0, 0, 0, 0.2);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Reset och grundläggande styling */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: linear-gradient(135deg, var(--light-bg) 0%, #E8F5E8 100%);
    overflow-x: hidden;
    padding-bottom: 150px;
}

/* Fixed Header */
.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, var(--primary-color) 0%, #388E3C 100%);
    box-shadow: var(--shadow);
    padding: 1rem 0;
}

.header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 3px solid var(--text-light);
    transition: var(--transition);
}

.logo:hover {
    transform: rotate(360deg);
}

.site-title {
    color: var(--text-light);
    font-size: 1.8rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.language-switcher {
    display: flex;
    gap: 0.5rem;
}

.lang-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--border-radius);
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
    border: 2px solid transparent;
}

.lang-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.lang-link.active {
    background: var(--secondary-color);
    border-color: var(--text-light);
}

.flag-emoji {
    font-size: 1.2rem;
    line-height: 1;
}

.event-banner {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--secondary-color);
    padding: 0.5rem 1rem;
    border-radius: var(--border-radius);
    color: var(--text-light);
    font-weight: 600;
    box-shadow: var(--shadow);
}

.social-links {
    display: flex;
    gap: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    color: var(--text-light);
    text-decoration: none;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--secondary-color);
    transform: translateY(-3px) scale(1.1);
}

/* Fixed Sidebar */
.fixed-sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 280px;
    background: linear-gradient(180deg, var(--dark-bg) 0%, #2C2C2C 100%);
    box-shadow: var(--shadow);
    z-index: 1002;
    overflow-y: auto;
    padding: 2rem 0;
    padding-top: 120px;
}

.sidebar-nav {
    padding: 0 1.5rem;
}

.nav-section {
    margin-bottom: 2rem;
}

.nav-title {
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-menu {
    list-style: none;
}

.nav-menu li {
    margin-bottom: 0.5rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1rem;
    color: var(--text-light);
    text-decoration: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    border-left: 3px solid transparent;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    border-left-color: var(--secondary-color);
    transform: translateX(5px);
}

.nav-link i {
    width: 20px;
    text-align: center;
    color: var(--secondary-color);
}

.event-info {
    background: rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius);
    padding: 1rem;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    color: var(--text-light);
    font-size: 0.9rem;
}

.info-item i {
    color: var(--secondary-color);
    width: 16px;
}

.info-item a {
    color: var(--secondary-color);
    text-decoration: none;
}

.share-buttons {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--accent-color);
    border: none;
    border-radius: 50%;
    color: var(--text-light);
    cursor: pointer;
    transition: var(--transition);
}

.share-btn:hover {
    background: var(--secondary-color);
    transform: scale(1.1);
}

/* Main Content */
.main-content {
    margin-left: 280px;
    margin-top: 100px;
    margin-bottom: 2rem;
    padding: 2rem;
    min-height: calc(100vh - 200px);
}

.content-wrapper {
    max-width: 800px;
    margin: 0 auto;
    background: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 3rem;
    position: relative;
    overflow: hidden;
}

.content-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--accent-color));
}

/* Content styling */
h1, h2, h3, h4, h5, h6 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 2rem;
    position: relative;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 2px;
}

h2 {
    font-size: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 0.5rem;
}

h3 {
    font-size: 1.5rem;
    color: var(--accent-color);
}

p {
    margin-bottom: 1rem;
    line-height: 1.8;
}

a {
    color: var(--accent-color);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Cards och sektioner */
.card {
    background: var(--text-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    padding: 2rem;
    margin-bottom: 2rem;
    border-left: 5px solid var(--primary-color);
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: 1.5rem;
}

/* Lists */
ul, ol {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    border: none;
    border-radius: var(--border-radius);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.btn-secondary {
    background: linear-gradient(135deg, var(--accent-color), #42A5F5);
}

/* Fixed Footer */
.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--dark-bg) 0%, #2C2C2C 100%);
    color: var(--text-light);
    z-index: 1000;
    box-shadow: 0 -4px 6px rgba(0, 0, 0, 0.1);
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.3rem 1rem;
    margin-left: 280px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 1fr 2.5fr;
    gap: 0.8rem;
    margin-bottom: 0.2rem;
    align-items: start;
}

.footer-section h4 {
    color: var(--secondary-color);
    margin-bottom: 0.15rem;
    font-size: 0.75rem;
}

.footer-section p {
    font-size: 0.65rem;
    margin-bottom: 0.05rem;
}

.footer-bottom {
    display: flex;
    justify-content: center;
    align-items: center;
    padding-top: 0.2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright {
    color: var(--text-secondary);
    font-size: 0.55rem;
    text-align: center;
}

.footer-copyright i {
    color: #E91E63;
}

/* Visitor Stats */
.visitor-stats {
    max-height: 180px;
    overflow-y: auto;
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(4, 1fr);
    gap: 0.1rem;
    padding: 0.4rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stats-loading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.8rem;
    grid-column: 1 / -1;
    justify-content: center;
    padding: 2rem;
}

.country-stat {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: 0.1rem 0.15rem;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    text-align: center;
    min-height: 22px;
    transition: all 0.2s ease;
}

.country-stat:hover {
    background: rgba(255, 255, 255, 0.12);
    transform: translateY(-1px);
}

.country-stat.empty {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.country-stat.empty:hover {
    background: rgba(255, 255, 255, 0.05);
    transform: none;
}

.country-flag {
    font-size: 0.8rem;
    margin-right: 0.1rem;
    flex-shrink: 0;
}

.country-code {
    font-size: 0.5rem;
    font-weight: 600;
    color: var(--text-light);
    margin-right: 0.1rem;
    flex: 1;
    text-align: left;
}

.country-count {
    background: var(--secondary-color);
    color: var(--text-light);
    padding: 0.03rem 0.15rem;
    border-radius: 3px;
    font-size: 0.4rem;
    font-weight: 600;
    min-width: 10px;
    text-align: center;
    flex-shrink: 0;
}

/* Google Translate */
#google_translate_element {
    margin-top: 0.5rem;
}

.goog-te-gadget {
    font-family: inherit !important;
}

.goog-te-gadget-simple {
    background: rgba(255, 255, 255, 0.1) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: var(--border-radius) !important;
    padding: 0.5rem !important;
}

.goog-te-gadget-simple .goog-te-menu-value {
    color: var(--text-light) !important;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .fixed-sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
    }
}

@media (max-width: 768px) {
    .fixed-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .fixed-sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    
    .content-wrapper {
        padding: 2rem;
    }
    
    .header-container {
        padding: 0 1rem;
    }
    
    .site-title {
        font-size: 1.4rem;
    }
    
    .language-switcher {
        flex-wrap: wrap;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .header-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .site-title {
        font-size: 1.2rem;
    }
    
    .content-wrapper {
        padding: 1.5rem;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.5rem;
    }
}

/* Animationer */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-wrapper {
    animation: fadeInUp 0.6s ease-out;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--light-bg);
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Print styles */
@media print {
    .fixed-header,
    .fixed-sidebar,
    .fixed-footer {
        display: none;
    }
    
    .main-content {
        margin: 0;
        padding: 0;
    }
    
    .content-wrapper {
        box-shadow: none;
        border: 1px solid var(--border-color);
    }
}
