/* Affinity Style Design */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,700&family=Inter:wght@400;500;600&display=swap');

body.affinity-theme {
    background-color: #000000;
    color: #ffffff;
    font-family: 'Inter', sans-serif;
}

.affinity-theme .navbar {
    background-color: rgba(0, 0, 0, 0.8) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.affinity-theme .navbar-brand,
.affinity-theme .nav-link,
.affinity-theme .btn-outline-warning {
    color: #ffffff !important;
}

.affinity-theme .navbar-brand .brand-text {
    color: #ffffff !important;
}

.affinity-theme .nav-link {
    color: #ffffff !important;
    transition: color 0.3s ease;
}

.affinity-theme .nav-link:hover,
.affinity-theme .nav-link.active {
    color: #a3e635 !important;
}

.affinity-theme .btn-outline-warning {
    color: #ffffff !important;
    border-color: #a3e635 !important;
}

.affinity-theme .btn-outline-warning:hover {
    background-color: #a3e635 !important;
    color: #000000 !important;
}

.affinity-hero-section {
    padding-top: 40px;
}

.affinity-hero {
    text-align: center;
    padding: 80px 20px 120px;
}

.affinity-hero h1 {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 4rem;
    font-weight: 700;
    margin-bottom: 20px;
    letter-spacing: -1px;
    color: #ffffff;
}

.gradient-text-animated {
    background: linear-gradient(-45deg, #ffffff, #a3a3a3, #a3e635, #ffffff);
    background-size: 300% 300%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-animation 6s ease infinite;
}

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

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

    100% {
        background-position: 0% 50%;
    }
}

.affinity-hero p {
    font-size: 1.2rem;
    color: #a0a0a0;
    max-width: 800px;
    margin: 0 auto 60px;
    line-height: 1.6;
}

.affinity-cards {
    display: flex;
    justify-content: center;
    gap: 30px;
    padding: 0 20px 80px;
    flex-wrap: wrap;
    perspective: 1000px;
    /* Enable 3D perspective */
}

/* Card Flip Styles */
.affinity-card-container {
    width: 100%;
    max-width: 600px;
    height: 350px;
    /* Shorter height for front view */
    position: relative;
    margin-bottom: 30px;
    transition: height 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.affinity-card-container.expanded {
    height: 500px;
    /* Expanded height for back view */
}

.affinity-card {
    background-color: #111;
    border-radius: 24px;
    width: 100%;
    height: 100%;
    position: relative;
    border: 1px solid #222;
    transition: transform 0.6s;
    transform-style: preserve-3d;
    display: flex;
    flex-direction: column;
}

.affinity-card.flipped {
    transform: rotateY(180deg);
}

.affinity-card-front,
.affinity-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    border-radius: 24px;
    overflow: hidden;
}

.affinity-card-front {
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
    /* Ensure front has a background */
    display: flex;
    flex-direction: column;
    z-index: 2;
    transform: rotateY(0deg);
    /* Explicitly set rotation */
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
}

.affinity-card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, rgba(163, 230, 53, 0.5), rgba(74, 222, 128, 0.4), rgba(163, 230, 53, 0.5));
    background-size: 200% 100%;
    animation: gradient-shift 4s ease infinite;
    border-radius: 24px 24px 0 0;
}

