/********** Template CSS (senin orijinal kısmın) **********/
:root {
    --primary: #06BBCC;
    --light: #F0FBFC;
    --dark: #181d38;

    /* Logo kullanım kılavuzuna göre dinamik yükseklik ve boşluk */
    --logo-height: clamp(40px, 8vw, 60px);
    --gap: calc(var(--logo-height) / 4);
}

.fw-medium {
    font-weight: 600 !important;
}

.fw-semi-bold {
    font-weight: 700 !important;
}

.back-to-top {
    position: fixed;
    display: none;
    right: 45px;
    bottom: 45px;
    z-index: 99;
}

/*** Spinner ***/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity .5s ease-out, visibility 0s linear .5s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity .5s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/*** Button ***/
.btn {
    font-family: 'Nunito', sans-serif;
    font-weight: 600;
    transition: .5s;
}

.btn.btn-primary,
.btn.btn-secondary {
    color: #FFFFFF;
}

.btn-square {
    width: 38px;
    height: 38px;
}

.btn-sm-square {
    width: 32px;
    height: 32px;
}

.btn-lg-square {
    width: 48px;
    height: 48px;
}

.btn-square,
.btn-sm-square,
.btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 0px;
}

/*** Navbar ***/
.navbar .dropdown-toggle::after {
    border: none;
    content: "\f107";
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    vertical-align: middle;
    margin-left: 8px;
}

.navbar-light .navbar-nav .nav-link {
    margin-right: 30px;
    padding: 25px 0;
    color: #FFFFFF;
    font-size: 15px;
    text-transform: uppercase;
    outline: none;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary);
}

@media (max-width: 991.98px) {
    .navbar-light .navbar-nav .nav-link {
        margin-right: 0;
        padding: 10px 0;
    }

    .navbar-light .navbar-nav {
        border-top: 1px solid #EEEEEE;
    }
}

.navbar-light .navbar-brand,
.navbar-light a.btn {
    height: 75px;
}

.navbar-light .navbar-nav .nav-link {
    color: var(--dark);
    font-weight: 500;
}

.navbar-light.sticky-top {
    top: -100px;
    transition: .5s;
}

@media (min-width: 992px) {
    .navbar .nav-item .dropdown-menu {
        display: block;
        margin-top: 0;
        opacity: 0;
        visibility: hidden;
        transition: .5s;
    }

    .navbar .dropdown-menu.fade-down {
        top: 100%;
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
    }

    .navbar .nav-item:hover .dropdown-menu {
        top: 100%;
        transform: rotateX(0deg);
        visibility: visible;
        transition: .5s;
        opacity: 1;
    }
}

/*** Header carousel ***/
/* Carousel height optimization */
.header-carousel .owl-carousel-item {
    position: relative;
    height: 60vh;
    min-height: 350px;
    max-height: 500px;
    padding: 20px;
    margin: 10px;
}

.header-carousel .owl-carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: center;
    background: linear-gradient(135deg, rgba(24, 29, 56, 0.8) 0%, rgba(6, 187, 204, 0.6) 100%);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

/* All images will show completely with object-fit: contain */

@media (max-width: 768px) {
    .header-carousel .owl-carousel-item {
        height: 45vh;
        min-height: 250px;
        padding: 15px;
        margin: 8px;
    }

    .header-carousel .owl-carousel-item img {
        width: 100%;
        height: 100%;
        object-fit: contain;
        background: linear-gradient(135deg, rgba(24, 29, 56, 0.8) 0%, rgba(6, 187, 204, 0.6) 100%);
        border-radius: 6px;
        box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
    }
    
    /* Mobile images also show completely */
}

@media (max-width: 576px) {
    .header-carousel .owl-carousel-item {
        height: 40vh;
        min-height: 200px;
        padding: 10px;
        margin: 5px;
    }
}

.header-carousel .owl-nav {
    position: absolute;
    top: 50%;
    right: 8%;
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
}

.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    margin: 7px 0;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #FFFFFF;
    background: transparent;
    border: 1px solid #FFFFFF;
    font-size: 22px;
    transition: .5s;
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
    background: var(--primary);
    border-color: var(--primary);
}

/* Carousel dots styling */
.header-carousel .owl-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
}

.header-carousel .owl-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    transition: all 0.3s ease;
}

.header-carousel .owl-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.header-carousel .owl-dot:hover {
    background: var(--primary);
}

/* Uniform gallery cards: keep varying images tidy */
.event-gallery .owl-carousel .item {
    padding: 6px;
}

