/* Trustify 2024 Design System */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;600;700;900&family=Source+Sans+3:wght@300;400;600;700&display=swap');

:root {
    /* Brand Colors */
    --color-primary-red: #D5243F;
    --color-primary-yellow: #FFC656;
    --color-dark-bg: #000000;
    --color-light-bg: #F8F8F8;
    --color-text-dark: #323232;
    --color-text-light: #FFFFFF;
    --color-grey-accent: #E3E9ED;

    /* Gradients */
    --gradient-brand: linear-gradient(135deg, #D5243F 0%, #FFC656 100%);
    --gradient-hover: linear-gradient(135deg, #b01b32 0%, #e6b24d 100%);

    /* Typography */
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Source Sans 3', sans-serif;

    /* Spacing */
    --container-width: 1200px;
    --section-padding: 80px 20px;
}

/* Reset & Base */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    color: var(--color-text-dark);
    line-height: 1.6;
    background-color: #FFFFFF;
    overflow-x: hidden;
    padding-top: 80px;
}

html {
    overflow-x: hidden;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 900;
    text-transform: uppercase;
    line-height: 1.2;
    margin-bottom: 1rem;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

h1 {
    font-size: 3.5rem;
}

h2 {
    font-size: 2.5rem;
}

h3 {
    font-size: 1.5rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

img {
    max-width: 100%;
    display: block;
}

/* Components */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 1rem;
    border-radius: 50px;
    cursor: pointer;
    text-transform: uppercase;
    border: none;
    transition: transform 0.2s;
}

.btn-primary {
    background: var(--gradient-brand);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(213, 36, 63, 0.3);
}

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

/* Hero CTA Buttons */
.btn-white {
    background: white;
    color: black;
}

.btn-white:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(255, 255, 255, 0.2);
}

.btn-outline-red {
    background: transparent;
    border: 2px solid white;
    color: white;
}

.btn-outline-red:hover {
    background: var(--color-primary-red);
    border-color: var(--color-primary-red);
    color: white;
}

.btn-outline:hover {
    background: white;
    color: var(--color-dark-bg);
}

/* Navigation */
header {
    background: rgba(255, 255, 255, 0.95);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.02);
}

header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--color-dark-bg);
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo span {
    color: var(--color-dark-bg);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    align-items: center;
}

nav a {
    color: var(--color-text-dark);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
}

nav a:hover {
    color: var(--color-primary-red);
}

/* Hamburger Menu (Mobile) */
.hamburger {
    display: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    z-index: 2000;
    /* Ensure above mobile menu */
    position: relative;
}

.hamburger div {
    width: 25px;
    height: 3px;
    background-color: var(--color-text-dark);
    transition: all 0.3s ease;
}

/* Mobile Nav Styles */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
        /* Prevent horizontal scroll */
    }

    nav ul {
        position: fixed;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: #ffffff;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 50%;
        /* Drawer width */
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        padding-top: 50px;
    }

    nav ul li {
        opacity: 0;
        margin: 20px 0;
    }

    .hamburger {
        display: flex;
    }
}

.nav-active {
    transform: translateX(0%);
}

@keyframes navLinkFade {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0px);
    }
}

