/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Language bar styles */
.language-bar {
    background-color: #e8e8e8;
    padding: 8px 0;
    border-bottom: 1px solid #ddd;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
}

.flags {
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.flag {
    width: 30px;
    height: 20px;
    object-fit: cover;
    border-radius: 2px;
    transition: transform 0.2s ease;
}

.flag:hover {
    transform: scale(1.1);
}

/* Main header styles */
.main-header {
    background-color: rgb(170, 149, 116, 0.8);
    padding: 15px 0;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: absolute;
    top: 40px;
    left: 0;
    right: 0;
    z-index: 100;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 100%;
    padding: 0 40px;
}

.logo img {
    height: 100px;
    width: auto;
}

/* Navigation styles */
.main-nav {
    position: relative;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    font-size: 18px;
    transition: color 0.3s ease;
}

.nav-menu a:hover {
    color: #f0f0f0;
}

/* Dropdown Styles */
.nav-item-dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: rgb(170, 149, 116, 0.95);
    list-style: none;
    min-width: 280px;
    padding: 10px 0;
    display: none;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    z-index: 110;
}

.dropdown-menu li {
    width: 100%;
}

.dropdown-menu a {
    display: block;
    padding: 10px 20px;
    font-size: 16px;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Show dropdown on hover (Desktop) */
@media (min-width: 769px) {
    .nav-item-dropdown:hover .dropdown-menu {
        display: block;
    }
}

/* Mobile menu toggle */
.menu-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: white;
    transition: 0.3s;
}

/* Main content styles */
.main-content {
    min-height: 600px;
}

/* Page Hero (Static version of carousel) */
.page-hero {
    position: relative;
    width: 100%;
    height: 600px;
    background-size: cover;
    background-position: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../img/EMPFANG.jpg');
    display: flex;
    align-items: center;
    overflow: hidden;
}

.page-hero-text {
    position: absolute;
    top: 65%;
    left: 10%;
    transform: translateY(-50%);
    font-family: Arial, sans-serif;
    font-size: 4rem;
    font-weight: bold;
    line-height: 1.1;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    text-align: left;
    z-index: 50;
}

.page-hero-text h1 {
    font-size: inherit;
    color: inherit;
    margin: 0;
}

/* Carousel styles */
.carousel-container {
    position: relative;
    width: 100%;
    height: 600px;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
}

.carousel {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

.carousel-slide.active {
    opacity: 1;
}

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

.carousel-text {
    position: absolute;
    top: 65%;
    left: 10%;
    transform: translateY(-50%);
    font-family: Arial, sans-serif;
    font-size: 4rem;
    font-weight: bold;
    line-height: 1.1;
    color: white;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    text-align: left;
    z-index: 50;
}

/* Content section styles */
.content-section {
    padding: 20px 0 60px 0;
    background-color: #f9f9f9;
}

.content-block {
    display: flex;
    align-items: flex-start;
    gap: 40px;
}

.content-image {
    width: 40%;
    max-width: 450px;
    height: auto;
    flex-shrink: 0;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.content-text {
    flex: 1;
}

.section-title-simple {
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: #333;
    text-align: center;
    position: relative;
    padding-bottom: 10px;
}

.section-title {
    font-size: 2.5rem;
    margin-top: 40px;
    margin-bottom: 60px;
    color: #333;
    text-align: center;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 50%;
    height: 1px;
    background-color: #333;
}

.content-text p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    text-align: left;
}

.grid-container {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    margin-top: 40px;
}

.grid-item {
    flex: 1;
    text-align: center;
}

.grid-item img {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.grid-item a:hover img {
    transform: scale(1.02);
    box-shadow: 0 6px 12px rgba(0,0,0,0.15);
}

.contact-info-list {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.contact-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #333; /* Text color */
    text-decoration: none;
    font-size: 1rem;
    transition: color 0.2s ease;
}

.contact-item i {
    color: rgb(170, 149, 116, 1.0); /* Gold icon */
    font-size: 1.2rem;
    width: 20px; /* Fixed width keeps text aligned even if icons vary slightly */
    text-align: center;
}

.contact-item a:hover {
    color: rgb(170, 149, 116, 1.0);
}

.legal-areas-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 20px;
    margin-bottom: 60px;
}

.legal-area-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 20px;
}

