/* 
   NEOMAT UNIFIED DESIGN SYSTEM
   Merged from: neomat-style.css, modern-home.css, style.css, header-only.css
   Theme: Dracula / Dark Material
*/

:root {
    /* Core Colors - Dracula Palette */
    --bg-color: #282a36;
    --surface-color: #44475a;
    --surface-hover: #53576e;
    --primary-color: #bd93f9; /* Purple */
    --secondary-color: #50fa7b; /* Green */
    --accent-color: #ff79c6; /* Pink */
    --info-color: #8be9fd; /* Cyan */
    --warning-color: #ffb86c; /* Orange */
    --error-color: #ff5555; /* Red */
    
    --text-main: #f8f8f2;
    --text-muted: #b0b5c9;
    --text-dark: #21222c;
    --border-color: #6272a4;

    /* Spacing Tokens */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;

    /* Typography */
    --font-main: 'Outfit', 'Roboto', sans-serif;
    --font-code: 'Fira Code', monospace;
    --font-heading: 'Outfit', sans-serif;

    /* Layout & Effects */
    --container-width: 1400px;
    --glass-bg: rgba(30, 32, 44, 0.85);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: blur(15px);
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.2);
    --shadow-md: 0 8px 16px rgba(0,0,0,0.3);
    --shadow-lg: 0 12px 24px rgba(0,0,0,0.4);
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    
    /* Category Colors */
    --apps-color: var(--primary-color);
    --ai-color: var(--warning-color);
    --archive-color: var(--border-color);
    --grade1-color: var(--secondary-color);
    --grade4-color: var(--info-color);
    --highschool-color: var(--accent-color);
}


/* --- Base Reset --- */
*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    padding: 110px 0 0 0; /* Offset for fixed floating header */
    background-color: var(--bg-color);
    color: var(--text-main);
    font-family: var(--font-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Subtle Grid Background (from neomat-style) */
body::before {
    content: "";
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-image: 
        linear-gradient(var(--border-color) 0.5px, transparent 0.5px),
        linear-gradient(90deg, var(--border-color) 0.5px, transparent 0.5px);
    background-size: 50px 50px;
    opacity: 0.05;
    z-index: -1;
    pointer-events: none;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 700;
    margin-top: 0;
    margin-bottom: var(--spacing-md);
}

a {
    color: var(--info-color);
    text-decoration: none;
    transition: color var(--transition-normal);
}

a:hover { color: var(--accent-color); }

.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* --- Header & Navigation --- */
header.modern-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: var(--container-width);
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    border-radius: 100px;
    padding: 12px 30px;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
}

header.modern-header .logo { display: flex; align-items: center; gap: 12px; }
header.modern-header .logo img { height: 40px; width: auto; }
header.modern-header .logo span {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-main);
    letter-spacing: -0.5px;
}

header.modern-header nav ul {
    display: flex;
    gap: 20px;
    margin: 0;
    padding: 0;
    list-style: none;
    align-items: center;
}

header.modern-header nav a {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: color 0.3s;
    padding: 5px 0;
}

header.modern-header nav a:hover,
header.modern-header nav a.active {
    color: var(--primary-color);
}

/* Dropdown Menu */
.nav-dropdown { position: relative; }
.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    padding: 10px;
    border-radius: 12px;
    min-width: 200px;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    z-index: 1001;
    flex-direction: column;
    gap: 4px;
    margin-top: 10px;
}
.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -15px;
    left: 0;
    width: 100%;
    height: 15px;
    background: transparent;
}
.nav-dropdown:hover .dropdown-menu { display: flex; }

.dropdown-menu a {
    color: var(--text-main) !important;
    padding: 8px 12px;
    border-radius: 6px;
    text-transform: none;
    display: flex;
    align-items: center;
    gap: 10px;
}
.dropdown-menu a:hover { background: rgba(255,255,255,0.05); }

/* --- Homepage Special Sections --- */
#hero {
    min-height: 80vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 60px;
    position: relative;
    overflow: hidden;
}

.hero-columns {
    display: flex;
    align-items: center;
    gap: 50px;
    width: 100%;
    text-align: left;
}

.hero-left {
    flex: 1;
    z-index: 2;
}

