/* Kor Bilişim Custom Styles */
@import url('/css/palette.css');
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Poppins:wght@400;500;600;700&display=swap');

/* Base styles */
body {
    font-family: 'Inter', sans-serif;
    background-color: var(--color-neutral-50);
    color: var(--color-neutral-800);
}

.font-poppins {
    font-family: 'Poppins', sans-serif;
}

/* Smooth scrolling for the whole page */
html {
    scroll-behavior: smooth;
}

/* Custom animation for feature images */
.feature-image-hover {
    transition: transform 0.5s ease;
}
.feature-image-hover:hover {
    transform: scale(1.05);
}

/* Custom scrollbar using palette colors */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--color-neutral-100);
}
::-webkit-scrollbar-thumb {
    background: var(--color-primary-500);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-primary-600);
}

/* Additional utility classes using palette */
.bg-primary-500 {
    background-color: var(--color-primary-500);
}
.bg-primary-600 {
    background-color: var(--color-primary-600);
}
.bg-primary-700 {
    background-color: var(--color-primary-700);
}
.text-primary-600 {
    color: var(--color-primary-600);
}
.text-primary-700 {
    color: var(--color-primary-700);
}
.border-primary-300 {
    border-color: var(--color-primary-300);
}
.bg-neutral-50 {
    background-color: var(--color-neutral-50);
}
.bg-neutral-900 {
    background-color: var(--color-neutral-900);
}
.text-neutral-600 {
    color: var(--color-neutral-600);
}
.text-neutral-300 {
    color: var(--color-neutral-300);
}

/* Markdown content styling */
.markdown-content {
    font-family: 'Inter', sans-serif;
    line-height: 1.7;
    color: var(--color-neutral-800);
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--color-neutral-900);
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.markdown-content h1 {
    font-size: 2.5rem;
    line-height: 1.2;
}

.markdown-content h2 {
    font-size: 2rem;
    line-height: 1.3;
    border-bottom: 2px solid var(--color-primary-200);
    padding-bottom: 0.5rem;
}

.markdown-content h3 {
    font-size: 1.5rem;
    line-height: 1.4;
}

.markdown-content p {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    line-height: 1.7;
}

.markdown-content ul,
.markdown-content ol {
    margin-bottom: 1.5rem;
    padding-left: 1.5rem;
}

.markdown-content li {
    margin-bottom: 0.5rem;
}

.markdown-content blockquote {
    border-left: 4px solid var(--color-primary-500);
    padding-left: 1.5rem;
    font-style: italic;
    background-color: var(--color-neutral-50);
    padding: 1.5rem;
    border-radius: 0 0.5rem 0.5rem 0;
    margin: 2rem 0;
}

.markdown-content a {
    color: var(--color-primary-600);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.3s ease;
}

.markdown-content a:hover {
    color: var(--color-primary-800);
    text-decoration: underline;
}

.markdown-content code {
    background-color: var(--color-neutral-100);
    padding: 0.2rem 0.4rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
    font-size: 0.9em;
}

.markdown-content pre {
    background-color: var(--color-neutral-900);
    color: var(--color-neutral-100);
    padding: 1.5rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1.5rem 0;
}

.markdown-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin: 1.5rem 0;
}

/* Override Tailwind colors with palette variables */
.bg-blue-600 {
    background-color: var(--color-primary-600) !important;
}
.bg-blue-700 {
    background-color: var(--color-primary-700) !important;
}
.text-blue-600 {
    color: var(--color-primary-600) !important;
}
.text-blue-300 {
    color: var(--color-primary-300) !important;
}
[class*="border-blue-500/30"] {
    border-color: rgba(var(--color-primary-500-rgb), 0.3) !important;
}
[class*="bg-blue-600/20"] {
    background-color: rgba(var(--color-primary-600-rgb), 0.2) !important;
}
.bg-gray-50 {
    background-color: var(--color-neutral-50) !important;
}
.bg-gray-900 {
    background-color: var(--color-neutral-900) !important;
}
.text-gray-600 {
    color: var(--color-neutral-600) !important;
}
.text-gray-800 {
    color: var(--color-neutral-800) !important;
}
.text-gray-200 {
    color: var(--color-neutral-200) !important;
}
.text-gray-300 {
    color: var(--color-neutral-300) !important;
}
.text-gray-500 {
    color: var(--color-neutral-500) !important;
}
.border-gray-100 {
    border-color: var(--color-neutral-100) !important;
}
.bg-gray-800 {
    background-color: var(--color-neutral-800) !important;
}

