/**
 * Custom CSS for WizSports Modern Theme
 *
 * @package WizSports_Modern
 */

/* Additional custom styles */
.screen-reader-text {
    border: 0;
    clip: rect(1px, 1px, 1px, 1px);
    clip-path: inset(50%);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: #eee;
    clip: auto !important;
    clip-path: none;
    color: #444;
    display: block;
    font-size: 1em;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* Header scroll effect */
.site-header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
}

/* Form styles (avoid Tailwind @apply here; write plain CSS for runtime) */
input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="url"],
input[type="tel"],
input[type="number"],
textarea,
select {
    width: 100%;
    padding: 0.75rem 1rem; /* 12px 16px */
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.5rem; /* rounded-lg */
    background-color: #ffffff;
    color: #111827; /* gray-900 */
    transition: box-shadow 150ms, border-color 150ms, background-color 150ms;
}
input::placeholder,
textarea::placeholder {
    color: #6b7280; /* gray-500 */
}
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: #3b82f6; /* blue-500 */
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25); /* focus ring */
    background-color: #ffffff;
}

input[type="submit"],
button[type="submit"],
.button-primary {
    background: linear-gradient(90deg, #2563eb, #7c3aed); /* blue-600 → purple-600 */
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.25rem; /* 12px 20px */
    border-radius: 0.5rem;
    border: none;
    cursor: pointer;
    transition: transform 150ms, box-shadow 150ms, opacity 150ms;
}
input[type="submit"]:hover,
button[type="submit"]:hover,
.button-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.25);
}
input[type="submit"]:active,
button[type="submit"]:active,
.button-primary:active { transform: translateY(0); }

/* Error states */
.error {
    border-color: #ef4444 !important; /* red-500 */
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.25) !important;
}

/* Loading states */
.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Print styles */
@media print {
    .site-header,
    .site-footer,
    .mobile-menu,
    .back-to-top {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
    }
    
    img {
        page-break-inside: avoid;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .bg-gradient-to-br {
        background: #000 !important;
    }
    
    .text-gray-300 {
        color: #fff !important;
    }
    
    .text-gray-600 {
        color: #ccc !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Skip link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #000;
    color: #fff;
    padding: 8px;
    text-decoration: none;
    z-index: 100000;
}

.skip-link:focus {
    top: 6px;
}

/* Custom utility classes */
.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-glass {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Back-to-top button hard-disable (in case JS flag fails) */
#back-to-top { display: none !important; }

/* Animation classes */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.animate-float {
    animation: float 3s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 5px rgba(59, 130, 246, 0.5);
    }
    50% {
        box-shadow: 0 0 20px rgba(59, 130, 246, 0.8);
    }
}

.animate-pulse-glow {
    animation: pulse-glow 2s ease-in-out infinite;
}

/* Contact section specific tweaks */
.contact-title { letter-spacing: -0.02em; }
.contact-subtitle { opacity: 0.85; }
.contact-form-wrap .wpcf7-form p { margin-bottom: 1rem; }
.contact-form-wrap .wpcf7-spinner { margin-left: 10px; }
.contact-form-wrap .wpcf7-response-output {
    margin-top: 1rem;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
}
.contact-form-wrap .wpcf7-not-valid-tip { color: #b91c1c; font-size: 0.875rem; margin-top: 4px; }
.contact-form-wrap input[type="submit"] { width: 100%; }

/* Two-column fields inside CF7 using simple utility classes in markup (see template below) */
.cf7-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .cf7-grid { grid-template-columns: 1fr 1fr; } }
.cf7-grid .col-span-2 { grid-column: span 2; }

/* Strict two-column: left column (name, subject), right column (email, message) */
.cf7-two-col { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 1024px) { .cf7-two-col { grid-template-columns: 1fr 1fr; } }
.cf7-two-col .col { display: flex; flex-direction: column; gap: 1rem; }
.cf7-two-col .full { grid-column: 1 / -1; }
.cf7-two-col textarea { min-height: 9rem; }
