/*
 * Projects Cards - Horizontal Layout (Light Theme)
 * Based on Figma specifications for Servicios 1
 */

/* ===== SECTION CONTAINER ===== */
.projects-horizontal-figma {
    background: #FFFFFF;
    padding: 80px 0;
    position: relative;
}

.projects-horizontal-figma-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== SECTION HEADER ===== */
.projects-horizontal-figma-header {
    text-align: center;
    margin-bottom: 48px;
}

.projects-horizontal-figma-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 36px;
    font-weight: 600;
    line-height: 1.2;
    color: #1A1A1A;
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}

.projects-horizontal-figma-subtitle {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 400;
    line-height: 1.6;
    color: #6B7280;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== PROJECTS CAROUSEL CONTAINER ===== */
.projects-carousel-container {
    position: relative;
    overflow: hidden;
    padding: 0 40px;
}

.projects-carousel-wrapper {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    padding-bottom: 20px;
    -webkit-overflow-scrolling: touch;
}

/* Hide scrollbar but keep functionality */
.projects-carousel-wrapper::-webkit-scrollbar {
    height: 8px;
}

.projects-carousel-wrapper::-webkit-scrollbar-track {
    background: #F3F4F6;
    border-radius: 4px;
}

.projects-carousel-wrapper::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.projects-carousel-wrapper::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

/* ===== PROJECT CARD ===== */
.project-card-horizontal {
    flex: 0 0 300px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
    scroll-snap-align: start;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.project-card-horizontal:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: #2B69C7;
}

/* ===== PROJECT IMAGE ===== */
.project-image-container {
    position: relative;
    width: 100%;
    height: 180px;
    overflow: hidden;
    background: linear-gradient(135deg, #F8FBFF 0%, #E8F2FF 100%);
    padding: 0px;
}

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

.project-card-horizontal:hover .project-image {
    transform: scale(1.05);
}

/* Project Type Badge */
.project-type-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(43, 105, 199, 0.95);
    color: #FFFFFF;
    padding: 6px 12px;
    border-radius: 6px;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== PROJECT CONTENT ===== */
.project-content-horizontal {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.project-title-horizontal {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: #1A1A1A;
    margin: 0;
}

.project-description-horizontal {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    color: #6B7280;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Project Metrics */
.project-metrics {
    display: flex;
    gap: 16px;
    margin-top: 8px;
    padding-top: 12px;
    border-top: 1px solid #F3F4F6;
}

.project-metric {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-metric-value {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #2B69C7;
    line-height: 1;
}

.project-metric-label {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 12px;
    font-weight: 400;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ===== CAROUSEL NAVIGATION ===== */
.carousel-nav-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 2;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.carousel-nav-button:hover {
    background: #2B69C7;
    border-color: #2B69C7;
    color: #FFFFFF;
}

.carousel-nav-button.prev {
    left: 0;
}

.carousel-nav-button.next {
    right: 0;
}

.carousel-nav-button svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    stroke-width: 2;
}

/* Arrow icons using CSS */
.carousel-nav-button.prev::after {
    content: '‹';
    font-size: 24px;
    font-weight: 600;
    color: #6B7280;
}

.carousel-nav-button.next::after {
    content: '›';
    font-size: 24px;
    font-weight: 600;
    color: #6B7280;
}

.carousel-nav-button:hover::after {
    color: #FFFFFF;
}

/* ===== VIEW ALL BUTTON ===== */
.projects-horizontal-footer {
    display: flex;
    justify-content: center;
    margin-top: 48px;
}

.projects-view-all-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #2B69C7;
    color: #FFFFFF;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 16px;
    font-weight: 500;
    padding: 14px 32px;
    border-radius: 8px;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(43, 105, 199, 0.3);
}

.projects-view-all-btn:hover {
    background: #1E4A8C;
    box-shadow: 0 6px 16px rgba(43, 105, 199, 0.4);
    transform: translateY(-2px);
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop */
@media (min-width: 1200px) {
    .projects-horizontal-figma-container {
        padding: 0 40px;
    }
    
    .project-card-horizontal {
        flex: 0 0 320px;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .projects-horizontal-figma-title {
        font-size: 32px;
    }
    
    .projects-horizontal-figma-subtitle {
        font-size: 17px;
    }
    
    .project-card-horizontal {
        flex: 0 0 280px;
    }
}

/* Tablet */
@media (max-width: 1023px) {
    .projects-horizontal-figma {
        padding: 60px 0;
    }
    
    .projects-horizontal-figma-container {
        padding: 0 30px;
    }
    
    .projects-carousel-container {
        padding: 0 30px;
    }
    
    .projects-horizontal-figma-title {
        font-size: 30px;
    }
    
    .projects-horizontal-figma-subtitle {
        font-size: 16px;
    }
    
    .project-card-horizontal {
        flex: 0 0 260px;
    }
    
    .project-image-container {
        height: 160px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .projects-horizontal-figma {
        padding: 50px 0;
    }
    
    .projects-horizontal-figma-container {
        padding: 0 20px;
    }
    
    .projects-carousel-container {
        padding: 0;
    }
    
    .projects-horizontal-figma-header {
        margin-bottom: 32px;
    }
    
    .projects-horizontal-figma-title {
        font-size: 28px;
    }
    
    .projects-horizontal-figma-subtitle {
        font-size: 16px;
    }
    
    .projects-carousel-wrapper {
        gap: 16px;
        padding: 0 20px 20px;
    }
    
    .project-card-horizontal {
        flex: 0 0 280px;
    }
    
    .carousel-nav-button {
        display: none;
    }
    
    .project-content-horizontal {
        padding: 16px;
    }
    
    .project-title-horizontal {
        font-size: 16px;
    }
    
    .projects-view-all-btn {
        width: 100%;
        max-width: 300px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .projects-horizontal-figma-title {
        font-size: 24px;
    }
    
    .project-card-horizontal {
        flex: 0 0 240px;
    }
    
    .project-image-container {
        height: 140px;
    }
    
    .projects-view-all-btn {
        font-size: 15px;
        padding: 12px 28px;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    .projects-carousel-wrapper {
        scroll-behavior: auto;
    }
    
    .project-card-horizontal,
    .project-image,
    .carousel-nav-button,
    .projects-view-all-btn {
        transition: none;
    }
}

/* Focus states */
.project-card-horizontal:focus,
.carousel-nav-button:focus,
.projects-view-all-btn:focus {
    outline: 2px solid #22D3EE;
    outline-offset: 2px;
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .project-card-horizontal {
        border: 2px solid #1A1A1A;
    }
    
    .project-card-horizontal:hover {
        border-color: #2B69C7;
    }
    
    .project-title-horizontal {
        color: #000000;
    }
    
    .project-description-horizontal {
        color: #333333;
    }
}