/* Background gradients */
.bg-gradient-hero {
    position: relative;
    overflow: hidden;
    background-color: var(--color-primary-900);
}
.bg-gradient-cta {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary-800) 0%, var(--color-primary-900) 50%, var(--color-primary-700) 100%);
}
.bg-gradient-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.6;
}

/* Hero slideshow */
.hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    opacity: 0;
    animation: hero-slideshow 16s infinite;
}

.hero-slide-1 {
    background-image: url('/images/slide/slide04.jpg');
    animation-delay: 0s;
}

.hero-slide-2 {
    background-image: url('/images/slide/slide05.jpg');
    animation-delay: 8s;
}

@keyframes hero-slideshow {
    0% {
        opacity: 0;
    }
    25% {
        opacity: 1;
    }
    50% {
        opacity: 0;
    }
    100% {
        opacity: 0;
    }
}

/* Utility classes */
.transition-all-300 {
    transition: all 0.3s ease;
}
.shadow-soft {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.shadow-hover:hover {
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

/* Fix for code block display issues - exclude MathJax elements */
.markdown-content pre:not(.MathJax),
.markdown-content code:not(.MathJax),
article pre:not(.MathJax),
article code:not(.MathJax),
.content pre:not(.MathJax),
.content code:not(.MathJax) {
    display: block;
    background: #1a1a1a;
    color: #f8f8f2;
    padding: 1em;
    border-radius: 0.5em;
    overflow-x: auto;
    white-space: pre;
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.95em;
    line-height: 1.5;
    margin: 1.5em 0;
}

/* Inline code - exclude MathJax */
.markdown-content code:not(pre code):not(.MathJax),
article code:not(pre code):not(.MathJax),
.content code:not(pre code):not(.MathJax) {
    display: inline;
    padding: 0.2em 0.4em;
    background: #2d2d2d;
    color: #f8f8f2;
    border-radius: 0.3em;
    font-size: 0.9em;
}

/* Ensure code blocks are not affected by flexbox */
.markdown-content,
article .content,
.content {
    display: block;
}

/* Make sure the background is dark for code blocks */
pre code:not(.MathJax) {
    background: transparent;
    color: inherit;
}

/* KaTeX styles */
.katex {
    font-size: 1.1em;
}
.katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    margin: 1.5em 0;
    text-align: center;
}
.katex-display > .katex {
    display: inline-block;
    white-space: nowrap;
}
/* Ensure math doesn't break line heights */
.katex-html {
    line-height: 1.2;
}
/* Math inside lists */
li .katex,
li .katex-display {
    margin: 0.5em 0;
}
li .katex-display {
    text-align: left;
    margin-left: 0;
}
/* Prevent list items from breaking math */
li {
    overflow-wrap: break-word;
}

/* Custom styles for hakkimizda page */
/* Style images in hakkimizda page */
.servisler-content img, .hakkimizda-content img {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    display: block;
    border-radius: 10%;
    box-shadow: 1px 1px #777777;
    margin: 1rem 0;
}

@media (min-width: 768px) {
    .servisler-content img, .hakkimizda-content img {
        border-radius: 0;
        border-top-left-radius: 10%;
        border-bottom-left-radius: 10%;
        margin-right: -50px !important;
        border-right: 5px solid #314f67;
        float: right;
        display: block;
        width: 300px;
        height: 300px;
        margin-top: 0;
        margin-bottom: 10px;
        margin-left: 10px;
        object-fit: cover;
    }
}

.image-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin: 3rem 0;
}

