/* ===================================
   IRON FIT GYM - Custom Styles
   =================================== */

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* === Overflow & Responsive Protection === */
body {
    overflow-x: hidden;
}

img, video, iframe {
    max-width: 100%;
    height: auto;
}

*, *::before, *::after {
    overflow-wrap: break-word;
    word-wrap: break-word;
}

table {
    display: block;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

pre, code {
    white-space: pre-wrap;
    word-break: break-word;
}

/* Selection Color */
::selection {
    background-color: #dc2626;
    color: #fff;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: #111;
}
::-webkit-scrollbar-thumb {
    background: #dc2626;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: #b91c1c;
}

/* ===== HERO ===== */
.hero-section {
    background: linear-gradient(135deg, rgba(17,17,17,0.9) 0%, rgba(17,17,17,0.6) 50%, rgba(220,38,38,0.3) 100%),
                url('https://images.unsplash.com/photo-1534438327276-14e5300c3a48?w=1920&q=80') center/cover no-repeat;
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 20% 80%, rgba(220,38,38,0.15) 0%, transparent 50%);
    pointer-events: none;
}

.hero-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(transparent, #111);
    pointer-events: none;
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 5px rgba(220,38,38,0.4); }
    50% { box-shadow: 0 0 25px rgba(220,38,38,0.8); }
}

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

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.animate-fade-in-up { animation: fadeInUp 0.8s ease forwards; }
.animate-fade-in-left { animation: fadeInLeft 0.8s ease forwards; }
.animate-fade-in-right { animation: fadeInRight 0.8s ease forwards; }
.animate-scale-in { animation: scaleIn 0.6s ease forwards; }

.delay-100 { animation-delay: 0.1s; }
.delay-200 { animation-delay: 0.2s; }
.delay-300 { animation-delay: 0.3s; }
.delay-400 { animation-delay: 0.4s; }
.delay-500 { animation-delay: 0.5s; }
.delay-600 { animation-delay: 0.6s; }

/* Scroll Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}
.animate-on-scroll.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== BUTTONS ===== */
.pulse-btn {
    animation: pulse-glow 2s infinite;
}
.pulse-btn:hover {
    animation: none;
    box-shadow: 0 0 30px rgba(220,38,38,0.6);
}

.btn-primary {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s ease;
}
.btn-primary:hover::before {
    left: 100%;
}

/* ===== CARDS ===== */
.program-card {
    background: linear-gradient(145deg, #1f2937, #111);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: #dc2626;
    transform: scaleX(0);
    transition: transform 0.4s ease;
}
.program-card:hover::before {
    transform: scaleX(1);
}
.program-card:hover {
    transform: translateY(-8px);
    border-color: rgba(220,38,38,0.3);
    box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 30px rgba(220,38,38,0.1);
}

.trainer-card {
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}
.trainer-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.5);
}
.trainer-card .trainer-overlay {
    opacity: 0;
    transition: all 0.4s ease;
}
.trainer-card:hover .trainer-overlay {
    opacity: 1;
}

.plan-card {
    background: linear-gradient(145deg, #1f2937, #111);
    border: 1px solid rgba(255,255,255,0.05);
    transition: all 0.4s ease;
}
.plan-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.plan-card.featured {
    border: 2px solid #dc2626;
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(220,38,38,0.2);
}
.plan-card.featured:hover {
    transform: scale(1.05) translateY(-8px);
}

/* ===== GALLERY ===== */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 0.5rem;
}
.gallery-item img {
    transition: transform 0.5s ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
}
.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(transparent 40%, rgba(220,38,38,0.8));
    opacity: 0;
    transition: opacity 0.4s ease;
    display: flex;
    align-items: flex-end;
    padding: 1.5rem;
}
.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

/* ===== STATS ===== */
.stat-card {
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(220,38,38,0.05) 0%, transparent 60%);
    animation: float 6s ease-in-out infinite;
}

/* ===== SECTION STYLES ===== */
.section-heading {
    position: relative;
    display: inline-block;
}
.section-heading::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 60px;
    height: 4px;
    background: #dc2626;
}
.section-heading.center::after {
    left: 50%;
    transform: translateX(-50%);
}

/* Red Stripe Divider */
.red-stripe {
    width: 60px;
    height: 4px;
    background: #dc2626;
    margin: 1rem auto;
}

/* ===== FORM STYLES ===== */
.form-input {
    background: #1f2937;
    border: 1px solid #374151;
    color: #fff;
    transition: all 0.3s ease;
}
.form-input:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220,38,38,0.2);
    outline: none;
}
.form-input::placeholder {
    color: #6b7280;
}

/* ===== COMPARISON TABLE ===== */
.comparison-table th,
.comparison-table td {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
.comparison-table tr:hover {
    background: rgba(220,38,38,0.05);
}

/* ===== MISC ===== */
.text-gradient {
    background: linear-gradient(135deg, #dc2626, #ef4444);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-pattern {
    background-image: radial-gradient(rgba(255,255,255,0.03) 1px, transparent 1px);
    background-size: 30px 30px;
}

.diagonal-bg {
    background: linear-gradient(135deg, #111 25%, #1f2937 25%, #1f2937 50%, #111 50%, #111 75%, #1f2937 75%);
    background-size: 40px 40px;
    opacity: 0.3;
}

/* Glowing border */
.glow-border {
    box-shadow: inset 0 0 20px rgba(220,38,38,0.1), 0 0 20px rgba(220,38,38,0.05);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-section {
        min-height: 90vh;
    }
    .plan-card.featured {
        transform: scale(1);
    }
    .plan-card.featured:hover {
        transform: translateY(-8px);
    }
}
