/* CamperStyle Links - Öffentliche Seite */

/* CSS Custom Properties (Variablen) - CamperStyle Custom Colors */
:root {
    --primary-teal: #48b7b7;
    --primary-teal-dark: #3a9999;
    --accent-pink: #d4547e;
    --accent-pink-dark: #b8456b;
    --accent-orange: #fa8936;
    --accent-orange-dark: #e07829;
    
    --background-light: #ffffff;
    --background-gray: #EBEBEB;
    --text-dark: #2c2c2c;
    --text-gray: #666666;
    --text-light: #ffffff;
    
    --border-radius: 12px;
    --shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.15);
    
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

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

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-dark);
    background: linear-gradient(135deg, var(--background-light) 0%, var(--background-gray) 100%);
    min-height: 100vh;
}

/* Container */
.container {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Header */
.header {
    text-align: center;
    margin-bottom: 40px;
}

.logo-container {
    margin-bottom: 20px;
}

.logo {
    width: 80px;
    height: auto;
    filter: drop-shadow(var(--shadow));
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.site-title {
    font-size: 2rem;
    font-weight: 600;
    color: var(--primary-teal);
    margin-bottom: 8px;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.site-description {
    color: var(--text-gray);
    font-size: 1rem;
    font-weight: 400;
    margin-bottom: 20px;
}

/* Social Media Icons */
.social-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    min-height: 30px;
}

.social-icon {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: block;
}

.social-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.social-icon svg,
.social-icon img {
    width: 100%;
    height: 100%;
    display: block;
}

/* Fallback für Social Icons ohne SVG */
.social-icon-fallback {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--accent-pink);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.social-icon-fallback:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    background: var(--primary-teal);
}

/* Main Content */
.main-content {
    flex: 1;
}

.links-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Section Headings (Zwischenüberschriften) */
.heading-item {
    margin: 2px 0 0px;
    text-align: center;
}

.section-heading {
    font-size: 22px;
    font-weight: 600;
    color: var(--primary-teal);
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.heading-icon {
    width: 35px;
    height: 35px;
    object-fit: contain;
    vertical-align: middle;
}

.heading-icon-text {
    font-size: 1.5rem;
    vertical-align: middle;
}

/* Link Cards */
.link-card {
    background: var(--background-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    overflow: hidden;
    position: relative;
}

.link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--accent-orange);
}

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

/* Links ohne Icon */
.link-card.no-icon .link-content {
    margin-left: 0;
}

.link-card:active {
    transform: translateY(0);
}

.link-card a {
    display: flex;
    align-items: center;
    padding: 20px;
    text-decoration: none;
    color: inherit;
    min-height: 80px;
}

.link-icon {
    font-size: 2rem;
    margin-right: 16px;
    flex-shrink: 0;
    width: 60px;
    text-align: center;
    transition: transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.link-icon-img {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.link-card:hover .link-icon {
    transform: scale(1.1);
}

.link-content {
    flex: 1;
}

.link-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--accent-pink);
    margin-bottom: 4px;
}

.link-description {
    font-size: 0.875rem;
    color: var(--text-gray);
    line-height: 1.4;
}

/* Loading State */
.loading {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--background-gray);
    border-top: 3px solid var(--primary-teal);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error State */
.error-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-gray);
    background: var(--background-light);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}

.error-state h3 {
    color: var(--accent-orange);
    margin-bottom: 12px;
}

/* Footer */
.footer {
    margin-top: 40px;
    padding-top: 20px;
    text-align: center;
    color: var(--text-gray);
    font-size: 0.875rem;
    position: relative;
}

.footer a {
    color: #666666;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer a:hover {
    color: #000000;
    text-decoration: underline;
}

.footer a:visited {
    color: #666666;
}


/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--background-light);
    border-radius: var(--border-radius);
    padding: 24px;
    max-width: 400px;
    width: 100%;
    text-align: center;
}

.modal-content h3 {
    color: var(--accent-orange);
    margin-bottom: 12px;
}

.btn-primary {
    background: var(--primary-teal);
    color: var(--text-light);
    border: none;
    padding: 12px 24px;
    border-radius: 6px;
    font-size: 1rem;
    cursor: pointer;
    margin-top: 16px;
    transition: background 0.3s ease;
}

.btn-primary:hover {
    background: var(--primary-teal-dark);
}

/* Responsive Design */
@media (max-width: 480px) {
    .container {
        padding: 16px;
    }
    
    .site-title {
        font-size: 1.75rem;
    }
    
    .link-card a {
        padding: 16px;
        min-height: 72px;
    }
    
    .link-icon {
        font-size: 1.75rem;
        width: 44px;
        margin-right: 12px;
    }
    
    .link-title {
        font-size: 1rem;
    }
    
    .link-description {
        font-size: 0.8rem;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Dark mode support - Automatisch aktiviert bei System-Einstellung */
@media (prefers-color-scheme: dark) {
    :root {
        /* Hintergründe für Dark Mode */
        --background-light: #1a1a1a;
        --background-gray: #2d2d2d;
        
        /* Text-Farben für Dark Mode */
        --text-dark: #f0f0f0;
        --text-gray: #b0b0b0;
        --text-light: #ffffff;
        
        /* Angepasste Akzentfarben für bessere Lesbarkeit im Dark Mode */
        --primary-teal: #5cc5c5;
        --primary-teal-dark: #4aa9a9;
        --accent-pink: #e16691;
        --accent-pink-dark: #c5577d;
        --accent-orange: #ff9d4e;
        --accent-orange-dark: #e8883a;
        
        /* Schatten für Dark Mode */
        --shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
        --shadow-hover: 0 8px 24px rgba(0, 0, 0, 0.4);
    }
    
    body {
        background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 100%);
    }
    
    /* Logo bleibt farbig im Dark Mode */
    .logo {
        filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
    }
    
    /* Link Cards im Dark Mode */
    .link-card {
        background: #242424;
        border: 1px solid #333333;
    }
    
    .link-card::before {
        background: linear-gradient(90deg, var(--accent-orange) 0%, var(--accent-pink) 100%);
        opacity: 0.8;
    }
    
    .link-card:hover {
        background: #2a2a2a;
        border-color: #444444;
    }
    
    /* Modal im Dark Mode */
    .modal {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .modal-content {
        background: #242424;
        color: var(--text-dark);
    }
    
    /* Error/Loading States im Dark Mode */
    .error-state {
        background: #242424;
        border: 1px solid #333333;
    }
    
    /* Footer Links im Dark Mode */
    .footer a {
        color: #999999;
    }
    
    .footer a:hover {
        color: var(--primary-teal);
    }
    
    .footer a:visited {
        color: #999999;
    }
    
    /* Social Icons im Dark Mode */
    .social-icon {
        background: #2a2a2a;
        border: 1px solid #333333;
    }
    
    .social-icon:hover {
        background: #333333;
        border-color: var(--primary-teal);
    }
    
    /* Button im Dark Mode */
    .btn-primary {
        background: var(--primary-teal);
        color: #1a1a1a;
    }
    
    .btn-primary:hover {
        background: var(--primary-teal-dark);
    }
    
    /* Section Headings im Dark Mode */
    .section-heading {
        color: var(--primary-teal);
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    }
}

/* Print styles */
@media print {
    body {
        background: white !important;
        color: black !important;
    }
    
    .container {
        max-width: none;
        margin: 0;
        padding: 20px;
    }
    
    .link-card {
        box-shadow: none !important;
        border: 1px solid #ddd;
        break-inside: avoid;
        margin-bottom: 10px;
    }
    
    .admin-link,
    .modal {
        display: none !important;
    }
}