@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

/* Global variables & Theme definitions */
:root {
    --primary: #0F52BA;        /* Sapphire corporate blue */
    --primary-rgb: 15, 82, 186;
    --accent: #E31E24;         /* Red accent from the logo */
    --accent-rgb: 227, 30, 36;
    --font-sans: 'Outfit', sans-serif;
    
    /* Day Mode (Default) Colors */
    --bg-main: #F4F7FB;
    --bg-card: #FFFFFF;
    --bg-nav: rgba(255, 255, 255, 0.85);
    --bg-widget: #FFFFFF;
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border: #E2E8F0;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.08);
    --glow: rgba(15, 82, 186, 0.15);
    --card-glow: rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] {
    /* Night Mode Colors */
    --bg-main: #0A0F1D;
    --bg-card: #131A2E;
    --bg-nav: rgba(19, 26, 46, 0.85);
    --bg-widget: #131A2E;
    --text-main: #F1F5F9;
    --text-muted: #94A3B8;
    --border: #1E294B;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    --glow: rgba(15, 82, 186, 0.4);
    --card-glow: rgba(15, 82, 186, 0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-main);
    color: var(--text-main);
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Preloader Splash Screen */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #0A0F1D; /* Always dark for maximum contrast of the glowing logo */
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: transform 0.8s cubic-bezier(0.77, 0, 0.175, 1), opacity 0.8s ease;
}

#preloader.fade-out {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.preloader-content {
    text-align: center;
    animation: zoomPulse 2s ease-in-out infinite alternate;
}

.preloader-logo {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    box-shadow: 0 0 40px rgba(15, 82, 186, 0.6);
    border: 3px solid var(--primary);
    margin-bottom: 20px;
}

.preloader-slogan {
    color: #FFFFFF;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 4px;
    margin-top: 10px;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(15, 82, 186, 0.8);
}

.preloader-spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 1s ease-in-out infinite;
    margin: 20px auto 0;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes zoomPulse {
    0% { transform: scale(0.96); }
    100% { transform: scale(1.04); }
}

/* Layout Grid */
.site-wrapper {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Header & Navbar */
header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: var(--bg-nav);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    transition: background-color 0.4s, border-color 0.4s;
}

.navbar {
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-main);
}

.brand-logo {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    transition: transform 0.3s ease;
}

.nav-brand:hover .brand-logo {
    transform: rotate(360deg);
}

.brand-info {
    display: flex;
    flex-direction: column;
}

.brand-name {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.brand-slogan {
    font-size: 0.7rem;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-top: 4px;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    gap: 8px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-main);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 16px;
    right: 16px;
    height: 2px;
    background-color: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-link:hover {
    color: var(--primary);
    background-color: rgba(var(--primary-rgb), 0.05);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
}

.nav-link.active {
    color: var(--primary);
    font-weight: 600;
}

/* Utilities Panel (Theme switcher, etc.) */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 15px;
}

.btn-theme {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.btn-theme:hover {
    background-color: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--glow);
}

.btn-theme .icon-sun { display: none; }
.btn-theme .icon-moon { display: block; }
[data-theme="dark"] .btn-theme .icon-sun { display: block; }
[data-theme="dark"] .btn-theme .icon-moon { display: none; }

.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
}

.menu-toggle span {
    width: 25px;
    height: 3px;
    background-color: var(--text-main);
    border-radius: 2px;
    transition: 0.3s;
}

/* Container & Columns Setup */
.main-container {
    max-width: 1400px;
    margin: 90px auto 40px;
    padding: 0 30px;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 30px;
    flex-grow: 1;
}

/* Left Sidebar Widgets */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

.widget {
    background-color: var(--bg-widget);
    border-radius: 16px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    padding: 20px;
    transition: all 0.3s ease;
    overflow: hidden;
}

.widget:hover {
    box-shadow: var(--shadow-md);
    border-color: rgba(var(--primary-rgb), 0.3);
}

.widget-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 2px solid var(--border);
    padding-bottom: 8px;
}



/* Visitor Counter Widget */
.visitor-counter {
    text-align: center;
}

