:root {
    --dark-bg: #121212;
    --darker-bg: #0A0A0A;
    --red: #E63946;
    --red-hover: #D62828;
    --text-white: #F1FAEE;
    --gray: #454d55;
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
}

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

h1,
h2,
h3,
h4 {
    font-weight: 900;
    text-transform: uppercase;
}

/* Navbar Fixed Jump Fix */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 5%;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background: var(--darker-bg);
    border-bottom: 2px solid var(--red);
}

.logo-box {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.logo {
    width: 40px;
    filter: brightness(0) invert(1);
}

/* White logo */
.logo-txt {
    font-weight: 900;
    font-size: 1.2rem;
}

.burger-menu {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    color: var(--text-white);
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
    margin: 0 auto;
    justify-content: center;
    flex: 1;
}

.nav-links li {
    width: auto;
    text-align: center;
    white-space: nowrap;
}

/* Prevents jump */
.nav-links a {
    color: var(--text-white);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.nav-links a:hover {
    color: var(--red);
}

.lang-toggle {
    display: flex;
    gap: 0.5rem;
    margin-left: auto;
}

.lang-btn {
    background: transparent;
    border: 2px solid var(--gray);
    color: var(--text-white);
    padding: 0.2rem 0.8rem;
    cursor: pointer;
    font-weight: 700;
    transition: 0.3s;
}

.lang-btn.active,
.lang-btn:hover {
    border-color: var(--red);
    background: var(--red);
}

/* Buttons & Utils */
.btn-solid {
    display: inline-block;
    background: var(--red);
    color: var(--text-white);
    padding: 1rem 2.5rem;
    text-decoration: none;
    font-weight: 900;
    border: none;
    cursor: pointer;
    transition: 0.3s;
    outline: 2px solid transparent;
    outline-offset: 2px;
}

.btn-solid:hover {
    background: var(--red-hover);
    outline-color: var(--red);
}

.btn-outline {
    display: inline-block;
    background: transparent;
    color: var(--text-white);
    padding: 0.8rem 2rem;
    border: 2px solid var(--text-white);
    text-decoration: none;
    font-weight: 900;
    transition: 0.3s;
    margin-top: auto;
}

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

.red-text {
    color: var(--red);
}

.red-line {
    width: 60px;
    height: 6px;
    background: var(--red);
    margin: 1.5rem 0;
}

.red-line.center {
    margin: 1.5rem auto 3rem;
}

.block-header {
    font-size: 3rem;
    letter-spacing: 2px;
}

.full-width {
    width: 100%;
}

.sm {
    padding: 0.5rem 1rem;
    font-size: 1.5rem;
}

/* Hero */
.hero {
    min-height: 100vh;
    background: var(--darker-bg);
    display: flex;
    align-items: center;
    padding: 0 5%;
}

.hero-wrapper {
    display: flex;
    align-items: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    gap: 4rem;
    margin-top: 60px;
}

.hero-left {
    flex: 1;
    z-index: 2;
}

.hero-right {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.hero-subtitle {
    color: var(--red);
    font-weight: 900;
    letter-spacing: 4px;
    margin-bottom: 1rem;
}

.huge-title {
    font-size: 6rem;
    line-height: 0.9;
    margin-bottom: 2rem;
    letter-spacing: -2px;
}

.quote {
    font-size: 1.2rem;
    font-style: italic;
    border-left: 4px solid var(--gray);
    padding-left: 1rem;
    margin-bottom: 3rem;
    color: #aaa;
}

.img-block img {
    width: 100%;
    max-width: 500px;
    box-shadow: 15px 15px 0px var(--red);
    border-radius: 20px;
}

/* About */
.about {
    padding: 8rem 0;
    background: var(--dark-bg);
}

.section-split {
    display: flex;
    gap: 3rem;
    align-items: stretch;
    justify-content: space-between;
}

.section-split > .block-img {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
}

.section-split > .block-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 20px;
}

.about-text-area {
    flex: 1 1 0;
    min-width: 0;
}

.about-text-area p {
    margin-bottom: 1.5rem;
    color: #ccc;
    font-size: 1.1rem;
    font-weight: 400;
    text-align: justify;
}

/* Quals & Courses */
.qualifications {
    padding: 6rem 0;
    background: var(--darker-bg);
    border-top: 1px solid var(--gray);
}

.credentials-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.cred-col {
    background: var(--dark-bg);
    padding: 2.5rem;
    border-top: 6px solid var(--red);
    position: relative;
}

.cred-year {
    position: absolute;
    top: -16px;
    right: 20px;
    background: var(--red);
    padding: 5px 15px;
    font-weight: 900;
    font-size: 1.2rem;
}

.courses-section {
    padding: 6rem 0;
    background: var(--dark-bg);
}

.slider-wrapper {
    overflow: hidden;
    margin-top: 2rem;
    position: relative;
}

.slider-track {
    display: flex;
    transition: transform 0.5s;
    gap: 2rem;
}

.course-card {
    min-width: calc(20% - 1.6rem);
    background: var(--darker-bg);
    padding: 1.5rem;
    border-left: 4px solid var(--red);
}

.course-card h4 {
    font-size: 0.95rem !important;
    line-height: 1.4;
    word-wrap: break-word;
    margin: 0.5rem 0 !important;
}

.course-card p {
    font-size: 0.85rem !important;
    line-height: 1.3;
}

.slider-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
}

/* Services 2x2 */
.services {
    padding: 8rem 0;
    background: var(--darker-bg);
    border-top: 1px solid var(--gray);
}

.services-2x2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}

