/*------------------------------------------------------------------
SDG Elektromarket - Custom Theme Colors
Primary Color: #06a6a4 (Teal/Turkuaz)
Secondary Color: #274146 (Dark Teal)
-------------------------------------------------------------------*/

/* Gradient Backgrounds */
.gradient-primary {
    background: linear-gradient(135deg, #06a6a4 0%, #048482 100%);
}

.gradient-secondary {
    background: linear-gradient(135deg, #274146 0%, #1a2d31 100%);
}

.gradient-overlay {
    background: linear-gradient(135deg, rgba(6, 166, 164, 0.9) 0%, rgba(39, 65, 70, 0.9) 100%);
}

/* Header with gradient and glassmorphism */
.affix .header-wrapper {
    background: linear-gradient(135deg, rgba(39, 65, 70, 0.95) 0%, rgba(26, 45, 49, 0.95) 100%) !important;
    backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(6, 166, 164, 0.15);
}

/* Logo hover effect */
.logo-2 a:hover {
    opacity: 0.8;
}

/* Feature boxes with modern effects */
.fes1-box,
.fes4-box,
.fes6-box,
.fes7-box,
.fes8-box {
    position: relative;
    padding: 25px;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fes1-box::before,
.fes4-box::before,
.fes6-box::before,
.fes7-box::before,
.fes8-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 12px;
    padding: 2px;
    background: linear-gradient(135deg, #06a6a4, #274146);
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.fes1-box:hover::before,
.fes4-box:hover::before,
.fes6-box:hover::before,
.fes7-box:hover::before,
.fes8-box:hover::before {
    opacity: 1;
}

.fes1-box:hover,
.fes4-box:hover,
.fes6-box:hover,
.fes7-box:hover,
.fes8-box:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(6, 166, 164, 0.25);
}

.fes1-box:hover .fes1-box-icon,
.fes4-box:hover .fes4-box-icon,
.fes6-box:hover .icon,
.fes7-box:hover .fes7-box-icon,
.fes8-box:hover .fes8-box-icon {
    color: #06a6a4;
    transform: scale(1.15) rotate(5deg);
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    text-shadow: 0 5px 15px rgba(6, 166, 164, 0.3);
}

/* Section title with animated gradient */
.section-title {
    position: relative;
    padding-left: 30px !important;
    overflow: hidden;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 5px;
    height: 100%;
    background: linear-gradient(180deg, #06a6a4 0%, #048482 50%, #274146 100%);
    background-size: 100% 200%;
    animation: gradientShift 3s ease infinite;
    border-radius: 3px;
    box-shadow: 0 0 20px rgba(6, 166, 164, 0.5);
}

.section-title::after {
    content: '';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background: #06a6a4;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(6, 166, 164, 0.8);
    animation: pulse 2s ease infinite;
}

@keyframes gradientShift {
    0%, 100% { background-position: 0% 0%; }
    50% { background-position: 0% 100%; }
}

@keyframes pulse {
    0%, 100% { 
        transform: translateY(-50%) scale(1);
        opacity: 1;
    }
    50% { 
        transform: translateY(-50%) scale(1.3);
        opacity: 0.7;
    }
}

/* Link colors */
a {
    color: #274146;
}

a:hover {
    color: #06a6a4;
}

/* Button advanced effects */
.button {
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    z-index: 1;
}

.button::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;
}

.button:hover::before {
    width: 300px;
    height: 300px;
}

.button:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(6, 166, 164, 0.4), 
                0 0 20px rgba(6, 166, 164, 0.3),
                inset 0 1px 1px rgba(255, 255, 255, 0.3);
}

.button:active {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(6, 166, 164, 0.3);
}

/* Animated gradient buttons */
.button.yellow,
.button.thin-inv {
    background: linear-gradient(135deg, #06a6a4 0%, #048482 100%);
    background-size: 200% 200%;
    animation: buttonGradient 3s ease infinite;
    border: none !important;
}

@keyframes buttonGradient {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.button.yellow:hover,
.button.thin-inv:hover {
    background: linear-gradient(135deg, #274146 0%, #1a2d31 100%);
    animation: none;
}

/* Counter and stats highlights */
.count-number,
.counter-1 .count-number {
    color: #06a6a4 !important;
}

/* Footer links hover */
.footer-2-black a:hover,
footer a:hover {
    color: #06a6a4 !important;
}

/* Scroll to top button */
#back-top a {
    background-color: #06a6a4;
    border-color: #06a6a4;
}

#back-top a:hover {
    background-color: #274146;
    border-color: #274146;
}

/* Form focus states */
input:focus,
textarea:focus,
select:focus {
    border-color: #06a6a4 !important;
    box-shadow: 0 0 5px rgba(6, 166, 164, 0.3) !important;
}

/* Social media icons hover */
.footer-2-soc-a a:hover,
.social-icons a:hover {
    color: #06a6a4 !important;
    transform: translateY(-3px);
    transition: all 0.3s ease;
}

/* Blockquote accent */
blockquote {
    border-left-color: #06a6a4 !important;
}

/* Progress bars */
.progress-bar,
.skill-bar-content {
    background-color: #06a6a4 !important;
}

/* Pricing table highlights */
.pricing-table.featured,
.pricing-table:hover {
    border-color: #06a6a4 !important;
}

.pricing-table .price {
    color: #06a6a4 !important;
}

/* Tabs active state */
.nav-tabs > li.active > a,
.nav-tabs > li > a:hover {
    border-bottom-color: #06a6a4 !important;
    color: #06a6a4 !important;
}

/* Accordion active */
.panel-default > .panel-heading {
    background-color: #f8f8f8;
}

.panel-default > .panel-heading:hover,
.panel-default > .panel-heading.active {
    background-color: #06a6a4 !important;
    color: #ffffff !important;
}

/* Testimonial accent */
.testimonial-item::before {
    color: #06a6a4 !important;
}

/* List style bullets */
ul.list-style li::before {
    color: #06a6a4 !important;
}

/* Team member hover */
.team-member:hover {
    border-color: #06a6a4 !important;
}

/* Blog post category/tag */
.post-category,
.post-tag {
    background-color: #06a6a4 !important;
    color: #ffffff !important;
}

.post-category:hover,
.post-tag:hover {
    background-color: #274146 !important;
}

/* Search form highlight */
.search-form input[type="text"]:focus {
    border-color: #06a6a4 !important;
}

/* Newsletter form */
.newsletter-form button,
.newsletter-form input[type="submit"] {
    background-color: #06a6a4 !important;
    border-color: #06a6a4 !important;
}

.newsletter-form button:hover,
.newsletter-form input[type="submit"]:hover {
    background-color: #274146 !important;
    border-color: #274146 !important;
}

/* Loader animation */
#loader3 {
    background-color: #06a6a4 !important;
}

/* Pagination */
.pagination > .active > a,
.pagination > .active > span {
    background-color: #06a6a4 !important;
    border-color: #06a6a4 !important;
}

.pagination > li > a:hover {
    background-color: #274146 !important;
    border-color: #274146 !important;
    color: #ffffff !important;
}

/* Slider navigation with glow */
.tp-leftarrow,
.tp-rightarrow,
.owl-prev,
.owl-next {
    transition: all 0.3s ease !important;
}

.tp-leftarrow:hover,
.tp-rightarrow:hover,
.owl-prev:hover,
.owl-next:hover {
    background: linear-gradient(135deg, #06a6a4 0%, #048482 100%) !important;
    box-shadow: 0 0 25px rgba(6, 166, 164, 0.6),
                inset 0 0 15px rgba(255, 255, 255, 0.2);
    transform: scale(1.1);
}

/* Animated slider dots */
.tp-bullets .tp-bullet,
.owl-dot {
    transition: all 0.3s ease;
}

.tp-bullets .tp-bullet:hover,
.owl-dot:hover,
.tp-bullets .tp-bullet.selected,
.owl-dot.active {
    background: #06a6a4 !important;
    box-shadow: 0 0 15px rgba(6, 166, 164, 0.8);
    transform: scale(1.3);
}

/* Portfolio filter with effects */
.port-filter {
    position: relative;
}

.port-filter a {
    position: relative;
    display: inline-block;
    padding: 8px 16px;
    border-radius: 25px;
    transition: all 0.3s ease;
}

.port-filter a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #06a6a4, #274146);
    transform: translateX(-50%);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.port-filter a:hover::after,
.port-filter a.active::after {
    width: 80%;
}

.port-filter a.active {
    color: #06a6a4 !important;
    background: rgba(6, 166, 164, 0.08);
    border-color: transparent !important;
}

.port-filter a:hover {
    color: #06a6a4 !important;
    background: rgba(6, 166, 164, 0.05);
    transform: translateY(-2px);
}

/* Mobile menu toggle */
.navbar-toggle:hover {
    background-color: #06a6a4 !important;
}

/* Additional accents */
.accent-color {
    color: #06a6a4 !important;
}

.accent-bg {
    background-color: #06a6a4 !important;
}

.accent-border {
    border-color: #06a6a4 !important;
}

.accent-color-dark {
    color: #274146 !important;
}

.accent-bg-dark {
    background-color: #274146 !important;
}

.accent-border-dark {
    border-color: #274146 !important;
}

/* Portfolio items advanced hover */
.port-item {
    position: relative;
}

.port-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(6, 166, 164, 0.1), rgba(39, 65, 70, 0.1));
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
    z-index: 1;
}

.port-item:hover::after {
    opacity: 1;
}

.port-item:hover .port-main-img {
    filter: brightness(0.9) saturate(1.2);
}

/* Animated icons */
.icon,
[class*="icon-"],
[class*="icon_"] {
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.fes1-box-icon,
.fes4-box-icon,
.fes6-box .icon,
.fes7-box-icon,
.fes8-box-icon {
    position: relative;
    display: inline-block;
}

.fes1-box-icon::after,
.fes4-box-icon::after,
.fes7-box-icon::after,
.fes8-box-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 120%;
    height: 120%;
    border: 2px solid #06a6a4;
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: all 0.4s ease;
}

.fes1-box:hover .fes1-box-icon::after,
.fes4-box:hover .fes4-box-icon::after,
.fes7-box:hover .fes7-box-icon::after,
.fes8-box:hover .fes8-box-icon::after {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.3;
}

/* Scroll animations */
.wow {
    visibility: hidden;
}

.wow.animated {
    visibility: visible;
}

/* Text gradient effect */
.section-title .bold {
    background: linear-gradient(135deg, #06a6a4 0%, #274146 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* Floating animation for images */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.fes2-img,
.fes3-img,
.fes7-img {
    animation: float 6s ease-in-out infinite;
}

/* Shine effect on hover */
.port-item .port-img-overlay::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(
        45deg,
        transparent 30%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 70%
    );
    transform: rotate(45deg) translateX(-100%);
    transition: transform 0.6s;
}

.port-item:hover .port-img-overlay::after {
    transform: rotate(45deg) translateX(100%);
}

/* Line drawing animation */
@keyframes drawLine {
    0% {
        width: 0;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        width: 100%;
        opacity: 0;
    }
}

.line-3-100,
.line-3-70 {
    position: relative;
    overflow: visible;
}

.line-3-100::after,
.line-3-70::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: rgba(255, 255, 255, 0.5);
    animation: drawLine 2s ease-in-out infinite;
}

/* Card flip effect for feature boxes */
.fes1-box,
.fes4-box,
.fes8-box {
    perspective: 1000px;
}

/* Glowing text effect */
.section-title:hover,
h1:hover,
h2:hover {
    text-shadow: 0 0 20px rgba(6, 166, 164, 0.3);
    transition: text-shadow 0.3s ease;
}

/* Ripple effect */
@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(2.5);
        opacity: 0;
    }
}

