/* Reset and Base Styles */
body {
    overflow-x: hidden;
    background-color: #121212;
    color: #e0e0e0;
}

/* Hero Section - verbesserte Hintergrundintegration */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(18, 18, 18, 0.97) 0%, rgba(29, 29, 27, 0.98) 100%);
    color: white;
    z-index: 1;
    margin-bottom: 0;
    padding: 6rem 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    font-family: 'OldTypefaces';
}

.hero-title {
    font-size: clamp(2rem, 6vw, 4.5rem); /* Reduced from 2.5rem to 2rem for mobile */
    font-weight: 800;
    letter-spacing: 4px;
    margin-bottom: 1.5rem;
    text-shadow: 0 0 10px rgba(111, 111, 111, 0.5);
    line-height: 1.2;
    font-family: 'UglyQua';
    text-transform: none;
    position: relative;
    display: inline-block;
}

.title-line {
    display: block;
    position: relative;
}

.title-line:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #6f6f6f;
    transform: translateX(-50%);
    transition: width 0.5s ease;
    opacity: 0;
    z-index: -1;
}

.hero-title:hover .title-line:after {
    width: 80%;
    opacity: 1;
}

.hero-subtitle {
    font-size: clamp(0.9rem, 4vw, 1.5rem);
    margin-bottom: 2.5rem;
    opacity: 0.9;
    font-weight: 300;
    letter-spacing: 1px;
    /* Remove font-family: inherit; to prevent inheritance issues */
}

/* Add a specific rule for the OldTypefaces in hero */
.hero-subtitle.font-OldTypefaces {
    font-family: 'OldTypefaces', serif !important;
}

.animated-bar {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #1d1d1b, #4f4d4e);
    margin: 0 auto 1.5rem;
    position: relative;
    overflow: hidden;
}

.animated-bar::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: translateX(-100%);
    animation: shimmer 2s infinite;
}

.center-bar {
    margin: 0 auto 2.5rem;
}

.white-bar {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.7));
}

@keyframes shimmer {
    100% {
        transform: translateX(100%);
    }
}

.btn-glow {
    position: relative;
    overflow: hidden;
    background-color: #1d1d1b;
    border-color: #1d1d1b;
    transition: all 0.3s ease;
}

.btn-glow:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(160, 32, 240, 0.4);
    background-color: #a020f0;
    border-color: #a020f0;
}

.btn-glow::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(30deg);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-glow:hover::after {
    opacity: 1;
    animation: glow-sweep 1.5s infinite;
}

@keyframes glow-sweep {
    0% {
        transform: rotate(30deg) translateX(-100%);
    }
    100% {
        transform: rotate(30deg) translateX(100%);
    }
}

/* Hero buttons responsive adjustments */
.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.hero-buttons .btn {
    margin: 0.25rem;
}

/* About Section */
.about-section {
    padding: 6rem 0;
    background-color: #1a1a1a;
}

.section-title {
    font-size: clamp(1.4rem, 4.5vw, 2rem) !important;
    font-family: 'UglyQua';
    font-weight: 700;
    margin-bottom: 1rem;
    color: #ffffff !important;
    text-transform: none !important;
}

.tilt-card {
    background-color: #222222;
    padding: 2.5rem 2rem;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
    overflow: hidden;
    height: 100%;
    transform-style: preserve-3d;
    perspective: 1000px;
    margin-bottom: 1rem;
}

.tilt-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
}

.tilt-card.highlight {
    background: linear-gradient(135deg, #2d2d2d, #222222);
    border: 1px solid rgba(79, 77, 78, 1);
}

.card-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #4f4d4e;
    position: relative;
    z-index: 1;
}

.highlight .card-icon {
    color: #4f4d4e;
}

.tilt-card h3 {
    font-size: 1.75rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
    position: relative;
    z-index: 1;
}

.tilt-card p {
    font-size: 1.1rem;
    color: #aaaaaa;
    position: relative;
    z-index: 1;
}

