/* History Page Styles - sphistory- prefix */

/* Section Container */
.sphistory-section {
    position: relative;
    padding: 0 0 90px 0;
    overflow: hidden;
    isolation: isolate;
}

@media (max-width: 1536px) {
    .sphistory-section {
        padding: 0 0 80px 0;
    }
}

@media (max-width: 1024px) {
    .sphistory-section {
        padding: 0 0 60px 0;
    }
}

@media (max-width: 768px) {
    .sphistory-section {
        padding: 0 0 30px 0;
    }
}

/* Top Line */
.sphistory-top-line {
    position: absolute;
    top: 22.3%;
    left: 0;
    width: calc(100% - 1620px);
    height: 1.5px;
    background-color: #E4E4E3;
    z-index: -1;
    pointer-events: none;
}

@media (max-width: 1536px) {
    .sphistory-top-line {
        display: none;
    }
}

@media (max-width: 640px) {
    .sphistory-top-line {
        display: none;
    }
}

/* Container */
.sphistory-container {
    max-width: 1680px;
    margin: 0 auto;
    padding: 0 30px;
}

/* Title */
.sphistory-title {
    font-size: 24px;
    color: #000;
    padding-bottom: 20px;
}

@media (max-width: 1536px) {
    .sphistory-title {
        font-size: 22px;
    }
}

@media (max-width: 1024px) {
    .sphistory-title {
        font-size: 20px;
    }
}

@media (max-width: 640px) {
    .sphistory-title {
        padding-bottom: 0;
    }
}

/* Wrapper */
.sphistory-wrapper {
    display: flex;
    flex-direction: column;
    gap: 110px;
}

@media (max-width: 1536px) {
    .sphistory-wrapper {
        gap: 100px;
    }
}

@media (max-width: 1280px) {
    .sphistory-wrapper {
        gap: 90px;
    }
}

@media (max-width: 1024px) {
    .sphistory-wrapper {
        gap: 60px;
    }
}

@media (max-width: 768px) {
    .sphistory-wrapper {
        gap: 30px;
    }
}

/* History Swiper Container */
.sphistory-swiper {
    position: relative;
    padding: 30px 0;
}

.sphistory-swiper-line {
    position: absolute;
    bottom: 30px;
    left: 0;
    width: 100vw;
    height: 1px;
    background-color: #E4E4E3;
    z-index: -1;
    pointer-events: none;
}

