/* ==========================================================================
   TSOL HUB INTERNATIONAL - MASTER STYLES (WORLD CLASS MOBILE-FIRST)
   ========================================================================== */

:root {
    --brand-dark: #303a43;
    --brand-accent: #4a5764;
    --brand-light: #f8f9fa;
    --white: #ffffff;
    --transition: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

/* 1. Global Reset & Typography */
body {
    font-family: 'Inter', sans-serif;
    color: var(--brand-dark);
    background-color: var(--white);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

.section-padding { padding: 100px 0; }
@media (max-width: 768px) { .section-padding { padding: 60px 0; } }

/* 2. Navigation (Glassmorphism & Desktop Polish) */
.custom-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    border-bottom: 1px solid rgba(48, 58, 67, 0.05);
    transition: var(--transition);
}

.navbar-shrink { padding: 12px 0; box-shadow: 0 10px 30px rgba(0,0,0,0.05); }

.navbar-brand img { height: 45px; transition: var(--transition); }
.navbar-shrink .navbar-brand img { height: 35px; }

.nav-link {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--brand-dark) !important;
    margin: 0 10px;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0; height: 2px;
    bottom: -5px; left: 0;
    background: var(--brand-dark);
    transition: var(--transition);
}

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

/* Mobile Menu Adjustments */
@media (max-width: 991px) {
    .navbar-collapse { background: white; padding: 20px; margin-top: 15px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); }
    .nav-link { margin: 10px 0; font-size: 14px; }
}

/* 3. World-Class Service Slider (Partial View) */
.hero-slider-section { margin-top: 85px; }

