:root {
    --primary-color: #a11b1d;
    --secondary-color: #e34b14;
    --accent-color: #bd7b09;
    --gradient-bg: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    --bs-primary-rgb: 227, 75, 20;

    /* Premium soft background palette */
    --bg-base:    #faf7f3;   /* warm ivory – main page background */
    --bg-surface: #fbfdf5;   /* near-white warm – cards & panels */
    --bg-alt:     #faf7f3;   /* slightly deeper warm – alternating sections */
}

body {
    font-family: 'Poppins', sans-serif;
    overflow-x: hidden;
    background-color: var(--bg-base);
}

.hero-section {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center;
    will-change: opacity;
}

.hero-slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--bg-base), transparent);
}
#hero-first-slide {
    background-image: url('img/gallery1-placeholder.jpg');
    /* İsteğe bağlı: Resim tam yüklenene kadar hafif bir bulanıklık efekti */
    filter: blur(5px);
    transition: filter 0.5s ease-out, background-image 1s ease-in-out;
}

#hero-first-slide.loaded {
    background-image: var(--bg-image);
    filter: blur(0);
}

.nav-link {
    color: white !important;
    transition: 0.3s;
    font-weight: 500;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background: var(--secondary-color);
    transition: 0.3s;
}

.nav-link:hover::after {
    width: 100%;
}

.section {
    padding: 120px 0;
}

.team-member {
    text-align: center;
    margin-bottom: 40px;
    background: var(--bg-surface);
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.12);
    transition: 0.3s;
    height: 91%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

.team-member img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin-bottom: 20px;
    object-fit: cover;
    border: 5px solid var(--accent-color);
}

.team-member .role {
    color: var(--accent-color);
    font-weight: bold;
    margin-bottom: 15px;
}

.team-member .social-links {
    margin-top: auto;
    padding-top: 1px;
}

.team-member .social-links a {
    color: var(--primary-color);
    margin: 0 10px;
    font-size: 1.2rem;
    transition: 0.3s;
}

.team-member .social-links a:hover {
    color: var(--accent-color);
    transform: scale(1.2);
}

.project-card {
    border-radius: 20px;
    overflow: hidden;
    transition: 0.3s;
    background: var(--bg-surface);
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.project-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
}

.project-card .card-body {
    padding: 25px;
}

.section h2 {
    background: var(--gradient-bg);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    margin-bottom: 50px;
}

.team-category {
    margin-bottom: 60px;
}

.team-category h3 {
    color: var(--primary-color);
    margin-bottom: 30px;
    text-align: center;
}

/* Responsive team member grid using CSS Grid */
.team-category .row {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.team-category .row > [class*="col"] {
    width: 100%;
    max-width: 100%;
    flex: none;
    padding: 0;
    margin-bottom: 0;
}

/* Vizyon-Misyon: mobilde kartlar arası boşluk */
@media (max-width: 767.98px) {
    #vision .row {
        gap: 1.5rem;
    }
}