@media (min-width: 768px) {
    .image-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.image-grid-item {
    width: 100%;
    height: 16rem;
    object-fit: cover;
    border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 0.5rem;
}

.image-grid + .highlight-box {
    margin-top: 3rem;
}

.highlight-box {
    background: linear-gradient(to bottom right, #eff6ff, #e0e7ff);
    border-left: 4px solid #3b82f6;
    border-radius: 0 1rem 1rem 0;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    margin: 2rem 0;
}

@media (min-width: 768px) {
    .highlight-box {
        padding: 3rem;
    }
}

.highlight-box::before,
.highlight-box::after {
    content: '';
    position: absolute;
    width: 2rem;
    height: 2rem;
    border: 2px solid #93c5fd;
}

.highlight-box::before {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
    border-radius: 0.5rem 0 0 0;
}

.highlight-box::after {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
    border-radius: 0 0 0.5rem 0;
}

.highlight-box h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.875rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 10;
}

@media (min-width: 768px) {
    .highlight-box h2 {
        font-size: 2.25rem;
    }
}

.highlight-box p {
    color: #374151;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
    position: relative;
    z-index: 10;
}

.highlight-box a {
    color: #2563eb;
    font-weight: 600;
}

.highlight-box a:hover {
    color: #1e40af;
    text-decoration: underline;
}

/* Global h1 heading styles */
h1 {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    color: var(--color-neutral-900);
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--color-primary-300);
    position: relative;
    font-size: 2rem;
    line-height: 1.3;
    letter-spacing: -0.025em;
}

h1::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background-color: var(--color-primary-600);
}

/* Adjust for first h1 in a section */
h1:first-child {
    margin-top: 0;
}

/* Make h1 in hero sections light */
.bg-gradient-hero h1 {
    color: white !important;
    border-bottom: none;
    padding-bottom: 0;
}
.bg-gradient-hero h1::after {
    display: none;
}

/* CTA heading styles */
.bg-gradient-cta h2 {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    position: relative;
}

/* Make h1 smaller inside content areas - now handled by Tailwind classes */

/* Global h2 heading styles */
h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--color-neutral-900);
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--color-primary-300);
    position: relative;
}

h2::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background-color: var(--color-primary-600);
}

/* Adjust for first heading in a section */
h2:first-child {
    margin-top: 0;
}

/* Adjust for highlight-box h2 to not conflict */
.highlight-box h2 {
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0;
}

.highlight-box h2::after {
    display: none;
}

/* Keep .section-heading for backward compatibility */
.section-heading {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: var(--color-neutral-900);
    margin-top: 2rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--color-primary-300);
    position: relative;
}

.section-heading::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 100px;
    height: 3px;
    background-color: var(--color-primary-600);
}

.section-heading:first-child {
    margin-top: 0;
}

.highlight-box .section-heading {
    border-bottom: none;
    padding-bottom: 0;
    margin-top: 0;
}

.highlight-box .section-heading::after {
    display: none;
}

/* Fixed background with tiled pattern for far distance effect */
.bg-fixed-cover {
    position: relative;
    background-attachment: fixed;
    background-size: 300px auto; /* Adjust tile size as needed */
    background-repeat: repeat;
    background-position: center;
}

/* On smaller screens, use smaller tiles for better effect */
@media (max-width: 768px) {
    .bg-fixed-cover {
        background-size: 150px auto;
    }
}

/* Enhanced bg-fixed-cover with overlay support */
.bg-fixed-cover::before {
    content: '';
    position: absolute;
    inset: 0;
    background-color: rgba(255, 255, 255, 0.7); /* bg-white/70 */
    z-index: 1;
}

.bg-fixed-cover > * {
    position: relative;
    z-index: 2;
}

/* Reusable pattern for content sections with tiled background and overlay */
.section-tiled-bg {
    position: relative;
}

