/**
 * Custom CSS for Arek Jasnosz BJJ Website
 * Extracted from header.php and hometemplate.php
 */

/* ==========================================================================
   RESET & VARIABLES
   ========================================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-blue: #1e40af;
    --dark-blue: #1e3a8a;
    --light-blue: #3b82f6;
    --red-accent: #dc2626;
    --white: #ffffff;
    --black: #0f172a;
    --gray: #64748b;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ==========================================================================
   CUSTOM CURSOR
   ========================================================================== */

.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid var(--red-accent);
    border-radius: 50%;
    position: fixed;
    transform: translate(-50%, -50%);
    pointer-events: none;
    transition: all 0.1s ease;
    z-index: 9999;
    mix-blend-mode: difference;
}

.custom-cursor.hover {
    width: 40px;
    height: 40px;
    background: rgba(220, 38, 38, 0.2);
}

/* ==========================================================================
   BASE STYLES
   ========================================================================== */

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    color: var(--black);
    overflow-x: hidden;
    background: var(--black);
}

/* ==========================================================================
   ANIMATED BACKGROUND
   ========================================================================== */

.animated-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, var(--dark-blue) 0%, var(--black) 100%);
    overflow: hidden;
}

.bg-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
    opacity: 0.1;
    filter: blur(2px);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        rgba(30, 64, 175, 0.8) 0%,
        rgba(15, 23, 42, 0.9) 100%);
}

.animated-bg::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 20% 80%, var(--light-blue) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, var(--red-accent) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, var(--primary-blue) 0%, transparent 50%);
    animation: bgAnimation 20s ease-in-out infinite;
    opacity: 0.1;
}

@keyframes bgAnimation {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(-20px, -20px) rotate(120deg); }
    66% { transform: translate(20px, -10px) rotate(240deg); }
}

/* Background Particles */
.particle {
    position: absolute;
    background: var(--white);
    border-radius: 50%;
    opacity: 0.1;
    animation: float 20s infinite;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) translateX(0);
    }
    33% {
        transform: translateY(-100px) translateX(100px);
    }
    66% {
        transform: translateY(100px) translateX(-100px);
    }
}

/* ==========================================================================
   PROGRESS BAR
   ========================================================================== */

.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    background: var(--red-accent);
    z-index: 1000;
    transition: width 0.3s ease;
}

/* ==========================================================================
   NAVIGATION
   ========================================================================== */

nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(10px);
    z-index: 999;
    padding: 0.4rem 2rem;
    transition: var(--transition);
}

nav.scrolled {
    padding: 0.2rem 2rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
}

/* Ensure logo and nav are vertically centered on same line */
.nav-container .logo,
.nav-container .nav-links {
    line-height: 60px;
}

.logo {
    font-family: 'Bebas Neue', cursive;
    font-size: 1.9rem;
    color: var(--white);
    text-decoration: none;
    letter-spacing: 2px;
    transition: var(--transition);
}

.logo:hover {
    color: var(--red-accent);
    transform: scale(1.05);
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    margin: 0;
    padding: 0;
    height: 100%;
}

.nav-links li {
    display: flex;
    align-items: center;
    height: 100%;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    transition: var(--transition);
    padding: 0.3rem 0;
    display: inline-flex;
    align-items: center;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--red-accent);
    transition: width 0.3s ease;
}

.nav-links a:hover::after {
    width: 100%;
}

.cta-button {
    background: var(--red-accent);
    color: var(--white);
    padding: 0.3rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    cursor: none;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    border-radius: 50%;
}

.cta-button:hover::before {
    width: 300%;
    height: 300%;
}

/* Floating Contact Button */
.floating-contact {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--red-accent);
    color: var(--white);
    width: 70px;
    height: 70px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.4);
    transition: var(--transition);
    z-index: 100;
    font-size: 2rem;
}

.floating-contact:hover {
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 15px 40px rgba(220, 38, 38, 0.6);
}

/* Mobile Menu */
.mobile-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.mobile-menu span {
    display: block;
    width: 30px;
    height: 3px;
    background: var(--white);
    margin: 6px 0;
    transition: var(--transition);
}