.event-gallery .owl-carousel .item img {
    display: block;
    width: 100%;
    height: 240px; /* unified card height */
    object-fit: cover; /* crop to fill keeping center */
    object-position: center;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

@media (max-width: 576px) {
    .event-gallery .owl-carousel .item img {
        height: 200px;
        border-radius: 6px;
    }
}

.page-header {
    background: linear-gradient(rgba(24, 29, 56, .7), rgba(24, 29, 56, .7)), url(../img/test_1.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
}

.page-header-inner {
    background: rgba(15, 23, 43, .7);
}

.breadcrumb-item + .breadcrumb-item::before {
    color: var(--light);
}

/*** Section Title ***/
.section-title {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
}

.section-title::before {
    position: absolute;
    content: "";
    width: calc(100% + 80px);
    height: 2px;
    top: 4px;
    left: -40px;
    background: var(--primary);
    z-index: -1;
}

.section-title::after {
    position: absolute;
    content: "";
    width: calc(100% + 120px);
    height: 2px;
    bottom: 5px;
    left: -60px;
    background: var(--primary);
    z-index: -1;
}

.section-title.text-start::before {
    width: calc(100% + 40px);
    left: 0;
}

.section-title.text-start::after {
    width: calc(100% + 60px);
    left: 0;
}

/*** Service ***/
.service-item {
    background: var(--light);
    transition: .5s;
}

.service-item:hover {
    margin-top: -10px;
    background: var(--primary);
}

.service-item * {
    transition: .5s;
}

.service-item:hover * {
    color: var(--light) !important;
}

/*** Categories & Courses ***/
.category img,
.course-item img {
    transition: .5s;
}

.category a:hover img,
.course-item:hover img {
    transform: scale(1.1);
}

/* Home disseminations grid */
#home-disseminations .card-img-top {
    height: 200px;
    object-fit: cover;
}

/* Announcements aggregated grid */
#announcements-aggregated .card-img-top {
    width: 100%;
    height: 240px;
    object-fit: cover;
    object-position: center; /* keep subject centered when cropping */
    display: block;
}

@media (max-width: 768px) {
    #announcements-aggregated .card-img-top {
        height: 200px;
    }
}

/*** Team ***/
.team-item img {
    transition: .5s;
}

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

/*** Testimonial ***/
.testimonial-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.testimonial-carousel::after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

@media (min-width: 768px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 200px;
    }
}

@media (min-width: 992px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 300px;
    }
}

/* afis (modal vs poster) */
.afis {
    max-width: 100%;
    height: auto;
}

/*** Temizlenmiş logo / flag / partner düzeni ***/

/* AB logoları: tek satır, aralarında h/4, birlikte küçülme, aynı yükseklik */
.logo-usage-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap);
    flex-wrap: nowrap;
    overflow: hidden;
}

.logo-usage-row .logo-wrapper {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.logo-usage-row img {
    height: var(--logo-height);
    width: auto;
    max-width: 100%;
    object-fit: contain;
    display: block;
    margin: 0;
}

/* Bayraklar: aynı mantık */
.flag-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--gap);
    flex-wrap: nowrap;
}

.flag-row .flag-wrapper {
    flex: 0 1 auto;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

.flag-row img {
    max-height: var(--logo-height);
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0;
}

/* Partner logoları / kutular minimal, logo yüksekliğiyle sınırlı */
.service-item {
    padding: 8px;
    background: transparent;
    display: flex;
    justify-content: center;
    align-items: center;
}

.partner-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}

.partner-logo,
.service-item img {
    max-height: var(--logo-height);
    width: auto;
    object-fit: contain;
    display: block;
    margin: 0 auto;
}

/* Responsive: dar ekranlarda hepsi birlikte küçülsün */
@media (max-width: 768px) {
    :root {
        --logo-height: 50px;
    }
    .logo-usage-row {
        gap: calc(var(--logo-height) / 4);
    }
    .flag-row {
        gap: calc(var(--logo-height) / 4);
    }
    .logo-usage-row img,
    .flag-row img,
    .partner-logo,
    .service-item img {
        height: var(--logo-height);
        max-height: var(--logo-height);
    }
}

/* Sadece üçüncü logo (EN_Co) için büyütme */
.logo-usage-row img.logo-enco {
    height: calc(var(--logo-height) * 1.07) !important;
    max-height: calc(var(--logo-height) * 1.4);
    width: auto;
    object-fit: contain;
}

@media (max-width: 768px) {
    .logo-usage-row img.logo-enco {
        height: calc(var(--logo-height) * 1.07) !important;
        max-height: calc(var(--logo-height) * 1.3);
    }
}