/* QualShips Website Custom Styles */

:root {
    --primary-color: #0f4c75;
    --secondary-color: #3282b8;
    --accent-color: #1e5a96;
    --dark-color: #0a2540;
    --light-color: #bbe1fa;
    --text-muted: #4a6b7c;
    --nav-bg: #f0f8ff;
    --section-bg: #f7fbff;
    --card-bg: #ffffff;
    --bs-primary: var(--primary-color);
    --bs-primary-rgb: 15, 76, 117;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: #333;
    overflow-x: hidden;
    padding-top: 0;
}

/* Fix for section scroll offset */
section {
    scroll-margin-top: 80px;
    position: relative;
    z-index: 1;
}

section:not(.hero-section) {
    margin-top: 0;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Navigation Styles */
.navbar {
    transition: all 0.3s ease;
    z-index: 1030;
    background-color: var(--nav-bg);
}

.navbar.scrolled {
    background-color: rgba(240, 248, 255, 0.98) !important;
    box-shadow: 0 2px 20px rgba(15, 76, 117, 0.15);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    transition: transform 0.3s ease;
}

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

.nav-link {
    font-weight: 500;
    margin: 0 0.5rem;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link:hover::after {
    width: 80%;
}

/* Page Header (for internal pages) */
.page-header {
    background: linear-gradient(135deg, #0a4d68 0%, #0a5a8a 100%);
    position: relative;
    overflow: hidden;
}

.page-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(50, 130, 184, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(15, 76, 117, 0.3) 0%, transparent 50%);
    pointer-events: none;
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, #4a9fd8 0%, #66b8e0 50%, #7ec8e3 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    z-index: 1;
    margin-top: 0 !important;
    scroll-margin-top: 0 !important;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(30, 90, 150, 0.85), rgba(44, 123, 182, 0.85)),
        url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.05" d="M0,96L48,112C96,128,192,160,288,165.3C384,171,480,149,576,138.7C672,128,768,128,864,138.7C960,149,1056,171,1152,165.3C1248,160,1344,128,1392,112L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-size: cover;
    background-position: bottom;
    animation: wave 15s ease-in-out infinite;
}

@keyframes wave {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(50, 130, 184, 0.3) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(15, 76, 117, 0.3) 0%, transparent 50%);
}

.hero-section .container {
    position: relative;
    z-index: 1;
}

.hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease;
}

.hero-section .lead {
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    animation: fadeInUp 1s ease 0.2s both;
}

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

.certifications-badges {
    animation: fadeInUp 1s ease 0.4s both;
}

.cert-badge {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.3s ease;
}

.cert-badge:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.cert-badge-img {
    height: 80px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: brightness(1.1);
}

.cert-badge-img:hover {
    transform: translateY(-2px) scale(1.05);
    filter: brightness(1.2);
}

.backdrop-blur {
    backdrop-filter: blur(10px);
}

/* Buttons */
.btn {
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border-radius: 0.5rem;
}

.btn-primary {
    background: var(--primary-color);
    border: none;
    box-shadow: 0 4px 15px rgba(30, 90, 150, 0.3);
}

.btn-primary:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 90, 150, 0.4);
}

.btn-outline-primary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-outline-primary:hover,
.btn-outline-primary:focus,
.btn-outline-primary:active {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: #fff;
}

.text-primary {
    color: var(--primary-color) !important;
}

a.text-primary:hover,
a.text-primary:focus {
    color: var(--accent-color) !important;
}

.border-primary {
    border-color: var(--primary-color) !important;
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: white;
    transform: translateY(-2px);
}

/* Cards */
.card {
    transition: all 0.3s ease;
    border-radius: 1rem;
}

.hover-lift:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

.icon-box {
    width: 70px;
    height: 70px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Value Cards */
.value-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.value-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary-color);
}

.value-number {
    display: inline-block;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    line-height: 50px;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

/* Service Cards */
.service-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border-left: 4px solid var(--secondary-color);
}