.button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 10px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
}

.button:active::after {
    animation: ripple 0.6s ease-out;
}

/* Modern scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #06a6a4, #274146);
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #048482, #1a2d31);
    box-shadow: 0 0 10px rgba(6, 166, 164, 0.5);
}

/* Parallax depth effect */
.page-section {
    transform-style: preserve-3d;
}

.fes1-box,
.fes4-box,
.fes6-box,
.fes7-box,
.fes8-box {
    transform-style: preserve-3d;
    will-change: transform;
}

/* Neon glow effect */
.port-view-more,
.port-view-more-dark {
    position: relative;
    text-shadow: 0 0 10px rgba(6, 166, 164, 0.5);
}

.port-view-more::before,
.port-view-more-dark::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #06a6a4, #274146, #06a6a4, #274146);
    background-size: 400% 400%;
    opacity: 0;
    filter: blur(10px);
    transition: opacity 0.3s ease;
    animation: neonGlow 3s ease infinite;
    z-index: -1;
}

.port-view-more:hover::before,
.port-view-more-dark:hover::before {
    opacity: 0.7;
}

@keyframes neonGlow {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

/* Loading bar animation */
@keyframes loadingBar {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.loading-effect::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(6, 166, 164, 0.4), transparent);
    animation: loadingBar 2s ease-in-out infinite;
}