.hero-right {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-content {
    width: 100%;
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.hero-title {
    font-size: 5rem;
    line-height: 1;
    font-weight: 900;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #ffffff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -3px;
    text-transform: none;
}

.hero-title span {
    background: linear-gradient(to right, var(--primary-color), var(--accent-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}

.hero-text {
    font-size: 1.4rem;
    color: var(--text-main);
    max-width: 600px;
    margin: 0 0 2.5rem 0;
    line-height: 1.5;
    font-weight: 500;
    opacity: 0.9;
}

.btn-group {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.services-section {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-label {
    text-align: left;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: var(--secondary-color);
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
    opacity: 0.9;
    width: 100%;
}

.cards-grid {
    display: flex;
    justify-content: flex-start;
    gap: 20px;
    width: 100%;
}

.background-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: -1;
    background: linear-gradient(135deg, rgba(40, 42, 54, 1), rgba(30, 32, 44, 1));
}

.background-overlay::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: radial-gradient(circle at 15% 50%, rgba(189, 147, 249, 0.1), transparent 50%),
                radial-gradient(circle at 85% 30%, rgba(80, 250, 123, 0.08), transparent 50%);
    z-index: 1;
}

.background-overlay::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: url('../images/cyberpunk-bg.png') no-repeat center center;
    background-size: cover;
    opacity: 0.12; /* Transparent enough to not disturb readability */
    z-index: 0;
}

/* --- Components --- */

/* Cards (Neomat Style) */
.card, .glass-card {
    background-color: var(--surface-color);
    border-radius: 12px;
    padding: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
    border: 1px solid var(--glass-border);
    transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
}

.card:hover, .glass-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
    background-color: var(--surface-hover);
}

.card-module-apps { border-top: 3px solid var(--apps-color) !important; }
.card-module-ai   { border-top: 3px solid var(--ai-color) !important; }

.card-thumb {
    width: 100%;
    height: 180px;
    background: #1a1b2e;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    border-radius: 8px 8px 0 0;
    margin: -24px -24px 16px -24px;
    width: calc(100% + 48px);
}

.card-thumb img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
}

.card:hover .card-thumb img {
    opacity: 1;
    transform: scale(1.05);
}

.card-thumb .thumb-icon {
    font-size: 3.5rem;
    opacity: 0.1;
    color: var(--text-main);
    z-index: 1;
}

.card-title {
    color: var(--accent-color);
    font-size: 1.4rem;
    margin-bottom: 12px;
}

/* Section Headers */
.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 40px 0 25px;
    flex-wrap: wrap;
    gap: 15px;
}

.section-title {
    font-size: 1.8rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-color);
}

.section-title .dot-apps { color: var(--apps-color); margin-right: 5px; }
.section-title .dot-ai   { color: var(--ai-color); margin-right: 5px; }

.section-link {
    font-family: var(--font-code);
    font-size: 0.9rem;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    padding: 8px 18px;
    border-radius: 50px;
    transition: all 0.3s;
}

.section-link:hover {
    color: var(--primary-color);
    border-color: var(--primary-color);
    background: rgba(189, 147, 249, 0.05);
}

/* Buttons (Unified) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.95rem;
    border: none;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #a578ea);
    color: var(--bg-color);
}

.btn-primary:hover {
    box-shadow: 0 4px 15px rgba(189, 147, 249, 0.4);
    transform: scale(1.02);
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--secondary-color);
    color: var(--secondary-color);
}

.btn-secondary:hover {
    background: rgba(80, 250, 123, 0.1);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--bg-color);
}

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

/* Filter Tabs */
.filter-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 30px;
}

.filter-tab {
    padding: 10px 22px;
    border-radius: 50px;
    font-family: var(--font-code);
    font-size: 0.85rem;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    transition: all 0.3s;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-tab:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.filter-tab.active {
    background: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
    font-weight: 700;
}

.filter-tab.tab-g13.active { background: var(--grade1-color); border-color: var(--grade1-color); }
.filter-tab.tab-g48.active { background: var(--grade4-color); border-color: var(--grade4-color); }
.filter-tab.tab-hs.active  { background: var(--highschool-color); border-color: var(--highschool-color); }
.filter-tab.tab-ai.active  { background: var(--ai-color); border-color: var(--ai-color); }

/* Language Badges */
.badge-lang-pl { color: var(--error-color); border-color: var(--error-color); }
.badge-lang-en { color: var(--info-color); border-color: var(--info-color); }

/* Age Badges */
.badge-g13 { color: var(--grade1-color); border-color: var(--grade1-color); }
.badge-g48 { color: var(--grade4-color); border-color: var(--grade4-color); }
.badge-hs  { color: var(--highschool-color); border-color: var(--highschool-color); }

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    border: 1px solid var(--border-color);
}

/* --- Layout Sections --- */

/* Page Banner (for Apps/AI pages) */
.page-banner {
    padding: 60px 0 40px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 50px;
}

.page-banner h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, #fff, var(--primary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-banner p {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 800px;
    margin: 0 auto;
}

/* Grid Layouts */
.grid-layout, .services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 30px;
}

.training-grid {
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
}

/* --- Forms --- */
.search-container {
    margin-bottom: 40px;
    display: flex;
    justify-content: center;
}

.search-input {
    width: 100%;
    max-width: 600px;
    padding: 15px 25px;
    border-radius: 50px;
    background: var(--surface-color);
    border: 2px solid var(--border-color);
    color: var(--text-main);
    font-size: 1.1rem;
    transition: all 0.3s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 15px rgba(189, 147, 249, 0.2);
    background: var(--surface-hover);
}