.legal-area-item i {
    font-size: 2.5rem;
    color: #AA9574;
    margin-bottom: 15px;
}

.legal-area-item span {
    font-family: Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: bold;
    color: #333;
}

.contact-box {
    margin-top: 60px;
    margin-bottom: 20px;
    height: 350px;
    border-radius: 8px;
    overflow: hidden;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('../img/EMPFANG.jpg');
    background-size: cover;
    background-position: center;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-box-content h1,
.contact-box-content h2 {
    font-size: 2.2rem;
    margin-bottom: 30px;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.btn-contact {
    display: inline-block;
    padding: 15px 45px;
    font-size: 1.1rem;
    font-weight: bold;
    color: white;
    text-decoration: none;
    background-color: rgb(170, 149, 116, 0.6); /* Half-transparent Gold */
    border: 2px solid white;
    border-radius: 50px;
    transition: background-color 0.3s ease;
}

.btn-contact:hover {
    background-color: rgb(170, 149, 116, 0.9);
}

/* Main footer styles */
.main-footer {
    background-color: rgb(170, 149, 116, 1.0);
    color: white;
    padding: 40px 0;
}

.main-footer .container {
    padding: 0 40px; /* Adds consistent padding to the sides */
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 40px;
}

.footer-info h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
    line-height: 1.2;
    min-height: 3.6rem; /* Ensures alignment even if title wraps to two lines */
}

.footer-info p {
    line-height: 1.8;
    font-size: 0.9rem;
}

.footer-logo {
    flex: 0 0 180px;
}

.footer-info {
    flex: 3;
}

.footer-info-wide {
    flex: 4;
}

.footer-table {
    width: 100%;
    border-collapse: collapse;
}

.footer-table td {
    vertical-align: top;
    padding-right: 20px;
}

.footer-table td:last-child {
    padding-right: 0;
}

.footer-logo img {
    height: auto;
    width: 100%;
}

/* Bottom footer styles */
.bottom-footer {
    background-color: #e8e8e8;
    padding: 15px 0;
    border-top: 1px solid #ddd;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
}

.footer-links a {
    color: #666;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: rgb(170, 149, 116, 1.0);
}

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #666;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    line-height: 1;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #555;
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0,0,0,0.3);
}

/* Responsive styles */
@media (max-width: 768px) {
    .logo img {
        height: 60px;
    }
    
    .footer-logo img {
        height: 50px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        right: 0;
        background-color: rgb(170, 149, 116, 1.0);
        flex-direction: column;
        width: 250px;
        padding: 20px;
        transform: translateX(100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease-in-out;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }
    
    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    /* Mobile Dropdown Adjustments */
    .dropdown-menu {
        position: static;
        background-color: transparent;
        box-shadow: none;
        padding-left: 20px;
        display: none; /* Controlled by JS in mobile */
    }

    .dropdown-menu.active {
        display: block;
    }

    .dropdown-menu a {
        font-size: 16px;
        padding: 8px 0;
    }

    .carousel-text,
    .page-hero-text {
        font-size: 2.5rem;
    }
    
    .content-block {
        flex-direction: column;
        text-align: center;
    }
    
    .content-image {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }
    .grid-container {
        flex-direction: column;
        align-items: center;
    }

    .grid-item {
        width: 100%;
        margin-bottom: 40px;
    }

    .legal-areas-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }

    .legal-area-item i {
        font-size: 2rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 15px;
    }
}

@media (max-width: 480px) {
    .logo img {
        height: 45px;
    }
    
    .footer-logo img {
        height: 40px;
    }
    
    .carousel-text,
    .page-hero-text {
        font-size: 2rem;
    }
    
    .content-text h2 {
        font-size: 2rem;
    }
    
    .flags {
        justify-content: center;
    }
}