*, *::before, *::after {
    box-sizing: border-box;
}

html {
	scroll-behavior: smooth;
}

body {
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 100vh;
	background: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)),
		url('../images/automotive.jpg');
	background-size: cover;
	background-position: center;
	background-attachment: fixed;
	background-repeat: no-repeat;
}

body.home-mode {
    background: #000;
}

header {
	display: flex;
	align-items: center;
	margin-top: 0;
	position: sticky;
	top: 0;
	z-index: 1000;
	animation: slideDown 1s ease forwards;
	width: 100%;
	background-color: #000;
	justify-content: center;
	padding: 10px 0;
}

.nav-bar {
	background-color: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	border-radius: 8vw;
	position: relative;
	z-index: 2;
}

.nav {
	flex: 1;
	padding: 15px 20px;
	color: #fff;
	text-align: center;
	text-decoration: none;
	font-family: 'Poppins', sans-serif;
	font-size: 1.3rem;
	cursor: pointer;
	transition: 0.3s;
}

.nav:hover {
	background-color: orange;
	border-radius: 4vw;
}

.logo {
	height: 80px;
	width: 80px;
	position: absolute;
	left: 50px;
	top: 50%;
	transform: translateY(-50%);
	margin-right: 0;
	z-index: 3;
	border-radius: 50%;
	overflow: hidden;
}

.logo img {
	height: 100%;
	width: 100%;
	object-fit: cover;
}

#menu-icon {
	display: none;
	font-size: 2rem;
	color: #fff;
	cursor: pointer;
}

.nav.active {
	color: #fff;
	border-radius: 8vw 0 0 8vw;
	background: #99d5ea33;
}

#main {
	width: 100%;
	display: flex;
	flex-direction: column;
}

/* Hide sections initially to prevent content flash, except home */
#main > section:not(#home) {
    display: none;
}

#home {
	width: 100%;
	height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	overflow: hidden;
}

.hero-info {
	align-self: center;
	margin-left: 0;
	margin-top: 0;
	color: #fff;
	font-family: 'Poppins', sans-serif;
	max-width: 800px;
	text-align: center;
	position: relative;
	z-index: 2;
}

.hero-info h1 {
	font-size: 3.5rem;
	font-weight: 800;
	text-transform: uppercase;
	line-height: 1.1;
	margin-bottom: 20px;
	opacity: 0;
	animation: slideRight 1s ease forwards 0.5s;
}

.hero-info p {
	font-size: 1.3rem;
	line-height: 1.6;
	text-align: center;
	opacity: 0;
	animation: slideRight 1s ease forwards 0.8s;
}

.btn {
	display: inline-block;
	margin-top: 2px;
	padding: 10px 30px;
	border: 2px solid orange;
	color: #fff;
	text-decoration: none;
	transition: 0.3s;
	opacity: 0;
	animation: fadeInUp 1s ease forwards 1.1s;
}

.btn:hover {
	background-color: orange;
}

.hero-buttons {
	display: flex;
	justify-content: center;
	gap: 20px;
}

/* Hero Slider Styles */
.hero-slider {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    transform: translateX(100%); /* Start off-screen right */
    transition: transform 1s ease-in-out;
}

.slide::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.6); /* Dark overlay for text readability */
}

.slide.active {
    transform: translateX(0);
    z-index: 1;
}

.slide.exit {
    transform: translateX(-100%);
    z-index: 0;
}

.slide.not-transitioning {
    transition: none !important;
}

#about {
	width: 100%;
	margin: 0;
	padding: 0;
	background: transparent;
	color: #fff;
	font-family: 'Poppins', sans-serif;
	text-align: center;
	scroll-margin-top: 0;
}

.about-hero-image {
    width: 100%;
    height: 50vh;
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.about-hero-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.about-hero-image .hero-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    width: 100%;
    background: rgba(0,0,0,0.4);
    padding: 20px 0;
}

.about-hero-image h1 {
    font-size: 3rem;
    color: #fff;
    text-transform: uppercase;
    margin: 0;
}

.about-detailed-content {
    width: 70%;
    margin: 0 auto 30px auto;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    text-align: left;
}

.intro-text {
    font-size: 1.25rem;
    line-height: 1.6;
    text-align: justify;
    margin-bottom: 40px;
}

.about-block {
    margin-bottom: 60px;
    text-align: center;
}

.about-block h2 {
    color: orange;
    font-size: 2rem;
    margin-bottom: 15px;
    text-transform: uppercase;
    border-bottom: 2px solid orange;
    display: inline-block;
}

