/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    position: relative;
    min-height: 100%;
    scroll-behavior: smooth;
}

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
    line-height: 1.6;
    color: #333;
    margin: 0;
    padding: 0;
    background-color: #fff;
}

/* Header Styles */
.site-header {
    background-color: #ffffff;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.top-bar {
    background-color: #ffffff;
    padding: 10px 0;
    color: #333;
    transition: opacity 0.35s ease, max-height 0.35s ease, padding 0.35s ease;
}

/* Hide top bar when page is scrolled down (fade out) */
body.header-scrolled .top-bar {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    overflow: hidden;
    pointer-events: none;
}

/* Hide top bar (phone/email) when navbar is collapsed */
@media (max-width: 991.98px) {
    .top-bar {
        display: none;
    }
}

.contact-info {
    display: flex;
    gap: 20px;
    align-items: center;
}

.contact-info a {
    color: #ffaa17 !important;
    text-decoration: none;
    font-size: 14px;
    display: inline-block;
    transition: color 0.3s, transform 0.3s ease;
}

.contact-info a:hover {
    color: #ff6600 !important;
    transform: scale(1.15);
}

.contact-info a:visited {
    color: #ffaa17 !important;
}

.contact-info a:link {
    color: #ffaa17 !important;
}

.main-nav {
    background-color: #ffffff;
    padding: 15px 0;
}

/* Toggler visible on white nav (navbar-dark uses light icon by default) */
.main-nav .navbar-toggler {
    border: 1px solid rgba(0,0,0,0.25);
    padding: 0.35em 0.65em;
}
.main-nav .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23333' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}
.main-nav .navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(0,0,0,0.25);
}

.navbar-brand-wrap {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
}

.navbar-brand {
    position: relative;
    display: inline-block;
    min-height: 50px;
    min-width: 180px;
    color: #fff !important;
    font-weight: bold;
    text-decoration: none;
}

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

.navbar-tagline {
    font-size: 0.8rem;
    color: #666;
    margin-top: 4px;
    letter-spacing: 0.02em;
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, max-height 0.35s ease, visibility 0.35s ease, margin 0.35s ease, transform 0.3s ease;
    display: inline-block;
    transform-origin: left center;
}

.navbar-brand-wrap:hover .navbar-tagline {
    transform: scale(1.2);
}

.logo-img {
    height: 50px;
    width: auto;
    display: none;
}

.brand-text {
    font-size: 18px;
    color: #333;
}

.navbar-brand img.navbar-brand-img {
    height: 50px;
    width: auto;
    max-width: 280px;
    object-fit: contain;
    vertical-align: middle;
    position: absolute;
    left: 0;
    top: 0;
    transition: opacity 0.35s ease, transform 0.3s ease;
    transform-origin: left center;
}

.navbar-brand:hover img.navbar-brand-img {
    transform: scale(1.1);
}

/* Small header (collapsed nav): show sm logo, hide lg */
.navbar-brand img.navbar-brand-img-sm {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
.navbar-brand img.navbar-brand-img-lg {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Expanded header (992px+): show lg logo, hide sm, show tagline */
@media (min-width: 992px) {
    .navbar-brand {
        min-height: 55px;
        min-width: 320px;
    }
    .navbar-brand img.navbar-brand-img-sm {
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
    }
    .navbar-brand img.navbar-brand-img-lg {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        max-width: 320px;
        height: 55px;
    }
    .navbar-tagline {
        opacity: 1;
        visibility: visible;
        max-height: 2.5rem;
    }
}

/* When scrolled (header “small”), show sm logo on all viewports */
body.header-scrolled .navbar-brand img.navbar-brand-img-sm {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}
body.header-scrolled .navbar-brand img.navbar-brand-img-lg {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
body.header-scrolled .navbar-tagline {
    opacity: 0;
    visibility: hidden;
    max-height: 0;
    margin-top: 0;
}

.navbar-nav .nav-link {
    color: #333 !important;
    padding: 10px 20px !important;
    transition: background-color 0.3s, color 0.3s, transform 0.3s ease;
    font-weight: 500;
    background-color: #ffffff;
    display: inline-block;
}

.navbar-nav .nav-link:hover {
    background-color: #ffffff;
    color: #ff6600 !important;
    transform: scale(1.15);
}

.navbar-nav .nav-link.active {
    background-color: #ffffff;
    color: #ff6600 !important;
    border-bottom: 2px solid #ff6600;
    text-decoration: none;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)), url('../images/hero-bg.jpg');
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 100px 0;
    text-align: center;
    position: relative;
}

.hero-section h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    font-weight: bold;
}

.hero-section .subtitle {
    font-size: 1.5rem;
    margin-bottom: 30px;
    color: #ff6600;
}

.hero-tagline {
    font-size: 1.2rem;
    margin-top: 20px;
}

/* News Card */
.news-card-section {
    padding: 40px 0 20px;
}

