/* Critical Performance Optimizations for LCP */
.hero-content,
.hero-content h1,
.hero-content p {
    /* Optimize rendering for LCP elements */
    contain: layout style;
    will-change: auto;
}

/* Lazy Loading Styles */
.lazy-load {
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    background-color: #f0f0f0;
    background-image: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.lazy-loaded {
    opacity: 1;
    background: none;
    animation: none;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Lazy loading için placeholder görsel efekti */
.lazy-load::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40' viewBox='0 0 24 24'%3E%3Cpath fill='%23ccc' d='M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M12,4A8,8 0 0,1 20,12A8,8 0 0,1 12,20A8,8 0 0,1 4,12A8,8 0 0,1 12,4M12,6A6,6 0 0,0 6,12A6,6 0 0,0 12,18A6,6 0 0,0 18,12A6,6 0 0,0 12,6M12,8A4,4 0 0,1 16,12A4,4 0 0,1 12,16A4,4 0 0,1 8,12A4,4 0 0,1 12,8Z'/%3E%3C/svg%3E") no-repeat center;
    opacity: 0.3;
    z-index: 1;
}

.lazy-loaded::before {
    display: none;
}

html, body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
    color: #232946;
    line-height: 1.6;
    background-color: #f4f6fb;
    padding-top: 0;
}

*, *:before, *:after {
    box-sizing: inherit;
}

:root {
    --primary: #2563eb; /* Modern mavi (Tailwind Blue-600) */
    --secondary: #ff8906;
    --background: #f4f6fb;
    --surface: #fff;
    --text: #232946;
    --muted: #6b7280;
    --accent: #e53170;
    --whatsapp: #25d366;
}

header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    padding: 5px 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='100' opacity='0.025' viewBox='0 0 24 24'%3E%3Cpath fill='%232563eb' d='M0.5,12l11.5-10l11.5,10h-2l-9.5-8.5l-9.5,8.5h-2zM3,15h2v8h4v-4h6v4h4v-8h2v8h1v1h-20v-1h1v-8z'/%3E%3C/svg%3E");
    background-repeat: repeat;
}



.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    margin: 0;
    padding: 5px 0;
    flex-wrap: wrap;
    background-color: var(--surface);
    position: relative;
    min-height: 60px;
}

.logo {
    display: flex;
    align-items: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
    margin-left: 20px;
    text-decoration: none;
    transition: all 0.3s ease;
}

.logo:hover {
    color: var(--primary);
    transform: scale(1.02);
}

.logo-img {
    width: 90px;
    height: 60px;
    margin-right: 10px;
    object-fit: contain;
}

.logo-text {
    display: flex;
    flex-direction: column;
    line-height: 1.1;
    font-weight: 700;
}

.logo-text-top {
    font-size: 1.2em;
    color: #2563eb;
}

.logo-text-bottom {
    font-size: 0.9em;
    color: #4a5568;
    text-align: center;
}

.nav-menu {
    display: flex;
    flex: 1;
    justify-content: center;
    align-items: flex-start;
    gap: 30px;
    list-style: none;
    padding: 0;
    margin: 0;
    width: auto;
    flex-wrap: wrap;
    background-color: var(--surface);
}

.nav-menu li {
    display: flex;
    align-items: center;
    background-color: var(--surface);
}

.nav-menu li a {
    color: var(--text);
    text-decoration: none;
    font-size: 0.95em;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
    text-align: center;
    padding: 8px 20px;
    margin: 0 5px;
    background-color: var(--surface);
    letter-spacing: 0.5px;
}

.nav-menu li a:hover {
    color: var(--primary);
}

/* İletişim Butonları */
.contact-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    margin-top: 30px;
}

.whatsapp-contact-btn, .phone-contact-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1.1em;
    font-weight: 500;
    border: none;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    min-width: 200px;
    justify-content: center;
}

.whatsapp-contact-btn {
    background-color: var(--whatsapp);
    color: white;
}

.whatsapp-contact-btn:hover {
    background-color: #20b659;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(34,197,94,0.2);
}

.phone-contact-btn {
    background-color: var(--primary);
    color: white;
}

.phone-contact-btn:hover {
    background-color: #0055cc;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,102,255,0.2);
}

.contact-icon {
    width: 24px;
    height: 24px;
}

/* Blog bölümü */
.blog-posts {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
    padding-top: 15px;
    margin: 0 auto;
    max-width: 1200px;
    grid-auto-rows: auto;
    /* Kısıtlamaları kaldır */
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

/* Blog visibility control - these have higher specificity */
.blog-posts:not(.expanded) .blog-post {
    opacity: 1;
    position: relative;
}

.blog-posts.expanded .blog-post {
    opacity: 1;
    position: relative;
    z-index: auto;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
}

.blog-post {
    display: flex;
    flex-direction: column;
    background-color: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.4s ease, box-shadow 0.4s ease;
    transform: translateY(0);
    opacity: 1;
    position: relative;
    height: 100%;
    z-index: 1;
    margin-bottom: 0;
}

.blog-post:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
    z-index: 2;
}

.blog-post:hover .blog-readmore-btn {
    transform: translateX(-5px);
    background-color: #0055cc;
}

.blog-post:hover img {
    transform: scale(1.05);
}

.blog-post img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-top-left-radius: 8px;
    border-top-right-radius: 8px;
    transition: transform 0.5s ease;
}

.blog-post .blog-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: space-between;
    position: relative;
}

.blog-content h3 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 1.2em;
    color: #2563eb;
    font-weight: 600;
    height: 2.8em;
    min-height: 2.8em;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.blog-content h3 a {
    color: #2563eb;
    text-decoration: none;
}

.blog-content h3 a:hover {
    color: #2563eb;
    text-decoration: none;
}

.blog-summary {
    color: var(--muted);
    font-size: 0.95em;
    line-height: 1.5;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    height: 3em;
}

.blog-readmore-btn {
    display: inline-block;
    color: white;
    background-color: var(--primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95em;
    transition: all 0.3s ease;
    padding: 6px 14px;
    border-radius: 20px;
    margin-top: auto;
    align-self: flex-end;
    position: relative;
    box-shadow: 0 3px 10px rgba(0, 102, 255, 0.15);
    cursor: pointer;
}

.blog-readmore-btn:hover {
    background-color: var(--secondary) !important;
    transform: translateX(-5px);
    box-shadow: 0 4px 15px rgba(255,137,6,0.35) !important;
}

.blog-more-wrapper {
    text-align: center;
    margin: 20px 0 40px;
}

.blog-more-btn {
    display: inline-block;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.blog-more-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,102,255,0.1);
}

