/**
 * Company History Timeline Styles
 * Beautiful timeline layout for company milestones and history
 * All classes prefixed with 'history-' to avoid conflicts
 *
 * @package Cosmick_Media_Project_Theme
 */

/* ========================================
   History Timeline Page
========================================== */

.history-timeline-page {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    margin-bottom: 200px;
}

/* ========================================
   Hero Section
========================================== */

.history-hero {
    background: linear-gradient(135deg, #2d1839 0%, #ff675b 100%);
    color: white;
    padding: 100px 0 80px;
    position: relative;
    overflow: hidden;
}

.history-hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.history-hero-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.history-hero h1 {
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 25px;
    text-shadow: 0 4px 8px rgba(0,0,0,0.3);
    color: white;
}

.history-hero p {
    font-size: 1.3rem;
    line-height: 1.6;
    margin-bottom: 50px;
    opacity: 0.95;
}

.history-hero-stats {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.history-stat {
    text-align: center;
    padding: 20px;
    background: rgba(255,255,255,0.1);
    border-radius: 12px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.2);
    min-width: 120px;
}

.history-stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: white;
}

.history-stat-label {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ========================================
   Timeline Section
========================================== */

.history-timeline-section {
    padding: 100px 0;
    position: relative;
}

.history-timeline-header {
    text-align: center;
    margin-bottom: 80px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.history-timeline-header h2 {
    color: #2d1839;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.history-timeline-header p {
    color: #666;
    font-size: 1.2rem;
    line-height: 1.6;
}

/* ========================================
   Timeline Container
========================================== */

.history-timeline-container {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Timeline Line */
.history-timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(to bottom,
        #e5e5e5 0%,
        #ff675b calc(var(--progress, 0) * 100%),
        #e5e5e5 calc(var(--progress, 0) * 100%)
    );
    transform: translateX(-50%);
    border-radius: 2px;
    z-index: 1;
}

/* ========================================
   Timeline Items
========================================== */

.history-timeline-item {
    position: relative;
    margin-bottom: 80px;
    width: 50%;
}

.history-timeline-item.left {
    left: 0;
    padding-right: 60px;
}

.history-timeline-item.right {
    left: 50%;
    padding-left: 60px;
}

/* Timeline Dot */
.history-timeline-dot {
    position: absolute;
    top: 30px;
    width: 60px;
    height: 60px;
    background: white;
    border: 4px solid #ff675b;
    border-radius: 50%;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px rgba(255, 103, 91, 0.3);
    transition: all 0.3s ease;
}

.history-timeline-item.left .history-timeline-dot {
    right: -30px;
}

.history-timeline-item.right .history-timeline-dot {
    left: -30px;
}

.history-timeline-dot-inner {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #ff675b, #f2675d);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.history-timeline-year {
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    text-align: center;
    line-height: 1;
}

/* Dot Pulse Animation */
.history-timeline-dot.animate-pulse {
    animation: timelinePulse 2s ease-in-out;
}

@keyframes timelinePulse {
    0% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(255, 103, 91, 0.3);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 12px 35px rgba(255, 103, 91, 0.5);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 8px 25px rgba(255, 103, 91, 0.3);
    }
}

/* ========================================
   Timeline Content
========================================== */

.history-timeline-content {
    position: relative;
}

.history-timeline-card {
    background: white;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    border: 1px solid #e5e5e5;
    overflow: hidden;
    transition: all 0.3s ease;
    position: relative;
}

.history-timeline-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.history-timeline-text {
    padding: 30px;
    display: flex;
    gap: 25px;
    align-items: flex-start;
}

.history-timeline-text.has-image {
    display: flex;
}

.history-timeline-text:not(.has-image) {
    display: block;
}

.history-timeline-image {
    flex-shrink: 0;
    width: 180px;
    height: 140px;
    overflow: hidden;
    border-radius: 12px;
    position: relative;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.history-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.history-timeline-card:hover .history-image {
    transform: scale(1.05);
}

.history-timeline-content-text {
    flex: 1;
    min-width: 0;
}

.history-timeline-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.history-timeline-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 500;
}

.history-timeline-meta i {
    color: #ff675b;
    font-size: 0.85rem;
}

.history-timeline-title {
    margin-bottom: 15px;
}

.history-timeline-title a {
    color: #2d1839;
    text-decoration: none;
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.history-timeline-title a:hover {
    color: #ff675b;
    text-decoration: none;
}

.history-timeline-excerpt {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 1rem;
}

/* Timeline Tags */
.history-timeline-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.history-tag {
    background: #f8f9fa;
    color: #666;
    padding: 4px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid #e5e5e5;
}

.history-timeline-actions {
    margin-top: 20px;
}

.history-read-more {
    background: #ff675b;
    color: white;
    padding: 12px 25px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.history-read-more:hover {
    background: #e55a4e;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 103, 91, 0.3);
}

/* Timeline Arrows */
.history-timeline-arrow {
    position: absolute;
    top: 40px;
    width: 0;
    height: 0;
    border-style: solid;
}

.history-timeline-item.left .history-timeline-arrow {
    right: -15px;
    border-width: 15px 0 15px 15px;
    border-color: transparent transparent transparent white;
}

.history-timeline-item.right .history-timeline-arrow {
    left: -15px;
    border-width: 15px 15px 15px 0;
    border-color: transparent white transparent transparent;
}

/* ========================================
   No Content State
========================================== */

.history-no-content {
    text-align: center;
    padding: 100px 20px;
}

.history-no-content-inner {
    max-width: 600px;
    margin: 0 auto;
    background: white;
    padding: 60px 40px;
    border-radius: 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.1);
    border: 1px solid #e5e5e5;
}

.history-no-content i {
    font-size: 4rem;
    color: #ff675b;
    margin-bottom: 30px;
}

.history-no-content h2 {
    color: #2d1839;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.history-no-content p {
    color: #666;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 40px;
}

.history-blog-btn {
    background: #ff675b;
    color: white;
    padding: 15px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-block;
}

.history-blog-btn:hover {
    background: #e55a4e;
    color: white;
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 103, 91, 0.3);
}

/* ========================================
   Call to Action
========================================== */

.history-cta {
    background: linear-gradient(135deg, #2d1839 0%, #ff675b 100%);
    color: white;
    padding: 80px 0;
    position: relative;
    overflow: hidden;
}

.history-cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="rgba(255,255,255,0.1)"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    opacity: 0.5;
}

.history-cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.history-cta h2 {
    color: white;
    font-size: 2.8rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.history-cta p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 40px;
    opacity: 0.95;
}

.history-cta-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.history-cta-btn {
    padding: 18px 35px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-width: 180px;
    justify-content: center;
}

.history-cta-btn.primary {
    background: white;
    color: #2d1839;
    border: 2px solid white;
}

.history-cta-btn.primary:hover {
    background: transparent;
    color: white;
    transform: translateY(-2px);
    text-decoration: none;
}

.history-cta-btn.secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.history-cta-btn.secondary:hover {
    background: white;
    color: #2d1839;
    transform: translateY(-2px);
    text-decoration: none;
}

/* ========================================
   Responsive Design
========================================== */

@media (max-width: 991px) {
    .history-timeline-line {
        left: 30px;
        transform: none;
    }

    .history-timeline-item {
        width: 100%;
        left: 0;
        padding-left: 80px;
        padding-right: 0;
    }

    .history-timeline-item.right {
        left: 0;
        padding-left: 80px;
        padding-right: 0;
    }

    .history-timeline-dot {
        left: 0 !important;
        right: auto !important;
    }

    .history-timeline-arrow {
        left: 45px !important;
        right: auto !important;
        border-width: 15px 15px 15px 0 !important;
        border-color: transparent white transparent transparent !important;
    }
}

@media (max-width: 768px) {
    .history-hero {
        padding: 80px 0 60px;
    }

    .history-hero h1 {
        font-size: 3rem;
    }

    .history-hero-stats {
        gap: 30px;
    }

    .history-stat {
        min-width: 100px;
        padding: 15px;
    }

    .history-stat-number {
        font-size: 2rem;
    }

    .history-timeline-header h2 {
        font-size: 2.5rem;
    }

    .history-timeline-section {
        padding: 60px 0;
    }

    .history-timeline-header {
        margin-bottom: 60px;
    }

    .history-timeline-text {
        padding: 25px 20px;
        flex-direction: column;
        gap: 20px;
    }

    .history-timeline-image {
        width: 100%;
        height: 160px;
        align-self: stretch;
    }

    .history-timeline-item {
        margin-bottom: 60px;
    }

    .history-cta h2 {
        font-size: 2.2rem;
    }

    .history-cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .history-cta-btn {
        width: 100%;
        max-width: 300px;
    }
}

@media (max-width: 480px) {
    .history-hero {
        padding: 60px 0 40px;
    }

    .history-hero h1 {
        font-size: 2.5rem;
    }

    .history-hero p {
        font-size: 1.1rem;
    }

    .history-hero-stats {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .history-timeline-header h2 {
        font-size: 2rem;
    }

    .history-timeline-text {
        padding: 20px 15px;
        flex-direction: column;
        gap: 15px;
    }

    .history-timeline-image {
        width: 100%;
        height: 140px;
    }

    .history-timeline-title a {
        font-size: 1.2rem;
    }

    .history-timeline-meta {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .history-timeline-container {
        padding: 0 10px;
    }

    .history-timeline-item {
        padding-left: 60px;
    }

    .history-cta {
        padding: 60px 0;
    }

    .history-cta h2 {
        font-size: 1.8rem;
    }

    .history-no-content-inner {
        padding: 40px 20px;
    }
}