body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #ffffff;
  color: #222;
}

.top-header {
  display: flex;
  justify-content: center; 
  align-items: center;
  padding: 5px 30px;
  background-color: white;
  border-bottom: 1px solid #ddd;
  gap: clamp(80px, 60vw, 600px); 
}

.top-header img {
  height: 100px;
}

.search-bar {
  display: flex;
  align-items: center;
}

.search-bar input {
  padding: 6px 10px;
  font-size: 14px;
  width: 250px;
  border-radius: 20px 0 0 20px;
  border: 1px solid #ccc;
  outline: none;
}

.search-bar button {
  padding: 6px 14px;
  background-color: #003366;
  color: white;
  border: 1px solid #003366;
  border-radius: 0 20px 20px 0;
  cursor: pointer;
}

nav {
  background-color: #003366;
  margin-bottom: 0; /* Remove gap below nav bar */
}

nav ul {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  margin: 0;
  padding: 0;
  list-style: none;
}

nav li {
    position: relative;
    margin: 0 16px;
}

nav a {
  display: block;
  padding: 14px 20px;
  color: white;
  text-decoration: none;
  font-size: 14px;
}

nav a:hover,
nav li:hover > a {
  background-color: #00224d;
}

.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background-color: #003366;
  min-width: 200px;
  z-index: 999;
}

.dropdown a {
  padding: 10px 15px;
}

nav li:hover .dropdown {
  display: block;
}

.container {
  padding: 0 30px 30px 30px; /* Remove top padding, keep side and bottom */
  max-width: 1000px;
  margin: auto;
  flex: 1;
  margin-bottom: 0; /* Remove bottom margin to reduce gap below carousel */
}

h2 {
  color: #003366;
  font-size: 18px;
  margin-top: 40px;
}

p {
  line-height: 1.6;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 15px;
  margin-top: 40px;
}

.gallery img {
  width: 100%;
  border-radius: 4px;
  transition: transform 0.3s ease;
}

.gallery img:hover {
  transform: scale(1.05);
}

.site-footer {
  background-color: #1c1c1c;
  color: #8f8f8f;
  padding: 40px 30px 40px 30px; /* Increase top and bottom padding for thickness */
  font-size: 14px;
  position: relative;
  margin-top: 0;
}

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

.footer-left {
  margin: 0;
}

.footer-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.footer-right strong {
  margin-right: 10px;
}

.social-icons a {
  margin-left: 5px;
  background-color: #333;
  padding: 8px;
  border-radius: 3px;
  display: inline-block;
}

.social-icons img {
  display: block;
  width: 18px;
  height: 18px;
}

.scroll-to-top {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  background: #f9f9f9;
  border: 1px solid #ccc;
  border-radius: 50%;
  padding: 6px 10px;
  font-weight: bold;
  cursor: pointer;
}

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  display: flex;
  flex-direction: column;
}

.container {
  flex: 1;
}



.carousel {
  position: relative;
  overflow: hidden;
  height: 700px;
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  right: 50%;
  margin-left: -50vw;
  margin-right: -50vw;
  padding: 0;
}

.carousel-inner {
  display: flex;
  transition: transform 0.5s ease-in-out;
}

.carousel-item {
  min-width: 100%;
  position: relative;
}

.carousel-item img {
  width: 100%;
  height: 700px;
  object-fit: cover;
}

.carousel-caption {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  color: white;
  text-align: center;
  max-width: 80%;
  background: rgba(0, 0, 0, 0.4);
  padding: 20px;
  border-radius: 8px;
}

.carousel-caption h2 {
  margin: 0;
  font-size: 26px;
  font-weight: bold;
}

.carousel-caption p {
  font-size: 16px;
  margin: 10px 0;
}

.carousel-caption em {
  font-style: italic;
  font-size: 15px;
}

.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  padding: 10px 16px;
  cursor: pointer;
  font-size: 24px;
  z-index: 10;
  border-radius: 4px;
}

.carousel-control.prev {
  left: 20px;
}

.carousel-control.next {
  right: 20px;
}


