@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Color Variables & Base Reset */
:root {
    --primary-color: #cb2741;
    --primary-hover: #b01f35;
    --dark-bg: #18242f;
    --light-bg: #f4f5f8;
    --card-bg: #ffffff;
    --text-color: #555555;
    --text-dark: #222222;
    --border-color: #e0e0e0;
    --max-width: 1240px;
    --font-family: 'Poppins', sans-serif;
}

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

html {
    background-image: url('../images/bor-demir-site-background-2.jpg');
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: cover;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: transparent;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Layout Wrapper for Boxed Structure */
#Wrapper {
    background-color: var(--card-bg);
    max-width: var(--max-width);
    margin: 0 auto;
    box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
}

/* Action Bar (Top) */
#Action_bar {
    background-color: var(--dark-bg);
    color: #ffffff;
    padding: 10px 0;
    font-size: 13px;
}

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

.contact_details {
    display: flex;
    list-style: none;
    gap: 20px;
    flex-wrap: wrap;
}

.contact_details li {
    display: flex;
    align-items: center;
    gap: 8px;
}

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

.slogan a {
    background-color: var(--primary-color);
    padding: 3px 10px;
    border-radius: 3px;
    font-weight: 500;
}

.slogan a:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
}

/* Header & Menu */
#Header {
    background-color: var(--card-bg);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    height: 100px;
}

.logo img {
    height: 60px;
    display: block;
}

.menu-main {
    display: flex;
    list-style: none;
    gap: 25px;
}

.menu-main li a {
    font-weight: 500;
    font-size: 15px;
    color: var(--text-dark);
    padding: 10px 0;
    position: relative;
}

.menu-main li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 2px;
    background-color: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.menu-main li.current-menu-item a::after,
.menu-main li a:hover::after {
    transform: scaleX(1);
}

.menu-main li.current-menu-item a,
.menu-main li a:hover {
    color: var(--primary-color);
}

/* Mobile Toggle */
.responsive-menu-toggle {
    display: none;
    font-size: 24px;
    color: var(--text-dark);
}

/* Hero Slider (Carousel) */
.hero-slider-container {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    background-color: #000;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
    z-index: 1;
}

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

.slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slide-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.25);
}

.slide-caption {
    position: absolute;
    left: 10%;
    top: 50%;
    transform: translateY(-50%);
    color: #ffffff;
    z-index: 3;
}

.slide-caption h2 {
    font-size: 55px;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 10px;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease 0.4s;
}

.slide.active .slide-caption h2 {
    opacity: 1;
    transform: translateY(0);
}

/* Slider Controls */
.slider-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: rgba(0, 0, 0, 0.4);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    border: none;
    font-size: 20px;
    transition: background 0.3s ease;
}

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

.slider-arrow.prev {
    left: 20px;
}

.slider-arrow.next {
    right: 20px;
}

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

.indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    border: none;
}

.indicator.active {
    background: var(--primary-color);
}

/* General Layout Elements & Sections */
main {
    flex-grow: 1;
}

.page-section {
    padding: 60px 0;
}

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

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.grid-4 {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

/* Typography & Titles */
.section-title {
    font-size: 32px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 60px;
    height: 4px;
    background-color: var(--primary-color);
}

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

.text-center .section-title::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Page Subheader Banner */
.page-banner {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    text-align: center;
}

.page-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
}

.page-banner-content {
    position: relative;
    z-index: 2;
}

.page-banner h1 {
    font-size: 38px;
    font-weight: 600;
    margin-bottom: 10px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    background-color: var(--primary-color);
    color: #ffffff;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background-color: var(--primary-hover);
    box-shadow: 0 4px 10px rgba(203, 39, 65, 0.3);
}

/* Contact Info Cards (Home & Contact Pages) */
.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.info-card {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    background: var(--card-bg);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.info-card img {
    width: 60px;
    height: auto;
    flex-shrink: 0;
}

.info-card-text h4 {
    font-size: 16px;
    color: var(--text-dark);
    margin-bottom: 5px;
    font-weight: 600;
}

/* History Timeline (Kurumsal) */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto 0 auto;
    padding: 20px 0;
}