.news-card {
    background: #fff;
    padding: 28px 36px 32px;
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    border-left: 5px solid #ff6600;
    position: relative;
    transition: transform 0.3s ease;
}

.news-card:hover {
    transform: scale(1.1);
}

.news-card-badge {
    display: inline-block;
    background: #ff6600;
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 4px 10px;
    border-radius: 4px;
    margin-bottom: 12px;
}

.news-card-title {
    color: #1a1a1a;
    font-size: 1.75rem;
    margin-bottom: 12px;
    font-weight: bold;
}

.news-card-text {
    color: #555;
    line-height: 1.75;
    margin: 0;
}

/* Content Sections */
.content-section {
    padding: 60px 0;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 30px;
    text-align: center;
    color: #1a1a1a;
    font-weight: bold;
}

.section-subtitle {
    font-size: 1.3rem;
    color: #7f8c8d;
    text-align: center;
    margin-bottom: 40px;
}

.highlight-box {
    background-color: #f5f5f5;
    padding: 30px;
    border-radius: 5px;
    margin: 20px 0;
    border-left: 4px solid #ff6600;
}

.highlight-box h3 {
    color: #1a1a1a;
    margin-bottom: 15px;
}

.contact-us-link {
    display: inline-block;
    transition: transform 0.3s ease;
}
.contact-us-link:hover {
    transform: scale(1.05);
}

.highlight-box p {
    color: #555;
    line-height: 1.8;
}

/* Feature Cards */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.feature-card {
    background: #fff;
    padding: 30px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s, box-shadow 0.3s;
}

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

.feature-card h4 {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.feature-card p {
    color: #555;
    line-height: 1.8;
}

/* Company Info Section */
.company-info {
    background-color: #f8f9fa;
    padding: 60px 0;
}

.company-info h2 {
    color: #1a1a1a;
    margin-bottom: 30px;
    font-size: 2.5rem;
}

.company-info p {
    color: #555;
    line-height: 1.8;
    font-size: 1.1rem;
    margin-bottom: 20px;
}
.company-info .col-md-6:last-child {
    overflow: hidden;
    border-radius: 5px;
}
.company-info img {
    transition: transform 0.35s ease;
}
.company-info img:hover {
    transform: scale(1.1);
}

/* Services Grid */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.service-item {
    background: #fff;
    padding: 25px;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-top: 3px solid #ff6600;
}

.service-item h4 {
    color: #1a1a1a;
    margin-bottom: 15px;
    font-size: 1.3rem;
}

.service-item ul {
    list-style: none;
    padding: 0;
}

.service-item ul li {
    padding: 8px 0;
    color: #555;
    border-bottom: 1px solid #ecf0f1;
}

.service-item ul li:before {
    content: "✓ ";
    color: #ff6600;
    font-weight: bold;
    margin-right: 8px;
}

.equipment-fleet-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    max-width: 500px;
}
.equipment-fleet-list li {
    padding: 10px 0;
    color: #555;
    border-bottom: 1px solid #ecf0f1;
    padding-left: 28px;
    position: relative;
}
.equipment-fleet-list li:before {
    content: "✓ ";
    color: #ff6600;
    font-weight: bold;
    position: absolute;
    left: 0;
}

.community-orgs-list {
    list-style: none;
    padding: 0;
    margin-top: 1rem;
    max-width: 500px;
}
.community-orgs-list li {
    padding: 10px 0;
    color: #555;
    border-bottom: 1px solid #ecf0f1;
    padding-left: 28px;
    position: relative;
}
.community-orgs-list li:before {
    content: "✓ ";
    color: #ff6600;
    font-weight: bold;
    position: absolute;
    left: 0;
}

/* Gallery */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    margin-top: 40px;
}

@media (max-width: 1200px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width: 992px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

.gallery-item-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.gallery-item-caption {
    font-size: 0.85rem;
    color: #555;
    margin: 0;
    line-height: 1.3;
    text-align: center;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    aspect-ratio: 4/3;
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}

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

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

/* Index page gallery carousel */
.gallery-carousel {
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}
.gallery-carousel .carousel-inner {
    border-radius: 8px;
}
.gallery-carousel .carousel-item {
    max-height: 450px;
    background: #1a1a1a;
}
.gallery-carousel .carousel-item {
    overflow: hidden;
}
.gallery-carousel .carousel-item img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    transition: transform 0.35s ease;
}
.gallery-carousel .carousel-item:hover img {
    transform: scale(1.1);
}
.gallery-carousel-link {
    text-decoration: none;
    color: inherit;
}
.gallery-carousel .carousel-control-prev-icon,
.gallery-carousel .carousel-control-next-icon {
    background-color: rgba(0,0,0,0.5);
    border-radius: 4px;
    padding: 1.5rem;
}
.gallery-carousel .carousel-indicators button {
    background-color: rgba(0,0,0,0.6);
}

