/* ===================================
   OnPoint Micro Credit - Main Styles
   Brand Colors & Corporate Design
   =================================== */

/* CSS Variables - Extracted from Logo */
:root {
    --primary-red: #C74C5A;
    --logo-gray: #8B9BAD;
    --secondary-gray: #7B8A9D;
    --dark-text: #2C3E50;
    --light-bg: #F8F9FA;
    --white: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow: rgba(0, 0, 0, 0.1);
    --shadow-hover: rgba(199, 76, 90, 0.3);
    --red-glow: rgba(199, 76, 90, 0.5);
    --gray-glow: rgba(139, 155, 173, 0.5);
}

/* ===================================
   LOADING ANIMATION
   =================================== */

.page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg,
        #ffffff 0%,
        #f8f9fa 25%,
        rgba(199, 76, 90, 0.05) 50%,
        rgba(139, 155, 173, 0.05) 75%,
        #f8f9fa 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Money animation container */
.loader-money {
    position: relative;
    width: 180px;
    height: 180px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Circular progress ring */
.circular-progress {
    position: absolute;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    border: 4px solid #f0f0f0;
    border-top-color: var(--primary-red);
    border-right-color: var(--logo-gray);
    animation: circularSpin 1.5s linear infinite;
    box-shadow:
        0 0 20px rgba(199, 76, 90, 0.2),
        inset 0 0 15px rgba(0, 0, 0, 0.05);
}

.circular-progress::before {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border-radius: 50%;
    border: 2px solid transparent;
    border-bottom-color: var(--primary-red);
    border-left-color: var(--logo-gray);
    animation: circularSpin 2.5s linear infinite reverse;
    opacity: 0.5;
}

@keyframes circularSpin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* Stack of bills */
.money-stack {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 60px;
}

/* Individual bill styling */
.bill {
    position: absolute;
    width: 100%;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-red) 0%, #D65865 100%);
    border-radius: 4px;
    box-shadow: 0 4px 10px rgba(199, 76, 90, 0.3);
    animation: billFloat 2s ease-in-out infinite;
}

/* Bill details */
.bill::before {
    content: 'UGX';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 0.9rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.4);
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 1px;
}

.bill::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 8px;
    bottom: 8px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

/* Stagger bills in stack */
.bill-1 {
    z-index: 4;
    animation-delay: 0s;
}

.bill-2 {
    z-index: 3;
    animation-delay: 0.2s;
    transform: translateY(5px);
    opacity: 0.9;
    background: linear-gradient(135deg, var(--logo-gray) 0%, #9EAAB9 100%);
}

.bill-3 {
    z-index: 2;
    animation-delay: 0.4s;
    transform: translateY(10px);
    opacity: 0.8;
    background: linear-gradient(135deg, var(--primary-red) 0%, #D65865 100%);
}

.bill-4 {
    z-index: 1;
    animation-delay: 0.6s;
    transform: translateY(15px);
    opacity: 0.7;
    background: linear-gradient(135deg, var(--logo-gray) 0%, #9EAAB9 100%);
}

/* Floating animation for bills */
@keyframes billFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-8px) scale(1.02);
    }
}

/* Floating coins around the bills */
.floating-coins {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
}

.mini-coin {
    position: absolute;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--primary-red), #B23D4B);
    border: 2px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 3px 8px rgba(199, 76, 90, 0.4);
}

.mini-coin::before {
    content: 'USh';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--white);
    font-size: 0.65rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    letter-spacing: 0.5px;
}

.coin-left {
    top: 10%;
    left: -10%;
    animation: floatLeft 3s ease-in-out infinite;
}

