/* =====================================================
   Delo.Fitness - Dynamic Reveal Design
   Personal Trainer Website - DELO.FITNESS
   Color Scheme: Black background, White text, Lapis Blue accent
   ===================================================== */

/* ----- CSS Reset & Base Styles ----- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: #000000;
    color: #E0E0E0;
    line-height: 1.9;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Oswald', sans-serif;
    color: #FFFFFF;
    font-weight: 700;
    letter-spacing: 2px;
}

/* ----- Navigation ----- */
.navbar {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95), rgba(0, 10, 20, 0.95));
    backdrop-filter: blur(15px);
    padding: 1rem 2.5rem;
    border-bottom: 1px solid rgba(38, 97, 156, 0.2);
    z-index: 1000;
}

.navbar-brand {
    display: flex;
    align-items: center;
    font-family: 'Oswald', sans-serif;
    font-size: 1.7rem;
    font-weight: 700;
    color: #FFFFFF !important;
    letter-spacing: 4px;
    transition: all 0.4s ease;
    text-shadow: 0 0 20px rgba(38, 97, 156, 0.5);
}

.navbar-brand:hover {
    color: #26619C !important;
    transform: scale(1.05);
}

.logo-img {
    height: 45px;
    width: auto;
    margin-right: 15px;
    filter: drop-shadow(0 0 10px rgba(38, 97, 156, 0.4));
}

.nav-link {
    color: #E0E0E0 !important;
    font-weight: 600;
    margin: 0 1rem;
    padding: 0.6rem 1.2rem !important;
    position: relative;
    transition: all 0.4s ease;
    font-size: 1.05rem;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, rgba(38, 97, 156, 0.2), transparent);
    border-left: 3px solid #26619C;
    transition: width 0.4s ease;
    z-index: -1;
}

.nav-link:hover,
.nav-link.active {
    color: #26619C !important;
}

.nav-link:hover::before,
.nav-link.active::before {
    width: 100%;
}

.navbar-toggler {
    border-color: #26619C;
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(38, 97, 156, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ----- Hero Section with Animated Shapes ----- */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    z-index: 0;
    animation: heroSlideshow 20s infinite, heroPosition 20s infinite;
}

@keyframes heroSlideshow {
    0%, 20% {
        background-image: url('images/pt/Olmo-15.jpg');
    }
    25%, 45% {
        background-image: url('images/pt/Olmo-23.jpg');
    }
    50%, 70% {
        background-image: url('images/pt/Olmo-11.jpg');
    }
    75%, 95% {
        background-image: url('images/pt/Olmo-2.jpg');
    }
    100% {
        background-image: url('images/pt/Olmo-15.jpg');
    }
}

@keyframes heroPosition {
    0%, 20% {
        background-position: center 35%; /* Olmo-15 - portrait, face higher */
    }
    25%, 45% {
        background-position: center 30%; /* Olmo-23 - smiling portrait, face priority */
    }
    50%, 70% {
        background-position: center 35%; /* Olmo-11 - barbell portrait */
    }
    75%, 95% {
        background-position: center 40%; /* Olmo-2 - dumbbell, more body visible */
    }
    100% {
        background-position: center 35%; /* Back to Olmo-15 */
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.6), rgba(5, 20, 35, 0.9));
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 3;
    padding: 3rem;
}

.hero-title {
    font-size: 7rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 1.5rem;
    letter-spacing: 15px;
    text-shadow: 0 0 40px rgba(38, 97, 156, 0.8), 0 0 80px rgba(53, 117, 184, 0.5);
}

.hero-subtitle {
    font-size: 1.7rem;
    color: #E0E0E0;
    margin-bottom: 3rem;
    font-weight: 300;
    letter-spacing: 4px;
}

/* Animated geometric shapes */
.hero-shapes {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.shape {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(38, 97, 156, 0.3), transparent);
    animation: float 20s infinite ease-in-out;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: 20%;
    right: 15%;
    animation-delay: -7s;
}

.shape-3 {
    width: 250px;
    height: 250px;
    bottom: 10%;
    left: 20%;
    animation-delay: -14s;
}

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

