/* animations.css - Dynamic animations for SB DREAMS BRIDGE website */

/* Dynamic Hero Section */
.dynamic-hero {
    position: relative;
    height: 100vh;
    min-height: 700px;
    overflow: hidden;
}

.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-slider .slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease;
}

.hero-slider .slide.active {
    opacity: 1;
}

.slide-image {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: scale(1.1);
    transition: transform 8s ease;
}

.slide.active .slide-image {
    transform: scale(1);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0,0,0,0.8) 0%, rgba(0,0,0,0.4) 100%);
    z-index: 2;
    display: flex;
    align-items: center;
}

.hero-content {
    max-width: 800px;
    color: white;
    padding: 20px;
}

.animated-logo {
    max-width: 180px;
    animation: fadeInDown 1.2s ease;
}

.dynamic-heading {
    font-size: 3.5rem;
    margin: 30px 0;
    line-height: 1.2;
}

.text-reveal {
    display: block;
    overflow: hidden;
    color: aliceblue;
}

.text-reveal span {
    display: block;
    animation: revealText 1.5s ease forwards;
    transform: translateY(100%);
}

.text-rotate {
    display: block;
    height: 70px;
    position: relative;
}

.rotate-item {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    color: var(--primary-color);
}

.rotate-item.active {
    opacity: 1;
    transform: translateY(0);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    opacity: 0;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 0.8s;
}

.hero-cta {
    display: flex;
    gap: 20px;
}

.hero-cta .btn-primary {
    animation: pulse 2s infinite;
}

.hero-cta .btn-secondary {
    opacity: 0;
    animation: slideInRight 1s ease forwards;
    animation-delay: 1.2s;
}

.slider-nav {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 12px;
}

.slider-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.slider-dot.active {
    background-color: white;
    transform: scale(1.2);
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    color: white;
    z-index: 3;
    animation: fadeInUp 1s ease forwards;
    animation-delay: 2s;
    opacity: 0;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid white;
    border-radius: 15px;
    display: flex;
    justify-content: center;
    padding-top: 10px;
    margin-bottom: 10px;
}

.mouse-wheel {
    width: 4px;
    height: 8px;
    background-color: white;
    border-radius: 2px;
    animation: scrollWheel 1.5s infinite;
}

.scroll-text {
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Services Section */
.dynamic-services {
    padding: 100px 0;
    background-color: var(--bg-light);
}

.section-header {
    text-align: center;
    margin-bottom: 50px;
    overflow: hidden;
}

.reveal-text {
    position: relative;
    overflow: hidden;
    padding-right: 20px;
    display: inline-block;
}

.reveal-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--primary-color);
    transform: translateX(-100%);
    animation: revealTextBlock 1.5s ease forwards;
}

.delay-1::after {
    animation-delay: 0.2s;
}

.delay-2::after {
    animation-delay: 0.4s;
}

.delay-3::after {
    animation-delay: 0.6s;
}

.services-tabs {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.tab-button {
    padding: 12px 30px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
}

.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.service-card {
    background-color: white;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: all 0.5s ease;
    opacity: 0;
    transform: translateY(30px);
}

.service-card.revealed {
    opacity: 1;
    transform: translateY(0);
}

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

.card-icon {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: white;
    font-size: 1.8rem;
}

/* Parallax Section */
.parallax-section {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    color: white;
}

.parallax-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -1;
    filter: brightness(0.4);
}

.section-header.light h2,
.section-header.light p {
    color: white;
}

.story-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    height: 400px;
}

.story-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease;
    pointer-events: none;
}

.story-slide.active {
    opacity: 1;
    transform: translateX(0);
    pointer-events: all;
}

.story-card {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    height: 100%;
}

.story-image {
    flex: 1;
    min-width: 40%;
    overflow: hidden;
}

.story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.story-card:hover .story-image img {
    transform: scale(1.05);
}

