/**
 * company-our-story.css
 * Specific styles for the company our story page
 * Uses centralized colors from main.css
 */

/* ==================== LOADING OVERLAY ==================== */
#loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: var(--z-index-maximum);
    transition: opacity 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--elegant-gray-200);
    border-top: 4px solid var(--primary-ocean-blue);
    border-radius: var(--radius-full);
    animation: spin 1s linear infinite;
    margin-bottom: var(--spacing-5);
}

.loading-text {
    color: var(--text-primary);
    font-size: var(--text-xl);
    font-weight: var(--font-weight-medium);
    font-family: var(--font-display);
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==================== HERO SECTION ==================== */
.hero-slideshow {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background: var(--gradient-hero);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--text-white);
}

.hero-bg-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.3;
    z-index: 1;
}

.hero-bg-layer-0 {
    background-image: url('../images/slider/heritage-srilanka-main-slider.jpg');
}

.hero-bg-layer-1 {
    background-image: url('../images/slider/luxury-beach-sri-lanka.jpg');
    opacity: 0.2;
}

.hero-glow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-overlay);
    z-index: 2;
}

#hero-content {
    position: relative;
    z-index: 3;
    text-align: center;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--spacing-3);
    margin-top: var(--spacing-6);
}

.hero-badges .badge {
    padding: var(--spacing-2) var(--spacing-4);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: var(--font-weight-semibold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: var(--transition-elegant);
}

.hero-badges .badge:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: var(--shadow-md);
}

/* ==================== TIMELINE STYLES ==================== */
.timeline {
    position: relative;
    padding: var(--spacing-8) 0;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 3px;
    margin-left: -1.5px;
    background: var(--gradient-primary);
    z-index: 1;
    border-radius: var(--radius-full);
}

.timeline-item {
    position: relative;
    margin-bottom: var(--spacing-12);
    z-index: 2;
    width: 100%;
    clear: both;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: var(--spacing-5);
    width: 20px;
    height: 20px;
    margin-left: -10px;
    background: var(--primary-ocean-blue);
    border: 4px solid var(--bg-primary);
    border-radius: var(--radius-full);
    z-index: 3;
    box-shadow: var(--shadow-md);
    transition: var(--transition-elegant);
}

.timeline-item:hover .timeline-dot {
    background: var(--accent-golden);
    transform: scale(1.2);
    box-shadow: var(--glow-golden);
}

.timeline-content {
    position: relative;
    width: 45%;
    padding: var(--spacing-6);
    background: var(--gradient-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-sm);
    transition: var(--transition-smooth);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.timeline-item:nth-child(odd) .timeline-content {
    float: left;
    clear: both;
    margin-right: 55%;
}

.timeline-item:nth-child(even) .timeline-content {
    float: right;
    clear: both;
    margin-left: 55%;
}

.timeline-content:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-ocean-blue);
}

.timeline-content h4 {
    color: var(--primary-ocean-blue);
    margin-bottom: var(--spacing-3);
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
    font-family: var(--font-display);
}

.timeline-content p {
    color: var(--text-secondary);
    margin-bottom: 0;
    line-height: var(--leading-relaxed);
}

/* ==================== STORY CONTENT STYLES ==================== */
.story-image {
    position: relative;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    transition: var(--transition-elegant);
}

.story-image:hover {
    transform: scale(1.02) rotate(1deg);
    box-shadow: var(--glow-ocean);
}

.story-image img {
    width: 100%;
    height: auto;
    transition: var(--transition-smooth);
}

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

.story-content-card {
    background: var(--gradient-card);
    padding: var(--spacing-8);
    border-radius: var(--radius-2xl);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: var(--transition-elegant);
}

.story-content-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-ocean-blue-light);
}

.founder-profile {
    background: var(--bg-ocean-light);
    padding: var(--spacing-6);
    border-radius: var(--radius-xl);
    border-left: 4px solid var(--accent-golden);
    margin: var(--spacing-6) 0;
    transition: var(--transition-elegant);
}

.founder-profile:hover {
    background: var(--bg-emerald-light);
    border-left-color: var(--primary-emerald);
    transform: translateX(4px);
}

.founder-highlights .highlight-box {
    background: var(--gradient-card);
    padding: var(--spacing-4);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xs);
    transition: var(--transition-elegant);
    border: 1px solid var(--border-light);
    height: 100%;
}

.founder-highlights .highlight-box:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-ocean-blue-light);
}

.founder-highlights .highlight-box i {
    color: var(--primary-ocean-blue);
    margin-bottom: var(--spacing-3);
    transition: var(--transition-elegant);
}

.founder-highlights .highlight-box:hover i {
    color: var(--accent-golden);
    transform: scale(1.1);
}

