/* --- Clients Section --- */
#clients {
    background: var(--color-primary);
    min-height: 40vh;
    width: 100%;
    box-shadow: 0 -30px 60px rgba(0,0,0,0.4);
    border-top: 1.5px solid rgba(255,255,255,0.08);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 4rem 0 2.5rem 0;
    margin: 0;
}

#clients .content-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
    text-align: center;
}

#clients h2 {
    color: var(--color-text);
    font-size: 2.2rem;
    margin-bottom: 2rem;
    letter-spacing: 0.5px;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.clients-logos {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    justify-content: center;
    align-items: center;
    margin-bottom: 1.5rem;
}

.clients-logos img {
    height: 48px;
    max-width: 120px;
    filter: brightness(0) invert(0.85);
    opacity: 0.85;
    transition: filter 0.2s, opacity 0.2s, transform 0.2s;
    margin: 0 0.5rem;
}
.clients-logos img:hover {
    opacity: 1;
    transform: scale(1.08);
    filter: brightness(1.1) drop-shadow(0 2px 8px #8888);
}

#clients .clients-desc {
    color: var(--color-hover);
    font-size: 1.05rem;
    margin-top: 1.5rem;
    margin-bottom: 0;
}

@media (max-width: 700px) {
    #clients .clients-logos {
        gap: 1.2rem;
    }
    #clients h2 {
        font-size: 1.3rem;
    }
}

/* --- Footer Section --- */
footer {
    background: var(--color-secondary);
    color: var(--color-text);
    padding: 2.5rem 0 1.5rem 0;
    margin-top: 0;
    width: 100%;
    border-top: 1.5px solid rgba(255,255,255,0.08);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.5);
}

/* Mobile Footer */
@media (max-width: 768px) {
    footer {
        padding: 2rem 0 1rem 0;
    }
}

footer .content-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.2rem;
    padding: 0 1.5rem;
}

footer .footer-title {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-text);
}

footer nav {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

/* Mobile Footer Navigation */
@media (max-width: 768px) {
    footer nav {
        gap: 1rem;
    }
    
    footer nav a {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }
}

@media (max-width: 480px) {
    footer nav {
        gap: 0.8rem;
        flex-direction: column;
        align-items: center;
    }
    
    footer nav a {
        width: 100%;
        max-width: 200px;
        text-align: center;
    }
}

footer nav a {
    color: var(--color-text);
    text-decoration: none;
    font-size: 0.98rem;
    opacity: 0.85;
    transition: color 0.2s, opacity 0.2s, text-shadow 0.2s;
    padding: 0.2rem 0.3rem;
    border-radius: 4px;
}
footer nav a:hover {
    color: var(--color-hover);
    opacity: 1;
    background: var(--color-primary);
    text-shadow: 0 2px 8px #8888;
}

footer .footer-copy {
    font-size: 0.93rem;
    opacity: 0.6;
    margin-top: 0.5rem;
}

@media (max-width: 700px) {
    footer .content-container {
        gap: 0.7rem;
    }
    footer nav {
        gap: 0.7rem;
    }
}
:root {
    --color-bg: #1a1a1a;
    --color-text: #f5f5f5;
    --color-primary: #333333;
    --color-secondary: #4a4a4a;
    --color-accent: #666666;
    --color-hover: #888888;
    
    /* Einheitliche Blautöne */
    --color-blue-primary: #2563eb;
    --color-blue-dark: #1e3a8a;
    --color-blue-light: #60a5fa;
    --color-blue-border: #2563eb;
    --color-blue-shadow: rgba(37, 99, 235, 0.3);
    
    /* Einheitliche Orangetöne */
    --color-orange-primary: #FF9800;
    --color-orange-shadow: rgba(255, 152, 0, 0.3);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--color-bg);
    color: var(--color-text);
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    cursor: none !important; /* Force cursor hiding */
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5); /* Reduced drop shadow for all text */
}

/* Mobile Body - Enable touch scrolling and default cursor */
@media (max-width: 768px) {
    body {
        cursor: auto !important;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Disable custom cursor on mobile */
    .custom-cursor,
    .blur-mask {
        display: none !important;
    }
    
    /* Enable default cursor on all elements for mobile */
    * {
        cursor: auto !important;
    }
}

canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    object-fit: cover; /* Prevents stretching/squashing */
}

/* Mobile Canvas - Reduce resource usage */
@media (max-width: 768px) {
    canvas {
        /* Canvas will be handled by JavaScript for performance */
        opacity: 0.7; /* Slightly reduced visibility to improve readability */
        width: 100vw;
        height: 100vh;
    }
}

