/* Index page specific styles */

/* Hero Section */
.hero {
    padding-top: 180px;
    padding-bottom: 160px;
    background: white;
    color: var(--text-color);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border-bottom: 2px solid var(--light-color);
}

.hero-container {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr; /* Adjusted to make logo box smaller and gear box larger */
    gap: 30px; /* Kleinerer Abstand zwischen den Boxen */
    align-items: stretch; /* Damit beide Boxen die gleiche Höhe haben */
    justify-content: space-between;
}

.hero-img {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 500px; /* Gleiche Höhe wie die Zahnradbox */
    background-color: rgba(240, 240, 240, 0.8); /* Leicht gräulicher Hintergrund */
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    padding: 20px; /* Weniger Padding für mehr Platz */
    overflow: hidden; /* Verhindert Überlauf */
}

.hero-img img {
    width: 90%; /* Reduced from 95% to fit better in the smaller box */
    min-width: 280px; /* Reduced from 300px */
    height: auto;
    max-height: none; /* Maximalhöhe entfernen */
    border-radius: 10px;
    object-fit: contain; /* Behält das Seitenverhältnis bei */
}

/* Gears container */
.gears-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    height: 500px; /* Erhöht für das größere grüne Zahnrad */
    width: 100%;
    margin: 0 auto;
    padding: 40px;
    background-color: rgba(240, 240, 240, 0.8); /* Leicht gräulicher Hintergrund */
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
}

/* Gear styles */
.gear {
    position: relative;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: transform 0.5s ease;
    cursor: pointer;
    background-color: transparent;
}

.gear:before {
    content: "\f013"; /* Font Awesome gear icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* Gear colors */
.gear-red:before {
    color: var(--red-color);
}

.gear-green:before {
    color: var(--green-color);
}

.gear-blue:before {
    color: var(--blue-color);
}

/* Gear sizes */
.gear-red {
    width: 200px;
    height: 200px;
}

.gear-red:before {
    font-size: 150px;
}

.gear-green {
    width: 180px;
    height: 180px;
}

.gear-green:before {
    font-size: 135px;
}

.gear-blue {
    width: 140px;
    height: 140px;
}

.gear-blue:before {
    font-size: 105px;
}

/* Gear positioning */
.gear-green {
    margin-bottom: -95px;
    z-index: 3;
    position: relative;
    left: 5px;
}

.gear-red {
    position: relative;
    left: 0;
    margin-right: 75px;
    margin-bottom: -95px;
    z-index: 2;
}

.gear-blue {
    position: relative;
    left: -15px;
    top: -5px;
    z-index: 3;
    margin-top: 15px;
}

/* Gear rotations */
.gear {
    transition: transform 1.5s ease-in-out;
}

.gear.rotating {
    transition: transform 3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Gear hover effects */
.gear-wrapper:hover .gear-red,
.gear-wrapper:hover .gear-green,
.gear-wrapper:hover .gear-blue {
    transform: rotate(30deg);
}

/* Gear stripes */
.fixed-stripe {
    position: absolute;
    height: 6px;
    border: none;
    z-index: 1;
    top: 50%;
    transform: translateY(-50%);
    border-radius: 3px;
    margin: 0;
    display: block !important;
    visibility: visible !important;
    opacity: 0.7 !important;
}

.left-stripe {
    right: 60%;
    width: 30%;
}

.right-stripe {
    left: 60%;
    width: 30%;
}

/* Stripe colors */
.red-stripe {
    background: linear-gradient(90deg, rgba(231, 76, 60, 0.1), rgba(231, 76, 60, 0.9));
}

.right-stripe.red-stripe {
    background: linear-gradient(270deg, rgba(231, 76, 60, 0.1), rgba(231, 76, 60, 0.9));
}

.green-stripe {
    background: linear-gradient(90deg, rgba(46, 204, 113, 0.1), rgba(46, 204, 113, 0.9));
}

.right-stripe.green-stripe {
    background: linear-gradient(270deg, rgba(46, 204, 113, 0.1), rgba(46, 204, 113, 0.9));
}

.blue-stripe {
    background: linear-gradient(90deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.9));
}

.right-stripe.blue-stripe {
    background: linear-gradient(270deg, rgba(52, 152, 219, 0.1), rgba(52, 152, 219, 0.9));
}

/* Gear wrapper and label styles */
.gear-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin: 15px 0;
    width: 100%;
    overflow: visible;
}

.gear-wrapper hr {
    display: block !important;
    visibility: visible !important;
    z-index: 2 !important;
}

.gear-label {
    font-weight: bold;
    font-size: 18px;
    color: var(--text-color);
    position: absolute;
    white-space: nowrap;
    cursor: pointer;
    transition: color 0.3s ease;
    padding: 5px 12px;
    border-radius: 5px;
    z-index: 10;
    position: relative;
    background-color: transparent;
    border: none;
}