.founder-highlights .highlight-box h5 {
    color: var(--text-primary);
    font-weight: var(--font-weight-semibold);
    margin-bottom: var(--spacing-2);
    font-family: var(--font-display);
    font-size: var(--text-base);
}

.founder-highlights .highlight-box p {
    color: var(--text-secondary);
    font-size: var(--text-sm);
    margin: 0;
    line-height: var(--leading-relaxed);
}

/* ==================== TEAM SECTION STYLES ==================== */
.team-card {
    background: var(--gradient-card);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: var(--transition-premium);
    border: 1px solid var(--border-light);
    height: 100%;
}

.team-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-ocean-blue);
}

.team-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.team-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.team-card:hover .team-image img {
    transform: scale(1.1);
}

.team-content {
    padding: var(--spacing-6);
    text-align: center;
}

.team-content h4 {
    color: var(--primary-ocean-blue);
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-3);
    font-family: var(--font-display);
}

.team-content p {
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin: 0;
}

/* ==================== VALUE PROPOSITION STYLES ==================== */
.value-proposition-card {
    background: var(--gradient-card);
    padding: var(--spacing-8);
    border-radius: var(--radius-2xl);
    text-align: center;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    transition: var(--transition-premium);
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.value-proposition-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-premium);
    border-color: var(--primary-ocean-blue);
}

.value-proposition-card .icon-box {
    width: 80px;
    height: 80px;
    background: var(--gradient-ocean);
    border-radius: var(--radius-2xl);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-6);
    transition: var(--transition-elegant);
    box-shadow: var(--shadow-ocean);
}

.value-proposition-card:hover .icon-box {
    background: var(--gradient-golden);
    transform: scale(1.1) rotate(5deg);
    box-shadow: var(--glow-golden);
}

.value-proposition-card .icon-box i {
    color: var(--text-white);
    transition: var(--transition-elegant);
}

.value-proposition-card:hover .icon-box i {
    color: var(--primary-ocean-blue-dark);
}

.value-proposition-card h4 {
    color: var(--text-primary);
    font-size: var(--text-xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-4);
    font-family: var(--font-display);
}

.value-proposition-card p {
    color: var(--text-secondary);
    line-height: var(--leading-relaxed);
    margin: 0;
    flex-grow: 1;
}

/* ==================== CTA SECTION STYLES ==================== */
.cta-section {
    background: var(--gradient-hero);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.1;
    z-index: 1;
}

.cta-section .container {
    position: relative;
    z-index: 2;
}