.story-content {
    flex: 1.5;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.story-quote {
    font-size: 1.2rem;
    font-style: italic;
    margin: 20px 0;
    position: relative;
    padding: 0 20px;
}

.story-quote::before,
.story-quote::after {
    content: '"';
    font-size: 2rem;
    color: var(--primary-color);
    position: absolute;
}

.story-quote::before {
    top: -10px;
    left: 0;
}

.story-quote::after {
    bottom: -10px;
    right: 0;
}

.story-author {
    align-self: flex-end;
    font-weight: 600;
}

.carousel-nav {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 40px;
}

.prev-story,
.next-story {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 10px;
    transition: all 0.3s ease;
}

.prev-story:hover,
.next-story:hover {
    color: var(--primary-color);
    transform: scale(1.2);
}

.carousel-indicators {
    display: flex;
    gap: 10px;
    margin: 0 20px;
}

.indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.indicator.active {
    background-color: white;
    transform: scale(1.3);
}

/* Animation Keyframes */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

@keyframes revealText {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

@keyframes revealTextBlock {
    0% {
        transform: translateX(-100%);
    }
    50% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(100%);
    }
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(30, 144, 255, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(30, 144, 255, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(30, 144, 255, 0);
    }
}

@keyframes scrollWheel {
    0% {
        opacity: 1;
        transform: translateY(0);
    }
    100% {
        opacity: 0;
        transform: translateY(10px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Adjustments */
@media (max-width: 991.98px) {
    .dynamic-heading {
        font-size: 2.8rem;
    }
    
    .story-card {
        flex-direction: column;
    }
    
    .story-image {
        height: 200px;
    }
    
    .story-carousel {
        height: 550px;
    }
}

@media (max-width: 767.98px) {
    .dynamic-heading {
        font-size: 2.2rem;
    }
    
    .text-rotate {
        height: 60px;
    }
    
    .hero-cta {
        flex-direction: column;
    }
    
    .services-tabs {
        flex-direction: column;
        gap: 10px;
    }
    
    .tab-button {
        width: 100%;
        text-align: center;
    }
    
    .story-carousel {
        height: 600px;
    }
}
/* animations.css */

/* Base Animation Keyframes */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

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

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

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

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

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

@keyframes rotateIn {
    from {
        opacity: 0;
        transform: rotate(-180deg);
    }
    to {
        opacity: 1;
        transform: rotate(0deg);
    }
}

/* Hero Section Animations */
.hero-content h1 {
    animation: fadeInUp 1s ease-out;
}

.hero-content p {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-cta {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.animated-logo {
    animation: scaleIn 1s ease-out;
}

.text-reveal {
    animation: fadeInLeft 1s ease-out;
}

.text-rotate .rotate-item {
    animation: fadeInRight 1s ease-out;
}

.fade-in-up {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.pulse {
    animation: pulse 2s infinite;
}

.slide-in {
    animation: slideInFromBottom 1s ease-out 0.6s both;
}

/* About Section Responsive Styles */
.about {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    overflow-x: hidden; /* Prevent horizontal overflow */
}

.about .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    width: 100%;
}

.about-text {
    animation: fadeInLeft 1s ease-out;
    width: 100%;
    box-sizing: border-box;
}

.about-text h3 {
    color: #1E90FF;
    margin: 30px 0 20px 0;
    font-size: 1.5rem;
    animation: fadeInUp 1s ease-out 0.3s both;
}

.about-services {
    display: flex;
    flex-direction: column;
    gap: 25px;
    margin: 25px 0;
    width: 100%;
}

.service-highlight {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    animation: slideInFromBottom 1s ease-out 0.6s both;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.service-highlight:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.service-highlight i {
    color: #1E90FF;
    font-size: 2rem;
    margin-top: 5px;
    flex-shrink: 0;
}

.service-highlight h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1.2rem;
}

.service-highlight p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.about-values {
    display: flex;
    flex-direction: column;
    gap: 25px;
    animation: fadeInRight 1s ease-out 0.4s both;
    width: 100%;
}

.value-card {
    background: white;
    padding: 30px 25px;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: scaleIn 1s ease-out 0.8s both;
    width: 100%;
    box-sizing: border-box;
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

.value-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #1E90FF, #00BFFF);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    animation: rotateIn 1s ease-out 1s both;
}

.value-icon i {
    color: white;
    font-size: 1.8rem;
}

.value-card h4 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 1.3rem;
}

.value-card p {
    color: #666;
    margin: 0;
    line-height: 1.6;
}

/* Services Section Animations */
.reveal-text {
    animation: fadeInUp 1s ease-out;
}

.reveal-text.delay-1 {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.reveal-card {
    animation: slideInFromBottom 1s ease-out;
}

.reveal-card.delay-1 {
    animation-delay: 0.2s;
    animation-fill-mode: both;
}

.reveal-card.delay-2 {
    animation-delay: 0.4s;
    animation-fill-mode: both;
}

.reveal-card.delay-3 {
    animation-delay: 0.6s;
    animation-fill-mode: both;
}

/* Scroll Animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.scroll-animate.animate {
    opacity: 1;
    transform: translateY(0);
}

/* Button Animations */
.btn-primary, .btn-secondary {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary:hover, .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.btn-primary::before, .btn-secondary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-primary:hover::before, .btn-secondary:hover::before {
    left: 100%;
}

/* Card Hover Animations */
.service-card, .testimonial, .blog-card {
    transition: all 0.3s ease;
}

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

/* Loading Animation */
.loading {
    animation: pulse 1.5s infinite;
}

/* Responsive Adjustments */
@media (max-width: 1024px) {
    .about-content {
        gap: 40px;
    }
    
    .about .container {
        padding: 0 30px;
    }
}

@media (max-width: 768px) {
    .about {
        padding: 60px 0;
    }
    
    .about .container {
        padding: 0 20px;
        max-width: 100%;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 40px;
        width: 100%;
    }
    
    .about-text, .about-values {
        width: 100%;
        max-width: 100%;
    }
    
    .service-highlight {
        padding: 15px;
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .service-highlight i {
        font-size: 1.5rem;
        margin-top: 0;
    }
    
    .value-card {
        padding: 25px 20px;
    }
    
    .value-icon {
        width: 60px;
        height: 60px;
    }
    
    .value-icon i {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .about {
        padding: 40px 0;
    }
    
    .about .container {
        padding: 0 15px;
    }
    
    .about-content {
        gap: 30px;
    }
    
    .about-text h3 {
        font-size: 1.3rem;
    }
    
    .service-highlight {
        padding: 15px;
    }
    
    .service-highlight h4 {
        font-size: 1.1rem;
    }
    
    .service-highlight p {
        font-size: 0.9rem;
    }
    
    .value-card {
        padding: 20px 15px;
    }
    
    .value-card h4 {
        font-size: 1.2rem;
    }
    
    .value-card p {
        font-size: 0.9rem;
    }
    
    .value-icon {
        width: 50px;
        height: 50px;
    }
    
    .value-icon i {
        font-size: 1.3rem;
    }
}

@media (max-width: 320px) {
    .about .container {
        padding: 0 10px;
    }
    
    .service-highlight, .value-card {
        padding: 12px;
    }
    
    .about-text h3 {
        font-size: 1.2rem;
    }
    
    .service-highlight h4, .value-card h4 {
        font-size: 1rem;
    }
    
    .service-highlight p, .value-card p {
        font-size: 0.85rem;
    }
}

/* Intersection Observer Animation Classes */
.fade-in-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.fade-in-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-in-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}

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

.slide-in-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}

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

.scale-in-on-scroll {
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.8s ease-out;
}

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

/* Stagger Animation Delays */
.stagger-1 { animation-delay: 0.1s; }
.stagger-2 { animation-delay: 0.2s; }
.stagger-3 { animation-delay: 0.3s; }
.stagger-4 { animation-delay: 0.4s; }
.stagger-5 { animation-delay: 0.5s; }

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