/* Year Slide Item */
.sphistory-year-item {
    display: flex;
    padding-bottom: 50px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 120px;
    font-weight: bold;
    color: rgba(6, 70, 141, 0.1);
    background: linear-gradient(to bottom, #c80b0f, #c80b0f 50%, #F5F7F8 50%);
    -webkit-background-clip: text;
    background-clip: text;
    background-size: 100% 200%;
    background-position: 100% 100%;
    transition: background-position 700ms;
    line-height: 140px;
    letter-spacing: -4px;
    position: relative;
}

.sphistory-year-item::before {
    content: '';
    position: absolute;
    bottom: -9px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 20px;
    z-index: 10;
    background-color: #E4E4E3;
    border-radius: 50%;
    transition: background-color 450ms;
}

.sphistory-year-item::after {
    content: '';
    position: absolute;
    bottom: -19px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 40px;
    background-color: #fff;
    border: 2px solid transparent;
    transform: translateX(-50%) scale(0);
    transition: transform 450ms, border-color 450ms;
    border-radius: 50%;
}

/* Active Year Item */
.swiper-slide-active .sphistory-year-item {
    background-position: 100% 0%;
}

.swiper-slide-active .sphistory-year-item::before {
    background-color: #c80b0f;
}

.swiper-slide-active .sphistory-year-item::after {
    transform: translateX(-50%) scale(1);
    border-color: #c80b0f;
}

@media (max-width: 1536px) {
    .sphistory-year-item {
        font-size: 100px;
        line-height: 110px;
    }
}

@media (max-width: 1280px) {
    .sphistory-year-item {
        font-size: 80px;
        line-height: 90px;
    }
}

@media (max-width: 1024px) {
    .sphistory-year-item {
        font-size: 60px;
        line-height: 60px;
        letter-spacing: -2px;
    }
}

@media (max-width: 768px) {
    .sphistory-year-item {
        font-size: 40px;
        line-height: 40px;
        padding-bottom: 30px;
        white-space: nowrap;
    }
}

@media (max-width: 640px) {
    .sphistory-year-item {
        font-size: 30px;
        line-height: 30px;
        letter-spacing: -1px;
    }
}

@media (min-width: 768px) {
    .sphistory-year-item {
        white-space: nowrap;
    }
}

/* Hidden slides on mobile */
@media (max-width: 640px) {
    .sphistory-year-slide-hidden {
        display: none !important;
    }
}

/* Navigation Container */
.sphistory-nav-wrapper {
    position: relative;
}

@media (min-width: 768px) {
    .sphistory-nav-wrapper {
        cursor: none;
    }
}

.sphistory-nav-buttons {
    display: flex;
    align-items: center;
    gap: 20px;
    position: absolute;
    bottom: 30px;
    left: 30px;
    z-index: 20;
    pointer-events: auto;
}

@media (max-width: 768px) {
    .sphistory-nav-buttons {
        bottom: 0;
        left: 0px;
    }
}

@media (min-width: 640px) {
    .sphistory-nav-buttons {
        left: 0px;
    }
}

@media (max-width: 640px) {
    .sphistory-nav-buttons {
        position: relative;
        padding-bottom: 30px;
        justify-content: center;
    }
}

/* Navigation Button */
.sphistory-nav-button {
    pointer-events: auto;
    transition: opacity 450ms;
}

.sphistory-nav-button.swiper-button-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.sphistory-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    position: relative;
}

@media (max-width: 768px) {
    .sphistory-nav-icon {
        width: 40px;
        height: 40px;
    }
}

.sphistory-nav-icon-inner {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.sphistory-nav-icon svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    border: 1px solid rgba(0, 0, 0, 0.3);
    border-radius: 50%;
}

.sphistory-nav-icon svg path {
    stroke-width: 2;
}