.gear-label:hover {
    color: white;
    text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

/* Gear label brush stroke backgrounds */
.gear-wrapper .gear-label::before {
    content: "";
    position: absolute;
    top: -10px;
    bottom: -10px;
    left: -50px;
    right: -80px;
    z-index: -1;
    border-radius: 10px;
    transform: skew(-5deg, 1deg);
}

/* Green brush stroke */
.gear-wrapper:nth-child(1) .gear-label::before {
    background: linear-gradient(90deg,
    rgba(46, 204, 113, 0) 0%,
    rgba(46, 204, 113, 0.15) 20%,
    rgba(46, 204, 113, 0.4) 50%,
    rgba(46, 204, 113, 0.15) 80%,
    rgba(46, 204, 113, 0) 100%);
}

.gear-wrapper:nth-child(1) .gear-label:hover::before {
    background: linear-gradient(90deg,
    rgba(46, 204, 113, 0.05) 0%,
    rgba(46, 204, 113, 0.3) 20%,
    rgba(46, 204, 113, 0.7) 50%,
    rgba(46, 204, 113, 0.3) 80%,
    rgba(46, 204, 113, 0.05) 100%);
}

/* Red brush stroke */
.gear-wrapper:nth-child(2) .gear-label::before {
    background: linear-gradient(270deg,
    rgba(231, 76, 60, 0) 0%,
    rgba(231, 76, 60, 0.15) 20%,
    rgba(231, 76, 60, 0.4) 50%,
    rgba(231, 76, 60, 0.15) 80%,
    rgba(231, 76, 60, 0) 100%);
}

.gear-wrapper:nth-child(2) .gear-label:hover::before {
    background: linear-gradient(270deg,
    rgba(231, 76, 60, 0.05) 0%,
    rgba(231, 76, 60, 0.3) 20%,
    rgba(231, 76, 60, 0.7) 50%,
    rgba(231, 76, 60, 0.3) 80%,
    rgba(231, 76, 60, 0.05) 100%);
}

/* Blue brush stroke */
.gear-wrapper:nth-child(3) .gear-label::before {
    background: linear-gradient(90deg,
    rgba(52, 152, 219, 0) 0%,
    rgba(52, 152, 219, 0.15) 20%,
    rgba(52, 152, 219, 0.4) 50%,
    rgba(52, 152, 219, 0.15) 80%,
    rgba(52, 152, 219, 0) 100%);
}

.gear-wrapper:nth-child(3) .gear-label:hover::before {
    background: linear-gradient(90deg,
    rgba(52, 152, 219, 0.05) 0%,
    rgba(52, 152, 219, 0.3) 20%,
    rgba(52, 152, 219, 0.7) 50%,
    rgba(52, 152, 219, 0.3) 80%,
    rgba(52, 152, 219, 0.05) 100%);
}

/* Gear label underline animation */
.gear-label::after {
    content: "";
    position: absolute;
    width: 0;
    height: 4px;
    bottom: -4px;
    background-color: currentColor;
    transition: width 0.3s ease;
    left: 50%;
    transform: translateX(-50%);
}

.gear-label:hover::after {
    width: 100%;
    opacity: 0.9;
}

/* Gear label positioning */
.gear-wrapper:nth-child(1) .gear-label {
    left: 35%;
    top: 50%;
    transform: translateX(-200px);
    text-align: center;
}

.gear-wrapper:nth-child(2) .gear-label {
    right: -20%;
    top: 50%;
    transform: translateX(200px);
    text-align: center;
}

.gear-wrapper:nth-child(3) .gear-label {
    left: 30%;
    transform: translateX(-200px);
    text-align: center;
}

/* About Section */
.about {
    padding: 100px 0;
}

.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.about-img {
    border-radius: 10px;
    overflow: hidden;
}

.about-img img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    object-position: center;
    transform: scale(1.5);
}

.about-content h2 {
    font-size: 2.5rem;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.about-content p {
    margin-bottom: 15px;
}

/* Projects Section */
.projects {
    padding: 100px 0;
    background-color: var(--light-color);
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.project-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    height: 250px;
}

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

.project-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s;
    padding: 20px;
    text-align: center;
}

.project-item:hover .project-overlay {
    opacity: 1;
}

.project-item:hover .project-img {
    transform: scale(1.1);
}

.project-overlay h3 {
    color: white;
    margin-bottom: 10px;
    font-size: 1.5rem;
}

.project-overlay p {
    color: #cccccc;
}

