/* ==========================================
   Custom Styles for MSP Website
   ========================================== */

/* Root Variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --dark-color: #212529;
    --light-color: #f8f9fa;
    --accent-color: #0dcaf0;
    
    /* Typography */
    --heading-color: #212529;
    --subheading-color: #495057;
    --body-color: #333333;
    --muted-color: #6c757d;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: var(--body-color);
    overflow-x: hidden;
}

/* ==========================================
   STANDARDIZED TYPOGRAPHY SYSTEM
   ========================================== */

/* Section Headers (H2) */
h2, .section-header {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--heading-color);
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Section Subheaders (H3) */
h3, .section-subheader {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--subheading-color);
    line-height: 1.3;
    margin-bottom: 1rem;
}

/* Card/Component Headers (H4) */
h4, .component-header {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--heading-color);
    line-height: 1.4;
}

/* Intro/Lead Text */
.intro-text, .section-intro {
    font-size: 1.125rem;
    font-weight: 400;
    color: var(--muted-color);
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

/* Standard Body Text — scoped to main content to avoid overriding Bootstrap utilities in footer/dark sections */
main p, .body-text {
    font-size: 1rem;
    font-weight: 400;
    color: var(--body-color);
    line-height: 1.7;
    margin-bottom: 1rem;
}

/* Small/Helper Text */
.small-text, small {
    font-size: 0.875rem;
    color: var(--muted-color);
    line-height: 1.5;
}

/* Responsive Typography */
@media (max-width: 991px) {
    h2, .section-header {
        font-size: 2rem;
    }
    
    h3, .section-subheader {
        font-size: 1.25rem;
    }
}

@media (max-width: 767px) {
    h2, .section-header {
        font-size: 1.75rem;
    }
    
    h3, .section-subheader {
        font-size: 1.125rem;
    }
    
    .intro-text, .section-intro {
        font-size: 1rem;
    }
}

/* ==========================================
   END TYPOGRAPHY SYSTEM
   ========================================== */

/* Navigation */
.navbar {
    padding: 1rem 0;
    background-color: rgba(33, 37, 41, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar.transparent {
    background-color: transparent !important;
    box-shadow: none;
}

.navbar.scrolled {
    background-color: rgba(33, 37, 41, 0.95) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

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

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

.nav-link {
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: color 0.3s ease;
}

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

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, rgba(0, 77, 102, 0.35) 0%, rgba(0, 50, 80, 0.45) 100%), url('../images/hero-shark.webp') center 40% / cover no-repeat;
    color: white;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero-section h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

.hero-section .lead {
    white-space: nowrap;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0) 100%);
    z-index: 1;
}

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

.hero-icon {
    font-size: 15rem !important;
    opacity: 0.8;
    animation: float 3s ease-in-out infinite;
}

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

.btn {
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: var(--primary-color);
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
}

.btn-primary:hover {
    background: #0b5ed7;
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Service Cards */
.service-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.service-card h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-bottom: 1rem;
}

.service-card p {
    font-size: 1rem;
    color: var(--muted-color);
    line-height: 1.7;
}

.service-icon {
    font-size: 4rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1) rotate(5deg);
}

.service-icon i {
    display: inline-block;
}

/* Outcome Comparison Cards */
.outcome-card-fail {
    border-top: 4px solid #dc3545;
}
.outcome-card-success {
    border-top: 4px solid #198754;
}

/* Features Section */
.feature-item {
    padding: 2.5rem 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.4s ease;
    border: 2px solid transparent;
    height: 100%;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(13, 110, 253, 0.15);
    border-color: var(--primary-color);
}

.feature-icon {
    font-size: 3.5rem;
    color: var(--primary-color);
    transition: all 0.4s ease;
    background: linear-gradient(135deg, rgba(13, 110, 253, 0.1) 0%, rgba(13, 110, 253, 0.05) 100%);
    width: 90px;
    height: 90px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.feature-item:hover .feature-icon {
    transform: scale(1.15) rotate(5deg);
    background: linear-gradient(135deg, var(--primary-color) 0%, #0b5ed7 100%);
    color: white;
    box-shadow: 0 8px 25px rgba(13, 110, 253, 0.3);
}

.feature-icon i {
    display: inline-block;
}

.feature-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--heading-color);
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
}