/* Apple-style navigation */
nav {
    position: fixed;
    width: 95%; /* Make nav bar take 95% of viewport width */
    max-width: 1600px; /* Cap width at 1600px, same as other containers */
    padding: 0.7rem 2rem; /* Wider padding */
    background: rgba(40, 40, 40, 0.253); /* More transparent background */
    border: none;
    z-index: 1000;
    backdrop-filter: blur(5px); /* More intense blur */
    border-radius: 30px;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Mobile Navigation */
@media (max-width: 768px) {
    nav {
        width: 92%;
        padding: 0.6rem 1rem;
        border-radius: 20px;
        top: 10px;
    }
    
    nav h1 {
        font-size: 1.1rem;
    }
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 3rem; /* Increased from 2rem for more spacing */
    width: 100%; /* Make nav-content take full width of parent nav's content box */
    /* max-width: 1200px; /* Removed to allow content to span wider */
    /* margin: 0 auto; /* Removed to allow content to span wider */
}

/* Mobile Navigation Content */
@media (max-width: 768px) {
    .nav-content {
        gap: 1rem;
        flex-direction: column;
        align-items: stretch;
    }
}

.nav-buttons {
    display: flex;
    gap: 2.5rem; /* Increased back to 2.5rem for more spacing */
}

/* Mobile Navigation Buttons */
@media (max-width: 768px) {
    .nav-buttons {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
}

.nav-buttons button {
    padding: 0.8rem 1.5rem;
    background: var(--color-primary);
    color: var(--color-text);
    border: none; /* Removed blue border */
    border-radius: 25px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Mobile Navigation Buttons */
@media (max-width: 768px) {
    .nav-buttons button {
        padding: 0.7rem 1rem;
        font-size: 0.9rem;
        text-align: center;
    }
}

.nav-buttons button:hover {
    background: var(--color-hover); /* Changed back to original hover color */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); /* Changed back to original shadow */
}

.nav-buttons button:active {
    transform: translateY(0);
}

nav ul {
    display: flex;
    list-style: none;
    gap: 2rem;
}

/* Mobile Navigation Links */
@media (max-width: 768px) {
    nav ul {
        flex-direction: column;
        gap: 0.5rem;
        width: 100%;
    }
}

nav a {
    color: white;
    text-decoration: none;
    font-size: 1rem; /* Slightly smaller font */
    position: relative; /* Added for hover effect positioning */
    padding: 0.5rem 0; /* Added padding for hover effect */
    transition: all 0.3s ease; /* Smooth transition for hover effects */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); /* Smaller shadow for navigation */
}

/* Mobile Navigation Links */
@media (max-width: 768px) {
    nav a {
        font-size: 0.9rem;
        text-align: center;
        display: block;
        padding: 0.6rem 1rem;
        background: rgba(255, 255, 255, 0.05);
        border-radius: 15px;
    }
    
    nav a:hover {
        background: rgba(255, 255, 255, 0.1);
    }
}

/* Hover animation for navigation links */
nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: white;
    transition: width 0.3s ease;
}

nav a:hover {
    color: #a3a3a3; /* Subtle color change on hover */
    transform: translateY(-2px); /* Slight upward movement */
}

nav a:hover::after {
    width: 100%; /* Expand underline on hover */
}

nav h1 {
    font-size: 1.5rem; /* Increased from 1.2rem */
    font-weight: 600;
}

main {
    position: relative;
    z-index: 1;
}

section {
    min-height: 100vh;
    padding: 6rem 2rem 2rem 2rem;  /* Increased top padding to account for nav */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Mobile Sections */
@media (max-width: 768px) {
    section {
        padding: 5rem 1rem 2rem 1rem;
        min-height: auto;
    }
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1600px; /* Updated for consistency */
    width: 95%; /* Updated for consistency */
    padding: 2rem;
    margin: 0 auto;
    justify-content: center;
}

.project-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    padding: 2rem;
    max-width: 1600px; /* Updated for consistency */
    width: 95%; /* Updated for consistency */
    margin: 0 auto;
}

.project-card {
    background: var(--color-primary);
    border-radius: 12px;
    border: none; /* Removed blue border */
    overflow: hidden;
    text-decoration: none;
    color: var(--color-text);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: none;
    width: 100%;
    margin: 0 auto;
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 10px rgba(0, 0, 0, 0.2); /* Changed back to original shadow */
}