.about-block p {
    font-size: 1.25rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #eee;
    text-align: justify;
}

.about-grid-4 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.about-grid-2 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.about-grid-4 img, .about-grid-2 img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255,255,255,0.2);
    transition: transform 0.3s;
}

.about-grid-4 img:hover, .about-grid-2 img:hover {
    transform: scale(1.05);
}

/* Team Section Styles */
.team-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 50px;
    align-items: center;
    justify-content: center;
    margin: 10px auto 0 auto;
    max-width: 950px;
}

.team-image {
    flex: 0 1 300px;
}

.team-image img {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 720 / 640;
    object-fit: cover;
    object-position: top;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s;
}

.team-image img:hover {
    transform: scale(1.05);
}

.team-info {
    flex: 1 1 300px;
    color: #fff;
}

.team-info h3 {
    font-size: 2rem;
    color: orange;
    margin-bottom: 5px;
}

.team-info h4 {
    font-size: 1.2rem;
    color: #ccc;
    margin-bottom: 20px;
    font-weight: 400;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.team-info p {
    font-size: 1.25rem;
    line-height: 1.8;
    color: #eee;
    text-align: justify;
}

#division {
	width: 80%;
	margin: 100px auto;
	padding: 40px;
	background-color: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(5px);
	border-radius: 20px;
	color: #fff;
	font-family: 'Poppins', sans-serif;
	text-align: center;
	scroll-margin-top: 150px;
}

#main > #division:first-child {
	margin-top: 40px;
}

#division h1 {
	font-size: 2.5rem;
	margin-bottom: 20px;
	text-transform: uppercase;
}

.division-container {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 20px;
	margin-top: 40px;
}

.division-card {
	background: rgba(0, 0, 0, 0.3);
	padding: 40px 20px;
	border-radius: 15px;
	transition: 0.3s;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
	border: 1px solid rgba(255, 255, 255, 0.1);
}

.division-card:hover {
	transform: translateY(-10px);
	background: rgba(0, 0, 0, 0.5);
	border-color: orange;
}

.division-card h3 {
	font-size: 1.5rem;
	color: orange;
	margin: 0;
}

.division-card p {
	text-align: center;
	font-size: 1.1rem;
	margin: 15px 0 0 0;
	color: #eee;
}

.division-card i {
	font-size: 3rem;
	color: orange;
	margin-bottom: 20px;
}

.division-btn {
	margin-top: 20px;
	padding: 10px 25px;
	border: 1px solid orange;
	color: #fff;
	text-decoration: none;
	transition: 0.3s;
}

.division-btn:hover {
	background-color: orange;
}

#contact {
	width: 80%;
	margin: 100px auto;
	padding: 40px;
	background-color: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(5px);
	border-radius: 20px;
	color: #fff;
	font-family: 'Poppins', sans-serif;
	text-align: center;
	scroll-margin-top: 150px;
}

#contact h1 {
	font-size: 2.5rem;
	margin-bottom: 20px;
	text-transform: uppercase;
}

.contact-container {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	margin-top: 40px;
	gap: 40px;
	text-align: left;
}

.contact-form {
	flex: 1;
	min-width: 300px;
}

.contact-form form {
	display: flex;
	flex-direction: column;
	gap: 15px;
}

.contact-form input,
.contact-form textarea {
	padding: 15px;
	border-radius: 5px;
	border: 1px solid rgba(255, 255, 255, 0.2);
	background: rgba(0, 0, 0, 0.5);
	color: #fff;
	font-family: 'Poppins', sans-serif;
	font-size: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
	outline: none;
	border-color: orange;
}

.contact-form .btn {
    align-self: flex-start;
    padding: 8px 20px;
    font-size: 1.1rem;
    width: auto;
    opacity: 1;
    animation: none;
    background: transparent;
    cursor: pointer;
}

.contact-form .btn:hover {
    background-color: orange;
}

.contact-info {
	flex: 1;
	min-width: 300px;
	background: rgba(0, 0, 0, 0.3);
	padding: 30px;
	border-radius: 15px;
}

.contact-info h3 {
	font-size: 1.8rem;
	color: orange;
	margin-bottom: 20px;
	margin-top: 0;
}

