/**
 * Front Page Styles
 * MyPlanet Design Theme
 */

/* Social Links - Dribbble/Behance */
.social-link-dribbble i {
  background-color: transparent;
  color: white;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.social-link-dribbble:hover i {
  background-color: white;
  color: black;
}

/* Project Card Hover Effects */
.project-card-container:hover .project-image {
    transform: scale(1.08) !important;
}

.project-image {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1) !important;
    will-change: transform;
    display: block;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    transform: translateZ(0) scale(1) !important;
}

/* Project Image Container with Overlays */
.project-image-container {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.project-image-container::before,
.project-image-container::after {
    content: '';
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 50px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    transition: transform 0.4s ease-out;
    z-index: 10;
    pointer-events: none;
}

.project-image-container::before {
    top: 0;
    background-image: url('../images/overlay-top.webp');
    transform: translateX(-50%) translateY(-100%);
}

.project-image-container::after {
    bottom: 0;
    background-image: url('../images/overlay-bottom.webp');
    transform: translateX(-50%) translateY(100%);
}

.project-card-container:hover .project-image-container::before {
    transform: translateX(-50%) translateY(0);
}

.project-card-container:hover .project-image-container::after {
    transform: translateX(-50%) translateY(0);
}

/* Partner Logo Cards */
.partner-logo-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border-color: rgba(0, 0, 0, 0.08) !important;
    position: relative;
    overflow: hidden;
    background-color: transparent;
}

/* Dark gray fill overlay that appears on hover */
.partner-logo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #2A2A2A;
    opacity: 0;
    transition: opacity 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 1;
}

.partner-logo-card:hover::before {
    opacity: 1;
}

.partner-logo-card img {
    opacity: 0.35;
    filter: grayscale(100%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
    object-fit: contain;
    width: 100%;
    height: 100%;
    position: relative;
    z-index: 2;
}

/* Adaptive sizing based on aspect ratio */
.partner-logo-card img[style*="aspect-ratio"] {
    width: auto;
    height: auto;
}

/* For taller/square logos - reduce size */
.partner-logo-card img {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.partner-logo-card:hover {
    border-color: rgba(0, 0, 0, 0.3) !important;
    transform: translateY(-2px);
}

.partner-logo-card:hover img {
    opacity: 1 !important;
    filter: brightness(0) invert(1) !important;
    transform: scale(1.08);
}

/* Subtle animation on grid hover - make non-hovered dimmer */
.partners-grid:hover .partner-logo-card:not(:hover) img {
    opacity: 0.2 !important;
}

/* Specific sizing for different aspect ratios */
.partner-logo-card img.logo-wide {
    max-width: 220px;
    max-height: none;
    height: auto;
}

.partner-logo-card img.logo-square,
.partner-logo-card img.logo-tall {
    max-width: 132px;
    max-height: 68px;
}

/* Blog Section Layout */
.blog-title-column {
    flex: 0 0 100%;
}

.blog-content-column {
    flex: 0 0 100%;
}

@media (min-width: 1024px) {
    .blog-title-column {
        flex: 0 0 30%;
        max-width: 30%;
    }

    .blog-content-column {
        flex: 0 0 70%;
        max-width: 70%;
    }
}

.blog-sticky-title {
    position: sticky !important;
    top: 6rem !important;
    z-index: 10 !important;
    transition: all 0.3s ease;
}

/* Mobile and tablet responsive adjustments only */
@media (max-width: 1023px) {
    .blog-sticky-title {
        position: relative !important;
        background: transparent;
        box-shadow: none;
        backdrop-filter: none;
        padding: 0;
        top: 0 !important;
    }

    .blog-home-container {
        flex-direction: column !important;
    }

    .homepage-block-10 {
        min-height: auto !important;
        padding: 2rem 0 !important;
    }

    .blog-content-column {
        min-height: auto !important;
    }

    .blog-title-column h2 {
        font-size: 2.5rem !important;
        line-height: 1.1 !important;
        margin-bottom: 2rem !important;
    }
}

@media (max-width: 767px) {
    .homepage-block-10 {
        padding: 1.5rem 0 !important;
    }

    .blog-title-column {
        margin-bottom: 2rem !important;
    }

    .blog-title-column h2 {
        font-size: 2rem !important;
        margin-bottom: 1.5rem !important;
    }

    .blog-article {
        padding-bottom: 1.5rem !important;
        margin-bottom: 1.5rem !important;
    }

    .blog-article:last-child {
        padding-bottom: 0 !important;
        margin-bottom: 0 !important;
    }

    .blog-article h3 {
        font-size: 1.25rem !important;
        margin-bottom: 0.75rem !important;
    }

    .blog-article p {
        font-size: 0.875rem !important;
        margin-bottom: 1rem !important;
    }
}

@media (max-width: 639px) {
    .blog-title-column h2 {
        font-size: 1.75rem !important;
    }
}
