/* Modern Frontend Custom CSS */
body {
    background: #f8fafc;
    font-family: 'Inter', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    color: #222;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-top: 80px; /* Navbar için alan */
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1030;
}

.navbar.sticky-top {
    background: rgba(255, 255, 255, 0.98) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1) !important;
}

.navbar-brand img {
    transition: all 0.3s ease;
}

.nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    color: #2d3748 !important;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #4a5568 !important;
}

.navbar-toggler {
    border: none;
    padding: 0.5rem;
}

.navbar-toggler:focus {
    box-shadow: none;
    outline: none;
}

@media (max-width: 991.98px) {
    .navbar-collapse {
        padding: 1rem 0;
    }
    .nav-link {
        padding: 0.75rem 0 !important;
    }
}

#banner {
    background: linear-gradient(90deg, #e0e7ef 0%, #f8fafc 100%);
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 2rem;
}

main.container {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 16px rgba(0,0,0,0.04);
    padding: 2rem 1.5rem;
    margin-top: 2rem;
    margin-bottom: 2rem;
    flex: 1 0 auto;
}

.card, .category, .subcat, .product {
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: none;
    background: #fff;
}

.btn, .form-control {
    border-radius: 8px;
    box-shadow: none !important;
}

.btn-primary {
    background: #2563eb;
    border: none;
}
.btn-primary:hover {
    background: #1746a2;
}

/* Ana içerik alanı */
.main-content {
    flex: 1 0 auto;
    width: 100%;
    position: relative;
    z-index: 1;
    
}

/* Footer stilleri */
footer {
    background: #ffffff !important;
    color: #333 !important;
    flex-shrink: 0;
    position: relative;
    z-index: 2;
    width: 100%;
    border-top: 1px solid #eee;
}

footer .nav-link {
    color: #555 !important;
    font-size: 0.95rem;
    padding: 0.5rem 0.75rem;
    transition: color 0.2s;
}

footer .nav-link:hover {
    color: #2563eb !important;
}

footer .nav {
    gap: 0.25rem;
}

footer .social {
    display: flex;
    gap: 1.5rem;
}

footer .social a {
    color: #555;
    transition: color 0.2s;
    font-size: 1.25rem;
}

footer .social a:hover {
    color: #2563eb;
}

footer .text-secondary {
    color: #666 !important;
}

@media (max-width: 767px) {
    footer .nav {
        margin-bottom: 1.5rem;
    }
    footer .social {
        justify-content: center;
    }
}

::-webkit-scrollbar {
    width: 8px;
    background: #f6f8fa;
}
::-webkit-scrollbar-thumb {
    background: #e5e7eb;
    border-radius: 8px;
}

@media (max-width: 991px) {
    main.container {
        padding: 1rem 0.5rem;
    }
    .navbar-brand img {
        height: 36px;
    }
}

html, body {
    height: 100%;
}

body.home {
    overflow-x: hidden;
}
.hero-bg-content {
    margin-top: 0 !important;
    padding-top: 0 !important;
    top: 0 !important;
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
}
.hero-bg-content img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 1;
}
.hero-full {
    position: relative;
    width: 100vw;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    min-height: 60vh;
    height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.hero-full img.bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover;
    z-index: 1;
    filter: brightness(0.7);
}
.hero-full .hero-content {
    position: relative;
    z-index: 2;
    color: #fff;
    text-align: center;
    background: rgba(0,0,0,0.35);
    padding: 2rem 1rem;
    border-radius: 1rem;
    max-width: 700px;
    margin: 0 auto;
}
@media (max-width: 768px) {
    .hero-full .hero-content { padding: 1rem 0.5rem; font-size: 1rem; }
    .hero-full { min-height:    0vh; height: 50vw; }
}

