﻿/* LINKTREE STYLE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

/* Remove default link styles and focus outlines that might cause unwanted visual effects */
a {
    -webkit-tap-highlight-color: transparent;
    text-decoration: none;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    line-height: 1.5;
    color: #ffffff;
    /* Updated gradient inspired by the reference image - warmer, more vibrant terracotta tones */
    background: linear-gradient(180deg, #D4825C 0%, #9B6B54 35%, #6B4F43 70%, #2A2A2A 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Subtle noise texture overlay for depth */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
    opacity: 0.03;
    pointer-events: none;
    z-index: 0;
}

.container {
    position: relative;
    z-index: 1;
}

.container {
    width: 100%;
    max-width: 680px;
    margin: 0 auto;
    padding: 20px 20px 40px;
    position: relative;
}

/* ===== TOP NAVIGATION (QR + LANGUAGE SWITCHER) ===== */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    gap: 10px;
}

.share-btn {
    padding: 6px 14px;
    background-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    font-family: inherit;
}

.share-btn:hover {
    background-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* ===== LANGUAGE SWITCHER ===== */
.language-switcher {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    align-items: center;
}

.language-switcher.main-page {
    margin-bottom: 0;
}

.lang-btn {
    padding: 6px 14px;
    background-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.lang-btn:hover {
    background-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.lang-btn.active {
    background-color: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    border-color: rgba(255, 255, 255, 0.4);
}

.hero {
    text-align: center;
    margin-bottom: 40px;
}

.profile-photo {
    width: 168px;
    height: 168px;
    margin: 0 auto 24px;
    border-radius: 50%;
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4), 0 4px 8px rgba(212, 130, 92, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 3px solid rgba(255, 255, 255, 0.2);
}

.profile-photo:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5), 0 6px 12px rgba(212, 130, 92, 0.3);
    border-color: rgba(255, 255, 255, 0.3);
}

.profile-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.profile-photo:hover img {
    transform: scale(1.05);
}

.name {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
}

.tagline {
    font-size: 17px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

.links {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-bottom: 48px;
}

/* Link Categories */
.link-category {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.category-title {
    font-size: 16px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.95);
    margin: 0 0 4px 0;
    padding: 0 8px;
    display: flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
}

.category-title i {
    font-size: 14px;
    opacity: 0.8;
}

.link-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 18px 24px;
    background-color: #ffffff;
    color: #1a1a1a;
    text-decoration: none;
    border-radius: 14px;
    font-size: 17px;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3), 0 2px 5px rgba(0, 0, 0, 0.2);
    min-height: 56px;
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

.link-button i {
    font-size: 20px;
    transition: transform 0.3s ease;
}

.link-button:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4), 0 5px 10px rgba(255, 255, 255, 0.1);
    background: linear-gradient(135deg, #ffffff 0%, #f0f8ff 100%);
}

.link-button:hover i {
    transform: scale(1.2) rotate(5deg);
}

.link-button:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.2);
}

.link-button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 3px;
}

/* Button styling for Save Contact */
button.link-button {
    border: none;
    cursor: pointer;
    width: 100%;
    text-align: left;
    font-family: inherit;
}

/* Copied state styling for phone and email links */
.link-button.copied,
.social-icons a.copied {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 255, 240, 0.95) 100%) !important;
    transform: translateY(-4px) scale(1.02) !important;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(76, 175, 80, 0.3) !important;
    animation: pulseSuccess 0.5s ease-out;
}

.link-button.copied i,
.social-icons a.copied i {
    color: #4CAF50;
    transform: scale(1.2) !important;
}

.link-button.copied span {
    color: #2E7D32;
    font-weight: 600;
}

/* Success pulse animation */
@keyframes pulseSuccess {
    0% {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 0 rgba(76, 175, 80, 0.7);
    }
    50% {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 25px rgba(76, 175, 80, 0.5);
    }
    100% {
        box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35), 0 0 20px rgba(76, 175, 80, 0.3);
    }
}

.footer {
    margin-top: 40px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 24px;
}

