/* ---------- ABOUT PAGE INTERACTIONS ---------- */

/* 1. Parallax Hero */
.about-hero {
    position: relative;
    height: 70vh;
    min-height: 500px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-align: center;
    perspective: 1px;
    /* Key for simple parallax if pure CSS, but we'll use JS for control */
}

/* Generic Scroll Animation */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.scroll-animate.active {
    opacity: 1;
    transform: translateY(0);
}

.about-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    /* Taller for parallax movement */
    background-image: url('../images/hero-2.jpg');
    background-size: cover;
    background-position: center;
    z-index: -1;
    will-change: transform;
    pointer-events: none;
}

.about-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(10, 14, 39, 0.7), var(--secondary-color));
    z-index: 1;
}

.about-hero-content {
    position: relative;
    z-index: 2;
    transform: translateY(0);
    opacity: 1;
    transition: transform 0.1s linear, opacity 0.1s linear;
}

.about-hero h1 {
    font-size: 4rem;
    font-weight: 800;
    letter-spacing: -2px;
    margin-bottom: 20px;
    text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* 2. Living Timeline Effect for History */
.timeline-wrapper {
    position: relative;
    padding-left: 50px;
    border-left: 2px solid rgba(22, 205, 233, 0.2);
    margin-left: 20px;
}

.timeline-progress {
    position: absolute;
    left: -2px;
    top: 0;
    width: 2px;
    height: 0%;
    /* Grows with scroll */
    background: var(--primary-color);
    box-shadow: 0 0 15px var(--primary-color);
    transition: height 0.1s linear;
}

.history-card {
    position: relative;
    margin-bottom: 60px;
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.history-card.visible {
    opacity: 1;
    transform: translateX(0);
}

.history-node {
    position: absolute;
    left: -61px;
    /* Adjust based on padding + border size */
    top: 0;
    width: 20px;
    height: 20px;
    background: var(--secondary-color);
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    transition: all 0.4s ease;
    z-index: 2;
}

.history-card.visible .history-node {
    background: var(--primary-color);
    box-shadow: 0 0 20px rgba(22, 205, 233, 0.6);
}

/* 3. Holographic Values Cards */
.holo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    perspective: 1000px;
}

.holo-card {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 50px 30px;
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow:
        0 20px 50px rgba(0, 0, 0, 0.05),
        inset 0 0 0 transparent;
    /* Prepared for hover */
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    text-align: center;
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;

    /* Entrance Animation Initial State */
    opacity: 0;
    transform: translateY(30px);
}

.holo-card.visible,
.project-card.visible,
.legacy-item.visible,
.mxn-news-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Specific transitions for project elements if needed */
/* Note: .project-card base styles are in style.css (lines 1250-1261) */
/* Specific transitions for legacy items */
.legacy-item {
    transition: all 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
    opacity: 0;
    transform: translateY(30px);
    position: relative;
    overflow: hidden;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

/* Project Card Hover - uses style.css base hover, these are enhancement overrides */
/* Note: Base .project-card:hover is in style.css (lines 1260-1263) */

.project-card .image-slider-wrapper {
    overflow: hidden;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.project-card img {
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    width: 100%;
    display: block;
}

.project-card:hover img {
    transform: scale(1.1);
}

/* Shine Effect for Project Cards */
.project-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.6), transparent);
    transform: skewX(-25deg);
    pointer-events: none;
    transition: 0s;
    z-index: 5;
}

.project-card:hover::after {
    left: 150%;
    transition: 0.8s;
}

/* Legacy Item Styling */
.legacy-item {
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
}

.legacy-item:hover {
    transform: translateY(-5px) scale(1.02);
    background: #f8fbff;
    border-color: var(--primary-color);
    box-shadow: 0 10px 25px rgba(22, 205, 233, 0.15);
}

.legacy-item h3 {
    font-size: 1.1rem;
    color: var(--secondary-color);
    margin-bottom: 10px;
    transition: color 0.3s;
}

.legacy-item:hover h3 {
    color: var(--primary-color);
}

.legacy-item p {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

.holo-card:hover {
    transform: translateY(-10px) rotateX(5deg);
    background: white;
    box-shadow:
        0 30px 60px rgba(22, 205, 233, 0.15),
        inset 0 0 20px rgba(22, 205, 233, 0.1);
    border-color: rgba(22, 205, 233, 0.3);
}

.holo-icon {
    font-size: 3rem;
    margin-bottom: 25px;
    background: linear-gradient(135deg, var(--secondary-color), var(--primary-color));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: transform 0.5s ease;
}

.holo-card:hover .holo-icon {
    transform: scale(1.2) rotate(10deg);
}

.holo-card h4 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
}

.holo-card p {
    color: #64748b;
    line-height: 1.6;
}

