/* ===================================
   Visual Enhancements for District Mechanical V2
   =================================== */

/* Enhanced Hero Title & Subtitle */
.hero-title {
    position: relative;
    animation: fadeInDown 0.8s ease-out;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    filter: drop-shadow(0 2px 8px rgba(0, 196, 249, 0.3));
    letter-spacing: -0.02em;
}

.hero-title::before {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, rgba(0, 196, 249, 0.4), rgba(0, 150, 199, 0.4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: blur(8px);
    opacity: 0.6;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-subtitle {
    animation: fadeIn 1s ease-out 0.3s backwards;
    color: rgba(255, 255, 255, 0.95);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 400;
    line-height: 1.6;
    position: relative;
}

.hero-subtitle::before {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 0;
    width: 80px;
    height: 3px;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.8), transparent);
    border-radius: 2px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.hero-actions {
    animation: fadeInUp 0.8s ease-out 0.5s backwards;
}

/* Add subtle glow effect to hero overlay */
.hero-overlay::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at top, rgba(0, 196, 249, 0.2), transparent);
    pointer-events: none;
    animation: pulse-overlay 4s ease-in-out infinite;
}

@keyframes pulse-overlay {
    0%, 100% {
        opacity: 0.5;
    }
    50% {
        opacity: 0.8;
    }
}

/* Enhanced hero content spacing */
.hero-content {
    position: relative;
    z-index: 2;
}

/* Animated gradient highlight effect for feature cards */
.feature-card .highlight {
    position: relative;
    display: inline-block;
    background: linear-gradient(135deg, #00c4f9 0%, #0096c7 50%, #00c4f9 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmerGradient 4s ease-in-out infinite;
    font-weight: 700;
    letter-spacing: 0.02em;
}

@keyframes shimmerGradient {
    0%, 100% {
        background-position: 0% center;
    }
    50% {
        background-position: 100% center;
    }
}

/* Glowing underline effect */
.feature-card .highlight::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, #00c4f9, transparent);
    opacity: 0.7;
    border-radius: 2px;
    animation: pulse-glow 2.5s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        opacity: 0.5;
        box-shadow: 0 0 8px rgba(0, 196, 249, 0.3);
    }
    50% {
        opacity: 0.9;
        box-shadow: 0 0 16px rgba(0, 196, 249, 0.6);
    }
}

/* Enhanced feature card with animation */
.feature-card {
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out backwards;
}

.feature-card:nth-child(1) {
    animation-delay: 0.1s;
}

.feature-card:nth-child(2) {
    animation-delay: 0.2s;
}

.feature-card:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Decorative corner accent */
.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, transparent 50%, rgba(0, 196, 249, 0.08) 50%);
    border-radius: 0 var(--radius-lg) 0 100%;
    transition: all 0.4s ease;
}

.feature-card:hover::before {
    width: 120px;
    height: 120px;
    background: linear-gradient(135deg, transparent 50%, rgba(0, 196, 249, 0.12) 50%);
}

/* Subtle bottom accent bar */
.feature-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #00c4f9, #0096c7);
    transition: width 0.5s ease;
    border-radius: 2px 2px 0 0;
}

.feature-card:hover::after {
    width: 100%;
}

/* Enhanced content title styling */
.feature-card .content-title {
    position: relative;
    z-index: 1;
    line-height: 1.5;
    margin-bottom: 1.5rem;
    transition: transform 0.3s ease;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.feature-card:hover .content-title {
    transform: translateY(-2px);
}

/* Feature description enhancement */
.feature-card .feature-description {
    position: relative;
    z-index: 1;
    transition: color 0.3s ease;
}

.feature-card:hover .feature-description {
    color: var(--text-dark);
}

/* Enhanced hover state for entire card */
.feature-card:hover {
    border-color: #00c4f9;
    box-shadow: 0 12px 40px -8px rgba(0, 196, 249, 0.25),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

/* Quick Info Cards Enhanced Animation */
.quick-info-card {
    position: relative;
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 2px solid var(--medium-gray);
    transition: all var(--transition-base);
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out backwards;
}

.quick-info-card:nth-child(1) {
    animation-delay: 0.1s;
}

.quick-info-card:nth-child(2) {
    animation-delay: 0.2s;
}

.quick-info-card:nth-child(3) {
    animation-delay: 0.3s;
}

/* Enhanced icon with gradient background */
.quick-info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, #00c4f9 0%, #0096c7 100%);
    color: var(--white);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-md);
    position: relative;
    overflow: hidden;
}

.quick-info-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: rotate 8s linear infinite;
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.quick-info-icon svg {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Quick info title enhancement */
.quick-info-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: var(--spacing-sm);
    position: relative;
    display: inline-block;
}

