/* ========================================
   MODERN LAYOUT 2025
   Mobile-First, Breiter, Moderner
======================================== */

/* ========== RESET & BASE ========== */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Merriweather Sans', Arial, Helvetica, sans-serif;
    font-size: 1rem;
    line-height: 1.6;
    color: #333;
    background: #fff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

#wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========== CONTAINER & GRID ========== */
.row {
    max-width: 1400px; /* ← BREITER: war 960px */
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    --bs-gutter-x: 2.75rem;
}

.col-md-8 {
    grid-column: span 8;
}

.col-md-4 {
    grid-column: span 4;
}

.col-md-12 {
    grid-column: span 12;
}

/* ========== HEADER MODERN ========== */
#header {
    background: linear-gradient(180deg, #fff 0%, #eaf0fa 100%);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow:var(--header-shadow);
}

#header .logo {
    max-width: 330px;
    height: auto;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--blue-color);
    margin: 5px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Navigation Modern */
#header nav {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
}

#header .main-menu {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
    position: relative;
    top: 14px;
}

#header nav li {
    position: relative;
}

#header nav li a {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-radius: 4px;
}

/* Dropdown Modern */
#header .sub-menu {
    position: absolute;
    margin: 0;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #fff;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    border-radius: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

/* #header li:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
} */

#header .sub-menu li {
    display: block;
}

#header li .sub-menu li:last-child a {
    border-bottom: none;
}

#header .main-menu li:last-child .sub-menu {
	left: calc(100% - 200px);
}

/* ========== CONTENT MODERN ========== */

h1,h2,h3 {
    font-weight: 300;
}

h1 {
    font-size: 2rem;
    letter-spacing: 0.01em;
}

#maincontent {
    flex: 1;
}

#maincontent h1 {
    margin-bottom: 1.25rem;
    color: var(--blue-color);
    line-height: 1.2;
}

#maincontent h2 {
    font-size: 1.75rem;
    margin-bottom: 1rem;
    color: var(--blue-color);
}

#maincontent h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--blue-color);
}

#maincontent h4 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

#maincontent p {
    max-width: 928px;
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}
#maincontent a {
    color: var(--blue-color);
    text-decoration: underline;
}
#maincontent a:hover {
    color: var(--blue-medium);
}
#maincontent a:visited {
    color: var(--bg-grey);
}
#maincontent a:visited:hover {
    color: var(--blue-medium);
}
#maincontent .link-list.sidebar-list {
    padding-left: 15px;
}
#maincontent .link-list.sidebar-list a {
	text-decoration: none;
}

/* ========== Frames and Wrappers ========== */

.frame-type-text {
    max-width: 1100px;
}

.col-12.d-flex.row.wrapper-grid-3 {
	margin-left: calc(-20px - (var(--bs-gutter-x) / 2));
	/* width: calc(100% + 40px + var(--bs-gutter-x)); */
	max-width: calc(100% + 40px + var(--bs-gutter-x));
}

/* ========== IMAGES MODERN ========== */
.frame-card .ce-gallery {
    width: 100%;
}
.frame-card .ce-gallery .ce-row {
    display: flex;
    flex: 1;
    justify-content: space-between;
}

.ce-gallery img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.ce-gallery img:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.15);
}

/* ========== BUTTONS MODERN ========== */
.btn,
a.btn {
    display: inline-block;
    padding: 12px 30px;
    background: var(--blue-color);
    color: #fff;
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid var(--blue-color);
}

.btn:hover,
a.btn:hover {
    background: transparent;
    color: var(--blue-color);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(32, 59, 121, 0.3);
}

/* ========== NEWS MODERN ========== */
.news-list-item {
    display: grid;
    grid-template-columns: 300px 1fr;
    gap: 30px;
    padding: 30px 0;
    border-bottom: 1px solid #e9e9e9;
}

.news-list-item .news-img-wrap {
    margin: 0;
}

.news-list-item .news-img-wrap img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px;
}

.news-list-item h3 {
    margin-bottom: 15px;
}

.news-list-item .teaser-text {
    color: #666;
    line-height: 1.7;
}

/* ========== FOOTER MODERN ========== */
#footer {
    background: #2c2c2c;
    color: #fff;
    padding: 60px 0 30px;
    margin-top: 80px;
}