.cta-section h2 {
    font-size: var(--text-4xl);
    font-weight: var(--font-weight-bold);
    color: var(--text-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    font-family: var(--font-display);
}

.cta-section .lead {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

/* ==================== ANIMATION UTILITIES ==================== */
.animate-item {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.165, 0.84, 0.44, 1);
}

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

/* ==================== RESPONSIVE DESIGN ==================== */

/* Tablet Styles */
@media (max-width: 1199.98px) {
    .timeline-content {
        width: 48%;
    }
    
    .timeline-item:nth-child(odd) .timeline-content {
        margin-right: 52%;
    }
    
    .timeline-item:nth-child(even) .timeline-content {
        margin-left: 52%;
    }
    
    .story-content-card {
        padding: var(--spacing-6);
    }
    
    .value-proposition-card {
        padding: var(--spacing-6);
    }
}

@media (max-width: 991.98px) {
    .hero-slideshow {
        height: 50vh;
        min-height: 350px;
    }
    
    .hero-badges {
        flex-direction: column;
        align-items: center;
    }
    
    .timeline-content {
        padding: var(--spacing-5);
    }
    
    .story-content-card {
        margin-top: var(--spacing-6);
    }
    
    .founder-profile {
        padding: var(--spacing-5);
    }
}

/* Mobile Styles */
@media (max-width: 767.98px) {
    .hero-slideshow {
        height: 40vh;
        min-height: 300px;
        padding: var(--spacing-6) 0;
    }
    
    .hero-slideshow h1 {
        font-size: var(--text-3xl);
    }
    
    .hero-slideshow .lead {
        font-size: var(--text-lg);
    }
    
    .hero-badges .badge {
        padding: var(--spacing-2) var(--spacing-3);
        font-size: var(--text-xs);
        margin-bottom: var(--spacing-2);
    }
    
    /* Timeline Mobile Layout */
    .timeline:before {
        left: 30px;
    }
    
    .timeline-dot {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        float: none !important;
        margin-left: 80px !important;
        margin-right: 0 !important;
        padding: var(--spacing-4);
    }
    
    .timeline-item {
        margin-bottom: var(--spacing-8);
    }
    
    .timeline-content h4 {
        font-size: var(--text-lg);
    }
    
    /* Story Content Mobile */
    .story-content-card {
        padding: var(--spacing-5);
        margin-top: var(--spacing-6);
    }
    
    .founder-profile {
        padding: var(--spacing-4);
        margin: var(--spacing-4) 0;
    }
    
    .founder-highlights .highlight-box {
        margin-bottom: var(--spacing-4);
        padding: var(--spacing-3);
    }
    
    /* Team Cards Mobile */
    .team-image {
        height: 200px;
    }
    
    .team-content {
        padding: var(--spacing-4);
    }
    
    .team-content h4 {
        font-size: var(--text-lg);
    }
    
    /* Value Proposition Mobile */
    .value-proposition-card {
        padding: var(--spacing-5);
        margin-bottom: var(--spacing-5);
    }
    
    .value-proposition-card .icon-box {
        width: 60px;
        height: 60px;
        margin-bottom: var(--spacing-4);
    }
    
    .value-proposition-card h4 {
        font-size: var(--text-lg);
    }
    
    /* CTA Section Mobile */
    .cta-section h2 {
        font-size: var(--text-3xl);
    }
    
    .cta-section .lead {
        font-size: var(--text-lg);
    }
    
    .cta-section .btn {
        width: 100%;
        margin-bottom: var(--spacing-3);
    }
}

@media (max-width: 575.98px) {
    .hero-slideshow {
        height: 35vh;
        min-height: 280px;
    }
    
    .hero-slideshow h1 {
        font-size: var(--text-2xl);
    }
    
    .hero-slideshow .lead {
        font-size: var(--text-base);
    }
    
    .timeline-content {
        width: calc(100% - 60px);
        margin-left: 60px !important;
        padding: var(--spacing-3);
    }
    
    .timeline-content h4 {
        font-size: var(--text-base);
        margin-bottom: var(--spacing-2);
    }
    
    .story-content-card {
        padding: var(--spacing-4);
    }
    
    .founder-profile {
        padding: var(--spacing-3);
    }
    
    .founder-highlights .highlight-box {
        padding: var(--spacing-2);
        text-align: center;
    }
    
    .team-image {
        height: 180px;
    }
    
    .team-content {
        padding: var(--spacing-3);
    }
    
    .value-proposition-card {
        padding: var(--spacing-4);
    }
    
    .value-proposition-card .icon-box {
        width: 50px;
        height: 50px;
    }
    
    .cta-section h2 {
        font-size: var(--text-2xl);
    }
    
    .cta-section .lead {
        font-size: var(--text-base);
    }
}

/* ==================== ACCESSIBILITY ENHANCEMENTS ==================== */
@media (prefers-reduced-motion: reduce) {
    .animate-item,
    .timeline-content,
    .story-image,
    .team-card,
    .value-proposition-card {
        transition: none;
        animation: none;
    }
    
    .spinner {
        animation: none;
    }
    
    .timeline-dot:hover,
    .story-image:hover,
    .team-card:hover,
    .value-proposition-card:hover {
        transform: none;
    }
}

@media (prefers-contrast: high) {
    .timeline:before {
        background: var(--text-dark);
    }
    
    .timeline-dot {
        background: var(--text-dark);
        border-color: var(--bg-primary);
    }
    
    .timeline-content,
    .story-content-card,
    .team-card,
    .value-proposition-card {
        border-width: 2px;
        border-color: var(--text-dark);
    }
    
    .hero-badges .badge {
        border: 2px solid var(--text-dark);
    }
}

/* Focus indicators for accessibility */
.timeline-content:focus,
.story-content-card:focus,
.team-card:focus,
.value-proposition-card:focus {
    outline: 3px solid var(--accent-golden);
    outline-offset: 2px;
}

/* ==================== PRINT STYLES ==================== */
@media print {
    #loading-overlay,
    .hero-slideshow,
    .cta-section {
        display: none !important;
    }
    
    .timeline:before {
        background: #000000 !important;
    }
    
    .timeline-dot {
        background: #000000 !important;
        border-color: #ffffff !important;
    }
    
    .timeline-content,
    .story-content-card,
    .team-card,
    .value-proposition-card {
        border: 1px solid #000000 !important;
        box-shadow: none !important;
        background: #ffffff !important;
        break-inside: avoid;
        margin-bottom: 1rem !important;
    }
    
    .timeline-content h4,
    .story-content-card h3,
    .team-content h4,
    .value-proposition-card h4 {
        color: #000000 !important;
        break-after: avoid;
    }
    
    .timeline-content p,
    .story-content-card p,
    .team-content p,
    .value-proposition-card p {
        color: #000000 !important;
    }
    
    .founder-highlights .highlight-box {
        border: 1px solid #000000 !important;
        margin-bottom: 0.5rem !important;
    }
}

/* ==================== DARK MODE SUPPORT ==================== */
@media (prefers-color-scheme: dark) {
    #loading-overlay {
        background: rgba(33, 33, 33, 0.95);
    }
    
    .loading-text {
        color: var(--elegant-gray-100);
    }
    
    .timeline-content,
    .story-content-card,
    .team-card,
    .value-proposition-card {
        background: linear-gradient(135deg, var(--elegant-gray-800) 0%, var(--elegant-gray-700) 100%);
        border-color: var(--elegant-gray-600);
    }
    
    .founder-profile {
        background: rgba(30, 136, 229, 0.1);
        border-left-color: var(--accent-golden);
    }
    
    .founder-highlights .highlight-box {
        background: linear-gradient(135deg, var(--elegant-gray-800) 0%, var(--elegant-gray-700) 100%);
        border-color: var(--elegant-gray-600);
    }
}