.service-box {
    height: 600px;
    perspective: 1200px;
}

.box-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
}

/* PC Hover Flip */
.service-box:hover .box-inner {
    transform: rotateY(180deg);
}

.service-box.flipped .box-inner {
    transform: rotateY(180deg);
}

.box-front,
.box-back {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 4px solid var(--gray);
    background-color: var(--dark-bg);
    border-radius: 10px;
}

.box-front {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.box-back {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.box-front img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 6px;
}

.dark-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, var(--darker-bg) 10%, transparent);
    border-radius: 6px;
}

.box-front h3 {
    position: absolute;
    bottom: 30px;
    left: 30px;
    font-size: 2rem;
    z-index: 2;
    width: 80%;
}

.box-back {
    background: var(--red);
    transform: rotateY(180deg);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    border-color: var(--red);
    overflow-y: auto;
    text-align: left;
}

.box-back h3 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

.clean-list {
    list-style: none;
    margin: 1.5rem 0;
}

.clean-list li {
    margin-bottom: 0.5rem;
    font-weight: 700;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    padding-bottom: 0.5rem;
}

/* 2 Col Contact - Map removed, widened */
.contact {
    padding: 8rem 5%;
    background: var(--dark-bg);
}

.contact-2col-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.c-col {
    background: var(--darker-bg);
    padding: 3rem;
    border-top: 4px solid var(--red);
    border-radius: 10px;
}

.c-list {
    list-style: none;
    margin-top: 1.5rem;
}

.c-list li {
    margin-bottom: 1rem;
    font-weight: 700;
    color: #ccc;
    font-size: 1.2rem;
}

.heavy-form input,
.heavy-form textarea {
    width: 100%;
    padding: 1.2rem;
    margin-bottom: 1rem;
    background: var(--dark-bg);
    border: 2px solid var(--gray);
    color: var(--text-white);
    font-weight: 700;
    outline: none;
}

.heavy-form input:focus,
.heavy-form textarea:focus {
    border-color: var(--red);
}

/* Footer */
.footer {
    background: var(--darker-bg);
    padding: 3rem 0;
    border-top: 4px solid var(--red);
}

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

.foot-logo {
    font-weight: 900;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.foot-logo img {
    width: 35px;
    filter: brightness(0) invert(1);
}

.foot-rights {
    color: var(--gray);
    font-weight: 700;
}

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: var(--red);
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 2rem;
    font-weight: bold;
    opacity: 0;
    transition: 0.3s;
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);
    visibility: hidden;
}

