/* ==========================================================================
   fizoapps - Design System & Custom Stylesheet
   ========================================================================== */

/* 1. Global Variables & Color Palette */
:root {
    --bg-primary: hsl(224, 71%, 4%);
    --bg-secondary: hsl(222, 54%, 7%);
    --bg-tertiary: hsl(220, 40%, 10%);
    
    --card-bg: rgba(15, 23, 42, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-glow: rgba(0, 242, 254, 0.05);

    --text-primary: hsl(210, 40%, 98%);
    --text-secondary: hsl(215, 20%, 65%);
    --text-muted: hsl(215, 15%, 45%);

    --color-cyan: hsl(180, 100%, 50%);
    --color-cyan-glow: rgba(0, 255, 255, 0.2);
    --color-purple: hsl(270, 100%, 60%);
    --color-purple-glow: rgba(127, 0, 255, 0.2);
    --color-white: #ffffff;
    
    --grad-primary: linear-gradient(135deg, hsl(180, 100%, 50%) 0%, hsl(200, 100%, 50%) 50%, hsl(270, 100%, 60%) 100%);
    --grad-text: linear-gradient(135deg, #00f2fe 0%, #4facfe 50%, #7f00ff 100%);
    --grad-btn: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%);
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    
    --shadow-premium: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --backdrop-blur: 16px;
}

/* 2. Reset & Base Settings */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

/* 3. Ambient Background Effects */
.ambient-glow {
    position: absolute;
    width: 60vw;
    height: 60vw;
    border-radius: 50%;
    filter: blur(160px);
    opacity: 0.15;
    z-index: -1;
    pointer-events: none;
}

.glow-1 {
    top: -10%;
    left: -20%;
    background: radial-gradient(circle, var(--color-cyan) 0%, transparent 70%);
}

.glow-2 {
    top: 40%;
    right: -25%;
    background: radial-gradient(circle, var(--color-purple) 0%, transparent 70%);
}

.glow-3 {
    bottom: -10%;
    left: 10%;
    background: radial-gradient(circle, var(--color-cyan) 0%, transparent 70%);
}

/* 4. Typography & Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-white);
    line-height: 1.25;
}

.gradient-text {
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* 5. Utility Components */
/* Glassmorphism Cards */
.glass-card {
    background: var(--card-bg);
    backdrop-filter: blur(var(--backdrop-blur));
    -webkit-backdrop-filter: blur(var(--backdrop-blur));
    border: 1px solid var(--card-border);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-premium);
    transition: var(--transition-normal);
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.15);
    box-shadow: 0 12px 40px 0 rgba(0, 242, 254, 0.05);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    border-radius: var(--border-radius-sm);
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: var(--grad-btn);
    color: var(--bg-primary);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 242, 254, 0.5);
    color: var(--bg-primary);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-2px);
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* Badges & Accents */
.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 242, 254, 0.08);
    border: 1px solid rgba(0, 242, 254, 0.2);
    color: var(--color-cyan);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 24px;
    font-family: var(--font-heading);
}

.pulse {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--color-cyan);
    border-radius: 50%;
    margin-right: 8px;
    box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 242, 254, 0.7);
    }
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 6px rgba(0, 242, 254, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(0, 242, 254, 0);
    }
}

/* 6. Navigation Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.5);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-normal);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--color-white);
}

.logo-icon {
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.logo-text span {
    color: var(--color-cyan);
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
    position: relative;
    padding: 6px 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--color-white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--grad-btn);
    transition: var(--transition-normal);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 24px;
    height: 18px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-nav-toggle span {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: var(--transition-normal);
}

/* 7. Hero Section */
.hero-section {
    padding-top: 160px;
    padding-bottom: 100px;
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 24px;
    line-height: 1.15;
}

.hero-description {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
    max-width: 580px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
}

.hero-visual {
    display: flex;
    justify-content: center;
    position: relative;
}

.dashboard-preview-card {
    width: 100%;
    max-width: 480px;
    overflow: hidden;
}

