/* =========================================================
   Milan Tekstil - Responsive Stylesheet
   Accent: #e04622 | Dark: #1d2127 | Text: #444444
   ========================================================= */

:root {
    --primary: #e04622;
    --primary-dark: #c23717;
    --dark: #1d2127;
    --dark-soft: #282d36;
    --text: #444444;
    --text-muted: #777777;
    --bg-light: #f6f7f9;
    --border: #e5e8ec;
    --white: #ffffff;
    --radius: 8px;
    --shadow: 0 6px 24px rgba(0, 0, 0, 0.07);
    --transition: 0.25s ease;
}

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

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 15px;
    line-height: 1.65;
    color: var(--text);
    background: var(--white);
    overflow-x: hidden;
}

h1,
h2,
h3,
h4 {
    font-family: 'Poppins', 'Open Sans', sans-serif;
    color: var(--dark);
    margin-top: 0;
    line-height: 1.3;
}

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

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

a:hover {
    color: var(--primary-dark);
}

.container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: 64px 0;
}

.section-light {
    background: var(--bg-light);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 40px;
}

.section-header h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    margin-bottom: 10px;
}

.section-header p {
    color: var(--text-muted);
    margin: 0;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--text-muted);
}

.mt-2 {
    margin-top: 32px;
}

.mb-2 {
    margin-bottom: 24px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: 6px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
    white-space: nowrap;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: var(--white);
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border-color: var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: var(--white);
}

/* Topbar */
.topbar {
    background: var(--dark);
    color: #c8cdd4;
    font-size: 13px;
    padding: 8px 0;
}

.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}

.topbar-info {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.topbar-link {
    color: #d6dbe2;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.topbar-link:hover {
    color: var(--white);
}

/* Header & Navigation */
.site-header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 76px;
    gap: 16px;
    position: relative;
}

.brand-logo {
    position: relative;
    z-index: 1010;
    align-self: flex-start;
    display: inline-flex;
    align-items: flex-start;
    flex-shrink: 0;
}

.brand-logo img {
    height: 124px;
    width: auto;
    object-fit: contain;
    margin-top: 0;
    margin-bottom: -48px;
    transition: height 0.25s ease, margin 0.25s ease;
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.18));
}

.site-header.is-scrolled .brand-logo {
    align-self: center;
}

.site-header.is-scrolled .brand-logo img {
    height: 62px;
    margin-top: 0;
    margin-bottom: 0;
    filter: none;
}

.main-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.main-nav a {
    display: block;
    padding: 10px 15px;
    color: var(--dark);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 14px;
    border-radius: 6px;
    transition: all var(--transition);
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
    background: rgba(224, 70, 34, 0.08);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 8px;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

/* Hero Slider */
.hero-slider {
    position: relative;
    width: 100%;
    height: clamp(360px, 58vh, 540px);
    overflow: hidden;
    background: var(--dark);
    touch-action: pan-y;
}

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

.slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease, visibility 0.7s ease;
    display: flex;
    align-items: center;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

.slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 24, 30, 0.78) 0%, rgba(20, 24, 30, 0.42) 60%, rgba(20, 24, 30, 0.25) 100%);
}

.slide-content {
    position: relative;
    z-index: 3;
    color: var(--white);
    max-width: 720px;
}

.slide-content h1 {
    color: var(--white);
    font-size: clamp(1.75rem, 4vw, 3rem);
    margin-bottom: 12px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
}

.slide-content p {
    font-size: clamp(0.95rem, 1.5vw, 1.15rem);
    color: rgba(255, 255, 255, 0.9);
    margin: 0 0 24px;
}

.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(0, 0, 0, 0.45);
    color: var(--white);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

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

.slider-prev {
    left: 16px;
}

.slider-next {
    right: 16px;
}

.slider-dots {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 5;
    display: flex;
    gap: 10px;
}

.slider-dot {
    width: 11px;
    height: 11px;
    border-radius: 50%;
    border: 2px solid var(--white);
    background: transparent;
    padding: 0;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
}

.slider-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.15);
}

/* Intro Section */
.intro-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    background: var(--white);
    border-left: 4px solid var(--primary);
    padding: 32px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.intro-text h2 {
    font-size: clamp(1.25rem, 2.2vw, 1.65rem);
    margin-bottom: 10px;
}