.faq-section {
  max-width: 800px;
  margin: 0 auto;
  padding: 20px;
  font-family: Arial, sans-serif;
}

.faq-section h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.faq-item {
  margin-bottom: 25px;
  border-bottom: 1px solid #eee;
  padding-bottom: 20px;
}

.faq-item h3 {
  color: #0066cc;
  margin-bottom: 10px;
}

.faq-item p {
  line-height: 1.6;
  color: #555;
}

/* Duyurular section left-aligned but pushed to the right */
.announcement-section {
  max-width: 1000px;
  margin: 0 0 32px 400px; /* Push section to the right */
  text-align: left;
}

/* Extra footer: quick links closer together, left-aligned, background image support */
.extra-footer {
  display: flex;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 0; /* No gap between quick links */
  background-color: #f9f9f9;
  padding: 24px 30px 8px 300px; /* Push contents to the right by increasing left padding */
  border-top: 1px solid #ddd;
  background-image: url('../Assets/mainpage/footer-illustration.png'); 
  background-size: contain;
  background-position: center;
  margin-bottom: 0; /* Remove any default margin below extra-footer */
}

.quick-links {
  flex: 1 1 80px;
  margin: 0; /* No margin between quick links */
  min-width: 100px;
}

.quick-links h4 {
  margin-bottom: 10px;
  font-size: 16px;
  color: #003366;
}

.quick-links ul {
  list-style: none;
  padding: 0;
}

.quick-links ul li {
  margin-bottom: 6px;
}

.quick-links ul li a {
  color: #003366;
  text-decoration: none;
  font-size: 14px;
}

.quick-links ul li a:hover {
  text-decoration: underline;
}

.announcement-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s;
  border-radius: 4px;
  padding: 2px 4px;
}

.announcement-link:hover {
  background: rgba(0, 51, 102, 0.08);
  text-decoration: none;
}

/* Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Header adjustments */
  .top-header {
    flex-direction: column;
    padding: 10px 15px;
    gap: 15px;
  }

  .top-header img {
    height: 70px;
  }

  .search-bar {
    width: 100%;
    justify-content: center;
  }

  .search-bar input {
    width: 200px;
    font-size: 12px;
  }

  /* Navigation - Hamburger menu */
  nav {
    position: relative;
  }

  .nav-toggle {
    display: none; /* Initially hidden, will be shown via media query */
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px;
    cursor: pointer;
    position: absolute;
    right: 15px;
    top: 10px;
  }

  nav ul {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #003366;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
  }

  nav ul.active {
    display: flex;
  }

  nav li {
    margin: 0;
    border-bottom: 1px solid #004080;
  }

  nav a {
    padding: 15px 20px;
    font-size: 16px;
  }

  .dropdown {
    position: static;
    display: none;
    background-color: #004080;
    min-width: auto;
  }

  nav li:hover .dropdown,
  nav li.active .dropdown {
    display: block;
  }

  .dropdown a {
    padding: 10px 30px;
    font-size: 14px;
  }

  /* Container adjustments */
  .container {
    padding: 0 15px 20px 15px;
  }

  /* Carousel adjustments */
  .carousel {
    height: 300px;
  }

  .carousel-item img {
    height: 300px;
  }

  .carousel-caption {
    bottom: 20px;
    max-width: 90%;
    padding: 15px;
  }

  .carousel-caption h2 {
    font-size: 18px;
  }

  .carousel-caption p {
    font-size: 14px;
  }

  .carousel-control {
    padding: 8px 12px;
    font-size: 18px;
  }

  /* Gallery adjustments */
  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
  }

  /* Footer adjustments */
  .extra-footer {
    flex-direction: column;
    padding: 20px 15px;
    margin-left: 0;
    background-size: cover;
    background-position: center;
  }

  .quick-links {
    margin-bottom: 20px;
    flex: none;
  }

  .site-footer {
    padding: 20px 15px;
  }

  .footer-container {
    flex-direction: column;
    gap: 15px;
    text-align: center;
  }

  .footer-right {
    justify-content: center;
  }

  /* Announcement section adjustments */
  .announcement-section {
    margin: 0 0 20px 0;
    padding: 0 15px;
  }

  /* FAQ section adjustments */
  .faq-section {
    padding: 20px 15px;
  }

  /* Typography adjustments */
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 18px;
  }

  p {
    font-size: 14px;
  }
}