.card-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--card-border);
}

.dots {
    display: flex;
    gap: 6px;
    margin-right: 16px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.dot.red { background-color: #ff5f56; }
.dot.yellow { background-color: #ffbd2e; }
.dot.green { background-color: #27c93f; }

.card-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.card-body {
    padding: 24px;
}

.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.stat-mini-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    padding: 14px;
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 4px;
}

.stat-value {
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 700;
}

.text-cyan { color: var(--color-cyan); }
.text-purple { color: var(--color-purple); }

.stat-trend {
    font-size: 0.7rem;
    color: #27c93f;
    margin-top: 4px;
}

.chart-mock {
    width: 100%;
    height: 100px;
    margin-bottom: 24px;
    background: rgba(255, 255, 255, 0.01);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
}

.sparkline {
    width: 100%;
    height: 100%;
}

.activity-log {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.log-item {
    display: flex;
    font-size: 0.8rem;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.log-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.log-time {
    color: var(--color-cyan);
    font-weight: 600;
    margin-right: 12px;
}

.log-text {
    color: var(--text-secondary);
}

/* 8. Services Section */
.services-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.section-subtitle {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.service-card {
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: transparent;
    transition: var(--transition-normal);
}

.service-card:hover::before {
    background: var(--grad-btn);
}

.service-icon {
    margin-bottom: 24px;
}

.service-card-title {
    font-size: 1.25rem;
    margin-bottom: 16px;
}

.service-card-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 24px;
    flex-grow: 1;
}

.service-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.service-features li {
    display: flex;
    align-items: center;
}

.service-features li::before {
    content: '✦';
    color: var(--color-cyan);
    margin-right: 8px;
}

.highlight-card {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.7) 0%, rgba(127, 0, 255, 0.05) 100%);
    border-color: rgba(127, 0, 255, 0.2);
}

.highlight-card:hover {
    border-color: rgba(127, 0, 255, 0.4);
    box-shadow: 0 12px 40px 0 rgba(127, 0, 255, 0.1);
}

.highlight-card .service-features {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* 9. Interactive Demos Section */
.demos-section {
    padding: 100px 0;
    background-color: var(--bg-secondary);
}

.demo-tabs {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 40px;
}

.tab-btn {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-secondary);
    border: 1px solid var(--card-border);
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-normal);
}

.tab-btn:hover {
    color: var(--color-white);
    background: rgba(255, 255, 255, 0.07);
}

.tab-btn.active {
    background: var(--color-cyan);
    color: var(--bg-primary);
    border-color: var(--color-cyan);
    box-shadow: 0 4px 15px rgba(0, 242, 254, 0.3);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn var(--transition-slow);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Adisyon Simulator Grid Layout */
.adisyon-simulator-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr 0.9fr;
    gap: 24px;
    min-height: 520px;
}

.sim-panel-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 12px;
}

.simulator-menu, .simulator-tables, .simulator-receipt {
    padding: 24px;
    display: flex;
    flex-direction: column;
}

/* Category buttons */
.menu-categories {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.category-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 6px 12px;
    font-size: 0.8rem;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition-fast);
}

.category-btn:hover, .category-btn.active {
    background: rgba(255, 255, 255, 0.1);
    color: var(--color-white);
    border-color: rgba(255, 255, 255, 0.2);
}

.menu-items-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom Scrollbars for panels */
.menu-items-grid::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar {
    width: 6px;
}

.menu-items-grid::-webkit-scrollbar-track,
.chat-messages::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.01);
}

.menu-items-grid::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 3px;
}

.menu-item-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    padding: 12px;
    cursor: pointer;
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.menu-item-card:hover {
    background: rgba(0, 242, 254, 0.05);
    border-color: rgba(0, 242, 254, 0.2);
    transform: translateY(-2px);
}

.menu-item-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-white);
    margin-bottom: 4px;
}

