/* Main Stylesheet for Total Engineering & Construction Website */

/* Multi-level dropdown menu styles */
.dropdown-submenu {
    position: relative;
}

.dropdown-submenu > .dropdown-menu {
    top: 0;
    left: 100%;
    margin-top: -6px;
    margin-left: 0;
    border-radius: 0.25rem;
    display: none;
    position: absolute;
}

/* Show submenu on hover for desktop */
@media (min-width: 992px) {
    .dropdown-submenu:hover > .dropdown-menu {
        display: block;
    }
}

/* Right arrow indicator for submenus */
.dropdown-submenu > a::after {
    display: block;
    content: "";
    float: right;
    width: 0;
    height: 0;
    border-color: transparent;
    border-style: solid;
    border-width: 5px 0 5px 5px;
    border-left-color: #ccc;
    margin-top: 8px;
    margin-right: -5px;
}

.dropdown-submenu:hover > a::after {
    border-left-color: #3498db;
}

/* Mobile specific styles */
@media (max-width: 991.98px) {
    .dropdown-submenu > .dropdown-menu {
        position: static;
        left: 0;
        margin-left: 20px;
        border: none;
        box-shadow: none;
        width: auto;
    }
}

/* Base Styles */
body {
    font-family: 'Open Sans', sans-serif;
    color: #444;
    line-height: 1.6;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    color: #2c3e50;
}

a {
    color: #3498db;
    text-decoration: none;
    transition: all 0.3s ease;
}

a:hover {
    color: #2980b9;
    text-decoration: none;
}

.btn {
    border-radius: 4px;
    font-weight: 500;
    padding: 0.6rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: #3498db;
    border-color: #3498db;
}

.btn-primary:hover {
    background-color: #2980b9;
    border-color: #2980b9;
}

.btn-outline-primary {
    color: #3498db;
    border-color: #3498db;
}

.btn-outline-primary:hover {
    background-color: #3498db;
    border-color: #3498db;
}

.text-primary {
    color: #3498db !important;
}

.bg-primary {
    background-color: #3498db !important;
}

/* Header */
.site-header {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.top-bar {
    background-color: #2c3e50;
    color: #fff;
    padding: 8px 0;
    font-size: 14px;
}

.top-bar a {
    color: #ecf0f1;
    margin-right: 15px;
}

.top-bar a:hover {
    color: #3498db;
}

.social-links {
    text-align: right;
}

.social-links a {
    display: inline-block;
    width: 28px;
    height: 28px;
    line-height: 28px;
    text-align: center;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    margin-left: 5px;
}

.social-links a:hover {
    background-color: #3498db;
    color: #fff;
}

.navbar {
    background-color: #fff;
    padding: 15px 0;
}

.navbar-brand img {
    max-height: 40px;
}

.navbar-nav .nav-link {
    color: #2c3e50;
    font-weight: 500;
    padding: 8px 15px;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    color: #3498db;
}

.dropdown-menu {
    border: none;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    padding: 10px 0;
}

.dropdown-item {
    padding: 8px 20px;
    font-size: 14px;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
    color: #3498db;
}

.header-buttons .btn {
    margin-left: 10px;
}

/* Breadcrumbs */
.breadcrumb-wrapper {
    background-color: #f8f9fa;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.breadcrumb {
    margin-bottom: 0;
    background-color: transparent;
    padding: 0;
}

.breadcrumb-item a {
    color: #6c757d;
}

.breadcrumb-item.active {
    color: #3498db;
}

/* Hero Section */
.hero {
    position: relative;
    padding: 120px 0;
    background-size: cover;
    background-position: center;
    color: #fff;
    z-index: 1;
}

.hero:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(44, 62, 80, 0.8);
    z-index: -1;
}

.hero h1 {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #fff;
}

.hero p {
    font-size: 18px;
    margin-bottom: 30px;
    max-width: 600px;
}