.coin-right {
    bottom: 10%;
    right: -10%;
    background: linear-gradient(145deg, var(--logo-gray), #9EAAB9);
    animation: floatRight 3s ease-in-out infinite;
}

@keyframes floatLeft {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    50% {
        transform: translateY(-15px) translateX(-10px) rotate(180deg);
    }
}

@keyframes floatRight {
    0%, 100% {
        transform: translateY(0) translateX(0) rotate(0deg);
    }
    50% {
        transform: translateY(15px) translateX(10px) rotate(-180deg);
    }
}

/* Text styling */
.loader-text {
    color: var(--dark-text);
    font-family: 'Montserrat', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    animation: textPulse 2s ease-in-out infinite;
}

@keyframes textPulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Open Sans', sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--dark-text);
    background-color: var(--white);
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    line-height: 1.3;
    color: var(--dark-text);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

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

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

/* Ensure images are responsive and maintain aspect ratio */
img[src*=".jpg"],
img[src*=".jpeg"],
img[src*=".png"],
img[src*=".gif"],
img[src*=".webp"] {
    width: 100%;
    height: auto;
    object-fit: cover;
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-family: 'Montserrat', sans-serif;
    font-size: 16px;
    font-weight: 500;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    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.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

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

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

.btn-primary:hover {
    background-color: #B23D4B;
    box-shadow: 0 8px 25px var(--shadow-hover);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px var(--shadow-hover);
}

.btn-outline {
    background-color: transparent;
    color: var(--primary-red);
    border: 2px solid var(--primary-red);
}

.btn-outline:hover {
    background-color: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--shadow-hover);
}

.btn-outline:active {
    transform: translateY(0);
}

/* ===================================
   HEADER STYLES
   =================================== */

/* Top Bar */
.top-bar {
    background-color: var(--primary-red);
    color: var(--white);
    padding: 10px 0;
    font-size: 14px;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contact-info span {
    margin-right: 20px;
}

.contact-info i {
    margin-right: 5px;
    color: var(--logo-gray);
}

.social-links a {
    color: var(--white);
    margin-left: 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

.social-links a:hover {
    color: var(--logo-gray);
}

/* Main Navigation */
.main-nav {
    background-color: var(--white);
    box-shadow: 0 2px 10px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.logo img {
    height: 70px;
    width: auto;
    max-width: 100%;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-menu a {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    color: var(--dark-text);
    font-size: 15px;
    position: relative;
    padding: 8px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-red), var(--logo-gray));
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px;
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
    width: 100%;
}

.nav-menu a:hover {
    color: var(--primary-red);
    transform: translateY(-2px);
}

.nav-menu a.active {
    color: var(--primary-red);
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--primary-red);
    margin: 3px 0;
    transition: all 0.3s ease;
}

/* ===================================
   HERO SECTION (Page Headers)
   =================================== */

.hero {
    position: relative;
    width: 100%;
    min-height: 450px;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(199, 76, 90, 0.4), rgba(44, 62, 80, 0.8));
    z-index: 1;
}

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

/* ===================================
   HERO SLIDER SECTION
   =================================== */

.hero-slider {
    position: relative;
    width: 100%;
    height: 100vh;
    min-height: 600px;
    max-height: 100vh;
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-slide {
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(199, 76, 90, 0.4), rgba(44, 62, 80, 0.8));
    z-index: 1;
}

.hero-slider .swiper-slide {
    overflow: hidden;
}

/* Ken Burns zoom effect on active slide - disabled for better image display */
/* .hero-slider .swiper-slide-active .hero-slide {
    animation: kenburns 8s ease-out forwards;
}

@keyframes kenburns {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.1);
    }
} */

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: var(--white);
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

.hero-slider .swiper-slide-active .hero-content h1 {
    animation: fadeInUp 1s ease-out 0.3s both;
}

.hero-slider .swiper-slide-active .hero-content p {
    animation: fadeInUp 1s ease-out 0.6s both;
}

.hero-slider .swiper-slide-active .hero-buttons {
    animation: fadeInUp 1s ease-out 0.9s both;
}

.hero-content h1 {
    color: var(--white);
    font-size: 3rem;
    margin-bottom: 15px;
    text-shadow: 3px 3px 10px rgba(0,0,0,0.5);
    font-weight: 700;
    line-height: 1.2;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    text-shadow: 2px 2px 6px rgba(0,0,0,0.4);
}

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

.hero-buttons {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-buttons .btn {
    padding: 14px 40px;
    font-size: 17px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Swiper Navigation Buttons */
.hero-slider .swiper-button-next,
.hero-slider .swiper-button-prev {
    color: var(--white);
    width: 60px;
    height: 60px;
    background: rgba(199, 76, 90, 0.8);
    border-radius: 50%;
    transition: all 0.3s ease;
}

.hero-slider .swiper-button-next:after,
.hero-slider .swiper-button-prev:after {
    font-size: 24px;
    font-weight: bold;
}

.hero-slider .swiper-button-next:hover,
.hero-slider .swiper-button-prev:hover {
    background: var(--primary-red);
    transform: scale(1.1);
}

/* Swiper Pagination */
.hero-slider .swiper-pagination {
    bottom: 30px;
}

.hero-slider .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transition: all 0.3s ease;
}

.hero-slider .swiper-pagination-bullet-active {
    background: var(--white);
    width: 40px;
    border-radius: 6px;
}

/* ===================================
   SECTIONS
   =================================== */

section {
    padding: 80px 0;
}

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

.section-header h2 {
    margin-bottom: 15px;
    color: var(--dark-text);
}

.section-header .underline {
    width: 80px;
    height: 3px;
    background-color: var(--primary-red);
    margin: 0 auto 15px;
}

.section-header p {
    color: var(--secondary-gray);
    max-width: 700px;
    margin: 0 auto;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 5px 20px var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(199, 76, 90, 0.1), transparent);
    transition: left 0.6s;
}

.service-card:hover::before {
    left: 100%;
}

.service-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: 0 15px 40px var(--shadow-hover);
}