/* Blog Modal */
.blog-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-modal.show {
    opacity: 1;
    display: block;
}

.blog-modal-content {
    display: flex;
    flex-direction: row;
    width: 90%;
    max-width: 900px;
    margin: 5% auto;
    min-height: 400px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    position: relative;
    animation: modalFadeIn 0.4s ease-out;
    border-left: none;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-30px);
}
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.blog-modal-image {
    width: 35%;
    min-width: 240px;
    max-width: 320px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.blog-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-modal-text {
    width: 65%;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    overflow-y: auto;
    max-height: 80vh;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' opacity='0.08' viewBox='0 0 20 20'%3E%3Ccircle cx='5' cy='5' r='1' fill='%232563eb'/%3E%3Ccircle cx='15' cy='15' r='1' fill='%232563eb'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

.blog-modal-contact {
    margin-top: 20px;
    width: 100%;
    text-align: right;
}

#blogModalContent h1 {
    color: #3788ff;
    font-size: 1.8em;
    margin: 0 0 15px 0;
    padding-left: 0;
    position: relative;
}

#blogModalContent p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text);
}

.blog-modal-contact-btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.blog-modal-contact-btn:hover {
    background-color: #0055cc;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 102, 255, 0.2);
}

.blog-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.blog-modal-close:hover {
    background-color: var(--secondary);
    transform: rotate(90deg);
}

body.modal-open {
    overflow: hidden;
    }

/* Media Queries for Responsive Blog */
@media (max-width: 480px) {
    .blog-posts {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    /* Çok küçük cihazlarda ilk blogdan sonra gizle */
    .blog-posts:not(.expanded) .blog-post:nth-child(n+2) {
        display: none;
    }
    
    /* Expanded durumunda tüm blogları göster */
    .blog-posts.expanded .blog-post:nth-child(n+2) {
        display: flex !important;
        opacity: 1 !important;
        animation: blogFadeIn 0.3s ease forwards;
    }
    
    .blog-readmore-btn {
        padding: 5px 12px;
        font-size: 0.9em;
    }
    
    /* Blog more butonu için ek stilleme */
    .blog-more-wrapper {
        margin-top: 30px;
        text-align: center;
        clear: both;
    }
    
    .blog-more-btn {
        width: 80%;
        max-width: 300px;
        padding: 12px 20px;
        font-size: 1em;
    }
}

@media (min-width: 481px) and (max-width: 1100px) {
    .blog-posts {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        grid-auto-rows: auto;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Tablet ve mobilde ilk 2 blogdan sonrakileri gizle (1 satır) */
    .blog-posts:not(.expanded) .blog-post:nth-child(n+3) {
        display: none;
    }
    
    /* Expanded durumunda 2'den sonrakileri göster */
    .blog-posts.expanded .blog-post:nth-child(n+3) {
        display: flex !important;
        opacity: 1 !important;
        animation: blogFadeIn 0.3s ease forwards;
        position: relative;
        z-index: auto;
        transform: translateY(0);
    }
    
    /* Expanded durumda grid'in düzgün çalışması için */
    .blog-posts.expanded {
        grid-auto-rows: auto;
        align-items: stretch;
    }
    
    /* Blog post'ların sabit yüksekliği olmaması için */
    .blog-posts.expanded .blog-post {
        height: auto;
        min-height: auto;
    }
}

@media (min-width: 1101px) {
    .blog-posts {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Desktop'ta ilk 3 blogdan sonrakileri gizle (1 satır) */
    .blog-posts:not(.expanded) .blog-post:nth-child(n+4) {
        display: none;
    }
    
    /* Expanded durumunda 3'den sonrakileri göster */
    .blog-posts.expanded .blog-post:nth-child(n+4) {
        display: flex !important;
        opacity: 1 !important;
        animation: blogFadeIn 0.3s ease forwards;
    }
}

/* Hero bölümü için düzenleme - Tam ekran kaplayacak şekilde */
#home {
    margin-top: 0;
    padding-top: 0;
}

.hero-section {
    position: relative;
    width: 100%;
    height: 100vh; /* Fixed header olduğu için tam ekran yükseklik */
    min-height: 420px;
    overflow: hidden;
    margin-top: 0;
    padding-top: 0;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slides {
    width: 100%;
    height: 100%;
    position: relative;
}

.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s ease;
}

.hero-slide.active {
    opacity: 1;
}

.hero-content-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.hero-content {
    text-align: center;
    width: 90%;
    max-width: 650px;
    color: var(--text);
    background: rgba(255,255,255,0.92);
    border-radius: 16px;
    padding: 30px 25px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.07);
    margin: 0 auto;
    /* LCP optimizasyonu */
    contain: layout style;
    transform: translateZ(0);
    backface-visibility: hidden;
}

.hero-content h1 {
    font-size: 2.5em;
    margin-bottom: 15px;
    color: #2563eb;
    font-weight: 700;
    /* LCP optimizasyonu */
    contain: layout style;
    will-change: auto;
}

.hero-content p {
    font-size: 1.1em;
    margin-bottom: 25px;
    color: var(--muted);
    /* LCP optimizasyonu */
    contain: layout style;
    will-change: auto;
    max-width: 600px;
    line-height: 1.5;
}

.cta-button {
    background-color: #2563eb;
    color: #fff;
    padding: 15px 35px;
    text-decoration: none;
    font-size: 1.1em;
    border-radius: 30px;
    transition: all 0.3s ease;
    font-weight: 500;
    box-shadow: 0 4px 15px rgba(0,102,255,0.13);
}

.cta-button:hover {
    background-color: #0055cc;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255,137,6,0.18);
}

section {
    padding: 50px 20px;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}

section h2 {
    font-size: 2.5em;
    margin-bottom: 30px;
    color: #2563eb;
    font-weight: 700;
}

#about p, #contact p {
    font-size: 1.2em;
    max-width: 800px;
    margin: 0 auto 20px auto;
    text-align: center;
    color: var(--muted);
}

#contact strong {
    color: #2563eb;
}

/* Çalışmalarımız Galerisi */
#works h2 {
    margin-bottom: 5px;
}

.works-gallery {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-gap: 20px;
    margin: 30px auto 0;
    max-width: 1200px;
    width: 100%;
    padding: 30px 30px 20px;
    max-height: 600px; /* 2.4 satır için hesaplanacak */
    overflow: hidden;
    position: relative;
}

.works-gallery.expanded {
    max-height: none;
    overflow: visible;
}