@keyframes gradient-shift {

    0%,
    100% {
        background-position: 0% 50%;
    }

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

/* Card Icon Wrapper */
.card-icon-wrapper {
    position: absolute;
    top: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    background: rgba(163, 230, 53, 0.08);
    border: 1px solid rgba(163, 230, 53, 0.15);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.card-icon-wrapper i {
    font-size: 1.5rem;
    color: rgba(163, 230, 53, 0.6);
}

.card-icon-wrapper.card-icon-hizmetler {
    background: rgba(96, 165, 250, 0.08);
    border-color: rgba(96, 165, 250, 0.15);
}

.card-icon-wrapper.card-icon-hizmetler i {
    color: rgba(96, 165, 250, 0.6);
}

/* Card Tags */
.card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.card-tag {
    display: inline-block;
    padding: 6px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    font-size: 0.8rem;
    color: #a0a0a0;
    transition: all 0.2s ease;
}

.card-tag:hover {
    background: rgba(163, 230, 53, 0.1);
    border-color: rgba(163, 230, 53, 0.3);
    color: #a3e635;
}

.affinity-card-back {
    background-color: #1a1a1a;
    transform: rotateY(180deg);
    display: flex;
    flex-direction: column;
    padding: 40px;
    border: 1px solid #333;
    z-index: 1;
    /* Ensure back is behind initially */
}

/* Back Content Styles */
.affinity-card-back-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 2rem;
    color: #fff;
    margin-bottom: 20px;
}

.affinity-card-list {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    /* Center list items vertically */
}

.affinity-card-list li {
    margin-bottom: 12px;
}

.affinity-card-list a {
    color: #ccc;
    text-decoration: none;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.2s;
    background-color: rgba(255, 255, 255, 0.05);
}

.affinity-card-list a:hover {
    background-color: #a3e635;
    color: #000;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(163, 230, 53, 0.3);
    border-color: #a3e635;
}

.glow-input:focus {
    box-shadow: 0 0 20px rgba(163, 230, 53, 0.15) !important;
    border-color: #a3e635 !important;
    background-color: #0a0a0a !important;
}

/* Tech Marquee */
.tech-marquee-section {
    padding: 60px 0;
    overflow: hidden;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(163, 230, 53, 0.03), rgba(0, 0, 0, 0));
}

.tech-marquee-track {
    display: flex;
    gap: 4rem;
    width: max-content;
    animation: marquee-scroll 40s linear infinite;
}

/* Pause on hover if desired */
.tech-marquee-section:hover .tech-marquee-track {
    animation-play-state: paused;
}

.tech-item {
    font-size: 2.5rem;
    color: rgba(163, 230, 53, 0.4);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hover-effect {
    transition: all 0.2s ease;
}

.hover-effect:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border-color: #a3e635 !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(163, 230, 53, 0.2);
}

.tech-item:hover {
    color: #a3e635;
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px rgba(163, 230, 53, 0.4));
}

@keyframes marquee-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.affinity-card-list a i {
    margin-right: 15px;
    width: 24px;
    text-align: center;
    font-size: 1.2rem;
}

/* Close Button on Back */
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s;
    z-index: 10;
}

.close-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Existing Styles with Modifications */
.affinity-card:hover {
    /* Removed transform on hover to avoid conflict with flip */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    border-color: #333;
}

.affinity-card-content {
    padding: 40px;
    z-index: 2;
    position: relative;
    flex-grow: 1;
    /* Ensure content takes space */
}

.affinity-card-subtitle {
    font-size: 1rem;
    font-weight: 500;
    color: #fff;
    margin-bottom: 10px;
    display: block;
}

.affinity-card-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1;
    color: #ffffff;
}

.affinity-card-desc {
    color: #888;
    margin-bottom: 30px;
    font-size: 1rem;
    line-height: 1.5;
}

.affinity-btn {
    display: inline-flex;
    align-items: center;
    padding: 12px 24px;
    background-color: #a3e635;
    /* Lime green like the image */
    color: #000;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.affinity-btn:hover {
    background-color: #84cc16;
    color: #000;
}

.affinity-btn i {
    margin-right: 8px;
}

.affinity-card-image {
    width: 100%;
    height: 100%;
    /* Cover full height */
    object-fit: cover;
    mask-image: linear-gradient(to bottom, transparent 0%, black 60%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 60%);
    opacity: 0.5;
    transition: opacity 0.3s;
    position: absolute;
    /* Changed to absolute to fit in front face */
    bottom: 0;
    left: 0;
    z-index: 1;
}

