/* ===================================
   St. Paul's Matriculation — Shared Styles
   Design System: Academic Vibrance
   =================================== */

/* Material Symbols baseline */
.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* Organic blob shape */
.organic-blob {
    border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
}

/* Bento card hover effect with dynamic spotlight */
.bento-card-hover {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bento-card-hover::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(
        300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(155, 67, 63, 0.08),
        transparent 80%
    );
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 5;
}
.bento-card-hover.bg-sky-blue::before {
    background: radial-gradient(
        300px circle at var(--mouse-x, 50%) var(--mouse-y, 50%),
        rgba(255, 255, 255, 0.2),
        transparent 80%
    );
}
.bento-card-hover:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 32px -8px rgba(155, 67, 63, 0.25);
}
.bento-card-hover:hover::before {
    opacity: 1;
}

/* Pop-art shadow */
.pop-art-shadow {
    box-shadow: 6px 6px 0px 0px rgba(155, 67, 63, 1);
}

/* Soft maroon shadow */
.shadow-soft-maroon {
    box-shadow: 0 10px 30px -10px rgba(155, 67, 63, 0.15);
}

/* Focus yellow ring for form fields */
.focus-yellow:focus {
    outline: none;
    border-color: #9b433f !important;
    box-shadow: 0 0 0 4px rgba(252, 214, 100, 0.4);
}

/* Paper stacking effect */
.paper-stack {
    position: relative;
}
.paper-stack::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: -4px;
    bottom: -4px;
    background: #f0dfdd;
    z-index: -1;
    border-radius: inherit;
    transform: rotate(1deg);
}

/* Paper stack variant with colored layers */
.paper-stack-colored {
    position: relative;
}
.paper-stack-colored::before {
    content: '';
    position: absolute;
    top: 4px;
    left: 4px;
    right: -4px;
    bottom: -4px;
    background: #fcd664;
    border-radius: inherit;
    z-index: -1;
    transform: rotate(1deg);
}
.paper-stack-colored::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: -8px;
    bottom: -8px;
    background: #41a6d8;
    border-radius: inherit;
    z-index: -2;
    transform: rotate(-1.5deg);
}

/* ============================
   SCROLL ANIMATIONS
   ============================ */

/* Fade up */
.anim-fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Fade left */
.anim-fade-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-fade-left.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Fade right */
.anim-fade-right {
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), 
                transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-fade-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* Scale in */
.anim-scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.anim-scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children animation */
.anim-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.anim-stagger.visible > *:nth-child(1) { transition-delay: 0ms; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(2) { transition-delay: 100ms; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(3) { transition-delay: 200ms; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(4) { transition-delay: 300ms; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(5) { transition-delay: 400ms; opacity: 1; transform: translateY(0); }
.anim-stagger.visible > *:nth-child(6) { transition-delay: 500ms; opacity: 1; transform: translateY(0); }

/* Blur in */
.anim-blur-in {
    opacity: 0;
    filter: blur(8px);
    transform: translateY(20px);
    transition: opacity 0.6s ease, filter 0.6s ease, transform 0.6s ease;
}
.anim-blur-in.visible {
    opacity: 1;
    filter: blur(0);
    transform: translateY(0);
}

/* Count up number animation */
.count-up {
    display: inline-block;
}

/* ============================
   MOBILE MENU
   ============================ */

.mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(22, 0, 1, 0.5);
    backdrop-filter: blur(4px);
    z-index: 90;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}
.mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: all;
}

.mobile-menu-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: #faf9f7;
    z-index: 100;
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    padding: 24px;
}
.mobile-menu-drawer.active {
    transform: translateX(0);
}
.mobile-menu-drawer .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 12px;
    border-radius: 12px;
    color: #554241;
    font-family: 'Manrope', sans-serif;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.2s ease;
    text-decoration: none;
}
.mobile-menu-drawer .nav-link:hover,
.mobile-menu-drawer .nav-link.active {
    background: #fceae8;
    color: #9b433f;
}
.mobile-menu-drawer .nav-link.active {
    font-weight: 700;
    border-left: 3px solid #9b433f;
}

/* Desktop nav active indicator */
nav a.nav-active,
header a.nav-active,
nav .nav-active,
header .nav-active {
    color: #9b433f !important;
    border-bottom: 2px solid #9b433f;
    font-weight: 700;
    padding-bottom: 4px;
}

/* Hamburger button */
.hamburger-btn {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 8px;
    background: none;
    border: none;
    z-index: 110;
}
.hamburger-btn span {
    display: block;
    width: 22px;
    height: 2.5px;
    background: #9b433f;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}
.hamburger-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}
.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ============================
   PAGE TRANSITIONS & KEYFRAMES
   ============================ */