.service-icon {
    font-size: 3rem;
    color: var(--primary-red);
    margin-bottom: 20px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
}

.service-card:hover .service-icon {
    transform: scale(1.2) rotate(5deg);
    color: #B23D4B;
}

.service-card h3 {
    margin-bottom: 15px;
    color: var(--dark-text);
}

.service-card p {
    color: var(--secondary-gray);
    margin-bottom: 20px;
}

/* Stats Section */
.stats {
    background-color: var(--primary-red);
    color: var(--white);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    text-align: center;
}

.stat-item {
    position: relative;
    padding: 20px;
    border-radius: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-5px);
}

.stat-item h3 {
    font-size: 3rem;
    color: var(--white);
    margin-bottom: 10px;
    font-weight: 700;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
}

.stat-item p {
    font-size: 1.1rem;
    opacity: 0.95;
}

/* Why Choose Us */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.feature-item {
    display: flex;
    gap: 20px;
}

.feature-icon {
    flex-shrink: 0;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-red), #B23D4B);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 15px rgba(199, 76, 90, 0.3);
    position: relative;
}

.feature-icon::before {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-red), var(--logo-gray));
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
}

.feature-item:hover .feature-icon::before {
    opacity: 1;
}

.feature-item:hover .feature-icon {
    background: linear-gradient(135deg, var(--logo-gray), var(--secondary-gray));
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 8px 25px rgba(139, 155, 173, 0.4);
}

.feature-content h4 {
    margin-bottom: 10px;
}

.feature-content p {
    color: var(--secondary-gray);
}

/* Branches Section */
.branches-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.branch-card {
    background: var(--white);
    padding: 30px;
    border-radius: 10px;
    border-left: 4px solid var(--primary-red);
    box-shadow: 0 5px 20px var(--shadow);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.branch-card::after {
    content: '';
    position: absolute;
    top: 0;
    right: -30px;
    width: 100px;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(199, 76, 90, 0.05));
    transform: skewX(-20deg);
    transition: right 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.branch-card:hover::after {
    right: 100%;
}

.branch-card:hover {
    transform: translateY(-8px) translateX(5px);
    box-shadow: 0 12px 35px var(--shadow-hover);
    border-left-width: 6px;
    border-left-color: var(--logo-gray);
}

.branch-card h3 {
    color: var(--primary-red);
    margin-bottom: 15px;
}

.branch-card p {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.branch-card i {
    color: var(--primary-red);
    margin-top: 5px;
}

/* ===================================
   FOOTER STYLES
   =================================== */

.site-footer {
    background-color: var(--dark-text);
    color: var(--white);
}

.footer-main {
    padding: 60px 0 30px;
}

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

.footer-logo {
    padding-top: 10px;
}

.footer-logo img {
    height: 80px;
    width: auto;
    margin-bottom: 5px;
    display: block;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 20px;
}

.footer-social a {
    display: inline-block;
    width: 35px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 35px;
    margin-right: 10px;
    color: var(--white);
}

.footer-social a:hover {
    background-color: var(--primary-red);
}

.footer-col h3 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.footer-links li,
.footer-contact li {
    margin-bottom: 12px;
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
}

.footer-links a:hover {
    color: var(--primary-red);
    padding-left: 5px;
}

.footer-contact i {
    color: var(--primary-red);
    margin-right: 10px;
    width: 20px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 25px 0;
}

.footer-bottom-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

.footer-bottom-links a {
    color: rgba(255, 255, 255, 0.8);
    margin-left: 20px;
}

.footer-bottom-links a:hover {
    color: var(--primary-red);
}

/* ===================================
   FORM STYLES
   =================================== */

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--dark-text);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    transition: border-color 0.3s ease;
}

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