.timeline::before {
    content: '';
    position: absolute;
    width: 4px;
    background-color: var(--border-color);
    top: 0;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.timeline-item {
    padding: 10px 40px;
    position: relative;
    background-color: inherit;
    width: 50%;
}

.timeline-item::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    right: -10px;
    background-color: white;
    border: 4px solid var(--primary-color);
    top: 15px;
    border-radius: 50%;
    z-index: 1;
}

.timeline-left {
    left: 0;
}

.timeline-right {
    left: 50%;
}

.timeline-right::after {
    left: -10px;
}

.timeline-content {
    padding: 20px 30px;
    background-color: var(--card-bg);
    position: relative;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.timeline-content h3 {
    font-size: 22px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.timeline-note {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    font-style: italic;
    color: #888888;
}

.page-banner-divider {
    display: inline-block;
    width: 150px;
    height: 6px;
    background: var(--primary-color);
    margin-top: 15px;
}

/* Corporate Intro Section */
.corporate-intro {
    max-width: 1000px;
    margin: 0 auto;
}

.corporate-intro p {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-color);
    margin-bottom: 20px;
    text-align: justify;
}

/* Image Gallery Styles */
.image-gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 15px;
    margin-top: 30px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    aspect-ratio: 1 / 1;
}

.gallery-item a {
    display: block;
    width: 100%;
    height: 100%;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border: 2px solid #cfcfcf;
    border-radius: 4px;
    transition: transform 0.3s ease, border-color 0.3s ease;
    display: block;
}

.gallery-item a:hover img {
    transform: scale(1.05);
    border-color: var(--primary-color);
}

/* Weight Calculator Widget */
.calc-wrapper {
    background-color: var(--card-bg);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 800px;
    margin: 0 auto;
}

.calc-title {
    font-size: 20px;
    color: var(--text-dark);
    font-weight: 600;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 10px;
}

.calc-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}

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

.form-group label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-dark);
}

.form-group input,
.form-group textarea {
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-family: var(--font-family);
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--primary-color);
}

.calc-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: var(--light-bg);
    padding: 15px 25px;
    border-radius: 6px;
    font-size: 18px;
    font-weight: 600;
    color: var(--text-dark);
}

.calc-result-val {
    color: var(--primary-color);
    font-size: 24px;
}

/* Tables (Teknik Bilgiler / Urunlerimiz) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    margin-top: 25px;
    border-radius: 6px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

table {
    width: 100%;
    border-collapse: collapse;
    background-color: var(--card-bg);
    min-width: 600px;
}

th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background-color: var(--dark-bg);
    color: #ffffff;
    font-weight: 500;
}

tr:nth-child(even) {
    background-color: var(--light-bg);
}

/* Services Page (Hizmetlerimiz) */
.service-section-block {
    background-size: cover;
    background-position: center;
    height: 450px;
    position: relative;
}

.service-section-block:nth-child(even) .service-section-content {
    margin-left: auto;
}

.service-section-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
}

