* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
    overflow-x: hidden;
}
header {
    text-align: center;
    display: flex;
    flex-direction: column;
}
header .top-line {
    background-color: #ffe400;
    height: 4px;
    width: 100%;
}
header .logo-menu-container {
    background-color: #FFF;
    padding: 15px 20px;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 15px;
}
header img {
    max-width: 200px;
    height: auto;
    flex-shrink: 0;
}
header h1 {
    font-size: 28px;
    margin: 0;
    color: #333;
    display: none;
}
nav {
    background-color: #ffe400;
    padding: 12px 20px;
    text-align: center;
    z-index: 100;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: nowrap;
    margin-left: auto;
    flex-shrink: 0;
}
nav ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    flex-wrap: nowrap;
}
nav ul li {
    margin: 0 5px;
}
nav ul li a {
    color: #333;
    text-decoration: none;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 5px;
    transition: color 0.3s ease, background-color 0.3s ease;
    display: block;
    white-space: nowrap;
}
nav ul li a:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: #333;
}
main {
    padding: 40px;
    text-align: center;
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    main {
        padding: 20px 15px;
    }
}
.section {
    margin-bottom: 70px;
    padding: 40px;
    background-color: #FFF;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 768px) {
    .section {
        padding: 20px 15px;
        margin-bottom: 40px;
    }
}

.section h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #000;
    text-align: center;
}

@media (max-width: 768px) {
    .section h2 {
        font-size: 26px;
    }
}
#about-us p, #vision p {
    text-align: left;
    font-size: 18px;
    line-height: 1.8;
    color: #555;
}
.bus-photo {
    max-width: 100%;
    height: auto;
    margin-top: 30px;
    border-radius: 10px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}
.bus-photo:hover {
    transform: scale(1.04);
}
footer {
    background-color: #333;
    color: white;
    padding: 30px 0;
    text-align: center;
    margin-top: 70px;
    border-top: 1px solid #555;
}
.routes-button, .about-button {
    background-color: #ffe400;
    color: #333;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 20px;
    font-weight: 600;
    margin: 15px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.routes-button:hover, .about-button:hover {
    background-color: #FFC300;
    transform: scale(1.06);
}
#home h2 {
    font-size: 4rem;
    color: #000;
}
#home p {
    font-size: 1.4rem;
    color: #555;
    margin-bottom: 2.5rem;
}
@media (max-width: 768px) {
    nav ul li {
        display: block;
        margin: 20px 0;
    }
    nav ul {
        flex-direction: column;
    }
    header {
        flex-direction: column;
    }
    header img {
        margin-bottom: 1.5rem;
    }
    .routes-button, .about-button {
        width: 100%;
        margin: 15px 0;
    }
}
@media (max-width: 480px) {
    h1 {
        font-size: 28px;
    }
    .section h2 {
        font-size: 32px;
    }
    #home h2 {
        font-size: 3rem;
    }
    #home p {
        font-size: 1.2rem;
    }
}
/* Haberler Stilleri */
#news {
    text-align: center;
}
#news-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 40px;
}
.news-item {
    width: 25%;
    margin: 25px;
    padding: 25px;
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}
.news-item:hover {
    transform: translateY(-5px);
}
.news-item img {
    width: 100%;
    height: auto;
    border-radius: 5px;
    margin-bottom: 20px;
    object-fit: cover;
    height: 250px;
}
.news-item h3 {
    font-size: 24px;
    margin-bottom: 15px;
    color: #ffe400;
}
.news-item p {
    font-size: 18px;
    line-height: 1.7;
    color: #555;
    flex-grow: 1;
}
.news-item a {
    display: inline-block;
    margin-top: 20px;
    color: #ffe400;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}
.news-item a:hover {
    color: #FFC300;
}
@media (max-width: 992px) {
    .news-item {
        width: 45%;
        margin: 25px;
    }
}
@media (max-width: 768px) {
    .news-item {
        width: 90%;
        margin: 25px auto;
    }
}

/* Güzergah Stilleri */
#routes-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 20px;
}
.route-item {
    flex: 0 0 300px;
    height: auto;
    margin: 10px;
    padding: 15px;
    background-color: #FFF;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform 0.3s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background-color: #fff59d;
    text-decoration: none;
    color: inherit;
}
.route-item:hover {
    transform: translateY(-5px);
}
.route-item h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: #333;
}
.route-details {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #FFF;
    padding: 15px;
    border-radius: 0 0 10px 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 10;
    text-align: left;
    animation: slideIn 0.3s ease-in-out;
    width: 100%;
    box-sizing: border-box;
    max-height: 200px;
    overflow-y: auto;
}
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.route-item.active .route-details {
    display: block;
}
.route-details p {
    margin-bottom: 10px;
    font-size: 16px;
    color: #555;
}
.route-details ul {
    list-style-type: disc;
    padding-left: 20px;
    margin-bottom: 15px;
}
.route-details li {
    font-size: 16px;
    color: #555;
    line-height: 1.7;
}
.carousel-controls {
    display: none;
}
.carousel-control {
    background-color: #ffe400;
    color: #333;
    border: none;
    padding: 10px 15px;
    margin: 0 10px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
.carousel-control:hover {
    background-color: #FFC300;
    transform: scale(1.1);
}
.carousel-control:disabled {
    background-color: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
}
@media (max-width: 768px) {
    .route-item {
        flex: 0 0 100%;
        margin: 10px 0;
    }
}
.burger-menu {
    display: none;
    flex-direction: column;
    cursor: pointer;
    padding: 5px;
}
.burger-menu div {
    width: 25px;
    height: 3px;
    background-color: #333;
    margin: 5px 0;
    transition: transform 0.3s ease;
}
.burger-menu.active div:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}
.burger-menu.active div:nth-child(2) {
    opacity: 0;
}
.burger-menu.active div:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}
@media (max-width: 768px) {
    nav {
        position: static;
        padding: 10px;
    }
    nav ul {
        display: none;
        flex-direction: column;
        background-color: #fff;
        position: fixed;
        top: 0;
        right: -280px;
        width: 250px;
        height: 100vh;
        padding: 80px 20px 20px 20px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        margin: 0;
        transition: right 0.3s ease;
    }
    nav ul.active {
        display: flex;
        right: 0;
    }
    nav ul li {
        margin: 0;
        border-bottom: 1px solid #eee;
    }
    nav ul li a {
        padding: 15px 10px;
        display: block;
        text-align: left;
        font-size: 16px;
    }
    .burger-menu {
        display: flex;
        z-index: 1001;
        position: relative;
    }
}

