:root {
    --primary-red: #d32f2f;
    --dark-red: #b71c1c;
    --white: #ffffff;
    --text-color: #333333;
    --light-gray: #f4f4f4;
    --border-color: #dddddd;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: var(--text-color);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Intro Animation Container */
#intro-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--white);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: all 1s ease-in-out;
}

#intro-logo {
    max-width: 80%;
    max-height: 80vh;
    transition: all 1s ease-in-out;
}

/* Header */
header {
    background-color: var(--white);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: none;
    /* Initially hidden, shown after intro */
    opacity: 0;
    transition: opacity 0.5s ease;
}

header.visible {
    display: block;
    opacity: 1;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
}

.left-nav ul,
.right-nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

.left-nav ul li a,
.right-nav ul li a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    transition: color var(--transition-speed);
}

.left-nav ul li a:hover,
.right-nav ul li a:hover {
    color: var(--primary-red);
}

.logo-wrapper {
    flex-grow: 1;
    text-align: center;
    max-width: 200px;
    /* Limit logo width area */
    margin: 0 20px;
}

#header-logo {
    height: 80px;
    /* Adjust based on logo aspect ratio */
    width: auto;
}

.left-nav,
.right-nav {
    flex: 1;
    display: flex;
    justify-content: center;
}

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--primary-red);
}

.mobile-menu {
    display: none;
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
}

.mobile-menu ul {
    list-style: none;
    padding: 10px 0;
}

.mobile-menu ul li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: var(--text-color);
    border-bottom: 1px solid var(--light-gray);
}

/* Hero Slider */
#hero {
    position: relative;
    /* User requested "800x600 beautiful look". 
       A fixed 800x600 might be too small on large screens or too big on mobile.
       Let's optimize for a similar aspect ratio (4:3) or just ensure it covers well.
       The user said: "fotoğraflar 800x600 çözünürlüğünde güzel görünecek şekilde".
       I will set the height to approximate this feel and ensure object-fit: cover.
    */
    height: 600px;
    /* Aligns with 600px height request */
    overflow: hidden;
    background-color: #000;
    /* Fallback */
}

.slider-container {
    width: 100%;
    height: 100%;
    position: relative;
    /* Centering the content max-width to 800px might be what they mean by "800x600 resolution look"
       if they want the image to NOT stretch. But usually full width is preferred.
       If I interpret "800x600" as the *source* quality, then cover is fine.
       If I interpret it as "make the banner 800x600", I should limit width.
       Let's try full width but maintain the height, which is standard "banner" behavior.
       If they strictly physically want 800px width, it would look like a box in the middle.
       I will assume they mean the images provided ARE that size and should look good (not blurry).
    */
}

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

.slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    z-index: 10;
    background: rgba(0, 0, 0, 0.3);
    padding: 20px;
    border-radius: 8px;
}

.hero-overlay h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

.hero-overlay p {
    font-size: 1.5rem;
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: var(--white);
    border: none;
    padding: 15px;
    cursor: pointer;
    z-index: 20;
    font-size: 1.2rem;
    transition: background var(--transition-speed);
}

.slider-btn:hover {
    background: var(--primary-red);
}

.prev-btn {
    left: 20px;
}

.next-btn {
    right: 20px;
}

/* Certificate Styles */
.certificate-container {
    margin-top: 40px;
    text-align: center;
}

.certificate-img {
    max-width: 100%;
    height: auto;
    border: 5px solid var(--white);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    max-height: 500px;
    /* Limit height to prevent taking up too much space */
}

.certificate-container figcaption {
    margin-top: 10px;
    font-weight: 600;
    color: var(--text-color);
}

/* Service Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    padding: 20px 0;
}

.gallery-item {
    aspect-ratio: 4/3;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    transition: transform var(--transition-speed);
}

.gallery-item:hover {
    transform: scale(1.05);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity var(--transition-speed);
}

/* Sections */
.section {
    padding: 60px 0;
    scroll-margin-top: 120px;
    /* Fix for sticky header overlap */
}

/* Add smooth scrolling for better UX */
html {
    scroll-behavior: smooth;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    color: var(--text-color);
    margin-bottom: 40px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--primary-red);
    margin: 10px auto 0;
}

.alt-bg {
    background-color: var(--light-gray);
}

.section-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.section-content p {
    margin-bottom: 20px;
}

/* Service Items */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-item {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    text-align: center;
    transition: transform var(--transition-speed);
}

.service-item:hover {
    transform: translateY(-5px);
}

.service-item i {
    font-size: 3rem;
    color: var(--primary-red);
    margin-bottom: 20px;
}

.service-item h3 {
    margin-bottom: 15px;
}

/* Contact Info */
.contact-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    justify-content: center;
}

.contact-info {
    flex: 1;
    min-width: 300px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-red);
    margin-right: 20px;
    margin-top: 5px;
}

.info-item h4 {
    margin-bottom: 5px;
}

.info-item a {
    color: var(--text-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

.info-item a:hover {
    color: var(--primary-red);
}

.map-container {
    flex: 1;
    min-width: 300px;
    height: 300px;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* Footer */
footer {
    background-color: #222;
    color: var(--white);
    padding: 20px 0;
    text-align: center;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-wrap: wrap;
    }

    .left-nav,
    .right-nav {
        display: none;
        /* Hide default nav items */
    }

    .mobile-menu-btn {
        display: block;
        margin-right: 20px;
    }

    .logo-wrapper {
        margin: 0;
        text-align: left;
        margin-left: 20px;
    }

    .mobile-menu.active {
        display: block;
    }

    .hero-overlay h1 {
        font-size: 2rem;
    }

    #hero {
        height: 400px;
    }
}

/* Lightbox */
.lightbox {
    display: none;
    /* Hidden by default */
    position: fixed;
    z-index: 2000;
    padding-top: 60px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.9);
}

.lightbox-content {
    margin: auto;
    display: block;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    object-fit: contain;
    animation-name: zoom;
    animation-duration: 0.6s;
}

@keyframes zoom {
    from {
        transform: scale(0)
    }

    to {
        transform: scale(1)
    }
}

.close-lightbox {
    position: absolute;
    top: 15px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    transition: 0.3s;
    cursor: pointer;
}

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

/* Responsive Lightbox */
@media only screen and (max-width: 700px) {
    .lightbox-content {
        width: 100%;
    }
}