.project-image {
    width: 100%;
    height: 250px;
    overflow: hidden;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-info {
    padding: 1.5rem;
}

.project-info h3 {
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.project-info p {
    color: var(--color-text);
    opacity: 0.8;
}

@media (max-width: 900px) {
    .project-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

.contact-container {
    width: 100%;
    max-width: 600px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--color-primary);
    border-radius: 8px;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    max-width: 500px;
    width: 100%;
}

.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
}

input, textarea {
    width: 100%;
    padding: 0.8rem;
    background: var(--color-secondary);
    border: 1px solid var(--color-accent); /* Changed back to original border */
    color: var(--color-text);
    border-radius: 4px;
}

input:focus, textarea:focus {
    outline: none;
    border-color: var(--color-accent); /* Changed back to original focus color */
    box-shadow: none; /* Removed blue focus shadow */
}

button {
    padding: 0.5rem 1rem;
    background: var(--color-accent);
    color: var(--color-text);
    border: none; /* Removed blue border */
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    cursor: none;
}

/* Mobile Buttons - Better touch targets */
@media (max-width: 768px) {
    button {
        cursor: pointer;
        min-height: 44px; /* iOS recommended minimum touch target */
        padding: 0.8rem 1.5rem;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
}

button:hover {
    background: var(--color-hover); /* Changed back to original hover color */
    border-color: var(--color-blue-border);
}

.hero-container {
    display: flex;
    justify-content: center; /* Changed from flex-end to center */
    align-items: center;
    padding: 4rem 2rem 2rem 2rem;  /* Add padding to prevent overlap with nav */
    max-width: 100%; /* Allow container to use full width */
    margin: 0 auto; /* Center horizontally and remove right margin */
    position: relative;
    height: 80vh; /* Make container taller to center content vertically */
}

/* Mobile Hero Container */
@media (max-width: 768px) {
    .hero-container {
        padding: 2rem 1rem;
        height: auto;
        min-height: 60vh;
    }
}

.hero-image {
    position: absolute;
    left: -65%; /* Changed from -20% to -30% to move image even further left */
    top: 50%;
    transform: translateY(-50%);
    width: 800px;  /* Increased from 600px to 700px */
    height: 800px; /* Increased from 600px to 700px */
    z-index: 2;
}

.hero-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.hero-content {
    padding: 3rem;
    position: relative;
    z-index: 1;
    max-width: 1000px; /* Increased from 800px to make text wider */
    margin: 0 auto; /* Center horizontally */
    text-align: center; /* Changed from right to center */
    /* Remove the background container styling */
    background-color: transparent; /* Changed from rgba(26, 26, 26, 0.5) to transparent */
    backdrop-filter: none; /* Removed blur effect */
    border-radius: 0; /* Removed rounded corners */
    border: none; /* Removed border */
    /* Fade in with blur animation */
    animation: heroFadeInBlur 2s ease-out forwards;
    opacity: 0;
}

/* Fade in with blur effect keyframes */
@keyframes heroFadeInBlur {
    0% {
        opacity: 0;
        filter: blur(20px);
        transform: translateY(30px);
    }
    50% {
        opacity: 0.5;
        filter: blur(10px);
    }
    100% {
        opacity: 1;
        filter: blur(0);
        transform: translateY(0);
    }
}

/* Mobile Hero Content */
@media (max-width: 768px) {
    .hero-content {
        padding: 1.5rem;
    }
}

.hero-content h2 {
    font-size: 4.5rem; /* Slightly larger font */
    margin-bottom: 2rem;
    text-align: center; /* Changed from right to center */
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.7); /* Reduced shadow for main heading */
    animation: heroFadeInBlur 2.2s ease-out 0.3s forwards;
    opacity: 0;
}

/* Mobile Hero Heading */
@media (max-width: 768px) {
    .hero-content h2 {
        font-size: 2.5rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-content h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
}

.hero-text {
    font-size: 1.7rem; /* Slightly larger font */
    line-height: 1.8;
    color: var(--color-text);
    opacity: 0.9;
    text-align: center; /* Changed from right to center */
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); /* Smaller shadow for hero text */
    animation: heroFadeInBlur 2.2s ease-out 0.6s forwards;
    opacity: 0;
}

/* Mobile Hero Text */
@media (max-width: 768px) {
    .hero-text {
        font-size: 1.1rem;
        line-height: 1.6;
    }
}

@media (max-width: 480px) {
    .hero-text {
        font-size: 1rem;
        line-height: 1.5;
    }
}

.spacer {
    height: 100px;
    width: 100%;
}

/* Projects section styling */
.projects-background {
    background-color: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 4rem 4rem;
    max-width: 1600px;
    width: 95%;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.171); /* Changed back to original border */
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Mobile Projects Background */
@media (max-width: 768px) {
    .projects-background {
        padding: 2rem 1.5rem;
        width: 92%;
    }
}

@media (max-width: 480px) {
    .projects-background {
        padding: 1.5rem 1rem;
    }
}

.projects-background h2 {
    font-size: 2.7rem; /* Größer als vorher (2.2rem) */
    margin-bottom: 1.2rem; /* Weniger Abstand als vorher (2.5rem) */
    color: var(--color-text);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Mobile Projects Heading */
@media (max-width: 768px) {
    .projects-background h2 {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .projects-background h2 {
        font-size: 1.6rem;
    }
}

/* Spacer for showcasing 3D background */
.spacer-3d {
    height: 60vh; /* 60% of the viewport height */
    width: 100%;
    position: relative;
}

/* Mobile Spacer */
@media (max-width: 768px) {
    .spacer-3d {
        height: 30vh;
    }
}

.static-background {
    position: relative;
    padding-top: 4rem;
    background-color: #121212;
    min-height: 100vh;
    width: 100%;
    z-index: 10;
    box-shadow: 0 -50px 50px rgba(0, 0, 0, 0.5);
    
    margin-top: 0; /* Changed from 50px to 0 to avoid gaps */

    border-top: 1.5px solid rgba(255, 255, 255, 0.171); /* Changed back to original border */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* Mobile Static Background */
@media (max-width: 768px) {
    .static-background {
        padding-top: 2rem;
        min-height: auto;
    }
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;
    text-align: center;
}

/* Mobile Content Container */
@media (max-width: 768px) {
    .content-container {
        padding: 2rem 1rem;
    }
}

.static-background h2 {
    font-size: 3rem;
    margin-bottom: 2rem;
    color: var(--color-text);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Mobile Static Background Heading */
@media (max-width: 768px) {
    .static-background h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .static-background h2 {
        font-size: 1.6rem;
        margin-bottom: 1rem;
    }
}

.static-background p { /* This will be overridden by .about-me-text-container p for specificity */
    font-size: 1.2rem;
    line-height: 1.6;
    color: var(--color-text);
    opacity: 0.9;
    max-width: 800px;
    margin: 0 auto;
}

/* About Me Section Specific Styles */
.about-me-section .content-container {
    text-align: left; /* Align text to the left for the about me section */
    max-width: 1600px; /* Match navigation bar width */
    width: 95%; /* Ensure it takes up more viewport width */
    background-color: rgba(35, 35, 35, 0.9); /* Lighter gray with more opacity for better contrast */
    backdrop-filter: blur(10px); /* Add blur effect */
    border-radius: 20px; /* Rounded corners */
    padding: 3rem; /* Add padding for better spacing */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); /* Subtle shadow */
    border: 1px solid rgba(255, 255, 255, 0.1); /* Subtle border */
    margin-bottom: 7rem; /* Abstand nach unten, damit Instagram-Feed nicht mit dem unteren Div kollidiert */
}

/* Mobile About Me Section */
@media (max-width: 768px) {
    .about-me-section .content-container {
        padding: 2rem 1.5rem;
        margin-bottom: 4rem;
        width: 92%;
    }
}

@media (max-width: 480px) {
    .about-me-section .content-container {
        padding: 1.5rem 1rem;
        margin-bottom: 3rem;
    }
}

.about-me-content {
    display: flex;
    align-items: center;
    gap: 4rem; /* Increased gap for better spacing with wider container */
    margin-top: 2rem;
    max-width: 1400px; /* Increased from 1200px to utilize more space */
    margin-left: auto; /* Center the content block */
    margin-right: auto; /* Center the content block */
}

/* Mobile About Me Content */
@media (max-width: 768px) {
    .about-me-content {
        flex-direction: column;
        gap: 2rem;
        margin-top: 1.5rem;
        text-align: center;
    }
}

.profile-picture-container {
    flex-shrink: 0; /* Prevent image from shrinking */
}

.profile-picture {
    width: 200px; /* Adjust size as needed */
    height: 200px; /* Adjust size as needed */
    border-radius: 50%; /* Makes the image round */
    object-fit: cover; /* Ensures the image covers the area without distortion */
    border: 3px solid var(--color-blue-border);
    box-shadow: 0 5px 15px var(--color-blue-shadow);
}

/* Mobile Profile Picture */
@media (max-width: 768px) {
    .profile-picture {
        width: 150px;
        height: 150px;
    }
}

@media (max-width: 480px) {
    .profile-picture {
        width: 120px;
        height: 120px;
    }
}

.about-me-text-container p {
    font-size: 1.2rem; /* Adjust as needed */
    line-height: 1.7;
    color: var(--color-text);
    opacity: 0.9;
    text-align: left;
    margin-bottom: 1.5rem; /* Add some space before social icons */
}

/* Mobile About Me Text */
@media (max-width: 768px) {
    .about-me-text-container p {
        font-size: 1rem;
        line-height: 1.6;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .about-me-text-container p {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

.social-media-links {
    display: flex;
    gap: 1.5rem; /* Space between icons */
    margin-top: 1rem; /* Space above the icons if text is short */
}

/* Mobile Social Media Links */
@media (max-width: 768px) {
    .social-media-links {
        justify-content: center;
        gap: 1.2rem;
    }
}

.social-link {
    display: flex; /* Use flex to center the icon inside */
    align-items: center;
    justify-content: center;
    width: 48px; /* Define width for the circular link */
    height: 48px; /* Define height for the circular link */
    background-color: #fff; /* White background for the circle */
    border-radius: 50%; /* Makes the link round */
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    color: #1a1a1a; /* Icon color - dark to contrast with white background */
}

.social-link:hover {
    transform: scale(1.15); /* Slight zoom on hover */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    color: #000; /* Darker icon color on hover */
}

.social-icon {
    font-size: 24px; /* Adjust Font Awesome icon size */
    /* width and height are not needed for font icons */
}


/* Responsive adjustments for About Me section */
@media (max-width: 768px) {
    .about-me-content {
        flex-direction: column; /* Stack image and text vertically */
        text-align: center; /* Center text when stacked */
        gap: 2rem;
    }

    .profile-picture-container {
        margin-bottom: 1rem;
    }

    .profile-picture {
        width: 150px;
        height: 150px;
    }

    .about-me-text-container p {
        text-align: center; /* Center text when stacked */
    }

    .social-media-links {
        justify-content: center; /* Center icons when stacked */
    }
}

/* Instagram Section Styling */
#instagram-section {
    padding: 0 0rem 0rem 0rem; /* Removed top padding to eliminate gap */
    min-height: auto;
    background: transparent !important; /* Transparent background */
    position: relative;
    z-index: 30; /* Überlappt das About-Me-Div */
    margin-top: -2rem; /* Kein negativer Margin mehr */
    margin-bottom: 3rem;
    display: flex;
    align-items: center; /* Vertikal zentrieren */
    justify-content: center; /* Horizontal zentrieren */
    pointer-events: auto;
}

/* Mobile Instagram Section */
@media (max-width: 768px) {
    #instagram-section {
        margin-bottom: 2rem;
        padding: 0;
    }
}

#instagram-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--color-bg); /* Transparent background */
    z-index: -1;
}

#instagram-section .content-container {
    max-width: 1300px;
    width: 95%;
    background: rgba(15, 15, 15, 0.95); /* Darker gray for strong contrast with About Me section */
    backdrop-filter: blur(15px); /* Stronger blur */
    border-radius: 20px;
    padding: 0rem 3rem 3rem 3rem; /* Further reduced top padding */
    margin-top: -50px;
    margin-bottom: -50px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.5); /* Noch stärkerer Schatten für Floating-Effekt */
    border: 1px solid rgba(255, 255, 255, 0.05); /* More subtle border */
    position: relative;
    z-index: 1;
}

/* Mobile Instagram Content Container */
@media (max-width: 768px) {
    #instagram-section .content-container {
        width: 92%;
        padding: 0rem 1.5rem 2rem 1.5rem;
        margin-top: -30px;
        margin-bottom: -30px;
    }
}

@media (max-width: 480px) {
    #instagram-section .content-container {
        padding: 0rem 1rem 1.5rem 1rem;
        margin-top: -20px;
        margin-bottom: -20px;
    }
}