.affinity-card:hover .affinity-card-image {
    opacity: 0.8;
}

.plus-btn {
    position: absolute;
    bottom: 30px;
    right: 30px;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(163, 230, 53, 0.15);
    color: rgba(163, 230, 53, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(163, 230, 53, 0.25);
    z-index: 10;
}

.plus-btn:hover {
    background: rgba(163, 230, 53, 0.25);
    color: rgba(163, 230, 53, 0.9);
    transform: scale(1.05) rotate(90deg);
    border-color: rgba(163, 230, 53, 0.4);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .affinity-hero h1 {
        font-size: 2.5rem;
    }

    .affinity-card-title {
        font-size: 2rem;
    }

    .affinity-cards {
        flex-direction: column;
        align-items: center;
    }

    .affinity-card-container {
        height: 380px;
        /* Slightly taller for mobile front */
        max-width: 100%;
        /* Full width on mobile */
    }

    .affinity-card-container.expanded {
        height: 550px;
        /* Expanded height for mobile back */
    }

    .affinity-card-content {
        padding: 30px;
    }
}

/* Footer overrides for Affinity Theme */
.affinity-theme footer hr {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

.affinity-theme footer p.text-muted,
.affinity-theme footer a.link-secondary span {
    color: rgba(255, 255, 255, 0.5) !important;
}

.affinity-theme footer a.link-secondary:hover span {
    color: #ffffff !important;
}

/* Promo Banner Style (Lavender) */
.affinity-promo-banner {
    background-color: #e0ccff;
    border-radius: 32px;
    padding: 60px 80px;
    position: relative;
    overflow: hidden;
    color: #000;
    margin: 80px 0;
    display: flex;
    align-items: center;
    min-height: 400px;
    z-index: 1;
}

.affinity-promo-content {
    position: relative;
    z-index: 2;
    max-width: 550px;
}

.affinity-promo-title {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.1;
    color: #000;
}

.affinity-promo-desc {
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 30px;
    font-weight: 500;
}

.affinity-promo-img-container {
    position: absolute;
    right: 20px;
    top: 0;
    bottom: 0;
    width: 45%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 1;
}

.affinity-promo-img-container img {
    max-width: 100%;
    max-height: 90%;
    object-fit: contain;
    transform: none;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.15));
}

@media (max-width: 992px) {
    .affinity-promo-banner {
        flex-direction: column;
        text-align: center;
        padding: 40px 20px;
        overflow: hidden;
    }

    .affinity-promo-content {
        max-width: 100%;
        margin-bottom: 40px;
    }

    .affinity-promo-img-container {
        position: relative;
        right: auto;
        bottom: auto;
        width: 100%;
        height: 300px;
        transform: none;
    }

    .affinity-promo-img-container img {
        transform: none;
        max-height: 100%;
    }
}

/* Affinity Dropdown Styles (Image Match) */
.affinity-card .dropdown-menu {
    background-color: #000000;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 8px;
    min-width: 240px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
    margin-top: 10px !important;
}

.affinity-card .dropdown-item {
    color: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
}

.affinity-card .dropdown-item:hover,
.affinity-card .dropdown-item:focus {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

.affinity-card .dropdown-divider {
    border-top-color: rgba(255, 255, 255, 0.15);
    margin: 8px 0;
}


/* Search Result Styles (Moved from index.php) */
#searchInput::placeholder {
    color: #6c757d;
}

#searchInput:focus {
    background-color: #000 !important;
    border-color: #a3e635 !important;
}

.search-result-item {
    padding: 15px;
    border-bottom: 1px solid #333;
    transition: background-color 0.2s;
    display: block;
    text-decoration: none;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #2d2d2d;
}

.search-result-title {
    color: #a3e635;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
}

.search-result-desc {
    color: #9ca3af;
    font-size: 0.9rem;
    display: block;
}