.intro-text p {
    margin: 0;
    color: var(--text-muted);
}

/* Products Preview Grid (Home) */
.products-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 24px;
}

.product-preview-card {
    background: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
    transition: transform var(--transition), box-shadow var(--transition);
    display: flex;
    flex-direction: column;
}

.product-preview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.11);
}

.product-preview-img {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #eee;
}

.product-preview-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.product-preview-card:hover .product-preview-img img {
    transform: scale(1.05);
}

.product-preview-body {
    padding: 18px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.product-preview-body h3 {
    font-size: 1rem;
    margin: 0;
}

.product-preview-body span {
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    white-space: nowrap;
}

/* Page Banner */
.page-banner {
    background: linear-gradient(135deg, var(--dark) 0%, var(--dark-soft) 100%);
    color: var(--white);
    padding: 48px 0;
    border-bottom: 3px solid var(--primary);
}

.page-banner h1 {
    color: var(--white);
    font-size: clamp(1.6rem, 3vw, 2.25rem);
    margin-bottom: 8px;
}

.page-banner p {
    margin: 0;
    color: #c8cdd4;
    max-width: 680px;
}

/* Kurumsal & AR-GE */
.feature-image-wrap {
    margin-bottom: 32px;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.feature-image-wrap img {
    width: 100%;
    max-height: 440px;
    object-fit: cover;
}

.prose-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 32px;
    box-shadow: var(--shadow);
}

.prose-card p:last-child {
    margin-bottom: 0;
}

.text-link {
    font-weight: 600;
}

.two-col-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.info-card {
    background: var(--bg-light);
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
    border-radius: var(--radius);
    padding: 28px;
}

.info-card-badge {
    display: inline-block;
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    font-size: 13px;
    color: var(--primary);
    background: rgba(224, 70, 34, 0.12);
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.split-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: center;
}

.split-media img {
    width: 100%;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

/* Ürünler Page */
.product-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
    justify-content: center;
}

.tab-btn {
    padding: 9px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--white);
    color: var(--dark);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.tab-btn:hover,
.tab-btn.active {
    background: var(--primary);
    border-color: var(--primary);
    color: var(--white);
}

.products-list {
    display: grid;
    gap: 28px;
}

.product-detail-card {
    display: grid;
    grid-template-columns: 320px 1fr;
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.product-detail-card.is-hidden {
    display: none;
}

.product-detail-img {
    background: #f0f0f0;
}

.product-detail-img img {
    width: 100%;
    height: 100%;
    min-height: 220px;
    object-fit: cover;
}

.product-detail-body {
    padding: 28px;
}

.product-detail-body h2 {
    font-size: 1.35rem;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--bg-light);
}

.product-items-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 8px 20px;
}

.product-items-list li {
    position: relative;
    padding-left: 18px;
    font-size: 14px;
}

.product-items-list li::before {
    content: "•";
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: 700;
}

/* Gallery Grid & Lightbox */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 18px;
}

.gallery-card {
    position: relative;
    padding: 0;
    border: none;
    border-radius: var(--radius);
    overflow: hidden;
    aspect-ratio: 3 / 2;
    cursor: pointer;
    background: #e9ecef;
    box-shadow: var(--shadow);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.35s ease;
}

.gallery-card:hover img {
    transform: scale(1.06);
}

.gallery-zoom {
    position: absolute;
    inset: 0;
    background: rgba(29, 33, 39, 0.45);
    color: var(--white);
    font-size: 32px;
    font-weight: 300;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity var(--transition);
}

.gallery-card:hover .gallery-zoom {
    opacity: 1;
}

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 18, 22, 0.92);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox.open {
    display: flex;
}

.lightbox-content {
    max-width: 960px;
    max-height: 85vh;
    text-align: center;
}

.lightbox-content img {
    max-height: 76vh;
    width: auto;
    margin: 0 auto;
    border-radius: 6px;
}

.lightbox-caption {
    color: #e2e6ec;
    margin: 12px 0 0;
    font-size: 14px;
}

.lightbox-close,
.lightbox-nav {
    position: fixed;
    background: rgba(255, 255, 255, 0.14);
    color: var(--white);
    border: none;
    cursor: pointer;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--transition);
}

