/**
 * Location Contact Block - Frontend Styles
 */

.wp-block-portal-loc-re-contact {
    padding: 4rem 0;
    background: linear-gradient(135deg, var(--loc-re-text-dark, #1f2937) 0%, #374151 100%);
    color: white;

    .loc-re-contact-container {
        max-width: 1000px;
        margin: 0 auto;
        padding: 0 2rem;

        @media (max-width: 768px) {
            padding: 0 1rem;
        }
    }

    .loc-re-contact-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: start;

        @media (max-width: 768px) {
            grid-template-columns: 1fr;
            gap: 2rem;
        }
    }

    .loc-re-contact-info {
        h3 {
            font-size: clamp(1.75rem, 4vw, 2rem);
            font-weight: 700;
            margin-bottom: 1.5rem;
            color: white;
            line-height: 1.2;
        }

        p {
            margin-bottom: 2rem;
            line-height: 1.6;
            color: #d1d5db;
            font-size: 1rem;
        }
    }

    .loc-re-contact-item {
        background: rgba(255, 255, 255, 0.05);
        padding: 1.5rem;
        border-radius: 1rem;
        margin-bottom: 1.5rem;
        transition: all 0.3s ease;
        border: 1px solid rgba(255, 255, 255, 0.1);

        &:hover {
            background: rgba(255, 255, 255, 0.08);
            transform: translateY(-2px);
        }

        &:last-child {
            margin-bottom: 0;
        }

        .loc-re-contact-icon {
            font-size: 1.5rem;
            margin-right: 1rem;
            flex-shrink: 0;
        }

        .loc-re-contact-details {
            flex: 1;

            h4 {
                font-weight: 600;
                margin-bottom: 0.5rem;
                color: white;
                font-size: 1rem;
            }

            p {
                color: #d1d5db;
                margin: 0;
                line-height: 1.4;

                a {
                    color: #d1d5db;
                    text-decoration: none;
                    transition: color 0.3s ease;

                    &:hover {
                        color: white;
                        text-decoration: underline;
                    }
                }
            }
        }

        // Flexbox layout for icon and content
        display: flex;
        align-items: flex-start;
    }

    .loc-re-contact-actions {
        display: flex;
        flex-direction: column;
        gap: 1rem;

        @media (max-width: 768px) {
            flex-direction: row;
            gap: 1rem;
        }

        @media (max-width: 480px) {
            flex-direction: column;
        }

        .loc-re-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 1rem 2rem;
            font-size: 1rem;
            font-weight: 600;
            text-decoration: none;
            border-radius: 0.75rem;
            transition: all 0.3s ease;
            text-align: center;
            border: 2px solid transparent;
            cursor: pointer;
            position: relative;
            overflow: hidden;

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

            &:hover::before {
                left: 100%;
            }

            &.loc-re-btn-primary {
                background: var(--loc-re-primary, #4F46E5);
                color: white;
                box-shadow: 0 4px 14px 0 rgba(79, 70, 229, 0.4);

                &:hover {
                    background: var(--loc-re-primary-dark, #3730A3);
                    transform: translateY(-2px);
                    box-shadow: 0 8px 25px 0 rgba(79, 70, 229, 0.6);
                }
            }

            &.loc-re-btn-secondary {
                background: rgba(255, 255, 255, 0.1);
                color: white;
                border: 2px solid rgba(255, 255, 255, 0.2);
                backdrop-filter: blur(10px);

                &:hover {
                    background: rgba(255, 255, 255, 0.2);
                    border-color: rgba(255, 255, 255, 0.4);
                    transform: translateY(-2px);
                }
            }

            &:active {
                transform: translateY(0);
            }
        }
    }

    // Animation on scroll
    .loc-re-contact-item {
        opacity: 0;
        transform: translateX(-30px);

        &.animate-in {
            animation: slideInLeft 0.6s ease-out forwards;
        }

        &:nth-child(1).animate-in { animation-delay: 0.1s; }
        &:nth-child(2).animate-in { animation-delay: 0.2s; }
        &:nth-child(3).animate-in { animation-delay: 0.3s; }
    }

    .loc-re-contact-actions {
        opacity: 0;
        transform: translateX(30px);

        &.animate-in {
            animation: slideInRight 0.6s ease-out forwards;
            animation-delay: 0.4s;
        }
    }
}

// Animations
@keyframes slideInLeft {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

// Accessibility improvements
@media (prefers-reduced-motion: reduce) {
    .wp-block-portal-loc-re-contact {
        .loc-re-contact-item,
        .loc-re-contact-actions {
            animation: none;
            opacity: 1;
            transform: none;
        }

        .loc-re-btn {
            &::before {
                display: none;
            }

            &:hover {
                transform: none;
            }
        }
    }
}

// High contrast mode support
@media (prefers-contrast: high) {
    .wp-block-portal-loc-re-contact {
        background: #000;

        .loc-re-contact-item {
            border: 2px solid white;
            background: rgba(255, 255, 255, 0.1);
        }

        .loc-re-btn {
            border-width: 3px;

            &.loc-re-btn-primary {
                border-color: white;
            }

            &.loc-re-btn-secondary {
                border-color: white;
                background: transparent;
            }
        }
    }
}

// Print styles
@media print {
    .wp-block-portal-loc-re-contact {
        background: white;
        color: black;

        .loc-re-contact-item {
            background: #f9fafb;
            border: 1px solid #ccc;
            transform: none;

            .loc-re-contact-details {
                h4, p {
                    color: black;
                }

                a {
                    color: black;
                }
            }
        }

        .loc-re-btn {
            background: transparent;
            color: black;
            border: 1px solid black;

            &::before {
                display: none;
            }
        }
    }
}

