/* Responsive styles for Sahin Ofset website */

/* General responsive adjustments */
@media (max-width: 991px) {
  html {
    font-size: 14px; /* Slightly reduce base font size on tablets */
  }

  /* Improve touch scrolling on mobile devices */
  * {
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS devices */
  }
}

@media (max-width: 767px) {
  html {
    font-size: 13px; /* Further reduce base font size on mobile */
  }

  /* Reduce vertical spacing on mobile */
  .pt-5, .py-5, .p-5 {
    padding-top: 2rem !important;
  }

  .pb-5, .py-5, .p-5 {
    padding-bottom: 2rem !important;
  }

  .pt-6, .py-6, .p-6 {
    padding-top: 2.5rem !important;
  }

  .pb-6, .py-6, .p-6 {
    padding-bottom: 2.5rem !important;
  }

  .mt-7, .my-7, .m-7 {
    margin-top: 3rem !important;
  }

  .mb-7, .my-7, .m-7 {
    margin-bottom: 3rem !important;
  }
}

@media (max-width: 575px) {
  html {
    font-size: 12px; /* Even smaller base font size on small mobile devices */
  }
}
.caption-2 {
  font-size: 1.5rem;
  line-height: 1.5;
  letter-spacing: -0.3px; }

/* Responsive typography */
@media (max-width: 767px) {
  /* Adjust the large heading in block-1 */
  .block-1 p[style*="font-size: 3.35rem"] {
    font-size: 2.5rem !important;
    margin-bottom: 1.5rem !important;
  }

  .contact-button {
    font-size: 1.2rem !important; /* Adjust contact button font size */
    padding: 10px 20px !important; /* Adjust padding for better touch targets */
    width: 60%;
  }

  /* Adjust the "Bize ulaşın" link */
  a[style*="font-size: 2rem"] {
    font-size: 1.5rem !important;
  }

  /* Adjust the heading in block-4 */
  h1[style*="font-size:3rem"] {
    font-size: 2.2rem !important;
    margin-bottom: 1.5rem !important;
    margin-top: 1.5rem !important;
  }

  /* Adjust the paragraph in block-4 */
  p[style*="font-size:1.7rem"] {
    font-size: 1.3rem !important;
    width: 100% !important; /* Full width on mobile */
    margin-bottom: 2rem !important;
  }

  /* Adjust the text in block-5 */
  .lead[style*="font-size: 22px"] {
    font-size: 18px !important;
  }

  /* Adjust the headings in block-5 */
  p[style*="font-size: 24px"] {
    font-size: 20px !important;
  }

  /* Adjust the paragraphs in block-5 */
  p[style*="font-size: 20px"] {
    font-size: 16px !important;
    width: 100% !important; /* Full width on mobile */
  }
}

/* Custom table improvements */
@media (max-width: 991px) {
  .custom-table {
    width: 95% !important; /* Wider table on tablets */
    padding: 32px 24px !important;
    gap: 30px !important;
  }

  .custom-table-item {
    font-size: 1.7rem;
    padding: 30px 0 !important;
  }

  /* Fix for custom-table-col min-width causing horizontal overflow */
  .custom-table-col {
    min-width: unset !important;
  }
}

@media (max-width: 767px) {
  .custom-table-outer {
    padding: 0 !important;
    overflow-x: visible !important; /* Ensure no horizontal scroll is blocked */
  }

  .contacts {
    background : #B3B3B3;
     }


  .custom-table {
    width: 100% !important; /* Full width on mobile */
    padding: 20px 15px !important;
    border-radius: 12px !important;
    overflow-x: visible !important; /* Ensure no horizontal scroll is blocked */
  }

  .custom-table-item {
    font-size: 1.2rem !important;
    border-radius: 1px !important;

    padding: 15px 0 !important; /* Reduce padding to prevent excessive height */
  }
}

/* Image optimizations */
@media (max-width: 767px) {
  .img-block img {
    max-width: 100%;
    height: auto;
  }

  .block-3 .img-container {
    margin-top: 2rem;
  }
}

/* Fix for block-5 line width */
@media (max-width: 767px) {
  .block-5 .line {
    width: 100% !important; /* Make line full width on mobile */
    max-width: 250px !important;
  }
}

/* Improve slider on mobile */
@media (max-width: 767px) {
  /* Fix for block-6 overflow hidden preventing proper scrolling */
  .block-6 {
    overflow: visible !important;
  }

  .block-6 .slider-1 .slick-slide {
    margin-right: 15px !important;
  }

  /* Fix for slider overflow */
  .block-6 .slider-1 .slick-list {
    overflow: visible !important; /* Allow both slider and page to scroll properly */
  }
}

/* Improve contacts section on mobile */
@media (max-width: 767px) {
  .contacts h3 {
    font-size: 1.8rem !important;
  }
}