/* Shine Effect */
.holo-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: skewX(-25deg);
    transition: 0.5s;
    pointer-events: none;
}

.holo-card:hover::after {
    left: 150%;
    transition: 0.7s;
}

@media (max-width: 768px) {
    .about-hero h1 {
        font-size: 2.5rem;
    }

    .timeline-wrapper {
        padding-left: 30px;
        margin-left: 10px;
    }

    .history-node {
        left: -41px;
    }
}

/* ---------- NEWS PAGE REDESIGN V5: "ULTRA-PREMIUM CRYSTAL" ---------- */

/* 1. Uniform Grid */
.mxn-news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 40px;
    padding: 30px 0;
    perspective: 1200px;
}

/* 2. Crystal Card Container */
.mxn-news-card {
    opacity: 0;
    transform: translateY(60px);

    /* Premium Glass Material */
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.6) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    padding: 30px;
    border-radius: 20px;

    /* Chamfered Edge / Light Reflection */
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.05),
        /* Drop shadow */
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);
    /* Inner rim */

    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
    z-index: 1;
    min-height: 500px;
}

/* Hover State: "Magnetic Lift" */
.mxn-news-card:hover {
    transform: translateY(-15px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.9) 100%);
    box-shadow:
        0 30px 60px rgba(22, 205, 233, 0.15),
        /* Color tint shadow */
        inset 0 0 0 1px rgba(255, 255, 255, 1);
    border-color: #fff;
}

/* 3. Image Presentation */
.news-img-wrapper {
    width: 100%;
    height: 240px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 25px;
    position: relative;
    /* Image shadow for separation */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transform: translateZ(20px);
    /* Parallax depth */
    transition: box-shadow 0.5s ease;
}

.mxn-news-card:hover .news-img-wrapper {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.news-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mxn-news-card:hover .news-img-wrapper img {
    transform: scale(1.08);
}

/* 4. Content Typography */
.news-content {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    padding: 0 5px;
}

.news-badge {
    align-self: flex-start;
    padding: 8px 16px;
    background: white;
    color: var(--secondary-color);
    border-radius: 30px;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 20px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
    /* Floating badge */
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.mxn-news-card:hover .news-badge {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 5px 15px rgba(22, 205, 233, 0.3);
    border-color: var(--primary-color);
}

.mxn-news-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 15px;
    line-height: 1.35;
    letter-spacing: -0.5px;
    transition: color 0.3s ease;
}

.mxn-news-card:hover h3 {
    color: var(--primary-color);
    /* Brand color on hover */
}

.news-date {
    font-size: 0.9rem;
    color: #94a3b8;
    margin-top: auto;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
}

.news-date::before {
    content: '';
    display: block;
    width: 4px;
    height: 4px;
    background: var(--primary-color);
    border-radius: 50%;
}

/* 5. Refined Footer */
.news-footer {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.news-footer span:first-child {
    font-size: 0.95rem;
    font-weight: 600;
    color: #64748b;
    transition: color 0.3s;
}

.mxn-news-card:hover .news-footer span:first-child {
    color: var(--secondary-color);
}

/* Circular Arrow Button */
.arrow-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #f1f5f9;
    color: var(--secondary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    transition: all 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.mxn-news-card:hover .arrow-icon {
    background: var(--primary-color);
    color: white;
    transform: rotate(-45deg);
    /* Angled "Go" gesture */
}

/* 6. Background Decorations */
/* Floating Watermark */
.news-bg-initial {
    position: absolute;
    bottom: -20px;
    right: -20px;
    font-size: 200px;
    font-weight: 900;
    color: var(--primary-color);
    opacity: 0.05;
    z-index: 0;
    pointer-events: none;
    transition: transform 0.6s ease;
    user-select: none;
    line-height: 1;
}

.mxn-news-card:hover .news-bg-initial {
    transform: translate(-10px, -10px) scale(1.1);
    opacity: 0.1;
}

/* Shine Sweep */
.news-shimmer {
    position: absolute;
    top: 0;
    left: -150%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.8) 50%,
            transparent);
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: 5;
    transition: 0s;
}

.mxn-news-card:hover .news-shimmer {
    left: 200%;
    transition: 0.8s ease-in-out;
}

/* Blob Animations (Preserved) */
.blob-float-1 {
    animation: blobFloat 20s infinite alternate cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

.blob-float-2 {
    animation: blobFloat 25s infinite alternate-reverse cubic-bezier(0.45, 0.05, 0.55, 0.95);
}

@keyframes blobFloat {
    0% {
        transform: translate(0, 0) scale(1);
    }

    33% {
        transform: translate(30px, -50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }

    100% {
        transform: translate(0, 0) scale(1);
    }
}

/* Staggered Children Reveal (e.g. for Filter Chips) */
.stagger-children .mxn-chip {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.stagger-children.active .mxn-chip {
    opacity: 1;
    transform: translateY(0);
}

/* Hardcode staggered delays for first 6 chips */
.stagger-children.active .mxn-chip:nth-child(1) {
    transition-delay: 0.1s;
}

.stagger-children.active .mxn-chip:nth-child(2) {
    transition-delay: 0.2s;
}

.stagger-children.active .mxn-chip:nth-child(3) {
    transition-delay: 0.3s;
}

.stagger-children.active .mxn-chip:nth-child(4) {
    transition-delay: 0.4s;
}

.stagger-children.active .mxn-chip:nth-child(5) {
    transition-delay: 0.5s;
}

/* ---------- PRODUCTS PAGE PREMIUM CARDS ---------- */

/* 1. Grid */
.products-premium-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 40px;
    padding: 30px 0;
    perspective: 1200px;
}

/* 2. Premium Product Card */
.product-premium-card {
    opacity: 0;
    transform: translateY(60px);

    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.7) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);

    padding: 35px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.05),
        inset 0 0 0 1px rgba(255, 255, 255, 0.5);

    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    transform-style: preserve-3d;
    z-index: 1;
    min-height: 520px;
}

