/* 
  IronCore Fitness - Custom Styles 
  Theme: Black (#000000), Red (#E63946), White (#FFFFFF), Light Grey (#F1F1F1)
*/

@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@400;700&family=Inter:wght@300;400;600;800&display=swap');

:root {
    --primary: #E63946;
    --primary-dark: #C1121F;
    --black: #000000;
    --dark-grey: #1A1A1A;
    --light-grey: #F1F1F1;
    --white: #FFFFFF;
    --font-heading: 'Oswald', sans-serif;
    --font-body: 'Inter', sans-serif;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--black);
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Section Spacing */
section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 50px;
    position: relative;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--primary);
    margin: 15px auto 0;
}

/* Background Colors */
.bg-white { background-color: var(--white); color: var(--black); }
.bg-dark { background-color: var(--dark-grey); color: var(--white); }
.bg-light { background-color: var(--light-grey); color: var(--black); }
.bg-black { background-color: var(--black); color: var(--white); }
.bg-red { background-color: var(--primary); color: var(--white); }

/* Buttons */
.btn {
    display: inline-block;
    padding: 15px 35px;
    font-family: var(--font-heading);
    font-weight: 700;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1rem;
    letter-spacing: 1px;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(230, 57, 70, 0.3);
}

.btn-black {
    background-color: var(--black);
    color: var(--white);
}

.btn-black:hover {
    background-color: var(--dark-grey);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--white);
    color: var(--white);
}

.btn-outline:hover {
    background: var(--white);
    color: var(--black);
}

/* Header & Nav */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: background 0.5s ease, padding 0.5s ease, box-shadow 0.5s ease;
    padding: 25px 0;
    background: transparent; /* Initial transparent state */
}

header.scrolled {
    background: rgba(0, 0, 0, 0.95); /* Background fades in on scroll */
    padding: 12px 0;
    box-shadow: 0 5px 20px rgba(0,0,0,0.5);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--white);
}

.logo span {
    color: var(--primary);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--white);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--primary);
}

.mobile-menu-btn {
    display: none;
    color: var(--white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Sections */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background-size: cover;
    background-position: center;
    position: relative;
    color: var(--white);
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.4));
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    padding: 0 20px;
}

.hero h1 {
    font-size: 5rem;
    line-height: 1;
    margin-bottom: 20px;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 40px;
    font-weight: 300;
    animation: fadeInUp 1.2s ease;
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
    animation: fadeInUp 1.4s ease;
}

/* Grids */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 50px;
    align-items: center;
}

/* Cards */
.card {
    background: var(--white);
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
}

.card-img {
    height: 250px;
    overflow: hidden;
}

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

.card-content {
    padding: 30px;
}

.card-content h3 {
    margin-bottom: 15px;
    font-size: 1.5rem;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    height: 300px;
    overflow: hidden;
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

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

/* Membership Tiers */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.pricing-card {
    background: var(--white);
    padding: 50px 30px;
    text-align: center;
    border-radius: 10px;
    transition: var(--transition);
    border: 1px solid #eee;
}

.pricing-card.featured {
    background: var(--black);
    color: var(--white);
    transform: scale(1.05);
    border: 2px solid var(--primary);
}

.price {
    font-size: 4rem;
    font-weight: 800;
    margin: 20px 0;
    color: var(--primary);
}

.price span {
    font-size: 1rem;
    color: #888;
}

.pricing-card ul {
    margin-bottom: 30px;
}

.pricing-card li {
    margin-bottom: 10px;
    font-size: 0.95rem;
}

/* Footer */
footer {
    background: var(--black);
    color: var(--white);
    padding: 80px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-col h4 {
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-col p {
    color: #aaa;
    margin-bottom: 15px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #aaa;
}

.footer-links a:hover {
    color: var(--primary);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-links a {
    width: 40px;
    height: 40px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.social-links a:hover {
    background: var(--primary);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid #333;
    color: #777;
    font-size: 0.8rem;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

/* Responsive */
@media (max-width: 992px) {
    .hero h1 { font-size: 3.5rem; }
    .mobile-menu-btn { display: block; }
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--black);
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }
    .nav-links.active { display: flex; }
    .grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-btns { flex-direction: column; }
    .section-title { font-size: 2.2rem; }
}

/* Floating WhatsApp CTA */
.floating-whatsapp-cta {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    writing-mode: vertical-rl;
    text-orientation: mixed;
    background-color: #E63946;
    color: #ffffff !important;
    padding: 20px 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    border-radius: 8px 0 0 8px;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.4);
    z-index: 99999;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: transform 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
    animation: ctaColorRotate 10s infinite, ctaPulse 2s infinite ease-in-out;
}

.floating-whatsapp-cta:hover {
    padding-right: 18px;
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.5);
    transform: translateY(-50%) scale(1.05);
}

/* Subtle pulse animation */
@keyframes ctaPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0.5), -5px 0 25px rgba(0, 0, 0, 0.4);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(230, 57, 70, 0), -5px 0 25px rgba(0, 0, 0, 0.4);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(230, 57, 70, 0), -5px 0 25px rgba(0, 0, 0, 0.4);
    }
}

/* Color rotation every few seconds */
@keyframes ctaColorRotate {
    0%, 100% {
        background-color: #E63946; /* Royal Red */
    }
    25% {
        background-color: #25D366; /* WhatsApp Green */
    }
    50% {
        background-color: #FFB703; /* Warning Orange */
    }
    75% {
        background-color: #FF1493; /* Deep Pink */
    }
}

@media (max-width: 768px) {
    .floating-whatsapp-cta {
        padding: 15px 8px;
        font-size: 0.8rem;
        letter-spacing: 1px;
    }
}

/* Exit Intent Popup */
.exit-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s ease;
    padding: 20px;
}

.exit-popup-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.exit-popup-container {
    background-color: #111111;
    border: 3px solid #E63946;
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    padding: 40px 30px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8);
    transform: scale(0.85);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.2);
    text-align: center;
    color: #ffffff;
}

.exit-popup-overlay.active .exit-popup-container {
    transform: scale(1);
}

.exit-popup-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 2.2rem;
    color: #888;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    transition: color 0.3s ease;
}

.exit-popup-close:hover {
    color: #E63946;
}

.exit-popup-headline {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    color: #E63946;
    margin-bottom: 12px;
    line-height: 1.25;
}

.exit-popup-subheadline {
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: #ccc;
    margin-bottom: 25px;
    line-height: 1.6;
}

.exit-popup-offer-section {
    background-color: #000000;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 30px;
    border: 1.5px dashed rgba(230, 57, 70, 0.5);
}

.exit-popup-offer-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: #FFB703;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.exit-popup-offer-item {
    font-family: var(--font-body);
    font-size: 1.05rem;
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    padding: 0 10px;
}

.exit-popup-offer-item span:first-child {
    color: #ffffff;
}

.exit-popup-offer-item span:last-child {
    color: #FFB703;
}

.exit-popup-cta {
    display: inline-block;
    width: 100%;
    background-color: #25D366; /* Green WhatsApp */
    color: #ffffff;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
    padding: 16px;
    border-radius: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    box-shadow: 0 5px 15px rgba(37, 211, 102, 0.4);
    transition: background-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}

.exit-popup-cta:hover {
    background-color: #128C7E;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.6);
}

