/* Base Reset and Typography */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #0f0f23;
    overflow-x: hidden;
}

/* container-models */
.container-models {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

/* Main Layout */
.api-main {
    padding-top: 70px;
    /* Header height */
}

/* ===== ONE API SECTION ===== */
.one-api-section {
    background: linear-gradient(135deg, #ffffff 0%, #c6c0c0 50%, #000000 100%);
    padding: 120px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.one-api-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at 30% 20%, rgba(255, 255, 255, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 80%, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

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

.main-title,
.sub-title,
.uptime-title {
    font-size: 4.5rem;
    font-weight: 800;
    color: #1a1a1a;
    margin-bottom: 12px;
    letter-spacing: -0.02em;
    line-height: 1.1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.main-title {
    font-size: 4.8rem;
}

.sub-title {
    font-size: 4.2rem;
}

.uptime-title {
    margin-bottom: 32px;
    font-size: 4rem;
}

.description {
    font-size: 1.35rem;
    color: #2d3748;
    margin-bottom: 48px;
    font-weight: 500;
    line-height: 1.6;
    opacity: 0.9;
}

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

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 18px 36px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cta-button.primary {
    background: #1a1a1a;
    color: white;
    border-color: #1a1a1a;
}

.cta-button.primary:hover {
    background: #000;
    border-color: #000;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
}

.cta-button.secondary {
    background: transparent;
    color: #1a1a1a;
    border-color: #1a1a1a;
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.1);
}

.cta-button.secondary:hover {
    background: #1a1a1a;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(26, 26, 26, 0.15);
}

.arrow {
    font-size: 1.2rem;
    transition: transform 0.3s ease;
}

.cta-button.primary:hover .arrow {
    transform: translateX(4px);
}

/* ===== TIMELINE SECTION ===== */
.timeline-section {
    padding: 30px 20px;
    background-color: #f8f9fa;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.timeline-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 600;
    color: #333;

}

.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e9ecef;
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    align-items: flex-start;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    top: 2rem;
    width: 20px;
    height: 20px;
    background-color: black;
    border: 3px solid #fff;
    border-radius: 50%;
    transform: translateX(-50%);
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.timeline-card {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    width: calc(50% - 3rem);
    position: relative;
    transition: all 0.4s ease;
    overflow: visible;
}

/* Card expansion animation */
.timeline-card.expanded {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: scale(1.02);
    background: #fefefe;
}

.timeline-card.right {
    margin-left: calc(50% + 3rem);
}

.timeline-card.left {
    margin-right: calc(50% + 3rem);
}

/* Card Content Wrapper */
.card-content {
    margin-bottom: 1rem;
}

.card-tags {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.tag {
    background-color: black;
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.tag.date {
    background-color: black;
}

.card-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.8rem;
}

.card-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}

/* Expandable text styling */
.expandable-text {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
    transition: all 0.4s ease;
    display: none;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
}

.timeline-card.expanded .expandable-text {
    display: inline !important;
    opacity: 1;
    max-height: 1000px;
    animation: fadeInText 0.5s ease-in-out;
}

@keyframes fadeInText {
    0% {
        opacity: 0;
        transform: translateY(-10px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Read more link styling */
.read-more {
    color: black;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    display: inline-block;
    transition: all 0.3s ease;
    padding: 6px 12px;
    border-radius: 6px;
    margin-top: 8px;
    background: linear-gradient(135deg, transparent 0%, rgba(0, 0, 0, 0.02) 100%);
    border: 1px solid transparent;
}

.read-more:hover {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.05) 0%, rgba(0, 0, 0, 0.08) 100%);
    transform: translateY(-1px);
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.read-more::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 4px;
    left: 12px;
    background: linear-gradient(90deg, black 0%, #666 100%);
    transition: width 0.3s ease;
    border-radius: 1px;
}

.read-more:hover::after {
    width: calc(100% - 24px);
}

/* Enhanced button styling for read more states */
.read-more[data-expanded="true"] {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.1) 0%, rgba(220, 20, 60, 0.05) 100%);
    color: #dc143c;
    border-color: rgba(220, 20, 60, 0.2);
}

.read-more[data-expanded="true"]:hover {
    background: linear-gradient(135deg, rgba(220, 20, 60, 0.15) 0%, rgba(220, 20, 60, 0.08) 100%);
    border-color: rgba(220, 20, 60, 0.3);
}

.read-more[data-expanded="true"]::after {
    background: linear-gradient(90deg, #dc143c 0%, #b71c1c 100%);
}

.card-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.action-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.1), transparent);
    transition: left 0.5s ease;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn:hover {
    background-color: #f8f9fa;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.action-btn svg {
    width: 24px;
    height: 24px;
    color: #666;
    transition: all 0.3s ease;
}

.action-btn:hover svg {
    color: #333;
    transform: scale(1.1);
}

.action-btn.github:hover svg {
    color: #333;
}

.action-btn.link:hover svg {
    color: #0066cc;
}

.card-button {
    margin-top: 1rem;
}

.view-dataset-btn {
    background: linear-gradient(135deg, transparent 0%, rgba(0, 0, 0, 0.02) 100%);
    border: 2px solid black;
    color: black;
    padding: 0.7rem 1.4rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
}

.view-dataset-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: black;
    transition: left 0.3s ease;
    z-index: -1;
}

.view-dataset-btn:hover::before {
    left: 0;
}

.view-dataset-btn:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.smile {
    height: 24px;
    width: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    transition: transform 0.3s ease;
}

.action-btn:hover .smile {
    transform: scale(1.2) rotate(5deg);
}

/* Enhanced Animation Styles */
[data-aos] {
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

[data-aos="fade-up"] {
    transform: translateY(40px);
}

[data-aos="slide-right"] {
    transform: translateX(-40px);
}

[data-aos="slide-left"] {
    transform: translateX(40px);
}

[data-aos].aos-animate {
    opacity: 1;
    transform: translate(0);
}

/* Add highlight effect for targeted timeline items */

.timeline-item.highlight .timeline-card {
    animation: highlightPulse 2s ease-in-out;
    border: 2px solid #00d4ff;
    box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
    }

    50% {
        transform: scale(1.03);
        box-shadow: 0 0 40px rgba(0, 212, 255, 0.6);
    }

    100% {
        transform: scale(1);
        box-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
    }
}

/* Card enhanced styling */
.timeline-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #f8f9fa, #e9ecef, #f8f9fa);
    border-radius: 14px;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.timeline-card.expanded::before {
    opacity: 1;
}

/* Dark theme body class */
.bg-theme-dark {
    background-color: #0f0f23;
    color: white;
}

/* Page specific class */
.api-page {
    min-height: 100vh;
}

/* Ensure smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Typography fixes */
h2 {
    font-size: 42px !important;
}

p {
    font-size: 16px !important;
}

/* Navigation fixes */
.nav .container {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 14px 24px !important;
    max-width: 1400px !important;
    margin: 0 auto !important;
    margin-left: 4rem !important;
}

.brand-section {
    padding-left: 6rem !important;
}

/* Loading animation for cards */
@keyframes cardSlideIn {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.timeline-card {
    animation: cardSlideIn 0.6s ease-out forwards;
}

.timeline-item:nth-child(1) .timeline-card {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(2) .timeline-card {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(3) .timeline-card {
    animation-delay: 0.3s;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .main-title {
        font-size: 4rem;
    }

    .sub-title {
        font-size: 3.5rem;
    }

    .uptime-title {
        font-size: 3.2rem;
    }

    .one-api-section {
        padding: 100px 0;
    }

    .description {
        font-size: 1.25rem;
    }

    .timeline-card {
        transform: none;
    }

    .timeline-card.expanded {
        transform: scale(1.01);
    }
}

@media (max-width: 768px) {

    /* API Section Mobile */
    .one-api-section {
        padding: 80px 0;
        min-height: 90vh;
    }

    .main-title {
        font-size: 3.2rem;
        margin-bottom: 8px;
    }

    .sub-title {
        font-size: 2.8rem;
        margin-bottom: 8px;
    }

    .uptime-title {
        font-size: 2.5rem;
        margin-bottom: 24px;
    }

    .description {
        font-size: 1.125rem;
        margin-bottom: 36px;
        padding: 0 10px;
    }

    .cta-buttons {
        flex-direction: column;
        align-items: stretch;
        gap: 16px;
        max-width: 320px;
        margin: 0 auto;
    }

    .cta-button {
        padding: 16px 28px;
        font-size: 1rem;
        justify-content: center;
    }

    /* Timeline Section Mobile */
    .timeline-section {
        padding: 60px 16px;
    }

    .timeline::before {
        left: 2rem;
    }

    .timeline-dot {
        left: 2rem;
    }

    .timeline-card {
        width: calc(100% - 5rem);
        margin-left: 5rem !important;
        margin-right: 0 !important;
        transform: none;
    }

    .timeline-card.expanded {
        transform: none;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    }

    .timeline-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .brand-section {
        padding-left: 0 !important;
    }

    .nav .container {
        margin: 0 auto !important;
    }

    .card-actions {
        flex-wrap: wrap;
        gap: 0.3rem;
    }

    .action-btn {
        padding: 0.4rem;
    }

    .action-btn svg {
        width: 20px;
        height: 20px;
    }

    .smile {
        font-size: 14px;
    }
}

@media (max-width: 480px) {

    /* API Section Mobile */
    .container-models {
        padding: 0 16px;
    }

    .one-api-section {
        padding: 60px 0;
    }

    .main-title {
        font-size: 2.5rem;
        margin-bottom: 6px;
    }

    .sub-title {
        font-size: 2.2rem;
        margin-bottom: 6px;
    }

    .uptime-title {
        font-size: 2rem;
        margin-bottom: 20px;
    }

    .description {
        font-size: 1rem;
        margin-bottom: 32px;
        padding: 0 5px;
    }

    .cta-button {
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    /* Timeline Section Mobile */
    .timeline-section {
        padding: 40px 12px;
    }

    .timeline-card {
        padding: 1rem;
        border-radius: 10px;
    }

    .timeline-card.expanded {
        padding: 1.2rem;
        border-radius: 12px;
    }

    .card-tags {
        gap: 0.3rem;
        margin-bottom: 0.8rem;
    }

    .tag {
        font-size: 0.7rem;
        padding: 0.25rem 0.6rem;
        border-radius: 15px;
    }

    .card-title {
        font-size: 1.1rem;
        margin-bottom: 0.6rem;
    }

    .card-description {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .expandable-text {
        font-size: 0.85rem;
        line-height: 1.5;
    }

    .read-more {
        font-size: 0.8rem;
        font-weight: 600;
        padding: 4px 8px;
        margin-top: 6px;
    }

    .timeline-title {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .view-dataset-btn {
        padding: 0.5rem 1rem;
        font-size: 0.8rem;
    }
}

/* Additional utility classes */
.gradient-text {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

/* Print styles */
@media print {
    .timeline-card {
        box-shadow: none;
        border: 1px solid #ddd;
        page-break-inside: avoid;
    }

    .expandable-text {
        display: inline !important;
        opacity: 1 !important;
        max-height: none !important;
    }

    .read-more {
        display: none;
    }

    .action-btn {
        display: none;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .timeline-card {
        border: 2px solid #000;
    }

    .tag {
        border: 1px solid #fff;
    }

    .read-more {
        border: 1px solid #000;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .timeline-card {
        transform: none !important;
    }

    .timeline-card.expanded {
        transform: none !important;
    }
}


.model-image{
    height: 14rem;
    width: auto;
    display: block;
    margin: 0 auto 1rem auto;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);  
}/* Wrapper for timeline item with image */
.timeline-item-wrapper {
    position: relative;
    margin-bottom: 4rem;
    display: flex;
    align-items: center;
}

.timeline-item-wrapper:last-child {
    margin-bottom: 0;
}

/* Image container positioning */
.model-image-container {
    position: absolute;
    z-index: 1;
}

.model-image-container.left-image {
    left: 0;
    right: auto;
    width: calc(50% - 4rem);
    display: flex;
    justify-content: center;
    align-items: center;
}

.model-image-container.right-image {
    right: 0;
    left: auto;
    width: calc(50% - 4rem);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Adjust timeline item to work with wrapper */
.timeline-item-wrapper .timeline-item {
    margin-bottom: 0;
    width: 100%;
}

/* Keep existing model-image styling and enhance it */
.model-image-container .model-image {
    
    width: auto;
    max-width: 100%;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.model-image-container .model-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .timeline-item-wrapper {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 3rem;
    }
    
    .model-image-container {
        position: relative;
        width: 100%;
        left: auto !important;
        right: auto !important;
        order: -1;
        justify-content: center;
    }
    
    .model-image-container .model-image {
        height: 10rem;
        max-width: 180px;
    }
}

@media (max-width: 480px) {
    .model-image-container .model-image {
        height: 8rem;
        max-width: 180px;
        margin-left: 8rem;
    }
}