/* Tablet adjustments */
@media (min-width: 769px) and (max-width: 1024px) {
  .top-header {
    gap: clamp(40px, 30vw, 300px);
    padding: 10px 20px;
  }

  .container {
    padding: 0 20px 20px 20px;
  }

  .carousel {
    height: 500px;
  }

  .carousel-item img {
    height: 500px;
  }

  .extra-footer {
    padding: 20px 20px 8px 150px;
  }

  .announcement-section {
    margin: 0 0 25px 200px;
  }
}

/* Hide hamburger menu on desktop */
@media (min-width: 769px) {
  .nav-toggle {
    display: none !important;
  }
}

/* Ensure hamburger menu is visible on mobile */
@media (max-width: 768px) {
  .nav-toggle {
    display: block !important;
  }
}

/* Small mobile adjustments */
@media (max-width: 480px) {
  .top-header img {
    height: 60px;
  }

  .search-bar input {
    width: 150px;
  }

  .carousel {
    height: 250px;
  }

  .carousel-item img {
    height: 250px;
  }

  .carousel-caption {
    bottom: 15px;
    padding: 10px;
  }

  .carousel-caption h2 {
    font-size: 16px;
  }

  .carousel-caption p {
    font-size: 12px;
  }

  .gallery {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  }

  .container {
    padding: 0 10px 15px 10px;
  }

  h1 {
    font-size: 20px;
  }

  h2 {
    font-size: 18px;
  }

  h3 {
    font-size: 16px;
  }
}

/* Additional Mobile Responsive Styles */
@media (max-width: 768px) {
  /* Contact form improvements */
  .contact-form {
    padding: 15px;
  }
  
  .contact-form input,
  .contact-form textarea,
  .contact-form select {
    width: 100%;
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 12px;
    margin-bottom: 15px;
  }
  
  .contact-form button {
    width: 100%;
    padding: 12px;
    font-size: 16px;
  }
  
  /* Table responsiveness */
  table {
    width: 100%;
    font-size: 14px;
    border-collapse: collapse;
    overflow-x: auto;
    display: block;
    white-space: nowrap;
  }
  
  table thead,
  table tbody,
  table th,
  table td,
  table tr {
    display: block;
  }
  
  table thead tr {
    position: absolute;
    top: -9999px;
    left: -9999px;
  }
  
  table tr {
    border: 1px solid #ccc;
    margin-bottom: 10px;
    padding: 10px;
  }
  
  table td {
    border: none;
    position: relative;
    padding-left: 50%;
  }
  
  table td:before {
    content: attr(data-label);
    position: absolute;
    left: 6px;
    width: 45%;
    padding-right: 10px;
    white-space: nowrap;
    font-weight: bold;
  }
  
  /* Image responsiveness */
  img {
    max-width: 100%;
    height: auto;
  }
  
  /* Video responsiveness */
  video {
    max-width: 100%;
    height: auto;
  }
  
  /* Iframe responsiveness */
  iframe {
    max-width: 100%;
    height: auto;
  }
  
  /* List improvements */
  ul, ol {
    padding-left: 20px;
  }
  
  /* Text improvements */
  blockquote {
    margin: 20px 0;
    padding: 15px;
    border-left: 4px solid #003366;
    background-color: #f9f9f9;
  }
  
  /* Card-like content */
  .card {
    margin: 10px 0;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  }
  
  /* Buttons */
  .btn {
    display: inline-block;
    padding: 12px 20px;
    margin: 5px;
    text-decoration: none;
    border-radius: 4px;
    text-align: center;
    min-width: 120px;
  }
  
  .btn-primary {
    background-color: #003366;
    color: white;
  }
  
  .btn-secondary {
    background-color: #6c757d;
    color: white;
  }
}
