/* ================================================= */
/* GENERELT - BØRNEVENLIGT DESIGN */
/* ================================================= */
@import url('https://fonts.googleapis.com/css2?family=Fredoka:wght@400;600;700&family=Quicksand:wght@400;600&display=swap');

:root {
    --primary-color: #20B2AA;
    --primary-dark: #008B8B;
    --secondary-color: #FFD166;
    --accent-color: #EF476F;
    --background-color: #F0F9F9;
    --text-color: #2D3436;
    
    --font-heading: 'Fredoka', cursive;
    --font-body: 'Quicksand', sans-serif;
}

* { box-sizing: border-box; }

body {
    font-family: var(--font-body);
    margin: 0;
    background-color: var(--background-color);
    color: var(--text-color);
    line-height: 1.6;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
}

/* ================================================= */
/* HEADER */
/* ================================================= */
#main-header {
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 4px 20px rgba(32, 178, 170, 0.15);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 2000;
    height: 70px;
    border-bottom: 3px solid var(--secondary-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
}

#main-header h1 { margin: 0; font-size: 1.6em; font-weight: 700; }
#main-header h1 a { text-decoration: none; color: var(--primary-color); display: flex; align-items: center; gap: 10px; }

.header-cta {
    background-color: var(--accent-color);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    text-decoration: none;
    font-weight: bold;
    display: none; 
    font-size: 0.9em;
}

@media (min-width: 768px) { 
    .header-cta { display: inline-flex; gap: 5px; align-items: center; } 
}

/* RETTELSE TIL PROFIL IKON */
.header-profile {
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1.2rem;
    transition: transform 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.header-profile:hover {
    transform: scale(1.1);
    background-color: var(--primary-dark);
}

.header-profile img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

/* Burger Menu */
.burger-menu-btn {
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    width: 26px;
    height: 26px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
}

.burger-menu-btn span {
    width: 26px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 10px;
    transition: 0.3s;
}

.burger-menu-btn.open span:first-child { transform: rotate(45deg) translate(5px, 5px); }
.burger-menu-btn.open span:nth-child(2) { opacity: 0; }
.burger-menu-btn.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* Nav Menu */
.nav-menu {
    position: fixed;
    top: 70px;
    right: 0;
    width: 100%;
    background: white;
    border-bottom: 1px solid #eee;
    padding: 20px 0;
    transform: translateY(-150%);
    transition: transform 0.3s ease-in-out;
    box-shadow: 0 10px 15px rgba(0,0,0,0.05);
    text-align: center;
}

.nav-menu.active { transform: translateY(0); }

.nav-menu a {
    display: block;
    padding: 15px;
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
}

.nav-menu .cta-button {
    display: inline-block;
    margin-top: 15px;
    background-color: var(--accent-color);
    color: white !important;
    padding: 12px 30px;
    border-radius: 50px;
    box-shadow: 0 4px 0 #c0392b;
}

/* ================================================= */
/* HERO SECTION - MED BLØD BUE */
/* ================================================= */
.hero-wrapper {
    position: relative;
    width: 100%;
    min-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background-color: var(--primary-color);
    margin-top: 0;
    
    /* NY OVERGANG: Blød bue i bunden */
    border-bottom-left-radius: 30px;
    border-bottom-right-radius: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 10;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    z-index: 0; 
    transform: translateX(-50%) translateY(-50%);
    object-fit: cover;
    opacity: 0.6;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(32, 178, 170, 0.2);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    width: 100%;
    padding: 0 20px;
    margin-top: 40px;
}

.hero-content h2 { 
    font-size: 3.2em; 
    margin-bottom: 10px; 
    text-shadow: 2px 2px 0 rgba(0,0,0,0.2);
}

.hero-content p { 
    font-size: 1.4em; 
    font-weight: 600; 
    margin-bottom: 30px; 
    text-shadow: 1px 1px 0 rgba(0,0,0,0.2);
}

/* Søgeform */
.search-form {
    background: rgba(255, 255, 255, 0.95);
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    max-width: 600px;
    margin: 0 auto;
}

.input-wrapper {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.search-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 1.2em;
}

.search-form input { 
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #eee; 
    border-radius: 12px; 
    font-size: 16px; 
    font-family: var(--font-body);
    font-weight: 600;
    box-sizing: border-box;
}

.search-form input:focus { outline: none; border-color: var(--primary-color); }

/* HERO KNAPPER */
.hero-btn-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.hero-btn {
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1em;
    cursor: pointer;
    white-space: nowrap;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.2s;
    font-family: var(--font-body);
    width: 100%; 
    height: 50px;
}

.hero-btn:hover { transform: translateY(-3px); }

.btn-search { background-color: var(--secondary-color); color: #333; }
.btn-locate { background-color: #E0F7FA; color: var(--primary-dark); }
.btn-map { background-color: #E8F5E9; color: #2E7D32; } 
.btn-list { background-color: #FFF3E0; color: #E65100; } 

/* ================================================= */
/* MAP SECTION */
/* ================================================= */
#map-section {
    position: relative;
    width: 100%;
    /* Trækker kortet lidt op under hero-buen */
    margin-top: -40px; 
    padding-top: 40px; 
    z-index: 1;
}

#main-map { 
    width: 100%; 
    height: 85vh; 
    background-color: #e5e3df; 
}

/* ================================================= */
/* COMMUNITY BAR (CTA) */
/* ================================================= */
#community-bar {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    border-bottom: 5px solid var(--secondary-color);
    padding: 40px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: white;
    gap: 20px;
}

.community-text strong { font-family: var(--font-heading); font-size: 1.8em; display: block; }

.community-btn {
    display: inline-block;
    padding: 15px 30px;
    border-radius: 50px;
    background-color: var(--secondary-color);
    color: #333;
    font-family: var(--font-heading);
    font-size: 1.2em;
    text-decoration: none;
    border: 3px solid #fff;
    box-shadow: 4px 4px 0 rgba(0,0,0,0.1);
    transition: transform 0.2s;
}

.community-btn:hover { transform: scale(1.05); }

@media (min-width: 768px) {
    #community-bar { flex-direction: row; justify-content: center; gap: 50px; text-align: left; }
}

/* ================================================= */
/* LISTE */
/* ================================================= */
#list-section {
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.list-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.sort-group { display: flex; gap: 10px; overflow-x: auto; padding-bottom: 5px; }

.list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px; 
}

.list-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.03);
    display: flex;
    flex-direction: column;
}