.works-gallery img {
    width: 100%;
    aspect-ratio: 16/9;
    object-fit: cover;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;
    background: #e9ecef;
    cursor: pointer;
}

.works-gallery img:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,102,255,0.15);
    z-index: 2;
}

/* 2.4 satır resim göstermek için hesaplanmış yükseklikler */
@media (min-width: 1200px) {
    .works-gallery {
        grid-template-columns: repeat(4, 1fr);
        max-height: 520px; /* (4 kolon x 2.4 satır): ((1200-60-60)/4 * 9/16 * 2.4) + (20*1.4) + 50 */
    }
}

@media (min-width: 1001px) and (max-width: 1199px) {
    .works-gallery {
        grid-template-columns: repeat(4, 1fr);
        max-height: 480px; /* 2.4 satır için hesaplanmış */
    }
}

@media (min-width: 869px) and (max-width: 1000px) {
    .works-gallery {
        grid-template-columns: repeat(4, 1fr);
        max-height: 420px; /* 2.4 satır için hesaplanmış */
    }
}

@media (min-width: 769px) and (max-width: 868px) {
    .works-gallery {
        grid-template-columns: repeat(3, 1fr);
        max-height: 450px; /* 3 kolon x 2.4 satır için hesaplanmış */
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .works-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 15px;
        max-height: 400px; /* 2 kolon x 2.4 satır için hesaplanmış */
        padding: 20px 20px 15px;
    }
}

@media (max-width: 480px) {
    .works-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 10px;
        max-height: 300px; /* 2 kolon x 2.4 satır için hesaplanmış */
        padding: 15px 15px 10px;
    }
}

/* Modal for image preview */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.85);
    overflow: hidden;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.modal.show {
    opacity: 1;
}

.modal-content {
    margin: auto;
    display: block;
    width: 90%;
    max-width: 1000px;
    max-height: 90vh;
    object-fit: contain;
    animation: zoom 0.3s ease;
    border-radius: 5px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

@keyframes zoom {
    from {transform: scale(0.8); opacity: 0;}
    to {transform: scale(1); opacity: 1;}
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    z-index: 10000;
}

.close-modal:hover,
.close-modal:focus {
    color: var(--primary);
    text-decoration: none;
    cursor: pointer;
}

.works-more-wrapper {
    text-align: center;
    margin-top: 20px;
}

/* Çalışma sayısı maksimum satır sayısını aşmıyorsa butonu gizle */
.works-gallery:not(.needs-expansion) + .works-more-wrapper {
    display: none;
}

.works-more-btn {
    display: inline-block;
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
    padding: 10px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.works-more-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,102,255,0.1);
}

footer {
    background-color: var(--surface);
    color: var(--text);
    text-align: center;
    padding: 30px 0;
    margin-top: 40px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.05);
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' opacity='0.08' viewBox='0 0 20 20'%3E%3Ccircle cx='5' cy='5' r='1' fill='%232563eb'/%3E%3Ccircle cx='15' cy='15' r='1' fill='%232563eb'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* Hamburger menu should be hidden on laptops and larger screens */
.hamburger {
    display: flex;
    width: 30px;
    height: 22px;
    position: relative;
    cursor: pointer;
    z-index: 2;
    transition: all 0.3s ease;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--primary);
    position: absolute;
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger-line:nth-child(1) {
    top: 0;
}

.hamburger-line:nth-child(2) {
    top: 50%;
    transform: translateY(-50%);
}

.hamburger-line:nth-child(3) {
    bottom: 0;
}

.hamburger.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg);
    top: 50%;
    margin-top: -1.5px;
}

.hamburger.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

.hamburger.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg);
    bottom: 50%;
    margin-bottom: -1.5px;
}

@media (min-width: 769px) {
    .hamburger {
        display: none;
    }
}

/* Media query for tablets and smaller */
@media (max-width: 768px) {
    .hamburger {
        display: flex;
        margin-right: 15px;
    }
    
    .main-nav {
        padding: 8px 0;
    }
    
    .nav-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        width: 100%;
        max-height: 0;
        overflow: hidden;
        background-color: var(--surface);
        box-shadow: 0 5px 10px rgba(0,0,0,0.1);
        transition: max-height 0.3s ease;
        z-index: 1001;
        margin: 0;
        padding: 0;
    }
    
    .nav-menu.active {
        max-height: 500px;
        overflow-y: auto;
    }
    
    .nav-menu li {
        width: 100%;
        text-align: center;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .nav-menu li a {
        padding: 12px 20px;
        display: block;
        width: 100%;
        font-size: 1.1em;
    }
    
    .contact-mobile-btn {
        display: flex;
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: var(--primary);
        color: white;
        border-radius: 50px;
        padding: 10px 20px;
        align-items: center;
        font-weight: 500;
        box-shadow: 0 4px 15px rgba(0,102,255,0.3);
        text-decoration: none;
        z-index: 1002;
        transition: all 0.3s ease;
    }
    
    .contact-mobile-btn:hover {
        background-color: #0055cc;
        transform: translateY(-3px);
    }
    
    .logo-img {
        width: 80px;
        height: 55px;
    }
    
    .logo-text-top {
        font-size: 1.1em;
    }
    
    .logo-text-bottom {
        font-size: 0.9em;
    }
    
    .works-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 15px;
        max-height: 560px; /* 4 rows, 2 cols. Calc for 481px viewport. */
        padding: 20px 20px 15px;
    }
    
    .works-gallery img {
        width: 100%;
        aspect-ratio: 16/9;
    }
}

@media (max-width: 1024px) {
    header {
        position: fixed;
        top: 0;
        padding: 5px 0;
    }
    
    .main-nav {
        padding: 10px 0;
        justify-content: space-between;
    }
    
    .logo {
        font-size: 1.3em;
        margin-left: 15px;
    }
    
    .logo-img {
        width: 50px;
        height: 40px;
    }
    
    .nav-menu {
        gap: 15px;
    }
}

/* Contact button for all screen sizes */
.contact-mobile-btn {
    display: none;
}

/* Mobile and tablet specific styles */
@media (max-width: 768px) {
    .contact-mobile-btn {
        display: flex;
        position: fixed;
        bottom: 20px;
        right: 20px;
        background-color: var(--primary);
        color: white;
        border-radius: 50px;
        padding: 12px 25px;
        align-items: center;
        font-weight: 600;
        font-size: 1.1em;
        box-shadow: 0 4px 15px rgba(0,102,255,0.3);
        text-decoration: none;
        z-index: 1002;
        transition: all 0.3s ease;
    }
    
    .contact-mobile-btn:hover,
    .contact-mobile-btn:active {
        background-color: #0055cc;
        transform: translateY(-3px);
        box-shadow: 0 6px 20px rgba(0,102,255,0.4);
    }
    
    /* Hide the last nav item (Contact) from mobile menu */
    .nav-menu li:last-child {
        display: none;
    }
    
    /* Hide floating buttons on mobile */
    .floating-contact-btn {
        display: none;
    }
}