body.home .hero-full {
    margin-bottom: 0 !important;
}
body.home .hero-full + footer {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

body.home .hero-bg-content {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}
body.home .hero-bg-content + footer {
    margin-top: 0 !important;
    padding-top: 0 !important;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
    background: #fff;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Ana Banner Styles */
.home-banner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    margin-top: -80px; /* navbar yüksekliği kadar yukarı çek */
    top:5.5rem
}

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

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    z-index: 2;
}

.banner-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 3;
    text-align: center;
    color: white;
    width: 90%;
}

/* Ürün Kartları Stilleri */
.page-title {
  text-align: left;
  margin-bottom: 1.5rem;
  font-weight: 600;
}

.section-title {
  text-align: center;
  margin-top: 2rem;
  margin-bottom: 2rem;
  font-weight: 600;
  color: #2d3748;
}

.products-list {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  justify-content: center;
}

.product-row {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  min-height: 120px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  width: 100%;
  max-width: 600px; /* Limit product row width */
}

.product-image {
  width: 100px;
  height: 100px;
  margin-right: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-right: 1px solid #eee;
  flex-shrink: 0;
}

.product-image img {
  max-width: 90%;
  max-height: 90%;
  object-fit: contain;
}

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

.product-content {
  flex-grow: 1;
  padding: 8px 16px;
}

.product-title {
  font-size: 1rem;
  font-weight: 500;
  color: #222;
  margin-bottom: 0.5rem;
}

.product-desc {
  color: #444;
  font-size: 0.9rem;
  white-space: normal;
}

.subcategories {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
    margin-bottom: 1.5rem;
}

.subcategory-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0f4f8;
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    text-decoration: none;
    color: #2d3748;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
    flex-grow: 1;
    flex-basis: calc(33.333% - 1rem); /* For 3 columns */
    max-width: calc(33.333% - 1rem);
}

.subcategory-link:last-child {
    margin-bottom: 0;
}

.subcategory-link:hover {
    background-color: #e2e8f0;
    color: #2563eb;
}

.subcategory-link span {
    font-size: 1rem;
}

.subcategory-link .badge {
    min-width: 2rem;
}

@media (max-width: 768px) {
    .product-image {
        width: 80px;
        height: 80px;
    }
    .product-title {
        font-size: 0.9rem;
    }
    .subcategory-link {
        flex-basis: calc(50% - 1rem); /* For 2 columns on smaller screens */
        max-width: calc(50% - 1rem);
    }
}

#categories {
    max-width: 1366px; /* Increased max-width for larger cards */
    margin: 2rem auto;
    padding: 0 1rem; /* Added for better spacing */
}

#categories .container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 3rem; /* Increased gap between cards */
    max-width: 1366px; /* Ensure container also respects max-width */
    margin: 0 auto;
    padding: 0 15px;
}

#categories .category {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#categories .category:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

#categories .category img {
    width: 100%;
    height: 200px; /* Set fixed height for images */
    object-fit: cover; /* Ensure images cover the area without distortion */
    transition: transform 0.3s ease;
}

#categories .category:hover img {
    transform: scale(1.05);
}

#categories .category h2 {
    padding: 15px;
    margin: 1.5rem 0; /* Increased margin for headings */
    font-size: 1.5rem; /* Increased font size for headings */
    color: #2d3748;
    text-align: center;
}

#categories .sub-cats {
    padding: 0 15px 15px;
}

#categories .sub-cat {
    margin-bottom: 8px;
}

#categories .sub-cat a {
    color: #4a5568;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.75rem 8px; /* Increased padding for links */
    border-radius: 5px;
    transition: all 0.3s ease;
    font-size: 1.1rem; /* Increased font size for links */
}

#categories .sub-cat a:hover {
    background-color: #f7fafc;
    color: #2b6cb0;
    padding-left: 12px;
}

/* Responsive tasarım */
@media (max-width: 1200px) {
    #categories .container {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 992px) {
    #categories .container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    #categories .container {
        grid-width: 1fr;
    }
}