.mobile-menu.active span:nth-child(1) {
    transform: rotate(45deg) translateY(9px);
}

.mobile-menu.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu.active span:nth-child(3) {
    transform: rotate(-45deg) translateY(-9px);
}

@media (max-width: 768px) {
    .mobile-menu {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        flex-direction: column;
        padding: 1.5rem;
        gap: 1rem;
        backdrop-filter: blur(20px);
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        width: 100%;
        text-align: center;
        padding: 1rem;
    }

    .logo {
        font-size: 1.8rem;
    }
}

/* ==========================================================================
   LOADER
   ========================================================================== */

.loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--black);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s ease;
}

.loader.hidden {
    opacity: 0;
    pointer-events: none;
}

.loader-content {
    text-align: center;
}

.loader-logo {
    font-family: 'Bebas Neue', cursive;
    font-size: 3rem;
    color: var(--red-accent);
    margin-bottom: 2rem;
    letter-spacing: 3px;
}

.loader-circle {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--red-accent);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.loader-text {
    color: var(--white);
    font-size: 1.2rem;
    opacity: 0.8;
}

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

/* ==========================================================================
   HERO SECTION
   ========================================================================== */

#hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 5rem 2rem;
}

.hero-content {
    max-width: 1400px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-family: 'Bebas Neue', cursive;
    font-size: 4rem;
    font-weight: 400;
    letter-spacing: 2px;
    line-height: 1.1;
    color: var(--white);
    margin-bottom: 1rem;
}

.typewriter {
    color: var(--red-accent);
    border-right: 2px solid var(--red-accent);
    animation: blink 1s infinite;
}

@keyframes blink {
    0%, 50% { border-color: transparent; }
    51%, 100% { border-color: var(--red-accent); }
}

.hero-text p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 2rem;
    line-height: 1.8;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-image {
    position: relative;
    perspective: 1000px;
}

.hero-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    z-index: 1;
    transform: rotateY(-5deg) rotateX(2deg);
    transition: transform 0.5s ease, box-shadow 0.5s ease;
}

.hero-image:hover img {
    transform: rotateY(0deg) rotateX(0deg) scale(1.05);
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.7);
}

.floating-element {
    position: absolute;
    animation: float 6s ease-in-out infinite;
    z-index: 0;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.mouse {
    width: 30px;
    height: 50px;
    border: 2px solid var(--white);
    border-radius: 20px;
    position: relative;
}

.wheel {
    width: 4px;
    height: 10px;
    background: var(--white);
    position: absolute;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 2px;
    animation: scroll 2s infinite;
}

@keyframes scroll {
    0% { opacity: 0; top: 10px; }
    30% { opacity: 1; }
    100% { opacity: 0; top: 30px; }
}

/* ==========================================================================
   ABOUT SECTION
   ========================================================================== */

#about {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--red-accent);
}

.about-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: rgba(255, 255, 255, 0.9);
}

.achievements {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin: 2rem 0;
}

.achievement {
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.achievement h4 {
    color: var(--light-blue);
    margin-bottom: 0.5rem;
}

.about-image img {
    width: 100%;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* ==========================================================================
   SERVICES/OFFER SECTION
   ========================================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    position: relative;
    height: 400px;
    perspective: 1000px;
    cursor: pointer;
}

.card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    text-align: center;
    transition: transform 0.6s;
    transform-style: preserve-3d;
}

.service-card:hover .card-inner {
    transform: rotateY(180deg);
}

.card-front, .card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    border-radius: 20px;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.card-front {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--white);
}

.card-back {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: var(--white);
    transform: rotateY(180deg);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
    height: 3rem;
}

.card-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    height: 3.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.card-description {
    font-size: 1rem;
    opacity: 0.9;
    line-height: 1.6;
    height: 5rem;
    display: flex;
    align-items: center;
    text-align: center;
}

.card-price {
    font-size: 2rem;
    font-weight: 800;
    margin-top: 1rem;
    color: var(--white);
}

/* ==========================================================================
   GALLERY SECTION
   ========================================================================== */