/* Hover Effects */
.product-premium-card:hover {
    transform: translateY(-15px);
    background: linear-gradient(135deg, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0.95) 100%);
    box-shadow:
        0 30px 60px rgba(22, 205, 233, 0.15),
        inset 0 0 0 1px rgba(255, 255, 255, 1);
    border-color: #fff;
}

/* 3. Image Area */
.product-img-wrapper {
    width: 100%;
    height: 220px;
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 25px;
    position: relative;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    transform: translateZ(20px);
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.product-premium-card:hover .product-img-wrapper {
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.12);
}

.product-img-wrapper img.product-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.product-premium-card:hover .product-img-wrapper img.product-thumb {
    transform: scale(1.08);
}

/* 4. Content */
.product-logo {
    height: 48px;
    width: auto;
    margin-bottom: 20px;
    transition: transform 0.5s ease;
    align-self: flex-start;
}

.product-premium-card:hover .product-logo {
    transform: scale(1.05) translateX(5px);
}

.product-premium-card h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
    margin-bottom: 12px;
    transition: color 0.3s ease;
}

.product-premium-card:hover h3 {
    color: var(--primary-color);
}

.product-desc {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 30px;
    flex-grow: 1;
}

/* 5. Footer / Button */
.product-footer {
    margin-top: auto;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-premium-link {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--secondary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.product-premium-card:hover .btn-premium-link {
    color: var(--primary-color);
}

/* 6. Decorations */
.product-bg-watermark {
    position: absolute;
    bottom: -30px;
    right: -30px;
    font-size: 180px;
    font-weight: 900;
    color: var(--primary-color);
    opacity: 0.04;
    pointer-events: none;
    transition: transform 0.6s ease;
    user-select: none;
    line-height: 1;
    z-index: 0;
}

.product-premium-card:hover .product-bg-watermark {
    transform: translate(-10px, -10px) scale(1.1);
    opacity: 0.08;
}

.product-shimmer {
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
    transform: skewX(-20deg);
    pointer-events: none;
    z-index: 5;
    transition: 0s;
}

.product-premium-card:hover .product-shimmer {
    left: 200%;
    transition: 0.8s ease-in-out;
}

/* ==========================================================================
   GLOBAL CARD ANIMATIONS (consolidated from card-animations.css)
   ========================================================================== */

/* Standard Hover Animation for All Cards */
.cura-brand-card,
.project-card,
.stat-card,
.category-card,
.product-premium-card,
.mxn-news-card,
.brand-img {
    transition: transform 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        box-shadow 0.4s cubic-bezier(0.165, 0.84, 0.44, 1),
        opacity 0.6s ease-out;

    /* Initial State for Staggered Entrance */
    opacity: 0;
    transform: translateY(60px);
}

/* The state when the element is scrolled into view */
.cura-brand-card.visible,
.project-card.visible,
.stat-card.visible,
.category-card.visible,
.product-premium-card.visible,
.mxn-news-card.visible,
.brand-img.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Hover States (Only apply when visible) */
.cura-brand-card.visible:hover,
.project-card.visible:hover,
.stat-card.visible:hover,
.category-card.visible:hover {
    transform: translateY(-8px) scale(1.01);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.brand-img.visible:hover {
    transform: translateY(-10px) scale(1.01);
    box-shadow: 0 30px 60px rgba(22, 205, 233, 0.2);
}

/* Ensure images inside cards scale smoothly */
.cura-brand-card:hover .brand-logo-link img,
.project-card:hover .project-img-wrapper img,
.category-card:hover .category-img-wrapper img {
    transform: scale(1.05);
}