/* Services Section */
.service-card {
    padding: 30px;
    border-radius: 5px;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.service-icon {
    font-size: 40px;
    color: #3498db;
    margin-bottom: 20px;
}

.service-card h3 {
    font-size: 22px;
    margin-bottom: 15px;
}

/* About Section */
.about-image img {
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Projects Section */
.project-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.project-card .featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 2;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.project-card .project-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

.project-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.3s ease;
}

.project-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px;
    color: #fff;
    transform: translateY(100px);
    transition: all 0.3s ease;
}

.project-card:hover img {
    transform: scale(1.05);
}

.project-card:hover .project-overlay {
    transform: translateY(0);
}

.project-overlay h4 {
    color: #fff;
    margin-bottom: 10px;
}

.project-overlay p {
    font-size: 14px;
    margin-bottom: 0;
}

.featured-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background: #ff6b6b;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: bold;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    display: inline-block;
}

/* Testimonial Section */
.testimonial-card {
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
}

.testimonial-card .quote {
    font-size: 16px;
    font-style: italic;
    position: relative;
    padding-left: 30px;
    margin-bottom: 20px;
}

.testimonial-card .quote:before {
    content: '\201C';
    font-size: 60px;
    position: absolute;
    left: 0;
    top: -15px;
    color: #3498db;
    opacity: 0.3;
}

.client-info .client-name {
    font-weight: 600;
    margin-bottom: 5px;
}

.client-info .client-position {
    font-size: 14px;
    color: #6c757d;
}

/* Blog Section */
.blog-card {
    background-color: #fff;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    height: 100%;
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}

.blog-image {
    height: 200px;
    overflow: hidden;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.3s ease;
}

.blog-card:hover .blog-image img {
    transform: scale(1.05);
}

.blog-content {
    padding: 20px;
}

.blog-meta {
    font-size: 14px;
    color: #6c757d;
    margin-bottom: 10px;
}

.blog-title {
    font-size: 20px;
    margin-bottom: 10px;
}

.blog-title a {
    color: #2c3e50;
}

.blog-title a:hover {
    color: #3498db;
}

/* Contact Section */
.contact-section {
    position: relative;
}

.contact-info {
    margin-bottom: 30px;
}

.contact-info h3 {
    margin-bottom: 25px;
}

.contact-info-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.contact-info-item i {
    font-size: 24px;
    color: #3498db;
    margin-right: 15px;
    margin-top: 3px;
}

.contact-info-item h5 {
    font-size: 16px;
    margin-bottom: 5px;
}

