/**
 * Global Button Styles
 * 
 * This file contains all button styles used across the site.
 * It consolidates styles previously defined in multiple files.
 */

/* Base Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 2rem;
    font-size: 0.95rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border-radius: 30px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    z-index: 1;
    color: #fff;
    background: transparent;
    line-height: 1.2;
    height: auto;
    min-height: 2.2rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    border-radius: 30px;
    
    /* Smoother, more blended angled gradient */
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%, 
        var(--color-primary) 10%,
        var(--color-primary-dark) 25%, 
        var(--color-accent) 50%,
        var(--color-primary-dark) 75%, 
        var(--color-primary) 90%,
        var(--color-primary) 100%
    );
    background-size: 400% 400%; 
    background-position: 95% 5%; /* More green visible in default state */
    
    /* Faster transition */
    transition: background-position 0.5s ease-in-out;
}

.btn:hover::before {
    background-position: 10% 90%; /* Move diagonally to show more purple, but keep some green */
}

/* Explicitly set hover text color */
.btn:hover {
    color: #fff; /* Keep text white on hover */
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 255, 178, 0.3);
}

.btn:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 255, 178, 0.2);
}

/* Primary Button Style */
.btn-primary {
    border: none;
    color: #fff; /* Ensure primary button text is white */
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 255, 178, 0.3);
    color: #fff; /* Reinforce white text on hover */
}

.btn-primary:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 255, 178, 0.2);
}

/* Secondary Button Style */
.btn-secondary {
    background: transparent;
    color: var(--color-text-primary); /* Light color for secondary buttons */
    border: 2px solid var(--color-primary);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-secondary::before {
    opacity: 0;
    transition: opacity 0.5s ease, background-position 0.5s ease-in-out;
}

.btn-secondary:hover::before {
    opacity: 0.15;
    background-position: 10% 90%;
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(0, 255, 178, 0.15);
    border-color: var(--color-primary);
    color: var(--color-text-primary); /* Keep the original text color on hover */
}

.btn-secondary:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 255, 178, 0.1);
}

/* Enhanced Secondary Button with Gradient Border */
.btn-secondary-gradient {
    background: transparent;
    color: var(--color-text-primary);
    position: relative;
    z-index: 2;
    border: none; /* Remove default border as we'll use pseudo-elements for gradient border */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    padding: calc(0.6rem - 2px) calc(2rem - 2px); /* Adjusted padding to match the base button */
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Gradient border using pseudo-element */
.btn-secondary-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 30px;
    padding: 2px; /* Border width */
    background: linear-gradient(
        135deg,
        var(--color-primary) 0%,
        var(--color-accent) 50%,
        var(--color-secondary) 100%
    );
    -webkit-mask: 
        linear-gradient(#fff 0 0) content-box, 
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    background-size: 300% 300%;
    background-position: 0% 0%;
    transition: all 0.5s ease;
    z-index: -1;
}

/* Background glow effect on hover */
.btn-secondary-gradient::after {
    content: '';
    position: absolute;
    top: -5px;
    left: -5px;
    right: -5px;
    bottom: -5px;
    background: linear-gradient(
        135deg,
        rgba(0, 255, 178, 0.2) 0%,
        rgba(123, 97, 255, 0.2) 50%,
        rgba(255, 51, 102, 0.2) 100%
    );
    border-radius: 35px;
    z-index: -2;
    opacity: 0;
    transition: opacity 0.5s ease;
    filter: blur(10px);
}

/* Hover effects */
.btn-secondary-gradient:hover::before {
    background-position: 100% 100%;
    animation: borderGradient 3s ease infinite;
}

.btn-secondary-gradient:hover::after {
    opacity: 1;
}

.btn-secondary-gradient:hover {
    transform: translateY(-3px) scale(1.03);
    box-shadow: 0 10px 25px rgba(0, 255, 178, 0.2);
    color: var(--color-text-primary);
}

/* Active state */
.btn-secondary-gradient:active {
    transform: translateY(-1px) scale(1.01);
    box-shadow: 0 5px 15px rgba(0, 255, 178, 0.1);
}

/* Border animation */
@keyframes borderGradient {
    0% {
        background-position: 0% 0%;
    }
    50% {
        background-position: 100% 100%;
    }
    100% {
        background-position: 0% 0%;
    }
}

/* Special Button Variations */

/* Header Contact Button */
.header-actions .btn-primary {
    padding: 0.5rem 1.2rem;
    font-size: 0.85rem;
    border-radius: 6px;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 1.9rem;
}

.header-actions .btn-primary::before {
    border-radius: 6px;
}

.site-header.collapsed .header-actions .btn-primary {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
    min-height: 1.7rem;
}

/* Submit Button (for forms) */
.submit-btn {
    width: 100%;
    background: var(--gradient-primary);
    color: var(--color-background);
    border: none;
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.submit-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 255, 178, 0.3);
}

.submit-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(0, 255, 178, 0.2);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .btn {
        padding: 0.5rem 1.8rem;
        font-size: 0.9rem;
        min-height: 2rem;
    }
    
    .header-actions .btn-primary {
        padding: 0.4rem 1rem;
        font-size: 0.8rem;
        min-height: 1.8rem;
    }
    
    .submit-btn {
        padding: 0.7rem 1.2rem;
    }
}

/* Dark Primary Button - Used on Products Page */
.btn-primary-dark {
    background: linear-gradient(135deg, var(--color-primary-dark) 0%, var(--color-accent) 100%);
    color: var(--color-text-primary);
    padding: 0.8rem 2rem;
    border-radius: 6px;
    text-decoration: none;
    display: inline-block;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 127, 89, 0.4);
    transition: all 0.3s ease;
    border: none;
}

.btn-primary-dark:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 127, 89, 0.6);
    color: var(--color-text-primary);
}

.btn-primary-dark:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0, 127, 89, 0.4);
} 