﻿/* ============================================
   CUSTOM TEMPLATE STYLES - CODEHEIDI
   ============================================ */

/* Hover lift effect for cards */
.hover-lift {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Section title styling */
.section-title {
    background: linear-gradient(135deg, #5a8dee 0%, #28c76f 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* WhatsApp floating button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    z-index: 1060;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: pulse 2s ease-in-out infinite;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(37, 211, 102, 0.5);
    color: #fff;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    50% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
}

/* Hero text box centering */
.hero-text-box {
    max-width: 1100px !important;
    margin-left: auto;
    margin-right: auto;
}

/* Hero section title animation */
.hero-title {
    animation: fadeInUp 0.8s ease-out;
    overflow: visible;
}

/* Typing text span with cursor */
#typing-text {
    display: inline;
}

#typing-text::after {
    content: '|';
    animation: blink 1s infinite;
    font-weight: normal;
    color: #28c76f;
    margin-left: 2px;
}

/* Responsive hero title */
@media (max-width: 1400px) {
    .hero-title {
        font-size: 2.5rem !important;
    }
}

@media (max-width: 1200px) {
    .hero-title {
        font-size: 2rem !important;
    }
}

@media (max-width: 992px) {
    .hero-title {
        font-size: 1.75rem !important;
    }
}

@media (max-width: 768px) {
    .hero-title {
        white-space: normal !important;
        font-size: 1.5rem !important;
    }
}

@media (max-width: 576px) {
    .hero-title {
        white-space: normal !important;
        font-size: 1.25rem !important;
    }
}