.list-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(32, 178, 170, 0.15); }

.card-image-wrapper {
    position: relative;
    width: 100%;
    padding-top: 66%;
    background-color: #F2F0EB;
    overflow: hidden;
}

.card-image-wrapper img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.list-card:hover .card-image-wrapper img { transform: scale(1.05); }

.card-badge {
    position: absolute;
    bottom: 10px; right: 10px;
    background-color: rgba(255, 255, 255, 0.95);
    color: var(--primary-dark);
    padding: 5px 10px;
    border-radius: 12px;
    font-size: 0.8em;
    font-weight: 700;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    backdrop-filter: blur(4px);
}

.card-body { padding: 18px; display: flex; flex-direction: column; flex-grow: 1; }

.card-title { 
    margin: 0 0 10px 0; 
    font-size: 1.25em; 
    font-family: var(--font-heading); 
    color: var(--text-color);
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    white-space: normal;
    height: 2.6em; 
}

.card-stats { display: flex; gap: 15px; margin-bottom: 15px; font-size: 0.9em; font-weight: 600; }
.stat-item { display: flex; align-items: center; gap: 5px; }
.stat-item.rating { color: var(--secondary-color); }
.stat-item.views { color: #95a5a6; }

.card-footer { margin-top: auto; border-top: 1px solid #f5f5f5; padding-top: 12px; }
.read-more { font-size: 0.9em; font-weight: 700; color: var(--primary-color); display: flex; align-items: center; gap: 5px; }

.sort-btn {
    padding: 10px 20px;
    background: white;
    border-radius: 50px;
    font-weight: 600;
    border: 1px solid #eee;
    cursor: pointer;
    color: #666;
    white-space: nowrap;
    transition: 0.2s;
    font-family: var(--font-body);
}

.sort-btn:hover { background-color: #f9f9f9; border-color: #ddd; }
.sort-btn.active { background-color: var(--primary-color); color: white; border-color: var(--primary-color); box-shadow: 0 4px 10px rgba(32, 178, 170, 0.3); }

/* PAGINATION */
.pagination-container { display: flex; justify-content: center; gap: 8px; margin-top: 30px; grid-column: 1 / -1; flex-wrap: wrap; }
.page-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 2px solid #eee;
    background: white;
    font-weight: bold;
    color: var(--text-color);
    cursor: pointer;
    transition: 0.2s;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-heading);
}
.page-btn:hover { border-color: var(--secondary-color); background-color: #fffdf5; }
.page-btn.active { background-color: var(--primary-color); color: white; border-color: var(--primary-color); transform: scale(1.1); }

/* LOADING ANIMATION */
.loader-container { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 200px; }
.bouncing-ball { width: 50px; height: 50px; border-radius: 50%; background: var(--primary-color); animation: bounce 1s infinite; }
@keyframes bounce { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-30px); } }

/* ================================================= */
/* COMMUNITY SEKTION (Takke-boks) */
/* ================================================= */
#community-section {
    padding: 40px 20px;
    background: linear-gradient(180deg, #fff 0%, var(--background-color) 100%);
    display: flex;
    justify-content: center;
}