.counter-display {
    background: radial-gradient(circle, var(--bg-main) 0%, rgba(var(--primary-rgb), 0.05) 100%);
    border: 1px dashed var(--primary);
    padding: 15px;
    border-radius: 12px;
    font-family: monospace;
    font-size: 1.6rem;
    font-weight: bold;
    color: var(--primary);
    letter-spacing: 2px;
    box-shadow: inset var(--shadow-sm);
}

.visitor-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Scrolling Announcements Widget (Duyurular) */
.announcements-widget {
    height: 350px;
    display: flex;
    flex-direction: column;
}

.marquee-container {
    flex-grow: 1;
    overflow: hidden;
    position: relative;
    mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 15%, black 85%, transparent 100%);
}

.marquee-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    position: absolute;
    width: 100%;
    animation: scrollAnnouncements 25s linear infinite;
}

.marquee-content:hover {
    animation-play-state: paused;
}

@keyframes scrollAnnouncements {
    0% { transform: translateY(0%); }
    100% { transform: translateY(-50%); } /* Assume double list for seamless loop */
}

.announcement-card {
    background-color: rgba(var(--primary-rgb), 0.02);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-top: 1px solid var(--border);
    border-right: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.announcement-card:hover {
    background-color: rgba(var(--primary-rgb), 0.06);
    transform: translateY(-2px);
}

.announcement-date {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
    margin-bottom: 4px;
}

.announcement-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.3;
}

.announcement-desc {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 4px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Main Content Area */
.content-area {
    display: flex;
    flex-direction: column;
    gap: 50px;
}

/* Sections Base Styling */
section {
    background-color: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    padding: 40px;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
}

section:hover {
    box-shadow: var(--shadow-md);
}

.section-header {
    border-bottom: 2px solid var(--border);
    padding-bottom: 15px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--primary);
    position: relative;
    padding-left: 15px;
}

.section-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 5px;
    bottom: 5px;
    width: 5px;
    background-color: var(--accent);
    border-radius: 4px;
}

/* Hero Banner Section (Anasayfa) */
.hero-section {
    position: relative;
    height: 480px;
    border-radius: 24px;
    overflow: hidden;
    padding: 0;
    display: flex;
    align-items: center;
    background-color: #0A0F1D; /* Dark base for glow */
    border: none;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(10, 15, 29, 0.9) 0%, rgba(10, 15, 29, 0.6) 50%, rgba(10, 15, 29, 0.2) 100%);
    z-index: 2;
}

.hero-img {
    position: absolute;
    right: 0;
    top: 0;
    width: 60%;
    height: 100%;
    object-fit: cover;
    opacity: 0.75;
    mask-image: linear-gradient(to left, black 60%, transparent 100%);
    -webkit-mask-image: linear-gradient(to left, black 60%, transparent 100%);
}

.hero-content {
    position: relative;
    z-index: 3;
    max-width: 600px;
    padding: 50px;
    color: white;
}