.slider-item {
    height: 65vh;
    min-height: 500px;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.slide-content { opacity: 0; transform: translateY(30px); transition: all 1s ease 0.3s; }
.owl-item.active .slide-content { opacity: 1; transform: translateY(0); }

.badge-premium {
    display: inline-block;
    padding: 5px 15px;
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
    color: white;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    border-radius: 50px;
}

.display-3 { color: white; font-weight: 800; letter-spacing: -2px; margin-bottom: 20px; }
.slide-content p { color: rgba(255,255,255,0.8); font-size: 1.2rem; max-width: 500px; margin-bottom: 30px; }

/* Owl Carousel Dots Styling */
.owl-dots { position: absolute; bottom: 30px; width: 100%; text-align: center; }
.owl-dot span { width: 40px !important; height: 3px !important; background: rgba(255,255,255,0.3) !important; border-radius: 0 !important; }
.owl-dot.active span { background: white !important; }

/* Buttons */
.btn-tsol {
    background: var(--brand-dark);
    color: white;
    padding: 16px 35px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 2px;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.btn-tsol:hover { background: #1a2128; color: white; transform: translateY(-3px); box-shadow: 0 15px 30px rgba(0,0,0,0.15); }


/* ==========================================================================
   4. SECTION TITLES & HEADERS
   ========================================================================== */
.section-title {
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--brand-dark);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.section-title i {
    color: var(--brand-dark);
    opacity: 0.6;
    font-size: 0.9em;
}

.bg-light-alt {
    background-color: #fcfcfc;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
}

/* ==========================================================================
   5. PREMIUM NEWS CARDS (Firestore Optimized)
   ========================================================================== */
.news-card {
    background: var(--white);
    border-radius: 0; /* Sharp, modern edges */
    overflow: hidden;
    transition: var(--transition);
    height: 100%;
    border: 1px solid #eee;
}

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

.news-thumb {
    position: relative;
    overflow: hidden;
    aspect-ratio: 16/10;
}

.news-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

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

.news-category {
    position: absolute;
    top: 20px;
    left: 20px;
    background: var(--brand-dark);
    color: white;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 5px 12px;
    letter-spacing: 1px;
}

.news-body {
    padding: 30px;
}

.news-date {
    display: block;
    font-size: 12px;
    color: #999;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.news-title {
    font-size: 1.25rem;
    line-height: 1.4;
    margin-bottom: 15px;
    font-weight: 700;
}

.news-excerpt {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.news-link {
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--brand-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ==========================================================================
   6. WORLD-CLASS WORK GRIDS (Grayscale to Color)
   ========================================================================== */
.work-card {
    position: relative;
    cursor: pointer;
}

.work-img-wrap {
    overflow: hidden;
    background: var(--brand-dark);
    aspect-ratio: 4/3;
}

.work-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%); /* Amateur color to premium grayscale */
    opacity: 0.9;
    transition: var(--transition);
}

.work-card:hover .work-img-wrap img {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.08);
}

.work-caption {
    margin-top: 15px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--brand-dark);
    text-align: center;
    transition: var(--transition);
}

.work-card:hover .work-caption {
    letter-spacing: 3px;
}

.link-premium {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 1px;
    border-bottom: 2px solid var(--brand-dark);
    padding-bottom: 5px;
}


/* ==========================================================================
   7. DARK CONTACT SECTION & FORMSPREE STYLING
   ========================================================================== */
.bg-dark-alt {
    background-color: var(--brand-dark);
    color: var(--white);
}

.contact-info-wrap {
    padding-right: 15%;
}

@media (max-width: 991px) {
    .contact-info-wrap { padding-right: 0; margin-bottom: 50px; }
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 20px;
}

.icon-box {
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: var(--white);
    transition: var(--transition);
}

.contact-method:hover .icon-box {
    background: var(--white);
    color: var(--brand-dark);
}

/* World-Class Form Styling (Minimalist) */
.form-container {
    background: rgba(255, 255, 255, 0.03);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-label {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 10px;
}

.form-control, .form-select {
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 0;
    color: var(--white) !important;
    padding: 12px 0;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus, .form-select:focus {
    background: transparent;
    border-color: var(--white);
    box-shadow: none;
    outline: none;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.2);
}

/* Custom Select Arrow for Dark Background */
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23ffffff'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

/* Social Icons */
.social-icon {
    display: inline-flex;
    width: 45px;
    height: 45px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    align-items: center;
    justify-content: center;
    color: var(--white);
    margin-right: 10px;
    font-size: 1.1rem;
    transition: var(--transition);
}

.social-icon:hover {
    background: var(--white);
    color: var(--brand-dark);
    transform: translateY(-5px);
}

/* ==========================================================================
   8. FOOTER STYLING
   ========================================================================== */
.tsol-footer {
    background: #283038;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-logo {
    height: 35px;
    filter: brightness(0) invert(1); /* Forces logo to white if it's dark */
}

.footer-tagline {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.4);
}

.copyright-text {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    letter-spacing: 1px;
}

/* ==========================================================================
   9. MOBILE RESPONSIVENESS & TOUCH OPTIMIZATIONS
   ========================================================================== */

/* Universal Responsive Grid Control */
@media (max-width: 991px) {
    /* Stack the 3x1 grids to 1x1 on Tablets and Phones */
    .row.g-4 > [class*='col-'] {
        margin-bottom: 20px;
    }

    .section-padding {
        padding: 80px 0;
    }

    /* Adjust the Partial Slider for Mobile */
    .slider-item {
        height: 55vh; /* Slightly shorter for better mobile framing */
        min-height: 400px;
    }

    .display-3 {
        font-size: 2.5rem; /* Scale down the big headings */
        letter-spacing: -1px;
    }

    .slide-content p {
        font-size: 1rem;
        max-width: 100%;
    }

    /* Ensure Work Grids show color on Tap for mobile users */
    .work-img-wrap img {
        filter: grayscale(0%); /* Remove grayscale on mobile as hover doesn't exist */
        opacity: 1;
    }
    
    .work-caption {
        font-size: 11px;
        letter-spacing: 1px;
        background: #f8f9fa;
        padding: 10px;
        border-radius: 4px;
    }
}

@media (max-width: 576px) {
    .navbar-brand img {
        height: 32px; /* Tiny fix for small phones */
    }
    
    .section-title {
        font-size: 1.4rem;
        letter-spacing: 1px;
    }
}

/* 10. Interactive Micro-Animations */
.navbar-toggler {
    border: none;
    padding: 0;
    color: var(--brand-dark);
    font-size: 2rem;
}

.navbar-toggler:focus {
    box-shadow: none;
}

/* Smooth fade-in for the entire page load */
body {
    animation: fadeInPage 1s ease-in-out;
}

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

/* Custom Scrollbar for Chrome/Safari (Clean Agency Look) */
::-webkit-scrollbar {
    width: 6px;
}

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

::-webkit-scrollbar-thumb {
    background: var(--brand-dark);
}

::-webkit-scrollbar-thumb:hover {
    background: #1a2128;
}


/* Style for HTML tags injected from Firestore */
.rich-text-content p {
    font-size: 1.15rem;
    line-height: 1.8;
    margin-bottom: 1.5rem;
    color: #444;
}

.rich-text-content h2, .rich-text-content h3 {
    margin-top: 2.5rem;
    font-weight: 800;
    color: var(--brand-dark);
}

.rich-text-content ul {
    padding-left: 1.5rem;
    margin-bottom: 1.5rem;
}

.rich-text-content li {
    margin-bottom: 0.5rem;
}

.rich-text-content strong {
    color: var(--brand-dark);
}