#gallery {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    backdrop-filter: blur(10px);
}

.gallery-container {
    display: grid;
    gap: 2rem;
}

.gallery-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: center;
    padding: 2rem;
    opacity: 0;
    transform: translateY(50px);
}

.gallery-item.show {
    opacity: 1;
    transform: translateY(0);
    transition: all 0.8s ease;
}

.gallery-item:nth-child(even) {
    direction: rtl;
}

.gallery-item:nth-child(even) > * {
    direction: ltr;
}

.gallery-image {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.gallery-image img {
    width: 100%;
    height: auto;
    transition: transform 0.5s ease;
}

.gallery-image:hover img {
    transform: scale(1.1);
}

.gallery-text {
    color: var(--white);
}

.gallery-text h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: var(--red-accent);
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */

#faq {
    padding: 5rem 2rem;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: rgba(255, 255, 255, 0.05);
    margin-bottom: 1rem;
    border-radius: 15px;
    overflow: hidden;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
}

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

.faq-question {
    padding: 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--white);
    font-weight: 600;
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: rgba(255, 255, 255, 0.8);
}

.faq-item.active .faq-answer {
    max-height: 300px;
    padding: 0 1.5rem 1.5rem;
}

/* ==========================================================================
   TESTIMONIALS SECTION
   ========================================================================== */

#testimonials {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 30px;
    backdrop-filter: blur(10px);
    overflow: hidden;
}

.testimonials-slider {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    gap: 2rem;
    padding: 2rem;
    scrollbar-width: none;
}

.testimonials-slider::-webkit-scrollbar {
    display: none;
}

.testimonial {
    min-width: 350px;
    background: rgba(255, 255, 255, 0.1);
    padding: 2rem;
    border-radius: 20px;
    scroll-snap-align: center;
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--transition);
}

.testimonial:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.testimonial-text {
    font-style: italic;
    margin-bottom: 1rem;
    line-height: 1.8;
}

.testimonial-author {
    font-weight: 600;
    color: var(--red-accent);
}

.stars {
    color: #fbbf24;
    margin-bottom: 1rem;
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

#contact {
    padding: 5rem 2rem;
}

.contact-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    color: var(--white);
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.15);
    border-color: var(--red-accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.submit-btn {
    background: var(--red-accent);
    color: var(--white);
    padding: 1rem 3rem;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
}

.submit-btn:hover {
    background: #b91c1c;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(220, 38, 38, 0.3);
}

.contact-info {
    color: var(--white);
}

.contact-info h3 {
    font-size: 2rem;
    margin-bottom: 2rem;
    color: var(--red-accent);
}

.info-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.info-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    color: var(--light-blue);
}

.map-container {
    margin-top: 2rem;
    border-radius: 20px;
    overflow: hidden;
    height: 300px;
}

/* ==========================================================================
   SECTION STYLES
   ========================================================================== */

section {
    padding: 5rem 2rem;
    position: relative;
    overflow: hidden;
}

.section-title {
    font-family: 'Bebas Neue', cursive;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    color: var(--white);
    letter-spacing: 3px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 100px;
    height: 4px;
    background: var(--red-accent);
    margin: 1rem auto;
}

.reveal-section {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease;
}

.reveal-section.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================================================
   STATS COUNTER
   ========================================================================== */

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin: 3rem 0;
}

.stat-item {
    text-align: center;
    color: var(--white);
    padding: 2rem;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateY(50px);
    opacity: 0;
}

.stat-item.animate {
    transform: translateY(0);
    opacity: 1;
    transition: all 0.8s ease;
}

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--red-accent);
    margin: 1rem 0;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
}

.animated-icon {
    width: 50px;
    height: 50px;
    margin: 0 auto;
    color: var(--light-blue);
}

/* ==========================================================================
   RESPONSIVE STYLES
   ========================================================================== */

@media (max-width: 768px) {
    .hero-content,
    .about-content,
    .contact-container {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .gallery-item {
        grid-template-columns: 1fr;
    }

    .gallery-item:nth-child(even) {
        direction: ltr;
    }

    .achievements {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2.5rem;
    }
}