/*
Theme Name: MGGrup Teması Pro
Theme URI: https://mggrupinsaat.com.tr
Author: mggrupinsaat.com.tr
Description: Gelişmiş özellikli inşaat teması
Version: 2.1
License: GPL
Text Domain: mggrupinsaat.com.tr
*/

/* ========== PRELOADER ========== */
.mg-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #1a2a3a;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

.mg-loader.is-hidden {
    opacity: 0;
    visibility: hidden;
}

.mg-loader-brand {
    animation: mgLoaderPulse 2s ease-in-out infinite;
    margin-bottom: 25px;
}

.mg-loader-brand img {
    max-width: 150px;
    height: auto;
}

.mg-loader-brand svg {
    width: 100px;
    height: 100px;
}

.mg-loader-text-wrap {
    display: flex;
    align-items: center;
    height: 30px;
}

.mg-loader-text {
    color: #f4c842;
    font-size: 1.2rem;
    font-weight: 500;
    letter-spacing: 1px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    text-shadow: 0 0 10px rgba(244, 200, 66, 0.3);
}

.mg-loader-cursor {
    color: #f4c842;
    font-size: 1.2rem;
    font-weight: 300;
    animation: mgLoaderCursorBlink 0.8s step-end infinite;
}

@keyframes mgLoaderPulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@keyframes mgLoaderCursorBlink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

/* ========== TEMEL SIFIRLAMA ========== */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

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

img {
    max-width: 100%;
    height: auto;
}

/* ========== HEADER ========== */
.site-header {
    background: #1a2a3a;
    color: white;
    padding: 15px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    position: relative;
    z-index: 1000;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

/* Site Branding (logo + başlık) */
.site-branding {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.custom-logo-wrapper {
    flex-shrink: 0;
}

.custom-logo-wrapper img {
    display: block;
    max-height: 60px;
    width: auto;
}

.site-title-wrapper {
    display: flex;
    flex-direction: column;
}

.site-title {
    margin: 0;
    font-size: 1.8rem;
    line-height: 1.2;
}

.site-title a {
    color: white;
    text-decoration: none;
}

.site-description {
    margin: 2px 0 0;
    font-size: 0.9rem;
    color: #ccc;
}

/* Ana Menü - Tüm linkler buton görünümünde */
.main-navigation ul {
    list-style: none;
    display: flex;
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin-left: 8px;
}

.main-navigation a {
    color: #f0f0f0;
    text-decoration: none;
    font-weight: 500;
    padding: 8px 16px;
    border-radius: 6px;
    background-color: rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

.main-navigation a:hover {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.18);
}

/* Aktif menü öğesi */
.main-navigation .current-menu-item a {
    color: #fff;
    background-color: rgba(255, 255, 255, 0.15);
}

/* Mobil Menü Butonu */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

/* ========== HERO SLIDER ========== */
.hero-slider {
    width: 100%;
    height: 550px;
    position: relative;
    overflow: hidden;
}

.swiper-slide {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    position: relative;
}

.swiper-slide::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
}

.slide-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
    padding: 20px;
}

.slide-content h2 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

.slide-content p {
    font-size: 1.3rem;
    margin-bottom: 25px;
}

.slide-content .btn {
    display: inline-block;
    padding: 14px 35px;
    background: #f4c842;
    color: #1a2a3a;
    text-decoration: none;
    font-weight: bold;
    border-radius: 30px;
    transition: background 0.3s;
}

.slide-content .btn:hover {
    background: #e0b830;
}

/* Swiper Navigasyon */
.swiper-button-next, .swiper-button-prev {
    color: white !important;
}

.swiper-pagination-bullet {
    background: white !important;
    opacity: 0.7;
}

.swiper-pagination-bullet-active {
    opacity: 1;
}

/* ========== BÖLÜM BAŞLIKLARI ========== */
.section-title {
    text-align: center;
    font-size: 2.2rem;
    color: #1a2a3a;
    margin: 60px 0 15px;
    position: relative;
}