/* Body styles */
body.frontend {
    background: #f8fafc;
    font-family: 'Inter', sans-serif;
}

/* Map iframe styles */
.map-iframe {
    border: 0;
    width: 100%;
    height: 100%;
}

/* Navbar Styles */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 1030;
    background: #fff;
    font-size: 1.1rem;
    letter-spacing: 0.01em;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Body Styles */
body {
    padding-top: 80px;
}

.navbar-nav .nav-link {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

.navbar-nav .nav-link:hover {
    color: #0d6efd;
}

/* Footer Styles */
.footer {
    background-color: #f8f9fa;
    padding: 2rem 0;
    margin-top: 3rem;
}

.social-links a {
    color: #666;
    margin: 0 10px;
    font-size: 1.5rem;
    transition: color 0.3s;
}

.social-links a:hover {
    color: #0d6efd;
}

#sub-categories .products {
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  width: 100%;
}

#sub-categories .products .product {
  width: 100%;
  max-width: 500px;
}

.products-title, .mb-4.text-center {
  text-align: center;
  margin-bottom: 2rem;
}

.products-table {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.product-row {
  display: flex;
  align-items: center;
  border: 1px solid #ddd;
  border-radius: 8px;
  background: #fff;
  min-height: 200px;
  margin-bottom: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.product-image {
  width: 200px;
  height: 200px;
  margin-right: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f8fafc;
  border-right: 1px solid #eee;
}

.product-image img {
  width: 200px;
  height: 200px;
  object-fit: contain;
}

.product-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  margin-left: 32px;
  flex: 1;
}

.product-title {
  font-size: 1.1rem;
  font-weight: 500;
  color: #222;
}

.product-desc {
  color: #444;
  font-size: 1.1rem;
  white-space: normal;
}

.tech-group {
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    margin-bottom: 25px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    overflow: hidden;
}

.tech-group-title {
    background-color: #f8f9fa;
    padding: 15px 20px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #eee;
}

.tech-table {
    padding: 20px;
}

.tech-row {
    display: flex;
    border-bottom: 1px solid #eee;
    padding: 10px 0;
}

.tech-row:last-child {
    border-bottom: none;
}

.tech-key {
    font-weight: 500;
    color: #555;
    flex-basis: 150px;
    flex-shrink: 0;
}

.tech-value {
    color: #333;
    flex-grow: 1;
}

.contact-info-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    padding: 30px;
    margin-bottom: 30px;
}

.contact-info-container h3 {
    color: #2d3748;
    margin-bottom: 20px;
}

.contact-info-container p {
    margin-bottom: 15px;
    color: #4a5568;
    line-height: 1.6;
}

.contact-info-container p i {
    margin-right: 10px;
    color: #2563eb;
}

.contact-map-container {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    overflow: hidden;
    height: 400px; /* Adjust height as needed */
}

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

.contact-map-container .ratio iframe {
    width: 100%;
    height: 100%;
}

.category-card {
    border-radius: 14px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.04);
    border: none;
    background: #fff;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.category-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.category-image-container {
    width: 100%;
    height: 180px;
    overflow: hidden;
    border-top-left-radius: 14px;
    border-top-right-radius: 14px;
}

.category-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.category-card:hover .category-image-container img {
    transform: scale(1.05);
}

.category-card .card-header {
    background-color: transparent;
    border-bottom: none;
    padding: 1.25rem 1.5rem 0.5rem 1.5rem;
}

.category-card .card-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #2d3748;
    text-align: center;
    margin-bottom: 0;
}

.category-sub-links {
    padding: 1rem 1.5rem 1.5rem;
}

.sub-category-link {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 1rem;
    margin-bottom: 0.5rem;
    background-color: #f7fafc;
    border-radius: 8px;
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}

.sub-category-link:last-child {
    margin-bottom: 0;
}

.sub-category-link:hover {
    background-color: #e2e8f0;
    color: #2563eb;
}