#footer h1, #footer h2, #footer h3, 
#footer h4, #footer h5, #footer h6 {
    color: #fff;
    line-height: 1;
    margin-bottom: 15px;
}

#footer a {
    color: #fff;
    text-decoration: none;
}

#footer a:hover {
    color: var(--blue-medium);
}

#footer .link-list.footer-list li {
    padding: 0;
    margin-bottom: 15px;
}

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

.footer-logo img {
	max-height: 120px;
}



/* ========== FORM FELOGIN ========== */
.submit-feuser {
	color: #fff;
    background-color: var(--blue-color);
    border: 3px solid var(--blue-color);
}
.submit-feuser:hover {
    background-color: #fff;
    color: var(--blue-color);
}
.felogin-input,
input[type="text"],
input[type="password"],
input[type="email"] {
    background-color: #fff;
    color: #000;
    appearance: unset;
    border: 1px solid #ccc;
}


input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px white inset;
    -webkit-text-fill-color: #333;
    box-shadow: 0 0 0 30px white inset;
    background-color: white;
}

input:-moz-autofill,
input:-moz-autofill:hover,
input:-moz-autofill:focus,
input:-moz-autofill-background {
    background-color: white;
    box-shadow: 0 0 0 30px white inset;
}

@media (min-width: 992px) {

    #header li.open .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateX(-50%) translateY(0);
    }

    #header li:hover .sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* ========== RESPONSIVE MOBILE-FIRST ========== */

/* Tablet */
@media (max-width: 991px) {
    .row {
        max-width: 100%;
        padding: 0 15px;
    }

    .grid-modern {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .col-md-8,
    .col-md-4,
    .col-md-12 {
        grid-column: span 12;
    }

    h1, #maincontent h1 {
        font-size: 2rem;
    }

    .news-list-item {
        grid-template-columns: 1fr;
    }

    #header nav {
        flex-direction: column;
        justify-content: flex-start;
    }

    header nav ul {
        flex-direction: column;
        width: 100%;
    }

    header nav .main-menu li {
        width: 100%;
        padding: 0.25em 0;
        margin-left: 0;
    }

    header nav li a {
        display: block;
        padding: 15px 20px;
    }
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 20px;
        right: 30px;
    }

    #header nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #fff;
        box-shadow: -5px 0 20px rgba(0,0,0,0.1);
        padding: 80px 20px 20px;
        transition: right 0.3s ease;
        overflow-y: auto;
    }

    #header nav.active {
        right: 0;
    }

    #header .main-menu {
        flex-direction: column;
        gap: 0;
        top: 0;
    }

    #header nav li {
        width: 100%;
        border-bottom: 1px solid #eee;
    }

    #header nav li a {
        display: block;
        padding: 15px 20px 15px 10px;
        font-size: 1rem;
    }
    #header nav .sub-menu li:hover a {
        color: #414141;
    }

    #header .sub-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border-radius: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        padding: 0;
    }

    #header li.open .sub-menu {
        max-height: 500px;
        display: block;
    }

    #header .sub-menu li {
        background-color: #fff;
        border: none;
        padding: 0;
    }


    #header .sub-menu li a {
        padding-left: 25px;
        font-size: 0.9rem;
        text-align: right;
    }

    #header .main-menu li:last-child .sub-menu {
        left: 0;
    }
    #header nav li.dropdown::after {
        content: '';
        position: absolute;
        right: 0;
        top: 1.75em;
        transform: translateY(-50%);
        width: 0;
        height: 0;
        border-left: 5px solid transparent;
        border-right: 5px solid transparent;
        border-top: 6px solid var(--blue-color);
        transition: transform 0.3s ease;
    }

    #header nav li.dropdown.open::after {
        transform: translateY(-50%) rotate(180deg);
    }
    #header nav li:not(.dropdown)::after {
        display: none;
    }

    #header .sub-menu li a {
        padding-left: 25px;
        font-size: 0.9rem;
        background: #f8f8f8;
    }

    #header .sub-menu .sub-menu li a {
        padding-left: 45px;
        font-size: 0.85rem;
        background: #e8f0fa;
    }

    #header .main-menu li:last-child .sub-menu {
        left: 0;
    }
}