.menu-item-price {
    font-size: 0.9rem;
    color: var(--color-cyan);
    font-weight: 700;
    margin-top: auto;
}

/* Tables map styling */
.tables-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.table-card {
    aspect-ratio: 1;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: var(--border-radius-sm);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-normal);
}

.table-card:hover {
    transform: scale(1.05);
}

.table-card.selected {
    border-color: var(--color-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.2);
}

.table-name {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
}

.table-desc {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Table statuses colors */
.table-card.empty {
    background: rgba(255, 255, 255, 0.02);
}
.table-card.active {
    background: rgba(127, 0, 255, 0.1);
    border-color: rgba(127, 0, 255, 0.3);
}
.table-card.active .table-desc {
    color: var(--color-purple);
    font-weight: 600;
}

.table-legend {
    display: flex;
    justify-content: space-around;
    font-size: 0.75rem;
    margin-top: auto;
    color: var(--text-secondary);
}

.legend-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 4px;
}

.legend-dot.empty { background-color: rgba(255,255,255,0.2); }
.legend-dot.active { background-color: var(--color-purple); }
.legend-dot.selected { background-color: var(--color-cyan); }

/* Receipt styling */
.receipt-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.receipt-header .badge {
    background: rgba(255, 255, 255, 0.05);
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.receipt-header .badge.active {
    background: rgba(127, 0, 255, 0.2);
    color: var(--color-purple);
}

.receipt-body {
    flex-grow: 1;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
    padding: 16px;
    background: rgba(0, 0, 0, 0.1);
    max-height: 280px;
    overflow-y: auto;
    margin-bottom: 16px;
}

.receipt-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.8rem;
    gap: 12px;
    margin-top: 40px;
}

.receipt-item-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.02);
    padding-bottom: 4px;
}

.receipt-item-name {
    color: var(--text-primary);
}

.receipt-item-qty {
    color: var(--text-muted);
    margin-right: 8px;
}

.receipt-item-price {
    color: var(--text-secondary);
}

.receipt-calc-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.receipt-calc-row.text-highlight {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-cyan);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 8px;
    margin-top: 8px;
}

.receipt-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 16px;
}

.receipt-actions .btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* AI Chatbot Simulator styling */
.ai-chat-simulator {
    max-width: 800px;
    margin: 0 auto;
    height: 520px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.chat-header {
    padding: 16px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.01);
}

.chat-avatar {
    width: 40px;
    height: 40px;
    background: rgba(0, 242, 254, 0.1);
    border: 1px solid rgba(0, 242, 254, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-cyan);
}

.chat-bot-name {
    font-size: 0.95rem;
    font-weight: 700;
}

.chat-bot-status {
    font-size: 0.75rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 6px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background-color: #27c93f;
    border-radius: 50%;
    display: inline-block;
}

.chat-messages {
    flex-grow: 1;
    padding: 24px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.msg {
    max-width: 75%;
    padding: 12px 18px;
    border-radius: 18px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.bot-msg {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.user-msg {
    background: var(--color-purple);
    color: var(--color-white);
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.chat-suggestions {
    display: flex;
    gap: 8px;
    padding: 12px 24px;
    overflow-x: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}

.chat-suggestions::-webkit-scrollbar {
    height: 4px;
}

.chat-suggestions::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.05);
}

.suggestion-chip {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    padding: 8px 14px;
    font-size: 0.8rem;
    border-radius: 30px;
    cursor: pointer;
    transition: var(--transition-fast);
    flex-shrink: 0;
}

.suggestion-chip:hover {
    background: rgba(0, 242, 254, 0.05);
    color: var(--color-cyan);
    border-color: rgba(0, 242, 254, 0.2);
}

.chat-input-area {
    padding: 16px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    gap: 12px;
}

.chat-input-area input {
    flex-grow: 1;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}

.chat-input-area input:focus {
    border-color: var(--color-cyan);
}

/* Typing animation bubble */
.typing-indicator {
    display: flex;
    gap: 4px;
    padding: 8px 14px;
    align-items: center;
}

.typing-dot {
    width: 6px;
    height: 6px;
    background: var(--text-muted);
    border-radius: 50%;
    animation: typing 1s infinite alternate;
}

.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
    from { transform: translateY(0); }
    to { transform: translateY(-4px); opacity: 0.5; }
}

/* 10. Calculator Section */
.calculator-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--bg-secondary) 0%, var(--bg-primary) 100%);
}

