/**
 * Tainacan Explorer Pro - Frontend Styles
 */

/* ========== GERAL ========== */
.tep-container {
    max-width: 100%;
    margin: 0 auto;
}

.tep-timeline-container,
.tep-story-container {
    position: relative;
    width: 100%;
    min-height: 600px;
    background: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

.tep-error,
.tep-empty {
    padding: 20px;
    background: #fee;
    border: 2px solid #c33;
    color: #c33;
    margin: 20px;
    border-radius: 4px;
    text-align: center;
}

/* ========== TIMELINE ========== */
.tep-timeline-wrapper {
    width: 100%;
    height: 100%;
    overflow-y: auto;
}

.tep-timeline-list {
    padding: 40px 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.tep-timeline-item {
    position: relative;
    margin-bottom: 50px;
    padding: 30px;
    background: #fff;
    border-left: 5px solid #3b82f6;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.tep-timeline-item:hover {
    transform: translateX(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

.tep-timeline-date {
    display: inline-block;
    background: #3b82f6;
    color: #fff;
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 14px;
    margin-bottom: 15px;
}

.tep-timeline-title {
    margin: 15px 0;
    font-size: 24px;
    color: #222;
}

.tep-timeline-title a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.3s;
}

.tep-timeline-title a:hover {
    color: #2563eb;
    text-decoration: underline;
}

.tep-timeline-image {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin: 15px 0;
}

.tep-timeline-description {
    margin: 15px 0 0;
    font-size: 16px;
    line-height: 1.7;
    color: #555;
}

/* ========== STORY ========== */
.tep-story-wrapper {
    width: 100%;
    min-height: 100vh;
    position: relative;
    background: #1a1a1a;
}

.tep-story-slides {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

.tep-story-slide {
    width: 100%;
    min-height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 40px 20px 120px;
    box-sizing: border-box;
    animation: fadeIn 0.5s ease-in-out;
}

.tep-story-slide.active {
    display: flex;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.tep-story-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.tep-story-bg:after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.3), rgba(0,0,0,0.7));
}

.tep-story-content {
    position: relative;
    z-index: 2;
    max-width: 900px;
    width: 100%;
    background: rgba(255,255,255,0.98);
    padding: 50px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.tep-story-title {
    margin: 0 0 25px;
    font-size: 36px;
    color: #222;
    line-height: 1.3;
    font-weight: 700;
}

.tep-story-title a {
    color: #3b82f6;
    text-decoration: none;
    transition: color 0.3s;
}

.tep-story-title a:hover {
    color: #2563eb;
}

.tep-story-text {
    font-size: 18px;
    line-height: 1.8;
    color: #444;
    margin-bottom: 15px;
}

.tep-story-image {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 25px;
}

.tep-story-nav {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 25px;
    background: rgba(255,255,255,0.95);
    padding: 18px 35px;
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.tep-nav-prev,
.tep-nav-next {
    padding: 12px 28px;
    border: none;
    background: #3b82f6;
    color: #fff;
    border-radius: 30px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(59,130,246,0.3);
}

.tep-nav-prev:hover:not(:disabled),
.tep-nav-next:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59,130,246,0.4);
}

.tep-nav-prev:disabled,
.tep-nav-next:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.tep-nav-counter {
    font-weight: 700;
    color: #333;
    font-size: 16px;
}

/* ========== READ MORE ========== */
.tep-read-more {
    display: inline-block;
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    margin-top: 10px;
    transition: color 0.3s;
}

.tep-read-more:hover {
    color: #2563eb;
    text-decoration: underline;
}

/* ========== MODAL ========== */
.tep-modal {
    display: none;
    position: fixed;
    z-index: 99999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    animation: fadeInModal 0.3s ease-in-out;
}

.tep-modal.active {
    display: flex;
    align-items: center;
    justify-content: center;
}

@keyframes fadeInModal {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.tep-modal-content {
    position: relative;
    background: #fff;
    border-radius: 12px;
    max-width: 90%;
    max-height: 90%;
    width: 1200px;
    padding: 0;
    box-shadow: 0 10px 50px rgba(0,0,0,0.5);
    animation: slideUpModal 0.3s ease-in-out;
}

@keyframes slideUpModal {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.tep-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: #fff;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
    transition: all 0.3s;
    z-index: 1;
}

.tep-modal-close:hover {
    background: #f0f0f0;
    transform: rotate(90deg);
}

.tep-modal iframe {
    width: 100%;
    height: 80vh;
    border: none;
    border-radius: 12px;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .tep-story-content {
        padding: 30px;
        max-width: 95%;
    }
    
    .tep-story-title {
        font-size: 26px;
    }
    
    .tep-story-text {
        font-size: 16px;
    }
    
    .tep-story-nav {
        padding: 12px 20px;
        gap: 15px;
    }
    
    .tep-nav-prev,
    .tep-nav-next {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .tep-timeline-list {
        padding: 20px 10px;
    }
    
    .tep-timeline-item {
        padding: 20px;
    }
    
    .tep-timeline-title {
        font-size: 20px;
    }
}