.lightbox-close:hover,
.lightbox-nav:hover {
    background: var(--primary);
}

.lightbox-close {
    top: 18px;
    right: 20px;
}

.lightbox-prev {
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
}

.lightbox-next {
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
}

/* Contact Page */
.contact-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 32px;
    align-items: start;
}

.contact-form-card,
.contact-info-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 6px;
    color: var(--dark);
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cfd5de;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(224, 70, 34, 0.14);
}

.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.alert {
    padding: 14px 16px;
    border-radius: 6px;
    margin-bottom: 18px;
    font-size: 14px;
    font-weight: 600;
}

.alert-success {
    background: #eaf7ee;
    color: #1c6b36;
    border: 1px solid #b9e2c6;
}

.alert-error {
    background: #fdecec;
    color: #a61d1d;
    border: 1px solid #f5bcbc;
}

.contact-info-col {
    display: grid;
    gap: 24px;
}

.contact-details {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 14px;
}

.contact-details li {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bg-light);
}

.contact-details li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.detail-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--primary);
    font-weight: 700;
}

.map-card {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.map-card iframe {
    width: 100%;
    height: 300px;
    border: 0;
    display: block;
}

/* Footer */
.site-footer {
    background: var(--dark);
    color: #b8bfc8;
    padding-top: 52px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr 1.2fr;
    gap: 32px;
    padding-bottom: 40px;
}

.footer-logo {
    margin-bottom: 14px;
    background: var(--white);
    padding: 6px 10px;
    border-radius: 6px;
}

.footer-desc {
    font-size: 14px;
    margin: 0;
}

.footer-col h4 {
    color: var(--white);
    font-size: 16px;
    margin-bottom: 14px;
}

.footer-links,
.footer-contact {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 8px;
    font-size: 14px;
}

.footer-links a,
.footer-contact a {
    color: #c8cdd4;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--white);
}

.footer-bottom {
    background: #14171c;
    padding: 16px 0;
    text-align: center;
    font-size: 13px;
    color: #8f96a0;
}

/* =========================================================
   Mobile & Tablet Responsive Breakpoints
   ========================================================= */
@media (max-width: 960px) {
    .intro-box {
        flex-direction: column;
        align-items: flex-start;
    }

    .two-col-grid,
    .split-layout,
    .contact-layout,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .product-detail-card {
        grid-template-columns: 1fr;
    }

    .product-detail-img img {
        max-height: 260px;
    }
}

@media (max-width: 768px) {
    body {
        font-size: 14.5px;
    }

    .container {
        padding: 0 16px;
    }

    .section {
        padding: 40px 0;
    }

    .topbar {
        padding: 6px 0;
        font-size: 12px;
    }

    .topbar-inner {
        justify-content: center;
    }

    .topbar-info {
        justify-content: center;
        gap: 14px;
    }

    .topbar-location {
        display: none;
    }

    .brand-logo img {
        height: 92px;
        margin-top: 0;
        margin-bottom: -24px;
    }

    .site-header.is-scrolled .brand-logo img {
        height: 54px;
        margin-top: 0;
        margin-bottom: 0;
    }

    .hero-slider {
        height: 320px;
    }

    .slide-content h1 {
        font-size: 1.45rem;
        margin-bottom: 8px;
    }

    .slide-content p {
        font-size: 0.9rem;
        margin-bottom: 16px;
    }

    .slider-arrow {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }

    .slider-prev {
        left: 8px;
    }

    .slider-next {
        right: 8px;
    }

    .nav-toggle {
        display: flex;
    }

    .main-nav {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--white);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .main-nav.open {
        max-height: 400px;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        padding: 12px 20px 18px;
        gap: 4px;
    }

    .main-nav a {
        padding: 12px 14px;
    }

    .slider-arrow {
        width: 34px;
        height: 34px;
        font-size: 20px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .prose-card,
    .contact-form-card,
    .contact-info-card {
        padding: 20px;
    }

    .scroll-top-btn {
        bottom: 16px;
        right: 16px;
        width: 42px;
        height: 42px;
    }
}

/* Scroll to Top Button */
.scroll-top-btn {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 1500;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: none;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.22);
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity var(--transition), visibility var(--transition), transform var(--transition), background var(--transition);
}

.scroll-top-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-top-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}