.calculator-wrapper {
    max-width: 1000px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    overflow: hidden;
}

.calc-inputs, .calc-results {
    padding: 40px;
}

.calc-inputs {
    border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.calc-block-title {
    font-size: 1.25rem;
    margin-bottom: 28px;
    font-family: var(--font-heading);
}

.range-group {
    margin-bottom: 30px;
}

.range-label-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
}

.range-label-row label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.range-value {
    color: var(--color-cyan);
    font-weight: 700;
    font-family: var(--font-heading);
}

/* Custom styled range slider */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--color-cyan);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.5);
    transition: transform var(--transition-fast);
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.checkbox-group {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 30px;
}

.checkbox-group-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 600;
    margin-bottom: 4px;
}

/* Custom Styled Checkboxes */
.custom-checkbox {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 32px;
    cursor: pointer;
    user-select: none;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkbox-indicator {
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    height: 20px;
    width: 20px;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    transition: var(--transition-fast);
}

.custom-checkbox:hover input ~ .checkbox-indicator {
    border-color: var(--color-cyan);
    background-color: rgba(0, 242, 254, 0.02);
}

.custom-checkbox input:checked ~ .checkbox-indicator {
    background-color: var(--color-cyan);
    border-color: var(--color-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.3);
}

.checkbox-indicator:after {
    content: "";
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkbox-indicator:after {
    display: block;
}

.custom-checkbox .checkbox-indicator:after {
    left: 7px;
    top: 3px;
    width: 4px;
    height: 9px;
    border: solid var(--bg-primary);
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkbox-label {
    color: var(--text-primary);
}

/* Results panel */
.calc-results {
    background: rgba(255, 255, 255, 0.01);
    display: flex;
    flex-direction: column;
}

.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    flex-grow: 1;
    margin-bottom: 30px;
}

.result-box {
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: var(--border-radius-sm);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.result-box.span-2 {
    grid-column: span 2;
    background: linear-gradient(135deg, rgba(0, 242, 254, 0.03) 0%, rgba(127, 0, 255, 0.03) 100%);
    border-color: rgba(0, 242, 254, 0.1);
}

.result-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 8px;
}

.result-number {
    font-size: 2.2rem;
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 8px;
}

.text-highlight {
    background: var(--grad-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.result-desc {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* 11. Portfolio Section */
.portfolio-section {
    padding: 100px 0;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.portfolio-card {
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.portfolio-img-placeholder {
    height: 180px;
    background: linear-gradient(135deg, var(--bg-tertiary) 0%, var(--bg-secondary) 100%);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.portfolio-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--color-cyan);
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 12px;
}

.portfolio-icon {
    font-size: 3.5rem;
    filter: drop-shadow(0 0 15px rgba(0, 242, 254, 0.3));
    transition: transform var(--transition-normal);
}

.portfolio-card:hover .portfolio-icon {
    transform: scale(1.15) rotate(5deg);
}

.portfolio-content {
    padding: 24px;
}

.portfolio-content h4 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.portfolio-content p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* 12. Contact Section */
.contact-section {
    padding: 100px 0;
    background-color: var(--bg-secondary);
}

.contact-grid {
    display: grid;
    grid-template-columns: 0.95fr 1.05fr;
    gap: 60px;
    align-items: center;
}

.text-left {
    text-align: left;
    margin-bottom: 24px;
}

.contact-desc {
    color: var(--text-secondary);
    margin-bottom: 40px;
    font-size: 1.05rem;
}

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

.contact-detail-item {
    display: flex;
    gap: 16px;
    align-items: center;
}

.contact-detail-icon {
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-cyan);
}

.detail-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 500;
}

.detail-value {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
}

/* Form Styles */
.contact-form-wrapper {
    padding: 40px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

.form-group input,
.form-group select,
.form-group textarea {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--border-radius-sm);
    padding: 12px 16px;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition-fast);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-cyan);
    box-shadow: 0 0 10px rgba(0, 242, 254, 0.1);
}

.form-group select {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='rgba(255,255,255,0.5)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.form-group select option {
    background-color: var(--bg-secondary);
    color: var(--text-primary);
}

.form-status-msg {
    margin-top: 16px;
    text-align: center;
    font-size: 0.9rem;
    border-radius: var(--border-radius-sm);
    padding: 10px;
    display: none;
}

.form-status-msg.success {
    display: block;
    background-color: rgba(39, 201, 63, 0.1);
    border: 1px solid rgba(39, 201, 63, 0.3);
    color: #27c93f;
    animation: fadeIn var(--transition-normal);
}

.form-status-msg.error {
    display: block;
    background-color: rgba(255, 95, 86, 0.1);
    border: 1px solid rgba(255, 95, 86, 0.3);
    color: #ff5f56;
    animation: fadeIn var(--transition-normal);
}

/* 13. Footer */
.footer {
    background-color: var(--bg-primary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 80px;
}

.footer-container {
    display: flex;
    justify-content: space-between;
    margin-bottom: 60px;
    gap: 40px;
}

.footer-brand {
    max-width: 320px;
}

.footer-tagline {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 16px;
}

.footer-links {
    display: flex;
    gap: 80px;
}

.link-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.link-column h5 {
    font-size: 0.95rem;
    margin-bottom: 8px;
    color: var(--color-white);
}

.link-column a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.link-column a:hover {
    color: var(--color-cyan);
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    padding: 30px 0;
}

.footer-bottom-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.copyright {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.legal-links {
    display: flex;
    gap: 24px;
}

.legal-links a {
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.legal-links a:hover {
    color: var(--text-secondary);
}

/* Back to Top button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-normal);
    z-index: 99;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--color-cyan);
    color: var(--bg-primary);
    border-color: var(--color-cyan);
    box-shadow: 0 0 15px rgba(0, 242, 254, 0.4);
    transform: translateY(-4px);
}

/* ==========================================================================
   14. Responsive Rules
   ========================================================================== */

@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
    
    .hero-badge {
        justify-content: center;
    }
    
    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .highlight-card {
        grid-column: span 2;
    }

    .adisyon-simulator-grid {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .simulator-receipt {
        min-height: 350px;
    }

    .calculator-wrapper {
        grid-template-columns: 1fr;
    }
    
    .calc-inputs {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

@media (max-width: 768px) {
    .header-container {
        height: 70px;
    }
    
    .nav {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: rgba(15, 23, 42, 0.98);
        backdrop-filter: blur(12px);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 40px;
        transition: var(--transition-slow);
    }
    
    .nav.open {
        left: 0;
    }
    
    .mobile-nav-toggle {
        display: flex;
    }
    
    .mobile-nav-toggle.open span:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .mobile-nav-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-nav-toggle.open span:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    .header-actions .btn {
        display: none; /* Hide teklif al button on small viewports to save space, open menu does it */
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .highlight-card {
        grid-column: span 1;
    }
    
    .highlight-card .service-features {
        grid-template-columns: 1fr;
    }

    .menu-items-grid {
        grid-template-columns: 1fr;
    }
    
    .tables-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .results-grid {
        grid-template-columns: 1fr;
    }
    
    .result-box.span-2 {
        grid-column: span 1;
    }

    .portfolio-grid {
        grid-template-columns: 1fr;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .footer-container {
        flex-direction: column;
        gap: 40px;
    }
    
    .footer-links {
        flex-direction: column;
        gap: 30px;
    }
    
    .footer-bottom-container {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}