/* Mobile: always show at least 2 cards per row */
@media (max-width: 640px) {
    .team-category .row {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .team-member {
        padding: 18px 12px 16px;
    }

    .team-member img {
        width: 80px;
        height: 80px;
    }

    .team-member h4 {
        font-size: 0.9rem;
    }

    .team-member p {
        font-size: 0.78rem;
    }

    .team-member .role {
        font-size: 0.72rem;
    }

    .team-member .social-links a {
        width: 30px;
        height: 30px;
        font-size: 0.85rem;
    }
}

/* Smooth scroll behavior for the entire page */
html {
    scroll-behavior: smooth;
}

/* Enhanced navbar animations */
.navbar {
    transition: all 0.4s ease;
    background: transparent !important;
}

.navbar.scrolled {
    background: rgba(33, 37, 41, 0.98) !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Enhanced hero section animations */
.hero-section h1 {
    animation: fadeInDown 1.5s ease;
}

.hero-section p {
    animation: fadeInUp 1.5s ease 0.5s both;
}

.hero-section .btn {
    animation: fadeInUp 1.5s ease 1s both;
}

/* Enhanced project card animations */
.project-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.project-card:hover {
    transform: translateY(-15px) scale(1.02);
}

.project-card img {
    transition: all 0.5s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

/* Team member card enhanced animations */
.team-member {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.team-member:hover {
    transform: translateY(-15px) scale(1.02);
}

.team-member img {
    transition: all 0.5s ease;
}

.team-member:hover img {
    transform: scale(1.1) rotate(5deg);
}

/* Keyframe animations */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.achievement-card {
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    text-align: center;
}

.achievement-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1) !important;
}

.achievement-icon {
    transition: all 0.3s ease;
}

.achievement-card:hover .achievement-icon {
    transform: scale(1.1);
}

/* Eğitim portalı için kapsamlı stil resetlemesi */
.education-portal,
.education-portal:link,
.education-portal:visited,
.education-portal:hover,
.education-portal:active,
.education-portal:focus {
    text-decoration: none !important;
    outline: none !important;
    box-shadow: none !important;
    -webkit-tap-highlight-color: transparent !important;
}

/* Sadece hover efektlerini koruyalım */
.education-portal {
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 20px;
    padding: 8px 16px !important;
    margin-left: 10px;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease !important;
    border: none !important;
}

.education-portal:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2) !important;
}

/* Mobil cihazlar için dokunmatik efektini kaldır */
@media (max-width: 991px) {
    .education-portal {
        -webkit-tap-highlight-color: transparent;
        user-select: none;
        -webkit-user-select: none;
    }
}

/* Uçan uçak animasyonları */
.flying-plane-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.flying-plane {
    position: absolute;
    top: 0;
    left: 0;
    color: rgba(255, 255, 255, 0.8);
    will-change: transform;
    pointer-events: none;
}

.flying-plane-v1 { font-size: 2rem;   opacity: 0.9; animation: flyPath1 15s linear infinite; }
.flying-plane-v2 { font-size: 1.4rem;  opacity: 0.6; animation: flyPath2 21s linear infinite -8s; }
.flying-plane-v3 { font-size: 1.1rem;  opacity: 0.45; animation: flyPath3 18s linear infinite -13s; }
.flying-plane-v4 { font-size: 1.8rem;  opacity: 0.55; animation: flyPath4 24s linear infinite -4s; }
.flying-plane-v5 { font-size: 1rem;    opacity: 0.35; animation: flyPath5 28s linear infinite -20s; }

.achievement-plane-container {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
    left: 0;
    top: 0;
}

.achievement-plane {
    position: absolute;
    top: 0;
    left: 0;
    font-size: 1.5rem;
    color: var(--primary-color);
    will-change: transform;
    animation: flyAcrossReverse 20s linear infinite;
    pointer-events: none;
    opacity: 0.6;
}

@keyframes flyPath1 {
    0%   { transform: translate(-5vw,  80vh) rotate(-45deg); }
    100% { transform: translate(105vw, 20vh) rotate(-45deg); }
}
@keyframes flyPath2 {
    0%   { transform: translate(-5vw,  45vh) rotate(-18deg); }
    100% { transform: translate(105vw, 28vh) rotate(-18deg); }
}
@keyframes flyPath3 {
    0%   { transform: translate(-5vw,  22vh) rotate(14deg); }
    100% { transform: translate(105vw, 62vh) rotate(14deg); }
}
@keyframes flyPath4 {
    0%   { transform: translate(105vw, 58vh) rotate(200deg); }
    100% { transform: translate(-5vw,  35vh) rotate(200deg); }
}
@keyframes flyPath5 {
    0%   { transform: translate(-5vw,  88vh) rotate(-55deg); }
    100% { transform: translate(105vw, 12vh) rotate(-55deg); }
}

@keyframes flyAcross {
    0%   { transform: translate(-5vw, 80vh) rotate(-45deg); }
    100% { transform: translate(105vw, 20vh) rotate(-45deg); }
}

@keyframes flyAcrossReverse {
    0%   { transform: translate(105vw, 20vh) rotate(135deg); }
    100% { transform: translate(-5vw, 80vh) rotate(135deg); }
}