.sphistory-nav-icon i.fa-light {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #000;
    font-size: 16px;
    transition: all 500ms;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sphistory-nav-icon .circle {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.sphistory-nav-icon .circle svg {
    stroke: var(--primary-color, #c80b0f);
}

.sphistory-nav-icon .circle svg path {
    stroke: var(--primary-color, #c80b0f);
}

/* Cursor history animation for navigation buttons */
.cursor-history {
    stroke: var(--primary-color, #c80b0f);
}

.cursor-history path {
    stroke: var(--primary-color, #c80b0f);
}

@media (min-width: 768px) {
    .sphistory-nav-icon .circle svg {
        stroke-dasharray: 240px 200px;
        stroke-dashoffset: 240px;
        transition: all 5s;
    }
    
    .cursor-history path {
        stroke-dasharray: 240px 200px;
        stroke-dashoffset: 240px;
        transition: stroke-dasharray 1s, stroke-dashoffset 1s;
    }
}

/* Following Cursor */
.sphistory-following-cursor {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 20;
    pointer-events: none;
}

@media (max-width: 768px) {
    .sphistory-following-cursor {
        display: none;
    }
}

.sphistory-cursor-field {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: scale(0);
}

.sphistory-cursor-field svg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% + 6px);
    height: calc(100% + 6px);
    border: 2px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    z-index: 20;
}

.sphistory-cursor-field svg path {
    stroke: var(--primary-600, #c80b0f);
    stroke-width: 2;
}

@media (min-width: 768px) {
    .sphistory-cursor-field svg {
        stroke-dasharray: 240px 200px;
        stroke-dashoffset: 240px;
        transition: all 5s;
    }
}

.sphistory-cursor-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    backdrop-filter: blur(10px);
    background-color: rgba(0, 0, 0, 0.1);
    width: 100px;
    height: 100px;
    border-radius: 50%;
    z-index: 10;
}

@media (max-width: 768px) {
    .sphistory-cursor-content {
        gap: 7px;
        width: 80px;
        height: 80px;
    }
}

.sphistory-cursor-text {
    font-size: 14px;
    color: #fff;
}

/* History Text Swiper */
.sphistory-text-swiper {
    overflow: hidden;
    isolation: isolate;
}

/* Content Grid */
.sphistory-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    align-items: center;
    gap: 150px;
    margin: 0 auto;
}

@media (max-width: 1536px) {
    .sphistory-content-grid {
        gap: 120px;
    }
}

@media (max-width: 1280px) {
    .sphistory-content-grid {
        gap: 100px;
    }
}

@media (max-width: 1024px) {
    .sphistory-content-grid {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 80px;
        align-items: flex-start;
    }
}

@media (max-width: 768px) {
    .sphistory-content-grid {
        gap: 40px;
    }
}

@media (max-width: 640px) {
    .sphistory-content-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Text Description */
@media (max-width: 640px) {
    .sphistory-text-desc {
        order: 2;
    }
}

.sphistory-text-editor {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sphistory-text-editor h2 {
    color: #000;
    font-size: 48px;
    line-height: 64px;
    transform: skewX(6deg) translateY(50px);
    opacity: 0;
    transition: opacity 450ms, transform 450ms;
}

.sphistory-text-editor p {
    font-size: 20px;
    max-width: 656px;
    opacity: 0;
    color: rgba(10, 13, 29, 0.65);
    line-height: 30px;
    transform: skewX(6deg) translateY(50px);
    transition: opacity 450ms, transform 450ms;
}

/* Active slide animations */
.swiper-slide-active .sphistory-text-editor h2 {
    opacity: 1;
    transform: skewX(0deg) translateY(0);
    transition-delay: 600ms;
}

.swiper-slide-active .sphistory-text-editor p {
    opacity: 1;
    transform: skewX(0deg) translateY(0);
    transition-delay: 750ms;
}

@media (max-width: 1280px) {
    .sphistory-text-editor h2 {
        line-height: 45px;
    }
}

@media (max-width: 768px) {
    .sphistory-text-editor {
        gap: 20px;
    }
    
    .sphistory-text-editor h2 {
        line-height: 32px;
        transform: skewX(6deg) translateY(20px);
        font-size: 20px;
    }
    
    .sphistory-text-editor p {
        font-size: 14px;
        transform: skewX(6deg) translateY(20px);
    }
}

@media (max-width: 640px) {
    .sphistory-text-editor {
        gap: 15px;
    }
    
    .sphistory-text-editor h2 {
        transform: skewX(6deg) translateY(20px);
    }
    
    .sphistory-text-editor p {
        font-size: 14px;
        line-height: 25px;
        transform: skewX(6deg) translateY(20px);
    }
    
    .swiper-slide-active .sphistory-text-editor h2 {
        transform: skewX(0deg) translateY(0);
    }
    
    .swiper-slide-active .sphistory-text-editor p {
        transform: skewX(0deg) translateY(0);
    }
}

/* Image Description */
@media (max-width: 640px) {
    .sphistory-image-desc {
        order: 1;
    }
}

.sphistory-image {
    width: 100%;
    height: 530px;
    overflow: hidden;
    border-radius: 12px;
}

@media (max-width: 1024px) {
    .sphistory-image {
        height: 450px;
    }
}

@media (max-width: 768px) {
    .sphistory-image {
        height: 400px;
    }
}

@media (max-width: 640px) {
    .sphistory-image {
        height: 350px;
    }
}

@media (max-width: 480px) {
    .sphistory-image {
        height: 300px;
    }
}

.sphistory-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Utility Classes */
.sphistory-absolute-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Full cover image utility */
.full-cover {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.rounded-12 {
    border-radius: 12px;
}

