/* Custom Styles for EDUTECHMEDIA Redesign */

/* 1. Base Settings */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 2. Signature Red Underline Hover Effect */
/* Used for nav links and important text */
.hover-underline-animation {
    display: inline-block;
    position: relative;
    color: currentColor;
}

.hover-underline-animation::after {
    content: '';
    position: absolute;
    width: 100%;
    transform: scaleX(0);
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #E31837;
    /* Corporate Red */
    transform-origin: bottom right;
    transition: transform 0.3s ease-out;
}

.hover-underline-animation:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}

/* 3. Navbar Transitions */
.navbar-transition {
    transition: all 0.4s ease-in-out;
}

/* 4. Scroll Reveal Animation Classes */
/* These interact with the Intersection Observer in main.js */
.reveal-section {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.reveal-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays for child elements if needed */
.reveal-delay-100 {
    transition-delay: 0.1s;
}

.reveal-delay-200 {
    transition-delay: 0.2s;
}

.reveal-delay-300 {
    transition-delay: 0.3s;
}

.reveal-delay-400 {
    transition-delay: 0.4s;
}

.reveal-delay-500 {
    transition-delay: 0.5s;
}

/* 5. Service Card Hover Effects */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

.service-card:hover .service-icon {
    color: #E31837;
    transform: scale(1.1);
}

.service-icon {
    transition: all 0.3s ease;
}

/* 6. Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 99;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

/* 7. Mega Menu Overlay (Simple Implementation) */
/* Ensuring dropdowns don't get cut off */
@media (min-width: 1024px) {
    .group:hover .mega-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

}

/* Success Stories - Industry Expertise Style */
.success-story-card {
    position: relative;
    overflow: hidden;
    height: 500px;
    border-radius: 1rem;
    cursor: pointer;
}

.success-story-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.success-story-card:hover .success-story-img {
    transform: scale(1.1);
}

.success-story-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.2) 100%);
    transition: background 0.4s ease;
}

.success-story-card:hover .success-story-overlay {
    background: linear-gradient(to top, rgba(185, 28, 28, 0.9) 0%, rgba(185, 28, 28, 0.7) 100%);
    /* Brand Red Overlay */
}

.success-story-content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2.5rem;
    color: white;
    z-index: 10;
    transition: transform 0.4s ease;
}

.success-story-hover-info {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: all 0.4s ease;
}

.success-story-card:hover .success-story-hover-info {
    max-height: 200px;
    opacity: 1;
    margin-top: 1rem;
}

.success-story-card:hover .success-story-content {
    transform: translateY(-20px);
}

.success-story-category {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #ef4444;
    /* Brand Red */
    margin-bottom: 0.5rem;
    background: white;
    padding: 2px 8px;
    display: inline-block;
    border-radius: 4px;
}

.success-story-card:hover .success-story-category {
    background: white;
    color: #b91c1c;
}