.toggle .line1 {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.toggle .line2 {
    opacity: 0;
}

.toggle .line3 {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Light Hero Section (Gradient Mesh Style) */
.hero {
    position: relative;
    /* Brand Gradient: Trustify Red to Yellow */
    background: linear-gradient(135deg, #D5243F, #FFC656) !important;
    background-color: #D5243F !important;
    /* Fallback */
    background-size: 200% 200%;
    animation: gradientBG 10s ease infinite;
    min-height: 90vh;
    /* Full viewport height */
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px;
    /* Space for fixed header */
    color: white;
    /* Default text color white */
}

@keyframes gradientBG {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Canvas needs sharp edges for mesh effect */
#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Behind text */
    opacity: 0.8;
}

/* Hero 2-Column Layout */
.hero .hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 120px;
    /* Increased spacing to match reference */
    align-items: center;
    position: relative;
    z-index: 3;
    /* Ensure above canvas */
}

/* Rounded Square Image */
.hero-img-rounded {
    width: 100%;
    max-width: 500px;
    /* Control max size */
    aspect-ratio: 1 / 1;
    /* Force square */
    object-fit: cover;
    border-radius: 30px;
    /* Rounded corners */
    border: 4px solid rgba(255, 255, 255, 0.1);
    /* Subtle glass border */
}

@media (max-width: 992px) {
    .hero .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-text-col,
    .hero-text-col p,
    .hero-text-col .buttons {
        text-align: center !important;
        margin-left: auto !important;
        margin-right: auto !important;
        justify-content: center !important;
    }

    .hero-image-col {
        margin-top: 40px;
        display: flex;
        justify-content: center;
    }
}

/* Yavar-style Typography specifically for Hero */
.hero h1 {
    font-size: 5.5rem;
    font-weight: 300;
    color: #ffffff;
    /* Pure White, No Shadow, No Gradient */
    margin-bottom: 30px;
    line-height: 1.1;
    letter-spacing: -2px;
}

/* Strong text in Hero H1 */
/* Clean Bold Highlight */
.hero h1 span.bold-highlight,
.animate-gradient-text {
    background: none;
    -webkit-background-clip: initial;
    background-clip: initial;
    color: #ffffff !important;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: -1px;
    animation: none;
}

.hero p {
    font-size: 1.2rem;
    color: #ffffff !important;
    /* Force Pure White */
    margin-bottom: 30px;
    line-height: 1.6;
}

/* Services / Blocks */
.trust-section {
    background: #111;
    color: white;
    padding: var(--section-padding);
    text-align: center;
}

.services {
    padding: var(--section-padding);
    background-color: #FAFAFA;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 span {
    color: var(--color-primary-red);
}

.service-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.service-card {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.02);
    transition: all 0.3s ease;
    border: 1px solid #eee;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
    border-color: transparent;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 25px;
    background: var(--gradient-brand);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.service-link {
    color: var(--color-primary-red);
    font-weight: 700;
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Trust / Stats Section (Yavar Dark Style) */
.trust-section {
    padding: var(--section-padding);
    background: #050505;
    /* Black Matches Hero */
    color: white;
    text-align: center;
    position: relative;
    z-index: 5;
    margin-top: -50px;
    /* Overlap slightly if needed, or just flow */
    padding-top: 0;
}

.trust-section .container {
    background: #111;
    padding: 60px;
    border-radius: 20px;
    border: 1px solid #222;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.stats-grid {
    display: flex;
    justify-content: space-around;
    gap: 40px;
    margin-top: 40px;
    flex-wrap: wrap;
    text-align: left;
    /* Yavar aligns stats left? keeping center for now or following card */
}

.stat-item {
    text-align: left;
}

.stat-item h3 {
    font-size: 3.5rem;
    font-weight: 900;
    color: #4A90E2;
    /* Fallback */
    background: var(--gradient-brand);
    /* Trustify Gradient */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 5px;
    line-height: 1;
}

.stat-item p {
    color: #888;
    font-size: 1.1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* --- New Page Styles --- */

/* Team Grid (About) */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-top: 50px;
}

.team-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    text-align: center;
}

.team-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    background: #f0f0f0;
}

.team-info {
    padding: 30px;
}

.team-info h3 {
    margin-bottom: 5px;
    font-size: 1.4rem;
}

.team-role {
    color: var(--color-primary-red);
    font-weight: 600;
    margin-bottom: 15px;
    display: block;
}

.certs {
    font-size: 0.8rem;
    color: #888;
    border-top: 1px solid #eee;
    padding-top: 15px;
    margin-top: 15px;
}

/* Contact Layout */
.split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    padding: var(--section-padding);
}

.contact-info-box {
    background: #F8F8F8;
    padding: 40px;
    border-radius: 12px;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
}

.contact-icon {
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-primary-red);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05);
}

.contact-form {
    padding: 40px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
}

.form-control:focus {
    outline: none;
    border-color: var(--color-primary-red);
}

/* Values Grid */
.values-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    text-align: center;
}

.value-item {
    padding: 30px;
}

.value-icon {
    font-size: 3rem;
    color: var(--color-primary-yellow);
    margin-bottom: 20px;
}

