/**
 * Home Page CSS
 * Ficheiro: home.css
 * Localização: /wp-content/themes/blocksy-child/assets/css/home.css
 */

/* Hero Section */
.home-hero {
    position: relative;
    min-height: 600px;
    display: flex;
    align-items: center;
    overflow: hidden;
    width: 100%;
}

.home-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center bottom;
    background-repeat: no-repeat;
    z-index: 0;
}

.home-hero-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0.85) 0%, rgba(255,255,255,0.75) 40%, rgba(255,255,255,0.1) 100%);
}

.home-hero .category-banner {
    position: relative;
    z-index: 1;
    background: transparent;
    padding: 120px 0 60px;
    margin-bottom: 0;
    width: 100%;
}

.home-hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto auto;
    gap: 30px 80px;
}

.home-hero .category-banner-title {
    grid-column: 1;
    grid-row: 1;
    font-size: 56px;
    font-weight: 400;
    color: var(--theme-palette-color-1);
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.home-hero-intro {
    grid-column: 2;
    grid-row: 2;
    color: var(--theme-palette-color-1);
    font-size: 16px;
    line-height: 1.8;
}

.home-hero-intro p {
    margin: 0 0 10px 0;
}

.home-hero-intro p:last-child {
    margin-bottom: 0;
}

.home-hero-button {
    grid-column: 1 / -1;
    grid-row: 3;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 25px;
    background: transparent;
    border: 2px solid var(--theme-palette-color-2);
    color: var(--theme-palette-color-1);
    text-decoration: none;
    border-radius: 20px;
    font-size: 16px;
    font-weight: 300;
    transition: all 0.3s ease;
    justify-self: center;
    margin-top: 60px;
}

.home-hero-button:hover {
    background: var(--theme-palette-color-2);
    color: var(--theme-palette-color-1);
}

.home-hero-button svg {
    transition: transform 0.3s ease;
    width: 18px;
    height: 18px;
}

.home-hero-button:hover svg {
    transform: translateX(3px);
}

/* Descrição da empresa */
.home-description {
    padding: 160px 0 80px;
    background: var(--theme-palette-color-8);
}

.home-description-content {
    margin: 0 auto;
    text-align: left;
    font-size: 16px;
    line-height: 1.8;
    color: var(--theme-palette-color-1);
}

.home-description-content p {
    margin: 0 0 15px 0;
}

/* Soluções */
.home-solucoes {
    padding: 80px 0;
    background: var(--theme-palette-color-8);
}

.home-solucoes-header {
    margin-bottom: 60px;
}

.home-solucoes-title {
    font-size: 42px;
    font-weight: 400;
    color: var(--theme-palette-color-1);
    margin: 0 0 20px 0;
    letter-spacing: -0.01em;
}

.home-solucoes-subtitle {
    font-size: 18px;
    line-height: 1.6;
    color: var(--theme-palette-color-2);
    margin: 0;
}

.home-solucoes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Card de solução */
.solucao-card {
    background: #F5F5F5;
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.4s ease;
    cursor: pointer;
    position: relative;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    min-height: 450px;
}

.solucao-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

/* Imagem de hover (background) */
.solucao-image-hover {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 0.6s ease;
    z-index: 0;
}

.solucao-card:hover .solucao-image-hover {
    opacity: 1;
}

/* Overlay escuro no hover */
.solucao-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    z-index: 1;
    transition: background 0.6s ease;
}

.solucao-card:hover::before {
    background: rgba(0, 0, 0, 0.5);
}

.solucao-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 1;
}

.solucao-icon {
    width: 60px;
    height: 60px;
    transition: opacity 0.4s ease;
}

.solucao-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.solucao-card:hover .solucao-icon {
    opacity: 0;
}

.solucao-title {
    font-size: 42px;
    font-weight: 400;
    color: var(--theme-palette-color-1);
    margin: 0;
    letter-spacing: -0.01em;
    transition: opacity 0.4s ease;
}

.solucao-card:hover .solucao-title {
    opacity: 0;
}

.solucao-description {
    font-size: 15px;
    line-height: 1.7;
    color: #666;
    margin: 0;
    flex: 1;
    transition: opacity 0.4s ease;
}

.solucao-card:hover .solucao-description {
    opacity: 0;
}

.solucao-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--theme-palette-color-1);
    text-decoration: none;
    font-size: 16px;
    font-weight: 300;
    transition: all 0.3s ease;
    align-self: flex-start;
    padding: 10px 20px;
    border-radius: 10px;
    background: transparent;
    border-bottom: 2px solid var(--theme-palette-color-2);
    padding-bottom: 8px;
}

.solucao-card:hover .solucao-link {
    background: var(--theme-palette-color-2);
    color: var(--theme-palette-color-1);
    gap: 12px;
    border-bottom: 2px solid var(--theme-palette-color-2);
}