/* Admin gallery images: clickable thumbnail to edit */
.gallery-thumb-link {
    cursor: pointer;
    display: block;
    text-decoration: none;
    color: inherit;
}
.gallery-thumb-link:hover {
    opacity: 0.9;
    outline: 2px solid var(--bs-primary, #0d6efd);
    outline-offset: 2px;
}

/* Admin Gallery Images: grid cards (label input, filename, remove) */
.gallery-Images-card {
    background: #fff;
    border-radius: 5px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 8px;
    border: 1px solid rgba(0,0,0,0.08);
}
.gallery-Images-card .gallery-item {
    margin: -8px -8px 8px -8px;
    border-radius: 5px 5px 0 0;
}
.gallery-Images-input {
    margin-bottom: 4px;
}
.gallery-Images-filename {
    font-size: 0.7rem;
    line-height: 1.2;
    word-break: break-all;
    margin: 0 0 6px 0;
}

/* Admin GalleryImageEdit: prev/next arrows on page */
.gallery-edit-page-nav {
    flex-wrap: wrap;
    gap: 0.5rem;
}
.gallery-edit-page-nav .btn.disabled {
    opacity: 0.5;
}

/* Lightbox Modal */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.lightbox-content {
    position: relative;
    max-width: 90%;
    max-height: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 5px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.lightbox-caption {
    color: #fff;
    text-align: center;
    padding: 15px 0;
    font-size: 1.1rem;
    max-width: 80%;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #fff;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10000;
    transition: color 0.3s;
    line-height: 1;
}

.lightbox-close:hover {
    color: #ff6600;
}

.lightbox-prev,
.lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #fff;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    padding: 16px;
    user-select: none;
    transition: color 0.3s, background-color 0.3s;
    border-radius: 3px;
    z-index: 10000;
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    color: #ff6600;
    background-color: rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        font-size: 30px;
        padding: 10px;
    }
    
    .lightbox-prev {
        left: 10px;
    }
    
    .lightbox-next {
        right: 10px;
    }
    
    .lightbox-close {
        top: 10px;
        right: 20px;
        font-size: 30px;
    }
    
    .lightbox-content img {
        max-height: 75vh;
    }
}

.gallery-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    text-align: center;
    padding: 20px;
    transition: background 0.3s;
}

.gallery-item:hover .gallery-placeholder {
    background: linear-gradient(135deg, #333333 0%, #1a1a1a 100%);
}

/* Contact Form */
.map-container {
    margin-top: 1rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}
.map-container iframe {
    display: block;
}
.map-link {
    margin-top: 0.75rem;
    margin-bottom: 0;
}
.map-link a:hover {
    text-decoration: underline;
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: #fff;
    padding: 40px;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #1a1a1a;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus,
.form-control:focus {
    outline: none;
    border-color: #ff6600;
    box-shadow: 0 0 0 0.2rem rgba(255, 102, 0, 0.25);
}

.text-danger {
    color: #dc3545;
    font-size: 14px;
    margin-top: 5px;
    display: block;
}

.btn-submit {
    background-color: #ff6600;
    color: #fff;
    padding: 12px 30px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
    width: 100%;
}

.btn-submit:hover {
    background-color: #e55a00;
}

/* Footer */
.site-footer {
    background-color: #1a1a1a;
    color: #fff;
    padding: 50px 0 20px;
    margin-top: 60px;
}

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

.footer-section h5 {
    color: #ff6600;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-contact-label {
    color: #ffffff;
}

.footer-info-label {
    color: #ffaa17;
}

.footer-label {
    color: #ffffff;
}

.footer-contact-info-label {
    color: #ffaa17;
}

.footer-secondary-label {
    color: #ffaa17;
}

.footer-section p {
    color: #a4a6a9;
    margin-bottom: 10px;
    line-height: 1.8;
}

.footer-section a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-section a:hover {
    color: #ff6600;
}

.footer-nav {
    list-style: none;
    padding: 0;
}

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

.footer-nav a {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s;
}

.footer-nav a:hover {
    color: #ff6600;
    padding-left: 5px;
}

.copyright {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #333333;
}

.copyright p {
    color: #95a5a6;
    margin: 0;
}

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 999;
}

.scroll-to-top a {
    background-color: #ff6600;
    color: #fff;
    padding: 12px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.scroll-to-top a:hover {
    background-color: #e55a00;
}

/* Responsive */
@media (max-width: 768px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .hero-section .subtitle {
        font-size: 1.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .contact-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .navbar-brand {
        flex-direction: column;
    }
    
    .brand-text {
        font-size: 14px;
    }
    
    .navbar-brand img.navbar-brand-img-sm {
        height: 40px;
        max-width: 220px;
    }
    
    .feature-cards,
    .services-grid,
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

/* Divider */
.divider {
    height: 2px;
    background: linear-gradient(to right, transparent, #ff6600, transparent);
    margin: 40px 0;
}