#instagram-section h2 {
    text-align: center;
    margin-bottom: 2.5rem; /* Increased margin for better spacing */
    margin-top: 2rem; /* Added top margin to center the text vertically */
    font-size: 2.2rem; /* Slightly smaller font */
    color: white;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Mobile Instagram Heading */
@media (max-width: 768px) {
    #instagram-section h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
        margin-top: 1.5rem;
    }
}

@media (max-width: 480px) {
    #instagram-section h2 {
        font-size: 1.4rem;
        margin-bottom: 1.2rem;
        margin-top: 1.2rem;
    }
}

.instagram-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

.instagram-feed {
    max-width: 900px; /* Breiter gemacht */
    width: 100%;
    margin: 0 auto;
    background: rgba(25, 25, 25, 0.8); /* Medium gray for layered contrast */
    border-radius: 15px;
    padding: 1.5rem; /* Reduced padding to make it more compact */
    border: 1px solid rgba(255, 255, 255, 0.08); /* Subtle border */
}

/* Mobile Instagram Feed */
@media (max-width: 768px) {
    .instagram-feed {
        padding: 1.2rem;
        border-radius: 12px;
    }
}

@media (max-width: 480px) {
    .instagram-feed {
        padding: 1rem;
        border-radius: 10px;
    }
}