@media (max-width: 480px) {
    .logo-img {
        width: 70px;
        height: 45px;
    }
    
    .logo-text-top {
        font-size: 1em;
    }
    
    .logo-text-bottom {
        font-size: 0.85em;
    }
    
    .hero-content h1 {
        font-size: 1.7em;
    }
    
    .works-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 10px;
        max-height: 370px; /* 4 rows, 2 cols. Calc for 320px viewport. */
        padding: 15px 15px 10px;
    }
    
    .works-gallery img {
        width: 100%;
        aspect-ratio: 16/9;
    }
}

/* Mobil için medya sorguları */
@media (max-width: 768px) {
    header {
        position: fixed;
        height: auto;
    }
    
    .main-nav {
        background-color: var(--surface);
        padding: 8px 0;
        justify-content: space-between;
        width: 100%;
        max-width: 100%;
        overflow: visible;
    }
    
    .logo {
        margin: 0 0 0 15px;
        width: auto;
        justify-content: flex-start;
        font-size: 1.2em;
    }
    
    .logo-img {
        width: 50px;
        height: 50px;
    }
    
    .logo-text-top {
        font-size: 1em;
    }
    
    .logo-text-bottom {
        font-size: 0.85em;
    }
    
    .nav-menu {
        background-color: var(--surface);
        width: 100%;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
        padding: 0;
        margin: 0;
    }
    
    .nav-menu li {
        background-color: var(--surface);
        margin: 5px;
        text-align: center;
    }
    
    .nav-menu li a {
        background-color: var(--surface);
        padding: 8px 12px;
        display: block;
        width: 100%;
        font-size: 0.95em;
    }
    
    .hero-section {
        height: 100vh; /* Fixed header olduğu için tam ekran yükseklik */
    }
    
    .hero-content-wrapper {
        justify-content: center;
        align-items: center;
    }
    
    .hero-content {
        width: 85%;
        padding: 25px 20px;
        margin: 0 auto;
    }
    
    .hero-content h1 {
        font-size: 1.8em;
    }
    
    .hero-content p {
        font-size: 1em;
    }
    
    section {
        padding: 30px 15px;
    }
    
    section h2 {
        font-size: 1.8em;
        margin-bottom: 20px;
    }
    
    .blog-posts {
        grid-template-columns: 1fr;
    }
    
    .works-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 15px;
        max-height: 560px; /* 4 rows, 2 cols. Calc for 481px viewport. */
        padding: 20px 20px 15px;
    }
    
    .works-gallery img {
        width: 100%;
        aspect-ratio: 16/9;
    }
    
    .blog-post img {
        height: 200px;
        min-height: 200px;
    }
    
    .contact-buttons {
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }
    
    .whatsapp-contact-btn, .phone-contact-btn {
        width: 100%;
        max-width: 280px;
    }
    
    #services .service-cards {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    #services .card-image {
        height: 160px;
        min-height: 160px;
    }
}

/* Küçük mobil cihazlar için medya sorguları */
@media (max-width: 480px) {
    header {
        position: fixed;
        height: auto;
    }
    
    .main-nav {
        background-color: var(--surface);
        padding: 8px 0;
        overflow: visible;
    }
    
    .logo {
        font-size: 1.1em;
        margin: 0 0 0 10px;
    }
    
    .logo-img {
        width: 32px;
        height: 32px;
    }
    
    .nav-menu {
        background-color: var(--surface);
        gap: 5px;
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        padding: 0 5px;
    }
    
    .nav-menu li {
        width: auto;
        margin: 3px;
    }
    
    .nav-menu li a {
        background-color: var(--surface);
        padding: 6px 10px;
        font-size: 0.85em;
        white-space: nowrap;
    }
    
    .hero-section {
        height: 100vh; /* Fixed header olduğu için tam ekran yükseklik */
    }
    
    .hero-content-wrapper {
        align-items: center;
    }
    
    .hero-content {
        width: 90%;
        padding: 20px 15px;
        margin: 0 auto;
    }
    
    .hero-content h1 {
        font-size: 1.5em;
    }
    
    .hero-content p {
        font-size: 0.9em;
    }
    
    .cta-button {
        padding: 10px 20px;
        font-size: 0.95em;
    }
    
    .works-gallery {
        grid-template-columns: repeat(2, 1fr);
        grid-gap: 10px;
        max-height: 370px; /* 4 rows, 2 cols. Calc for 320px viewport. */
        padding: 15px 15px 10px;
    }
    
    .works-gallery img {
        width: 100%;
        aspect-ratio: 16/9;
    }
    
    .blog-post img {
        height: 200px;
        min-height: 200px;
    }
    
    section {
        padding: 25px 10px;
    }
    
    section h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    
    #services .service-cards {
        grid-template-columns: 1fr;
    }
    
    #services .card-image {
        height: 160px;
        min-height: 160px;
    }
}

/* Additional hamburger menu adjustments */
body.menu-open {
    overflow: hidden;
}

/* Mobile controls container */
.mobile-controls {
    display: none;
    align-items: center;
    gap: 15px;
    margin-right: 15px;
}

/* Contact button in header */
.header-contact-btn {
    display: flex;
    padding: 6px 12px;
    background-color: var(--primary);
    color: white;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.header-contact-btn:hover {
    background-color: #0055cc;
    transform: translateY(-2px);
}

/* Show mobile controls on tablet and mobile */
@media (max-width: 768px) {
    .mobile-controls {
        display: flex;
    }
    
    /* Hide the floating contact button since we have one in the header */
    .contact-mobile-btn {
        display: none;
    }
}

/* Adjust for very small screens */
@media (max-width: 480px) {
    .header-contact-btn {
        padding: 5px 10px;
        font-size: 0.85em;
    }
    
    .mobile-controls {
        gap: 10px;
    }
}

/* Floating iletişim butonlarını düzenle */
.floating-contact-btn,
.mobile-floating-btn {
    position: fixed;
    background-color: var(--primary);
    color: white;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,102,255,0.3);
    transition: all 0.3s ease;
    z-index: 1002;
    font-weight: 600;
    align-items: center;
    justify-content: center;
    bottom: -100px;
}