.social-icons a {
    color: rgba(255, 255, 255, 0.7);
    font-size: 24px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    text-decoration: none;
}

.social-icons a:hover {
    color: #ffffff;
    transform: translateY(-4px) scale(1.15);
    background-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.footer-legal {
    margin-top: 20px;
    text-align: center;
}

.footer-legal a {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 16px;
    display: inline-block;
    border-radius: 6px;
}

.footer-legal a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px) scale(1.05);
}

@media (max-width: 767px) {
    body {
        padding: 12px;
    }
    .container {
        padding: 16px 16px 30px;
    }
    .profile-photo {
        width: 144px;
        height: 144px;
        margin-bottom: 20px;
    }
    .name {
        font-size: 30px;
    }
    .tagline {
        font-size: 16px;
    }
    .links {
        gap: 12px;
    }
    .link-button {
        padding: 16px 20px;
        font-size: 16px;
        min-height: 52px;
    }
    .social-icons {
        gap: 20px;
    }
    .social-icons a {
        font-size: 22px;
        width: 40px;
        height: 40px;
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        padding: 30px 30px 50px;
    }
    .profile-photo {
        width: 180px;
        height: 180px;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 30px 40px 60px;
    }
    .profile-photo {
        width: 192px;
        height: 192px;
    }
    .name {
        font-size: 40px;
    }
    .tagline {
        font-size: 18px;
    }
}

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

/* Focus styles for accessibility - no left border */
.link-button:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2), 0 8px 24px rgba(0, 0, 0, 0.35);
}

.social-icons a:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.8);
    outline-offset: 3px;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.2);
}

.lang-btn:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

.back-link a:focus-visible,
.footer-legal a:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.9);
    outline-offset: 2px;
}

/* Remove default focus outline to prevent unwanted borders */
.link-button:focus,
.social-icons a:focus,
.lang-btn:focus,
.back-link a:focus,
.footer-legal a:focus {
    outline: none;
}

@media print {
    body {
        background: #ffffff;
        color: #000000;
    }
    .social-icons {
        display: none;
    }
    .link-button {
        border: 1px solid #000000;
        page-break-inside: avoid;
    }
}

/* ===== IMPRESSUM PAGE STYLES ===== */
.impressum-page {
    max-width: 800px;
    padding: 40px 20px;
}

.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.back-link a {
    color: rgba(255, 255, 255, 0.8);
    font-size: 15px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.back-link a:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.25);
    transform: translateX(-5px) scale(1.05);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.back-link i {
    font-size: 14px;
}

.impressum {
    background-color: rgba(255, 255, 255, 0.95);
    color: #1a1a1a;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    margin-bottom: 30px;
}

.impressum h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 30px;
    color: #1a1a1a;
}

.impressum h2 {
    font-size: 22px;
    font-weight: 600;
    margin-top: 30px;
    margin-bottom: 15px;
    color: #2d2d2d;
}

.impressum h3 {
    font-size: 18px;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 10px;
    color: #3d3d3d;
}

.impressum h4 {
    font-size: 16px;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 8px;
    color: #4d4d4d;
}

.impressum p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #2d2d2d;
}

.impressum ul {
    margin: 15px 0;
    padding-left: 25px;
}

.impressum li {
    margin-bottom: 8px;
    line-height: 1.6;
}

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

.impressum a:hover {
    color: #9B6B54;
    text-decoration: underline;
}

.impressum strong {
    color: #1a1a1a;
    font-weight: 600;
}

.impressum-page .footer-legal {
    text-align: center;
    margin-top: 0;
}

.impressum-page .footer-legal p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 13px;
    margin: 0;
}

@media (max-width: 767px) {
    .impressum-page {
        padding: 20px 16px;
    }
    
    .top-nav {
        flex-direction: row;
        align-items: center;
        gap: 10px;
    }
    
    .language-switcher {
        align-self: center;
    }
    
    .impressum {
        padding: 24px;
        border-radius: 12px;
    }
    
    .impressum h1 {
        font-size: 26px;
    }
    
    .impressum h2 {
        font-size: 20px;
    }
    
    .impressum h3 {
        font-size: 17px;
    }
}