.service-section-content {
    position: relative;
    z-index: 2;
    background-color: #ffffff;
    max-width: 60%;
    height: 100%;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.service-section-content h2 {
    font-size: 32px;
    color: var(--text-dark);
    margin-bottom: 20px;
}

/* Contact Page Layout & Map Overlay */
.contact-map-section {
    width: 100%;
    height: 750px;
    position: relative;
    overflow: hidden;
}

.map-container-full {
    width: 100%;
    height: 100%;
}

.map-container-full iframe {
    width: 100%;
    height: 100%;
    border: none;
    display: block;
}

.contact-address-wrapper {
    position: relative;
    margin-top: -200px;
    z-index: 12;
}

.contact-address-card {
    background-color: #ffffff;
    padding: 30px 40px;
    max-width: 380px;
    border-radius: 6px;
    box-shadow: 0px 20px 35px rgba(27, 48, 77, 0.07);
}

/* Contact Form Split Layout */
.contact-form-section {
    display: flex;
    width: 100%;
}

.contact-form-left {
    width: 25%;
    background-color: var(--primary-color);
    padding: 80px 40px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-form-left img {
    width: 63px;
    height: auto;
    margin-bottom: 40px;
}

.contact-form-left h3 {
    font-size: 28px;
    font-weight: 600;
    line-height: 1.3;
}

.contact-form-left-divider {
    width: 55px;
    height: 6px;
    background: #e24961;
    margin-top: 15px;
}

.contact-form-right {
    width: 75%;
    background-color: #ffffff;
    padding: 80px 50px;
}

.form-status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.form-status.success {
    display: block;
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-status.error {
    display: block;
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Footer Section */
#Footer {
    background-color: var(--light-bg);
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    text-align: center;
}

.footer_copy {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

.copyright {
    font-size: 14px;
    color: #777777;
}

#back_to_top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 45px;
    height: 45px;
    background-color: var(--dark-bg);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    z-index: 1000;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
}

#back_to_top.show {
    opacity: 1;
    visibility: visible;
}

#back_to_top:hover {
    background-color: var(--primary-color);
    transform: translateY(-5px);
}

/* Mobile Navigation Side Slide (Drawer) */
#Side_slide {
    position: fixed;
    top: 0;
    right: -260px;
    width: 250px;
    height: 100%;
    background-color: var(--dark-bg);
    color: #ffffff;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.25);
    z-index: 10000;
    transition: right 0.3s ease-in-out;
    padding: 30px 20px;
    overflow-y: auto;
}

#Side_slide.active {
    right: 0;
}

.close-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 30px;
}

.close-wrapper a {
    color: #ffffff;
    font-size: 24px;
}

#Side_slide .menu-side {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 40px;
}

#Side_slide .menu-side li a {
    font-size: 18px;
    font-weight: 500;
    display: block;
}

#Side_slide .menu-side li.current-menu-item a,
#Side_slide .menu-side li a:hover {
    color: var(--primary-color);
}

#Side_slide .contact_details {
    flex-direction: column;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 30px;
}

#Side_slide .contact_details li {
    font-size: 14px;
}

#body_overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

#body_overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Responsive Styles */
@media only screen and (max-width: 1240px) {
    #Wrapper {
        width: 100%;
        box-shadow: none;
    }
}

@media only screen and (max-width: 959px) {
    .menu-main {
        display: none;
    }
    .responsive-menu-toggle {
        display: block;
    }
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    .service-section-content {
        max-width: 80%;
    }
    .image-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
    .contact-form-section {
        flex-direction: column;
    }
    .contact-form-left {
        width: 100%;
        padding: 50px 30px;
    }
    .contact-form-right {
        width: 100%;
        padding: 50px 30px;
    }
}

@media only screen and (max-width: 768px) {
    .grid-2, .grid-3, .contact-grid {
        grid-template-columns: 1fr;
        gap: 35px;
    }
    .hero-slider-container {
        height: 350px;
    }
    .slide-caption h2 {
        font-size: 36px;
    }
    .calc-grid {
        grid-template-columns: 1fr;
    }
    .timeline::before {
        left: 31px;
    }
    .timeline-item {
        width: 100%;
        padding-left: 55px;
        padding-right: 0;
    }
    .timeline-item::after {
        left: 21px;
        right: auto;
    }
    .timeline-right {
        left: 0;
    }
    .service-section-content {
        max-width: 100%;
        padding: 40px 20px;
    }
    .service-section-block {
        height: auto;
        min-height: 350px;
    }
    #Action_bar .container {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    .contact_details {
        justify-content: center;
    }
    .image-gallery {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .contact-map-section {
        height: 400px;
    }
    .contact-address-wrapper {
        margin-top: 20px;
    }
    .contact-address-card {
        max-width: 100%;
    }
}