.floating-contact-btn {
    right: 30px;
    height: 50px;
    padding: 0 25px;
    font-size: 1em;
    border-radius: 25px;
}

.mobile-floating-btn {
    right: 20px;
    height: 40px;
    padding: 0 15px;
    font-size: 0.9em;
    border-radius: 20px;
}

.floating-contact-btn.show {
    bottom: 30px;
}

.mobile-floating-btn.show {
    bottom: 20px;
}

.floating-contact-btn:hover,
.mobile-floating-btn:hover {
    background-color: var(--secondary);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255,137,6,0.4);
}

/* İletişim butonlarının görünürlük kontrolü */
@media (min-width: 769px) {
    .floating-contact-btn {
        display: flex;
    }
    
    .mobile-floating-btn {
        display: none;
    }
}

@media (max-width: 768px) {
    .floating-contact-btn {
        display: none;
    }
    
    .mobile-floating-btn {
        display: flex;
    }
}

/* İletişim bölümünde iletişim popup'larını gizle */
#contact .floating-contact-btn,
#contact .mobile-floating-btn {
    display: none !important;
    }
    
/* Yukarı çıkma butonu - kaldırıldı */
.scroll-top-btn {
    display: none !important;
}

/* Bottom navigation kaldırıldı */

/* Additional adjustments for specific screen ranges */
@media (min-width: 769px) and (max-width: 900px) {
    .nav-menu {
        gap: 5px; /* Even smaller gap */
    }
    
    .nav-menu li a {
        font-size: 0.85em; /* Even smaller font */
        padding: 5px 6px; /* Even less padding */
    }
}

/* Adjustments for laptop and larger screens */
@media (min-width: 1025px) {
    .nav-menu {
        flex-wrap: nowrap;
        justify-content: flex-end;
        margin-right: 20px;
        white-space: nowrap;
        gap: 25px;
    }
    
    .nav-menu li a {
        font-size: 0.95em;
        padding: 8px 16px;
    }
    
    .logo {
        font-size: 1.4em;
        margin-left: 20px;
    }
    
    .logo-img {
        width: 80px;
        height: 50px;
    }
}

/* Improve mobile button hover effect */
.mobile-floating-btn:hover,
.mobile-floating-btn:active {
    background-color: #0055cc;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,102,255,0.4);
}

/* Blog Modal Popup Stilleri */
.blog-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.blog-modal.show {
    opacity: 1;
    display: block;
}

.blog-modal-content {
    display: flex;
    flex-direction: row;
    width: 90%;
    max-width: 900px;
    margin: 5% auto;
    min-height: 400px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 102, 255, 0.2);
    position: relative;
    animation: modalFadeIn 0.4s ease-out;
    border-left: none;
    max-height: 90vh; /* Maximum yükseklik ekle */
}

.blog-modal-image {
    width: 35%;
    min-width: 240px;
    max-width: 320px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.blog-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 3s ease;
}

.blog-modal-text {
    width: 65%;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    overflow-y: auto;
    max-height: 80vh;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' opacity='0.08' viewBox='0 0 20 20'%3E%3Ccircle cx='5' cy='5' r='1' fill='%232563eb'/%3E%3Ccircle cx='15' cy='15' r='1' fill='%232563eb'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

.blog-modal-contact {
    margin-top: 20px;
    width: 100%;
    text-align: right;
}

#blogModalContent h1 {
    color: #3788ff;
    font-size: 1.8em;
    margin: 0 0 15px 0;
    padding-left: 0;
    position: relative;
}

#blogModalContent p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text);
}

.blog-modal-contact-btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.blog-modal-contact-btn:hover {
    background-color: #0055cc;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 102, 255, 0.2);
}