/* ----- Buttons ----- */
.cta-button {
    background: linear-gradient(135deg, #26619C, #3575B8);
    border: none;
    color: #000000;
    padding: 1.3rem 3.5rem;
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: 2px;
    border-radius: 50px;
    transition: all 0.5s ease;
    text-decoration: none;
    display: inline-block;
    box-shadow: 0 8px 30px rgba(38, 97, 156, 0.5);
    position: relative;
    overflow: hidden;
}

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

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

.cta-button:hover {
    background: linear-gradient(135deg, #3575B8, #26619C);
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 12px 40px rgba(53, 117, 184, 0.7);
    color: #000000;
}

.btn-outline-primary {
    border: 2px solid #26619C;
    color: #26619C;
    background-color: transparent;
    padding: 1.1rem 2.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    border-radius: 50px;
    transition: all 0.5s ease;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, #26619C, #3575B8);
    border-color: transparent;
    color: #000000;
    transform: translateY(-4px);
    box-shadow: 0 10px 35px rgba(38, 97, 156, 0.6);
}

/* ----- Dynamic Reveal Animations ----- */
.dynamic-reveal {
    opacity: 0;
    transition: all 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.dynamic-reveal.visible {
    opacity: 1;
}

/* Slide animations */
.slide-in-bottom {
    transform: translateY(60px);
}

.slide-in-bottom.visible {
    transform: translateY(0);
}

.slide-in-left {
    transform: translateX(-80px);
}

.slide-in-left.visible {
    transform: translateX(0);
}

.slide-in-right {
    transform: translateX(80px);
}

.slide-in-right.visible {
    transform: translateX(0);
}

/* Scale animation */
.scale-in {
    transform: scale(0.8);
}

.scale-in.visible {
    transform: scale(1);
}

/* Rotate animation */
.rotate-in {
    transform: rotate(-5deg) scale(0.9);
}

.rotate-in.visible {
    transform: rotate(0deg) scale(1);
}

/* Fade animation */
.fade-in {
    opacity: 0;
}

.fade-in.visible {
    opacity: 1;
}

/* ----- Section Styles ----- */
section {
    padding: 140px 0;
    position: relative;
}

.section-heading {
    font-size: 4rem;
    margin-bottom: 4rem;
    color: #FFFFFF;
    letter-spacing: 5px;
    text-transform: uppercase;
    position: relative;
    display: inline-block;
    text-shadow: 0 0 20px rgba(38, 97, 156, 0.5);
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 5px;
    background: linear-gradient(90deg, #26619C, #3575B8);
    box-shadow: 0 0 20px rgba(38, 97, 156, 0.8);
}

/* ----- Sticky Sections ----- */
.sticky-section {
    position: relative;
    min-height: 100vh;
}

.sticky-container {
    position: sticky;
    top: 100px;
    padding: 80px 0;
}

/* ----- About Section ----- */
.about-section {
    background: linear-gradient(135deg, #000000, #051419);
    padding: 140px 0;
}

.about-image-wrapper {
    position: relative;
    padding: 20px;
}

.image-frame {
    position: relative;
    border: 3px solid #26619C;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(38, 97, 156, 0.4);
    transform: rotate(-2deg);
    transition: transform 0.5s ease;
}

.image-frame:hover {
    transform: rotate(0deg) scale(1.02);
}

.image-frame img {
    width: 100%;
    height: auto;
    display: block;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, rgba(38, 97, 156, 0.2), transparent);
    pointer-events: none;
}

.about-content {
    padding: 2rem 0;
}

.bio-content p {
    font-size: 1.2rem;
    line-height: 2.2;
    margin-bottom: 2rem;
    color: #E0E0E0;
}

/* ----- Services Section (Asymmetric Layout) ----- */
.services-section {
    background: radial-gradient(ellipse at top, #051419, #000000);
    padding: 140px 0;
}

.services-asymmetric {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin-top: 3rem;
}

.service-block {
    position: relative;
    overflow: hidden;
    border-radius: 16px;
    transition: all 0.5s ease;
    min-height: 280px;
}

.service-large {
    /* All cards same width now */
}

.service-medium {
    /* All cards same width now */
}

.service-small {
    /* All cards same width now */
}

.service-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #0f0f0f, #1a0f1a);
    border: 1px solid rgba(38, 97, 156, 0.3);
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
}

.service-inner::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(38, 97, 156, 0.15), transparent 70%);
    transition: transform 0.8s ease;
}

.service-block:hover .service-inner::before {
    transform: translate(-25%, -25%);
}

.service-block:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(38, 97, 156, 0.4);
}

.service-number {
    font-size: 4rem;
    font-family: 'Oswald', sans-serif;
    font-weight: 700;
    background: linear-gradient(135deg, #26619C, #3575B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.3;
    margin-bottom: 1rem;
    position: relative;
    z-index: 1;
}

.service-title {
    font-size: 1.4rem;
    color: #FFFFFF;
    margin-bottom: 1rem;
    letter-spacing: 1px;
    position: relative;
    z-index: 1;
}

.service-description {
    font-size: 1rem;
    line-height: 1.8;
    color: #CCCCCC;
    position: relative;
    z-index: 1;
}

/* ----- Gallery Section ----- */
.gallery-section {
    background-color: #000000;
}

.carousel-inner {
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.9);
    border: 2px solid rgba(38, 97, 156, 0.3);
}

.carousel-item img {
    max-height: 700px;
    object-fit: cover;
    width: 100%;
    object-position: center center; /* Default */
}

/* Individual image positioning for client images in gallery */
.carousel-item img[src*="clients/Olmo-30"] {
    object-position: center 35%; /* Client consultation - faces visible */
}

.carousel-item img[src*="clients/Olmo-28"] {
    object-position: center 40%; /* Client training - upper body focus */
}

.carousel-item img[src*="clients/Olmo-22"] {
    object-position: center 40%; /* Client progress - centered */
}

.carousel-item img[src*="clients/Olmo-39"] {
    object-position: center 35%; /* Client workout - torso focus */
}

.carousel-item img[src*="clients/Olmo-47"] {
    object-position: center 40%; /* Client success - centered */
}

.carousel-item img[src*="clients/Olmo-50"] {
    object-position: center 35%; /* Client transformation - face priority */
}

.carousel-item img[src*="clients/Olmo-54"] {
    object-position: center 40%; /* Client achievement - centered */
}

.carousel-item img[src*="clients/Olmo-57"] {
    object-position: center 35%; /* Client journey - upper body focus */
}

/* About section PT image positioning */
.about-image-wrapper img[src*="pt/Olmo-27"] {
    object-position: center 30%; /* PT demonstration - upper body and face visible */
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    filter: drop-shadow(0 4px 8px rgba(38, 97, 156, 0.8));
}

.carousel-indicators button {
    background-color: #26619C;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    opacity: 0.5;
}

.carousel-indicators button.active {
    opacity: 1;
    box-shadow: 0 0 15px rgba(38, 97, 156, 1);
}

/* ----- Location Section ----- */
.location-section {
    background: linear-gradient(135deg, #051419, #000000);
}

.location-card {
    background: linear-gradient(135deg, #0f0f0f, #1a0f1a);
    border: 2px solid rgba(38, 97, 156, 0.4);
    padding: 4.5rem;
    border-radius: 16px;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.5s ease;
}

.location-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(53, 117, 184, 0.15), transparent 60%);
    animation: pulse 3s infinite ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.8;
    }
}