/* Mobile Header & Slogan Fixes */
@media (max-width: 992px) {
    header .logo-menu-container {
        padding: 15px;
        gap: 10px;
    }
    header img {
        max-width: 150px;
    }
    .slogan-text {
        font-size: 16px !important;
        padding: 10px 15px !important;
        max-width: 180px !important;
    }
}

@media (max-width: 768px) {
    header .logo-menu-container {
        flex-wrap: nowrap;
        justify-content: space-between;
        padding: 10px 15px;
    }
    header img {
        max-width: 120px;
    }
    header .slogan-text {
        display: none !important;
    }
    nav {
        padding: 8px 12px;
        margin-left: auto;
    }
    nav ul li a {
        padding: 8px 12px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    header img {
        max-width: 100px;
    }
    header .logo-menu-container {
        padding: 8px 10px;
    }
}

/* Toast Popup Stilleri */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #4caf50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-size: 1rem;
    z-index: 1000;
    opacity: 1;
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}
.toast-warning {
    background-color: #f39c12;
}
.toast-info {
    background-color: #3498db;
}
.toast-success{
     background-color: #2ecc71;
}

.toast.fade-out {
    opacity: 0;
    transform: translateY(20px);
}

/* ========== MOBILE RESPONSIVENESS FIXES ========== */

/* Home Section Mobile */
@media (max-width: 992px) {
    #home {
        flex-direction: column !important;
        padding: 25px !important;
        gap: 25px !important;
    }
    #home > div {
        width: 100% !important;
    }
}

@media (max-width: 768px) {
    #home {
        padding: 15px !important;
        gap: 20px !important;
    }
    #home > div {
        width: 100% !important;
    }
    #home > div > img {
        max-width: 100% !important;
    }
    #home > div > p {
        font-size: 15px !important;
    }
    #carousel-text {
        font-size: 14px !important;
        min-height: auto !important;
    }
}

/* Routes Section Mobile */
@media (max-width: 992px) {
    #routes {
        flex-direction: column !important;
        padding: 25px !important;
    }
    #routes > img {
        max-width: 100% !important;
        margin-bottom: 20px;
    }
    #routes-container {
        text-align: center !important;
        margin-left: 0 !important;
        width: 100%;
    }
}

@media (max-width: 768px) {
    #routes {
        padding: 15px !important;
    }
    #routes-container .route-item {
        flex: 0 0 100% !important;
        margin: 8px 0 !important;
    }
}

/* News Section Mobile */
@media (max-width: 768px) {
    #news-container {
        flex-direction: column;
        align-items: center;
    }
    .news-item {
        width: 100% !important;
        margin: 15px 0 !important;
    }
    .news-item img {
        height: 200px !important;
    }
    .news-item h3 {
        font-size: 20px !important;
    }
    .news-item p {
        font-size: 15px !important;
    }
}

/* Footer Mobile */
@media (max-width: 768px) {
    footer {
        padding: 20px 15px;
        margin-top: 40px;
    }
    footer p {
        font-size: 14px;
    }
}

/* Haber Detay Mobile */
@media (max-width: 768px) {
    .haber-detay {
        padding: 15px !important;
        margin: 20px auto !important;
    }
    .haber-detay h1 {
        font-size: 24px !important;
    }
    .haber-gorsel {
        max-width: 100% !important;
    }
    .haber-icerik {
        font-size: 15px !important;
    }
}

/* General Mobile Image Fix */
@media (max-width: 768px) {
    img {
        max-width: 100%;
        height: auto;
    }
}

/* Prevent horizontal overflow globally */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

main, section, .section {
    max-width: 100%;
    overflow-x: hidden;
}