/**
 * Custom CSS for Theme 5 (Electrical)
 */

.header-top .navbar-brand {
	position: relative;
	overflow: hidden;
	padding: 0 80px 0 0; /* Increased padding-right to shift logo left towards the center of black block */
	z-index: 99;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
}

/* Hero Background Adjustments - Full Height Carousel */
/* Override template CSS untuk carousel full width */
.header-carousel .hero-section,
.hero-section {
	min-height: 85vh !important;
	height: auto !important;
}

.header-carousel .header-carousel-item .hero-bg-half-1,
.header-carousel .header-carousel-item .hero-bg-half-2,
.header-carousel-item .hero-bg-half-1,
.header-carousel-item .hero-bg-half-2,
.hero-bg-half-1,
.hero-bg-half-2 {
	background-size: cover !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
	clip-path: none !important;
	width: 100% !important;
	position: absolute !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	height: 100% !important;
	filter: brightness(0.7) !important;
	transform: none !important;
}

.header-carousel .header-carousel-item,
.header-carousel-item {
	min-height: 85vh !important;
	height: auto !important;
}

.header-carousel .header-carousel-item .carousel-caption,
.header-carousel-item .carousel-caption {
	z-index: 10 !important;
	position: relative !important;
}

/* Hide hero shape yang mungkin mengganggu */
.hero-shape-1,
.hero-shape-2 {
	display: none !important;
}

/* Blog Item Styling */
.blog-item {
	transition: transform 0.3s ease;
}

.blog-item:hover {
	transform: translateY(-10px);
}

.blog-img {
	position: relative;
	overflow: hidden;
}

.blog-info {
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	background: linear-gradient(to top, rgba(0,0,0,0.7), transparent);
	color: white;
	padding: 15px;
}

.blog-info span {
	display: block;
	margin-bottom: 5px;
}

/* Projects/Albums Styling */
.projects-item {
	transition: all 0.3s ease;
	overflow: hidden;
}

