/**
 * SMARTNET TANZANIA - Custom Stylesheet
 * Bootstrap 5 Theme Customization
 */

/* =====================
   CSS Variables & Theme
   ===================== */
:root {
    --primary-color: #0981c4;
    --secondary-color: #2d2d2d;
    --accent-color: #0a9edb;
    --text-dark: #2d2d2d;
    --text-light: #6c757d;
    --bg-light: #f8f9fa;
    --transition-speed: 0.3s;
}

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

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

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

/* Custom Colors */
.text-primary {
    color: var(--primary-color) !important;
}

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

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

.btn-primary:hover,
.btn-primary:focus {
    background-color: #076ea3;
    border-color: #076ea3;
}

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

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

/* =====================
   Navigation
   ===================== */
.navbar {
    transition: all var(--transition-speed) ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.nav-link {
    font-weight: 500;
    transition: color var(--transition-speed) ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

/* Navbar scroll effect */
.navbar.scrolled {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* =====================
   Hero Section
   ===================== */
.hero-section {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--primary-color) 0%, #076ea3 100%);
}

/* Video Background */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    object-fit: cover;
    object-position: center center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(9, 129, 196, 0.5), rgba(9, 129, 196, 0.4));
    z-index: 1;
}

.hero-title {
    animation: fadeInUp 0.8s ease-out;
}

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

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
}

.mouse {
    width: 25px;
    height: 40px;
    border: 2px solid #ffffff;
    border-radius: 15px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 8px 0;
}

.wheel {
    width: 3px;
    height: 8px;
    background: #ffffff;
    border-radius: 2px;
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0%, 100% {
        transform: translateY(0);
        opacity: 1;
    }
    50% {
        transform: translateY(10px);
        opacity: 0.5;
    }
}

/* =====================
   Page Header
   ===================== */
.page-header {
    padding: 150px 0 80px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #076ea3 100%);
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

/* Page Header Overlay */
.page-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(9, 129, 196, 0.5), rgba(9, 129, 196, 0.4));
    z-index: 1;
}

/* Ensure content is above overlay */
.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header .breadcrumb {
    background: transparent;
    margin-bottom: 1rem;
    justify-content: center;
}

.page-header .breadcrumb-item a {
    text-decoration: none;
    transition: color var(--transition-speed);
}

.page-header .breadcrumb-item a:hover {
    color: #ffffff !important;
}

/* =====================
   Cards & Images
   ===================== */
.hover-lift {
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}

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

.card {
    border: none;
    border-radius: 0.75rem;
    overflow: hidden;
}

.service-img,
.value-img,
.client-img {
    height: 200px;
    object-fit: cover;
    transition: transform var(--transition-speed) ease;
}

.hover-lift:hover .service-img,
.hover-lift:hover .value-img,
.client-sector:hover .client-img {
    transform: scale(1.05);
}

.card-img-overlay-gradient {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(9, 129, 196, 0.8), rgba(9, 129, 196, 0.2));
}

.card-img-overlay-white {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent 0%, rgba(255, 255, 255, 0.9) 100%);
}

.client-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(9, 129, 196, 0.9), rgba(9, 129, 196, 0.4));
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 1rem;
    transition: background var(--transition-speed) ease;
}

.client-sector:hover .client-img-overlay {
    background: linear-gradient(to top, rgba(9, 129, 196, 1), rgba(9, 129, 196, 0.6));
}

/* Icon Box */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.icon-box:hover {
    transform: scale(1.1);
}

/* Fix for Bootstrap Icons visibility */
.bi {
    display: inline-block;
    font-style: normal;
    font-variant: normal;
    text-rendering: auto;
    line-height: 1;
}

.bi::before {
    display: inline-block;
}

/* =====================
   Gradients
   ===================== */
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, #076ea3 100%);
}

/* =====================
   Footer
   ===================== */
footer {
    background-color: var(--secondary-color);
}

.hover-link {
    transition: color var(--transition-speed) ease;
}

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

/* =====================
   Forms
   ===================== */
.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(9, 129, 196, 0.25);
}

.form-control-lg {
    padding: 0.75rem 1rem;
}

/* =====================
   Utilities
   ===================== */
.section-spacing {
    padding: 80px 0;
}

/* Responsive Typography */
@media (max-width: 768px) {
    .display-3,
    .display-4,
    .display-5 {
        font-size: 2.5rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    .hero-section {
        background-attachment: scroll;
    }
}

/* =====================
   Animations
   ===================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-in;
}

/* Pulse Animation */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

/* Shake Animation for Errors */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s;
}

/* Slide in from bottom */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-in-up {
    animation: slideInUp 0.6s ease-out;
}

/* Fade in Up Animation (for Energy items) */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Enhanced Button Hover Effects */
.btn {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

/* Icon Rotation on Hover */
.icon-rotate:hover {
    animation: rotate360 1s ease-in-out;
}

@keyframes rotate360 {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Loading Spinner */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.spinner {
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 0.8s linear infinite;
}

/* Stagger Animation for Lists */
.stagger-item {
    opacity: 0;
    animation: fadeInUp 0.6s ease-out forwards;
}

.stagger-item:nth-child(1) { animation-delay: 0.1s; }
.stagger-item:nth-child(2) { animation-delay: 0.2s; }
.stagger-item:nth-child(3) { animation-delay: 0.3s; }
.stagger-item:nth-child(4) { animation-delay: 0.4s; }
.stagger-item:nth-child(5) { animation-delay: 0.5s; }

/* =====================
   WhatsApp Widget
   ===================== */
.whatsapp-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.whatsapp-float {
    background-color: #25D366;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 4px 4px 8px #666;
}

.whatsapp-float i {
    font-size: 2rem;
}

@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

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

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--primary-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

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