/* Magnetic hover effect for buttons */
.button {
    will-change: transform;
}

/* 3D tilt effect */
.port-item,
.fes1-box,
.fes4-box,
.fes6-box,
.fes7-box,
.fes8-box {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Pulse animation utility */
.pulse-accent {
    animation: pulse-accent 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse-accent {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Header logo size and alignment fixes */
.logo-row {
    width: auto !important;
    display: flex;
    align-items: center;
}

.logo-container-2 {
    display: flex;
    align-items: center;
}

.logo-2 {
    display: flex;
    align-items: center;
    height: 45px;
}

.logo-2 img {
    max-height: 65px;
    width: auto;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    filter: drop-shadow(0 0 0 rgba(6, 166, 164, 0));
}

.logo-2:hover img {
    transform: scale(1.05) rotate(-2deg);
    filter: drop-shadow(0 5px 15px rgba(6, 166, 164, 0.4));
}

/* Reduce navbar height */
.header-wrapper .container-m-30 {
    padding-top: 5px !important;
    padding-bottom: 5px !important;
}

.logo-row {
    padding: 3px 0;
}

#main-menu .navbar {
    min-height: auto;
    margin-bottom: 0;
}

#main-menu .navbar .nav {
    display: flex;
    justify-content: center;
    width: 100%;
}

#main-menu .navbar .nav > li > a {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
    line-height: 20px;
}