.section-subtitle {
    text-align: center;
    color: #666;
    margin-bottom: 40px;
    font-size: 1.1rem;
}

/* ========== REFERANS SLIDER ========== */
.testimonials-section {
    background: #1a2a3a;
    color: white;
    padding: 60px 0;
    margin: 40px 0;
}

.testimonial-slider {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.testimonial-slide {
    padding: 20px;
}

.testimonial-text {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 20px;
}

.testimonial-author {
    font-weight: bold;
    color: #f4c842;
}

/* ========== PROJELER GRID ========== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 25px;
    padding: 40px 0;
}

.project-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.project-card:hover {
    transform: translateY(-5px);
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
    cursor: pointer;
}

/* Varsayılan resim yoksa */
.project-img-placeholder {
    width: 100%;
    height: 250px;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 3rem;
}

.project-info {
    padding: 20px;
}

.project-info h3 {
    margin: 0 0 10px;
}

.status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
}

.status-ongoing { background: #ffeaa7; color: #d68910; }
.status-completed { background: #d4edda; color: #155724; }
.status-planned { background: #e2e3e5; color: #383d41; }

/* ========== SAYFALAMA (BUTONLU) ========== */
.pagination {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin: 30px 0;
}

.pagination .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background-color: #fff;
    color: #1a2a3a;
    text-decoration: none;
    font-weight: 500;
    border-radius: 6px;
    border: 1px solid #ddd;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.pagination .page-numbers.current {
    background-color: var(--accent-color, #f4c842);
    color: var(--primary-color, #1a2a3a);
    border-color: var(--accent-color, #f4c842);
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(244, 200, 66, 0.3);
}

.pagination .page-numbers:hover:not(.current):not(.dots) {
    background-color: var(--primary-color, #1a2a3a);
    color: #fff;
    border-color: var(--primary-color, #1a2a3a);
}

.pagination .page-numbers.dots {
    background: none;
    border: none;
    color: #666;
    min-width: 20px;
    padding: 0;
}

.pagination .next,
.pagination .prev {
    font-weight: 600;
}

/* ========== VİDEO BÖLÜMÜ ========== */
.video-section {
    padding: 60px 0;
    background: #f9f9f9;
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto;
}

.video-wrapper iframe {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ========== HAKKIMIZDA ========== */
.about-section {
    background: white;
    padding: 60px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    font-size: 1.1rem;
    text-align: center;
}

/* ========== İLETİŞİM SAYFASI ========== */
.contact-page {
    padding: 60px 0;
}

.contact-map-wrapper {
    max-width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.contact-map-wrapper iframe {
    display: block;
    width: 100%;
    height: 450px;
    border: none;
}

/* ========== FOOTER ========== */
.site-footer {
    background: #1a2a3a;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 0;
}

/* ========== BİZE ULAŞIN BÖLÜMÜ ========== */
.site-contact-bar {
    background: #1a2a3a;
    color: white;
    padding: 40px 0;
    border-top: 3px solid #f4c842;
    margin-top: 40px;
}

.contact-bar-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

.contact-bar-info h3 {
    margin: 0 0 15px;
    font-size: 1.4rem;
    color: #f4c842;
}

.contact-bar-info p {
    margin: 8px 0;
    font-size: 0.95rem;
    line-height: 1.5;
}

.contact-bar-info a {
    color: white;
    text-decoration: none;
}

.contact-bar-info a:hover {
    color: #f4c842;
}

.contact-bar-editor {
    margin-top: 15px;
}

.contact-bar-editor p {
    margin: 8px 0;
}

.contact-bar-editor ul,
.contact-bar-editor ol {
    margin: 10px 0 10px 20px;
    padding: 0;
}

.contact-bar-map {
    height: 250px;
    border-radius: 8px;
    overflow: hidden;
}

.contact-bar-map iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* ========== ARAMA VE 404 SAYFALARI ========== */
.search-page,
.error404-page {
    padding: 60px 0;
    text-align: center;
}

.search-form {
    display: flex;
    max-width: 500px;
    margin: 20px auto;
}

.search-form input[type="search"] {
    flex: 1;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-family: inherit;
}

.search-form button {
    padding: 12px 20px;
    background: #1a2a3a;
    color: white;
    border: none;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

/* ========== LIGHTBOX (Fancybox) ========== */
.fancybox__container {
    z-index: 9999;
}

/* ========== GALERİ STİLLERİ ========== */
.gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 20px 0;
}

.gallery-item {
    flex: 0 0 auto;
    width: auto;
    margin: 0;
}

.gallery-item img {
    display: block;
    height: 180px;
    width: auto;
    border-radius: 4px;
    transition: transform 0.3s;
    cursor: pointer;
}

.gallery-item img:hover {
    transform: scale(1.05);
}

.gallery-caption {
    display: none;
}

/* ========== YUKARI ÇIK BUTONU (MODERN SAĞ KENAR) ========== */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 44px;
    height: auto;
    background-color: var(--primary-color, #1a2a3a);
    color: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px 6px;
    gap: 4px;
    opacity: 0;
    visibility: hidden;
    transform: translateX(10px);
    transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease, background-color 0.3s ease;
    z-index: 998;
    box-shadow: 0 2px 12px rgba(0,0,0,0.25);
    writing-mode: horizontal-tb;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.back-to-top:hover {
    background-color: var(--accent-color, #f4c842);
    color: var(--primary-color, #1a2a3a);
    transform: translateY(-3px);
    box-shadow: 0 4px 18px rgba(0,0,0,0.3);
}

.back-to-top:active {
    transform: translateY(0);
}

.back-to-top svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.back-to-top-text {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    line-height: 1;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        flex-shrink: 0;
    }

    .site-header .container {
        flex-wrap: nowrap;
    }
    
    .main-navigation {
        display: none;
        width: 100%;
        background: #1a2a3a;
        padding: 20px 0;
        position: absolute;
        top: 100%;
        left: 0;
    }
    
    .main-navigation.active {
        display: block;
    }
    
    .main-navigation ul {
        flex-direction: column;
        align-items: center;
    }
    
    .main-navigation li {
        margin: 5px 0;
    }
    
    .main-navigation a {
        display: block;
        padding: 10px 24px;
    }
    
    .hero-slider {
        height: 400px;
    }
    
    .slide-content h2 {
        font-size: 2rem;
    }
    
    .projects-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .gallery {
        flex-direction: column;
        gap: 10px;
    }
    
    .gallery-item img {
        width: 100%;
        height: auto;
    }

    .site-branding {
        flex-wrap: wrap;
        text-align: left;
        gap: 5px 10px;
        max-width: calc(100% - 50px);
        overflow: hidden;
    }
    
    .custom-logo-wrapper {
        flex-shrink: 0;
    }
    
    .custom-logo-wrapper img {
        max-height: 45px;
    }

    .site-title-wrapper {
        flex: 1;
        min-width: 0;
    }

    .site-title {
        font-size: 1.4rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .site-description {
        width: 100%;
        flex-basis: 100%;
        margin-top: 5px;
        font-size: 0.8rem;
    }

    .contact-bar-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-bar-info {
        text-align: center;
    }
    
    .contact-bar-map {
        height: 200px;
    }
    
    .contact-map-wrapper iframe {
        height: 300px;
    }
    
    .back-to-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        padding: 8px 4px;
        border-radius: 6px;
    }
    
    .back-to-top svg {
        width: 18px;
        height: 18px;
    }
    
    .back-to-top-text {
        font-size: 0.65rem;
    }

    .mg-loader-text {
        font-size: 1rem;
    }
    
    .mg-loader-cursor {
        font-size: 1rem;
    }

    .pagination .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 0.85rem;
    }
}