.solucao-link svg {
    transition: transform 0.3s ease;
}

.solucao-link:hover svg {
    transform: translateX(3px);
}

/* Slider */
.home-slider {
    background: var(--theme-palette-color-1);
    padding: 80px 0;
    overflow: hidden;
}

.home-slider-container {
    position: relative;
    max-width: 1290px;
    margin: 0 auto;
    padding: 60px 100px;
}

.home-slider-viewport {
    overflow: hidden;
    position: relative;
}

.home-slider-wrapper {
    display: flex;
    transition: transform 0.5s ease;
    gap: 0;
    width: auto;
    flex-wrap: nowrap;
}

.home-slide {
    flex: 0 0 auto;
    width: calc(33.333333%);
    padding: 0 50px;
    color: var(--theme-palette-color-8);
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    position: relative;
}

.home-slide::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 1px;
    background: rgba(255, 255, 255, 0.15);
}

.home-slide:first-child::before {
    display: none;
}

.home-slide-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.home-slide-title {
    font-size: 24px;
    font-weight: 400;
    margin: 0;
    color: var(--theme-palette-color-8);
    line-height: 1.3;
    transition: color 0.3s ease;
}

.home-slide:hover .home-slide-title {
    color: var(--theme-palette-color-2);
}

.home-slide-description {
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
    flex: 1;
    color: rgba(255, 255, 255, 0.75);
    transition: color 0.3s ease;
}

.home-slide:hover .home-slide-description {
    color: rgba(255, 255, 255, 1);
}

.home-slide-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--theme-palette-color-8);
    text-decoration: none;
    font-size: 14px;
    font-weight: 400;
    transition: all 0.3s ease;
    align-self: flex-start;
    border-bottom: 1px solid transparent;
    padding-bottom: 3px;
}

.home-slide:hover .home-slide-title {
    color: var(--theme-palette-color-2);
}

.home-slide:hover .home-slide-description {
    color: rgba(255, 255, 255, 1);
}

.home-slide-link:hover,
.home-slide:hover .home-slide-link {
    border-bottom-color: var(--theme-palette-color-2);
    gap: 12px;
}

.home-slide-link svg {
    transition: transform 0.3s ease;
}

.home-slide-link:hover svg {
    transform: translateX(3px);
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    z-index: 10;
    padding: 0;
}

.slider-nav img {
    width: 40px;
    height: 40px;
    transition: opacity 0.3s ease;
}

.slider-nav:hover img {
    opacity: 0.7;
}

.slider-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.slider-prev {
    left: 30px;
}

.slider-next {
    right: 30px;
}

/* Responsive */
@media (max-width: 1024px) {
    .home-hero-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .home-hero .category-banner-title {
        font-size: 42px;
        grid-column: 1;
        grid-row: auto;
    }
    
    .home-hero-intro {
        grid-column: 1;
        grid-row: auto;
    }
    
    .home-hero-button {
        grid-column: 1;
    }
    
    .home-solucoes-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .home-slider-container {
        padding: 60px;
    }
    
    .home-slide {
        width: calc(50%);
        padding: 50px 30px;
    }
    
    .home-slide:nth-child(2n+1)::before {
        display: none;
    }
    
    .home-slide:nth-child(2n)::before {
        display: block;
    }
    
    .slider-prev {
        left: 20px;
    }
    
    .slider-next {
        right: 20px;
    }
}

@media (max-width: 768px) {
    .home-hero {
        min-height: 60vh;
    }
    
    .home-hero .category-banner {
        padding: 80px 0 40px;
    }
    
    .home-hero .category-banner-title {
        font-size: 36px;
    }
    
    .home-description {
        padding: 60px 0;
    }
    
    .home-solucoes {
        padding: 60px 0;
    }
    
    .home-solucoes-title {
        font-size: 32px;
    }
    
    .home-slider {
        padding: 60px 0;
    }
    
    .home-slider-container {
        padding: 50px;
    }
    
    .home-slide {
        width: calc(100%);
        padding: 40px 20px;
    }
    
    .home-slide::before {
        display: none;
    }
    
    .home-slide-title {
        font-size: 20px;
    }
    
    .slider-prev {
        left: 10px;
    }
    
    .slider-next {
        right: 10px;
    }
    
    .slider-nav img {
        width: 30px;
        height: 30px;
    }
}

@media (max-width: 480px) {
    .home-hero .category-banner-title {
        font-size: 28px;
    }
    
    .solucao-image {
        height: 250px;
    }
    
    .home-slider-container {
        padding: 40px;
    }
    
    .home-slide {
        width: calc(100%);
        padding: 30px 15px;
    }
    
    .home-slide-title {
        font-size: 18px;
    }
    
    .home-slide-description {
        font-size: 13px;
    }
    
    .slider-nav {
        width: 40px;
        height: 40px;
        font-size: 24px;
    }
}