/* General Body and Reset */
body, html {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    scroll-behavior: smooth; /* Smooth scrolling for anchor links */
    scroll-padding-top: var(--header-height, 72px); /* Set by JS, with a fallback */
}

/* Container for content width */
.container {
    width: 80%;
    margin: auto;
}

/* Header Styling */
header {
    background: rgba(230, 6, 22, 0.6); /* Semi-transparent red */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px); /* For Safari compatibility */
    color: #fff;
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* Softer shadow for glassy effect */
    border-bottom: 1px solid rgba(255, 255, 255, 0.2); /* Subtle edge highlight */
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative; /* Ensure content is above the ::before pseudo-element */
}

.logo-area {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo a {
    color: #fff;
    text-decoration: none;
}

.logo img {
    height: 80px; /* Adjust height as needed */
    height: 100px; /* Adjust height as needed */
    vertical-align: middle;
}

.logo {
    margin: 0;
    line-height: 1;
}

.motto {
    color: #fff;
    font-size: 1.05rem;
    font-weight: 300; /* Lighter weight for a more elegant feel */
    margin-top: 2px;
    text-shadow: 0 0 8px rgba(0, 0, 0, 0.7); /* Softer, darker glow */
    letter-spacing: 0.5px; /* A bit of breathing room */
}

/* Hamburger Menu Toggle */
.menu-toggle {
    display: none; /* Hidden by default */
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001; /* Above the doodle pseudo-element */
}
.menu-toggle .bar {
    width: 100%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animate hamburger to 'X' when active */
.menu-toggle.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

header nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

header nav ul li {
    display: inline;
    margin-left: 20px;
}

header nav ul li a {
    position: relative; /* Needed for the pseudo-element positioning */
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding-bottom: 5px; /* Add some space for the underline */
}

header nav ul li a:hover {
    /* The main hover effect is now on the underline pseudo-element */
}

/* Custom underline using a pseudo-element */
header nav ul li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0; /* Align the pseudo-element to the right */
    width: 100%;
    height: 3px; /* Creates a "bold" line */
    background-color: #fff;
    transition: all 0.3s ease-in-out;
}

header nav ul li a:hover::after {
    width: 50%; /* Shrink to half length from the left */
}

/* Hero Section */
.hero {
    background: linear-gradient(to left, rgba(0,0,0,0.7), rgba(0,0,0,0.1)), url('img/images/hero.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: right;
    padding: 150px 0 100px 0; /* Adjust padding to account for fixed header */
    display: flex;
    align-items: center;
    justify-content: flex-end;
    min-height: 100vh; /* Full viewport height */
    box-sizing: border-box;
    position: relative; /* For positioning child elements like the scroll arrow */
}

/* Subpage Hero Section */
.hero-subpage {
    background-size: cover;
    background-position: center;
    color: #fff;
    text-align: center;
    padding: 180px 0 120px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 50vh;
    box-sizing: border-box;
    position: relative;
}

.hero-subpage::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero-subpage .container {
    position: relative;
    z-index: 2;
}

.hero-subpage h2 {
    font-size: 3rem;
    margin-bottom: 20px;
    color: #fff; /* Override default section title color */
}

.hero-subpage p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 30px;
}

/* Buttons */
.btn {
    display: inline-block;
    background: #28a745; /* Green for call to action, contrasts with blue */
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s ease;
}

.btn:hover {
    background: #218838;
}

/* Content Sections */
.content-section {
    padding: 80px 0;
    text-align: center;
}

/* Specific hero backgrounds */
#skoleni-hero {
    background-image: url('img/images/hero.jpg');
}

.content-section h3 {
    font-size: 2.5rem;
    margin-bottom: 30px;
    color: rgb(230, 6, 22); /* Darker blue for section titles */
}

.bg-light-blue {
    background-color: rgb(248, 229, 231); /* Light blue background for contrast */
}

/* About Us Section */
#o-nas {
    /* This section is now centered by inheriting from .content-section */
}
.about-us-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

.about-us-text {
    max-width: 800px; /* Limit width for better readability */
    text-align: left; /* Keep text left-aligned inside the centered block */
}

.about-us-text > p {
    margin-top: 0;
    margin-bottom: 0;
    font-size: 1.25rem; /* Made text bigger */
    line-height: 1.7;
}

/* Management Section */
#kontakt {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)), url('img/images/ownerhero.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

#kontakt h3 {
    color: #fff; /* Make title white to stand out on the dark background */
}

.management-container {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap; /* Allows cards to stack on smaller screens */
}

.profile-card {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    text-align: center;
    flex-basis: 300px;
    max-width: 350px;
}

.profile-card img {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover; /* Prevents image distortion */
    margin-bottom: 15px;
    border: 3px solid #e7f1ff;
}