/* ==================== PERFORMANCE OPTIMIZATIONS ==================== */
.timeline-content,
.story-image,
.team-card,
.value-proposition-card,
.founder-highlights .highlight-box {
    will-change: transform;
    transform: translateZ(0);
    backface-visibility: hidden;
}

/* ==================== LOADING STATES ==================== */
.timeline-container-loading,
.team-container-loading,
.value-proposition-container-loading {
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.content-skeleton {
    background: var(--gradient-card);
    border-radius: var(--radius-lg);
    padding: var(--spacing-4);
    margin-bottom: var(--spacing-3);
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.skeleton-line {
    height: 1rem;
    background: var(--elegant-gray-200);
    border-radius: var(--radius-sm);
    margin-bottom: var(--spacing-2);
}

.skeleton-line:last-child {
    width: 60%;
}

/* ==================== ERROR STATES ==================== */
#error-message {
    z-index: var(--z-index-maximum);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.error-fallback {
    text-align: center;
    padding: var(--spacing-8);
    background: var(--gradient-card);
    border-radius: var(--radius-2xl);
    border: 1px solid var(--border-light);
    margin: var(--spacing-6) 0;
}

.error-fallback h3 {
    color: var(--status-error);
    margin-bottom: var(--spacing-4);
}

.error-fallback p {
    color: var(--text-secondary);
    margin-bottom: var(--spacing-6);
}

/* ==================== SPECIAL EFFECTS ==================== */
.story-section-divider {
    height: 2px;
    background: var(--gradient-ocean);
    margin: var(--spacing-12) 0;
    border: none;
    border-radius: var(--radius-full);
    position: relative;
}

.story-section-divider::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 6px;
    background: var(--gradient-golden);
    border-radius: var(--radius-full);
}

/* Timeline enhancement with pulse effect */
.timeline-dot::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    background: rgba(var(--primary-ocean-blue-rgb), 0.3);
    border-radius: var(--radius-full);
    animation: pulse-ring 2s infinite;
}

@keyframes pulse-ring {
    0% {
        width: 0;
        height: 0;
        opacity: 1;
    }
    100% {
        width: 40px;
        height: 40px;
        opacity: 0;
    }
}

/* Floating animations for enhanced visual appeal */
.floating-element {
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Success state for loaded content */
.content-loaded {
    animation: fadeInScale 0.6s ease-out;
}

.section-loaded {
    animation: fadeInUp 0.8s ease-out;
}

/* Enhanced hover states */
.interactive-card {
    cursor: pointer;
    user-select: none;
}

.interactive-card:active {
    transform: scale(0.98);
}

/* ==================== COMPONENT STATES ==================== */
.timeline-item.active .timeline-dot {
    background: var(--accent-golden);
    box-shadow: var(--glow-golden);
    animation: pulse 2s infinite;
}

.timeline-item.active .timeline-content {
    border-color: var(--accent-golden);
    box-shadow: var(--shadow-golden);
}

.story-content-card.highlighted {
    border-color: var(--primary-ocean-blue);
    box-shadow: var(--glow-ocean);
}

.team-card.featured {
    border-color: var(--accent-golden);
    box-shadow: var(--shadow-golden);
}

.value-proposition-card.premium {
    background: var(--gradient-premium);
    color: var(--text-white);
}

.value-proposition-card.premium h4 {
    color: var(--text-white);
}

.value-proposition-card.premium p {
    color: rgba(255, 255, 255, 0.9);
}

.value-proposition-card.premium .icon-box {
    background: var(--gradient-golden);
}

.value-proposition-card.premium .icon-box i {
    color: var(--primary-ocean-blue-dark);
}

/* ==================== END OF COMPANY-OUR-STORY.CSS ==================== */