/* Decorative bottom border for card on hover */
.quick-info-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #00c4f9, #0096c7);
    transition: width 0.4s ease;
    border-radius: 2px 2px 0 0;
}

.quick-info-card:hover::after {
    width: 100%;
}

/* Hover effects */
.quick-info-card:hover {
    border-color: #00c4f9;
    transform: translateY(-8px);
    box-shadow: 0 12px 40px -8px rgba(0, 196, 249, 0.3);
}

.quick-info-card:hover .quick-info-icon {
    transform: scale(1.05) rotate(5deg);
}

/* Service preview cards enhancement */
.service-preview-card {
    position: relative;
    background: var(--white);
    padding: var(--spacing-xl);
    border-radius: var(--radius-lg);
    border: 2px solid var(--medium-gray);
    transition: all var(--transition-base);
    height: 100%;
    overflow: hidden;
}

.service-preview-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, transparent 50%, rgba(0, 196, 249, 0.05) 50%);
    border-radius: 0 var(--radius-lg) 0 100%;
    transition: all 0.4s ease;
}

.service-preview-card:hover::before {
    width: 140px;
    height: 140px;
    background: linear-gradient(135deg, transparent 50%, rgba(0, 196, 249, 0.1) 50%);
}

/* Service preview icon */
.service-preview-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, #F5F7FA, #E5E7EB);
    color: #00c4f9;
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-md);
    position: relative;
    transition: all 0.3s ease;
}

.service-preview-card:hover .service-preview-icon {
    background: linear-gradient(135deg, #00c4f9, #0096c7);
    color: var(--white);
    transform: translateY(-4px) rotate(-5deg);
}

/* Service preview title */
.service-preview-title {
    font-size: var(--font-size-xl);
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: var(--spacing-sm);
    position: relative;
    z-index: 1;
}

/* Service preview text */
.service-preview-text {
    color: var(--text-medium);
    line-height: 1.6;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Hover effect for service cards */
.service-preview-card:hover {
    border-color: #00c4f9;
    transform: translateY(-6px);
    box-shadow: 0 15px 45px -10px rgba(0, 196, 249, 0.25);
}

/* Add bottom accent line */
.service-preview-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, #00c4f9, #0096c7);
    transition: width 0.5s ease;
}

.service-preview-card:hover::after {
    width: 100%;
}

/* Benefit cards enhancement */
.benefit-card {
    position: relative;
    overflow: hidden;
    animation: fadeInUp 0.6s ease-out backwards;
}

.benefit-card:nth-child(1) {
    animation-delay: 0.1s;
}

.benefit-card:nth-child(2) {
    animation-delay: 0.2s;
}

.benefit-card:nth-child(3) {
    animation-delay: 0.3s;
}

.benefit-card:nth-child(4) {
    animation-delay: 0.4s;
}

/* Benefit icon */
.benefit-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    background: linear-gradient(135deg, #00c4f9 0%, #0096c7 100%);
    color: var(--white);
    border-radius: var(--radius-xl);
    margin-bottom: var(--spacing-md);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.benefit-icon::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.3) 0%, transparent 70%);
    animation: rotate 8s linear infinite;
}