/* Mobile menu improvements */
/* Hamburger icon - override the background image styles from all.css */
.hamburger {
  width: 30px;
  height: 20px;
  position: relative;
  cursor: pointer;
  display: inline-block;
  background-image: none !important; /* Override background image */
  background-color: transparent !important;
}

.hamburger:before,
.hamburger:after,
.hamburger span {
  background-color: #fff;
  content: '';
  display: block;
  height: 2px;
  position: absolute;
  width: 100%;
  transition: all 0.2s ease-in-out;
}

.hamburger:before {
  top: 0;
}

.hamburger span {
  top: 9px;
}

.hamburger:after {
  bottom: 0;
}

/* Close button - override the background image styles from all.css */
.close {
  width: 30px;
  height: 30px;
  position: relative;
  cursor: pointer;
  background-image: none !important; /* Override background image */
  background-color: transparent !important;
}

.close:before,
.close:after {
  background-color: #fff;
  content: '';
  display: block;
  height: 2px;
  position: absolute;
  width: 100%;
  top: 50%;
}

.close:before {
  transform: rotate(45deg);
}

.close:after {
  transform: rotate(-45deg);
}

/* Mobile menu */
.mobile-menu {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  padding: 20px;
  overflow-y: auto; /* Allow scrolling within the mobile menu */
}

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

/* Prevent body scrolling when mobile menu is active */
body.mobile-menu-active {
  overflow: hidden;
}

@media (min-width: 576px) {
  .mobile-menu {
    position: static;
    display: block;
    background-color: transparent;
    height: auto;
    padding: 0;
    overflow-y: visible;
  }

  body.mobile-menu-active {
    overflow: auto; /* Restore scrolling on larger screens */
  }
}

/* Additional mobile improvements */
@media (max-width: 767px) {
  /* Improve logo display */
  .logo {
    max-width: 120px;
    height: auto;
  }

  /* Better spacing for block-3 on mobile */
  .block-3 .col-xxl-10 {
    margin-bottom: 2rem !important;
  }

  /* Improve image display in block-3 */
  .block-3 .img-container .img-block img {
    width: 100%;
    height: auto;
    object-fit: cover;
  }

  /* Better alignment for text in block-5 */
  .block-5 .lead {
    text-align: center;
  }

  /* Improve slider in block-6 */
  .block-6 .slider-1 .slick-slide img {
    width: 100%;
    height: auto;
  }

/* Make cards in block-6 more readable on PC */
@media (min-width: 768px) {
  .block-6 .slider-1 .slick-slide {
    max-width: 150px;
    margin-right: 20px;
  }

  .block-6 .slider-1 .slick-slide img {
    width: 100%;
    height: auto;
    max-height: 90px;
    object-fit: cover;
  }
}

  /* Improve spacing in block-7 */
  .block-7 .col-lg-4 {
    margin-bottom: 3rem !important;
  }

  /* Center align contact information */
  .contacts h3 {
    font-size: 1.5rem !important;
    word-break: break-word;
  }
}

/* Fix for block-9 pseudo-table with fixed width */
@media (max-width: 992px) {
  .block-9 .pseudo-table .inner {
    min-width: unset !important; /* Remove fixed width that causes horizontal overflow */
    width: 100% !important;
  }

  .block-9 .pseudo-table .overflow {
    overflow: visible !important; /* Ensure content is not cut off */
  }
}

/* Small mobile improvements */
@media (max-width: 575px) {
  /* Further reduce spacing */
  .pt-5, .py-5, .p-5 {
    padding-top: 1.5rem !important;
  }

  .pb-5, .py-5, .p-5 {
    padding-bottom: 1.5rem !important;
  }

  /* Adjust heading sizes */
  h3 {
    font-size: 2.3rem !important;
  }

  h4 {
    font-size: 1.9rem !important;
  }

  h5 {
    font-size: 1.7rem !important;
  }

  /* Ensure images don't overflow */
  img {
    max-width: 100%;
    height: auto;
  }

  /* General fix for any horizontal overflow issues */
  body, html {
    overflow-x: hidden !important;
    width: 100% !important;
    position: relative !important;
  }

  /* Ensure all blocks allow vertical scrolling */
  [class^="block-"] {
    overflow-y: visible !important;
  }
}

/* Footer improvements */
/* More subtle footer design with animations */
.footer.bg-black {
  background: linear-gradient(to bottom, #2a2a2a, #333333) !important; /* Gradient background */
  padding-top: 2rem !important; /* Reduced top padding */
  padding-bottom: 1.5rem !important; /* Reduced bottom padding */
  border-top: 1px solid rgba(255, 255, 255, 0.1); /* Subtle top border */
  position: relative;
  overflow: hidden;
}

/* Add subtle animated background pattern */
.footer.bg-black::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image:
    radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.02) 1%, transparent 1%),
    radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.02) 1%, transparent 1%);
  background-size: 50px 50px;
  opacity: 0.3;
  animation: footerBgShift 60s linear infinite;
}