.projects-item:hover {
	box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.projects-item img {
	transition: transform 0.3s ease;
}

.projects-item:hover img {
	transform: scale(1.05);
}

/* Team Item Styling */
.team-item {
	transition: all 0.3s ease;
}

.team-item:hover {
	transform: translateY(-10px);
	box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.team-img {
	position: relative;
	overflow: hidden;
}

.team-icon {
	position: absolute;
	bottom: -50px;
	left: 0;
	right: 0;
	text-align: center;
	padding: 15px;
	background: rgba(0,0,0,0.7);
	transition: bottom 0.3s ease;
}

.team-item:hover .team-icon {
	bottom: 0;
}

/* Breadcrumb Background */
.bg-breadcrumb {
	background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
	            url('../../../assets/themes/electrical/img/carousel-1.jpg') center center;
	background-size: cover;
	background-attachment: fixed;
}

.breadcrumb-item a {
	text-decoration: none;
}

.breadcrumb-item.active {
	color: #ffc107 !important;
}

/* Quote Carousel - Compact & Elegant Design */
.quote-carousel .quote-item {
	padding: 15px 10px;
}

.quote-content {
	text-align: center;
	padding: 25px 30px;
}

.quote-icon {
	margin-bottom: 15px;
}

.quote-icon i {
	font-size: 2.5rem;
	color: rgba(255, 255, 255, 0.9);
}

.quote-text {
	font-size: 1.15rem;
	line-height: 1.7;
	color: #ffffff;
	font-weight: 400;
	font-style: italic;
	margin-bottom: 15px;
}

.quote-author {
	position: relative;
	padding-top: 15px;
}

.quote-author::before {
	content: '';
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 50px;
	height: 2px;
	background: rgba(255, 255, 255, 0.4);
}

.author-name {
	display: inline-block;
	font-size: 0.95rem;
	color: rgba(255, 255, 255, 0.95);
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.quote-carousel .owl-dots {
	text-align: center;
	margin-top: 25px;
}

.quote-carousel .owl-dot {
	display: inline-block;
	width: 10px;
	height: 10px;
	margin: 0 6px;
	background: rgba(255, 255, 255, 0.3) !important;
	border-radius: 50%;
	transition: all 0.4s ease;
}

.quote-carousel .owl-dot:hover {
	background: rgba(255, 255, 255, 0.5) !important;
}

.quote-carousel .owl-dot.active {
	background: rgba(255, 255, 255, 1) !important;
	width: 35px;
	border-radius: 10px;
}

/* Responsive adjustments */
@media (max-width: 991px) {
	.quote-content {
		padding: 20px 25px;
	}

	.quote-text {
		font-size: 1.05rem;
	}
}

@media (max-width: 767px) {
	.quote-content {
		padding: 20px;
	}

	.quote-icon i {
		font-size: 2rem;
	}

	.quote-text {
		font-size: 1rem;
		line-height: 1.6;
		margin-bottom: 12px;
	}

	.author-name {
		font-size: 0.85rem;
	}

	.quote-carousel .owl-dots {
		margin-top: 20px;
	}
}

/* Tables */
.table thead {
	position: sticky;
	top: 0;
	z-index: 10;
}

.table-hover tbody tr:hover {
	background-color: rgba(0,123,255,0.05);
}

/* Form Styling */
.form-floating > label {
	color: #6c757d;
}

.form-control:focus {
	border-color: var(--bs-primary);
	box-shadow: 0 0 0 0.25rem rgba(13,110,253,.25);
}

/* Shadow utilities */
.shadow-sm {
	box-shadow: 0 .125rem .25rem rgba(0,0,0,.075)!important;
}

/* Responsive Images */
img {
	/*max-width: 100%;*/
	/*height: auto;*/
}

/* Comments Section */
.comments-section .card {
	transition: box-shadow 0.3s ease;
}

.comments-section .card:hover {
	box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.reply-comment {
	border-left: 3px solid var(--bs-secondary);
	padding-left: 15px;
}

/* Blog Detail */
.blog-detail-content {
	font-size: 1.1rem;
	line-height: 1.8;
}

.blog-detail-content img {
	max-width: 100%;
	height: auto;
	margin: 20px 0;
	border-radius: 8px;
}

.blog-detail-content p {
	margin-bottom: 1.5rem;
	text-align: justify;
}

.blog-detail-content h1,
.blog-detail-content h2,
.blog-detail-content h3,
.blog-detail-content h4 {
	margin-top: 2rem;
	margin-bottom: 1rem;
}

.blog-detail-content ul,
.blog-detail-content ol {
	margin-bottom: 1.5rem;
	padding-left: 2rem;
}

.blog-detail-content blockquote {
	border-left: 4px solid var(--bs-primary);
	padding-left: 1.5rem;
	margin: 1.5rem 0;
	font-style: italic;
	color: #6c757d;
}

/* Tags */
.tags a {
	text-decoration: none;
	transition: all 0.3s ease;
}

.tags a:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* List Group */
.list-group-item {
	transition: all 0.3s ease;
}

.list-group-item:hover {
	background-color: rgba(13,110,253,0.05);
	transform: translateX(5px);
}

/* Contact Info Cards */
.contact .d-inline-flex {
	transition: all 0.3s ease;
}

.contact .d-inline-flex:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

/* Loading State */
.btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

/* Banner */
.banner {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Spinner */
#spinner {
	background-color: rgba(255,255,255,0.9);
	z-index: 9999;
}

/* Animation delays for WOW.js */
.wow {
	visibility: hidden;
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
	.navbar-brand {
		height: auto !important;
	}

	.topbar {
		display: none !important;
	}

	.header-carousel-item .display-2 {
		font-size: 2rem;
	}

	.display-4 {
		font-size: 2rem;
	}

	.hero-section {
		min-height: 70vh;
	}

	.header-carousel .header-carousel-item {
		min-height: 70vh !important;
	}
}

@media (max-width: 767px) {
	.blog-detail-content {
		font-size: 1rem;
	}

	.team-content h5 {
		font-size: 1rem;
	}

	.projects-content h4 {
		font-size: 1.1rem;
	}
}

/* Headmaster Speech Preview */
.speech-preview {
	line-height: 1.8;
	text-align: justify;
	color: #495057;
}

/* Vision & Mission Cards */
.vision-mission-card {
	transition: all 0.3s ease;
}

.vision-mission-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 15px 35px rgba(0,0,0,0.1) !important;
}

/* Icon Circles in Vision Mission */
.bg-primary.rounded-circle {
	transition: all 0.3s ease;
}

.vision-mission-card:hover .bg-primary.rounded-circle {
	transform: rotate(360deg);
}

/* Headmaster Photo Badge */
.headmaster-badge {
	transition: all 0.3s ease;
}

.headmaster-badge:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 25px rgba(0,0,0,0.15) !important;
}

/* Speech Content - Opening Speech Page */
.speech-content {
	font-size: 1.1rem;
	line-height: 1.8;
	text-align: justify;
	color: #212529;
}

.speech-content p {
	margin-bottom: 1.5rem;
}

.speech-content h1,
.speech-content h2,
.speech-content h3,
.speech-content h4 {
	margin-top: 2rem;
	margin-bottom: 1rem;
	color: #212529;
}

.speech-content ul,
.speech-content ol {
	margin-bottom: 1.5rem;
	padding-left: 2rem;
}

.speech-content blockquote {
	border-left: 4px solid var(--bs-primary);
	padding-left: 1.5rem;
	margin: 1.5rem 0;
	font-style: italic;
	color: #6c757d;
}

.speech-content img {
	max-width: 100%;
	height: auto;
	margin: 20px 0;
	border-radius: 8px;
}

/* Admission Form */
.admission-form-card {
	border-radius: 1.5rem;
	overflow: hidden;
}

.admission-form-card .card-header {
	background: linear-gradient(135deg, rgba(13,110,253,0.12), rgba(13,110,253,0.04));
	border-bottom: 1px solid rgba(15,23,42,0.08);
}

.admission-form-card .card-header .badge {
	border-radius: 999px;
	padding: 0.45rem 1rem;
	font-size: 0.75rem;
	border: 1px solid rgba(13,110,253,0.2);
	background: rgba(13,110,253,0.1) !important;
}

.admission-form {
	margin-top: 0.5rem;
}

.admission-form .form-group {
	padding: 1.25rem 0;
	border-bottom: 1px solid rgba(15,23,42,0.08);
	row-gap: 1rem;
}

.admission-form .form-group:last-of-type {
	border-bottom: 0;
}

.admission-section-title {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.75rem;
	font-size: 1.05rem;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	font-weight: 700;
	color: #1d3557;
	margin: 2.5rem 0 1rem;
}

.admission-section-title::before {
	content: '';
	display: inline-block;
	width: 42px;
	height: 3px;
	border-radius: 999px;
	background: var(--bs-primary);
}

.admission-form .admission-section-title:first-of-type,
.admission-section-title:first-of-type {
	margin-top: 0;
}

.admission-form label.control-label {
	font-weight: 600;
	color: #0f172a;
}

.admission-form .form-control,
.admission-form .form-select {
	border-radius: 0.75rem;
	border: 1px solid rgba(15,23,42,0.12);
	padding: 0.7rem 0.95rem;
	background-color: #fff;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admission-form .input-group .form-control.date {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
	border-right: 0;
}

.admission-form .input-group .calendar-addon {
	border: 1px solid rgba(13,110,253,0.2);
	border-left: 0;
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
	border-top-right-radius: 0.75rem;
	border-bottom-right-radius: 0.75rem;
	background-color: rgba(13,110,253,0.08);
	color: var(--bs-primary);
	cursor: pointer;
	transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	padding: 0.7rem 0.9rem;
}

.admission-form .input-group .calendar-addon:hover {
	background-color: var(--bs-primary);
	color: #fff;
	border-color: var(--bs-primary);
}

.admission-form .input-group .calendar-addon i {
	color: inherit;
}

.admission-form .form-control:focus,
.admission-form .form-select:focus {
	border-color: var(--bs-primary);
	box-shadow: 0 0 0 0.2rem rgba(13,110,253,0.12);
}

.admission-form small.form-text {
	color: #64748b;
	margin-top: 0.5rem;
}

.admission-form input[type="file"] {
	display: block;
	width: 100%;
	padding: 0.6rem 0.9rem;
	border: 1px dashed rgba(15,23,42,0.25);
	border-radius: 0.75rem;
	background-color: rgba(241,245,249,0.6);
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.admission-form input[type="file"]:focus {
	border-color: var(--bs-primary);
	background-color: rgba(13,110,253,0.08);
	outline: none;
}

.admission-form input[type="file"]:hover {
	border-color: rgba(13,110,253,0.35);
}

.admission-form .form-check {
	padding: 0.75rem 1rem;
	border-radius: 0.75rem;
	border: 1px solid rgba(15,23,42,0.12);
	background-color: rgba(241,245,249,0.35);
}

.admission-form .form-check-input {
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 0.35rem;
	margin-right: 0.6rem;
	margin-top: 0.1rem;
}

.admission-form .form-check-label {
	color: #334155;
}

.admission-form .form-check-input:checked {
	background-color: var(--bs-primary);
	border-color: var(--bs-primary);
}

.admission-form-card .card-footer {
	background: linear-gradient(135deg, rgba(13,110,253,0.08), rgba(13,110,253,0.02));
	border-top: 1px solid rgba(15,23,42,0.08);
}

.admission-form-card .card-footer p {
	color: #475569;
}

.admission-submit-btn {
	border-radius: 999px;
	box-shadow: 0 15px 30px rgba(13,110,253,0.2);
	transition: all 0.3s ease;
}

.admission-submit-btn:hover {
	box-shadow: 0 18px 35px rgba(13,110,253,0.28);
	transform: translateY(-2px);
}

@media (max-width: 767.98px) {
	.admission-form .form-group {
		padding: 1rem 0;
	}

	.admission-form label.control-label {
		margin-bottom: 0.35rem;
	}
}

@media (min-width: 768px) {
	.admission-submit-btn {
		width: auto;
	}
}

/* Service/Majors Section Styling */
.service-item {
	transition: all 0.3s ease;
	overflow: hidden;
}

.service-item img {
	transition: transform 0.3s ease;
}

.service-item:hover img {
	transform: scale(1.05);
}

/* Tab Navigation Styling for Majors */
.service .nav-pills .nav-item {
	width: 100%;
}

.service .nav-pills .nav-link {
	background: #fff;
	color: #495057;
	border: 1px solid rgba(0,0,0,0.1);
	border-radius: 10px;
	transition: all 0.3s ease;
	text-align: left;
	font-weight: 500;
}

.service .nav-pills .nav-link:hover {
	background: rgba(13,110,253,0.1);
	border-color: var(--bs-primary);
	color: var(--bs-primary);
	transform: translateX(5px);
}

.service .nav-pills .nav-link.active {
	background: var(--bs-primary);
	color: #fff;
	border-color: var(--bs-primary);
	box-shadow: 0 5px 15px rgba(13,110,253,0.3);
}

.service .nav-pills .nav-link i {
	font-size: 1.2rem;
	transition: transform 0.3s ease;
}

.service .nav-pills .nav-link.active i {
	transform: scale(1.1);
}

/* Service Item Border */
.service-item .border {
	border-color: rgba(0,0,0,0.1) !important;
}

/* Responsive styling for service section */
@media (max-width: 991px) {
	.service .nav-pills {
		flex-direction: row !important;
		overflow-x: auto;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
	}

	.service .nav-pills .nav-item {
		width: auto;
		flex: 0 0 auto;
	}

	.service .nav-pills .nav-link {
		white-space: nowrap;
	}

	.service-item img {
		height: 300px !important;
	}
}

@media (max-width: 767px) {
	.service-item img {
		height: 250px !important;
	}

	.service .nav-pills .nav-link {
		font-size: 0.9rem;
		padding: 0.6rem 1rem !important;
	}

	.service .nav-pills .nav-link i {
		font-size: 1rem;
	}
}

/* Print Styles */
@media print {
	.navbar,
	.footer,
	.back-to-top,
	.more-posts,
	.more-albums,
	.more-employees,
	.more-students,
	.more-alumni,
	.more-comments {
		display: none !important;
	}
}

/* 
 * Professional Multi-level Menu Styles 
 * Implements 3-level hierarchy (Grandparent > Parent > Child)
 */

/* Dropdown Submenu Container */
.dropdown-menu .dropdown-submenu {
    position: relative;
}

/* Level 3 Menu (Grandchild) - Desktop Defaults */
@media (min-width: 992px) {
    /* Ensure the parent is relative so the child can position against it */
    .dropdown-menu .dropdown-submenu {
        position: relative;
    }

    .dropdown-menu .dropdown-submenu .dropdown-menu {
        top: 0;
        left: 100%;
        margin-top: -9px; /* Align with the top padding of the parent item */
        margin-left: -1px; /* Overlap border slightly */
        
        /* 
           Use display: none initially to prevent "all visible" bug on load 
           or if visibility/opacity fails.
        */
        display: none; 
        opacity: 0;
        visibility: hidden;
        
        /* Animation properties */
        transform: rotateX(-75deg);
        transform-origin: 0% 0%;
        transition: transform 0.4s ease, opacity 0.4s ease;
        
        box-shadow: 0 10px 30px rgba(0,0,0,0.15);
        border-radius: 8px;
        min-width: 220px;
        padding: 10px 0;
        background: #fff;
        border: none;
        position: absolute; /* Enforce absolute positioning */
    }

    /* Show Level 3 Menu on Hover */
    .dropdown-menu .dropdown-submenu:hover > .dropdown-menu {
        display: block; /* Activate layout */
        /* Use a small delay or animation frame if needed, but CSS hover works */
        visibility: visible;
        opacity: 1;
        transform: rotateX(0deg);
    }
    
    /* Rotate arrow on hover */
    .dropdown-submenu:hover > .dropdown-toggle::after {
        transform: rotate(-90deg);
        transition: transform 0.3s ease;
    }
}

/* Common Styles */
.dropdown-menu .dropdown-submenu {
    /* Keep generic style minimal */
}

.dropdown-item {
    padding: 8px 20px;
    font-weight: 500;
    color: #555;
    transition: all 0.3s ease;
    position: relative;
}

.dropdown-item:hover, 
.dropdown-item:focus {
    background-color: var(--bs-primary);
    color: #fff;
    padding-left: 25px;
}

/* Submenu Indicator Arrow */
.dropdown-submenu > .dropdown-toggle::after {
    border: none;
    content: "\f105"; /* FontAwesome Angle Right */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    float: right;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.dropdown-item.active, 
.dropdown-item:active {
    background-color: var(--bs-primary);
    color: #fff;
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .dropdown-menu .dropdown-submenu .dropdown-menu {
        position: static;
        margin-left: 15px;
        margin-top: 0;
        transform: none;
        visibility: visible; 
        opacity: 1;
        box-shadow: none;
        padding-left: 10px;
        border-left: 2px solid var(--bs-primary);
        border-radius: 0;
        display: none; 
        background: transparent;
    }
    
    .dropdown-menu .dropdown-submenu.show > .dropdown-menu {
        display: block;
    }
    
    .dropdown-submenu > .dropdown-toggle::after {
        transform: rotate(90deg); /* Point down */
    }
    
    .dropdown-item:hover {
        padding-left: 20px; 
    }
}
