/* =========================================
   RESET & BASICS
========================================= */
* {
    box-sizing: border-box;
}
.center-box {
        display: flex;
        justify-content: center;
        align-items: center;
    }

.center-box a {
	display: flex;
    align-items: center;     /* vertical alignment */
    justify-content: center; 
        font-family: "Schibsted Grotesk", sans-serif;
        font-weight: 900;
        font-size: 14px;
        color: #000000; /* black */
        text-decoration: none;
        transition: color 0.2s ease;
				padding: 10px 0
    }

    .center-box a:hover {
        color: var(--primary, #FF4D4D); /* primary color */
    }
.center-box a i {
    font-size: 18px;     /* increased icon size */
    font-weight: 900;    /* bold icon */
    margin-right: 12px;
}

/* =========================================
   CAROUSEL CONTAINER
========================================= */
.carousel {
    max-width: 1100px;
    margin: 24px auto;
    position: relative;
    /* Changed to visible so shadows/3D corners don't get cut off */
    overflow: visible; 
    padding: 10px 0;
}

.carousel-track {
    display: flex;
    transition: transform 450ms cubic-bezier(.25,.8,.25,1);
    padding: 0 10px; /* Small side padding for safety */
}

.carousel-slide {
    min-width: 100%;
    padding: 10px; /* Spacing between slides */
    display: flex;
    justify-content: center;
}

/* =========================================
   TEAM CARD (The Main Box)
========================================= */
.team-card {
    display: flex;
    width: 100%;
    max-width: 1000px; /* Limits width on large screens */
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    align-items: center; /* Vertically centers image and text */
    padding: 30px;
    gap: 40px; /* Space between Image and Text */
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

/* =========================================
   FLIP IMAGE BOX (Left Side)
========================================= */
.flip-card {
    width: 280px;  /* Fixed width */
    height: 380px; /* Fixed height */
    perspective: 1000px;
    flex-shrink: 0; /* Prevents image from squishing */
    z-index: 1;
}

.flip-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.8s ease;
}

/* Hover Effect (Desktop) */
.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

/* FRONT & BACK FACES */
.flip-card-front,
.flip-card-back {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* FRONT IMAGE */
.flip-card-front {
    background: #fff;
    z-index: 2;
}

.flip-card-front img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills box nicely */
    display: block;
}

/* BACK CONTENT */
.flip-card-back {
    background: #1a1a1a;
    color: #fff;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    z-index: 1;
}

.flip-card-back h2 { margin: 0 0 10px; font-size: 22px; color: #FF4D4D; }
.flip-card-back p { margin: 0; font-size: 14px; color: #ddd; }

/* =========================================
   RIGHT SIDE CONTENT (Text)
========================================= */
.team-right {
    flex: 1; /* Takes remaining space */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.text-box {
    width: 100%;
}

.main-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 15px 0;
    color: #222;
}

.desc {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    margin-bottom: 10px;
}

/* BUTTON */
.close-btn {
    display: inline-block;
    background: #FF4D4D;
    color: #fff;
    padding: 12px 28px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 10px;
    transition: background 0.3s;
}

/* =========================================
   NAVIGATION & PAGINATION
========================================= */
.carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none; /* Allows clicking through the empty space */
    padding: 0 10px;
    z-index: 10;
}

.carousel-nav button {
    pointer-events: auto;
    background: #FF4D4D;
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-weight: bold;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.carousel-nav button:hover { background: #d14900; }

.pagination {
    text-align: center;
    margin-top: 10px;
}
.pagination-dot {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background: #ccc;
    border-radius: 50%;
    cursor: pointer;
}
.pagination-dot.active { background: #FF4D4D; transform: scale(1.2); }

/* =========================================
   RESPONSIVE DESIGN (Fixes Overlap)
========================================= */

/* TABLET & MOBILE (Anything smaller than 768px) */
@media (max-width: 768px) {
    .team-card {
        flex-direction: column; /* Stack vertically */
        text-align: center;
        padding: 20px; /* Add padding so text doesn't touch edges */
        gap: 60px !important;
        height: auto !important;
			width:95vw !important;
    }
	#prevBtn{
		position:relative;
		left:-30px;
	}
		#nextBtn{
		position:relative;
		left:30px;
	}
    /* Flip Card adjustments for mobile */
    .flip-card {
        width: 100%;
        max-width: 280px; /* Keep image from getting too huge */
        height: 425px; 
        margin: 0 auto; /* Center the image */
    }
	.flip-card-front,
.flip-card-back {
    height:425px !important;
	}

    .team-right {
        width: 100%;
        padding: 0;
    }

    .main-title { font-size: 22px; }
    .desc { font-size: 15px; }

    /* Move navigation buttons slightly for mobile so they don't cover text */
    .carousel-nav {
        width: 100%;
        padding: 0 5px;
    }
}