.contact-info p {
	font-size: 1.1rem;
	margin-bottom: 15px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.social-links {
	margin-top: 30px;
	display: flex;
	gap: 20px;
}

.social-links a {
	color: #fff;
	font-size: 1.5rem;
	transition: 0.3s;
	background: rgba(255, 255, 255, 0.1);
	width: 50px;
	height: 50px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	text-decoration: none;
}

.social-links a:hover {
	background: orange;
	transform: translateY(-5px);
}

@media screen and (max-width: 768px) {
	header {
		flex-direction: row;
		margin-top: 10px;
		justify-content: space-between;
		padding: 10px 20px;
	}

	.logo {
		position: static;
		transform: none;
		margin: 0;
		height: 60px;
		width: 60px;
	}

	.nav-bar {
		width: 100%;
		justify-content: center;
		position: absolute;
		top: 100%;
		left: 0;
		flex-direction: column;
		background: rgba(0, 0, 0, 0.95);
		display: none;
		border-radius: 0;
		padding: 20px 0;
	}

	.nav-bar.active {
		display: flex;
	}

	#menu-icon {
		display: block;
	}

	.nav {
		font-size: 1rem;
		padding: 10px;
		display: block;
		margin: 10px 0;
	}

	.hero-info {
		margin: 30px auto;
		text-align: center;
		max-width: 90%;
		align-self: center;
	}

	#about {
		width: 90%;
		margin: 50px auto;
	}

	#division {
		width: 90%;
		margin: 50px auto;
	}

	#contact {
		width: 90%;
		margin: 50px auto;
	}

	.division-text-col {
		padding-right: 0;
	}

	/* Font size adjustments for mobile */
	.hero-info h1 {
		font-size: 2.2rem;
	}

	.hero-info p {
		font-size: 1.1rem;
	}

	#division h1,
	#contact h1,
	.about-hero-image h1 {
		font-size: 2rem;
	}

	.about-block h2,
	.team-info h3 {
		font-size: 1.6rem;
	}

	.contact-info h3 {
		font-size: 1.5rem;
	}

	.division-text-col,
	.team-info p,
	.about-block p,
	.intro-text {
		font-size: 1.1rem;
	}

	/* Layout and spacing adjustments for mobile */
	.about-detailed-content,
	#division,
	#contact {
		padding: 20px;
	}

	.about-detailed-content {
		width: 100%;
	}

	.about-grid-2 {
		grid-template-columns: 1fr;
	}
}

@keyframes slideDown {
	from { transform: translateY(-50px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

@keyframes slideRight {
	from { transform: translateX(-50px); opacity: 0; }
	to { transform: translateX(0); opacity: 1; }
}

@keyframes fadeInUp {
	from { transform: translateY(50px); opacity: 0; }
	to { transform: translateY(0); opacity: 1; }
}

.reveal {
	opacity: 0;
	transform: translateY(100px);
	transition: all 1s ease-out;
	pointer-events: none;
}

.reveal.active {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* Division Page Specific Styles */
.division-layout {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 20px;
    align-items: center;
}

.division-video-col {
    flex: 1; /* Balanced with text column */
    min-width: 300px; /* Ensures it wraps on mobile */
    text-align: center;
}

.division-text-col {
    flex: 1; /* Text takes 1 part of the space */
    min-width: 300px;
    color: white;
    text-align: justify;
    font-size: 1.25rem;
    padding-right: 40px;
}

@media screen and (min-width: 769px) {
    .division-layout:has(.video-wrapper) .division-text-col {
        padding-right: 80px;
    }
}

.video-wrapper {
    width: 100%;
    max-width: 300px; /* Adjusted to resemble a medium paragraph size */
    margin: 0 auto;
}

.division-video-player {
    width: 100%;
    height: auto;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
}

.division-image-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.division-image-grid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 5px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 15px;
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
}

.gallery-grid .main-img {
    grid-row: 1 / span 2;
}

.gallery-grid img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Division Footer Styles */
.division-footer {
    background-color: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 50px 0 0 0;
    font-family: 'Poppins', sans-serif;
    width: 100%;
    margin-top: 50px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.division-footer .footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.division-footer .footer-section {
    flex: 1;
    min-width: 250px;
    margin-bottom: 30px;
    padding: 0 15px;
}

.division-footer h2 {
    color: orange;
    margin-bottom: 20px;
    font-size: 1.4rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.division-footer p {
    color: #ccc;
    line-height: 1.6;
    font-size: 1.1rem;
    margin: 0;
}

.division-footer .contact-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 15px;
}

.division-footer .contact-row i {
    color: orange;
    margin-right: 15px;
    margin-top: 5px;
    width: 20px;
    font-size: 1.3rem;
    text-align: center;
}

.division-footer .footer-bottom {
    background-color: #000;
    text-align: center;
    padding: 20px;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1rem;
    color: #888;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}
