/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

*:focus {
    outline: none !important;
    box-shadow: none !important;
}

*:focus-visible {
    outline: none !important;
    box-shadow: none !important;
}

a {
    color: inherit !important;
    text-decoration: none !important;
}

a:visited {
    color: inherit !important;
}

a:active {
    color: inherit !important;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.6;
    color: #333;
    background: #ffffff;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    overflow-y: auto;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Merriweather', serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Header - White Theme */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    background: #ffffff;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar {
    padding: 1rem 0;
    margin: 0;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    color: #333;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #666;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #333;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 4px;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: #333;
    transition: 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Projects Section - Very compact, fits on one screen */
.projects {
    padding: 90px 15px 10px;
    background: #ffffff;
    height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(2, 1fr);
    gap: 0.75rem;
    max-width: 1200px;
    margin: 0;
    width: 100%;
    height: 100%;
    max-height: calc(100vh - 80px);
    padding: 0;
}

.project-card {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    border: 1px solid #e0e0e0;
    width: 100%;
    height: 100%;
    max-height: 100%;
}

.project-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    text-decoration: none;
    color: inherit;
}

.project-image {
    position: relative;
    height: 70%;
    overflow: hidden;
    background: #f5f5f5;
    flex-shrink: 0;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.project-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 1.5rem;
    gap: 3px;
}

.project-placeholder span {
    font-size: 0.65rem;
    font-weight: 600;
    color: #666;
}

.project-content {
    padding: 0.5rem;
    background: white;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.project-content h3 {
    font-size: 0.75rem;
    color: #333;
    margin-bottom: 0.15rem;
    line-height: 1.2;
}

.project-content p {
    color: #666;
    font-size: 0.65rem;
    line-height: 1.2;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .projects {
        height: calc(100vh - 70px);
        overflow: hidden;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 0.6rem;
        max-height: calc(100vh - 80px);
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 2rem;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }

    .nav-menu.active {
        transform: translateX(0);
    }

    .hamburger {
        display: flex;
    }

    .projects {
        padding: 70px 10px 10px;
        height: calc(100vh - 70px);
        overflow: hidden;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 0.5rem;
        max-height: calc(100vh - 80px);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }

    .projects {
        padding: 70px 8px 8px;
        height: calc(100vh - 70px);
        overflow: hidden;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(3, 1fr);
        gap: 0.4rem;
        max-height: calc(100vh - 80px);
    }
}

/* Allow scrolling for all pages */
html {
    overflow-y: auto;
    height: 100%;
}

/* Project Page Styles */
body.project-page {
    overflow: auto;
    height: auto;
    margin-top: 0;
}

/* Fixed Project Tabs */
.project-tabs-fixed {
    background: white;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    margin-top: 70px;
    height: 70px;
}

.project-tabs {
    display: flex;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
    align-items: center;
}

.tab-button {
    background: none;
    border: none;
    padding: 20px 30px;
    font-size: 1.1rem;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    position: relative;
    height: 70px;
    display: flex;
    align-items: center;
}

.tab-button:hover {
    color: #333;
    background: rgba(0, 0, 0, 0.02);
}

.tab-button.active {
    color: #333;
    border-bottom-color: #333;
    background: rgba(0, 0, 0, 0.03);
}

/* Fixed Project Content */
.project-content-fixed {
    padding: 0;
    background: #f9f9f9;
    min-height: calc(100vh - 140px);
    overflow: hidden;
}

.project-content-fixed .container {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px; /* reduce vertical padding to avoid scrolling */
}

/* Fixed Content Wrapper */
.fixed-content-wrapper {
    background: white;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 960px;
    /* Scale with viewport aspect ratio instead of fixed height */
    aspect-ratio: 16 / 9;
    height: auto;
    max-height: calc(100vh - 160px);
    position: relative;
    overflow: hidden;
}

/* If screen is very short (wide aspect), gently reduce overall scale */
@media (max-height: 700px) and (min-width: 900px) {
    .fixed-content-wrapper {
        transform: scale(0.9);
        transform-origin: top center;
    }
}

/* Fixed Content Grid */
.fixed-content-grid {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 32px;
    justify-content: center;
    align-items: flex-start; /* keep content (image & text) slightly higher */
    height: 100%;
    width: 100%;
}

/* On narrower screens, stack image above text to avoid overlap */
@media (max-width: 1100px) {
    .fixed-content-grid {
        grid-template-columns: 1fr;
        grid-template-rows: auto auto;
        row-gap: 24px;
        align-items: start;
    }

    .fixed-image-container {
        order: -1; /* ensure image appears above info/text */
        max-width: 100%;
        max-height: 280px;
    }

    .fixed-info-container {
        order: 0;
    }
}

/* Fixed Image Container */
.fixed-image-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fixed-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Proje Özellikleri image: larger and responsive */
#proje-ozellikleri .fixed-image-container {
    padding: 16px;
    max-width: 560px;
    width: min(45vw, 560px);
    margin: 0 auto 24px;
}

