/* ========================================
   MODERN CSS WITH ENHANCED ANIMATIONS
   ======================================== */

/* Root Variables - Color Scheme Modern */
:root {
    --primary: #0d9488;
    --primary-dark: #0f766e;
    --primary-light: #ccfbf1;
    --secondary: #6366f1;
    --secondary-dark: #4f46e5;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #1e293b;
    --dark-light: #334155;
    --gray: #64748b;
    --gray-light: #94a3b8;
    --light: #f8fafc;
    --light-gray: #f1f5f9;
    --white: #ffffff;
    --black: #0f172a;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
    
    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 300ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 500ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: 500ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

/* ========================================
   SPINNER MODERN
   ======================================== */
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base) ease-out, visibility 0s linear var(--transition-base);
    z-index: 99999;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.9);
}

#spinner.show {
    transition: opacity var(--transition-base) ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

#spinner .spinner-border {
    border-width: 4px;
    animation: spinPulse 1s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}

@keyframes spinPulse {
    0% {
        transform: rotate(0deg) scale(1);
        opacity: 1;
    }
    50% {
        transform: rotate(180deg) scale(1.1);
        opacity: 0.8;
    }
    100% {
        transform: rotate(360deg) scale(1);
        opacity: 1;
    }
}

/* ========================================
   BACK TO TOP BUTTON - ENHANCED
   ======================================== */
.back-to-top {
    position: fixed;
    right: 30px;
    bottom: 30px;
    display: flex;
    width: 48px;
    height: 48px;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base) var(--transition-bounce);
    z-index: 99;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    color: white;
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: var(--shadow-xl);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

/* ========================================
   BUTTONS - MODERN DESIGN
   ======================================== */
.btn {
    font-weight: 600;
    transition: all var(--transition-base);
    border-radius: 12px;
    padding: 10px 24px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.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;
    z-index: -1;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-square, .btn-sm-square, .btn-md-square, .btn-lg-square {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: normal;
    border-radius: 16px;
    transition: all var(--transition-base);
}

.btn-square {
    width: 36px;
    height: 36px;
}

.btn-sm-square {
    width: 40px;
    height: 40px;
}

.btn-md-square {
    width: 48px;
    height: 48px;
}

.btn-lg-square {
    width: 56px;
    height: 56px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border: none;
    color: white;
    box-shadow: 0 4px 15px rgba(13, 148, 136, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(13, 148, 136, 0.4);
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
}

.btn-light {
    background: var(--white);
    border: 1px solid var(--gray-light);
    color: var(--dark);
}

.btn-light:hover {
    background: var(--light-gray);
    transform: translateY(-2px);
    border-color: var(--primary);
}

/* ========================================
   SECTION TITLE - MODERN & ELEGANT
   ======================================== */
.section-title {
    max-width: 900px;
    text-align: center;
    margin: 0 auto 60px;
}

.section-title .sub-style {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
    color: var(--primary);
    font-weight: 600;
    letter-spacing: 2px;
    font-size: 14px;
    margin-bottom: 15px;
}

.section-title .sub-style::before,
.section-title .sub-style::after {
    content: "";
    position: absolute;
    top: 50%;
    width: 50px;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
}

.section-title .sub-style::before {
    right: calc(100% + 15px);
    transform: translateY(-50%);
}

.section-title .sub-style::after {
    left: calc(100% + 15px);
    transform: translateY(-50%);
    background: linear-gradient(90deg, transparent, var(--primary));
}

.section-title .display-4 {
    font-size: 2.75rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--dark), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 20px;
}

/* ========================================
   TOPBAR - MODERN
   ======================================== */
.topbar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark)) !important;
    padding: 8px 20px;
}

.topbar a {
    transition: all var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.topbar a:hover {
    transform: translateX(3px);
    color: var(--light) !important;
}

/* ========================================
   NAVBAR - PREMIUM DESIGN
   ======================================== */
.navbar {
    transition: all var(--transition-base);
    backdrop-filter: blur(10px);
}

.navbar-light .navbar-nav .nav-link {
    font-family: 'Inter', sans-serif;
    position: relative;
    margin-right: 25px;
    padding: 35px 0;
    color: var(--dark) !important;
    font-size: 16px;
    font-weight: 500;
    transition: all var(--transition-base);
}

.sticky-top.navbar-light .navbar-nav .nav-link {
    padding: 20px 0;
}

.navbar-light .navbar-nav .nav-link:hover,
.navbar-light .navbar-nav .nav-link.active {
    color: var(--primary) !important;
}

.navbar-light .navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: all var(--transition-base);
    transform: translateX(-50%);
    border-radius: 3px;
}

.navbar-light .navbar-nav .nav-link:hover::after,
.navbar-light .navbar-nav .nav-link.active::after {
    width: 80%;
}

.dropdown-menu {
    border: none;
    border-radius: 16px;
    box-shadow: var(--shadow-xl);
    padding: 12px 0;
    animation: fadeInUp 0.3s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.dropdown-item {
    padding: 10px 24px;
    transition: all var(--transition-fast);
    border-radius: 8px;
    margin: 4px 8px;
}

.dropdown-item:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    transform: translateX(5px);
}

/* ========================================
   HERO HEADER - ENHANCED
   ======================================== */
.header-carousel .owl-nav .owl-prev,
.header-carousel .owl-nav .owl-next {
    width: 60px;
    height: 60px;
    border-radius: 60px;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    color: white;
    font-size: 24px;
    transition: all var(--transition-base);
}