/* Enhanced menu hover */
#main-menu .navbar .nav > li > a::before {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #06a6a4, transparent);
    transform: translateX(-50%);
    transition: width 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    box-shadow: 0 0 10px rgba(6, 166, 164, 0.5);
}

#main-menu .navbar .nav > li:hover > a::before,
#main-menu .navbar .nav > li.current > a::before {
    width: 100%;
}

/* Footer gradient background */
footer.footer2-black {
    background: linear-gradient(135deg, #1a2d31 0%, #274146 100%);
    overflow: hidden !important;
    position: relative;
}

footer.footer2-black::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #06a6a4, transparent);
    box-shadow: 0 0 20px rgba(6, 166, 164, 0.5);
}

footer,
footer * {
    max-width: 100%;
    box-sizing: border-box;
}

footer .container {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
}

footer .row {
    margin-left: -15px !important;
    margin-right: -15px !important;
}

footer .col-md-3,
footer .col-sm-3,
footer [class*="col-"] {
    padding-left: 15px !important;
    padding-right: 15px !important;
}

/* Remove any decorative vertical lines/borders from footer */
footer::after,
footer *::after,
footer *::before,
footer::before {
    border-right: none !important;
    border-left: none !important;
    background: none !important;
    content: none !important;
}

footer [class*="col-"]:not(:last-child)::after {
    display: none !important;
    content: none !important;
}

/* Ensure no widget borders */
footer .widget {
    border: none !important;
    border-right: none !important;
    border-left: none !important;
}

footer .widget::after,
footer .widget::before {
    display: none !important;
    content: none !important;
}

/* Remove footer gradient line if exists */
footer.footer2-black::before {
    display: none !important;
}

/* Ensure grey-bg doesn't overflow */
.grey-bg {
    overflow-x: hidden !important;
}

/* Remove any pseudo elements causing lines */
#wrap::after,
#wrap::before,
.boxed::after,
.boxed::before {
    display: none !important;
    content: none !important;
}

/* Social icons with SVG */
.footer-2-soc-a a {
    display: inline-block;
    margin: 0 10px;
    color: rgba(255,255,255,0.7);
    transition: all 0.3s ease;
}

.footer-2-soc-a a svg {
    display: block;
    color: inherit;
}

.footer-2-soc-a a:hover {
    color: #06a6a4 !important;
    transform: translateY(-3px);
}

/* Clients hover effect */
.our-clients-cont img {
    transition: all 0.4s ease;
    filter: grayscale(100%) opacity(0.6);
}

.our-clients-cont img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

/* Back to top enhanced */
#back-top a {
    background: linear-gradient(135deg, #06a6a4, #048482);
    box-shadow: 0 5px 20px rgba(6, 166, 164, 0.4);
    transition: all 0.4s ease;
}

#back-top a:hover {
    transform: translateY(-5px) rotate(360deg);
    box-shadow: 0 10px 30px rgba(6, 166, 164, 0.6);
}

/* Utility classes */
.text-gradient {
    background: linear-gradient(135deg, #06a6a4 0%, #274146 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.shadow-glow {
    box-shadow: 0 10px 40px rgba(6, 166, 164, 0.3);
}

/* Fix horizontal scroll issues */
body, html {
    overflow-x: hidden !important;
    max-width: 100vw !important;
}

#wrap {
    overflow-x: hidden !important;
    max-width: 100% !important;
}

.container,
.container-fluid {
    overflow-x: hidden !important;
}

.row {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Prevent transforms from causing overflow */
.fes1-box,
.fes4-box,
.fes6-box,
.fes7-box,
.fes8-box,
.port-item {
    max-width: 100%;
    overflow: hidden;
}

/* Fix button magnetic effect overflow */
.button {
    max-width: 100%;
}

/* Contain animations within viewport */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}