/* Blog modal close button */
.blog-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.blog-modal-close:hover {
    background-color: var(--secondary);
    transform: rotate(90deg);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .blog-modal-content {
        flex-direction: column;
        margin: 10% auto;
        min-height: unset;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .blog-modal-image {
        width: 100%;
        height: 200px;
        max-width: 100%;
        min-width: unset;
    }
    
    .blog-modal-text {
        width: 100%;
        padding: 20px 15px;
        max-height: unset;
    }
    
    #blogModalContent h1 {
        font-size: 1.5em;
    }
    
    /* Blog modalı resim olmadan düzenle */
    .blog-modal-content:not(:has(.blog-modal-image)) {
        flex-direction: column;
        max-width: 95%;
        margin: 5% auto;
    }
    
    .blog-modal-content:not(:has(.blog-modal-image)) .blog-modal-text {
        width: 100%;
        padding: 25px 20px;
    }
    
    /* Blog more butonu için z-index ve pozisyon düzeltmeleri */
    .blog-more-wrapper {
        position: relative;
        z-index: 10;
        background: var(--background);
        padding: 20px 0;
        margin-top: 20px;
    }
    
    .blog-more-btn {
        position: relative;
        z-index: 11;
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    .blog-posts {
        grid-template-columns: repeat(2, 1fr);
        max-height: calc(2 * (200px + 200px + 30px)); /* 2 satır blog postu */
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    #services .service-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Remove redundant media query that's causing the conflict */
@media (min-width: 1101px) and (max-width: 1366px) {
    /* Removing these rules as they're causing conflicts */
    /* .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .blog-posts {
        max-height: calc(2 * (200px + 200px + 30px));
    } */
}

/* Consistent fade-in animation */
@keyframes blogFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Blog visibility control - these have higher specificity */
.blog-posts:not(.expanded) .blog-post {
    opacity: 1;
}

.blog-posts.expanded .blog-post {
    opacity: 1;
    animation: blogFadeIn 0.3s ease forwards;
    position: relative;
    z-index: auto;
    transform: translateY(0);
}

/* Staggered animation delays for smoother effect */
.blog-posts.expanded .blog-post:nth-child(1) { animation-delay: 0.05s; }
.blog-posts.expanded .blog-post:nth-child(2) { animation-delay: 0.1s; }
.blog-posts.expanded .blog-post:nth-child(3) { animation-delay: 0.15s; }
.blog-posts.expanded .blog-post:nth-child(4) { animation-delay: 0.2s; }
.blog-posts.expanded .blog-post:nth-child(5) { animation-delay: 0.25s; }
.blog-posts.expanded .blog-post:nth-child(6) { animation-delay: 0.3s; }
.blog-posts.expanded .blog-post:nth-child(7) { animation-delay: 0.35s; }
.blog-posts.expanded .blog-post:nth-child(8) { animation-delay: 0.4s; }
.blog-posts.expanded .blog-post:nth-child(9) { animation-delay: 0.45s; }
.blog-posts.expanded .blog-post:nth-child(10) { animation-delay: 0.5s; }

/* Media queries for different screen sizes */
@media (max-width: 480px) {
    .blog-posts {
        grid-template-columns: 1fr;
        gap: 15px;
        max-width: 100%;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    /* Çok küçük cihazlarda ilk blogdan sonra gizle */
    .blog-posts:not(.expanded) .blog-post:nth-child(n+2) {
        display: none;
    }
    
    /* Expanded durumunda tüm blogları göster */
    .blog-posts.expanded .blog-post:nth-child(n+2) {
        display: flex !important;
        opacity: 1 !important;
        animation: blogFadeIn 0.3s ease forwards;
    }
    
    .blog-readmore-btn {
        padding: 5px 12px;
        font-size: 0.9em;
    }
    
    /* Blog more butonu için ek stilleme */
    .blog-more-wrapper {
        margin-top: 30px;
        text-align: center;
        clear: both;
    }
    
    .blog-more-btn {
        width: 80%;
        max-width: 300px;
        padding: 12px 20px;
        font-size: 1em;
    }
}

@media (min-width: 481px) and (max-width: 1100px) {
    .blog-posts {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        grid-auto-rows: auto;
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Tablet ve mobilde ilk 2 blogdan sonrakileri gizle (1 satır) */
    .blog-posts:not(.expanded) .blog-post:nth-child(n+3) {
        display: none;
    }
    
    /* Expanded durumunda 2'den sonrakileri göster */
    .blog-posts.expanded .blog-post:nth-child(n+3) {
        display: flex !important;
        opacity: 1 !important;
        animation: blogFadeIn 0.3s ease forwards;
        position: relative;
        z-index: auto;
        transform: translateY(0);
    }
    
    /* Expanded durumda grid'in düzgün çalışması için */
    .blog-posts.expanded {
        grid-auto-rows: auto;
        align-items: stretch;
    }
    
    /* Blog post'ların sabit yüksekliği olmaması için */
    .blog-posts.expanded .blog-post {
        height: auto;
        min-height: auto;
    }
}

@media (min-width: 1101px) {
    .blog-posts {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* On large screens, initially hide posts after the 6th */
    .blog-posts:not(.expanded) .blog-post:nth-child(n+7) {
        display: none;
    }
    
    /* In expanded state, animate in the previously hidden posts */
    .blog-posts.expanded .blog-post:nth-child(n+7) {
        display: flex !important;
        opacity: 1 !important;
        animation: blogFadeIn 0.3s ease forwards;
    }
}

/* Service cards styling */
.service-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin: 30px auto;
    max-width: 1200px;
    position: relative;
}

#services .card {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease, width 0.4s ease;
    cursor: pointer;
    position: relative;
    height: 100%;
    display: flex;
    flex-direction: column;
    z-index: 1;
}

#services .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,102,255,0.2);
    }

#services .card.expanded {
    position: relative;
    z-index: 10;
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    transform: translateY(-5px);
}

#services .card-image {
    height: 180px;
    overflow: hidden;
}

#services .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

#services .card:hover .card-image img {
    transform: scale(1.05);
}

#services .card-content {
    padding: 15px 15px 60px 15px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    position: relative;
}

#services .card-content h3 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 1.2em;
    color: #2563eb; /* Açık mavi renk */
    transition: transform 0.3s ease, color 0.3s ease;
    padding-left: 0; /* Padding'i kaldır */
    position: relative;
    min-height: 3.2em; /* Accommodate 2 lines (2 * 1.6 line-height = 3.2em) for consistent alignment */
}

#services .card-content h3::before {
    content: ''; /* | işaretini kaldır */
    position: absolute;
    left: 0;
    top: 0;
}

#services .card.expanded .card-content h3 {
    color: var(--primary);
    transform: scale(1.05);
    transform-origin: left center;
}

#services .card-content p {
    margin-bottom: 15px;
    color: var(--text);
    flex-grow: 1;
}

#services .card-expanded-content {
    position: absolute;
    top: 0;
    left: 100%;
    width: 0;
    height: 100%;
    background: white;
        opacity: 0;
    z-index: 5;
    overflow: hidden;
    border-radius: 0 8px 8px 0;
    box-shadow: 10px 0 20px rgba(0,0,0,0.15);
    transition: all 0.4s ease;
    padding: 0;
}

#services .card.expanded .card-expanded-content {
    width: 200%;
    opacity: 1;
    padding: 20px;
    border-left: 3px solid var(--primary);
    }

@media (max-width: 1100px) {
    #services .card.expanded .card-expanded-content {
        width: 150%;
    }
}

@media (max-width: 768px) {
    #services .card.expanded .card-expanded-content {
        position: relative;
        left: 0;
        top: auto;
        width: 100%;
        height: auto;
        border-radius: 0 0 8px 8px;
        box-shadow: none;
        border-left: none;
        border-top: 3px solid var(--primary);
        max-height: 500px;
    }
    
    #services .card-expanded-content {
        max-height: 0;
    }
}

#services .card .service-contact-btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 8px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-top: 10px;
    text-align: center;
}

#services .card .service-contact-btn:hover {
    background-color: #0055cc;
    transform: translateY(-2px);
}

/* Media queries for service cards */
@media (min-width: 1101px) {
    #services .service-cards {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 769px) and (max-width: 1100px) {
    #services .service-cards {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    #services .service-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    #services .service-cards {
        grid-template-columns: 1fr;
    }
    
    #services .card-image {
        height: 160px;
    }
}

/* Hizmet Modal/Popup Stilleri */
.service-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.8);
        opacity: 0;
    transition: opacity 0.3s ease;
    }

.service-modal.show {
        opacity: 1;
    display: block;
    }

.service-modal-content {
    display: flex;
    flex-direction: row;
    width: 90%;
    max-width: 900px;
    margin: 5% auto;
    min-height: 400px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 102, 255, 0.2);
    position: relative;
    animation: modalFadeIn 0.4s ease-out;
    border-left: none;
    max-height: 85vh;
    overflow: hidden;
}

.service-modal-image {
    width: 35%;
    min-width: 240px;
    max-width: 320px;
    display: flex;
    align-items: stretch;
    overflow: hidden;
}

.service-modal-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 3s ease;
}

.service-modal-content:hover .service-modal-image img {
    transform: scale(1.1);
}