.instagram-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem; /* Reduced margin */
    padding-bottom: 0.8rem; /* Reduced padding */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Mobile Instagram Header */
@media (max-width: 768px) {
    .instagram-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        margin-bottom: 1.2rem;
    }
}

.instagram-profile {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-pic-placeholder {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-blue-primary);
    border: 2px solid #fff;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.instagram-profile-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile-info h3 {
    color: var(--color-text);
    margin: 0;
    font-size: 1.4rem;
}

.profile-info p {
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-size: 0.9rem;
}

/* Mobile Instagram Profile Info */
@media (max-width: 768px) {
    .profile-info h3 {
        font-size: 1.2rem;
    }
    
    .profile-info p {
        font-size: 0.85rem;
    }
}

.follow-btn {
    background: var(--color-blue-primary);
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: none;
}

/* Mobile Follow Button */
@media (max-width: 768px) {
    .follow-btn {
        cursor: pointer;
        padding: 0.9rem 1.8rem;
        font-size: 1rem;
        display: inline-block;
        -webkit-tap-highlight-color: rgba(30, 58, 138, 0.2);
    }
}

.follow-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px var(--color-blue-shadow);
}

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

/* Mobile Instagram Grid */
@media (max-width: 768px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.8rem;
    }
}

@media (max-width: 480px) {
    .instagram-grid {
        gap: 0.5rem;
    }
}

.instagram-post {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    position: relative;
    background: none; /* Kein Gradient mehr, nur noch Bild sichtbar */
    border: 1px solid var(--color-blue-shadow);
}

.instagram-post:hover {
    transform: scale(1.05);
}

.post-image {
    width: 100%;
    height: 100%;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Real Instagram Posts with Images */
.real-post .post-image {
    background: none;
}

.real-post .post-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
    transition: opacity 0.3s ease;
}

.real-post .post-image .hover-image {
    opacity: 0;
}

.real-post:hover .post-image .main-image {
    opacity: 0;
}

.real-post:hover .post-image .hover-image {
    opacity: 1;
}

.post-overlay {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: var(--color-blue-primary);
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.instagram-post:hover .post-overlay {
    opacity: 1;
}

.post-overlay i {
    font-size: 2rem;
    color: white;
}

.instagram-post-placeholder {
    aspect-ratio: 1;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.3s ease;
    background: none; /* Kein Gradient mehr für Platzhalter */
    border: 1px solid var(--color-blue-shadow);
}

.instagram-post-placeholder:hover {
    transform: scale(1.05);
}

.post-image-placeholder {
    width: 100%;
    height: 100%;
    background: transparent; /* Remove background to show gradient from parent */
    border: none;
    border-radius: 8px;
    position: relative;
}


/* Responsive adjustments for Instagram section */
@media (max-width: 768px) {
    #instagram-section h2 {
        font-size: 2rem;
    }
    
    .instagram-feed {
        max-width: 100%;
        padding: 1.5rem;
    }
    
    .instagram-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }
}