.location-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 50px rgba(53, 117, 184, 0.5);
}

.location-icon-wrapper {
    margin-bottom: 2rem;
    position: relative;
    z-index: 1;
}

.location-icon {
    color: #3575B8;
    filter: drop-shadow(0 0 20px rgba(53, 117, 184, 0.8));
}

.location-name {
    font-size: 2.2rem;
    color: #FFFFFF;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 1;
}

.location-address {
    font-size: 1.4rem;
    color: #E0E0E0;
    margin-bottom: 2rem;
    line-height: 2;
    position: relative;
    z-index: 1;
}

.location-link {
    color: #E0E0E0;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
}

.location-link:hover {
    color: #3575B8;
    transform: translateY(-2px);
}

.location-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #26619C, #3575B8);
    transition: width 0.3s ease;
}

.location-link:hover::after {
    width: 100%;
}

.location-note {
    font-size: 1.15rem;
    background: linear-gradient(135deg, #26619C, #3575B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-style: italic;
    font-weight: 600;
    position: relative;
    z-index: 1;
}

/* ----- Contact Section ----- */
.contact-section {
    background: radial-gradient(ellipse at bottom, #051419, #000000);
    padding: 140px 0 80px;
}

.contact-intro {
    font-size: 1.35rem;
    color: #E0E0E0;
    margin-bottom: 3.5rem;
    line-height: 2.1;
}

.contact-buttons {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

.contact-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.contact-buttons svg {
    vertical-align: middle;
}

/* ----- Footer ----- */
.footer {
    background-color: #000000;
    padding: 4rem 0 3rem;
    border-top: 1px solid rgba(38, 97, 156, 0.2);
}

.footer-brand {
    font-family: 'Oswald', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #26619C, #3575B8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 1rem;
    letter-spacing: 3px;
}

.footer-copyright {
    font-size: 1rem;
    color: #888888;
    margin: 0;
}

/* ----- Responsive Design ----- */

/* Tablet (991px and below) */
@media (max-width: 991px) {
    .hero-title {
        font-size: 4.5rem;
        letter-spacing: 8px;
    }

    .hero-subtitle {
        font-size: 1.4rem;
    }

    .section-heading {
        font-size: 3rem;
    }

    .services-asymmetric {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .service-large,
    .service-medium,
    .service-small {
        grid-column: span 1;
        grid-row: span 1;
    }

    .sticky-container {
        position: static;
    }
}

/* Mobile (767px and below) */
@media (max-width: 767px) {
    .hero-title {
        font-size: 3rem;
        letter-spacing: 4px;
    }

    .hero-subtitle {
        font-size: 1.2rem;
        letter-spacing: 2px;
    }

    .section-heading {
        font-size: 2.5rem;
        letter-spacing: 2px;
    }

    section {
        padding: 100px 0;
    }

    .navbar {
        padding: 1rem;
    }

    .navbar-brand {
        font-size: 1.4rem;
    }

    .logo-img {
        height: 38px;
    }

    .shape {
        display: none; /* Hide animated shapes on mobile */
    }

    .about-content {
        padding: 2rem 1rem;
    }

    .bio-content p {
        font-size: 1.1rem;
    }

    .service-inner {
        padding: 2rem;
    }

    .service-number {
        font-size: 3rem;
    }

    .service-title {
        font-size: 1.2rem;
    }

    .carousel-item img {
        max-height: 500px;
    }

    /* Adjust positioning for tablet screens */
    .carousel-item img[src*="clients/Olmo-30"],
    .carousel-item img[src*="clients/Olmo-50"],
    .carousel-item img[src*="clients/Olmo-57"] {
        object-position: center 40%;
    }

    .carousel-item img[src*="clients/Olmo-39"] {
        object-position: center 40%;
    }

    /* Tablet: Adjust hero positioning animation for smaller viewport */
    @keyframes heroPosition {
        0%, 20% {
            background-position: center 40%; /* Olmo-15 - show more face on tablet */
        }
        25%, 45% {
            background-position: center 35%; /* Olmo-23 */
        }
        50%, 70% {
            background-position: center 40%; /* Olmo-11 */
        }
        75%, 95% {
            background-position: center 45%; /* Olmo-2 */
        }
        100% {
            background-position: center 40%;
        }
    }

    .location-card {
        padding: 3rem 2rem;
    }

    .contact-buttons {
        width: 100%;
    }

    .contact-buttons .btn {
        width: 100%;
    }

    .cta-button,
    .btn-outline-primary {
        padding: 1.1rem 2.2rem;
        font-size: 1.05rem;
    }
}

/* Extra small devices */
@media (max-width: 575px) {
    .hero-title {
        font-size: 2.3rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .section-heading {
        font-size: 2.2rem;
    }

    /* Mobile-specific image positioning - more aggressive to keep faces visible */
    .carousel-item img {
        max-height: 400px;
    }

    .carousel-item img[src*="clients/Olmo-30"] {
        object-position: center 45%; /* Client faces - ensure visible in mobile */
    }

    .carousel-item img[src*="clients/Olmo-28"],
    .carousel-item img[src*="clients/Olmo-22"],
    .carousel-item img[src*="clients/Olmo-47"],
    .carousel-item img[src*="clients/Olmo-54"] {
        object-position: center 45%;
    }

    .carousel-item img[src*="clients/Olmo-39"],
    .carousel-item img[src*="clients/Olmo-50"],
    .carousel-item img[src*="clients/Olmo-57"] {
        object-position: center 40%;
    }

    /* Mobile: Adjust hero positioning animation for mobile viewport */
    @keyframes heroPosition {
        0%, 20% {
            background-position: center 45%; /* Olmo-15 - ensure face visible on mobile */
        }
        25%, 45% {
            background-position: center 40%; /* Olmo-23 */
        }
        50%, 70% {
            background-position: center 45%; /* Olmo-11 */
        }
        75%, 95% {
            background-position: center 50%; /* Olmo-2 - show more body */
        }
        100% {
            background-position: center 45%;
        }
    }

    .about-image-wrapper img {
        object-position: center 35%;
    }
}

/* ----- Accessibility ----- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .shape {
        animation: none;
    }
}

a:focus,
button:focus,
.nav-link:focus {
    outline: 3px solid #26619C;
    outline-offset: 3px;
}

@media (prefers-contrast: high) {
    .service-inner,
    .location-card {
        border: 3px solid #26619C;
    }

    .nav-link::before {
        border-left-width: 4px;
    }
}
