@tailwind base;
@tailwind components;
@tailwind utilities;
@source "../node_modules/@acmecorp/ui-lib";

@font-face {
  font-family: 'BR Firma';
  src: local(''), url('../fonts/BR\ Firma\ Bold.woff') format('woff'), url('../fonts/BR\ Firma\ Bold.woff2') format('woff2');
  font-display: swap;
  font-style: normal;
  font-weight: 700;
}

* {
  --inky-color: #6f0094;
  --qizil-color: #D60041;
}

.font-bold,
.font-inter,
.font-medium {
  font-family: 'BR Firma';
  font-optical-sizing: auto;
  font-weight: 700 !important;
}

.swiper-pagination-bullet-active {
  background-color: #4680ff
}

@keyframes twinkle {

  0%,
  100% {
    opacity: 0.3;
    transform: scale(1);
  }

  50% {
    opacity: 1;
    transform: scale(1.2);
  }
}

/* Children Carousel Styles */
.children-carousel {
  position: relative;
  max-width: 500px;
  user-select: none;
}

.child-card {
  background: white;
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 10px 30px rgba(90, 0, 122, 0.1);
  border: 8px solid #FFB3C7;
  transition: all 0.3s ease;
  height: 400px;
  display: flex;
  flex-direction: column;
}

.child-card img {
  width: 100%;
  height: 70%;
  object-fit: cover;
  object-position: top;
  flex-shrink: 0;
}

.child-card-content {
  padding: 15px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
}

.child-card {
  color: #5A007A;
  margin-bottom: 8px;
}

.child-card img:hover {
  transition: transform 0.3s ease;
}

.child-card:hover img {
  transform: scale(1.1);
}

/* Swiper Navigation Styles */
.children-swiper {
  position: relative;
  padding: 0 50px;
}

/* Swiper Pagination Styles */
.swiper-pagination {
  position: relative;
  margin-top: 30px;
}

.swiper-pagination-bullet {
  background: #FFB3C7;
  opacity: 0.5;
  transition: all 0.3s ease;
}

.swiper-pagination-bullet-active {
  background: #FF8AA8;
  opacity: 1;
  transform: scale(1.2);
}

/* Mobile-First Responsive Design */
@media (max-width: 640px) {
  .child-card {
    height: 300px;
    border: 4px solid #FFB3C7;
  }

  .child-card img {
    height: 60%;
  }

  .child-card-content {
    padding: 12px;
  }

  .children-swiper {
    padding: 0 20px;
  }

  .swiper-button-next,
  .swiper-button-prev {
    width: 35px;
    height: 35px;
    margin-top: -17.5px;
    display: none;
    /* Hide navigation arrows on mobile for cleaner look */
  }

  .swiper-pagination {
    margin-top: 20px;
  }

  .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 4px;
  }
}

@media (min-width: 641px) and (max-width: 768px) {
  .child-card {
    height: 350px;
  }

  .child-card img {
    height: 65%;
  }

  .child-card-content {
    padding: 14px;
  }

  .children-swiper {
    padding: 0 30px;
  }

  .swiper-button-next,
  .swiper-button-prev {
    width: 40px;
    height: 40px;
    margin-top: -20px;
  }

}

/* Touch-friendly mobile interactions */
@media (max-width: 768px) {
  .child-card {
    transition: transform 0.2s ease;
  }

  .child-card:active {
    transform: scale(0.98);
  }
}

/* Mobile-specific improvements */
@media (max-width: 640px) {

  /* Improve mobile navigation */
  #mobile-nav {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    z-index: 50;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  }

  /* Ensure burger button is clickable */
  .burger-btn {
    position: relative;
    z-index: 10;
    cursor: pointer;
    user-select: none;
    -webkit-tap-highlight-color: transparent;
  }

  /* Better mobile typography */
  body {
    font-size: 14px;
    line-height: 1.5;
  }

  /* Mobile-friendly buttons */
  .burger-btn {
    padding: 8px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
  }

  .burger-btn:active {
    background-color: rgba(90, 0, 122, 0.1);
  }

  /* Mobile image optimization */
  img {
    max-width: 100%;
    height: auto;
  }
}

/* Tablet-specific improvements */
@media (min-width: 641px) and (max-width: 1024px) {
  .child-card {
    height: 380px;
  }

  .children-swiper {
    padding: 0 40px;
  }
}

/* High-resolution display optimizations */
@media (-webkit-min-device-pixel-ratio: 2),
(min-resolution: 192dpi) {
  .child-card img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}

/* Text overflow and wrapping fixes */
.break-words {
  word-wrap: break-word;
  overflow-wrap: break-word;
  word-break: break-word;
}

.hyphens-auto {
  hyphens: auto;
  -webkit-hyphens: auto;
  -moz-hyphens: auto;
  -ms-hyphens: auto;
}

/* Prevent content from overflowing into other sections */
section {
  overflow: hidden;
  position: relative;
}

/* Ensure proper text containment */
h1,
h2,
h3,
p {
  max-width: 100%;
  overflow-wrap: break-word;
  word-wrap: break-word;
}

/* Mobile text overflow fixes */
@media (max-width: 640px) {
  .text-2xl {
    font-size: 1.5rem;
    line-height: 1.4;
  }

  .text-sm {
    font-size: 0.875rem;
    line-height: 1.5;
  }

  /* Ensure text doesn't overflow containers */
  .w-full {
    min-width: 0;
    max-width: 100%;
  }
}