/* Animations CSS for Hithalaya Website */

/* Basic Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInFromLeft {
    from { transform: translateX(-50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromRight {
    from { transform: translateX(50px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

@keyframes slideInFromBottom {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes scaleUp {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes colorShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: #4B0082; }
}

/* Fade-in Animation Classes */
.fade-in {
    animation: fadeIn 1.5s ease-in-out;
}

.slide-in-left {
    animation: slideInFromLeft 1.2s ease-out;
}

.slide-in-right {
    animation: slideInFromRight 1.2s ease-out;
}

.slide-in-bottom {
    animation: slideInFromBottom 1.2s ease-out;
}

.scale-up {
    animation: scaleUp 1.2s ease-out;
}

/* Coming Soon Hero Animation */
.hero-coming-soon {
    position: relative;
    background: linear-gradient(-45deg, #4B0082, #008080, #6A5ACD, #8B4513);
    background-size: 400% 400%;
    animation: colorShift 15s ease infinite;
    padding: 100px 0;
    text-align: center;
    overflow: hidden;
}

.coming-soon-text {
    font-family: 'Times New Roman', Times, serif;
    font-size: 60px;
    font-weight: bold;
    color: white;
    margin-bottom: 20px;
    position: relative;
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    border-right: 3px solid #4B0082;
    width: 0;
    animation: 
        typing 3.5s steps(30, end) 1s forwards,
        blink-caret .75s step-end infinite;
}

.launching-subtitle {
    font-size: 24px;
    color: white;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeIn 1.5s ease-in-out 3s forwards;
}

.floating-icon {
    position: absolute;
    opacity: 0.6;
    animation: float 6s ease-in-out infinite;
}

.floating-icon:nth-child(1) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.floating-icon:nth-child(2) {
    top: 30%;
    right: 15%;
    animation-delay: 1s;
}

.floating-icon:nth-child(3) {
    bottom: 25%;
    left: 20%;
    animation-delay: 2s;
}

.floating-icon:nth-child(4) {
    bottom: 15%;
    right: 10%;
    animation-delay: 3s;
}

/* Interactive Elements */
.service-card {
    transition: all 0.3s ease;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.service-card .card-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(75,0,130,0.8), rgba(0,128,128,0.8));
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
}

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

.btn-animated {
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-animated:after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: -100%;
    background: linear-gradient(90deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transition: all 0.6s;
}

.btn-animated:hover:after {
    left: 100%;
}

.pulsing-cta {
    animation: pulse 2s infinite;
}

/* Scroll Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transition: all 1s ease;
}

.animate-on-scroll.fade-in-visible {
    opacity: 1;
}

.animate-on-scroll.slide-left-visible {
    transform: translateX(0);
    opacity: 1;
}

.animate-on-scroll.slide-right-visible {
    transform: translateX(0);
    opacity: 1;
}

.animate-on-scroll.slide-up-visible {
    transform: translateY(0);
    opacity: 1;
}

.animate-on-scroll.scale-up-visible {
    transform: scale(1);
    opacity: 1;
}

.animate-fade {
    opacity: 0;
    transform: translateY(20px);
}

.animate-left {
    opacity: 0;
    transform: translateX(-50px);
}

.animate-right {
    opacity: 0;
    transform: translateX(50px);
}

/* Particle Background */
.particles-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.particles-content {
    position: relative;
    z-index: 2;
}

/* Mobile Responsive Adjustments */
@media (max-width: 768px) {
    .coming-soon-text {
        font-size: 36px;
    }
    
    .launching-subtitle {
        font-size: 18px;
    }
    
    .floating-icon {
        display: none;
    }
}