textarea.form-control {
    resize: vertical;
    min-height: 120px;
}

/* ===================================
   UTILITY CLASSES
   =================================== */

.text-center {
    text-align: center;
}

.text-primary {
    color: var(--primary-red);
}

.bg-light {
    background-color: var(--light-bg);
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }

/* ===================================
   SCROLL ANIMATIONS
   =================================== */

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.slide-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-right {
    opacity: 0;
    transform: translateX(50px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.slide-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger animation delay for multiple items */
.fade-in:nth-child(1) { transition-delay: 0.1s; }
.fade-in:nth-child(2) { transition-delay: 0.2s; }
.fade-in:nth-child(3) { transition-delay: 0.3s; }
.fade-in:nth-child(4) { transition-delay: 0.4s; }
.fade-in:nth-child(5) { transition-delay: 0.5s; }
.fade-in:nth-child(6) { transition-delay: 0.6s; }

/* GPU Acceleration for smooth scrolling */
.scale-in, .fade-in, .slide-left, .slide-right,
.team-card, .service-card, .branch-card {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000;
    perspective: 1000;
}

/* ===================================
   BACK TO TOP BUTTON
   =================================== */

.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-red), #B23D4B);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(199, 76, 90, 0.4);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1000;
    animation: bounceIn 0.5s ease;
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(199, 76, 90, 0.6);
    background: linear-gradient(135deg, #B23D4B, var(--primary-red));
}

.back-to-top:active {
    transform: translateY(-2px) scale(1.05);
}

@keyframes bounceIn {
    0% {
        transform: scale(0);
        opacity: 0;
    }
    50% {
        transform: scale(1.2);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===================================
   TEAM CARDS - 2025 Best Practice Design
   =================================== */

.team-card {
    position: relative;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                border-color 0.4s ease;
    height: 100%;
    border: 1px solid rgba(0, 0, 0, 0.04);
    will-change: transform;
}

/* Top accent bar that reveals on hover */
.team-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-red), var(--logo-gray));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 10;
}

.team-card:hover::before {
    transform: scaleX(1);
}

/* Subtle background pattern on hover */
.team-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at top right, rgba(199, 76, 90, 0.03), transparent 60%);
    opacity: 0;
    transition: opacity 0.6s ease;
    pointer-events: none;
}

.team-card:hover::after {
    opacity: 1;
}

/* Enhanced hover effect - optimized for performance */
.team-card:hover {
    transform: translateY(-12px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12),
                0 8px 20px rgba(199, 76, 90, 0.08);
    border-color: rgba(199, 76, 90, 0.1);
}

.team-card-header {
    position: relative;
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    transition: all 0.6s ease;
}

/* Animated gradient overlay */
.team-card-header::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.03) 100%);
    transition: background 0.6s ease;
}

.team-card:hover .team-card-header::after {
    background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.06) 100%);
}

/* Modern floating avatar with enhanced effects */
.team-card-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3.8rem;
    color: var(--white);
    position: relative;
    z-index: 2;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15),
                0 0 0 8px rgba(255, 255, 255, 0.15),
                0 0 0 12px rgba(255, 255, 255, 0.08);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1),
                box-shadow 0.4s ease;
}

.team-card:hover .team-card-avatar {
    transform: scale(1.1) translateY(-3px);
    box-shadow: 0 15px 45px rgba(0, 0, 0, 0.2),
                0 0 0 10px rgba(255, 255, 255, 0.2),
                0 0 0 16px rgba(255, 255, 255, 0.1);
}

.team-card-body {
    padding: 35px 28px;
    text-align: center;
    position: relative;
    background: var(--white);
}

/* Name with smooth color transition */
.team-card-name {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--dark-text);
    margin-bottom: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: -0.3px;
}

.team-card:hover .team-card-name {
    color: var(--primary-red);
    transform: translateY(-2px);
}

/* Role badge with refined styling */
.team-card-role {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s ease;
}

/* Location info with icon */
.team-card-location {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--secondary-gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
    padding: 10px 0;
    transition: color 0.3s ease;
}

.team-card-location i {
    transition: transform 0.4s ease;
}

.team-card:hover .team-card-location i {
    transform: translateY(-2px);
}

