/* ===================================================================
   TIME TRANSACTIONS LANDING PAGE
   Main Stylesheet
   Version: 2.0 (Clean-Slate Rewrite)
   Design: Salvador III Ang
   ==================================================================== */

/* -------------------------------------------------------------------
   1. CSS Variables (Theming & Configuration)
   - Edit these values to easily change the site's entire look.
   ------------------------------------------------------------------- */
   :root {
    --primary-color: #4A90E2;       /* A professional, vibrant blue */
    --primary-color-hover: #357ABD; /* A slightly darker blue for hover states */
    --dark-bg: #0a0a14;             /* The main dark background of the site */
    --light-text: #f0f0f0;           /* Main text color for high contrast */
    --muted-text: #a0a0b0;           /* Softer text color for subheadings */
    --border-color: rgba(255, 255, 255, 0.1); /* Subtle border for cards and dividers */
    --font-family: 'Poppins', sans-serif;
    --border-radius: 8px;            /* Consistent rounded corners */
}

/* -------------------------------------------------------------------
   2. General Body & Base Styles
   ------------------------------------------------------------------- */
body {
    background-color: var(--dark-bg);
    color: var(--light-text);
    font-family: var(--font-family);
    overflow-x: hidden; /* Prevents unwanted horizontal scrollbars */
    -webkit-font-smoothing: antialiased; /* Improves text rendering on some screens */
    -moz-osx-font-smoothing: grayscale;
}

/* -------------------------------------------------------------------
   3. Preloader
   - This ensures the page looks complete when it appears.
   ------------------------------------------------------------------- */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--dark-bg);
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(255, 255, 255, 0.2);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Logic to hide the preloader and show the page */
body:not(.is-loading) .preloader {
    opacity: 0;
    visibility: hidden;
}

.page-wrapper {
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

body:not(.is-loading) .page-wrapper {
    visibility: visible;
    opacity: 1;
}

/* -------------------------------------------------------------------
   4. Navigation Bar
   ------------------------------------------------------------------- */
.navbar {
    position: fixed; /* Changed to fixed for a modern sticky effect */
    width: 100%;
    z-index: 1000;
    background: rgba(10, 10, 20, 0.6); /* Semi-transparent "frosted glass" */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 600;
    transition: color 0.3s ease;
}

.nav-link:hover, .navbar-brand:hover {
    color: var(--primary-color) !important;
}

/* -------------------------------------------------------------------
   5. Hero Section & Background Carousel
   ------------------------------------------------------------------- */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    text-align: center;
    overflow: hidden; /* Essential for the background effect */
}

/* The two pseudo-elements are the "slides" of our carousel */
.hero::before,
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center center;
    z-index: 1;
    /* The slow, elegant fade for the background images */
    transition: opacity 2s ease-in-out; 
}

/* The dark overlay ensures text is always readable */
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 10, 20, 0.8), rgba(10, 10, 20, 0.5));
    z-index: 2;
}

/* The static text container, always on top */
.hero-content {
    position: relative;
    z-index: 3;
}

.hero h1 {
    text-shadow: 0px 2px 10px rgba(0, 0, 0, 0.7);
}

/* -------------------------------------------------------------------
   6. General Content Sections (Features, Industries, etc.)
   ------------------------------------------------------------------- */
main section {
    padding: 5rem 0;
}

.feature-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary-color);
}

/* Industries Section Tab Styling */
#industries .nav-pills .nav-link {
    color: var(--muted-text);
    padding: 1rem;
    font-weight: 600;
    border-radius: var(--border-radius);
    transition: all 0.2s ease-in-out;
}

#industries .nav-pills .nav-link.active {
    color: var(--light-text);
    background-color: rgba(74, 144, 226, 0.2);
}

#industries .tab-content {
    background: rgba(0,0,0,0.2);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin-top: 1rem; /* Add space between tabs and content on mobile */
}

/* -------------------------------------------------------------------
   7. Buttons & Footer
   ------------------------------------------------------------------- */
.btn {
    font-weight: 600;
    border-radius: var(--border-radius);
    padding: 0.8rem 2rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: var(--primary-color-hover);
    border-color: var(--primary-color-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(74, 144, 226, 0.2);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

footer {
    background-color: #05050A; /* A slightly different dark shade for separation */
    padding: 2rem 0;
}

/* -------------------------------------------------------------------
   8. Responsive Design
   ------------------------------------------------------------------- */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem; /* Smaller headline on mobile */
    }
    
    .hero h2 {
        font-size: 1.5rem;
    }

    .hero .btn {
        display: block;
        width: 100%;
        margin: 0.5rem 0;
    }

    main section {
        padding: 3rem 0;
    }
    
    #industries .nav-pills {
        flex-direction: row !important;
        flex-wrap: nowrap;
        overflow-x: auto; /* Allow scrolling tabs on mobile */
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
    }

    #industries .nav-pills::-webkit-scrollbar {
        display: none; /* Hide scrollbar for Chrome, Safari, Opera */
    }
    
    #industries .nav-pills .nav-item {
        flex-shrink: 0;
    }
}