.service-modal-text {
    width: 65%;
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left;
    overflow-y: auto;
    max-height: 80vh;
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' opacity='0.08' viewBox='0 0 20 20'%3E%3Ccircle cx='5' cy='5' r='1' fill='%232563eb'/%3E%3Ccircle cx='15' cy='15' r='1' fill='%232563eb'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

.service-modal-contact {
    margin-top: 20px;
    width: 100%;
    text-align: right;
}

#serviceModalContent h1 {
    color: #3788ff;
    font-size: 1.8em;
    margin: 0 0 15px 0;
    padding-left: 0;
    position: relative;
}

#serviceModalContent p {
    margin-bottom: 15px;
    line-height: 1.6;
    color: var(--text);
}

.service-modal-contact-btn {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.service-modal-contact-btn:hover {
    background-color: #0055cc;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 102, 255, 0.2);
}

.service-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 30px;
    height: 30px;
    background-color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
}

.service-modal-close:hover {
    background-color: var(--secondary);
    transform: rotate(90deg);
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .service-modal-content {
        flex-direction: column;
        margin: 10% auto;
        min-height: unset;
        max-height: 90vh;
        overflow-y: auto;
        border-left: none;
        border-top: 5px solid var(--primary);
    }
    
    .service-modal-image {
        display: none !important; /* Küçük cihazlarda hizmet modal'ında resmi gizle */
    }
    
    .service-modal-text {
        width: 100%;
        padding: 20px 15px;
        max-height: unset;
    }
    
    #serviceModalContent h1 {
        font-size: 1.5em;
    }
}

/* Tüm modallarda scrollbar'ı düzenleme */
.blog-modal,
.service-modal,
.modal {
    overflow: hidden !important; /* Modal container'da scrollbar olmasın */
}

/* Modal açıkken body scrollunu engelle */
body.modal-open {
    overflow: hidden !important;
    padding-right: 0 !important; /* Ekstra padding'i engelle */
}

/* Modal içeriğinde gerekli alanlarda scroll olsun */
.blog-modal-text,
.service-modal-text {
    overflow-y: auto;
    max-height: 80vh;
}

/* Modal içeriğini düzenle */
.blog-modal-content,
.service-modal-content {
    max-height: 85vh;
    overflow: hidden; /* Container'da scroll olmasın */
}

/* İletişime Geç butonlarını sağa konumlandırma */
.service-modal-contact,
.blog-modal-contact {
    margin-top: 20px;
    width: 100%;
    text-align: right; /* Sağa hizalama */
}

/* Modal içeriğini düzenle - scroll bar'ı sakla */
.service-modal-content,
.blog-modal-content {
    display: flex;
    flex-direction: row;
    width: 90%;
    max-width: 900px;
    margin: 5% auto;
    min-height: 400px;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 25px rgba(0, 102, 255, 0.2);
    position: relative;
    animation: modalFadeIn 0.4s ease-out;
    border-left: none;
    max-height: 90vh; /* Maximum yükseklik ekle */
}

/* Mobil görünümde butonların sağa hizalı kalması */
@media (max-width: 768px) {
    .service-modal-contact,
    .blog-modal-contact {
        text-align: right; /* Sağa hizalı kalsın */
    }
}

/* Modal arkaplanında görünen scrollbar'ı gizle */
.service-modal::-webkit-scrollbar,
.blog-modal::-webkit-scrollbar {
    /* display: none; */ /* Scroll barları geri getirmek için kaldırıldı */
}

.service-modal,
.blog-modal {
    -ms-overflow-style: auto;  /* IE ve Edge için - Scroll barları geri getir */
    scrollbar-width: auto;  /* Firefox için - Scroll barları geri getir */
}

/* Service modal ve blog modaldaki başlıklar için | işaretini kaldır ama rengi açık mavi bırak */
#serviceModalContent h1::before,
#blogModalContent h1::before {
    content: ''; /* | işaretini kaldır */
}

/* Modal içeriğine çatı svg'sini ekleyin - daha modern ek özellikler */
.service-modal-text,
.blog-modal-text {
    position: relative;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' opacity='0.08' viewBox='0 0 20 20'%3E%3Ccircle cx='5' cy='5' r='1' fill='%232563eb'/%3E%3Ccircle cx='15' cy='15' r='1' fill='%232563eb'/%3E%3C/svg%3E");
    background-repeat: repeat;
}

/* Hizmetlere tıklanabilirliği belirten bir efekt ekle */
#services .card {
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

/* Tıklanabilir işareti ekleme - konumunu daha aşağı çek */
#services .card::after {
    content: '+';
    position: absolute;
    bottom: 30px;
    right: 20px;
    width: 20px;
    height: 20px;
    background-color: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    opacity: 0.8;
    transition: all 0.3s ease;
}

#services .card:hover::after {
    opacity: 1;
    transform: scale(1.1) rotate(90deg);
}

/* Ayrıca hizmetlerde hover efektini daha belirgin yap */
#services .card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 30px rgba(0,102,255,0.2);
}

/* Yukarı gitme butonunun hover durumunda turuncu olması */
.scroll-top-btn:hover {
    background-color: var(--secondary);
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 6px 20px rgba(255,137,6,0.4);
    }

/* İletişim butonlarının hover durumunda turuncu olması */
.floating-contact-btn:hover,
.mobile-floating-btn:hover {
    background-color: var(--secondary);
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(255,137,6,0.4);
}

/* Modern Footer Styles */
.modern-footer {
    background-color: #263238;
    color: #fff;
    padding: 60px 0 20px;
    font-size: 14px;
    position: relative;
}

.modern-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: radial-gradient(circle, rgba(30, 108, 217, 0.1) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.2;
    pointer-events: none;
}

.footer-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-col {
    flex-basis: 23%;
    margin-bottom: 30px;
}

.footer-logo {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.footer-logo img {
    margin-right: 10px;
}

.footer-logo-text {
    font-size: 18px;
    font-weight: 600;
    display: block;
    color: #fff;
}

.footer-logo-sub {
    font-size: 16px;
    color: #4DB6AC;
    display: block;
}

.footer-desc {
    line-height: 1.6;
    margin-bottom: 20px;
    color: #B0BEC5;
}

.social-icons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-icons.centered {
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: #4DB6AC;
    transform: translateY(-3px);
}

.footer-col h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 20px;
    position: relative;
    color: #fff;
    padding-bottom: 10px;
}

.footer-col h3::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: #4DB6AC;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #B0BEC5;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.footer-links a:hover {
    color: #4DB6AC;
    padding-left: 5px;
}