/* Mobile */
@media (max-width: 767px) {
    #maincontent {
        padding: 30px 0;
    }

    h1, #maincontent h1 {
        font-size: 1.75rem;
    }

    #maincontent h2 {
        font-size: 1.5rem;
    }
    #maincontent h3 {
        font-size: 1.25rem;
    }
    #maincontent h4 {
        font-size: 1.2rem;
    }

    .ce-gallery {
        grid-template-columns: 1fr;
    }

    header .logo {
        max-width: 250px;
        margin: 15px 0;
    }
    #header .sub-menu li a {
      text-align: center;
    }

    .btn,
    a.btn {
        display: block;
        text-align: center;
        width: 100%;
    }
}

/* ========== CARDS MODERN ========== */
.card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    padding: 30px;
    transition: transform 0.3s ease;
    
}
.wrapper-grid-3 .card {
    margin: 20px;
    width: calc((100% / 3) - 40px);
    background-color: var(--light-blue-color);
}

.wrapper-grid-3 .col-6.card {
    width: calc((100% / 2) - 40px);
}

.teamlist .card, .teamlist .card .frame, .teamlist .card .ce-textpic {
    display: flex;
    flex-direction: column;
}
.teamlist .card .frame, .teamlist .card .ce-textpic, .teamlist .card .ce-gallery {
    flex: 1;
}
.teamlist .card .ce-gallery img {
    width: auto;
    max-height: 100%;
}

.teamlist .card .ce-column {
    display: flex;
}

.teamlist .card figure {
    align-content: end;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 25px rgba(0,0,0,0.12);
}

.card .col-12 {
    display: flex;
    flex: 1;
}
.card .col-12 .frame-type-textpic {
    display: flex;
    flex-direction: column;
    flex: 1;
}
.card .col-12 .frame-type-textpic .ce-textpic {
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
}
.card .ce-gallery {
    display: flex;
}
.card .ce-gallery .ce-row{
    display: flex;
    flex: 1;
    justify-content: space-between;
}
.frame-type-textpic .ce-gallery, .frame-type-textpic .ce-row, .frame-type-textpic .ce-column {
    width: 100%;
}
.frame-type-image .ce-gallery, .frame-type-image .ce-row, .frame-type-image .ce-column {
    width: 100%;
}
.frame-type-textpic figure, .frame-type-image figure {
    display: block;
}

/* ========== UTILITIES ========== */
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }
.mt-5 { margin-top: 3rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }
.mb-5 { margin-bottom: 3rem; }

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

@media screen and (max-width: 1199px) {
    .wrapper-grid-3 .card {
        width: calc((100%) - 40px);
    }
    .wrapper-grid-3.teamlist .card {
        width: calc((100% / 2) - 40px);
    }
}
@media screen and (max-width: 991px) {
    .wrapper-grid-3 .col-6.card {
        width: calc(100% - 40px);
    }
    .wrapper-grid-3.teamlist .card {
        width: calc(100% - 40px);
    }
    .teamlist .card .ce-column {
        width: auto;
    }
    .teamlist .card .ce-textpic {
        flex-direction: row;
        gap: 30px;
    }
    .teamlist .card .ce-gallery .ce-row {
        justify-content: flex-end;
        gap: 30px;
    }
    .footer-logo img {
        max-height: 100px;
    }
}
/* ========== SLIDER RESPONSIVE ========== */
.ei-slider {
    aspect-ratio: 16 / 7;
}
.ei-slider-large li img {
    width: 100% !important;
    height: 100% !important;
    margin: 0 !important;
    object-fit: cover;
}

@media screen and (max-width: 800px) {
    .ei-slider{
        aspect-ratio: 2 / 1;
    }
}
@media screen and (max-width: 600px) {
    .ei-slider {
	    aspect-ratio: 1.5 / 1;
    }

    .teamlist .card .ce-textpic {
        flex-direction: column;
        gap: 0;
    }
    .teamlist .card .ce-gallery .ce-row {
        justify-content: start;
    }
    .teamlist .card .ce-gallery[data-ce-columns="2"] .ce-row {
        flex-direction: column;
    }
    h1, #maincontent h1 {
        font-size: 1.5rem;
    }

    #maincontent h2 {
        font-size: 1.25rem;
    }
    #maincontent h3 {
        font-size: 1.15rem;
    }
    #maincontent h4 {
        font-size: 1.1rem;
    }
    #maincontent p {
        font-size: 1rem;
    }
    #header .logo {
        max-width: 66vw;
    }
}