#proje-ozellikleri .fixed-image {
    width: 100%;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    object-fit: cover;
}

/* Default project-page images (slideshows etc.) */
body.project-page .fixed-image-container {
    max-width: 665px;
    aspect-ratio: 4 / 3;
    margin: 0 auto;
}

body.project-page .fixed-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Fixed Info Container */
.fixed-info-container {
    padding: 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    background: white;
}

/* Fixed Typography */
.fixed-title {
    font-size: 2.1rem;
    color: #333;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
}

.fixed-description {
    font-size: 1.05rem;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Meta info lines under the description (status, location, type, etc.) */
.fixed-meta {
    font-size: 0.9rem;
    color: #4b5563;
    margin-bottom: 8px;
    line-height: 1.4;
}

.fixed-meta-label {
    font-weight: 600;
    color: #111827;
    margin-right: 4px;
}

.fixed-status {
    background: #333;
    color: white;
    padding: 8px 20px;
    border-radius: 25px;
    font-size: 0.8rem;
    font-weight: 600;
    display: inline-block;
    width: fit-content;
    margin-bottom: 20px;
}

/* Fixed Info Grid */
.fixed-info-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.fixed-info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 12px;
    background: #f9f9f9;
    border-radius: 10px;
    border-left: 4px solid #333;
}

.fixed-info-item i {
    color: #333;
    font-size: 1rem;
    width: 20px;
    text-align: center;
}

.fixed-info-item span {
    color: #333;
    font-size: 0.9rem;
    font-weight: 500;
}

/* Fixed Slideshow Container */
.fixed-slideshow-container {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.fixed-slide {
    display: none;
    width: 100%;
    height: 100%;
}

.fixed-slide.active {
    display: block;
}

/* Fixed Slideshow Controls */
.fixed-slideshow-controls {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 100%;
    display: flex;
    justify-content: space-between;
    padding: 0 30px; /* move arrows slightly further out */
    pointer-events: none;
    z-index: 10;
}

.fixed-slideshow-controls button {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    pointer-events: auto;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    color: #333;
}

.fixed-slideshow-controls button:hover {
    background: #333;
    color: white;
    transform: scale(1.1);
}

.fixed-slideshow-controls button:focus,
.fixed-slideshow-controls button:focus-visible {
    outline: none !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15) !important;
}

.fixed-slideshow-controls button i {
    font-size: 1.2rem;
    pointer-events: none;
}

/* Fixed Slideshow Dots */
.fixed-slideshow-dots {
    position: absolute;
    bottom: 20px;
    width: 100%;
    text-align: center;
    z-index: 10;
}

.fixed-dot {
    height: 12px;
    width: 12px;
    margin: 0 5px;
    background-color: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: inline-block;
    cursor: pointer;
    transition: all 0.3s ease;
}

.fixed-dot.active,
.fixed-dot:hover {
    background-color: #333;
}

/* Tab Content */
.tab-content {
    display: none;
    width: 100%;
    height: 100%;
}

.tab-content.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Fixed Map Container */
.fixed-map-container {
    width: 100%;
    height: 100%;
    padding: 20px;
}

.fixed-map-container iframe {
    width: 100%;
    height: 100%;
    border-radius: 10px;
    border: none;
}

/* Image Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 90%;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.8);
    animation: zoomIn 0.3s ease;
}

.modal-caption {
    display: none;
    margin: auto;
    width: 80%;
    max-width: 700px;
    text-align: center;
    color: #ccc;
    padding: 20px;
    font-size: 1.2rem;
    font-weight: 500;
}

.close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: all 0.3s ease;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.5);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close:hover,
.close:focus {
    color: #bbb;
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
    outline: none;
}

/* Clickable Images */
#kat-planlari img,
#ic-mekan img,
#dis-mekan img {
    cursor: pointer;
    transition: all 0.3s ease;
}

#kat-planlari img:hover,
#ic-mekan img:hover,
#dis-mekan img:hover {
    transform: scale(1.02);
    filter: brightness(1.05);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Divider line between images in ic-mekan */
#ic-mekan .fixed-content-grid {
    gap: 0;
}

#ic-mekan .fixed-content-grid .fixed-image-container:first-child {
    border-right: 4px solid rgba(0, 0, 0, 0.1);
}

/* Preserve aspect ratio for kat-planlari, ic-mekan, dis-mekan images (no cropping/stretching) */
#kat-planlari .fixed-image-container,
#ic-mekan .fixed-image-container,
#dis-mekan .fixed-image-container {
    align-items: center;
    justify-content: center;
}