.profile-card h4 {
    margin-bottom: 5px;
    font-size: 1.5rem;
    color: rgb(230, 6, 22);
}

.profile-card .profile-title {
    font-style: italic;
    color: #555;
    margin-top: 0;
    margin-bottom: 10px;
}

.crew-card {
    flex-basis: 420px;
    padding: 25px;
}

.crew-card h4 {
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.crew-card p {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

.crew-card a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s ease;
}

.crew-card a:hover {
    color: rgb(230, 6, 22);
}

.team-slider-container {
    position: relative;
    margin-top: 40px;
    overflow: hidden; /* This will hide the cards that are outside the container */
}

/* Services Section - Badges */
.services-container {
    display: flex;
    justify-content: flex-start;
    gap: 30px; /* Adds space between items */
    padding-bottom: 20px; /* Keep some padding for shadow/aesthetics */
    transition: transform 0.5s ease-in-out;
}

.service-badge {
    position: relative;
    flex: 0 0 300px; /* Set a fixed width of 180px, and prevent shrinking/growing */
    cursor: pointer;
    overflow: hidden; /* Ensures description doesn't spill out */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.services-container .profile-card {
    flex-shrink: 0;
    width: 300px; /* Explicit width for consistent calculation */
}

.service-badge img {
    width: 100%;
    aspect-ratio: 1 / 1; /* Make images square */
    object-fit: cover; /* Prevents image distortion */
    display: block;
    transition: transform 0.3s ease;
}

.service-badge .badge-description {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 86, 179, 0.8); /* Semi-transparent blue */
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    opacity: 0;
    transition: opacity 0.3s ease;
    padding: 15px;
}

.service-badge:hover .badge-description {
    opacity: 1;
}

/* Training Cards on Skoleni Page */
.training-cards-container {
    display: flex;
    gap: 30px;
    margin-top: 50px;
    justify-content: center;
    flex-wrap: wrap;
}

.training-card {
    display: flex;
    flex-basis: 45%;
    min-width: 400px;
    max-width: 550px;
    aspect-ratio: 1 / 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.training-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.12);
}

.training-card-image {
    flex: 1 0 33.33%;
}

.training-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.training-card-content {
    flex: 2 1 66.67%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
}

.training-card-content h5 {
    font-size: 1.6rem;
    color: rgb(230, 6, 22); /* Brand Red */
    margin-top: 0;
    margin-bottom: 15px;
}

.training-card-content p {
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 0;
}

.training-card.right-image {
    flex-direction: row-reverse;
}

/* Recruitment Page Styles */
.job-openings {
    margin-top: 40px;
    margin-bottom: 40px;
    text-align: left;
}

.job-card {
    display: flex;
    align-items: stretch; /* Make children the same height */
    background: #fff; /* White background for cards */
    border: 1px solid #dde7f5; /* Light blue border */
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.07);
    transition: box-shadow 0.3s ease;
    overflow: hidden; /* Clip the image to the card's rounded corners */
}

.job-card-img {
    width: 180px; /* A bit wider for better visual balance */
    object-fit: cover;
    flex-shrink: 0; /* Prevent image from shrinking */
}

.job-card-content {
    flex: 1; /* Take remaining space */
    padding: 25px;
}

.job-card:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.job-card h5 {
    font-size: 1.4rem;
    color: #0056b3;
    margin-top: 0;
    margin-bottom: 15px;
}

.application-process {
    text-align: center;
    margin-top: 40px;
}

/* Client References Section */
#reference {
    position: relative;
    padding: 80px 0;
    overflow: hidden;
    color: #fff;
    --ref-bg-image: url('img/images/spartan.jpg'); /* Default background */
}

#reference::before { /* Background Image Layer */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: var(--ref-bg-image);
    background-size: cover;
    background-position: center;
    z-index: -2;
    opacity: 1;
    transition: opacity 0.4s ease-in-out;
}

#reference.is-changing::before {
    opacity: 0;
}

#reference::after { /* Dark Overlay Layer */
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: -1;
}

#reference h3 {
    color: #fff;
    text-align: center;
}

.slider-container {
    position: relative;
    width: 100%;
    max-width: 800px; /* Max width of the content box */
    margin: auto;
}

.slides-wrapper {
    display: flex;
    transition: transform 0.5s ease-in-out;
}

.slide {
    flex: 0 0 100%;
    box-sizing: border-box;
    padding: 0 10px; /* Some spacing so card doesn't touch edges */
}

.reference-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 30px;
    text-align: left;
    min-height: 280px; /* Give a min-height to avoid layout jumps */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.reference-header {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    gap: 20px;
}

.client-logo {
    width: 80px;
    height: 80px;
    object-fit: contain; /* Use contain to not crop logos */
    flex-shrink: 0;
}