/* Parallax Stats Section */
.parallax-section {
    position: relative;
    padding: 6rem 0;
    overflow: hidden;
    color: white;
    background-color: #333; /* Fallback if image doesn't load */
    min-height: 400px; /* Minimum height to ensure content visibility */
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/assets/img/parallax-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    filter: brightness(0.3);
    z-index: -1;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(29, 29, 27, 0.7) 0%, rgba(160, 32, 240, 0.7) 100%);
    z-index: -1;
}

.stat-card {
    text-align: center;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 1rem;
    backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
    margin-bottom: 2rem; /* Ensure spacing on mobile */
}

.stat-number {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0;
    line-height: 1;
    color: white; /* Ensure visibility */
    display: inline-block;
}

.stat-plus, 
.stat-percent {
    font-size: 2rem;
    font-weight: 700;
    color: #a020f0; /* Purple color */
}

.stat-label {
    font-size: 1.25rem;
    margin-top: 0.75rem;
    display: block;
    color: white;
    opacity: 0.9;
}

.stat-description {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 0.5rem;
    font-weight: 300;
}

/* Featured Blog Section */
.featured-blog-section {
    padding: 6rem 0;
    background-color: #191919;
}

.featured-blog-image {
    position: relative;
    height: 100%;
    min-height: 300px;
    border-radius: 0.75rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 1.5rem;
}

.featured-blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.featured-blog-image:hover img {
    transform: scale(1.05);
}

.image-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 50%;
    background: linear-gradient(to top, rgba(18, 18, 18, 0.9), transparent);
}

.featured-blog-content {
    height: 100%;
    display: flex;
    flex-direction: column;
    padding: 1.5rem;
}

.featured-date {
    color: #a020f0;
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.featured-title {
    font-size: 2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #ffffff;
    line-height: 1.2;
}

.featured-excerpt {
    color: #bbbbbb;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    flex: 1;
    overflow-y: auto;
    min-height: 200px;
    max-height: 350px;
    scrollbar-width: thin;
    scrollbar-color: #a020f0 #2d2d2d;
}

.featured-excerpt::-webkit-scrollbar {
    width: 6px;
}

.featured-excerpt::-webkit-scrollbar-track {
    background: #2d2d2d;
    border-radius: 3px;
}

.featured-excerpt::-webkit-scrollbar-thumb {
    background-color: #a020f0;
    border-radius: 3px;
}

.featured-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 1rem;
}

