/* Landing Page Custom Styles */

/* --- GENERAL SECTIONS --- */
.landing-section {
    padding: 120px 5%;
    position: relative;
    overflow: hidden;
}

.landing-section.dark-alt {
    background: linear-gradient(to bottom, #020617, #010205);
}

.intro-anim-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    margin-bottom: 80px;
    min-height: 150px;
    z-index: 5;
    position: relative;
}

.anim-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    opacity: 0;
    transform: translateY(30px);
}

.anim-icon {
    font-size: 3rem;
    color: var(--primary);
    background: rgba(0, 90, 141, 0.08);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    box-shadow: 0 0 0 0 rgba(0, 90, 141, 0.25);
}

.anim-step.active .anim-icon {
    background: rgba(0, 90, 141, 0.18);
    border-color: var(--primary);
    box-shadow: 0 0 25px rgba(0, 90, 141, 0.35);
}

.anim-connector {
    width: 80px;
    height: 2px;
    background: var(--border);
    position: relative;
}

.anim-connector::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--primary);
    transform: translateY(-50%);
    box-shadow: 0 0 8px var(--primary);
}

.anim-connector.active::after {
    width: 100%;
    transition: width 0.6s ease;
}

.anim-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.95rem;
    color: var(--text-light);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- MAGAZINE SECTION (Single Hero Image) --- */
.mag-showcase {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 60px;
    align-items: center;
    max-width: 1300px;
    margin: 0 auto;
    opacity: 0;
}

.mag-image-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6);
}

.mag-image-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.8s cubic-bezier(0.2, 0, 0.2, 1);
}

.mag-image-container:hover img {
    transform: scale(1.03);
}

.mag-content h3 {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: white;
    font-weight: 800;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.mag-content p {
    color: var(--text-light);
    font-size: 1.15rem;
    line-height: 1.7;
    margin-bottom: 35px;
}

/* --- AGENT SECTION (Pinterest/Masonry Grid) --- */
.gallery-wrapper {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 800px;
}

.pinterest-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
    opacity: 0;
    max-width: 1400px;
    margin: 0 auto;
}

.pin-item {
    position: relative;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    background: #000;
    transition: all 0.7s cubic-bezier(0.23, 1, 0.32, 1);
    flex: 1 1 calc(33.333% - 20px);
    height: 420px;
    /* Fixed height for symmetry */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
    cursor: default;
}

/* Base state for all items when someone is hovered */
.pinterest-grid:has(.pin-item:hover) .pin-item:not(:hover) {
    flex: 1 1 calc(25% - 20px);
    opacity: 0.5;
    filter: grayscale(100%) blur(4px);
    transform: scale(0.96);
}

/* Expansion state for the hovered item */
.pin-item:hover {
    flex: 1 1 calc(50% - 20px);
    transform: scale(1.02);
    z-index: 100;
    box-shadow: 0 40px 80px rgba(0, 90, 141, 0.45);
    border-color: var(--primary);
    opacity: 1 !important;
    filter: none !important;
}

.pin-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    filter: contrast(1.1);
    transition: all 0.8s cubic-bezier(0.23, 1, 0.32, 1);
}

.pin-item:hover img {
    transform: scale(1.1) translateY(-10%);
    /* Shift up to show content */
}

/* Feature last item to fill potential gaps */
.pin-item:last-child {
    flex-grow: 2;
}

/* Re-designed Bottom-Anchored Description */
.pin-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    background: linear-gradient(to top,
            rgba(2, 4, 10, 0.95) 0%,
            rgba(2, 4, 10, 0.8) 50%,
            transparent 100%);
    text-align: left;
    opacity: 0;
    transform: translateY(100%);
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    z-index: 10;
    pointer-events: none;
}

.pin-item:hover .pin-info {
    opacity: 1;
    transform: translateY(0);
}

.pin-info h4 {
    font-size: 1.6rem;
    color: white;
    margin-bottom: 12px;
    font-weight: 800;
    background: linear-gradient(to right, #fff, var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pin-info p {
    font-size: 0.95rem;
    color: #cbd5e1;
    line-height: 1.6;
    font-weight: 400;
    max-width: 95%;
}

/* Cleaning up old Lightbox artifacts */
.step-badge,
.lightbox-modal,
.gallery-focus-overlay {
    display: none !important;
}

/* Responsive adjustments */
@media (max-width: 1024px) {
    .pin-item {
        flex: 1 1 calc(50% - 20px);
        height: 350px;
    }
}

@media (max-width: 640px) {
    .pin-item {
        flex: 1 1 100%;
        height: 300px;
    }
}

/* --- LIGHTBOX MODAL ENHANCEMENTS (KEEP AS PLACEHOLDER) --- */
.lightbox-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 10001;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
}

.lightbox-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 95%;
    width: 1200px;
    height: 80vh;
    display: flex;
    gap: 0;
    background: #020617;
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 50px 100px rgba(0, 0, 0, 0.8);
}

.lightbox-img-wrapper {
    flex: 1.5;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-img-wrapper img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.lightbox-details {
    flex: 1;
    padding: 60px 40px;
    background: #0f172a;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
}

.lightbox-details::before {
    content: "DETAIL VIEW";
    position: absolute;
    top: 40px;
    left: 40px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    color: var(--primary);
    opacity: 0.6;
    letter-spacing: 4px;
}

.lightbox-details h3 {
    font-size: 2.8rem;
    color: white;
    margin-bottom: 25px;
    font-weight: 800;
}

.lightbox-details p {
    color: #94a3b8;
    line-height: 1.8;
    font-size: 1.2rem;
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-close:hover {
    background: #ef4444;
    transform: rotate(90deg);
}

/* Responsive */
@media (max-width: 1024px) {
    .lightbox-content {
        flex-direction: column;
        width: 90%;
        height: auto;
        max-height: 90vh;
    }

    .lightbox-details h3 {
        font-size: 1.8rem;
    }

    .mag-showcase {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .pinterest-grid {
        column-count: 2;
    }

    .anim-connector {
        display: none;
    }

    .intro-anim-container {
        gap: 20px;
        flex-direction: row;
    }
}

@media (max-width: 480px) {
    .pinterest-grid {
        column-count: 1;
    }
}