@keyframes footerBgShift {
  0% { background-position: 0 0; }
  100% { background-position: 50px 50px; }
}

.footer .container {
  padding-top: 0.5rem !important; /* Reduced container top padding */
  position: relative; /* Ensure content is above the animated background */
}

.footer .border-top-light-2 {
  border-top-color: rgba(255, 255, 255, 0.1) !important; /* More subtle border */
}

/* Fade-in animation for footer when it comes into view */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.footer .row {
  animation: fadeInUp 0.8s ease-out forwards;
}

.footer .row:nth-child(2) {
  animation-delay: 0.2s;
}

/* Logo glow effect */
.footer .logo {
  position: relative;
  display: inline-block;
  transition: all 0.5s ease;
}

.footer .logo:hover {
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
  letter-spacing: 0.5px;
}

@keyframes logoGlow {
  0% { text-shadow: 0 0 5px rgba(255, 255, 255, 0.1); }
  50% { text-shadow: 0 0 15px rgba(255, 255, 255, 0.3); }
  100% { text-shadow: 0 0 5px rgba(255, 255, 255, 0.1); }
}

.footer-visible .logo {
  animation: logoGlow 3s ease-in-out infinite;
}

/* Link hover effects */
.footer a.caption-2 {
  color: rgba(255, 255, 255, 0.6) !important; /* More muted text color */
  transition: color 0.3s ease, transform 0.2s ease;
  display: inline-block;
  font-size: 1.3rem !important;
}

.footer a.caption-2:hover {
  color: rgba(255, 255, 255, 0.9) !important;
  transform: translateX(3px);
}

.footer a.caption-1 {
  transition: color 0.3s ease;
}

.footer a.caption-1:hover {
  color: #ffc505 !important; /* Highlight color on hover */
}

.footer .grey-light-4 {
  color: rgba(255, 255, 255, 0.6) !important; /* More muted text color */
}

/* Social media icons with animations */
.footer .social {
  background-color: rgba(255, 255, 255, 0.1) !important; /* More subtle social button background */
  transition: all 0.3s ease;
  transform-origin: center;
}

.footer .social:hover {
  background-color: rgba(255, 255, 255, 0.2) !important;
  transform: scale(1.1);
}

.footer .social svg {
  opacity: 0.7; /* Slightly muted icons */
  transition: all 0.3s ease;
}

.footer .social:hover svg {
  opacity: 1;
  fill: #ffc505 !important; /* Change icon color on hover */
}

/* Social media image hover effects */
.footer img[alt="Facebook"],
.footer img[alt="Instagram"],
.footer img[alt="Twitter"] {
  transition: all 0.3s ease;
  filter: grayscale(30%);
}

.footer img[alt="Facebook"]:hover,
.footer img[alt="Instagram"]:hover,
.footer img[alt="Twitter"]:hover {
  transform: scale(1.1);
  filter: grayscale(0%);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.2);
}

/* Intersection Observer animation classes */
.footer-hidden {
  opacity: 0;
  transform: translateY(30px);
}

.footer-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Social hover animation */
@keyframes socialPulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

.social-hover img,
.social-hover svg {
  animation: socialPulse 0.6s ease-in-out;
}

/* Staggered animation for footer links */
.footer-visible .col-6 a {
  opacity: 0;
  animation: fadeInRight 0.5s ease forwards;
}

@keyframes fadeInRight {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.footer-visible .col-6:nth-child(1) a:nth-child(1) { animation-delay: 0.1s; }
.footer-visible .col-6:nth-child(1) a:nth-child(2) { animation-delay: 0.2s; }
.footer-visible .col-6:nth-child(1) a:nth-child(3) { animation-delay: 0.3s; }
.footer-visible .col-6:nth-child(1) a:nth-child(4) { animation-delay: 0.4s; }

.footer-visible .col-6:nth-child(2) a:nth-child(1) { animation-delay: 0.15s; }
.footer-visible .col-6:nth-child(2) a:nth-child(2) { animation-delay: 0.25s; }
.footer-visible .col-6:nth-child(2) a:nth-child(3) { animation-delay: 0.35s; }
.footer-visible .col-6:nth-child(2) a:nth-child(4) { animation-delay: 0.45s; }

.footer-visible .col-6:nth-child(3) a:nth-child(1) { animation-delay: 0.2s; }
.footer-visible .col-6:nth-child(3) a:nth-child(2) { animation-delay: 0.3s; }
.footer-visible .col-6:nth-child(3) a:nth-child(3) { animation-delay: 0.4s; }
.footer-visible .col-6:nth-child(3) a:nth-child(4) { animation-delay: 0.5s; }

@media (max-width: 767px) {
  .footer .social {
    margin-right: 10px !important;
  }

  .footer .caption-2 {
    font-size: 0.8rem !important;
  }
}