.service-card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    border-left-color: var(--primary-color);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 5px 15px rgba(30, 90, 150, 0.3);
}

.service-icon-large {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    box-shadow: 0 5px 20px rgba(30, 90, 150, 0.3);
}

.special-service {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid var(--secondary-color);
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
}

.timeline-item {
    position: relative;
    margin-bottom: 3rem;
    display: flex;
    align-items: center;
}

.timeline-item:nth-child(odd) {
    flex-direction: row;
}

.timeline-item:nth-child(even) {
    flex-direction: row-reverse;
}

.timeline-dot {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: var(--primary-color);
    border: 4px solid white;
    box-shadow: 0 0 0 4px rgba(30, 90, 150, 0.2);
    z-index: 2;
}

.timeline-content {
    width: 45%;
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.timeline-item:nth-child(odd) .timeline-content {
    margin-right: auto;
}

.timeline-item:nth-child(even) .timeline-content {
    margin-left: auto;
}

.timeline-content:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.timeline-year {
    display: inline-block;
    padding: 0.5rem 1.5rem;
    background: var(--primary-color);
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    border-radius: 2rem;
    margin-bottom: 1rem;
}

/* Client Cards */
.client-card {
    background: white;
    padding: 1.5rem;
    border-radius: 1rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

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

.client-name {
    font-weight: 600;
    color: var(--primary-color);
    text-align: center;
    font-size: 0.9rem;
}

.client-logo {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
}

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

/* Location Items */
.location-item {
    display: flex;
    align-items: flex-start;
    padding: 1.5rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.location-item:hover {
    transform: translateX(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* Contact Section */
.contact-item {
    display: flex;
    align-items: flex-start;
}

.contact-item i {
    flex-shrink: 0;
}

/* Map Placeholder */
.map-placeholder {
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* ===================================
   Footer Styles - Optimized Color Scheme
   Background: Blue gradient (#0f4c75 to #3282b8)
   Headings: White (#ffffff)
   Body Text: Light blue (#b8d4e8)
   Links: Light blue (#b8d4e8) → White on hover
   Icons: Brand blue (#4a9fd8)
   Copyright: Medium blue (#8ab4d5)
   =================================== */

.footer {
    background-color: #052b3b;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(50, 130, 184, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(15, 76, 117, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

.footer .container {
    position: relative;
    z-index: 1;
}

/* Footer Brand */
.footer-brand {
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Footer Text */
.footer-text {
    color: #b8d4e8;
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Footer Tagline */
.footer-tagline {
    color: #4a9fd8;
    font-weight: 500;
    background: rgba(74, 159, 216, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    display: inline-block;
    border-left: 3px solid #4a9fd8;
}

/* Footer Headings */
.footer-heading {
    color: #ffffff;
    font-weight: 600;
    position: relative;
    padding-bottom: 0.5rem;
}

.footer-heading::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, #4a9fd8, transparent);
}

/* Footer Links */
.footer-link {
    color: #b8d4e8;
    transition: all 0.3s ease;
    display: inline-block;
    position: relative;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: #ffffff;
    padding-left: 8px;
    transform: translateX(5px);
}

.footer-link::before {
    content: '→';
    position: absolute;
    left: -15px;
    opacity: 0;
    transition: all 0.3s ease;
    color: #4a9fd8;
}

.footer-link:hover::before {
    opacity: 1;
    left: -20px;
}

/* Footer Contact */
.footer-contact {
    color: #b8d4e8;
    font-size: 0.95rem;
}

.footer-contact li {
    line-height: 1.8;
}

/* Footer Icons */
.footer-icon {
    color: #4a9fd8;
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Footer Divider */
.footer-divider {
    border-color: rgba(255, 255, 255, 0.2);
    opacity: 0.5;
}

/* Footer Copyright and Services */
.footer-copyright,
.footer-services {
    color: #8ab4d5;
    font-size: 0.9rem;
}

/* Add subtle animation to footer links */
@keyframes footerGlow {
    0%, 100% {
        text-shadow: 0 0 5px rgba(74, 159, 216, 0);
    }
    50% {
        text-shadow: 0 0 8px rgba(74, 159, 216, 0.3);
    }
}

.footer-link:hover {
    animation: footerGlow 2s ease-in-out infinite;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-heading {
        font-size: 1.1rem;
    }
    
    .footer-text,
    .footer-link,
    .footer-contact {
        font-size: 0.9rem;
    }
    
    .footer-tagline {
        font-size: 0.85rem;
        padding: 0.4rem 0.8rem;
    }
}

/* Responsive Timeline */
@media (max-width: 768px) {
    .timeline::before {
        left: 30px;
    }
    
    .timeline-item {
        flex-direction: row !important;
    }
    
    .timeline-dot {
        left: 30px;
    }
    
    .timeline-content {
        width: calc(100% - 80px);
        margin-left: auto !important;
    }
    
    .timeline-item:nth-child(odd) .timeline-content {
        margin-right: 0 !important;
    }
}

/* Mobile Optimizations */
@media (max-width: 576px) {
    .hero-section h1 {
        font-size: 2rem;
    }
    
    .display-5 {
        font-size: 2rem;
    }
    
    .cert-badge {
        font-size: 0.75rem;
        padding: 0.4rem 0.8rem;
    }
    
    .cert-badge-img {
        height: 45px;
    }
    
    .value-number {
        width: 40px;
        height: 40px;
        line-height: 40px;
        font-size: 1rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
}

/* Loading Animation */
@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Blue Theme Background Classes */
.bg-blue-light {
    background-color: var(--light-color) !important;
}

.bg-blue-section {
    background-color: var(--section-bg) !important;
}

.bg-blue-nav {
    background-color: var(--nav-bg) !important;
}

.bg-blue-card {
    background-color: var(--card-bg) !important;
}

/* Utility Classes */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

/* Quick Link Cards (Home Page) */
.quick-link-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.quick-link-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
    border-color: var(--secondary-color);
}

.icon-box-large {
    width: 80px;
    height: 80px;
    border-radius: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Contact Info Cards */
.contact-info-card {
    background: white;
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.contact-info-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.contact-form-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
}

/* Certification Cards */
.cert-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.cert-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Milestone Cards */
.milestone-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.milestone-card:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Partnership Cards */
.partnership-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border-left: 4px solid var(--primary-color);
}

.partnership-card:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Location Cards */
.location-card {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.location-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    border-left: 4px solid var(--primary-color);
}

/* Feature Box */
.feature-box {
    background: white;
    border-radius: 1rem;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
}

.feature-box:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

/* Active Navigation Link */
.nav-link.active {
    color: var(--primary-color) !important;
    font-weight: 600;
}

.nav-link.active::after {
    width: 80%;
}

/* Accordion Customization */
.accordion-button {
    font-weight: 600;
    background-color: var(--light-color);
}

.accordion-button:not(.collapsed) {
    background-color: var(--primary-color);
    color: white;
}

.accordion-button:not(.collapsed)::after {
    filter: brightness(0) invert(1);
}

/* Form Styling */
.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(30, 90, 150, 0.25);
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

/* Section Stacking and Spacing Fix */
#about,
#services,
#history,
#clients,
#contact {
    position: relative;
    z-index: 2;
    background-clip: padding-box;
}

/* Ensure sections don't overlap */
section + section {
    margin-top: 0;
    clear: both;
}

/* Additional spacing for content sections */
.py-5 {
    position: relative;
    isolation: isolate;
}

/* Print Styles */
@media print {
    .navbar,
    .footer,
    .btn,
    #contact form {
        display: none;
    }
    
    .hero-section {
        min-height: auto;
        padding: 2rem 0;
    }
}
