/* ========================================
   iGente.app - Custom Styles
   ======================================== */

/* ========================================
   1. CSS Variables & Root Styles
   ======================================== */
:root {
  --background: #ffffff;
  --foreground: #171717;
  --color-primary: #2563eb; /* Blue-600 */
  --color-primary-dark: #1d4ed8; /* Blue-700 */
  --color-accent: #eab308; /* Yellow-500 */
  --color-gray-light: #f9fafb;
  --color-gray-dark: #1f2937;
}

/* ========================================
   2. Base Styles
   ======================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px; /* Account for fixed header */
}

body {
  font-family:
    "Inter",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    "Roboto",
    "Oxygen",
    "Ubuntu",
    "Cantarell",
    "Fira Sans",
    "Droid Sans",
    "Helvetica Neue",
    sans-serif;
  background: var(--background);
  color: var(--foreground);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========================================
   3. Swiper Customization - About Carousel
   ======================================== */
.aboutSwiper {
  padding: 20px 0;
}

.aboutSwiper .swiper-slide {
  display: flex;
  justify-content: center;
  align-items: center;
}

.aboutSwiper .swiper-slide img {
  border-radius: 1rem;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 4px solid white;
}

/* Swiper navigation buttons for About carousel */
.aboutSwiper .swiper-button-next,
.aboutSwiper .swiper-button-prev {
  background: rgba(255, 255, 255, 0.8);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.aboutSwiper .swiper-button-next:hover,
.aboutSwiper .swiper-button-prev:hover {
  background: white;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

.aboutSwiper .swiper-button-next::after,
.aboutSwiper .swiper-button-prev::after {
  font-size: 20px;
  color: #1d4ed8;
  font-weight: bold;
}

/* Swiper pagination for About carousel */
.aboutSwiper .swiper-pagination-bullet {
  background: #d1d5db;
  opacity: 1;
  width: 12px;
  height: 12px;
  transition: all 0.3s ease;
}

.aboutSwiper .swiper-pagination-bullet-active {
  background: #2563eb;
  transform: scale(1.2);
}

/* ========================================
   4. Swiper Customization - Main Carousel
   ======================================== */
.mainCarousel {
  padding: 20px 0;
}

/* Responsive padding */
@media (min-width: 768px) {
  .mainCarousel {
    padding: 40px 0;
  }
}

@media (min-width: 1024px) {
  .mainCarousel {
    padding: 50px 0;
  }
}

.mainCarousel .swiper-slide {
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: center center;
  will-change: transform, opacity;
}

.carousel-slide-content {
  position: relative;
  width: 280px;
  aspect-ratio: 9/16;
  max-height: 70vh;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow:
    0 20px 25px -5px rgba(0, 0, 0, 0.1),
    0 10px 10px -5px rgba(0, 0, 0, 0.04);
  border: 4px solid white;
  background: white;
  cursor: pointer;
  user-select: none;
  transition: box-shadow 300ms ease;
}

.carousel-slide-content:hover {
  box-shadow:
    0 25px 35px -5px rgba(0, 0, 0, 0.15),
    0 15px 15px -5px rgba(0, 0, 0, 0.06);
}

.carousel-slide-content img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  pointer-events: none;
}

/* Responsive slide dimensions */
@media (max-width: 640px) {
  .carousel-slide-content {
    width: 240px;
    max-height: 60vh;
    border-radius: 0.75rem;
    border: 2px solid white;
  }
}

@media (min-width: 641px) and (max-width: 767px) {
  .carousel-slide-content {
    width: 260px;
    max-height: 65vh;
  }
}

@media (min-width: 1024px) {
  .carousel-slide-content {
    width: 320px;
    max-height: 75vh;
  }
}

/* Swiper navigation buttons for Main carousel */
.mainCarousel .swiper-button-next,
.mainCarousel .swiper-button-prev {
  background: rgba(255, 255, 255, 0.9);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
  border: 1px solid #e5e7eb;
  transition: all 0.3s ease;
}

.mainCarousel .swiper-button-next:hover,
.mainCarousel .swiper-button-prev:hover {
  background: white;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
  transform: scale(1.1);
}

.mainCarousel .swiper-button-next::after,
.mainCarousel .swiper-button-prev::after {
  font-size: 22px;
  color: #1d4ed8;
  font-weight: bold;
}

/* Swiper pagination for Main carousel */
.mainCarousel .swiper-pagination {
  margin-top: 20px;
  position: relative;
  bottom: 0;
}

.mainCarousel .swiper-pagination-bullet {
  background: #d1d5db;
  opacity: 1;
  width: 12px;
  height: 12px;
  transition: all 0.3s ease;
}

.mainCarousel .swiper-pagination-bullet-active {
  background: #2563eb;
  transform: scale(1.3);
}

/* ========================================
   5. Header Enhancements
   ======================================== */
header {
  transition: box-shadow 0.3s ease;
}

/* ========================================
   6. Animation Utilities
   ======================================== */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeIn 0.6s ease-out;
}

/* ========================================
   7. Accessibility & Print Styles
   ======================================== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Focus styles for better accessibility */
a:focus,
button:focus {
  outline: 2px solid #2563eb;
  outline-offset: 2px;
}

/* ========================================
   8. Print Styles
   ======================================== */
@media print {
  header {
    position: relative;
  }

  .swiper-button-next,
  .swiper-button-prev,
  .swiper-pagination {
    display: none;
  }
}

/* ========================================
   9. Loading State (Optional)
   ======================================== */
.loading {
  opacity: 0.5;
  pointer-events: none;
}

/* ========================================
   10. Useful Utility Classes
   ======================================== */
.text-balance {
  text-wrap: balance;
}

.container-narrow {
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

/* ========================================
   11. Mobile Menu Animation
   ======================================== */
#mobileMenu {
  transition: all 0.3s ease-in-out;
}

#mobileMenu.hidden {
  max-height: 0;
  overflow: hidden;
}

#mobileMenu:not(.hidden) {
  max-height: 500px;
}