.benefit-icon svg {
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

.benefit-card:hover .benefit-icon {
    transform: scale(1.05) rotate(5deg);
}

/* Section title enhancements */
.section-title {
    position: relative;
    display: inline-block;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #00c4f9, #0096c7);
    border-radius: 2px;
}

/* Content block text animation */
.content-block {
    animation: fadeIn 0.8s ease-out;
}

/* ===================================
   Enhanced Content Title Styling
   =================================== */

/* Content title with decorative elements */
.content-title {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.content-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, #00c4f9, #0096c7);
    border-radius: 2px;
}

/* Enhanced content text with better readability */
.content-text {
    position: relative;
    padding-left: 1.5rem;
    line-height: 1.8;
    color: var(--text-medium);
}

.content-text::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0.6em;
    width: 6px;
    height: 6px;
    background: linear-gradient(135deg, #00c4f9, #0096c7);
    border-radius: 50%;
    opacity: 0.6;
}

/* Special styling for strong/bold text within content */
.content-text strong {
    color: var(--dark-navy);
    font-weight: 700;
    position: relative;
    padding: 0 0.25rem;
    background: linear-gradient(120deg, transparent 0%, rgba(0, 196, 249, 0.1) 0%);
}

/* Add visual separation between content blocks */
.content-block + .content-block {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid rgba(0, 196, 249, 0.1);
}

/* ===================================
   Project Cards Styling
   =================================== */

/* Add border to project cards without images */
.project-card:not(:has(.project-image)) {
    border: 2px solid var(--medium-gray);
}

.project-card:not(:has(.project-image)):hover {
    border-color: var(--primary-blue);
}

/* Position last full-width project card to the right on desktop */
@media (min-width: 992px) {
    /* Target the Provincial Forest Fire Fighting Centre card specifically - ONLY on projects page */
    .projects-page .row.g-5 > .col-lg-6:last-child:only-of-type {
        width: 50%;
        max-width: 50%;
        margin-left: 50%;
        padding-right: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
        padding-left: calc(var(--bs-gutter-x, 1.5rem) * 0.5);
    }
    
    /* Prevent columns with project/feature cards from using flex stretch */
    .col-lg-6 .project-card,
    .col-lg-12 .project-card,
    .col-lg-12 .feature-card {
        margin-bottom: 0;
    }
}

/* ===================================
   Job Cards Equal Height & Centering
   =================================== */

/* Remove the margin-bottom from job cards to prevent stacking issues */
.row.g-5 .job-card {
    margin-bottom: 0 !important;
}

/* Ensure rows with job cards align items properly */
.row.g-5 {
    align-items: stretch;
}

/* Ensure parent columns stretch to full height */
.row.g-5 > [class*='col-'] {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

/* Ensure job cards have equal height and fill the column */
.job-card {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

/* Make job description grow to fill space */
.job-description {
    flex-grow: 1;
}

/* Center single job card in row on larger screens */
@media (min-width: 992px) {
    /* When there's an odd number, center the last card */
    .row.g-5 > .col-lg-6:last-child:nth-child(odd) {
        margin-left: auto;
        margin-right: auto;
    }
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .quick-info-icon,
    .service-preview-icon,
    .benefit-icon {
        width: 72px;
        height: 72px;
    }
    
    .quick-info-card::before,
    .service-preview-card::before,
    .feature-card::before {
        width: 70px;
        height: 70px;
    }
    
    .quick-info-card:hover::before,
    .service-preview-card:hover::before,
    .feature-card:hover::before {
        width: 100px;
        height: 100px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle::before {
        width: 60px;
    }
    
    .feature-card .highlight::after {
        height: 2px;
        bottom: -3px;
    }
}

/* Smooth transitions for all interactive elements */
.quick-info-icon,
.service-preview-icon,
.benefit-icon,
.quick-info-title,
.service-preview-title {
    transition: all 0.3s ease;
}

/* ===================================
   Announcement Popup Styles
   =================================== */

.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(10, 14, 39, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    animation: overlayFadeIn 0.5s ease-out forwards;
}

.popup-overlay.closing {
    animation: overlayFadeOut 0.4s ease-in forwards;
}

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

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

/* Announcement container */
.announcement-container {
    position: relative;
    max-width: 900px;
    width: 100%;
    padding: 2rem;
}

.popup-overlay .announcement-container {
    animation: popupEntrance 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.popup-overlay.closing .announcement-container {
    animation: popupExit 0.3s ease-in forwards;
}

@keyframes popupEntrance {
    from {
        opacity: 0;
        transform: scale(0.8) translateY(40px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes popupExit {
    from {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
    to {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
}

/* Animated background orbs */
.bg-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0;
    animation: orbFloat 8s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: rgba(0, 217, 255, 0.3);
    top: -200px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: rgba(138, 43, 226, 0.2);
    bottom: -150px;
    left: -100px;
    animation-delay: 2s;
}

@keyframes orbFloat {
    0%, 100% {
        opacity: 0.4;
        transform: translate(0, 0) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: translate(20px, -20px) scale(1.1);
    }
}

/* Main announcement card */
.announcement-card {
    background: rgba(26, 31, 58, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 4rem 3rem;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 1px rgba(255, 255, 255, 0.1) inset;
    animation: cardEntrance 1s ease-out;
}

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

/* Decorative corner elements */
.announcement-card .corner-decoration {
    position: absolute;
    width: 100px;
    height: 100px;
    border: 2px solid #00D9FF;
    opacity: 0;
    animation: cornerFade 1s ease-out 0.5s forwards;
}

.announcement-card .corner-top-left {
    top: 20px;
    left: 20px;
    border-right: none;
    border-bottom: none;
    border-top-left-radius: 16px;
}

.announcement-card .corner-bottom-right {
    bottom: 20px;
    right: 20px;
    border-left: none;
    border-top: none;
    border-bottom-right-radius: 16px;
}

@keyframes cornerFade {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 0.5;
        transform: scale(1);
    }
}

/* Announcement badge */
.announcement-badge {
    display: inline-block;
    background: linear-gradient(135deg, #00D9FF 0%, #00B8D4 100%);
    color: #0A0E27;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    padding: 0.5rem 1.25rem;
    border-radius: 50px;
    margin-bottom: 2rem;
    opacity: 0;
    animation: badgeSlide 0.8s ease-out 0.3s forwards;
    box-shadow: 0 8px 24px rgba(0, 217, 255, 0.3);
}

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

/* Announcement title */
.announcement-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 700;
    color: #E8EAED;
    line-height: 1.1;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: titleReveal 1s ease-out 0.5s forwards;
}

@keyframes titleReveal {
    from {
        opacity: 0;
        transform: translateY(20px);
        filter: blur(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
        filter: blur(0);
    }
}

/* City highlight */
.city-highlight {
    position: relative;
    display: inline-block;
    color: #00D9FF;
    text-shadow: 0 0 30px rgba(0, 217, 255, 0.3);
}

.city-highlight::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.1em;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #00D9FF 0%, transparent 100%);
    animation: underlineGrow 0.8s ease-out 1.2s forwards;
}

@keyframes underlineGrow {
    to {
        width: 100%;
    }
}

/* Announcement subtitle */
.announcement-subtitle {
    font-size: 1.25rem;
    color: #9BA3AF;
    font-weight: 300;
    margin-bottom: 2.5rem;
    opacity: 0;
    animation: subtitleFade 0.8s ease-out 0.8s forwards;
}

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

/* Separator line */
.announcement-card .separator {
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #00D9FF 0%, #1A1F3A 100%);
    margin: 2rem 0;
    animation: lineExpand 1s ease-out 1s forwards;
}

@keyframes lineExpand {
    to {
        width: 200px;
    }
}

/* Coming soon text */
.coming-soon {
    font-size: 2rem;
    color: #E8EAED;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    opacity: 0;
    animation: comingSoonPulse 2s ease-in-out 1.5s infinite;
}

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

/* Floating particles */
.announcement-card .particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: #00D9FF;
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 3s ease-in-out infinite;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

.announcement-card .particle:nth-child(5) {
    top: 20%;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 4s;
}

.announcement-card .particle:nth-child(6) {
    top: 60%;
    left: 80%;
    animation-delay: 1s;
    animation-duration: 5s;
}

.announcement-card .particle:nth-child(7) {
    top: 40%;
    left: 90%;
    animation-delay: 2s;
    animation-duration: 3.5s;
}

.announcement-card .particle:nth-child(8) {
    top: 80%;
    left: 20%;
    animation-delay: 1.5s;
    animation-duration: 4.5s;
}

@keyframes particleFloat {
    0%, 100% {
        opacity: 0;
        transform: translateY(0);
    }
    10%, 90% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
        transform: translateY(-30px);
    }
}

/* Company logo in popup */
.announcement-card .company-logo {
    position: absolute;
    top: 3rem;
    right: 5rem;
    max-width: 300px;
    height: auto;
    z-index: 10;
    opacity: 0;
    animation: logoFade 0.8s ease-out 0.5s forwards;
}

@keyframes logoFade {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close button */
.popup-overlay .close-button {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 20;
    opacity: 0;
    animation: closeButtonFade 0.5s ease-out 1s forwards;
}

.popup-overlay .close-button:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.popup-overlay .close-button::before,
.popup-overlay .close-button::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 2px;
    background: #E8EAED;
    border-radius: 1px;
}

.popup-overlay .close-button::before {
    transform: rotate(45deg);
}

.popup-overlay .close-button::after {
    transform: rotate(-45deg);
}

@keyframes closeButtonFade {
    from {
        opacity: 0;
        transform: scale(0.5);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Progress bar for auto-close */
.auto-close-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #00D9FF, rgba(0, 217, 255, 0.3));
    border-radius: 0 0 24px 24px;
    animation: progressShrink 7s linear forwards;
}

@keyframes progressShrink {
    from { width: 100%; }
    to { width: 0%; }
}

.popup-overlay.closing .auto-close-progress {
    animation: none;
}

/* Responsive adjustments for popup */
@media (max-width: 768px) {
    .announcement-card {
        padding: 3rem 2rem;
    }

    .announcement-card .corner-decoration {
        width: 60px;
        height: 60px;
    }

    .announcement-card .corner-top-left {
        top: 15px;
        left: 15px;
    }

    .announcement-card .corner-bottom-right {
        bottom: 15px;
        right: 15px;
    }

    .announcement-card .company-logo {
        max-width: 120px;
        right: 3rem;
    }

    .popup-overlay .close-button {
        top: 1rem;
        right: 1rem;
        width: 36px;
        height: 36px;
    }

    .popup-overlay .close-button::before,
    .popup-overlay .close-button::after {
        width: 14px;
    }
}