/* Scroll animation classes */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px) scale(0.95);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.scroll-animate.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Staggered animation delays */
.scroll-animate.delay-100 { transition-delay: 0.1s; }
.scroll-animate.delay-200 { transition-delay: 0.2s; }
.scroll-animate.delay-300 { transition-delay: 0.3s; }
.scroll-animate.delay-400 { transition-delay: 0.4s; }
.scroll-animate.delay-500 { transition-delay: 0.5s; }

/* CTA section animation */
.bg-gradient-cta {
    animation: fadeInUp 0.8s ease-out;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, 
        var(--color-accent-teal) 0%, 
        var(--color-primary-700) 50%, 
        var(--color-accent-amber) 100%);
}
.bg-gradient-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, 
        var(--color-accent-teal) 0%, 
        var(--color-primary-700) 25%, 
        var(--color-accent-teal) 50%, 
        var(--color-primary-700) 75%, 
        var(--color-accent-teal) 100%);
    background-size: 200% 100%;
    animation: gradient-shift 60s ease infinite;
    z-index: 1;
    opacity: 0.7;
}
.bg-gradient-cta > * {
    position: relative;
    z-index: 2;
}
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.section-tiled-bg .bg-tiled-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-attachment: fixed;
    background-size: 300px auto;
    background-repeat: repeat;
    background-position: center;
    background-image: url('/images/bg/bg15.jpg');
}

.section-tiled-bg .bg-tiled-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: rgba(255, 255, 255, 0.85); /* bg-white/85 */
}

.section-tiled-bg .bg-tiled-content {
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .section-tiled-bg .bg-tiled-image {
        background-size: 150px auto;
    }
    .bg-fixed-cover {
        background-size: 150px auto;
    }
}

/* CTA button hover colors */
.bg-gradient-cta a.bg-white {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}
.bg-gradient-cta a.bg-white:hover {
    background-color: var(--color-primary-100) !important;
    color: var(--color-primary-800) !important;
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2) !important;
}
.bg-gradient-cta a.bg-white::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
    opacity: 0;
    border-radius: 100%;
    transform: scale(1, 1) translate(-50%);
    transform-origin: 50% 50%;
}
.bg-gradient-cta a.bg-white:hover::after {
    animation: ripple 1s ease-out;
}
@keyframes ripple {
    0% {
        transform: scale(0, 0);
        opacity: 0.5;
    }
    100% {
        transform: scale(20, 20);
        opacity: 0;
    }
}

/* Animated gradient background */
.bg-gradient-animated {
    background: linear-gradient(90deg, 
        var(--color-primary-600) 0%, 
        var(--color-primary-700) 25%, 
        var(--color-primary-600) 50%, 
        var(--color-primary-700) 75%, 
        var(--color-primary-600) 100%);
    background-size: 200% 100%;
    animation: gradient-shift 60s ease infinite;
    position: relative;
}

/* Shimmer animation */
.animate-shimmer {
    animation: shimmer 30s infinite linear;
}

/* Keyframes for gradient shift */
@keyframes gradient-shift {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Keyframes for shimmer effect */
@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Utility classes */
.bg-size-200 {
    background-size: 200% 100%;
}

/* Ensure hover utilities work with transitions */
[class*="hover:scale-105"]:hover {
    transform: scale(1.05);
}

[class*="hover:shadow-2xl"]:hover {
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Make sure transform is included in transition for scale effect */
.transition-all-300 {
    transition: all 0.3s ease;
    will-change: transform, box-shadow;
}

/* Service box hover effects */
[class*="hover:-translate-y-2"]:hover {
    transform: translateY(-0.5rem);
}

/* Contact button gradient */
.btn-contact-gradient {
    background: linear-gradient(90deg, var(--color-primary-600) 0%, var(--color-primary-700) 100%);
    transition: all 0.3s ease;
}
.btn-contact-gradient:hover {
    background: linear-gradient(90deg, var(--color-primary-700) 0%, var(--color-primary-800) 100%);
    transform: scale(1.05);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

/* Amber color override */
.bg-amber-600 {
    background-color: var(--color-accent-amber) !important;
}

/* Hugo theme specific */
.container {
    max-width: 1280px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1rem;
    padding-right: 1rem;
}
