:root {
    --primary-color: #000000;
    --secondary-color: #8B0000;
    --accent-color: #FFFFFF;
    --text-light: #F8F9FA;
    --background-dark: #2C3E50;
}

/* Image Protection - Disable right-click, selection, and dragging */
img {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
    -khtml-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}

/* Re-enable pointer events for clickable gallery images */
.gallery-item img {
    pointer-events: auto;
}

/* Disable text selection on gallery items to prevent easy copying */
.gallery-item {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

.hero-section {
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), 
                url('img/hero-background-placeholder.jpg');
    background-size: cover;
    background-position: center 40%;
    color: white;
    padding: 100px 0 60px 0;
    text-align: center;
}

.hero-section.loaded {
    background: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), 
                url('img/hero-background.jpg');
    background-size: cover;
    background-position: center 40%;
}

.section-background.loaded {
    background: linear-gradient(rgba(248, 253, 248, 0.85), rgba(240, 248, 240, 0.85)), 
                url('img/michael-kahn-J4pZl6NC2Jw-unsplash.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
}

.section-background {
    background: linear-gradient(rgba(248, 253, 248, 0.85), rgba(240, 248, 240, 0.85)), 
                url('img/michael-kahn-J4pZl6NC2Jw-unsplash-placeholder.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    background-repeat: no-repeat;
	border-top: 4.5px solid #8B0000;
}

/* Fixed navbar scroll offset */
section[id] {
    scroll-margin-top: 80px;
}

/* City card links styling */
.area-item {
    text-decoration: none !important;
    color: inherit !important;
    transition: all 0.3s ease;
}

.area-item:hover {
    text-decoration: none !important;
    color: inherit !important;
    transform: translateY(-2px);
    cursor: pointer;
}

/* Mobile responsive background */
@media (max-width: 768px) {
    .section-background {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
    }
}

.mt-6 {
    margin-top: 4rem !important;
}

.pb-6 {
    padding-bottom: 6rem !important;
}

.mb-6 {
    margin-bottom: 4rem !important;
}

/* Lazy loading and modal image styles */
.lazy-load {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.lazy-load.loaded {
    opacity: 1;
}

#modalProjectImage {
    transition: opacity 0.3s ease;
}

.gallery-overlay {
    background-color: rgba(0, 0, 0, 0.3) !important;
}

.services-icon {
    font-size: 3rem;
    color: var(--secondary-color);
    margin-bottom: 1rem;
}

.service-card {
    border: 4px solid var(--secondary-color);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(139, 0, 0, 0.2);
    border-color: #B22222;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 2rem;
    cursor: pointer;
    border: 4px solid var(--secondary-color);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
}

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

.modal-gallery-img {
    max-height: 60vh;
    object-fit: contain;
}

.project-details {
    background-color: #f8f9fa;
    border-radius: 10px;
    padding: 1.5rem;
}

.detail-item {
    margin-bottom: 0.5rem;
}

.detail-label {
    font-weight: 600;
    color: var(--secondary-color);
}

.contact-section {
    background-color: #2c2c2c;
    color: black;
}

.footer {
    background-color: var(--background-dark);
    color: white;
}

.btn-primary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #B22222;
    border-color: #B22222;
    color: white;
}

.award-badge {
    background: linear-gradient(45deg, #0f5b37, #0c4a2d);
    color: white;
    padding: 0.3rem 0.7rem;
    border-radius: 20px;
    font-weight: 600;
    display: inline-block;
    margin: 0.25rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    font-size: 0.75rem;
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.award-badge:nth-child(1) {
    animation-delay: 0.2s;
}

.award-badge:nth-child(2) {
    animation-delay: 0.4s;
}

.award-badge:nth-child(3) {
    animation-delay: 0.6s;
}

.award-badge:nth-child(4) {
    animation-delay: 0.8s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.testimonials-carousel {
    position: relative;
    overflow: hidden;
    padding: 2rem 3rem;
    margin: 0 -1rem;
}

@media (max-width: 992px) {
    .testimonials-carousel {
        padding: 2rem 2rem;
        margin: 0;
    }
}

.testimonials-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 1.5rem;
}

.testimonials-slide {
    display: flex;
    gap: 1.5rem;
    width: calc(100% - 0.75rem);
    flex: 0 0 calc(100% - 0.75rem);
    justify-content: flex-start;
    align-items: flex-start;
}

.testimonial-card {
    background: white;
    border-radius: 15px;
    padding: 2.5rem 1.5rem 1rem 1.5rem;
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    border: 4px solid #f0f0f0;
    position: relative;
    flex: 0 0 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 280px;
    height: auto;
    transition: all 0.3s ease;
    overflow: hidden;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 30px rgba(0,0,0,0.2);
    border-color: var(--secondary-color);
}

@media (max-width: 768px) {
    .testimonials-carousel {
        padding: 2rem 1rem;
    }
    
    .testimonials-track {
        gap: 1rem;
    }
    
    .testimonials-slide {
        gap: 0;
        width: calc(100% - 0.5rem);
        flex: 0 0 calc(100% - 0.5rem);
    }
    
    .testimonial-card {
        flex: 0 0 100%;
        width: 100%;
        min-height: 320px;
        height: 320px;
        padding: 2rem 1.25rem 1rem 1.25rem;
    }
    
    .testimonial-card.expanded {
        height: auto;
        min-height: 320px;
        align-self: flex-start;
    }
    
    .read-more-btn {
        font-size: 0.8rem;
        margin-top: 0.75rem;
    }
}

/* Very narrow screens (portrait phones) */
@media (max-width: 480px) and (orientation: portrait) {
    .testimonial-card {
        min-height: 420px;
        height: 420px;
        padding: 1.75rem 1rem 1rem 1rem;
    }
    
    .testimonial-card.expanded {
        min-height: 420px;
    }
    
    .testimonial-text {
        font-size: 0.95rem;
        line-height: 1.6;
        -webkit-text-size-adjust: 100%; /* Ensure Safari doesn't auto-shrink */
    }
    
    .testimonial-text p {
        font-size: inherit; /* Force paragraph to inherit parent size */
    }
    
    .testimonial-card::before,
    .testimonial-card::after {
        font-size: 4rem;
    }
}

/* Narrow screens general (includes landscape) */
@media (max-width: 480px) {
    .testimonial-card {
        min-height: 360px;
        height: 360px;
    }
    
    .testimonial-card.expanded {
        min-height: 360px;
    }
}


.testimonial-card::before {
    content: '"';
    font-size: 5rem;
    color: var(--secondary-color);
    position: absolute;
    top: -15px;
    left: 15px;
    font-family: Georgia, serif;
    opacity: 0.3;
    font-weight: bold;
    z-index: 1;
}

.testimonial-card::after {
    content: '"';
    font-size: 5rem;
    color: var(--secondary-color);
    position: absolute;
    top: -15px;
    right: 15px;
    font-family: Georgia, serif;
    opacity: 0.3;
    font-weight: bold;
    z-index: 1;
}

.verified-badge {
    background: linear-gradient(45deg, #0f5b37, #0c4a2d);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 15px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    margin-top: 0.5rem;
}

.verified-badge i {
    font-size: 0.8rem;
}

.testimonial-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.testimonial-text {
    flex: 1;
    overflow: hidden;
    line-height: 1.5;
    margin-bottom: 1rem;
    -webkit-text-size-adjust: 100%; /* Prevent Safari from shrinking text */
}

.testimonial-text.expanded {
    overflow: visible;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    padding: 0.25rem 0;
    transition: all 0.2s ease;
    text-decoration: underline;
    margin-top: 0.5rem;
}

.read-more-btn:hover {
    color: #B22222;
    text-decoration-thickness: 2px;
}

.testimonial-card.expanded {
    height: auto;
    min-height: 280px;
    max-height: none;
    align-self: flex-start;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: var(--secondary-color);
    width: 30px;
    border-radius: 6px;
}

.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 10;
    transition: background 0.3s ease;
}

.carousel-nav:hover {
    background: rgba(0, 0, 0, 0.7);
}

.carousel-nav.prev {
    left: 0.5rem;
}

.carousel-nav.next {
    right: 0.5rem;
}

@media (max-width: 992px) {
    .carousel-nav.prev {
        left: 0.25rem;
    }

    .carousel-nav.next {
        right: 0.25rem;
    }
}

.service-areas {
    background-color: #f8f9fa;
    padding: 3rem 0;
}

.area-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
    margin-top: 2rem;
}

.area-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s ease;
    font-weight: 500;
    border: 2px solid #8B0000;
}

.area-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.col-5 {
    flex: 0 0 20%;
    max-width: 20%;
}

.company-values {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.value-item {
    text-align: center;
    padding: 1rem;
}

.value-item h4 {
    color: var(--secondary-color);
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.hero-buttons {
    display: inline-flex;
    gap: 1rem;
    align-items: stretch;
}

.hero-buttons .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 70px;
    padding: 0.75rem 1.5rem;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid white;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.hero-buttons .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    opacity: 0.9;
    color: white !important;
}

.navbar-dark .navbar-nav .nav-link {
    color: white;
    background-color: transparent;
    border: none;
    border-radius: 4px;
    padding: 10px 16px !important;
    margin: 0 2px;
    transition: all 0.3s ease;
    font-weight: 500;
    position: relative;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
}

.navbar-dark .navbar-nav .nav-item:last-child .nav-link {
    border-right: none;
}

.navbar-dark .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: white;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.navbar-dark .navbar-nav .nav-link:hover,
.navbar-dark .navbar-nav .nav-link:focus {
    color: white;
    background-color: transparent;
}

.navbar-dark .navbar-nav .nav-link:hover::after,
.navbar-dark .navbar-nav .nav-link:focus::after {
    width: 80%;
}

@media (max-width: 991px) {
    .navbar-nav {
        text-align: center;
    }
    
    .navbar-dark .navbar-nav .nav-link {
        border-right: none;
        display: block;
        text-align: center;
    }
}

.navbar-brand {
    transition: opacity 0.3s ease;
}

.navbar-brand.hidden {
    opacity: 0;
}


@media (max-width: 768px) {
    .award-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
        margin: 0.2rem;
    }
    
    .hero-section {
        padding: 120px 0 60px 0;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
}