.meta-info {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.meta-info span {
    display: flex;
    align-items: center;
    color: #bbbbbb;
    font-size: 0.9rem;
}

.meta-info i {
    margin-right: 0.5rem;
    color: #4f4d4e;
}

.read-more {
    color: #6f6f6f;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: color 0.3s;
}

.read-more:hover {
    color: #4f4d4e;
}

.empty-blog-message {
    padding: 4rem 2rem;
    background-color: #222222;
    border-radius: 0.75rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.message-content {
    max-width: 500px;
    margin: 0 auto;
}

.message-content i {
    color: #444444;
}

/* Blog interactions counter styling für Homepage */
.blog-interaction-counts {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: 15px;
}

.blog-count-item {
    display: inline-flex;
    align-items: center;
    font-size: 0.85rem;
    color: #999999;
    transition: all 0.2s ease;
    position: relative;
    padding: 2px 6px;
    border-radius: 4px;
}

.blog-count-item:hover {
    background-color: rgba(79, 77, 78, 0.1);
    color: #e0e0e0;
}

.blog-count-item i {
    margin-right: 4px;
}

.blog-count-item.like-count i {
    color: #dc3545;
}

.blog-count-item.comment-count i {
    color: #4f4d4e;
}

.blog-count-item:hover:after {
    content: attr(title);
    position: absolute;
    bottom: -30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.8rem;
    white-space: nowrap;
    z-index: 10;
    opacity: 0;
    animation: fadeIn 0.2s ease forwards;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -5px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* Author link styling */
.author-link {
    color: #6f6f6f;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.author-link:hover {
    color: #4f4d4e;
    transform: translateY(-2px);
    text-decoration: underline;
}

/* Redesigned Timeline Section */
.timeline-section {
    padding: 6rem 0;
    background-color: #1a1a1a;
}

.timeline {
    position: relative;
    max-width: 1200px;
    margin: 3rem auto 0;
    padding: 2rem 0;
}

.timeline-center-line {
    position: absolute;
    width: 4px;
    background-color: #4f4d4e;
    top: 0;
    bottom: 0;
    left: 50%; /* Zentrierte Position */
    transform: translateX(-50%);
    z-index: 1;
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    width: 100%;
    z-index: 2;
    clear: both; /* Verhindert Überlappungen */
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-item::after {
    content: '';
    display: table;
    clear: both;
}

.timeline-item.left .timeline-content {
    float: left;
    width: calc(50% - 40px);
    margin-right: 40px;
    text-align: right;
}

.timeline-item.right .timeline-content {
    float: right;
    width: calc(50% - 40px);
    margin-left: 40px;
    text-align: left;
}

.timeline-content {
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    background-color: #222222;
    transition: transform 0.3s, box-shadow 0.3s;
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    background-color: #2a2a2a;
}

/* Positionierung der Dots auf der Mittellinie */
.timeline-dot {
    position: absolute;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #6f6f6f;
    top: 20px; /* Vertikale Position beibehalten */
    left: 50%; /* Zentriert auf der Timeline-Linie */
    transform: translateX(-50%); /* Korrektur für exakte Zentrierung */
    border: 4px solid #1a1a1a;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), 0 0 0 2px rgba(79, 77, 78, 0.3);
    z-index: 3;
}

/* Entfernen der spezifischen linken/rechten Positionierung für die Dots */
.timeline-item.left .timeline-dot,
.timeline-item.right .timeline-dot {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
}

.timeline-content h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: #ffffff;
}

.timeline-content p {
    font-size: 1rem;
    color: #bbbbbb;
    margin-bottom: 0;
}

/* Mobile Anpassungen für Timeline */
@media (max-width: 767px) {
    .timeline-center-line {
        left: 20px; /* Zurück zur linken Position auf Mobilgeräten */
        transform: none;
    }
    
    .timeline-item.left .timeline-content,
    .timeline-item.right .timeline-content {
        float: right;
        width: calc(100% - 60px);
        margin-left: 60px;
        margin-right: 0;
        text-align: left;
    }
    
    /* Korrektur für Dots in der mobilen Ansicht */
    .timeline-dot,
    .timeline-item.left .timeline-dot,
    .timeline-item.right .timeline-dot {
        left: 20px; /* Ausgerichtet mit der linken Timeline-Linie auf Mobilgeräten */
        transform: translateX(-50%);
    }
}

/* Contact Section */
.contact-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #1d1d1b 0%, #333 100%);
    position: relative;
    overflow: hidden;
}

.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.position-relative {
    position: relative;
    z-index: 2;
}

.contact-cards {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-top: 3rem;
}

.contact-card {
    background-color: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 0.75rem;
    backdrop-filter: blur(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    text-align: center;
    flex: 1;
    min-width: 250px;
    max-width: 300px;
    transition: transform 0.3s, box-shadow 0.3s;
    color: white;
}

.contact-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.3);
}

.contact-card.highlight {
    background-color: rgba(160, 32, 240, 0.2);
    border: 1px solid rgba(160, 32, 240, 0.3);
}

.contact-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: #a020f0;
}

.contact-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.contact-card p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Join Us Section */
.join-us-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, #1d1d1b 0%, #2a2a2a 100%);
    position: relative;
    overflow: visible;
    margin-bottom: 0;
    z-index: 1;
}

.join-us-section::before {
    content: '';
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: 100px;
    background: #1a1a1a;
    clip-path: polygon(0 0, 100% 100%, 100% 0, 0 0);
    z-index: -1;
}

.join-us-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    position: relative;
    z-index: 5;
}

.join-us-subtitle {
    font-size: clamp(1rem, 3vw, 1.3rem);
    margin-bottom: 2.5rem;
    color: #bbbbbb;
}

