/* Custom Navigation Styles for Leak Detection Crawley */

/* Header Top Section - Full Width Layout */
.header-top-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    min-height: 60px;
    padding: 10px 0;
}

/* Ensure proper responsive behavior */
@media (max-width: 991px) {
    .header-top-flex {
        flex-wrap: wrap;
    }
    
    .header-logo-wrapper,
    .header-contact-wrapper {
        flex: 1 1 100%;
        text-align: center;
    }
}

/* Additional responsive fixes for all pages */
@media (max-width: 768px) {
    .page-header .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .page-header .row {
        margin-left: 0;
        margin-right: 0;
    }
    
    .header-top-flex {
        display: flex !important;
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
    }
    
    .header-logo-wrapper,
    .header-contact-wrapper {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 10px;
    }
}

.header-logo-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
}

.header-contact-wrapper {
    flex: 1;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

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

/* Main Navigation Bar */
.main-navbar {
    background-color: #337ab7;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: relative;
    z-index: 1000;
    min-height: 60px;
}

/* Navigation Container */
.main-navbar .container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    width: 100%;
}

/* Navigation Links Container */
.main-navbar .navbar-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Navigation Links */
.main-navbar .navbar-nav > li > a {
    color: #ffffff;
    font-weight: 600;
    padding: 20px 20px;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
    display: block;
    text-align: center;
    line-height: 1.2;
}

.main-navbar .navbar-nav > li > a:hover,
.main-navbar .navbar-nav > li > a:focus {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
}

.main-navbar .navbar-nav > .active > a,
.main-navbar .navbar-nav > .active > a:hover,
.main-navbar .navbar-nav > .active > a:focus {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.2);
    border-bottom: 3px solid #ffffff;
}

/* Mobile Toggle Button */
.main-navbar .navbar-toggle {
    border-color: #ffffff;
    background-color: transparent;
    border-radius: 4px;
    padding: 8px 12px;
}