/* Animated divider */
.team-card-divider {
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--primary-red), transparent);
    margin: 18px auto;
    border-radius: 2px;
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.team-card:hover .team-card-divider {
    width: 80px;
}

/* Modern glassmorphic email container */
.team-card-email {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 20px 16px;
    border-radius: 12px;
    border: 1px solid rgba(224, 224, 224, 0.5);
    transition: background 0.3s ease,
                border-color 0.3s ease,
                transform 0.3s ease,
                box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

/* Shine effect on hover */
.team-card-email::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.5), transparent);
    transition: left 0.6s ease;
    will-change: left;
}

.team-card:hover .team-card-email::before {
    left: 100%;
}

.team-card:hover .team-card-email {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-color: var(--primary-red);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(199, 76, 90, 0.08);
}

.team-card-email a {
    color: var(--dark-text);
    text-decoration: none;
    font-size: 0.78rem;
    word-break: break-all;
    display: block;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
    line-height: 1.7;
}

.team-card:hover .team-card-email a {
    color: var(--primary-red);
    font-weight: 600;
}

.team-card-email i {
    font-size: 1.4rem;
    display: block;
    margin-bottom: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--secondary-gray);
}

.team-card:hover .team-card-email i {
    transform: scale(1.2) translateY(-3px);
    color: var(--primary-red);
}

/* ===================================
   ROLE-SPECIFIC MODERN GRADIENTS
   =================================== */

.team-card.role-manager .team-card-header {
    background: linear-gradient(135deg, #7B8A9D 0%, #5D6B7C 100%);
}

.team-card.role-manager .team-card-role {
    color: var(--logo-gray);
}

.team-card.role-credit .team-card-header {
    background: linear-gradient(135deg, #C74C5A 0%, #A33A47 100%);
}

.team-card.role-credit .team-card-role {
    color: var(--primary-red);
}

.team-card.role-sales .team-card-header {
    background: linear-gradient(135deg, #FFB84D 0%, #F7931E 100%);
}

.team-card.role-sales .team-card-role {
    color: #E08A1E;
}

.team-card.role-accountant .team-card-header {
    background: linear-gradient(135deg, #28C76F 0%, #1E9E56 100%);
}

.team-card.role-accountant .team-card-role {
    color: #1E9E56;
}

.team-card.role-supervisor .team-card-header {
    background: linear-gradient(135deg, #00A8E8 0%, #007DB8 100%);
}

.team-card.role-supervisor .team-card-role {
    color: #007DB8;
}

/* ===================================
   TEAM CARD RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .team-card {
        border-radius: 16px;
    }

    .team-card:hover {
        transform: translateY(-10px);
    }

    .team-card-header {
        height: 180px;
    }

    .team-card-avatar {
        width: 110px;
        height: 110px;
        font-size: 3.2rem;
    }

    .team-card-body {
        padding: 28px 22px;
    }

    .team-card-name {
        font-size: 1.2rem;
    }

    .team-card-email {
        padding: 16px 14px;
    }
}

@media (max-width: 480px) {
    .team-card-header {
        height: 160px;
    }

    .team-card-avatar {
        width: 100px;
        height: 100px;
        font-size: 3rem;
    }

    .team-card-name {
        font-size: 1.15rem;
    }
}

/* ===================================
   HERO SLIDER RESPONSIVE STYLES
   =================================== */

@media (max-width: 768px) {
    .hero-slider {
        height: 70vh;
        min-height: 500px;
    }

    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: 12px;
    }

    .hero-content p {
        font-size: 1rem;
        margin-bottom: 25px;
        padding: 0 10px;
    }

    .hero-buttons .btn {
        padding: 12px 25px;
        font-size: 15px;
    }

    /* Smaller navigation arrows on mobile */
    .hero-slider .swiper-button-next,
    .hero-slider .swiper-button-prev {
        width: 45px;
        height: 45px;
    }

    .hero-slider .swiper-button-next:after,
    .hero-slider .swiper-button-prev:after {
        font-size: 18px;
    }

    .hero-slider .swiper-pagination {
        bottom: 20px;
    }
}

@media (max-width: 480px) {
    .hero-slider {
        height: 60vh;
        min-height: 450px;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .hero-content p {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .hero-buttons {
        gap: 15px;
    }

    .hero-buttons .btn {
        padding: 10px 20px;
        font-size: 14px;
    }
}