.join-us-buttons {
    margin-top: 3rem;
    margin-bottom: 1rem;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

/* Improved Button Styling for Join Us Section */
.join-us-buttons .btn {
    padding: 0.75rem 1.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
    width: 100%;
    max-width: 250px;
}

.join-us-buttons .btn i {
    margin-right: 8px;
}

.btn-outline-primary {
    color: #ffffff;
    border-color: #ffffff;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    color: white;
    background-color: #a020f0;
    border-color: #a020f0;
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(160, 32, 240, 0.3);
}

/* Mobile Responsiveness */
@media (max-width: 767px) {
    .hero-section {
        padding-top: 4rem;
        padding-bottom: 4rem;
        min-height: 80vh; /* Reduced for better mobile fit */
    }
    
    .hero-title {
        font-size: 2.8rem; /* Increased from 2rem for more prominence on mobile */
        letter-spacing: 2px;
    }
    
    .hero-subtitle {
        font-size: 1.2rem; /* Slightly increased from default 0.9rem for better readability */
    }
    
    .btn-lg {
        padding: 0.5rem 1.25rem; /* Reduced height for mobile */
        font-size: 1rem; /* Slightly smaller font size */
    }
    
    .featured-blog-image {
        min-height: 250px;
    }

    .join-us-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .tilt-card {
        padding: 2rem 1.5rem;
    }

    .section-title {
        margin-bottom: 0.5rem;
        font-size: 1.9rem; /* Added specific font size for mobile */
        text-transform: none !important;
    }
    
    .animated-bar {
        margin-bottom: 1rem;
    }
    
    .featured-meta {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .read-more {
        margin-top: 0.5rem;
    }
    .hero-buttons .btn-lg {
        padding: 0.3rem 1rem; /* Further reduced padding */
        font-size: 0.85rem; /* Smaller font size */
        line-height: 1.4; /* Adjusted line height */
        height: auto; /* Ensure height is controlled by content */
    }
    
    /* Ensure flex display for icon alignment */
    .hero-buttons .btn i {
        font-size: 0.9rem; /* Smaller icons */
    }
    
    /* More aggressive reduction for button height */
    .hero-buttons .btn-lg {
        padding: 0.4rem 1.5rem; /* Reduced vertical padding */
        font-size: 0.95rem; /* Slightly smaller font */
        line-height: 1.5; /* Tighter line height */
        height: auto; /* Ensure height is controlled by content */
    }

    .meta-info {
        flex-wrap: wrap;
        gap: 0.7rem;
        margin-bottom: 1rem;
    }
    
    .blog-interaction-counts {
        margin-left: 0;
        margin-top: 0.5rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        letter-spacing: 1px; 
        font-size: 2.5rem; /* Increased from 1.8rem for smaller screens but still larger than before */
    }
    
    .hero-subtitle {
        font-size: 1.1rem; /* Slightly increased from 0.9rem */
    }
    
    .btn-lg {
        padding: 0.4rem 1.2rem; /* Further reduced for very small screens */
    }
    
    .featured-blog-image {
        min-height: 200px;
    }
    
    .timeline-item {
        padding-left: 45px;
    }
    
    .timeline-content {
        padding: 15px !important;
    }
    
    .join-us-section::before {
        top: -30px;
        height: 60px;
    }
    
    /* Even more compact buttons for very small screens */
    .hero-buttons .btn-lg {
        padding: 0.35rem 1.2rem; /* Further reduced padding */
        font-size: 0.9rem;
        min-height: 0; /* Remove any minimum height */
    }
}

/* Utility to ensure animations work on mobile */
@media (max-width: 991px) {
    .tilt-card {
        transform-style: flat;
    }
    
    /* Add touch active state for buttons */
    .btn.touch-active {
        transform: translateY(-3px);
        box-shadow: 0 5px 15px rgba(160, 32, 240, 0.3);
    }
}

/* Ensure AOS animations work on all devices */
[data-aos] {
    pointer-events: auto !important;
}

/* Fix parallax background on mobile */
@media (max-width: 767px) {
    .parallax-bg {
        background-attachment: scroll;
    }
}