.main-navbar .navbar-toggle .icon-bar {
    background-color: #ffffff;
    height: 3px;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.main-navbar .navbar-toggle:hover,
.main-navbar .navbar-toggle:focus {
    background-color: rgba(52, 152, 219, 0.1);
    border-color: #3498db;
}

.main-navbar .navbar-toggle:hover .icon-bar {
    background-color: #3498db;
}


/* Mobile Responsiveness */
@media (max-width: 768px) {
    .header-top-flex {
        flex-direction: column !important;
        text-align: center !important;
        padding: 15px 0 !important;
        min-height: auto !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .header-logo-wrapper {
        margin-bottom: 10px !important;
        justify-content: center !important;
        width: 100% !important;
        text-align: center !important;
    }
    
    .header-contact-wrapper {
        text-align: center !important;
        justify-content: center !important;
        width: 100% !important;
    }
    
    .logo img {
        max-height: 45px !important;
        width: auto !important;
        margin: 0 auto !important;
        display: block !important;
    }
    
    .header-contact {
        font-size: 0.9em !important;
        text-align: center !important;
    }
    
    .quick-contact-desc {
        font-size: 0.8em !important;
        text-align: center !important;
    }
    
    .quick-contact-num {
        font-size: 1.1em !important;
        text-align: center !important;
    }
    
    /* Professional Mobile Navigation */
    .main-navbar .container {
        padding: 0;
        position: relative;
    }
    
    .main-navbar .navbar-header {
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 20px;
        background-color: #337ab7;
    }
    
    .main-navbar .navbar-toggle {
        margin: 0;
        padding: 10px 12px;
        border: 2px solid #ffffff;
        border-radius: 4px;
        background-color: transparent;
    }
    
    .main-navbar .navbar-toggle:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }
    
    .main-navbar .navbar-collapse {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: #2c3e50;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
        z-index: 1000;
        margin: 0;
        padding: 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: all 0.3s ease;
    }
    
    .main-navbar .navbar-collapse.in {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    .main-navbar .navbar-collapse.collapsing {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
    
    /* Ensure menu is completely hidden when closed */
    .main-navbar .navbar-collapse:not(.in):not(.collapsing) {
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        pointer-events: none;
    }
    
    .main-navbar .navbar-nav {
        flex-direction: column;
        width: 100%;
        margin: 0;
        padding: 0;
        background-color: #2c3e50;
    }
    
    .main-navbar .navbar-nav > li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .main-navbar .navbar-nav > li:last-child {
        border-bottom: none;
    }
    
    .main-navbar .navbar-nav > li > a {
        padding: 18px 25px;
        text-align: left;
        width: 100%;
        min-width: auto;
        border-radius: 0;
        display: block;
        font-size: 16px;
        font-weight: 500;
        border-left: 4px solid transparent;
        transition: all 0.2s ease;
    }
    
    .main-navbar .navbar-nav > li > a:hover {
        background-color: rgba(255, 255, 255, 0.1);
        border-left-color: #3498db;
        padding-left: 30px;
    }
    
    .main-navbar .navbar-nav > .active > a {
        background-color: rgba(52, 152, 219, 0.2);
        border-left-color: #3498db;
        color: #ffffff;
    }
    
}

@media (max-width: 480px) {
    .header-top-flex {
        padding: 10px 0 !important;
        flex-direction: column !important;
        text-align: center !important;
    }
    
    .logo img {
        max-height: 40px !important;
        width: auto !important;
        margin: 0 auto !important;
    }
    
    .header-contact {
        font-size: 0.8em !important;
        text-align: center !important;
    }
    
    .quick-contact-desc {
        font-size: 0.7em !important;
        margin-bottom: 5px !important;
        text-align: center !important;
    }
    
    .quick-contact-num {
        font-size: 1em !important;
        margin: 5px 0 !important;
        text-align: center !important;
    }
    
    .header-logo-wrapper,
    .header-contact-wrapper {
        width: 100% !important;
        text-align: center !important;
    }
    
    .main-navbar .navbar-header {
        padding: 12px 15px;
    }
    
    .main-navbar .navbar-toggle {
        padding: 8px 10px;
    }
    
    .main-navbar .navbar-nav > li > a {
        font-size: 15px;
        padding: 16px 20px;
    }
    
    .main-navbar .navbar-nav > li > a:hover {
        padding-left: 25px;
    }
    
}

/* Smooth scrolling for anchor links */
html {
    scroll-behavior: smooth;
}

/* Add spacing for anchor targets */
section[id] {
    padding-top: 20px;
    scroll-margin-top: 80px;
}

/* Navigation Animation */
.navbar-collapse {
    transition: all 0.3s ease;
}

.navbar-collapse.collapsing {
    transition: height 0.3s ease;
}

/* Dropdown Menu Styles (if needed in future) */
.main-navbar .dropdown-menu {
    background-color: #2c3e50;
    border: none;
    border-radius: 0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.main-navbar .dropdown-menu > li > a {
    color: #ffffff;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.main-navbar .dropdown-menu > li > a:hover,
.main-navbar .dropdown-menu > li > a:focus {
    background-color: #3498db;
    color: #ffffff;
}

/* Logo - Simple styling */
.logo img {
    /* No animations */
}

.logo img:hover {
    /* No animations */
}

/* Header Contact - Simple styling */
.header-contact {
    /* No animations */
}

.quick-contact-num a {
    /* No animations */
}

.quick-contact-num a:hover {
    /* No animations */
}

/* Simple navigation styling */
.main-navbar .navbar-nav > li {
    margin: 0;
}

/* Additional Mobile Optimizations */
@media (max-width: 991px) {
    .navbar-header {
        float: none;
        width: 100%;
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .navbar-left,
    .navbar-right {
        float: none !important;
    }
    
    .navbar-toggle {
        display: block;
        order: 2;
    }
    
    .navbar-collapse {
        border-top: 1px solid transparent;
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
    }
    
    .main-navbar .container {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* Simple responsive adjustments */
@media (max-width: 1200px) {
    .main-navbar .navbar-nav > li > a {
        padding: 20px 15px;
        font-size: 13px;
    }
}

@media (max-width: 1000px) {
    .main-navbar .navbar-nav > li > a {
        padding: 20px 12px;
        font-size: 12px;
    }
}

/* Focus States for Accessibility */
.main-navbar .navbar-nav > li > a:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

.navbar-toggle:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}


/* Loading Animation */
@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.navbar-collapse.in {
    animation: fadeInDown 0.3s ease;
}

/* Sticky Navigation (if needed) */
.main-navbar.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .main-navbar {
        border-bottom: 2px solid #ffffff;
    }
    
    .main-navbar .navbar-nav > li > a {
        border: 1px solid transparent;
    }
    
    .main-navbar .navbar-nav > li > a:hover {
        border-color: #3498db;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .main-navbar .navbar-nav > li > a,
    .logo img {
        transition: none;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* Terms & Conditions Page Styling */
.terms-content {
    background: #ffffff;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 30px 0;
    line-height: 1.6;
}

.page-header-section {
    text-align: center;
    margin: 40px 0;
    padding: 30px 0;
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: #ffffff;
    border-radius: 8px;
}

.page-title {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.page-subtitle {
    font-size: 1.2em;
    opacity: 0.9;
    margin: 0;
}

.intro-section {
    background: #f8f9fa;
    padding: 25px;
    border-left: 4px solid #3498db;
    margin-bottom: 30px;
    border-radius: 0 8px 8px 0;
}

.intro-section .lead {
    font-size: 1.1em;
    margin: 0;
    color: #2c3e50;
}

.terms-section {
    margin-bottom: 35px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e9ecef;
}

.terms-section:last-of-type {
    border-bottom: none;
}

.terms-section h2 {
    color: #2c3e50;
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    display: inline-block;
}

.terms-section ol,
.terms-section ul {
    margin-left: 20px;
}

.terms-section li {
    margin-bottom: 10px;
    color: #555;
}

.definitions-list {
    list-style: none;
    margin-left: 0;
}

.definitions-list li {
    background: #f8f9fa;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    border-left: 3px solid #3498db;
}

.terms-section p {
    color: #555;
    margin-bottom: 15px;
}

.terms-section a {
    color: #3498db;
    text-decoration: none;
    font-weight: 500;
}

.terms-section a:hover {
    color: #2980b9;
    text-decoration: underline;
}

.last-updated {
    background: #e8f4f8;
    padding: 20px;
    border-radius: 5px;
    text-align: center;
    margin-top: 30px;
    border: 1px solid #b3d9f2;
}

.last-updated p {
    margin: 0;
    color: #2c3e50;
    font-style: italic;
}

/* Footer Styling */
.page-footer {
    background-color: #2c3e50;
    color: #ffffff;
    padding: 30px 0;
    margin-top: 50px;
}

.footer-content {
    text-align: center;
}

.footer-content p {
    margin: 10px 0;
    color: #bdc3c7;
}

.footer-content a {
    color: #3498db;
    text-decoration: none;
    margin: 0 10px;
}

.footer-content a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Responsive Design for Terms Page */
@media (max-width: 768px) {
    .terms-content {
        padding: 20px;
        margin: 20px 0;
    }
    
    .page-title {
        font-size: 2em;
    }
    
    .page-subtitle {
        font-size: 1em;
    }
    
    .intro-section {
        padding: 20px;
    }
    
    .terms-section h2 {
        font-size: 1.3em;
    }
    
    .definitions-list li {
        padding: 12px;
    }
}

@media (max-width: 480px) {
    .terms-content {
        padding: 15px;
    }
    
    .page-title {
        font-size: 1.8em;
    }
    
    .terms-section h2 {
        font-size: 1.2em;
    }
    
    .definitions-list li {
        padding: 10px;
        font-size: 0.9em;
    }
}

/* Services Page Styling */
.services-grid {
    margin: 40px 0;
}

.service-item {
    background: #2c3e50;
    border: 1px solid #2c3e50;
    border-radius: 8px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 30px;
    transition: all 0.3s ease;
}

.service-item:hover {
    background: #3498db;
    border-color: #3498db;
    transform: translateY(-2px);
}

.service-item a {
    text-decoration: none;
    color: #ffffff;
    display: block;
}

.service-item a:hover {
    text-decoration: none;
    color: #ffffff;
}

.service-item h3 {
    font-size: 1.5em;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ffffff;
}

.service-item p {
    color: #ecf0f1;
    margin: 0;
    font-size: 0.9em;
}

/* Responsive Services Grid */
@media (max-width: 768px) {
    .service-item {
        padding: 25px 15px;
        margin-bottom: 20px;
    }
    
    .service-item h3 {
        font-size: 1.3em;
    }
}

@media (max-width: 480px) {
    .service-item {
        padding: 20px 15px;
    }
    
    .service-item h3 {
        font-size: 1.2em;
    }
    
    .service-item p {
        font-size: 0.8em;
    }
}