@keyframes blink {

    0%,
    49% {
        opacity: 1;
    }

    50%,
    100% {
        opacity: 0;
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Hero button item positioning */
.hero-btn-item {
    position: relative !important;
    inset-inline-start: 0 !important;
    left: 0 !important;
    display: inline-flex !important;
    align-items: center;
    margin-right: 50px !important;
    z-index: 10;
    white-space: nowrap;
    vertical-align: middle;
}

.hero-btn-item img {
    margin-left: 10px;
}

/* Responsive adjustments for hero button */
@media (max-width: 768px) {
    .hero-btn-item {
        min-width: auto;
        white-space: normal;
        margin-bottom: 15px;
    }
}

/* Card hover effects for services */
.card {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Button hover improvements */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary:hover,
.btn-success:hover,
.btn-label-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.2);
}

/* Icon animations */
.fas,
.fab,
.bx {
    transition: all 0.3s ease;
}

.card:hover .fas,
.card:hover .fab,
.card:hover .bx {
    transform: scale(1.1);
}

/* Link hover effects */
a {
    transition: all 0.3s ease;
}

/* Footer improvements */
.landing-footer .footer-top {
    background: linear-gradient(135deg, #1e2937 0%, #2d3748 100%);
}

.landing-footer .footer-bottom {
    background-color: #1a202c;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .whatsapp-float {
        width: 50px;
        height: 50px;
        bottom: 20px;
        right: 20px;
        font-size: 1.5rem;
    }
}

/* Custom colors matching CodeHeidi brand */
.text-codeheidi-blue {
    color: #5a8dee;
}

.text-codeheidi-green {
    color: #28c76f;
}

.bg-codeheidi-blue {
    background-color: #5a8dee;
}

.bg-codeheidi-green {
    background-color: #28c76f;
}

/* Gradient backgrounds */
.bg-gradient-primary {
    background: linear-gradient(135deg, #5a8dee 0%, #28c76f 100%);
}

/* Badge custom styling */
.badge.bg-label-primary {
    background-color: rgba(90, 141, 238, 0.12) !important;
    color: #5a8dee !important;
}

/* Smooth transitions for all interactive elements */
button,
a,
input,
textarea,
select {
    transition: all 0.3s ease;
}

/* Loading animation for images */
img {
    transition: opacity 0.3s ease;
}

img:not([src]) {
    opacity: 0;
}

/* Improve card borders on hover */
.card.border:hover {
    border-color: #5a8dee !important;
}

/* Hero section responsive improvements */
@media (max-width: 991px) {
    .hero-title {
        font-size: 2.5rem !important;
    }

    .hero-sub-title {
        font-size: 1rem !important;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem !important;
    }
}

/* Improve spacing on mobile */
@media (max-width: 768px) {
    .section-py {
        padding: 3rem 0 !important;
    }
}

/* Arrow icon animation on links */
.btn i.fa-arrow-right,
.footer-link i.fa-arrow-right,
a i.fa-arrow-right {
    transition: transform 0.3s ease;
}

.btn:hover i.fa-arrow-right,
.footer-link:hover i.fa-arrow-right,
a:hover i.fa-arrow-right {
    transform: translateX(4px);
}

/* Icon color variations */
.card-body i.fas,
.card-body i.fab {
    transition: all 0.3s ease;
}

/* Fix for boxicons not loading */
.bx {
    font-family: 'boxicons' !important;
}

/* Ensure proper rendering of gradients in text */
.text-primary.hero-title {
    background: linear-gradient(to right, #28c76f 0%, #5a8dee 47.92%, #ff3739 100%);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shine 3s ease-in-out infinite alternate;
}

@keyframes shine {
    0% {
        background-position: 0% 50%;
    }

    80% {
        background-position: 50% 90%;
    }

    100% {
        background-position: 91% 100%;
    }
}

/* Navbar green border */
.light-style .layout-navbar .navbar.landing-navbar {
    border-color: #28c76f !important;
}

/* ============================================
   NAVIGATION ACTIVE STATE - HALF UNDERLINE
   ============================================ */

/* Base nav link styling */
.landing-navbar .nav-link {
    position: relative;
    padding-bottom: 8px;
}

/* Half underline effect using ::after pseudo-element */
.landing-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #28c76f 0%, #5a8dee 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}

/* Active state - show the underline */
.landing-navbar .nav-link.active::after {
    width: 60%;
}

/* Hover state - show underline on hover too */
.landing-navbar .nav-link:hover::after {
    width: 60%;
}

/* Active link text color */
.landing-navbar .nav-link.active {
    color: #28c76f !important;
    font-weight: 600;
}

/* Alternative: Red/Green gradient underline */
.landing-navbar .nav-link.active::after {
    background: linear-gradient(90deg, #28c76f 0%, #ea5455 100%);
}

/* Better shadow for navbar when scrolled */
.layout-navbar.navbar-active {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

/* Improve footer link hover */
.footer-link {
    transition: all 0.3s ease;
}

.footer-link:hover {
    opacity: 0.8;
    padding-left: 0.5rem;
}

/* Card body padding adjustments */
.card-body {
    padding: 1.5rem;
}

/* Ensure consistent button sizing */
.btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Improve text readability */
body {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Better focus states for accessibility */
a:focus,
button:focus,
input:focus,
textarea:focus {
    outline: 2px solid #5a8dee;
    outline-offset: 2px;
}

/* Smooth page transitions */
.page-transition {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* ============================================
   SMARTPHONE SIMULATOR
   ============================================ */

.app-simulator-container {
    display: flex;
    justify-content: center;
    align-items: center;
    perspective: 1000px;
    padding: 20px;
}

.smartphone {
    position: relative;
    width: 300px;
    height: 600px;
    margin: auto;
    border: 12px solid #1a1a1a;
    border-top-width: 40px;
    border-bottom-width: 40px;
    border-radius: 40px;
    background: #fff;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    overflow: hidden;
}

.smartphone:hover {
    transform: translateY(-15px) rotateY(-8deg);
    box-shadow: 20px 40px 80px rgba(0, 0, 0, 0.4);
}

.smartphone:before {
    content: '';
    display: block;
    width: 60px;
    height: 5px;
    position: absolute;
    top: -22px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    border-radius: 10px;
    z-index: 2;
}

.smartphone:after {
    content: '';
    display: block;
    width: 35px;
    height: 35px;
    position: absolute;
    bottom: -38px;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    border-radius: 50%;
    border: 2px solid #444;
    z-index: 2;
}

.smartphone .content {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
    background: #fff;
    border-radius: 2px;
}

.smartphone iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

/* Glass effect for the screen */
.smartphone .content::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 50%);
    pointer-events: none;
}

@media (max-width: 576px) {
    .smartphone {
        width: 260px;
        height: 520px;
    }
}

/* ============================================
   PORTFOLIO IFRAME WRAPPER
   ============================================ */

.portfolio-iframe-wrapper {
    position: relative;
    height: 250px;
    width: 100%;
    overflow: hidden;
    background: #f8f9fa;
    border-top-left-radius: inherit;
    border-top-right-radius: inherit;
}

.portfolio-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 333.33%;
    height: 333.33%;
    border: none;
    transform: scale(0.3);
    transform-origin: 0 0;
    pointer-events: none;
}

.iframe-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: 5;
    cursor: default;
}

@media (max-width: 1200px) {
    .portfolio-iframe-wrapper iframe {
        width: 333.33%;
        height: 333.33%;
        transform: scale(0.3);
    }
}

@media (max-width: 992px) {
    .portfolio-iframe-wrapper iframe {
        width: 250%;
        height: 250%;
        transform: scale(0.4);
    }
}

