/**
 * Custom CSS for Sports Boxs Theme
 * Additional styles and Elementor compatibility
 * 
 * @package SportsBoxs
 * @since 1.0.0
 */

/* ==========================================================================
   Back to Top Button
   ========================================================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
    box-shadow: 0 4px 12px rgba(234, 88, 12, 0.3);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: var(--primary-dark);
    transform: translateY(-5px);
}

/* ==========================================================================
   Scroll Animations
   ========================================================================== */

.card,
.section-title {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.card.fade-in-visible,
.section-title.fade-in-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   Form Styles
   ========================================================================== */

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: var(--font-primary);
    transition: border-color 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
}

input.error,
textarea.error {
    border-color: #ef4444;
}

textarea {
    min-height: 150px;
    resize: vertical;
}

/* ==========================================================================
   Video Styles
   ========================================================================== */

.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
    overflow: hidden;
    border-radius: 1rem;
}

.video-container iframe,
.video-container video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.video-thumbnail {
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 1rem;
}

.video-thumbnail img {
    width: 100%;
    height: auto;
    transition: transform 0.3s ease;
}

.video-thumbnail:hover img {
    transform: scale(1.05);
}

.video-thumbnail::after {
    content: '▶';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background-color: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 1.5rem;
    opacity: 0.9;
    transition: opacity 0.3s ease;
}

.video-thumbnail:hover::after {
    opacity: 1;
}

/* ==========================================================================
   Elementor Specific Styles
   ========================================================================== */

/* Remove default margins for Elementor sections */
.elementor-section {
    margin: 0;
}

/* Ensure full-width sections work properly */
.elementor-section.elementor-section-boxed > .elementor-container {
    max-width: 1200px;
}

/* Widget spacing */
.elementor-widget {
    margin-bottom: 20px;
}

/* Heading styles for Elementor */
.elementor-heading-title {
    margin: 0;
    padding: 0;
}

/* Button styles for Elementor */
.elementor-button {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    text-decoration: none;
}

.elementor-button-primary {
    background-color: var(--primary-color);
    color: var(--white);
}

.elementor-button-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

/* ==========================================================================
   Social Media Icons
   ========================================================================== */

.social-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.social-links a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--white);
    transition: all 0.3s ease;
}

.social-links a:hover {
    background-color: var(--primary-color);
    transform: translateY(-3px);
}

/* ==========================================================================
   Preloader (Optional)
   ========================================================================== */

.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border-color);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

.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 !important;
    width: 1px;
    word-wrap: normal !important;
}

.screen-reader-text:focus {
    background-color: var(--bg-light);
    border-radius: 3px;
    box-shadow: 0 0 2px 2px rgba(0, 0, 0, 0.6);
    clip: auto !important;
    clip-path: none;
    color: var(--text-color);
    display: block;
    font-size: 0.875rem;
    font-weight: 700;
    height: auto;
    left: 5px;
    line-height: normal;
    padding: 15px 23px 14px;
    text-decoration: none;
    top: 5px;
    width: auto;
    z-index: 100000;
}

/* ==========================================================================
   Print Styles
   ========================================================================== */

@media print {
    .site-header,
    .site-footer,
    .back-to-top,
    .menu-toggle {
        display: none;
    }

    body {
        font-size: 12pt;
    }

    a {
        text-decoration: underline;
    }
}

/* ==========================================================================
   Additional Responsive Adjustments
   ========================================================================== */

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.875rem;
    }

    .back-to-top {
        width: 40px;
        height: 40px;
        font-size: 1.25rem;
        bottom: 20px;
        right: 20px;
    }
}