.feature-item p {
    font-size: 1rem;
    color: var(--muted-color);
    line-height: 1.7;
}

.feature-item:hover h3 {
    color: var(--primary-color);
}

/* Contact Section */
.contact-info {
    padding: 2rem;
    transition: all 0.3s ease;
}

.contact-icon {
    font-size: 3rem;
    color: var(--primary-color);
    transition: all 0.3s ease;
}

.contact-info:hover .contact-icon {
    transform: scale(1.1);
    color: #0b5ed7;
}

.contact-icon i {
    display: inline-block;
}

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

.form-control {
    padding: 0.75rem 1rem;
    border-radius: 10px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

.form-label {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #495057;
}

/* Footer */
footer {
    margin-top: 4rem;
}

.social-links a {
    display: inline-block;
    font-size: 1.5rem;
    transition: all 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    opacity: 0.8;
}

/* Responsive Design */
@media (max-width: 1199px) {
    .hero-section h1 {
        font-size: 3rem;
    }
}

@media (max-width: 991px) {
    .hero-icon {
        font-size: 8rem !important;
        margin-top: 2rem;
    }

    .hero-section {
        padding-top: 60px;
        background-position: center 35%;
    }

    .hero-section .lead {
        white-space: normal;
    }

    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .navbar-nav {
        padding: 1rem 0;
    }
    
    .nav-link::after {
        display: none;
    }
}

@media (max-width: 767px) {
    .hero-section h1 {
        font-size: 2.75rem;
        line-height: 1.3;
        margin-bottom: 2.5rem;
    }
    
    .hero-section h1 br {
        display: none;
    }
    
    .display-3 {
        font-size: 2.5rem;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .hero-icon {
        font-size: 5rem !important;
    }
    
    .service-icon,
    .feature-icon,
    .contact-icon {
        font-size: 2.5rem;
    }
    
    .contact-form-card {
        padding: 2rem 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 2rem;
        font-size: 1rem;
    }
}

@media (max-width: 575px) {
    .hero-section h1 {
        font-size: 2.25rem;
        line-height: 1.35;
        margin-bottom: 2rem;
    }
    
    .hero-section {
        background-position: 60% 35%;
    }
    
    .hero-section .btn {
        padding: 0.85rem 2.25rem;
        font-size: 1.05rem;
    }
}

/* Intro Section Typography */
.intro-section .lead {
    font-size: 1.25rem;
    color: #6c757d;
}

.intro-section p {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #495057;
}

/* Why Grenadier Section */
#why-grenadier p:not(.lead) {
    font-size: 1.05rem;
    line-height: 1.7;
    color: #495057;
}

.gary-portrait {
    width: 300px;
    height: 300px;
    object-fit: cover;
    object-position: center top;
}

@media (max-width: 576px) {
    .gary-portrait {
        float: none !important;
        display: block;
        margin: 0 auto 1.5rem auto !important;
    }
}

/* Smooth Animations */
.contact-info {
    animation: fadeInUp 0.6s ease-out;
}

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

/* Accessibility */
.btn:focus,
.form-control:focus,
.nav-link:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Testimonial Cards */
.testimonial-card {
    background: white;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.12);
}

.testimonial-stars {
    color: #ffc107;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    letter-spacing: 2px;
}

.testimonial-text {
    font-size: 1rem;
    line-height: 1.7;
    color: #495057;
    font-style: italic;
    flex-grow: 1;
    margin-bottom: 1.5rem;
}

.testimonial-author {
    font-weight: 600;
    color: #212529;
    margin: 0;
    font-style: normal;
}

/* ==========================================
   LAYERED SERVICES SECTION
   ========================================== */

.layer-section {
    position: relative;
}

.layer-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    opacity: 0.2;
    line-height: 1;
}