/* If logo is missing, don't show the broken image icon */
.client-logo[src=""] {
    display: none;
}

.client-info {
    flex-grow: 1;
}

.client-name {
    font-size: 1.4rem;
    font-weight: bold;
    margin: 0;
}

.reference-author {
    font-style: italic;
    margin: 5px 0 0 0;
    opacity: 0.8;
}

/* If author is missing, don't take up space */
.reference-author:empty {
    display: none;
}

.reference-quote {
    font-size: 1.1rem;
    margin: 0;
    padding: 0;
    font-style: italic;
}

.slider-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    /* For SVG icons */
    background-repeat: no-repeat;
    background-position: center;
    background-size: 40%;
}

.slider-nav:hover {
    background-color: rgba(0, 0, 0, 0.6);
    transform: translateY(-50%) scale(1.05);
}

.slider-nav:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    background-color: rgba(0, 0, 0, 0.3); /* Ensure it doesn't use hover style */
    transform: translateY(-50%);
}

.slider-nav.prev { 
    left: -55px; 
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='15 18 9 12 15 6'%3e%3c/polyline%3e%3c/svg%3e");
}
.slider-nav.next { 
    right: -55px; 
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='9 18 15 12 9 6'%3e%3c/polyline%3e%3c/svg%3e");
}

/* Overrides for team slider nav buttons */
#team .slider-nav {
    background-color: rgba(230, 6, 22, 0.7);
}
#team .slider-nav:hover {
    background-color: rgba(255, 6, 22, 0.7);
}
#team .slider-nav.prev { left: 10px; }
#team .slider-nav.next { right: 10px; }

/* Dozory Page Hero Section */
#dozory-hero {
    width: 100%;
    height: 65vh; /* A substantial height */
    min-height: 500px;
    padding-top: var(--header-height, 72px);
    box-sizing: border-box;
    background: #000; /* Fallback background */
}

.dozory-hero-container {
    display: flex;
    width: 100%;
    height: 100%;
}

.dozory-hero-block {
    flex: 1;
    position: relative;
    overflow: hidden;
    cursor: pointer;
    transition: flex 0.4s ease;
}

.dozory-hero-block:hover {
    flex: 1.2;
}

.dozory-hero-block img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.dozory-hero-block:hover img {
    transform: scale(1.05);
}

.hero-block-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    color: #fff;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.hero-block-content h5 {
    font-size: 1.8rem;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    transition: font-size 0.4s ease;
}

.hero-block-content p {
    margin: 10px 0 0 0;
    max-height: 0;
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.4s ease 0.1s; /* Add a slight delay */
}

.dozory-hero-block:hover .hero-block-content {
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    height: 100%;
    top: 0;
    justify-content: center;
    text-align: center;
    padding: 30px;
}

.dozory-hero-block:hover .hero-block-content h5 {
    font-size: 2.2rem;
}

.dozory-hero-block:hover .hero-block-content p {
    max-height: 200px;
    opacity: 1;
    transform: translateY(0);
}

/* Scroll Down Arrow for Hero Sections */
.scroll-down-arrow {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 24px;
    z-index: 5;
    cursor: pointer;
}

.scroll-down-arrow::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-left: 3px solid #fff;
    border-bottom: 3px solid #fff;
    transform: rotate(-45deg);
    animation: bounce 2s infinite;
    box-sizing: border-box;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) rotate(-45deg); }
    40% { transform: translateY(-15px) rotate(-45deg); }
    60% { transform: translateY(-10px) rotate(-45deg); }
}

/* Dozory Timeline Section */
#dozory-timeline {
    padding: 80px 0;
    background: #fff;
}

.timeline-container {
    display: flex;
    justify-content: space-around;
    gap: 30px;
    margin-top: 50px;
    position: relative; /* For the connecting line */
}

/* The connecting line for desktop */
.timeline-container::before {
    content: '';
    position: absolute;
    top: 31px; /* Vertically centered with the 60px circles */
    left: 17%; /* Start position of the line */
    width: 66%; /* Width of the line to connect centers */
    height: 2px;
    background-color: #dde7f5;
    z-index: 0; /* Behind the number circles */
}

.timeline-step {
    flex: 1;
    text-align: center;
    max-width: 300px;
}

.timeline-number {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: rgb(230, 6, 22);
    color: #fff;
    font-size: 2rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    border: 3px solid #e7f1ff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    position: relative; /* To ensure it's above the line */
    z-index: 1;
}

.timeline-step h5 {
    font-size: 1.3rem;
    color: rgb(196, 5, 18);
    margin-bottom: 10px;
}

/* Footer Styling */
footer {
    background: #2b2b2b;
    color: #ccc;
}

.footer-main {
    padding: 60px 0;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
}