/* Custom Cursor Styles */
.custom-cursor {
    width: 40px; /* Vergrößerter Cursor */
    height: 40px;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    background-image: url('./Assets/cursor.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transform: translate(-50%, -50%);
}

.custom-cursor.cursor-hover {
    transform: translate(-50%, -50%) scale(1.5);
    transition: transform 0.2s ease;
}

/* Unschärfe-Effekt */
.custom-cursor::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80px; /* Größerer Radius für den Unschärfe-Kreis */
    height: 80px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    filter: blur(15px); /* Unschärfe */
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.custom-cursor.cursor-hover::after {
    opacity: 1; /* Zeige den Unschärfe-Effekt beim Hover */
}

/* Hide default cursor */
* {
    cursor: none !important;
}

/* Glow-Maske */
.blur-mask {
    position: fixed;
    width: 150px; /* Größe bleibt, falls später benötigt */
    height: 150px;
    pointer-events: none;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    background: none; /* Kein Hintergrund mehr */
    z-index: 9998; /* Unter dem Cursor, aber über den Inhalten */
    opacity: 0; /* Unsichtbar */
    transition: none; /* Keine Übergänge mehr */
}

/* RGB-Split-Effekt */
.rgb-split {
    position: relative;
    filter: none;
    transition: filter 0.2s ease, transform 0.2s ease;
}

.rgb-split::before,
.rgb-split::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: inherit;
    mix-blend-mode: screen;
    pointer-events: none;
    transition: transform 0.2s ease;
}

.rgb-split::before {
    filter: blur(2px) contrast(1.2) brightness(1.1) drop-shadow(0 0 5px red);
    transform: translate(-2px, 0);
}

.rgb-split::after {
    filter: blur(2px) contrast(1.2) brightness(1.1) drop-shadow(0 0 5px blue);
    transform: translate(2px, 0);
}

.rgb-split:hover {
    filter: brightness(1.2);
    transform: scale(1.02);
}

/* Animation Classes */
.hidden {
    opacity: 0;
    transition: all 1s;
}

.from-left {
    transform: translateX(-100%);
}

.from-bottom {
    transform: translateY(100px);
    opacity: 0;
}

.slide-in {
    opacity: 1;
    transform: translateX(0) translateY(0);
    transition: all 1s ease-out;
}

.slide-out {
    opacity: 0;
    transform: translateX(-100px);
}

.slide-out-bottom {
    opacity: 0;
    transform: translateY(100px);
}

/* Add a transition to hero elements for smooth animations */
.hero-content h2,
.hero-content p,
.project-card {
    transition: all 1s ease;
}

/* Side lines that extend to bottom */
.side-line {
    position: absolute;
    top: 100%;
    width: 2px;
    background: rgba(255, 255, 255, 0.2);
    height: 200vh; /* Make it extend much further down the page */
    z-index: -1;
}

.left-line {
    left: 20px; /* Position slightly inside from the edge of the container */
}

.right-line {
    right: 20px; /* Position slightly inside from the edge of the container */
}

/* Loading Screen */
#loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-bg);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out;
}

.loading-content {
    text-align: center;
}

.loading-content h1 {
    font-size: 3rem;
    margin-bottom: 2rem;
    letter-spacing: 0.2rem;
    color: var(--color-text);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Mobile Loading Screen */
@media (max-width: 768px) {
    .loading-content h1 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        letter-spacing: 0.1rem;
    }
}

@media (max-width: 480px) {
    .loading-content h1 {
        font-size: 1.5rem;
    }
}

.loading-bar {
    width: 300px;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 0 auto;
}

/* Mobile Loading Bar */
@media (max-width: 768px) {
    .loading-bar {
        width: 250px;
    }
}

@media (max-width: 480px) {
    .loading-bar {
        width: 200px;
    }
}

.loading-progress {
    height: 100%;
    width: 0;
    background-color: rgba(255, 255, 255, 0.7);
    transition: width 0.3s ease;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0% { opacity: 0.6; }
    50% { opacity: 1; }
    100% { opacity: 0.6; }
}

/* Showreel Section Styling */
#showreel {
    padding: 2rem 2rem 6rem 2rem;
    min-height: auto; /* Override the 100vh min-height from section */
}

/* Mobile Showreel Section */
@media (max-width: 768px) {
    #showreel {
        padding: 2rem 1rem 3rem 1rem;
    }
}

.showreel-container {
    background-color: rgba(26, 26, 26, 0.7);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    padding: 3rem;
    max-width: 1600px;
    width: 95%;
    margin: 0 auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    border: 1.5px solid rgba(255, 255, 255, 0.171); /* Changed back to original border */
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Mobile Showreel Container */
@media (max-width: 768px) {
    .showreel-container {
        padding: 2rem 1.5rem;
        width: 92%;
    }
}

@media (max-width: 480px) {
    .showreel-container {
        padding: 1.5rem 1rem;
    }
}

.showreel-container h2 {
    font-size: 2.5rem;
    margin-bottom: 2rem;
    text-align: center;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
}

/* Mobile Showreel Heading */
@media (max-width: 768px) {
    .showreel-container h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 480px) {
    .showreel-container h2 {
        font-size: 1.4rem;
        margin-bottom: 1rem;
    }
    
    .showreel-container h2 span {
        font-size: 0.9rem !important;
        display: block;
        margin-top: 0.5rem;
    }
}

.video-wrapper {
    width: 100%;
    max-width: 1000px;
    border-radius: 10px;
    border: none; /* Removed blue border */
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.4); /* Changed back to original shadow */
}

