/* Dynamic Destination Section */
.dynamic-destination-section {
    background-color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(3rem, 8vw, 6rem) clamp(1rem, 5vw, 2rem);
    box-sizing: border-box;
    width: 100%;
}

.destination-content {
    max-width: 80%;
    text-align: center;
    margin: 0 auto;
    width: 100%;
}

/* Heading container */

/* Content fade containers - default state */
.content-fade,
.paragraph-fade,
.button-fade {
    opacity: 1; /* Default opacity when no animation */
}

.dynamic-destination-section h2 {
    margin-bottom: 0; /* Remove margin as it's handled by heading-container */
    text-transform: uppercase;
    color: black;
}

.dynamic-destination-section p {
    color: black;
    max-width: 900px;
    margin: 4rem auto 0;
    
}
.dynamic-destination-section .btn{
    margin-top: 2rem;
}

/* Mobile-specific styles */
@media (max-width: 768px) {
    .dynamic-destination-section {
        min-height: auto;
        height: auto;
        padding: 1rem;

        margin: 1rem 0;
        width: 100%;
        max-width: 100%;
    }
    
    .destination-content {
        margin: 0;
        width: 100%;
        max-width: 100%;
    }
    
    .dynamic-destination-section h2 {
        width: 100%;
    }
    
    .dynamic-destination-section p {
        max-width: 100%;
        margin-top: 1.8rem;
    }
    .dynamic-destination-section .btn{
        margin-top: 1.5rem;
    }
}

@media (max-width: 576px) {
    .dynamic-destination-section {
        padding:1rem;

        margin: 1rem 0;
    }
    

    
    .dynamic-destination-section p {
        margin-top: 1rem;
    }
    .dynamic-destination-section .btn{
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .dynamic-destination-section {
        padding:1rem;

        margin: 1rem 0;
    }
    
    
  
} 

/* Animation specific styles */
.heading-container .animated-text {
    display: inline-block;
    white-space: pre-wrap;
    transition: opacity 0.3s ease;
}

.animated-text .word {
    display: inline-block;
    white-space: nowrap;
    margin-right: 0.1em;
}

.animated-text span {
    display: inline-block;
    opacity: 0;
    animation:
        reveal 0.6s steps(1) forwards,
        highlight 0.2s ease-in-out forwards;
    animation-delay: calc(var(--i) * 0.05s), calc(var(--i) * 0.05s + 0.1s);
}

.animated-text span.space {
    width: 0.3em;
    opacity: 1;
    margin: 0;
}

/* Preview styles */
.animated-text span.preview {
    animation:
        preview-reveal 0.3s ease-out forwards,
        reveal 0.6s steps(1) forwards calc(var(--i) * 0.05s),
        highlight 0.2s ease-in-out forwards calc(var(--i) * 0.05s + 0.1s);
    animation-delay: 
        calc(var(--i) * 0.05s - 0.5s), /* Preview starts earlier */
        calc(var(--i) * 0.05s),
        calc(var(--i) * 0.05s + 0.1s);
}

.animated-text span.preview-immediate {
    animation:
        preview-reveal 0.1s ease-out forwards,
        reveal 0.6s steps(1) forwards 0.3s,
        highlight 0.2s ease-in-out forwards 0.4s;
    animation-delay: 0s;
}

/* Preview reveal animation */
@keyframes preview-reveal {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 0.2; /* Lower preview opacity */
        transform: translateY(0);
    }
}

/* Reveal animation */
@keyframes reveal {
    from {
        opacity: 0.2; /* Start from preview opacity */
    }
    to {
        opacity: 0.5;
    }
}
  
/* Highlight animation */
@keyframes highlight {
    0% {
        transform: scale(1.05);
        opacity: 0.5;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .animated-text .word {
        margin-right: 0.05em;
    }
}
  