/* --- Mobile --- */
.hamburger {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--text-main);
}

@media (max-width: 900px) {
    header.modern-header { width: 95%; padding: 10px 20px; }
    .hamburger { display: block; }
    
    header.modern-header nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--glass-bg);
        border-radius: 20px;
        margin-top: 10px;
        padding: 20px;
        box-shadow: var(--shadow-lg);
    }
    
    header.modern-header nav.active { display: block; }
    header.modern-header nav ul { flex-direction: column; gap: 15px; }
    
    .hero-columns { flex-direction: column; text-align: center; gap: 40px; }
    .hero-left, .hero-right { width: 100%; }
    .hero-title { font-size: 3rem; letter-spacing: -1.5px; }
    .btn-group, .cards-grid { justify-content: center; }
    .section-label { text-align: center; }
    .hexagon-frame { width: 280px; height: 320px; }
}

/* Hexagon Frame */
.hexagon-frame {
    position: relative;
    width: 400px;
    height: 460px;
    background: var(--accent-color);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 50px rgba(255, 121, 198, 0.5);
    filter: drop-shadow(0 0 20px var(--accent-color));
}

.hexagon-frame::before {
    content: '';
    position: absolute;
    inset: 5px;
    background: var(--bg-color);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    z-index: 1;
}

.hexagon-content {
    position: absolute;
    inset: 10px;
    z-index: 2;
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    overflow: hidden;
}

.hexagon-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* --- O mnie / Bio Sections --- */
.glass-panel {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 15px;
    padding: 2.5rem;
    margin-bottom: 3rem;
    box-shadow: var(--shadow-md);
}

.glass-panel p { margin-bottom: 1.5rem; font-size: 1.1rem; line-height: 1.8; }
.glass-panel p:last-child { margin-bottom: 0; }

.highlight {
    color: var(--secondary-color);
    font-weight: 700;
}

/* Profile Card */
.profile-glass-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 3rem;
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 3rem;
    align-items: center;
    margin-bottom: 4rem;
    box-shadow: var(--shadow-lg);
}

.profile-image {
    width: 220px;
    height: 220px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(189, 147, 249, 0.3);
}

.cert-list-item {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.cert-icon-emoji { font-size: 1.2rem; }

.cert-icon {
    max-height: 120px;
    width: auto;
    display: block;
    margin: 0 auto 1.5rem;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

/* Accordion */
.accordion {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.accordion-item {
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s;
}

.accordion-item.active {
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.accordion-header {
    width: 100%;
    padding: 20px 25px;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s;
}

.accordion-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.accordion-icon {
    transition: transform 0.3s;
    color: var(--primary-color);
}

.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content > div {
    padding: 0 25px 25px 25px;
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.7;
}

@media (max-width: 900px) {
    .profile-glass-card { grid-template-columns: 1fr; text-align: center; gap: 2rem; }
    .profile-col-left { display: flex; justify-content: center; }
    .cert-list-item { justify-content: center; }
}

/* --- Contact Page Specifics --- */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-top: 20px;
}

.contact-info h3 { font-size: 2rem; margin-bottom: 1.5rem; color: var(--primary-color); }
.contact-info p { font-size: 1.1rem; color: var(--text-muted); margin-bottom: 2rem; }

/* Social Panel */
.social-panel {
    display: flex;
    gap: 15px;
    margin-top: 1rem;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 12px;
    background: var(--surface-color);
    color: var(--text-main);
    font-size: 1.2rem;
    transition: all 0.3s;
    border: 1px solid var(--glass-border);
}

.social-link:hover {
    transform: translateY(-3px);
    background: var(--primary-color);
    color: var(--bg-color);
    border-color: var(--primary-color);
    box-shadow: 0 5px 15px rgba(189, 147, 249, 0.3);
}

/* Forms (Contact Form) */
.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 8px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    font-family: var(--font-main);
    font-size: 1rem;
    transition: all 0.3s;
    margin-bottom: 1.5rem;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    background: var(--surface-hover);
    box-shadow: 0 0 10px rgba(189, 147, 249, 0.1);
}

.form-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    margin-top: 1rem;
    cursor: pointer;
}

@media (max-width: 900px) {
    .contact-wrapper { grid-template-columns: 1fr; gap: 3rem; }
}

/* --- Content Elements --- */
.content-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    background: var(--surface-color);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    overflow: hidden;
    font-size: 0.95rem;
}

.content-table th, .content-table td {
    padding: 1.2rem;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
}

.content-table th {
    background: rgba(189, 147, 249, 0.1);
    color: var(--primary-color);
    font-weight: 700;
}

.content-table tr:last-child td { border-bottom: none; }

.highlight-box {
    background: rgba(189, 147, 249, 0.05);
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px dashed var(--primary-color);
    margin: 2rem 0;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--surface-color);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-color);
}
