/* 
 * CrownateStudio - About Page Enhancements
 * Custom animations and interactivity for the About Us hero and content sections.
 */

/* Explicit Interactivity Unlock & Premium Selection */
html, body {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
    pointer-events: auto !important;
}

::selection {
    background: var(--accent-color, #ff4a17);
    color: #fff;
    text-shadow: none;
}

/* Hero Section Loading Animations */
@keyframes fadeInScale {
    0% {
        opacity: 0;
        transform: scale(1.05);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

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

/* Background Zoom Animation for Page Title */
.page-title {
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Parallax Effect */
}

.page-title::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    z-index: 1;
    animation: fadeInScale 2.5s cubic-bezier(0.165, 0.84, 0.44, 1) forwards;
}

.page-title .container {
    position: relative;
    z-index: 2;
    animation: slideUpFade 1.5s cubic-bezier(0.165, 0.84, 0.44, 1) 0.3s both;
}

/* Interactive Image Container */
.about-img-interactive {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer;
    background: #000;
}

.about-img-interactive img {
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
    opacity: 0.95;
    display: block;
    width: 100%;
}

.about-img-interactive:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 40px 80px -15px rgba(0, 0, 0, 0.35);
}

.about-img-interactive:hover img {
    transform: scale(1.1);
    opacity: 1;
}

/* Floating Caption for Image */
.img-overlay-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 2rem;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    color: #fff;
    transform: translateY(100%);
    transition: transform 0.5s ease;
}

.about-img-interactive:hover .img-overlay-caption {
    transform: translateY(0);
}

/* Alignment Helper */
.hero-align-1024 {
    aspect-ratio: 1024 / 1024;
    max-height: 800px;
    margin: 0 auto;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .page-title {
        background-attachment: scroll; /* Better performance on mobile */
    }
    .about-img-interactive:hover {
        transform: translateY(-5px) scale(1.01);
    }
}

/* Search Bar & Quick Actions */
.search-bar-container {
    max-width: 800px;
    margin: 0 auto;
}

.search-bar-container .input-group {
    border: 1px solid rgba(0,0,0,0.05);
    transition: all 0.4s ease;
}

.search-bar-container .input-group:focus-within {
    transform: translateY(-2px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.15) !important;
}

.quick-actions span {
    transition: all 0.3s ease;
    cursor: pointer;
}

.quick-actions span:hover {
    transform: translateY(-3px);
    background: #ff4a17 !important;
    color: #fff !important;
    border-color: #ff4a17 !important;
}

/* --- CSS-Only Segmented Controls (Radio Logic) --- */
.mission-vision-wrapper {
    position: relative;
    z-index: 10;
}

.segmented-control {
    background: #f1f3f5;
    padding: 6px;
    border-radius: 50px;
    display: inline-flex;
    position: relative;
    border: 1px solid rgba(0,0,0,0.05);
    z-index: 100 !important; /* Force to top */
    pointer-events: auto !important;
}

.seg-btn {
    border: none;
    background: transparent;
    color: #4b5563;
    font-weight: 600;
    font-size: 14px;
    padding: 12px 28px;
    border-radius: 50px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    cursor: pointer !important;
    z-index: 101 !important;
    position: relative;
    margin-bottom: 0;
    pointer-events: auto !important;
}

.seg-btn:hover {
    color: var(--accent-color, #ff4a17);
}

/* Radio State Logic */
#toggle-mission:checked ~ .segmented-control #mission-label,
#toggle-vision:checked ~ .segmented-control #vision-label,
#toggle-values:checked ~ .segmented-control #values-label {
    color: #fff;
    background: var(--accent-color, #ff4a17);
    box-shadow: 0 10px 20px rgba(255, 74, 23, 0.2);
}

/* Content Pane Switching Logic */
.pane-container {
    position: relative;
    width: 100%;
}

.custom-pane {
    display: none;
    opacity: 0;
}

#toggle-mission:checked ~ .about-content-card #pane-mission,
#toggle-vision:checked ~ .about-content-card #pane-vision,
#toggle-values:checked ~ .about-content-card #pane-values {
    display: block;
    opacity: 1;
    animation: contentReveal 0.8s cubic-bezier(0.165, 0.84, 0.44, 1) both;
}

/* --- Premium Content Cards --- */
.about-content-card {
    background: #fff;
    border-radius: 30px;
    padding: 40px;
    border: 1px solid #f1f3f5;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.03);
    transition: all 0.5s ease;
    min-height: 450px;
}

@keyframes contentReveal {
    0% { 
        opacity: 0; 
        transform: translateX(30px); 
        filter: blur(10px);
    }
    100% { 
        opacity: 1; 
        transform: translateX(0); 
        filter: blur(0);
    }
}

/* --- Value Card Enhancements --- */
.value-card {
    background: #f8fafc;
    border-radius: 20px;
    padding: 25px;
    border: 1px solid transparent;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    height: 100%;
    cursor: pointer;
}

.value-card:hover {
    background: #fff;
    border-color: var(--accent-color, #ff4a17);
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 30px 60px rgba(0,0,0,0.08);
}

.value-card i {
    font-size: 2.5rem;
    margin-bottom: 15px;
    display: inline-block;
    color: #94a3b8;
    transition: all 0.3s ease;
}

.value-card:hover i {
    color: var(--accent-color, #ff4a17);
    transform: scale(1.1) rotate(-5deg);
}

/* Platform Intelligence Badges */
.quick-actions span {
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    font-weight: 500;
}

.quick-actions span:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}