.hero-slogan-wrap {
    background-color: rgba(var(--accent-rgb), 0.1);
    border: 1px solid rgba(var(--accent-rgb), 0.3);
    color: #FF5A5F;
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.hero-title {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #FFF 60%, #93c5fd 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title span {
    color: var(--primary);
    background: linear-gradient(135deg, #60a5fa, #3b82f6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-desc {
    font-size: 1.1rem;
    color: #94A3B8;
    margin-bottom: 30px;
    font-weight: 300;
}

.hero-actions {
    display: flex;
    gap: 15px;
}

/* Modern Buttons */
.btn-primary, .btn-secondary {
    padding: 12px 28px;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
}

.btn-primary {
    background-color: var(--primary);
    color: #FFFFFF;
    box-shadow: 0 4px 14px rgba(15, 82, 186, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(15, 82, 186, 0.6);
}

.btn-secondary {
    background-color: rgba(255, 255, 255, 0.1);
    color: #FFFFFF;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

/* Firmamız Section */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 40px;
    align-items: center;
}

.about-img-wrap {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.about-img-wrap::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, transparent 50%, rgba(var(--primary-rgb), 0.2) 100%);
}

.about-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.about-grid:hover .about-img {
    transform: scale(1.05);
}

.about-text {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.about-highlight {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
}

.about-body {
    color: var(--text-muted);
}

/* Faaliyet Alanı (Services) & References Grid */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.card {
    background-color: rgba(var(--primary-rgb), 0.02);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.165, 0.84, 0.44, 1);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.card:hover {
    transform: translateY(-6px);
    border-color: rgba(var(--primary-rgb), 0.4);
    box-shadow: var(--shadow-md), 0 0 15px var(--card-glow);
}

.card-img-wrap {
    position: relative;
    overflow: hidden;
    height: 190px;
}

.card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s;
}

.card:hover .card-img {
    transform: scale(1.08);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-main);
}

.card-desc {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.5;
}

/* Belgelerimiz (Certificates) Grid */
.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.doc-item {
    background-color: var(--bg-main);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.doc-item:hover {
    transform: scale(1.03);
    border-color: var(--primary);
    box-shadow: var(--shadow-md);
}

.doc-img-wrap {
    height: 220px;
    overflow: hidden;
    border-radius: 8px;
    background-color: #FFF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.doc-img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.doc-title {
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-main);
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
}

/* Çözüm Ortakları (Partners) Grid */
.partners-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.partner-card {
    background-color: #FFFFFF;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100px;
    transition: all 0.3s;
}

[data-theme="dark"] .partner-card {
    background-color: #1A2338;
}

.partner-card:hover {
    transform: translateY(-4px);
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.partner-logo {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    filter: grayscale(80%);
    opacity: 0.7;
    transition: all 0.3s;
}

.partner-card:hover .partner-logo {
    filter: grayscale(0%);
    opacity: 1;
}

/* İletişim (Contact) Section */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 40px;
}

.contact-info-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.contact-info-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.contact-icon {
    width: 48px;
    height: 48px;
    background-color: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.contact-details {
    display: flex;
    flex-direction: column;
}

.contact-label {
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.contact-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    margin-top: 2px;
}

.contact-map-wrap {
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid var(--border);
    height: 300px;
}

.contact-map-wrap iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Modal Popup Window */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(5px);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: var(--bg-card);
    border-radius: 20px;
    border: 1px solid var(--border);
    max-width: 600px;
    width: 100%;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    position: relative;
    animation: modalShow 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes modalShow {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.05);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.2rem;
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s;
    z-index: 10;
}

.modal-close:hover {
    background-color: var(--accent);
    color: white;
}

.modal-body {
    padding: 30px;
}

.modal-img-wrap {
    height: 250px;
    width: 100%;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 20px;
    background-color: var(--bg-main);
}

.modal-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-title {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 10px;
}

.modal-text {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Footer Section */
footer {
    background-color: #0A0F1D;
    color: #94A3B8;
    padding: 40px 30px;
    border-top: 1px solid #1E294B;
    text-align: center;
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.footer-logo {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: 2px solid var(--primary);
}

.footer-text {
    font-size: 0.9rem;
}

.footer-copy {
    font-size: 0.8rem;
    color: #64748B;
    margin-top: 10px;
}

/* Mobile & Tablet Responsive Adaptations */
@media (max-width: 1024px) {
    .main-container {
        grid-template-columns: 1fr;
        margin-top: 80px;
    }
    
    .sidebar {
        order: 2; /* Move sidebar below main content on tablet */
    }
    
    .content-area {
        order: 1;
    }
}

@media (max-width: 768px) {
    .navbar {
        padding: 10px 20px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background-color: var(--bg-card);
        flex-direction: column;
        align-items: center;
        padding: 40px 20px;
        transition: left 0.4s ease;
        border-top: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
    }
    
    .nav-menu.open {
        left: 0;
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: 12px 24px;
        width: 100%;
        text-align: center;
    }
    
    .hero-section {
        height: auto;
        min-height: 400px;
    }
    
    .hero-img {
        width: 100%;
        opacity: 0.35;
    }
    
    .hero-content {
        padding: 30px 20px;
    }
    
    .hero-title {
        font-size: 2.2rem;
    }
    
    .about-grid, .contact-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .about-img {
        height: 280px;
    }
    
    section {
        padding: 25px;
    }
}
