/* ===================================
   AGENDA PUEBLA - MODERN WEB APP CSS
   =================================== */

/* --- Base & Typography --- */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
    overscroll-behavior-y: contain;
}

/* Safe areas for notch devices */
.safe-area-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0px);
}
.safe-area-right {
    padding-right: env(safe-area-inset-right, 0px);
}

/* --- Glassmorphism --- */
.glass {
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* --- Custom Scrollbar --- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Hide scrollbar on mobile scroll containers */
.scrollbar-hide::-webkit-scrollbar { display: none; }
.scrollbar-hide { -ms-overflow-style: none; scrollbar-width: none; }

/* ===================================
   HAMBURGER ICON ANIMATION
   =================================== */
.hamburger-icon {
    width: 20px;
    height: 14px;
    position: relative;
    transform: rotate(0deg);
    transition: .3s ease-in-out;
}
.hamburger-icon span {
    display: block;
    position: absolute;
    height: 2px;
    width: 100%;
    background: #374151;
    border-radius: 2px;
    left: 0;
    transform: rotate(0deg);
    transition: .25s ease-in-out;
}
.hamburger-icon span:nth-child(1) { top: 0; }
.hamburger-icon span:nth-child(2) { top: 6px; }
.hamburger-icon span:nth-child(3) { top: 12px; }

.hamburger-icon.open span:nth-child(1) {
    top: 6px;
    transform: rotate(135deg);
}
.hamburger-icon.open span:nth-child(2) {
    opacity: 0;
    transform: translateX(10px);
}
.hamburger-icon.open span:nth-child(3) {
    top: 6px;
    transform: rotate(-135deg);
}

/* ===================================
   MOBILE SLIDE-OVER MENU
   =================================== */
.mobile-menu-overlay.open {
    pointer-events: all;
}
.mobile-menu-overlay.open .mobile-menu-backdrop {
    background-color: rgba(0, 0, 0, 0.4);
}
.mobile-menu-overlay.open .mobile-menu-panel {
    transform: translateX(0);
}
.mobile-menu-item {
    transform: translateX(20px);
    opacity: 0;
    transition: all .25s ease-out;
}
.mobile-menu-overlay.open .mobile-menu-item {
    transform: translateX(0);
    opacity: 1;
}
.mobile-menu-overlay.open .mobile-menu-item:nth-child(1) { transition-delay: .05s; }
.mobile-menu-overlay.open .mobile-menu-item:nth-child(2) { transition-delay: .1s; }
.mobile-menu-overlay.open .mobile-menu-item:nth-child(3) { transition-delay: .15s; }
.mobile-menu-overlay.open .mobile-menu-item:nth-child(4) { transition-delay: .2s; }
.mobile-menu-overlay.open .mobile-menu-item:nth-child(5) { transition-delay: .25s; }

/* ===================================
   BOTTOM NAVIGATION BAR
   =================================== */
.bottom-nav-item {
    color: #9ca3af;
    min-width: 60px;
}
.bottom-nav-item.active {
    color: #4F46E5;
}
.bottom-nav-item.active i {
    transform: scale(1.1);
}

/* ===================================
   CARD INTERACTIONS
   =================================== */
.hover-card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.hover-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}
/* Mobile: tactile press effect instead of hover */
@media (max-width: 1023px) {
    .hover-card:hover {
        transform: none;
        box-shadow: none;
    }
    .hover-card:active {
        transform: scale(0.98);
        box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    }
}

.img-hover-zoom {
    overflow: hidden;
}
.img-hover-zoom img {
    transition: transform .5s ease;
}
.hover-card:hover .img-hover-zoom img {
    transform: scale(1.05);
}

/* ===================================
   MOBILE CARD SNAP SCROLL
   =================================== */
.mobile-snap-scroll {
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}
.mobile-snap-scroll > * {
    scroll-snap-align: start;
}

/* ===================================
   FULLCALENDAR OVERRIDES
   =================================== */
.fc-theme-standard td, .fc-theme-standard th {
    border-color: #e5e7eb !important;
}
.fc-day-today {
    background-color: #eef2ff !important;
}
.fc-toolbar-title {
    font-size: 1.125rem !important;
    font-weight: 700 !important;
    text-transform: capitalize;
}
.fc-button-primary {
    background-color: #4f46e5 !important;
    border-color: #4f46e5 !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    font-size: 0.8rem !important;
}
.fc-button-primary:hover {
    background-color: #4338ca !important;
    border-color: #4338ca !important;
}
@media (max-width: 640px) {
    .fc-toolbar {
        flex-direction: column !important;
        gap: 8px;
    }
    .fc-toolbar-title {
        font-size: 1rem !important;
    }
    .fc-button {
        padding: 4px 8px !important;
        font-size: 0.7rem !important;
    }
    .fc-daygrid-event {
        font-size: 0.65rem !important;
        padding: 1px 3px !important;
    }
}

/* ===================================
   MOBILE-FIRST ANIMATIONS
   =================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
.animate-fade-in-up {
    animation: fadeInUp .5s ease-out forwards;
}
.animate-scale-in {
    animation: scaleIn .3s ease-out forwards;
}

/* Stagger children animations */
.stagger-children > *:nth-child(1) { animation-delay: .05s; }
.stagger-children > *:nth-child(2) { animation-delay: .1s; }
.stagger-children > *:nth-child(3) { animation-delay: .15s; }
.stagger-children > *:nth-child(4) { animation-delay: .2s; }
.stagger-children > *:nth-child(5) { animation-delay: .25s; }
.stagger-children > *:nth-child(6) { animation-delay: .3s; }

/* ===================================
   MOBILE HERO ADJUSTMENTS
   =================================== */
@media (max-width: 640px) {
    .hero-mobile-compact {
        height: 85vh !important;
        min-height: 500px;
    }
}

/* ===================================
   PULL-DOWN VISUAL INDICATOR
   =================================== */
.pull-indicator {
    width: 36px;
    height: 5px;
    background: rgba(255,255,255,0.3);
    border-radius: 100px;
    margin: 8px auto;
}