.layer-connector {
    width: 4px;
    height: 60px;
    background: linear-gradient(180deg, var(--primary-color) 0%, rgba(13, 110, 253, 0.2) 100%);
    margin: 0 auto 2rem;
    border-radius: 2px;
}

.layer-teaser {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed rgba(13, 110, 253, 0.3);
    border-radius: 15px;
    padding: 2.5rem;
    transition: all 0.3s ease;
}

.layer-teaser:hover {
    border-color: var(--primary-color);
    box-shadow: 0 5px 20px rgba(13, 110, 253, 0.1);
}

/* UK Map */
.uk-map-container {
    max-width: 1000px;
    margin: 0 auto;
    overflow: hidden;
}

.uk-map-wrapper {
    position: relative;
    display: block;
    width: 100%;
    margin-left: -15%;
}

.uk-map-img {
    width: 100%;
    height: auto;
    display: block;
}

.map-pin {
    position: absolute;
    width: 12px;
    height: 12px;
    background: #ffffff;
    border: 2px solid #333;
    border-radius: 50%;
    opacity: 0.95;
    transform: translate(-50%, -50%);
    pointer-events: auto;
}

.map-pin-hq {
    width: 18px;
    height: 18px;
    background: #0dcaf0;
    border: 2px solid #fff;
    opacity: 0.95;
}

.map-pin-remote {
    background: #ffffff;
    border: 2px solid #333;
}

.map-label {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 0.7rem;
    color: #333;
    font-weight: 600;
}

/* ==========================================
   GARY'S JOURNEY TIMELINE
   ========================================== */

.gary-timeline {
    position: relative;
    padding: 2rem 0;
}

.gary-timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: linear-gradient(180deg, var(--primary-color), rgba(13, 110, 253, 0.2));
    border-radius: 2px;
    transform: translateX(-50%);
}

.gary-timeline-item {
    position: relative;
    width: 50%;
    padding: 0 40px 2.5rem 0;
    margin-left: 0;
}

.gary-timeline-item:nth-child(even) {
    margin-left: 50%;
    padding: 0 0 2.5rem 40px;
}

.gary-timeline-item:last-child {
    padding-bottom: 0;
}

.gary-timeline-dot {
    position: absolute;
    right: -10px;
    top: 5px;
    width: 20px;
    height: 20px;
    background: var(--primary-color);
    border: 4px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 3px var(--primary-color);
    z-index: 1;
}

.gary-timeline-item:nth-child(even) .gary-timeline-dot {
    right: auto;
    left: -10px;
}

.gary-timeline-date {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--primary-color);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.gary-timeline-content {
    background: #fff;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
}

.gary-timeline-content p {
    margin-bottom: 0;
    font-size: 1rem;
    line-height: 1.7;
    color: #495057;
}

/* Timeline card arrows */
.gary-timeline-content::after {
    content: '';
    position: absolute;
    top: 12px;
    right: -8px;
    width: 0;
    height: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    border-left: 8px solid #fff;
}

.gary-timeline-item:nth-child(even) .gary-timeline-content::after {
    right: auto;
    left: -8px;
    border-left: none;
    border-right: 8px solid #fff;
}

/* Responsive: single column on mobile */
@media (max-width: 767px) {
    .gary-timeline::before {
        left: 15px;
    }

    .gary-timeline-item,
    .gary-timeline-item:nth-child(even) {
        width: 100%;
        margin-left: 0;
        padding: 0 0 2rem 45px;
    }

    .gary-timeline-dot,
    .gary-timeline-item:nth-child(even) .gary-timeline-dot {
        left: 6px;
        right: auto;
    }

    .gary-timeline-content::after {
        right: auto;
        left: -8px;
        border-left: none;
        border-right: 8px solid #fff;
    }

    .gary-timeline-item:nth-child(even) .gary-timeline-content::after {
        left: -8px;
        border-right: 8px solid #fff;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .btn,
    footer {
        display: none;
    }
    
    body {
        font-size: 12pt;
        color: black;
    }
}