/* ===== ALTERNATIVE GRADIENT BACKGROUNDS ===== */
/* Apply these classes to the body element to change the background gradient */

/* Cool Ocean Blue - Deep sea blues transitioning to midnight */
.gradient-ocean {
    background: linear-gradient(180deg, #4A90E2 0%, #2E5C8A 35%, #1A3A5C 70%, #0D1F33 100%) !important;
}

/* Sunset Purple - Vibrant purple to deep magenta */
.gradient-sunset {
    background: linear-gradient(180deg, #B565D8 0%, #8B4DAB 35%, #5D3370 70%, #2A1A3A 100%) !important;
}

/* Forest Green - Natural earthy greens */
.gradient-forest {
    background: linear-gradient(180deg, #6B9B7F 0%, #4A7A5E 35%, #2F5940 70%, #1A2F25 100%) !important;
}

/* Warm Amber - Golden orange tones */
.gradient-amber {
    background: linear-gradient(180deg, #E8A85D 0%, #C7894A 35%, #8B6234 70%, #3D2B1A 100%) !important;
}

/* Cool Slate - Professional gray-blue tones */
.gradient-slate {
    background: linear-gradient(180deg, #7A8B99 0%, #5A6B78 35%, #3D4A54 70%, #1F2933 100%) !important;
}

/* Berry Pink - Soft pink to deep rose */
.gradient-berry {
    background: linear-gradient(180deg, #E57B9E 0%, #C75B7F 35%, #8B3F57 70%, #3D1F2A 100%) !important;
}

/* Teal Dream - Modern teal gradient */
.gradient-teal {
    background: linear-gradient(180deg, #4ECDC4 0%, #3AA49D 35%, #287872 70%, #153D3A 100%) !important;
}

/* Fire Red - Bold red gradient */
.gradient-fire {
    background: linear-gradient(180deg, #E85D4A 0%, #C7442F 35%, #8B2F20 70%, #3D1A15 100%) !important;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Apply animations to elements */
.top-nav {
    animation: fadeInDown 0.6s ease-out;
}

.hero .profile-photo {
    animation: scaleIn 0.8s ease-out 0.2s backwards;
}

.hero .name {
    animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

.hero .tagline {
    animation: fadeInUp 0.6s ease-out 0.5s backwards;
}

.hero .qr-title {
    animation: fadeInUp 0.8s ease-out 0.2s backwards;
}

.hero .qr-subtitle {
    animation: fadeInUp 0.6s ease-out 0.4s backwards;
}

/* Animate category titles */
.link-category .category-title {
    animation: fadeInUp 0.5s ease-out backwards;
}

.link-category:nth-child(1) .category-title { animation-delay: 0.6s; }
.link-category:nth-child(2) .category-title { animation-delay: 0.85s; }
.link-category:nth-child(3) .category-title { animation-delay: 1.05s; }

/* Animate link buttons within categories */
.link-category .link-button {
    animation: fadeInUp 0.5s ease-out backwards;
}

/* Category 1 (Professional) - 3 links */
.link-category:nth-child(1) .link-button:nth-child(2) { animation-delay: 0.65s; }
.link-category:nth-child(1) .link-button:nth-child(3) { animation-delay: 0.7s; }
.link-category:nth-child(1) .link-button:nth-child(4) { animation-delay: 0.75s; }

/* Category 2 (Get in Touch) - 3 links */
.link-category:nth-child(2) .link-button:nth-child(2) { animation-delay: 0.9s; }
.link-category:nth-child(2) .link-button:nth-child(3) { animation-delay: 0.95s; }
.link-category:nth-child(2) .link-button:nth-child(4) { animation-delay: 1.0s; }

/* Category 3 (More) - 2 links */
.link-category:nth-child(3) .link-button:nth-child(2) { animation-delay: 1.1s; }
.link-category:nth-child(3) .link-button:nth-child(3) { animation-delay: 1.15s; }

.qr-container .qr-code-wrapper {
    animation: scaleIn 0.8s ease-out 0.4s backwards;
}

.qr-container .qr-instructions {
    animation: fadeInUp 0.6s ease-out 0.6s backwards;
}

.qr-container .back-button {
    animation: fadeInUp 0.6s ease-out 0.7s backwards;
}

.footer {
    animation: fadeIn 0.8s ease-out 1s backwards;
}

/* Disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    .top-nav,
    .hero .profile-photo,
    .hero .name,
    .hero .tagline,
    .hero .qr-title,
    .hero .qr-subtitle,
    .links .link-button,
    .qr-container .qr-code-wrapper,
    .qr-container .qr-instructions,
    .qr-container .back-button,
    .footer {
        animation: none !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== COOKIE CONSENT BANNER ===== */
/* Reserve space for cookie banner to prevent layout shift */
html.cookie-banner-space body {
    padding-bottom: 200px;
}

.cookie-consent {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(26, 26, 26, 0.98);
    backdrop-filter: blur(10px);
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 40vh;
    overflow-y: auto;
    pointer-events: auto;
}

.cookie-consent.show {
    transform: translateY(0);
}

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 280px;
    color: #ffffff;
    font-size: 14px;
    line-height: 1.6;
}

.cookie-consent-text p {
    margin: 0 0 8px 0;
}

.cookie-consent-text a {
    color: #D4825C;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-consent-text a:hover {
    color: #E89B7A;
}

.cookie-consent-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 10px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    user-select: none;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #D4825C 0%, #9B6B54 100%);
    color: #ffffff;
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #E89B7A 0%, #B08068 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 130, 92, 0.4);
}

.cookie-btn-decline {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-decline:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.3);
}

@media (max-width: 768px) {
    html.cookie-banner-space body {
        padding-bottom: 280px;
    }
    
    .cookie-consent {
        padding: 16px;
        max-height: 50vh;
    }
    
    .cookie-consent-content {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
    }
    
    .cookie-consent-text {
        min-width: 100%;
        font-size: 13px;
    }
    
    .cookie-consent-buttons {
        width: 100%;
        flex-direction: column;
        gap: 10px;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 12px 20px;
        font-size: 15px;
    }
}

/* Ensure body remains scrollable when banner is visible */
body {
    overflow-x: hidden;
    overflow-y: auto;
}

/* ===== CLICKABLE IMAGE & IMAGE MODAL ===== */
.clickable-image {
    cursor: pointer;
    position: relative;
    transition: transform 0.3s ease;
}

.clickable-image:hover {
    transform: scale(1.05);
}

.clickable-image .image-overlay {
    display: none;
}

/* Image Modal */
.image-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0);
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    padding: 20px;
}

.image-modal.active {
    background-color: rgba(0, 0, 0, 0.9);
}

.modal-content {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: 12px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.image-modal.active .modal-content {
    opacity: 1;
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #ffffff;
    font-size: 50px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.2s ease;
    line-height: 1;
    z-index: 10000;
}

.modal-close:hover,
.modal-close:focus {
    color: #bbb;
    transform: scale(1.1);
}

.modal-caption {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
    padding: 10px 20px;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 8px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transition: opacity 0.3s ease 0.2s;
}

.image-modal.active .modal-caption {
    opacity: 1;
}

/* Mobile adjustments for modal */
@media (max-width: 768px) {
    .modal-close {
        top: 10px;
        right: 15px;
        font-size: 40px;
        /* Larger touch target for mobile */
        padding: 10px;
        min-width: 44px;
        min-height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .modal-content {
        max-width: 95%;
        max-height: 85vh;
        /* Prevent user zoom/selection on mobile */
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
    
    .modal-caption {
        font-size: 16px;
        bottom: 20px;
        max-width: 90%;
        /* Prevent selection on mobile */
        user-select: none;
        -webkit-user-select: none;
    }
    
    .image-modal {
        /* Ensure modal covers full viewport on mobile */
        position: fixed;
        touch-action: none;
    }
    
    .clickable-image .image-overlay i {
        font-size: 30px;
    }
}