#kat-planlari .fixed-image,
#ic-mekan .fixed-image,
#dis-mekan .fixed-image {
    width: 100%;
    height: 100%;
    object-fit: contain; /* show entire image while preserving aspect ratio */
}

/* Default slideshow controls padding */
.fixed-slideshow-controls {
    padding: 0 30px; /* move arrows slightly further out */
}

/* Make the kat-planlari, ic-mekan, dis-mekan slideshow containers larger on screen */
#kat-planlari .fixed-slideshow-container,
#ic-mekan .fixed-slideshow-container,
#dis-mekan .fixed-slideshow-container {
    max-width: 684px; /* shared width for visual consistency */
    margin: 0 auto;
}

#kat-planlari .fixed-slide .fixed-image-container,
#ic-mekan .fixed-slide .fixed-image-container,
#dis-mekan .fixed-slide .fixed-image-container {
    width: 100%;
    margin: 0 auto;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

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

/* Mobile Responsive for Project Pages */
@media (max-width: 768px) {
    .project-content-fixed {
        min-height: calc(100vh - 120px);
    }
    
    .fixed-content-wrapper {
        height: 400px;
        margin: 20px;
        width: calc(100% - 40px);
    }
    
    .fixed-content-grid {
        grid-template-columns: 1fr;
        grid-template-rows: 200px 200px;
    }
    
    .fixed-info-container {
        padding: 20px;
    }
    
    .fixed-title {
        font-size: 1.8rem;
        margin-bottom: 15px;
    }
    
    .fixed-description {
        font-size: 1rem;
        margin-bottom: 15px;
    }
    
    .project-tabs {
        flex-wrap: wrap;
        height: auto;
        min-height: 70px;
    }
    
    .tab-button {
        padding: 15px 20px;
        font-size: 1rem;
        height: auto;
    }
    
    .fixed-slideshow-controls button {
        width: 40px;
        height: 40px;
    }
    
    .fixed-slideshow-controls button i {
        font-size: 1rem;
    }
    
    .fixed-dot {
        height: 10px;
        width: 10px;
    }
}

/* Generic Content Pages (Hakkımızda, İletişim) */
body.page {
    overflow: auto;
    height: auto;
    background: #f9f9f9;
}

.page-section {
    padding: 110px 20px 40px;
}

.page-wrapper {
    max-width: 1100px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
    padding: 40px 32px;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 8px;
    color: #111827;
}

.page-subtitle {
    font-size: 0.95rem;
    color: #6b7280;
    margin-bottom: 24px;
}

.page-grid {
    display: grid;
    grid-template-columns: 2fr 1.4fr;
    gap: 32px;
    align-items: flex-start;
}

.page-text p {
    margin-bottom: 12px;
    font-size: 0.98rem;
    color: #4b5563;
}

.page-highlight {
    border-left: 3px solid #111827;
    padding-left: 14px;
    margin: 18px 0;
    color: #111827;
    font-weight: 500;
    font-size: 0.98rem;
}

.page-card {
    background: #f9fafb;
    border-radius: 14px;
    padding: 20px 22px;
    border: 1px solid #e5e7eb;
}

.page-card-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 12px;
}

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

.page-list li {
    display: flex;
    gap: 10px;
    font-size: 0.92rem;
    color: #4b5563;
    margin-bottom: 8px;
}

.page-list li i {
    width: 18px;
    color: #111827;
    margin-top: 3px;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.4fr 1.6fr;
    gap: 28px;
    margin-top: 12px;
}

.contact-item {
    margin-bottom: 10px;
}

.contact-label {
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #9ca3af;
    margin-bottom: 2px;
}

.contact-value {
    font-size: 0.96rem;
    color: #111827;
}

.contact-form {
    display: grid;
    gap: 14px;
}

.contact-form-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.contact-form label {
    font-size: 0.85rem;
    color: #6b7280;
}

.contact-form input,
.contact-form textarea {
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    padding: 10px 12px;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: #111827;
    box-shadow: 0 0 0 1px #1118270f;
    outline: none;
}

.contact-form textarea {
    min-height: 110px;
    resize: vertical;
}

.contact-submit {
    margin-top: 4px;
    padding: 10px 18px;
    border-radius: 999px;
    border: none;
    background: #111827;
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    align-self: flex-start;
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.contact-submit:hover {
    background: #020617;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.35);
}

.contact-note {
    font-size: 0.8rem;
    color: #9ca3af;
    margin-top: 4px;
}

@media (max-width: 900px) {
    .page-wrapper {
        padding: 28px 22px;
    }

    .page-grid,
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .page-section {
        padding: 96px 16px 28px;
    }

    .page-wrapper {
        padding: 22px 18px;
    }

    .page-title {
        font-size: 1.6rem;
    }
}
