/* History Page Styles */

/* History Header Section */
.history-header {
    background: linear-gradient(135deg, #FFA500 0%, #FF9F00 100%);
    color: #fff;
    padding: 50px 0 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.history-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="2" fill="rgba(255,255,255,0.1)"/></svg>');
    opacity: 0.3;
}

.history-header .container {
    position: relative;
    z-index: 1;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

.page-subtitle {
    font-size: 1.1rem;
    opacity: 0.95;
    font-weight: 300;
}

/* Timeline Section */
.timeline-section {
    padding: 40px 0;
    background: #f8f9fa;
    min-height: 60vh;
}

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

/* Vertical Timeline Line */
.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, #FFA500 0%, #FF9F00 100%);
    transform: translateX(-50%);
    border-radius: 2px;
    box-shadow: 0 0 10px rgba(255, 165, 0, 0.3);
}

/* Timeline Item */
.timeline-item {
    position: relative;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

/* Timeline Marker (Year + Dot) */
.timeline-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.timeline-dot {
    width: 20px;
    height: 20px;
    background: #fff;
    border: 4px solid #FFA500;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 165, 0, 0.1), 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.timeline-dot-special {
    width: 24px;
    height: 24px;
    background: #FFA500;
    border: 4px solid #fff;
    box-shadow: 0 0 0 4px rgba(255, 165, 0, 0.2), 0 4px 12px rgba(0, 0, 0, 0.15);
}

.timeline-item:hover .timeline-dot {
    transform: scale(1.2);
    box-shadow: 0 0 0 6px rgba(255, 165, 0, 0.2), 0 6px 20px rgba(0, 0, 0, 0.2);
}

.timeline-year {
    background: linear-gradient(135deg, #FFA500 0%, #FF9F00 100%);
    color: #fff;
    padding: 8px 20px;
    border-radius: 25px;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    box-shadow: 0 4px 12px rgba(255, 165, 0, 0.3);
    min-width: 80px;
    text-align: center;
}

.timeline-year-special {
    font-size: 1.5rem;
    padding: 8px 15px;
    min-width: 50px;
}

/* Timeline Content Wrapper */
.timeline-content-wrapper {
    display: flex;
    align-items: center;
    gap: 20px;
    width: calc(50% - 60px);
    margin-left: auto;
    margin-right: auto;
}

.timeline-item:nth-child(odd) .timeline-content-wrapper {
    flex-direction: row;
    margin-left: 0;
    margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-content-wrapper {
    flex-direction: row-reverse;
    margin-left: auto;
    margin-right: 0;
}

/* Timeline Image */
.timeline-image {
    flex: 0 0 auto;
    width: 200px;
    height: 150px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.timeline-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.timeline-image:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.2);
}

/* Timeline Content */
.timeline-content {
    background: #fff;
    padding: 20px 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    flex: 1;
    transition: all 0.3s ease;
    position: relative;
}

.timeline-content-special {
    background: linear-gradient(135deg, rgba(255, 165, 0, 0.05) 0%, rgba(255, 159, 0, 0.05) 100%);
    border: 2px solid #FFA500;
}

/* Content positioning handled by wrapper */

.timeline-content::before {
    content: '';
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 12px solid transparent;
}

.timeline-item:nth-child(odd) .timeline-content::before {
    right: -24px;
    border-left-color: #fff;
    transform: translateY(-50%);
}

.timeline-item:nth-child(even) .timeline-content::before {
    left: -24px;
    border-right-color: #fff;
    transform: translateY(-50%);
}

/* Adjust arrow position when image is present */
.timeline-item:nth-child(odd) .timeline-content-wrapper.has-image .timeline-content::before {
    right: auto;
    left: -24px;
    border-right-color: #fff;
    border-left-color: transparent;
}

.timeline-item:nth-child(even) .timeline-content-wrapper.has-image .timeline-content::before {
    left: auto;
    right: -24px;
    border-left-color: #fff;
    border-right-color: transparent;
}

.timeline-item:nth-child(odd) .timeline-content-special::before {
    border-left-color: rgba(255, 165, 0, 0.05);
}

.timeline-item:nth-child(even) .timeline-content-special::before {
    border-right-color: rgba(255, 165, 0, 0.05);
}

.timeline-content:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.timeline-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #FFA500;
    margin-bottom: 10px;
    line-height: 1.3;
}

.timeline-description {
    font-size: 1.05rem;
    color: #555;
    line-height: 1.7;
    margin: 0;
}

.timeline-description strong {
    color: #FFA500;
    font-weight: 600;
}

.timeline-description em {
    color: #FFA500;
    font-style: normal;
    font-weight: 600;
}

.location-address {
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    border-left: 4px solid #FFA500;
    margin-top: 15px;
}

.location-address strong {
    color: #FFA500;
    font-weight: 600;
}

/* Call to Action Section */
.history-cta {
    padding: 50px 0;
    background: linear-gradient(135deg, #FFA500 0%, #FF9F00 100%);
    color: #fff;
}

.cta-content {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.cta-content p {
    font-size: 1.1rem;
    margin-bottom: 40px;
    opacity: 0.95;
}

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

.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.btn-primary {
    background: #fff;
    color: #FFA500;
    border-color: #fff;
}

.btn-primary:hover {
    background: transparent;
    color: #fff;
    border-color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: #fff;
    border-color: #fff;
}

.btn-secondary:hover {
    background: #fff;
    color: #FFA500;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 255, 255, 0.3);
}

/* Responsive Design */

/* Large Tablets and Small Desktops */
@media (max-width: 1024px) {
    .history-header {
        padding: 45px 0 35px;
    }
    
    .page-title {
        font-size: 2.25rem;
    }
    
    .page-subtitle {
        font-size: 1.05rem;
    }
    
    .timeline-section {
        padding: 35px 0;
    }
    
    .timeline-container {
        padding: 15px 0;
    }
    
    .timeline-content-wrapper {
        width: calc(50% - 50px);
    }
    
    .timeline-content {
        padding: 18px 22px;
    }
    
    .timeline-image {
        width: 180px;
        height: 135px;
    }
    
    .timeline-title {
        font-size: 1.7rem;
    }
    
    .timeline-description {
        font-size: 1.02rem;
    }
    
    .history-cta {
        padding: 45px 0;
    }
    
    .cta-content h2 {
        font-size: 2rem;
    }
}

/* Tablets */
@media (max-width: 968px) {
    .history-header {
        padding: 40px 0 30px;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .page-subtitle {
        font-size: 1rem;
    }
    
    .timeline-section {
        padding: 35px 0;
    }
    
    .timeline-content-wrapper {
        width: calc(50% - 45px);
    }
    
    .timeline-content {
        padding: 18px 20px;
    }
    
    .timeline-image {
        width: 160px;
        height: 120px;
    }
    
    .timeline-title {
        font-size: 1.6rem;
    }
    
    .cta-content h2 {
        font-size: 1.9rem;
    }
}

/* Small Tablets and Large Phones */
@media (max-width: 768px) {
    .history-header {
        padding: 35px 0 25px;
    }
    
    .page-title {
        font-size: 1.75rem;
        margin-bottom: 12px;
    }
    
    .page-subtitle {
        font-size: 0.95rem;
        padding: 0 1rem;
    }
    
    .timeline-section {
        padding: 30px 0;
        min-height: auto;
    }
    
    .timeline-container {
        padding: 15px 0;
        max-width: 100%;
    }
    
    .timeline-line {
        left: 30px;
        width: 3px;
    }
    
    .timeline-marker {
        left: 30px;
        transform: translateX(-50%);
    }
    
    .timeline-item {
        flex-direction: row !important;
        padding-left: 80px;
        margin-bottom: 25px;
    }
    
    .timeline-content-wrapper {
        width: 100%;
        margin: 0 !important;
        flex-direction: column !important;
        gap: 15px;
    }
    
    .timeline-content {
        padding: 18px 20px;
    }
    
    .timeline-image {
        width: 100%;
        height: 200px;
        order: -1;
    }
    
    .timeline-content::before {
        left: -24px !important;
        right: auto !important;
        border-right-color: #fff !important;
        border-left-color: transparent !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-content-special::before {
        border-right-color: rgba(255, 165, 0, 0.05) !important;
        border-left-color: transparent !important;
    }
    
    .timeline-item:nth-child(even) .timeline-content-special::before {
        border-right-color: rgba(255, 165, 0, 0.05) !important;
        border-left-color: transparent !important;
    }
    
    .timeline-dot {
        width: 18px;
        height: 18px;
        border-width: 3px;
    }
    
    .timeline-dot-special {
        width: 20px;
        height: 20px;
        border-width: 3px;
    }
    
    .timeline-year {
        font-size: 1rem;
        padding: 6px 16px;
        min-width: 70px;
    }
    
    .timeline-title {
        font-size: 1.4rem;
        margin-bottom: 8px;
    }
    
    .timeline-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .location-address {
        font-size: 1rem;
        padding: 12px;
        margin-top: 12px;
    }
    
    .history-cta {
        padding: 40px 0;
    }
    
    .cta-content {
        padding: 0 1rem;
    }
    
    .cta-content h2 {
        font-size: 1.75rem;
        margin-bottom: 15px;
    }
    
    .cta-content p {
        font-size: 0.95rem;
        margin-bottom: 30px;
    }
    
    .cta-buttons {
        gap: 15px;
    }
    
    .btn {
        padding: 12px 28px;
        font-size: 0.95rem;
    }
}

/* Small Phones */
@media (max-width: 480px) {
    .history-header {
        padding: 30px 0 20px;
    }
    
    .page-title {
        font-size: 1.5rem;
        margin-bottom: 10px;
        padding: 0 0.75rem;
    }
    
    .page-subtitle {
        font-size: 0.875rem;
        padding: 0 1rem;
    }
    
    .timeline-section {
        padding: 25px 0;
    }
    
    .timeline-container {
        padding: 10px 0;
    }
    
    .timeline-line {
        left: 25px;
        width: 3px;
    }
    
    .timeline-marker {
        left: 25px;
    }
    
    .timeline-item {
        padding-left: 70px;
        margin-bottom: 20px;
    }
    
    .timeline-dot {
        width: 16px;
        height: 16px;
        border-width: 3px;
    }
    
    .timeline-dot-special {
        width: 18px;
        height: 18px;
        border-width: 3px;
    }
    
    .timeline-year {
        font-size: 0.9rem;
        padding: 5px 14px;
        min-width: 60px;
    }
    
    .timeline-content-wrapper {
        gap: 12px;
    }
    
    .timeline-content {
        padding: 15px 18px;
        border-radius: 10px;
    }
    
    .timeline-image {
        height: 180px;
    }
    
    .timeline-content::before {
        left: -20px !important;
        border-width: 10px;
    }
    
    .timeline-title {
        font-size: 1.25rem;
        margin-bottom: 8px;
    }
    
    .timeline-description {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .location-address {
        font-size: 0.9rem;
        padding: 10px;
        margin-top: 10px;
        border-left-width: 3px;
    }
    
    .history-cta {
        padding: 35px 0;
    }
    
    .cta-content {
        padding: 0 0.75rem;
    }
    
    .cta-content h2 {
        font-size: 1.5rem;
        margin-bottom: 12px;
    }
    
    .cta-content p {
        font-size: 0.9rem;
        margin-bottom: 25px;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
        gap: 12px;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

/* Extra Small Phones */
@media (max-width: 360px) {
    .history-header {
        padding: 25px 0 18px;
    }
    
    .page-title {
        font-size: 1.35rem;
        padding: 0 0.5rem;
    }
    
    .page-subtitle {
        font-size: 0.8rem;
        padding: 0 0.75rem;
    }
    
    .timeline-section {
        padding: 20px 0;
    }
    
    .timeline-line {
        left: 20px;
    }
    
    .timeline-marker {
        left: 20px;
    }
    
    .timeline-item {
        padding-left: 60px;
        margin-bottom: 18px;
    }
    
    .timeline-dot {
        width: 14px;
        height: 14px;
        border-width: 2.5px;
    }
    
    .timeline-dot-special {
        width: 16px;
        height: 16px;
        border-width: 2.5px;
    }
    
    .timeline-year {
        font-size: 0.85rem;
        padding: 4px 12px;
        min-width: 55px;
    }
    
    .timeline-content {
        padding: 12px 15px;
        border-radius: 8px;
    }
    
    .timeline-content::before {
        left: -18px !important;
        border-width: 9px;
    }
    
    .timeline-title {
        font-size: 1.15rem;
    }
    
    .timeline-description {
        font-size: 0.85rem;
    }
    
    .location-address {
        font-size: 0.85rem;
        padding: 8px;
    }
    
    .history-cta {
        padding: 30px 0;
    }
    
    .cta-content {
        padding: 0 0.5rem;
    }
    
    .cta-content h2 {
        font-size: 1.35rem;
    }
    
    .cta-content p {
        font-size: 0.85rem;
    }
    
    .btn {
        max-width: 100%;
        padding: 10px 20px;
        font-size: 0.85rem;
    }
}