.video-wrapper video {
    width: 100%;
    height: auto;
    display: block;
    background-color: #000;
}

/* ============================================
   MOBILE OPTIMIZATIONS - GENERAL
   ============================================ */

/* Touch-friendly interactions */
@media (max-width: 768px) {
    /* Improve text readability */
    body {
        font-size: 16px; /* Prevent iOS zoom on input focus */
        -webkit-text-size-adjust: 100%;
    }
    
    /* Improve tap targets */
    a, button, .project-card, .instagram-post {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Disable hover effects on touch devices */
    .project-card:hover,
    .instagram-post:hover,
    button:hover,
    .follow-btn:hover {
        transform: none;
    }
    
    /* Enable active states for touch feedback */
    .project-card:active {
        transform: scale(0.98);
        opacity: 0.9;
    }
    
    button:active,
    .follow-btn:active {
        transform: scale(0.95);
    }
    
    /* Hide hero image on mobile if it exists */
    .hero-image {
        display: none;
    }
    
    /* Optimize skills grid for mobile */
    .skills-grid {
        gap: 1.5rem !important;
    }
    
    .skill-item {
        font-size: 0.9rem;
    }
    
    .skill-logo {
        height: 40px !important;
        width: 40px !important;
    }
    
    /* Optimize client logos */
    .clients-grid {
        gap: 1.5rem !important;
    }
    
    .client-item img {
        height: 120px !important;
        width: 120px !important;
    }
    
    /* Make skill badges stack nicely */
    .skill-badge {
        font-size: 0.85rem !important;
        padding: 0.6rem 1rem !important;
    }
}

/* Extra small devices (phones in portrait) */
@media (max-width: 480px) {
    .skills-grid {
        gap: 1rem !important;
    }
    
    .skill-logo {
        height: 36px !important;
        width: 36px !important;
    }
    
    .client-item img {
        height: 100px !important;
        width: 100px !important;
    }
    
    .skill-badge {
        font-size: 0.8rem !important;
        padding: 0.5rem 0.8rem !important;
    }
}

/* Performance optimizations for mobile */
@media (max-width: 768px) {
    /* Reduce blur effects for better performance */
    nav, .projects-background, .showreel-container,
    .about-me-section .content-container,
    #instagram-section .content-container {
        backdrop-filter: blur(3px);
    }
    
    /* Simplify animations */
    * {
        animation-duration: 0.3s !important;
        transition-duration: 0.2s !important;
    }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
    section {
        min-height: auto;
        padding: 3rem 1rem 1rem 1rem;
    }
    
    .hero-container {
        min-height: 50vh;
    }
    
    nav {
        padding: 0.5rem 1rem;
    }
}

/* ============================================
   DAILY RENDERS PAGE - MOBILE OPTIMIZATIONS
   ============================================ */

/* Statistics counters on mobile */
@media (max-width: 768px) {
    /* Statistics grid */
    div[style*="display: flex"][style*="gap: 3rem"] {
        gap: 2rem !important;
        padding: 0 1rem;
    }
    
    /* Counter numbers */
    .animated-counter,
    #days-counter,
    #years-counter {
        font-size: 2.5rem !important;
    }
    
    /* Counter labels */
    div[style*="text-transform: uppercase"] {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    /* Smaller statistics */
    div[style*="display: flex"][style*="gap: 3rem"] {
        gap: 1.5rem !important;
        flex-direction: row;
    }
    
    .animated-counter,
    #days-counter,
    #years-counter {
        font-size: 2rem !important;
        margin-bottom: 0.3rem !important;
    }
    
    div[style*="text-transform: uppercase"] {
        font-size: 0.75rem !important;
    }
}

/* Description text on mobile */
@media (max-width: 768px) {
    div[style*="max-width: 800px"] p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        padding: 0 1rem !important;
    }
}

@media (max-width: 480px) {
    div[style*="max-width: 800px"] p {
        font-size: 0.95rem !important;
    }
}

/* ============================================
   PROJECTS PAGE - MOBILE OPTIMIZATIONS
   ============================================ */

/* Page titles with inline styles */
@media (max-width: 768px) {
    h2[style*="font-size: 2.7rem"] {
        font-size: 2rem !important;
        margin-top: 3rem !important;
    }
}

@media (max-width: 480px) {
    h2[style*="font-size: 2.7rem"] {
        font-size: 1.6rem !important;
        margin-top: 2rem !important;
    }
}

/* ============================================
   YEAR GALLERY PAGES - MOBILE OPTIMIZATIONS
   ============================================ */

/* Gallery grid responsive */
@media (max-width: 768px) {
    div[style*="grid-template-columns: repeat(auto-fill, minmax(250px, 1fr))"] {
        grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
        gap: 15px !important;
        padding: 0 1rem !important;
    }
}

@media (max-width: 480px) {
    div[style*="grid-template-columns: repeat(auto-fill, minmax(250px, 1fr))"] {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)) !important;
        gap: 10px !important;
        padding: 0 0.5rem !important;
    }
}

/* Year stats counters */
@media (max-width: 768px) {
    div[style*="font-size: 2.5rem"][style*="font-weight: 700"] {
        font-size: 2rem !important;
    }
}

