/* ============================================
   CUSTOM STYLES FOR ACADEMIA FENIX LANDING PAGE
   Complementary styles for Tailwind CSS
   ============================================ */

/* ============================================
   BASE STYLES
   ============================================ */

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

/* Selection color */
::selection {
    background-color: rgba(30, 58, 95, 0.2);
    color: #1e3a5f;
}

/* ============================================
   HAMBURGER MENU STYLES
   ============================================ */

.hamburger-icon {
    width: 24px;
    height: 20px;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hamburger-line {
    display: block;
    height: 2px;
    width: 100%;
    background-color: #374151;
    border-radius: 2px;
    transition: all 0.3s ease-in-out;
    transform-origin: center;
}

/* Hamburger to X animation */
.hamburger-icon.active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.hamburger-icon.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger-icon.active .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

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

/* Initial state for animated sections */
.animate-section {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* Visible state when in viewport */
.animate-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered animation delays for child elements */
.animate-section:nth-child(1) {
    transition-delay: 0s;
}

.animate-section:nth-child(2) {
    transition-delay: 0.1s;
}

.animate-section:nth-child(3) {
    transition-delay: 0.2s;
}

.animate-section:nth-child(4) {
    transition-delay: 0.3s;
}

/* ============================================
   CAROUSEL STYLES
   ============================================ */

.carousel-container {
    position: relative;
}

.carousel-track {
    will-change: transform;
}

.carousel-slide {
    flex-shrink: 0;
}

/* Carousel indicator hover and active states */
.carousel-indicator {
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-indicator:hover {
    transform: scale(1.2);
}

.carousel-indicator.active {
    background-color: #1e3a5f;
    transform: scale(1.2);
}

/* ============================================
   CUSTOM ANIMATIONS
   ============================================ */

/* Slow pulse animation for decorative elements */
@keyframes pulse-slow {

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

    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.animate-pulse-slow {
    animation: pulse-slow 4s ease-in-out infinite;
}

/* Float animation for logo */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

/* Gradient text shimmer effect */
@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient {
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
}

/* ============================================
   NAVBAR EFFECTS
   ============================================ */

/* Navbar link underline effect */
.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(to right, #1e3a5f, #d4a853);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

/* Active nav link style */
.nav-link.active {
    color: #1e3a5f;
    background-color: rgba(30, 58, 95, 0.1);
}

/* ============================================
   VIDEO CONTAINER STYLES
   ============================================ */

/* Video iframe responsive container */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 768px) {

    /* Smaller padding on mobile */
    section {
        padding-top: 4rem;
        padding-bottom: 4rem;
    }

    /* Adjust carousel arrows on mobile */
    #carousel-prev,
    #carousel-next {
        width: 40px;
        height: 40px;
    }

    #carousel-prev {
        transform: translateX(0) translateY(-50%);
        left: 0.5rem;
    }

    #carousel-next {
        transform: translateX(0) translateY(-50%);
        right: 0.5rem;
    }
}

/* ============================================
   ACCESSIBILITY IMPROVEMENTS
   ============================================ */

/* Focus visible styles for keyboard navigation */
a:focus-visible,
button:focus-visible {
    outline: 2px solid #1e3a5f;
    outline-offset: 2px;
}

/* Reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .animate-section {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .animate-pulse-slow,
    .animate-float,
    .animate-gradient {
        animation: none;
    }

    .carousel-track {
        transition: none;
    }
}

/* High contrast mode improvements */
@media (prefers-contrast: high) {

    .nav-link:hover,
    .nav-link.active {
        background-color: #1e3a5f;
        color: white;
    }
}

/* ============================================
   SCROLLBAR STYLING
   ============================================ */

/* Custom scrollbar for webkit browsers */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(to bottom, #1e3a5f, #2d5a8f);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(to bottom, #152945, #1e3a5f);
}

/* ============================================
   WHATSAPP FLOATING BUTTON
   ============================================ */

.whatsapp-float {
    position: fixed;
    bottom: 48px;
    right: 48px;
    z-index: 1000;
}

.whatsapp-float a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background-color: #25D366;
    border-radius: 50%;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.whatsapp-float a:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.whatsapp-float a:focus-visible {
    outline: 3px solid #128C7E;
    outline-offset: 3px;
}

.whatsapp-float img {
    width: 52px;
    height: 52px;
    object-fit: contain;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 16px;
        right: 16px;
    }

    .whatsapp-float a {
        width: 52px;
        height: 52px;
    }

    .whatsapp-float img {
        width: 28px;
        height: 28px;
    }
}

/* Reduced motion preference for WhatsApp button */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-float a {
        transition: none;
    }

    .whatsapp-float a:hover {
        transform: none;
    }
}