/*
 * PSB-BIOPOL Modern Design 2025
 * Сучасний мінімалістичний дизайн
 */

/* CSS Variables для легкої кастомізації */
:root {
    --primary-color: #00ADB3;
    --primary-dark: #008891;
    --primary-light: #00CED1;
    --background: #ffffff;
    --background-alt: #f8f9fa;
    --text-primary: #1a1a1a;
    --text-secondary: #6c757d;
    --border-color: #e9ecef;
    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Helvetica Neue', sans-serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--background);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container,
body.custom-background > .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    background: var(--background);
}

/* Header - Сучасний дизайн */
header#masthead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border-bottom: none;
}

.header-image-wrapper {
    background: transparent;
    padding: 20px 0;
}

.header-image-wrapper img {
    max-width: 100%;
    height: auto;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.1));
    transition: var(--transition);
}

.header-image-wrapper img:hover {
    transform: scale(1.02);
}

.site-branding {
    background: transparent;
    padding: 16px 24px;
}

.site-title a {
    color: #ffffff;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: var(--transition);
}

.site-title a:hover {
    color: rgba(255,255,255,0.9);
    transform: translateY(-1px);
}

.site-description {
    color: rgba(255,255,255,0.95);
    font-size: 1rem;
    font-weight: 400;
    margin-top: 8px;
}

/* Navigation - Модерна навігація */
nav.blueplanet-nav {
    background: var(--background);
    border-bottom: 1px solid var(--border-color);
    padding: 0;
    box-shadow: var(--shadow-sm);
}

.nav-menu {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 4px;
    margin: 0;
    padding: 12px 24px;
}

.nav-menu > li {
    position: relative;
}

.nav-menu > li > a {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.nav-menu > li > a::before {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 20px;
    right: 20px;
    height: 2px;
    background: var(--primary-color);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.nav-menu > li > a:hover,
.nav-menu > li.current-menu-item > a {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.nav-menu > li > a:hover::before,
.nav-menu > li.current-menu-item > a::before {
    transform: scaleX(1);
}

/* Sub-menu */
.nav-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--background);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    min-width: 220px;
    padding: 8px;
    margin-top: 8px;
    z-index: 100;
}

.nav-menu > li:hover > .sub-menu {
    display: block;
    animation: fadeInDown 0.3s ease;
}

.nav-menu .sub-menu li a {
    display: block;
    padding: 10px 16px;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-size: 0.9rem;
}

.nav-menu .sub-menu li a:hover {
    background: var(--primary-color);
    color: #ffffff;
    transform: translateX(4px);
}

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

/* Main Content */
.site-content {
    padding: 48px 24px;
    min-height: 60vh;
}

#primary.content-area {
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: 32px;
    margin: 24px 0;
    box-shadow: var(--shadow-sm);
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

.entry-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    position: relative;
    padding-bottom: 16px;
}

.entry-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    border-radius: 2px;
}

.entry-content {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.entry-content p {
    margin-bottom: 1.5rem;
}

.entry-content ul,
.entry-content ol {
    margin: 1.5rem 0 1.5rem 2rem;
}

.entry-content li {
    margin-bottom: 0.75rem;
    line-height: 1.7;
}

.entry-content a {
    color: var(--primary-color);
    text-decoration: none;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
}

.entry-content a:hover {
    color: var(--primary-dark);
    border-bottom-color: var(--primary-color);
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    border-radius: var(--radius-sm);
}

/* Footer - Модерний футер */
footer,
.site-footer {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    color: rgba(255,255,255,0.9);
    padding: 48px 24px 24px;
    margin-top: 64px;
    border-top: 4px solid var(--primary-color);
}

footer p,
.site-footer p {
    margin: 12px 0;
    font-size: 0.95rem;
    color: rgba(255,255,255,0.8);
}

footer a,
.site-footer a {
    color: var(--primary-light);
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover,
.site-footer a:hover {
    color: #ffffff;
    text-decoration: underline;
}

/* Buttons */
button,
.button,
.btn {
    display: inline-block;
    padding: 12px 28px;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: #ffffff;
    border: none;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
}

button:hover,
.button:hover,
.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Cards */
.card,
article {
    background: var(--background);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover,
article:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

/* Sidebar */
#secondary.widget-area {
    background: var(--background-alt);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin: 24px 0;
}

.widget {
    margin-bottom: 32px;
}

.widget-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: var(--text-primary);
}

/* Forms */
input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    transition: var(--transition);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 173, 179, 0.1);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
    border-radius: var(--radius-sm);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

th {
    background: var(--primary-color);
    color: #ffffff;
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
}

td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

tr:hover {
    background: var(--background-alt);
}

/* Responsive */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }

    .nav-menu {
        flex-direction: column;
        gap: 8px;
    }

    .nav-menu > li {
        width: 100%;
    }

    .nav-menu > li > a {
        width: 100%;
        text-align: center;
    }

    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }

    #primary.content-area {
        padding: 20px;
    }

    .site-content {
        padding: 24px 16px;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeIn 0.6s ease-out;
}

/* Utilities */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }

/* Print styles */
@media print {
    header, nav, footer, .widget-area {
        display: none;
    }

    body {
        background: white;
        color: black;
    }
}