.header-carousel .owl-nav .owl-prev:hover,
.header-carousel .owl-nav .owl-next:hover {
    background: var(--primary);
    transform: scale(1.1);
}

.header-carousel-item .carousel-caption {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.4));
    backdrop-filter: blur(2px);
}

/* ========================================
   BREADCRUMB HERO - ENHANCED
   ======================================== */
.bg-breadcrumb {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.9), rgba(99, 102, 241, 0.9)), url(../img/carousel-1.jpg);
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    background-attachment: fixed;
    padding: 180px 0 80px 0;
    position: relative;
}

.bg-breadcrumb::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="white" opacity="0.05"/></svg>') repeat;
    pointer-events: none;
}

.breadcrumb-item a {
    transition: all var(--transition-base);
}

.breadcrumb-item a:hover {
    color: var(--primary-light) !important;
    transform: translateX(3px);
    display: inline-block;
}

/* ========================================
   SERVICE CARDS - MODERN
   ======================================== */
.service-item {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    background: white;
}

.service-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-2xl);
}

.service-img {
    overflow: hidden;
    position: relative;
}

.service-img img {
    transition: transform var(--transition-slow);
}

.service-item:hover .service-img img {
    transform: scale(1.1);
}

.service-img::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.3), rgba(99, 102, 241, 0.3));
    opacity: 0;
    transition: all var(--transition-base);
    z-index: 1;
}

.service-item:hover .service-img::before {
    opacity: 1;
}

.service-content {
    padding: 30px;
    position: relative;
    z-index: 2;
}

.service-content::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width var(--transition-base);
}

.service-item:hover .service-content::before {
    width: 100%;
}

/* ========================================
   FEATURE CARDS - ENHANCED
   ======================================== */
.feature-item {
    position: relative;
    padding: 35px 25px;
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
    overflow: hidden;
    z-index: 1;
}

.feature-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    transition: width var(--transition-base);
    z-index: -1;
}

.feature-item:hover::before {
    width: 100%;
}

.feature-item:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    margin-bottom: 20px;
    transition: all var(--transition-base);
}

.feature-item:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

.feature-item:hover h5,
.feature-item:hover p,
.feature-item:hover i {
    color: white !important;
}

.feature-item:hover .bg-light {
    background: rgba(255, 255, 255, 0.2) !important;
}

/* ========================================
   TEAM CARDS - MODERN
   ======================================== */
.team-item {
    border-radius: 20px;
    overflow: hidden;
    background: white;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.team-item:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.team-img {
    position: relative;
    overflow: hidden;
}

.team-img img {
    transition: transform var(--transition-slow);
}

.team-item:hover .team-img img {
    transform: scale(1.1);
}

.team-icon {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    text-align: center;
    transition: all var(--transition-base);
}

.team-item:hover .team-icon {
    bottom: 20px;
}

.team-icon a {
    display: inline-flex;
    width: 36px;
    height: 36px;
    margin: 0 5px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.team-icon a:hover {
    transform: translateY(-3px);
    background: var(--secondary);
}

.team-content {
    padding: 20px;
    text-align: center;
    background: white;
}

/* ========================================
   TESTIMONIAL - ENHANCED
   ======================================== */
.testimonial {
    background: linear-gradient(135deg, rgba(13, 148, 136, 0.95), rgba(99, 102, 241, 0.95)), url(../img/carousel-1.jpg);
    background-attachment: fixed;
    background-size: cover;
}

.testimonial-item {
    padding: 40px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 30px;
    margin: 20px;
    transition: all var(--transition-base);
}

.testimonial-item:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.15);
}

.testimonial-inner-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--primary-light);
    margin-bottom: 20px;
    transition: all var(--transition-base);
}

.testimonial-item:hover .testimonial-inner-img {
    transform: scale(1.05);
    border-color: var(--secondary);
}

/* ========================================
   FOOTER - MODERN DARK
   ======================================== */
.footer {
    background: linear-gradient(135deg, var(--dark), var(--black));
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="40" fill="white" opacity="0.02"/></svg>') repeat;
    pointer-events: none;
}

.footer-item a {
    line-height: 35px;
    color: var(--gray-light);
    transition: all var(--transition-base);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-item a:hover {
    color: var(--primary);
    transform: translateX(8px);
}

.footer-item h4 {
    position: relative;
    display: inline-block;
    margin-bottom: 25px;
}

.footer-item h4::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    border-radius: 3px;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(13, 148, 136, 0.4);
    }
    50% {
        box-shadow: 0 0 0 20px rgba(13, 148, 136, 0);
    }
}

.wow {
    animation-duration: 0.8s;
    animation-fill-mode: both;
}

/* ========================================
   RESPONSIVE IMPROVEMENTS
   ======================================== */
@media (max-width: 991.98px) {
    .section-title .display-4 {
        font-size: 2rem;
    }
    
    .navbar-light .navbar-nav .nav-link {
        padding: 12px 0;
    }
    
    .feature-item {
        padding: 25px 20px;
    }
    
    .back-to-top {
        right: 20px;
        bottom: 20px;
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 576px) {
    .section-title .display-4 {
        font-size: 1.75rem;
    }
    
    .section-title .sub-style::before,
    .section-title .sub-style::after {
        width: 30px;
    }
    
    .service-content {
        padding: 20px;
    }
    
    .testimonial-item {
        padding: 20px;
        margin: 10px;
    }
}