.contact-form {
    background-color: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.contact-form h3 {
    margin-bottom: 25px;
}

/* Footer */
.site-footer {
    background-color: #2c3e50;
    color: #ecf0f1;
    font-size: 14px;
}

.footer-top {
    padding: 70px 0 40px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    max-height: 40px;
}

.footer-widget {
    margin-bottom: 30px;
}

.footer-widget h4 {
    color: #fff;
    font-size: 18px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.footer-widget h4:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #3498db;
}

.footer-links {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #ecf0f1;
}

.footer-links a:hover {
    color: #3498db;
    padding-left: 5px;
}

.footer-widget .social-links {
    text-align: left;
    margin-top: 20px;
}

.footer-widget .social-links a {
    background-color: rgba(255, 255, 255, 0.1);
    margin-left: 0;
    margin-right: 5px;
}

.footer-widget .contact-info p {
    padding-left: 30px;
    position: relative;
    margin-bottom: 15px;
}

.footer-widget .contact-info p i {
    position: absolute;
    left: 0;
    top: 4px;
    color: #3498db;
}

.footer-bottom {
    padding: 20px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
}

.footer-bottom p {
    margin-bottom: 0;
}

.footer-bottom-links {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
    text-align: right;
}

.footer-bottom-links li {
    display: inline-block;
    margin-left: 15px;
}

.footer-bottom-links a {
    color: #ecf0f1;
}

.footer-bottom-links a:hover {
    color: #3498db;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    line-height: 40px;
    background-color: #3498db;
    color: #fff;
    text-align: center;
    border-radius: 50%;
    z-index: 99;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.back-to-top.active {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background-color: #2980b9;
    color: #fff;
}

/* Responsive Styles */
@media (max-width: 991px) {
    .hero {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 36px;
    }

    .footer-bottom-links {
        text-align: center;
        margin-top: 10px;
    }

    .footer-bottom p {
        text-align: center;
    }
}

@media (max-width: 767px) {
    .top-bar .contact-info,
    .top-bar .social-links {
        text-align: center;
        margin-bottom: 5px;
    }

    .hero {
        padding: 60px 0;
    }

    .hero h1 {
        font-size: 30px;
    }

    .hero p {
        font-size: 16px;
    }
}

/* Blog Post Styles */
.post-content {
    line-height: 1.8;
}

/* Blog Permalink */
.blog-permalink {
    opacity: 0;
    font-size: 0.7em;
    color: #6c757d;
    margin-left: 8px;
    transition: opacity 0.3s ease;
    vertical-align: middle;
}

.blog-post-title:hover .blog-permalink,
.blog-title:hover .blog-permalink {
    opacity: 1;
}

.blog-permalink:hover {
    color: #3498db;
}

.blog-preview {
    color: #666;
    font-size: 0.95em;
    line-height: 1.5;
}

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

.post-content h2, 
.post-content h3, 
.post-content h4 {
    margin-top: 30px;
    margin-bottom: 15px;
}

.post-content blockquote {
    background-color: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px 20px;
    margin: 20px 0;
    font-style: italic;
}

.post-meta {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #6c757d;
}

.post-meta img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
}

.post-tags {
    margin: 30px 0;
}

.post-tag {
    display: inline-block;
    background-color: #f8f9fa;
    padding: 5px 15px;
    border-radius: 30px;
    margin-right: 10px;
    margin-bottom: 10px;
    font-size: 14px;
}

.post-tag:hover {
    background-color: #3498db;
    color: #fff;
}

.share-post {
    margin-bottom: 30px;
}

.share-post a {
    display: inline-block;
    width: 35px;
    height: 35px;
    line-height: 35px;
    text-align: center;
    background-color: #f8f9fa;
    border-radius: 50%;
    margin-right: 10px;
    color: #6c757d;
}

.share-post a:hover {
    background-color: #3498db;
    color: #fff;
}

.post-navigation {
    padding: 30px 0;
    border-top: 1px solid #e9ecef;
    border-bottom: 1px solid #e9ecef;
    margin-bottom: 30px;
}

.post-navigation a {
    color: #2c3e50;
}

.post-navigation a:hover {
    color: #3498db;
}

.post-navigation h5 {
    margin-bottom: 5px;
}

.post-navigation .small {
    color: #6c757d;
}

.blog-sidebar {
    margin-bottom: 30px;
}

.sidebar-widget {
    background-color: #fff;
    padding: 20px;
    border-radius: 5px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.sidebar-widget h4 {
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.sidebar-widget h4:after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #3498db;
}

.sidebar-widget ul {
    list-style: none;
    padding-left: 0;
    margin-bottom: 0;
}

.sidebar-widget ul li {
    padding: 8px 0;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-widget ul li:last-child {
    border-bottom: none;
}

.sidebar-widget ul li a {
    color: #2c3e50;
    display: flex;
    justify-content: space-between;
}

.sidebar-widget ul li a:hover {
    color: #3498db;
}

.sidebar-widget ul li a span {
    color: #6c757d;
}

.search-form {
    position: relative;
}

.search-form input {
    padding-right: 45px;
}

.search-form button {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 45px;
    background-color: transparent;
    border: none;
    color: #6c757d;
    transition: all 0.3s ease;
}

.search-form button:hover {
    color: #3498db;
}

.recent-post {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.recent-post:last-child {
    margin-bottom: 0;
}

.recent-post img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    margin-right: 15px;
}

.recent-post-content h5 {
    font-size: 14px;
    margin-bottom: 5px;
}

.recent-post-content small {
    color: #6c757d;
}

/* Services Detail Styles */
.service-detail-image {
    margin-bottom: 30px;
}

.service-detail-image img {
    width: 100%;
    border-radius: 5px;
}

.service-features {
    margin: 30px 0;
}

.service-feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
}

.service-feature-item i {
    font-size: 24px;
    color: #3498db;
    margin-right: 15px;
    margin-top: 3px;
}

.service-cta {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 5px;
    margin-top: 30px;
}

.related-services {
    margin-top: 50px;
}

/* Contact Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 500;
    margin-bottom: 8px;
}

.form-control {
    height: auto;
    padding: 12px 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.form-control:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.25rem rgba(52, 152, 219, 0.25);
}

.form-text {
    font-size: 13px;
    color: #6c757d;
}

.invalid-feedback {
    display: block;
}

/* Comments Section Styles */
.comments-section {
    margin-top: 40px;
    padding-top: 40px;
    border-top: 1px solid #e9ecef;
}

.comments-title, .comment-form-title {
    font-size: 24px;
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.comments-title:after, .comment-form-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background-color: #3498db;
}

.comments-list {
    margin-bottom: 40px;
}

.comment {
    display: flex;
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e9ecef;
}

.comment:last-child {
    border-bottom: none;
}

.comment-reply {
    margin-left: 50px;
    padding-left: 20px;
    border-left: 2px solid #e9ecef;
}

.comment-avatar {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    margin-right: 20px;
}

.comment-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.comment-content {
    flex-grow: 1;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.comment-author {
    font-size: 16px;
    margin-bottom: 0;
}

.comment-date {
    font-size: 12px;
    color: #6c757d;
}

.comment-body {
    margin-bottom: 15px;
    line-height: 1.6;
}

.comment-footer {
    display: flex;
    align-items: center;
}

.reply-btn {
    font-size: 13px;
    padding: 4px 10px;
}

.no-comments {
    background-color: #f8f9fa;
    padding: 20px;
    text-align: center;
    border-radius: 5px;
}

.comment-form-container {
    background-color: #f8f9fa;
    padding: 30px;
    border-radius: 5px;
}

#replyingTo {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Custom Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Page Sections */
.page-section {
    margin-bottom: 50px;
    padding: 30px;
    border-radius: 5px;
    background-color: #f8f9fa;
}

.page-section h2 {
    margin-bottom: 20px;
    color: #2c3e50;
}

.page-section .section-subtitle {
    margin-bottom: 25px;
    color: #6c757d;
    font-weight: normal;
}

.page-section .section-image {
    margin-bottom: 25px;
}

.page-section .section-image img {
    max-width: 100%;
    border-radius: 5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.page-section .section-content {
    margin-bottom: 25px;
    line-height: 1.6;
}

.page-section .section-button {
    margin-top: 15px;
}

.animated {
    animation-duration: 1s;
    animation-fill-mode: both;
}

.fadeIn {
    animation-name: fadeIn;
}
.nav-item.dropdown:hover .dropdown-menu {
    display: block;
    margin-top: 0;
}

.dropdown-menu {
    border-radius: 0;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
}

.dropdown-item {
    padding: 0.5rem 1.5rem;
    transition: background-color 0.2s;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

/* End Contact Form Styles */

/* Testimonial Carousel Navigation */
#testimonialCarousel .carousel-control-prev,
#testimonialCarousel .carousel-control-next {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    opacity: 0.8;
}

#testimonialCarousel .carousel-control-prev {
    left: -20px;
}

#testimonialCarousel .carousel-control-next {
    right: -20px;
}

#testimonialCarousel .carousel-control-prev:hover,
#testimonialCarousel .carousel-control-next:hover {
    opacity: 1;
    background: rgba(0, 0, 0, 0.7);
}

#testimonialCarousel .carousel-control-prev-icon,
#testimonialCarousel .carousel-control-next-icon {
    width: 20px;
    height: 20px;
}