@media (max-width: 480px) {
    div[style*="font-size: 2.5rem"][style*="font-weight: 700"] {
        font-size: 1.6rem !important;
    }
}

/* Project links / Navigation buttons */
@media (max-width: 768px) {
    a.project-link,
    a[style*="padding: 12px 25px"] {
        padding: 10px 20px !important;
        font-size: 0.95rem !important;
        min-height: 44px;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
    }
    
    a.project-link:active,
    a[style*="padding: 12px 25px"]:active {
        transform: scale(0.97);
    }
}

@media (max-width: 480px) {
    a.project-link,
    a[style*="padding: 12px 25px"] {
        padding: 9px 18px !important;
        font-size: 0.9rem !important;
    }
    
    /* Stack navigation buttons */
    div[style*="display: flex"][style*="gap: 1rem"] {
        flex-direction: column;
        align-items: stretch;
        padding: 0 1rem;
    }
    
    a.project-link,
    a[style*="padding: 12px 25px"] {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }
}

/* Instagram and social buttons */
@media (max-width: 768px) {
    a[style*="background: linear-gradient(45deg, #E1306C, #C13584)"],
    a[style*="background: linear-gradient(45deg, #2196F3, #1976D2)"],
    a[style*="background: linear-gradient(45deg, #9C27B0, #7B1FA2)"] {
        cursor: pointer;
    }
}

/* ============================================
   IMPRESSUM PAGE - MOBILE OPTIMIZATIONS
   ============================================ */

@media (max-width: 768px) {
    /* Impressum container */
    section[style*="max-width: 900px"] {
        max-width: 95% !important;
        margin: 2rem auto !important;
        padding: 2rem 1.5rem !important;
        border-radius: 15px !important;
    }
    
    /* Impressum heading */
    section[style*="max-width: 900px"] h2 {
        font-size: 1.8rem !important;
        margin-bottom: 1.2rem !important;
    }
    
    /* Impressum text */
    section[style*="max-width: 900px"] div[style*="font-size: 1.08rem"] {
        font-size: 1rem !important;
        line-height: 1.7 !important;
    }
}

@media (max-width: 480px) {
    section[style*="max-width: 900px"] {
        padding: 1.5rem 1rem !important;
        margin: 1.5rem auto !important;
    }
    
    section[style*="max-width: 900px"] h2 {
        font-size: 1.5rem !important;
    }
    
    section[style*="max-width: 900px"] div[style*="font-size: 1.08rem"] {
        font-size: 0.95rem !important;
        line-height: 1.6 !important;
    }
    
    /* Make links more readable */
    section[style*="max-width: 900px"] a {
        word-break: break-word;
    }
}

/* ============================================
   GENERAL SUBPAGE OPTIMIZATIONS
   ============================================ */

/* Apple divider on mobile */
@media (max-width: 768px) {
    .apple-divider {
        height: 1px;
        opacity: 0.5;
    }
}

/* Footer with inline styles on all pages */
@media (max-width: 768px) {
    footer[style*="padding:2.5rem"] {
        padding: 2rem 0 1rem 0 !important;
    }
    
    footer div[style*="font-size:1.3rem"] {
        font-size: 1.1rem !important;
    }
    
    footer div[style*="display:flex"][style*="gap:1.5rem"] {
        gap: 1rem !important;
    }
    
    footer a[style*="font-size:0.98rem"] {
        font-size: 0.9rem !important;
    }
    
    footer div[style*="font-size:0.93rem"] {
        font-size: 0.85rem !important;
    }
}

@media (max-width: 480px) {
    footer div[style*="display:flex"][style*="gap:1.5rem"] {
        gap: 0.8rem !important;
        flex-direction: column;
        align-items: center;
    }
    
    footer a {
        width: 100%;
        max-width: 200px;
        text-align: center;
        padding: 0.4rem 0.8rem;
    }
}

/* ============================================
   PROJECT DETAIL PAGES OPTIMIZATIONS
   ============================================ */

/* Image galleries in project detail pages */
@media (max-width: 768px) {
    .gallery-image,
    img[style*="width: 100%"] {
        border-radius: 10px !important;
    }
    
    /* Video embeds */
    iframe,
    video {
        max-width: 100%;
        height: auto !important;
    }
}

/* Project descriptions */
@media (max-width: 768px) {
    p[style*="font-size: 1.2rem"],
    p[style*="font-size: 1.1rem"] {
        font-size: 1rem !important;
        line-height: 1.6 !important;
        padding: 0 1rem;
    }
}

@media (max-width: 480px) {
    p[style*="font-size: 1.2rem"],
    p[style*="font-size: 1.1rem"] {
        font-size: 0.95rem !important;
        padding: 0 0.5rem;
    }
}

/* ============================================
   ACCESSIBILITY & PERFORMANCE
   ============================================ */

@media (max-width: 768px) {
    /* Ensure all images are responsive */
    img {
        max-width: 100%;
        height: auto;
    }
    
    /* Prevent horizontal scroll */
    body, html {
        overflow-x: hidden;
        width: 100%;
    }
    
    /* Improve touch scrolling */
    main {
        -webkit-overflow-scrolling: touch;
    }
    
    /* Optimize font rendering */
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

/* Fix for iOS Safari viewport height */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        section {
            min-height: -webkit-fill-available;
        }
    }
}