.footer-column {
    flex: 1;
    min-width: 250px;
}

.footer-column.footer-about {
    flex-grow: 1.5; /* Give the about column a bit more space */
}

.footer-logo {
    max-width: 200px;
    margin-bottom: 20px;
}

.footer-about p {
    line-height: 1.7;
    color: #aaa;
    max-width: 350px;
}

.footer-column h4 {
    color: #fff;
    font-size: 1.2rem;
    margin-top: 0;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-column h4::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 40px;
    height: 2px;
    background-color: rgb(230, 6, 22); /* Brand red */
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links ul li {
    margin-bottom: 12px;
}

.footer-links ul li a,
.footer-contact address a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links ul li a:hover,
.footer-contact address a:hover {
    color: #fff;
    padding-left: 5px;
}

/* Responsive Design */
@media (max-width: 768px) {
    /* Header and Navigation */
    header .container {
        flex-wrap: wrap; /* Allow nav to wrap to a new line */
    }

    .logo img {
        height: 75px; /* Smaller logo on mobile */
    }
    .motto {
        font-size: 0.8rem;
        margin-top: 0;
    }
    .menu-toggle {
        display: flex; /* Show hamburger */
    }
    header nav {
        /* The nav now expands within the header, not as a separate block below */
        flex-basis: 100%; /* Take up full width to wrap onto a new line */
        order: 99; /* Ensure it's the last item in the flex row before wrapping */
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease-out;
    }
    header nav.active {
        max-height: 500px; /* A large enough value to show all items */
    }
    header nav ul {
        flex-direction: column;
        width: 100%;
        padding: 10px 0;
    }
    header nav ul li {
        display: block;
        margin: 0;
        text-align: center;
    }
    /* Hide the divider on mobile */
    header nav ul li:not(:has(a)) {
        display: none;
    }

    header nav ul li a {
        display: block;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    header nav ul li a::after {
        display: none; /* Hide the underline effect on mobile nav */
    }

    /* Hero Section */
    .hero {
        text-align: center;
        padding-top: 120px;
        padding-bottom: 80px;
        justify-content: center;
    }
    .hero h2 {
        font-size: 2.5rem;
    }

    /* General Sections */
    .content-section h3 {
        font-size: 2rem;
    }

    /* About Us section responsive */
    .about-us-wrapper {
        flex-direction: column;
        text-align: center;
    }
    .about-us-image {
        margin-top: 20px;
        width: 80%;
        margin-left: auto;
        margin-right: auto;
        min-height: 65vw; /* Adjust height for mobile layout */
    }

    /* Footer Responsive */
    .footer-grid {
        flex-direction: column;
        text-align: center;
    }
    .footer-about p, .footer-logo {
        margin-left: auto;
        margin-right: auto;
    }
    .footer-column h4::after {
        left: 50%;
        transform: translateX(-50%);
    }

    /* Recruitment Page Job Cards */
    .job-card {
        flex-direction: column;
    }
    .job-card-img {
        width: 100%;
        height: 200px; /* Give a fixed height to prevent distortion */
    }

    /* Dozory Hero Section Responsive */
    #dozory-hero {
        height: auto;
    }
    .dozory-hero-container {
        flex-direction: column;
    }
    .dozory-hero-block {
        height: 45vh;
        min-height: 300px;
    }
    .dozory-hero-block:hover {
        flex: 1; /* Disable grow effect on mobile */
    }

    /* Dozory Timeline Responsive */
    .timeline-container {
        flex-direction: column;
        align-items: center;
        gap: 40px;
    }

    /* Hide the connecting line on mobile */
    .timeline-container::before {
        display: none;
    }
}

.footer-contact address {
    font-style: normal;
    line-height: 1.8;
}

.footer-bottom {
    background: #1a1a1a;
    padding: 20px 0;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    border-top: 1px solid #444;
}
.footer-bottom .container p {
    margin: 0;
}

@media (max-width: 950px) {
    .slider-nav.prev {
        left: 10px;
    }
    .slider-nav.next {
        right: 10px;
    }
    .reference-header {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }
}


/* For very small screens */
@media (max-width: 480px) {
    .service-badge {
        flex-basis: 90%; /* Stack badges vertically */
    }
    .profile-card {
        flex-basis: 100%;
    }
}

@media (max-width: 900px) {
    .training-card {
        flex-basis: 80%;
        min-width: 300px;
        aspect-ratio: auto; /* Let height be determined by content on mobile */
    }
}

@media (max-width: 600px) {
    .training-card {
        flex-direction: column !important; /* Force stacking image and text, overrides .right-image */
    }
    .training-card-image {
        height: 200px; /* Give image a fixed height */
        flex-basis: auto;
    }
    .training-card-content {
        padding: 25px;
    }
}