.sub-category-link span {
    font-size: 0.95rem;
}

.sub-category-link .badge {
    font-size: 0.8rem;
}

#sub-categories {
  max-width: 1000px; /* Limit sub-category page width */
  margin: 1rem auto; /* Center the sub-category page */
}

#sub-categories .container {
  display: grid;
  grid-template-columns: minmax(0, 300px) 1fr; /* Gallery max-width 300px, description takes remaining */
  grid-template-areas: "gallery description" "info info" "products products";
  gap: 2rem;
  padding: 0 15px; /* Add padding to container */
}

#sub-categories .container .gallery {
  display: flex;
  justify-content: center;
  box-shadow: 0 0 3px 0 rgba(0, 0, 0, 0.6);
  grid-area: gallery;
}

#sub-categories .container .gallery img {
  width: 100%;
  max-width: 300px; /* Ensure gallery image respects max width */
  height: auto;
}

#sub-categories .container .description {
  grid-area: description;
  padding: 1rem;
  box-sizing: border-box;
  overflow: hidden;
  min-width: 0; /* Allow shrinking in grid layout */
  flex-shrink: 1;
}

#sub-categories .container .description h3 {
  text-align: center;
  margin-bottom: 1rem;
}

#sub-categories .container .description p {
  line-height: 2rem;
  white-space: pre-wrap;
  width: 100%;
  max-width: 100%;
}

#sub-categories .container .info {
  grid-area: info;
}

#sub-categories .container .info div {
  display: flex;
  border-bottom: 1px solid rgba(0, 0, 0, 0.2666666667);
}

#sub-categories .container .info div:last-child {
  border-bottom: none;
}

#sub-categories .container .info div span {
  line-height: 2.5rem;
  display: inline-block;
}

#sub-categories .container .info div span:nth-child(1) {
  width: 12rem;
}

#sub-categories .container .info div span:nth-child(2) {
  width: calc(100% - 12rem);
}

#sub-categories .container .info div span:nth-child(2):before {
  content: ":";
  padding-right: 1rem;
  font-weight: bold;
}

/* Admin Styles */
/* Add any admin-specific styles here if needed */

/* References Slider Styles */
#references-slider {
    background-color: #f8f9fa; /* Light background for the section */
}

#references-slider h2 {
    color: #343a40; /* Darker heading color */
    font-weight: 600;
    margin-bottom: 2.5rem;
}

#referencesCarousel .card {
    border: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

#referencesCarousel .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

#referencesCarousel .card-title {
    font-size: 1.5rem;
    color: #007bff; /* Primary blue color for title */
    font-weight: 600;
}

#referencesCarousel .card-subtitle {
    font-size: 1rem;
    color: #6c757d; /* Muted color for subtitle */
}

#referencesCarousel .card-text {
    font-style: italic;
    color: #495057;
    line-height: 1.6;
}

#referencesCarousel .carousel-control-prev,
#referencesCarousel .carousel-control-next {
    width: 5%; /* Adjust width for controls */
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

#referencesCarousel .carousel-control-prev:hover,
#referencesCarousel .carousel-control-next:hover {
    opacity: 1;
}

#referencesCarousel .carousel-control-prev-icon,
#referencesCarousel .carousel-control-next-icon {
    background-color: #007bff; /* Blue color for icons */
    border-radius: 50%;
    padding: 15px;
    background-size: 50%;
}

#referencesCarousel .carousel-indicators button {
    background-color: #007bff; /* Blue color for indicators */
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin: 0 5px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

#referencesCarousel .carousel-indicators button.active {
    opacity: 1;
}

/* References Page Styles */
.references-page .card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.references-page .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15) !important;
}

.references-page .card-title {
    color: #007bff;
    font-weight: 600;
}

.references-page .card-subtitle {
    color: #6c757d;
}

.references-page .card-text {
    color: #495057;
    line-height: 1.6;
}