/* Contact Section */
.contact {
    background: linear-gradient(135deg, var(--primary-bg) 0%, var(--secondary-bg) 100%);
    position: relative;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 70% 30%, rgba(255, 102, 0, 0.03) 0%, transparent 50%),
        radial-gradient(circle at 30% 70%, rgba(255, 102, 0, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

/* Contact Introduction */
.contact-intro {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: var(--spacing-2xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* Contact Info */
.contact-info {
    display: flex;
    justify-content: center;
    gap: var(--spacing-3xl);
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding: var(--spacing-xl) var(--spacing-2xl);
    background: rgba(34, 34, 34, 0.4);
    border: 1px solid rgba(255, 102, 0, 0.1);
    clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
    transition: all var(--transition-normal);
    text-decoration: none;
    color: var(--text-primary);
    backdrop-filter: blur(5px);
    position: relative;
    overflow: hidden;
}

.contact-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 102, 0, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity var(--transition-normal);
    clip-path: inherit;
}

.contact-item:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 102, 0, 0.3);
    box-shadow: 0 15px 40px rgba(255, 102, 0, 0.2);
    color: var(--accent-orange);
}

.contact-item:hover::before {
    opacity: 1;
}

/* Contact Icons */
.contact-icon {
    width: 32px;
    height: 32px;
    position: relative;
    flex-shrink: 0;
}

.email-icon::before {
    content: '';
    position: absolute;
    width: 24px;
    height: 18px;
    border: 2px solid currentColor;
    border-radius: 3px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.email-icon::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 2px;
    background: currentColor;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(45deg);
    box-shadow: 
        -4px 0 0 currentColor,
        4px 0 0 currentColor;
    transform-origin: center;
}

.phone-icon::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 24px;
    border: 2px solid currentColor;
    border-radius: 4px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.phone-icon::after {
    content: '';
    position: absolute;
    width: 10px;
    height: 2px;
    background: currentColor;
    top: 70%;
    left: 50%;
    transform: translate(-50%, -50%);
    border-radius: 1px;
}

/* Contact Text */
.contact-text {
    font-family: var(--font-primary);
    font-size: var(--font-size-lg);
    font-weight: 500;
    letter-spacing: 0.5px;
    transition: color var(--transition-normal);
}

/* Hover Effects */
.contact-item:hover .contact-icon {
    transform: scale(1.1) rotate(5deg);
    transition: transform var(--transition-normal);
}

.contact-item:hover .contact-text {
    color: inherit;
}

/* Footer */
.footer {
    background: var(--secondary-bg);
    border-top: 1px solid rgba(255, 102, 0, 0.1);
    padding: var(--spacing-2xl) 0;
    position: relative;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        linear-gradient(135deg, rgba(255, 102, 0, 0.02) 0%, transparent 50%);
    pointer-events: none;
}

.footer-text {
    text-align: center;
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin: 0;
    position: relative;
    z-index: 2;
    font-weight: 500;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: var(--spacing-xl);
    right: var(--spacing-xl);
    width: 50px;
    height: 50px;
    background: var(--accent-orange);
    border: none;
    clip-path: polygon(0 0, calc(100% - 10px) 0, 100% 10px, 100% 100%, 10px 100%, 0 calc(100% - 10px));
    cursor: pointer;
    z-index: var(--z-back-to-top);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-normal);
    display: flex;
    align-items: center;
    justify-content: center;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: #ff8533;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(255, 102, 0, 0.3);
}

.back-to-top:active {
    transform: translateY(-1px);
}

/* Back to Top Icon */
.back-to-top-icon {
    width: 20px;
    height: 20px;
    position: relative;
}

.back-to-top-icon::before {
    content: '';
    position: absolute;
    top: 60%;
    left: 50%;
    width: 12px;
    height: 12px;
    border-top: 2px solid var(--primary-bg);
    border-left: 2px solid var(--primary-bg);
    transform: translate(-50%, -50%) rotate(45deg);
}

.back-to-top-icon::after {
    content: '';
    position: absolute;
    top: 70%;
    left: 50%;
    width: 2px;
    height: 16px;
    background: var(--primary-bg);
    transform: translate(-50%, -50%);
}

/* Responsive Design */
@media (max-width: 768px) {
    .contact-info {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-xl);
    }
    
    .contact-item {
        width: 100%;
        max-width: 300px;
        justify-content: center;
        padding: var(--spacing-lg) var(--spacing-xl);
        clip-path: polygon(0 0, calc(100% - 15px) 0, 100% 15px, 100% 100%, 15px 100%, 0 calc(100% - 15px));
    }
    
    .contact-intro {
        font-size: var(--font-size-base);
        margin-bottom: var(--spacing-xl);
    }
    
    .contact-text {
        font-size: var(--font-size-base);
    }
    
    .back-to-top {
        bottom: var(--spacing-lg);
        right: var(--spacing-lg);
        width: 45px;
        height: 45px;
    }
    
    .footer {
        padding: var(--spacing-xl) 0;
    }
    
    .footer-text {
        font-size: var(--font-size-sm);
    }
}

@media (max-width: 480px) {
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-sm);
        padding: var(--spacing-md) var(--spacing-lg);
    }
    
    .contact-text {
        font-size: var(--font-size-sm);
    }
    
    .back-to-top {
        width: 40px;
        height: 40px;
        bottom: var(--spacing-md);
        right: var(--spacing-md);
    }
    
    .back-to-top-icon {
        width: 16px;
        height: 16px;
    }
    
    .back-to-top-icon::before {
        width: 10px;
        height: 10px;
    }
    
    .back-to-top-icon::after {
        height: 12px;
    }
}

/* Animation on Scroll */
.contact-intro {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.contact-intro.animate {
    opacity: 1;
    transform: translateY(0);
}

.contact-item {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.6s ease;
}

.contact-item.animate {
    opacity: 1;
    transform: translateY(0);
}

.contact-item:nth-child(1) {
    transition-delay: 0.2s;
}

.contact-item:nth-child(2) {
    transition-delay: 0.4s;
}

/* Enhanced Visual Effects */
.contact::after {
    content: '';
    position: absolute;
    bottom: 10%;
    right: 10%;
    width: 80px;
    height: 80px;
    border: 1px solid rgba(255, 102, 0, 0.1);
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
    transform: rotate(45deg);
    z-index: 1;
    animation: pulse 4s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.3;
        transform: rotate(45deg) scale(1);
    }
    50% {
        opacity: 0.6;
        transform: rotate(45deg) scale(1.1);
    }
}

/* Loading States */
.contact-item {
    background-image: linear-gradient(90deg, rgba(34, 34, 34, 0.4) 0%, rgba(255, 255, 255, 0.1) 50%, rgba(34, 34, 34, 0.4) 100%);
    background-size: 200% 100%;
    animation: shimmer 2s infinite;
}

.contact-item:hover {
    animation: none;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }
    100% {
        background-position: 200% 0;
    }
}

/* Focus States for Accessibility */
.contact-item:focus {
    outline: 2px solid var(--accent-orange);
    outline-offset: 4px;
}

.back-to-top:focus {
    outline: 2px solid var(--text-primary);
    outline-offset: 4px;
}

/* Print Styles */
@media print {
    .back-to-top {
        display: none;
    }
    
    .contact-item {
        background: none;
        border: 1px solid #000;
        clip-path: none;
        color: #000;
    }
    
    .contact-icon::before,
    .contact-icon::after {
        color: #000;
    }
} 