.community-highlight-box {
    background: white;
    border-radius: 24px;
    padding: 30px;
    width: 100%;
    max-width: 800px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    text-align: center;
    border: 1px solid #eee;
}

.community-intro h3 { color: var(--primary-dark); font-size: 1.6em; margin: 0 0 10px 0; }
.community-intro p { color: #666; margin-bottom: 30px; font-size: 1em; line-height: 1.5; max-width: 600px; margin-left: auto; margin-right: auto; }

.helpers-grid { display: flex; justify-content: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.helper-card { display: flex; flex-direction: column; align-items: center; width: 80px; }
.helper-img { width: 60px; height: 60px; margin-bottom: 8px; position: relative; }
.helper-img img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 2px solid var(--secondary-color); }
.helper-icon-placeholder { width: 100%; height: 100%; border-radius: 50%; background-color: #E0F7FA; border: 2px solid var(--primary-color); display: flex; align-items: center; justify-content: center; font-size: 24px; color: var(--primary-dark); }
.helper-icon-placeholder.anon { background-color: #f0f0f0; border-color: #ccc; color: #999; }
.helper-name { font-weight: 600; color: var(--text-color); font-size: 0.8em; text-align: center; }
.community-footer p { font-weight: bold; color: var(--primary-color); font-size: 0.9em; margin: 0; }

/* ================================================= */
/* FOOTER */
/* ================================================= */
#main-footer { background-color: #2c3e50; color: white; padding: 40px 20px 20px; margin-top: 50px; border-top: 5px solid var(--primary-color); }
.footer-content { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; max-width: 1000px; margin: 0 auto; gap: 20px; }
.footer-logo h3 { font-size: 1.8em; margin: 0; color: var(--secondary-color); }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: #ecf0f1; text-decoration: none; display: flex; align-items: center; gap: 5px; }
.copyright { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); color: #95a5a6; font-size: 0.9em; }

/* ================================================= */
/* GOOGLE MAPS POPUP */
/* ================================================= */
.gm-style-iw { padding: 0 !important; overflow: visible !important; border-radius: 16px !important; box-shadow: 0 4px 20px rgba(0,0,0,0.15) !important; max-width: 280px !important; }
.gm-style-iw-d { overflow: hidden !important; max-height: none !important; }
.gm-ui-hover-effect { display: none !important; }
.custom-map-close {
    position: absolute; top: -10px; right: -10px; width: 32px; height: 32px;
    background-color: white; border-radius: 50%; border: none;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25); cursor: pointer; z-index: 2000;
    display: flex; align-items: center; justify-content: center;
    font-family: Arial, sans-serif; font-size: 20px; line-height: 1; color: #333; padding: 0; margin: 0;
}
.custom-map-close:hover { background-color: #f0f0f0; }

/* ================================================= */
/* FLYDENDE KNAP (FAB) */
/* ================================================= */
.fab-container {
    position: fixed; bottom: 30px; right: 30px; z-index: 2000;
    display: flex; flex-direction: column; align-items: flex-end; gap: 15px;
}
.fab-main-btn {
    width: 65px; height: 65px; background-color: var(--secondary-color);
    border-radius: 50%; border: none; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    color: #333; font-size: 32px; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.fab-main-btn:hover { transform: scale(1.1); }
.fab-main-btn.active { transform: rotate(45deg); background-color: #333; color: white; }

.fab-options { display: none; flex-direction: column; gap: 12px; align-items: flex-end; }
.fab-options.show { display: flex; animation: slideUp 0.3s ease; }
@keyframes slideUp { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: translateY(0); } }

.fab-option { display: flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer; }
.fab-label { background: white; padding: 6px 12px; border-radius: 8px; font-size: 14px; font-weight: 600; color: #333; box-shadow: 0 2px 8px rgba(0,0,0,0.1); }
.fab-mini-btn {
    width: 50px; height: 50px; border-radius: 50%; background: white;
    display: flex; align-items: center; justify-content: center; font-size: 20px;
    color: var(--primary-color); box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border: 2px solid white; transition: 0.2s;
}
.fab-option:hover .fab-mini-btn { background: var(--primary-color); color: white; }

/* ================================================= */
/* RESPONSIVE */
/* ================================================= */
@media (max-width: 768px) {
    #main-header { height: 60px; }
    .header-content { padding: 0 15px; }
    #main-header h1 { font-size: 1.3em; }
    .hero-wrapper { height: auto; min-height: 85vh; border-radius: 0 0 20px 20px; }
    .hero-content h2 { font-size: 2em; }
    .hero-content p { font-size: 1.1em; }
    #community-bar { padding: 30px 15px; }
    .community-text strong { font-size: 1.4em; }
    .list-grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 15px; }
    .fab-container { bottom: 20px; right: 20px; }
    .fab-main-btn { width: 55px; height: 55px; font-size: 28px; }
}