body {
    animation: pageIn 0.5s ease;
}
@keyframes pageIn {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin-slow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
.animate-spin-slow {
    animation: spin-slow 20s linear infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}
.animate-float {
    animation: float 4s ease-in-out infinite;
}

@keyframes blob-morph {
    0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
    50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
}
.animate-blob {
    animation: blob-morph 8s ease-in-out infinite;
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

/* Parallax helper */
.parallax-slow {
    will-change: transform;
}

/* ============================
   GLOBAL ALIGNMENT FIXES
   ============================ */

/* Ensure consistent container max-width */
.page-container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 16px;
    padding-right: 16px;
}
@media (min-width: 768px) {
    .page-container {
        padding-left: 64px;
        padding-right: 64px;
    }
}

/* Fix image aspect ratios */
img {
    max-width: 100%;
    height: auto;
}

/* Consistent section spacing */
.section-gap {
    padding-top: 96px;
    padding-bottom: 96px;
}
@media (max-width: 768px) {
    .section-gap {
        padding-top: 64px;
        padding-bottom: 64px;
    }
}

/* Fix grid overflow */
.grid-safe {
    overflow: hidden;
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Button press effect */
.btn-press {
    transition: all 0.2s ease;
}
.btn-press:active {
    transform: scale(0.97);
}

/* Card shine effect on hover */
.card-shine {
    position: relative;
    overflow: hidden;
}
.card-shine::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        to bottom right,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.05) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    transform: rotate(30deg);
    transition: transform 0.6s ease;
    pointer-events: none;
}
.card-shine:hover::after {
    transform: rotate(30deg) translate(50%, 50%);
}

/* Hero text gradient */
.text-gradient-maroon {
    background: linear-gradient(135deg, #9b433f 0%, #cc6965 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Testimonials Slide Animations */
.testimonial-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}
.testimonial-slide.active {
    display: block;
    opacity: 1;
}

/* Active indicator for carousel */
.carousel-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #dbc0be;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.carousel-dot.active {
    width: 24px;
    border-radius: 4px;
    background-color: #9b433f;
}

/* Floating decorations */
@keyframes float-slower {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(15deg); }
}
.animate-float-slower {
    animation: float-slower 8s ease-in-out infinite;
}

@keyframes float-faster {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(-15deg); }
}
.animate-float-faster {
    animation: float-faster 5s ease-in-out infinite;
}
/* FAQ Accordion */
.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1), padding 0.3s ease;
}
.faq-answer.active {
    padding-top: 16px;
    padding-bottom: 8px;
}
.faq-icon {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===================================
   STUDENT PORTAL & DARK MODE OVERRIDES
   =================================== */

/* Dark mode basic overrides */
.dark body {
    background-color: #0b0707 !important;
    color: #e7d6d5 !important;
}

.dark nav.nav-sticky {
    background-color: rgba(11, 7, 7, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.dark nav.nav-sticky a:not(.btn-press), 
.dark nav.nav-sticky span {
    color: #e7d6d5 !important;
}

.dark nav.nav-sticky a.nav-active {
    color: #ffb3ae !important;
    border-bottom-color: #ffb3ae !important;
}

.dark footer {
    background-color: #160d0d !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.dark footer a, 
.dark footer p, 
.dark footer span, 
.dark footer h4 {
    color: #dbc0be !important;
}

/* Specific styling for portal task transitions */
.portal-task-item {
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.portal-task-item:has(input:checked) {
    background-color: rgba(155, 67, 63, 0.03) !important;
    border-color: rgba(155, 67, 63, 0.1) !important;
}

.dark .portal-task-item:has(input:checked) {
    background-color: rgba(255, 179, 174, 0.02) !important;
    border-color: rgba(255, 179, 174, 0.05) !important;
}

.portal-task-item.completed {
    opacity: 0.65;
}

.portal-task-item.completed span.block {
    text-decoration: line-through;
    opacity: 0.6;
}

.portal-task-item.completed span.text-xs {
    text-decoration: line-through;
    opacity: 0.5;
}

/* ===================================
   CAMPUS GALLERY & LIGHTBOX MODAL
   =================================== */

.gallery-grid-item {
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.4s ease;
}

.gallery-card-overlay {
    background: linear-gradient(to top, rgba(22, 0, 1, 0.85) 0%, rgba(22, 0, 1, 0.3) 60%, transparent 100%);
    backdrop-filter: blur(2px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-card-overlay {
    opacity: 1;
}

.gallery-card img {
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover img {
    transform: scale(1.08);
}

/* Lightbox Modal custom animations */
#lightbox-modal {
    transition: opacity 0.3s ease;
}

#lightbox-modal-content {
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.lightbox-slide {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox-slide.active {
    display: block;
    opacity: 1;
}