/* Testimonials Section */
.testimonials {
    padding: 100px 0;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-item {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.testimonial-content {
    margin-bottom: 20px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.author-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    margin-right: 15px;
}

.author-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.author-info h4 {
    margin-bottom: 5px;
}

.author-info p {
    color: #666666;
    font-size: 0.9rem;
}

/* Contact Section */
.contact {
    padding: 100px 0;
    background-color: var(--light-color);
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.contact-info h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.contact-details {
    margin-bottom: 30px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.contact-icon {
    font-size: 1.2rem;
    color: var(--primary-color);
    margin-right: 15px;
    margin-top: 5px;
}

.social-links {
    display: flex;
}

.social-links a {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background-color: var(--primary-color);
    color: white;
    border-radius: 50%;
    margin-right: 10px;
    transition: all 0.3s;
}

.social-links a:hover {
    background-color: var(--secondary-color);
    transform: translateY(-3px);
}

.contact-form h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--secondary-color);
}

.form-group {
    margin-bottom: 20px;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #dddddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

textarea.form-control {
    height: 150px;
    resize: vertical;
}

/* Footer */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 50px 0 20px;
}

.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.footer-col h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 50px;
    height: 2px;
    background-color: var(--accent-color);
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #cccccc;
    transition: color 0.3s;
}

.footer-col ul li a:hover {
    color: white;
    padding-left: 5px;
}

.copyright {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Responsive Styles */
@media (max-width: 991px) {
    /* Gear responsive adjustments */
    .gears-container {
        height: 450px;
        padding: 0;
    }

    .fixed-stripe {
        height: 5px;
    }

    .left-stripe {
        right: 55%;
        width: 22%;
    }

    .right-stripe {
        left: 55%;
        width: 22%;
    }

    /* Gear sizes */
    .gear-red {
        width: 170px;
        height: 170px;
    }

    .gear-red:before {
        font-size: 130px;
    }

    .gear-green {
        width: 150px;
        height: 150px;
        margin-bottom: -70px;
        top: 15px;
        left: 10px;
    }

    .gear-green:before {
        font-size: 110px;
    }

    .gear-blue {
        width: 110px;
        height: 110px;
        margin-top: 12px;
        top: -18px;
        left: -10px;
    }

    .gear-blue:before {
        font-size: 80px;
    }

    .gear-red {
        margin-right: 55px;
        margin-bottom: -70px;
    }

    /* Gear label adjustments */
    .gear-label {
        font-size: 16px;
        padding: 4px 10px;
    }

    .gear-wrapper:nth-child(1) .gear-label,
    .gear-wrapper:nth-child(2) .gear-label,
    .gear-wrapper:nth-child(3) .gear-label {
        transform: translateX(-150px);
    }

    .gear-wrapper:nth-child(2) .gear-label {
        left: 30%;
        top: 35%;
    }

    .gear-wrapper .gear-label::before {
        left: -30px;
        right: -80px;
    }
}

@media (max-width: 768px) {
    /* Hero section adjustments */
    .hero-container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .hero-img {
        text-align: center;
        height: 70%;
        margin: 0;
    }

    .hero-img img {
        height: 90%;
    }

    /* About section adjustments */
    .about-img img {
        transform: scale(1.2);
        height: auto;
    }

    /* Gear responsive adjustments */
    .fixed-stripe {
        height: 4px;
        opacity: 0.8 !important;
    }

    .left-stripe {
        right: 50%;
        width: 18%;
    }

    .right-stripe {
        left: 50%;
        width: 18%;
    }

    .gear-green {
        top: 35px;
        left: -22px;
    }

    .gear-blue {
        top: -30px;
        left: -3px;
    }

    .gears-container {
        height: auto;
        min-height: 450px;
        max-width: 100%;
        position: relative;
        display: flex;
        flex-direction: column;
        justify-content: space-around;
        align-items: center;
        padding: 0;
    }

    .gear-label-left {
        left: 5%;
    }

    .gear-label-right {
        right: 5%;
    }

    /* Gear sizes - unified for mobile */
    .gear-red,
    .gear-green,
    .gear-blue {
        position: relative;
    }

    .gear-red:before,
    .gear-green:before,
    .gear-blue:before {
        font-size: 120px;
    }

    /* Gear wrapper adjustments */
    .gear-wrapper {
        position: relative;
        justify-content: flex-start;
        overflow: visible;
        flex-direction: row;
        align-items: center;
        width: 100%;
        padding: 0 15%;
        box-sizing: border-box;
        margin: 0;
    }

    /* Position all gear labels on the right side in mobile view */
    .gear-wrapper .gear-label {
        position: absolute;
        z-index: 20;
        background-color: rgba(255, 255, 255, 0.9);
        margin: 12px;
        left: 50%;
        transform: none;
    }

    .gear-wrapper:nth-child(1) .gear-label,
    .gear-wrapper:nth-child(2) .gear-label,
    .gear-wrapper:nth-child(3) .gear-label {
        transform: translateX(0);
    }

    .gear-wrapper:nth-child(1) .gear-label {
        left: 230px;
        top: 80px;
    }

    .gear-wrapper:nth-child(2) .gear-label {
        top: 55px;
        left: 250px;
        right: 200px;
    }

    .gear-wrapper:nth-child(3) .gear-label {
        left: 230px;
        top: 10px;
    }

    .gear-wrapper .gear-label::before {
        left: -80px;
        right: -80px;
    }
}