.back-to-top:hover {
    cursor: pointer;
    background: var(--red-hover);
}

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

/* Responsive adjustments */
@media (max-width: 1200px) {
    .huge-title {
        font-size: 4rem;
    }
}

@media (min-width: 1000px) {
  .credentials-grid { grid-template-columns: repeat(2, 1fr) !important; }
}

.c-list { display: flex; flex-direction: column; gap: 0.5rem; margin-bottom: 3rem; }

@media (max-width: 1000px) {
    .burger-menu {
        display: block;
        z-index: 1001;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: var(--darker-bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        transition: right 0.4s ease;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
        gap: 3rem;
        margin: 0;
        z-index: 1000;
    }

    .nav-links.nav-active {
        right: 0;
    }

    .hero {
        min-height: auto;
        padding: 120px 5% 60px;
    }

    .hero-wrapper {
        flex-direction: column;
        text-align: center;
        margin-top: 0;
    }

    .hero-left,
    .hero-right {
        width: 100%;
    }

    .img-block img {
        max-width: 100%;
        box-shadow: 0 15px 0px var(--red);
    }

    /* Fix about me order */
    .section-split {
        flex-direction: column-reverse;
        align-items: center;
        text-align: center;
    }

    .about-text-area {
        text-align: center;
    }

    .about-text-area p {
        text-align: justify;
    }

    /* Grids to 1 column */
    .credentials-grid {
        grid-template-columns: 1fr;
    }

    .services-2x2 {
        grid-template-columns: 1fr;
    }

    .contact-2col-grid {
        grid-template-columns: 1fr;
    }

    .course-card {
        min-width: 100%;
    }

    .service-box {
        height: 600px;
    }

    /* iOS Safari backface-visibility workaround:
       Bypass 3D flip on mobile, use simple fade instead */
    .service-box .box-inner {
        transform: none !important;
        transform-style: flat;
    }

    .service-box .box-front {
        transform: none;
        opacity: 1;
        visibility: visible;
        transition: opacity 0.4s ease, visibility 0.4s ease;
        z-index: 2;
    }

    .service-box .box-back {
        transform: none;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.4s ease, visibility 0.4s ease;
        z-index: 1;
    }

    .service-box.flipped .box-front {
        opacity: 0;
        visibility: hidden;
    }

    .service-box.flipped .box-back {
        opacity: 1;
        visibility: visible;
    }

    .footer-flex {
        flex-direction: column;
        align-items: center !important;
        text-align: center;
        gap: 2rem;
    }

    .foot-logo {
        flex-direction: column;
        align-items: center !important;
        gap: 1rem;
    }

    .foot-rights {
        align-items: center !important;
        display: flex;
        flex-direction: column;
    }
}

/* Fitness Animations */
@keyframes weightDrop {
    0% {
        transform: translateY(-100px);
        opacity: 0;
    }

    40% {
        transform: translateY(0);
        opacity: 1;
    }

    50% {
        transform: translateY(-15px);
    }

    65% {
        transform: translateY(0);
    }

    80% {
        transform: translateY(-5px);
    }

    100% {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes heavyBreathing {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.03);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    10% {
        transform: scale(1.05);
    }

    20% {
        transform: scale(1);
    }

    30% {
        transform: scale(1.05);
    }

    50% {
        transform: scale(1);
    }

    100% {
        transform: scale(1);
    }
}

.hero h1,
.hero .headline,
.hero .huge-title,
.hero .display-title {
    animation: weightDrop 0.8s cubic-bezier(0.25, 1, 0.5, 1) forwards;
}

.hero img,
.hero-img,
.image-frame img,
.img-block img {
    animation: heavyBreathing 6s infinite ease-in-out;
}

.hero a.primary-btn,
.hero a.btn-solid,
.hero a.btn-elegant {
    animation: heartbeat 2.5s infinite;
}