@keyframes wobble {
    0%, 100% {
        transform: rotate(-45deg) translate(0, 0);
    }
    25% {
        transform: rotate(-40deg) translate(5px, -5px);
    }
    75% {
        transform: rotate(-50deg) translate(-5px, 5px);
    }
}

/* Mobil slayt: GPU-hızlandırılmış kayma animasyonu */
@keyframes mobilePanSlide {
    from { transform: translate3d(-8%, 0, 0); }
    to   { transform: translate3d(-40%, 0, 0); }
}

/* Mobil cihazlar için uçak boyutu ayarı */
@media (max-width: 768px) {
    .flying-plane-v1 { font-size: 1.4rem; }
    .flying-plane-v2 { font-size: 1rem; }
    .flying-plane-v3 { font-size: 0.8rem; }
    .flying-plane-v4 { font-size: 1.2rem; }
    .flying-plane-v5 { font-size: 0.7rem; }
    .achievement-plane {
        font-size: 1rem;
    }


    /* Resmi tam yüksekliğe sabitle — yatay resim ekrandan daha geniş olur */
    .hero-slide {
        background-size: auto 100%;
        background-position: 50% center;
        width: 170%;
        will-change: transform, opacity;
    }

    /* Aktif slayt soldan sağa kayar (6 sn = setInterval süresiyle eşleşir) */
    .hero-slide.active {
        animation: mobilePanSlide 6s linear forwards;
    }
}

/* Override Bootstrap bg-light and bg-white */
.bg-light {
    background-color: var(--bg-alt) !important;
}

.bg-white {
    background-color: var(--bg-surface) !important;
}

.p-4.bg-white,
.achievement-card.bg-white {
    background-color: var(--bg-surface) !important;
}

.contact-email {
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
}

.contact-email:hover {
    color: var(--accent-color) !important;
    transform: translateX(5px);
}

.contact-email i {
    transition: all 0.3s ease;
}

.contact-email:hover i {
    transform: rotate(15deg);
}

/* Navbar toggle button düzenlemeleri */
.custom-toggler {
    color: white !important; /* Rengi beyaz yapıyoruz */
    font-size: 1.5rem;
    padding: 4px 12px !important;
    border: 1px solid rgba(255,255,255,0.3) !important; /* Hafif bir border ekliyoruz */
}

.custom-toggler:hover {
    background: rgba(255,255,255,0.1);
}

.custom-toggler i {
    display: block !important; /* İkonun görünürlüğünü garantiliyoruz */
}

/* Mobil menü düzenlemeleri için ek stiller */
@media (max-width: 991px) {
    .navbar-collapse {
        background: rgba(33, 37, 41, 0.98);
        padding: 1rem;
        border-radius: 10px;
        margin-top: 1rem;
        max-height: calc(100vh - 80px); /* Maksimum yükseklik sınırı */
        overflow-y: auto; /* Gerekirse scroll ekler */
    }
}

/* Logo ve brand stili */
.navbar-brand {
    font-weight: 600;
    letter-spacing: 0.5px;
}

.navbar-brand:hover {
    color: white !important; /* Hover durumunda da beyaz kalmasını sağlar */
}

.brand-text {
    color: white !important;
}

.brand-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    transition: all 0.3s ease;
}

.brand-logo i {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

/* Logo hover efekti */
.navbar-brand:hover .brand-logo {
    transform: rotate(15deg) scale(1.1);
}

/* Mobil görünüm için logo boyutu ayarı */
@media (max-width: 576px) {
    .brand-logo {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
}

/* Eğitim portalı için özel stil */
.education-portal:focus,
.education-portal:active {
    outline: none !important;
    box-shadow: none !important;
    border: none !important;
    text-decoration: none !important;
}

/* Sadece eğitim portalı için hover efektini koruyalım */
.education-portal:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    text-decoration: none !important;
}

/* Logo stili */
.brand-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.navbar-logo {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Logo oranını korur */
}

/* Logo hover efekti */
.navbar-brand:hover .brand-logo {
    transform: rotate(15deg) scale(1.1);
}

/* Mobil görünüm için logo boyutu ayarı */
@media (max-width: 576px) {
    .brand-logo {
        width: 35px;
        height: 35px;
    }
}