/* Partnership Hero */
.partnership-hero {
    background: linear-gradient(135deg, #001628 0%, #000000 100%);
    color: white;
    text-align: center;
    padding: 100px 0;
}

.partner-logo-lockup {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 40px;
    font-size: 2rem;
    font-weight: 900;
}

.partner-logo-lockup span {
    opacity: 0.5;
}

/* Footer */
footer {
    background: #111;
    color: #ccc;
    padding: 80px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.1rem;
}

.footer-col ul {
    list-style: none;
}

.footer-col ul li {
    margin-bottom: 12px;
}

.footer-col ul li a {
    color: #999;
}

.footer-col ul li a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #222;
    padding-top: 30px;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
}



.cta-box {
    text-align: center;
    background: #001628;
    padding: 60px;
    border-radius: 20px;
    color: white;
}

.cta-box h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: white;
}

.cta-box p {
    margin-bottom: 30px;
    color: #ccc;
}

.process-box {
    background: #f9f9f9;
    padding: 40px;
    border-radius: 12px;
    border-left: 5px solid var(--color-primary-yellow);
}

/* Responsive / Mobile Styles */
@media (max-width: 992px) {
    h1 {
        font-size: 3rem;
    }

    h2 {
        font-size: 2rem;
    }

    .hero {
        padding: 80px 0;
        text-align: center;
    }

    .hero::before {
        display: none;
        /* Hide abstract bg on tablet/mobile */
    }

    .hero .content {
        max-width: 100%;
        margin: 0 auto;
    }

    .hero p {
        margin-left: auto;
        margin-right: auto;
    }

    .buttons {
        display: flex;
        flex-direction: column;
        gap: 15px;
        align-items: center;
    }

    .buttons .btn {
        width: 100%;
        max-width: 300px;
        margin-left: 0 !important;
    }
}

@media (max-width: 768px) {

    /* Layout Stacking */
    .split-layout,
    .values-grid,
    .stats-grid,
    .footer-grid,
    .service-grid,
    .team-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .stats-grid {
        gap: 40px;
    }

    .partner-logo-lockup {
        flex-direction: column;
        gap: 15px;
        font-size: 1.5rem;
    }

    /* Padding adjustments */
    .section-padding,
    section {
        padding: 60px 0 !important;
        /* Force tighter padding on mobile */
    }

    .service-card,
    .contact-info-box,
    .contact-form,
    .team-card,
    .cta-box,
    .process-box {
        padding: 30px 20px;
    }

    .cta-box h2 {
        font-size: 1.6rem;
    }

    h1 {
        font-size: 1.8rem;
    }

    .hero h1 {
        font-size: 2.2rem;
        letter-spacing: -1px;
    }

    h2 {
        font-size: 1.4rem;
    }
}

/* Animations & Visual Effects */
@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

.animate-gradient-text {
    background: linear-gradient(270deg, #D5243F, #FFC656, #ff7e5f);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientFlow 6s ease infinite;
}

/* Hero enhancements */
.hero {
    /* Existing styles remain, adding gradient overlay animation hint */
    background: radial-gradient(circle at 10% 20%, rgba(255, 198, 86, 0.05) 0%, rgba(255, 255, 255, 0) 40%);
}

#hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    /* Behind text (z-index 2) but above bg */
    opacity: 0.8;
}

/* Print Styles for Export */
@media print {
    body {
        background: white;
        color: black;
    }

    nav,
    .buttons {
        display: none;
    }
}

/* Mobile nav override to ensure drawer works */
@media screen and (max-width: 768px) {
    header .container {
        flex-direction: row;
        gap: 0;
    }

    nav ul.nav-links,
    nav ul {
        position: fixed;
        right: 0;
        top: 70px;
        height: calc(100vh - 70px);
        background-color: #ffffff;
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 70%;
        transform: translateX(100%);
        transition: transform 0.35s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
        z-index: 1500;
        padding-top: 40px;
    }

    nav ul.nav-links.nav-active,
    nav ul.nav-active {
        transform: translateX(0%);
    }

    .hamburger {
        display: flex;
    }
}


.hero-img-compressed {
    object-fit: cover;
    object-position: center;
    filter: saturate(0.95) contrast(0.98);
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-brand);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    cursor: pointer;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top i {
    font-size: 1.2rem;
}

@media screen and (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        z-index: 2147483647;
        /* Max z-index to ensure it's on top of everything including mobile nav */
    }
}