.contact-info {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-info li {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
    color: #B0BEC5;
}

.contact-info i {
    margin-right: 10px;
    color: #4DB6AC;
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.contact-info a {
    color: #B0BEC5;
    text-decoration: none;
    transition: color 0.3s ease;
}

.contact-info a:hover {
    color: #4DB6AC;
}

.newsletter {
    margin-top: 30px;
}

.newsletter p {
    color: #B0BEC5;
    margin-bottom: 15px;
    font-size: 13px;
}

.newsletter-form {
    display: flex;
    position: relative;
}

.newsletter-form input {
    flex-grow: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 13px;
}

.newsletter-form input::placeholder {
    color: #90A4AE;
}

.newsletter-form button {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: none;
    color: #4DB6AC;
    cursor: pointer;
    transition: color 0.3s ease;
    font-size: 16px;
}

.newsletter-form button:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    margin-top: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.copyright {
    font-size: 13px;
    color: #90A4AE;
}

.copyright.centered {
    text-align: center;
    width: 100%;
}

.payment-methods {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #90A4AE;
    font-size: 13px;
}

.payment-methods i {
    font-size: 24px;
    color: #B0BEC5;
}

/* Responsive adjustments */
@media screen and (max-width: 992px) {
    .footer-col {
        flex-basis: 48%;
    }
}

@media screen and (max-width: 768px) {
    .footer-container {
        flex-direction: column;
    }
    
    .footer-col {
        flex-basis: 100%;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
}

/* Navigation 768px üzeri için tek sıra zorunlu */
@media (min-width: 769px) {
    .main-nav {
        flex-wrap: nowrap;
        padding: 5px 0;
    }
    
    .nav-menu {
        flex-wrap: nowrap;
        gap: 20px;
    }
    
    .logo {
        flex-shrink: 0;
        margin-left: 15px;
    }
    
    .logo-img {
        width: 70px;
        height: 45px;
    }
    
    .logo-text-top {
        font-size: 1.1em;
    }
    
    .logo-text-bottom {
        font-size: 0.8em;
    }
}

/* Orta boyut ekranlar için daha compact navigation */
@media (min-width: 769px) and (max-width: 1024px) {
    .nav-menu {
        gap: 15px;
    }
    
    .nav-menu li a {
        font-size: 0.9em;
        padding: 6px 12px;
        margin: 0 2px;
    }
    
    .logo {
        font-size: 1.2em;
        margin-left: 10px;
    }
    
    .logo-img {
        width: 60px;
        height: 40px;
    }
}

/* Küçük laptop ekranlar için */
@media (min-width: 769px) and (max-width: 900px) {
    .nav-menu {
        gap: 8px;
    }
    
    .nav-menu li a {
        font-size: 0.85em;
        padding: 5px 8px;
        margin: 0 1px;
    }
    
    .logo {
        font-size: 1.1em;
        margin-left: 8px;
    }
    
    .logo-img {
        width: 50px;
        height: 35px;
    }
    
    .logo-text-top {
        font-size: 1em;
    }
    
    .logo-text-bottom {
        font-size: 0.75em;
    }
} 

/* Hero desktop/tablet/mobile responsive ayarları */
@media (min-width: 769px) {
    .hero-section {
        height: 100vh; /* Fixed header olduğu için tam ekran yükseklik */
    }
}

/* Blog Detail Styles */
.blog-detail {
    max-width: 800px;
    margin: 0 auto;
    padding: 40px 20px;
    background: var(--surface);
    border-radius: 10px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.blog-detail-container {
    width: 100%;
}

.breadcrumb {
    display: flex;
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    font-size: 0.9em;
    color: var(--muted);
}

.breadcrumb li:not(:last-child)::after {
    content: " / ";
    margin: 0 8px;
    color: var(--muted);
}

.breadcrumb a {
    color: var(--primary);
    text-decoration: none;
}

.breadcrumb a:hover {
    text-decoration: underline;
}

.blog-detail-header {
    margin-bottom: 30px;
}

.blog-detail-header h1 {
    font-size: 2.2em;
    font-weight: 700;
    color: var(--text);
    line-height: 1.3;
    margin-bottom: 15px;
}

.blog-meta {
    display: flex;
    gap: 20px;
    color: var(--muted);
    font-size: 0.9em;
    font-weight: 500;
}

.blog-detail-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 30px;
}

.blog-content {
    line-height: 1.8;
    color: var(--text);
}

.blog-content h2 {
    font-size: 1.6em;
    font-weight: 600;
    color: var(--primary);
    margin: 30px 0 15px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--primary);
}

.blog-content h3 {
    font-size: 1.3em;
    font-weight: 600;
    color: var(--text);
    margin: 25px 0 12px 0;
}

.blog-content p {
    margin-bottom: 20px;
    font-size: 1.05em;
}

.blog-cta {
    background: linear-gradient(135deg, var(--primary), #1d4ed8);
    color: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    margin: 40px 0;
}

.blog-cta h3 {
    margin-bottom: 10px;
    font-size: 1.4em;
}

.blog-cta p {
    margin-bottom: 20px;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cta-button.phone {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 2px solid rgba(255,255,255,0.3);
}

.cta-button.whatsapp {
    background: var(--whatsapp);
    color: white;
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.related-posts {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

.related-posts h3 {
    font-size: 1.5em;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 20px;
}

.related-posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.related-post {
    background: #f8f9fa;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.related-post:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.related-post a {
    text-decoration: none;
    color: inherit;
    display: block;
}

.related-post img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.related-post h4 {
    padding: 15px;
    margin: 0;
    font-size: 1.1em;
    font-weight: 500;
    color: var(--text);
}

/* Responsive Design for Blog Detail */
@media (max-width: 768px) {
    .blog-detail {
        margin: 20px;
        padding: 20px;
    }
    
    .blog-detail-header h1 {
        font-size: 1.8em;
    }
    
    .blog-meta {
        flex-direction: column;
        gap: 5px;
    }
    
    .blog-detail-image {
        height: 200px;
    }
    
    .blog-content h2 {
        font-size: 1.4em;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .related-posts-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .blog-detail {
        margin: 10px;
        padding: 15px;
    }
    
    .blog-detail-header h1 {
        font-size: 1.6em;
    }
    
    .blog-content {
        font-size: 0.95em;
    }
}

/* Mobil cihazlarda sadece poliüretan izolasyon görseli göster */
@media (max-width: 768px) {
    .hero-slide:not(:last-child) {
        display: none !important;
    }
    
    .hero-slide:last-child {
        opacity: 1 !important;
        position: relative !important;
    }
}
