/* Base styles for Psihoterapeuti directory */
:root {
    --primary: #294e91;
    --primary-dark: #1c3564;
    --accent: #f3a712;
    --bg: #f7f9fc;
    --border: #d7deeb;
    --text: #1e2432;
    --text-light: #5b6785;
    --white: #ffffff;
    --success: #2a9d8f;
    --danger: #e63946;
    --radius: 10px;
    --shadow: 0 12px 32px rgba(27, 39, 68, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.6;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

.layout {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

header {
    background: var(--white);
    border-bottom: 1px solid var(--border);
    box-shadow: 0 4px 16px rgba(27, 39, 68, 0.06);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    font-size: 1.25rem;
    color: var(--primary-dark);
}

.brand-logo {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    box-shadow: 0 8px 24px rgba(27, 39, 68, 0.2);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.nav-links a {
    font-weight: 500;
    color: var(--text-light);
}

.nav-links a.active {
    color: var(--primary);
}

.hero {
    padding: 3rem 1.5rem;
    text-align: center;
    background: linear-gradient(145deg, rgba(41, 78, 145, 0.08), rgba(255, 255, 255, 0.9));
}

.hero h1 {
    max-width: 700px;
    margin: 0 auto 1rem;
    font-size: clamp(2rem, 4vw, 2.8rem);
    color: var(--primary-dark);
}

.hero p {
    max-width: 640px;
    margin: 0 auto;
    color: var(--text-light);
    font-size: 1.05rem;
}

.content {
    flex: 1;
    padding: 2rem 1.5rem 3rem;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
}

.card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 1.8rem;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}

.card + .card {
    margin-top: 1.5rem;
}

.form-grid {
    display: grid;
    gap: 1.25rem;
}

.form-row {
    display: grid;
    gap: 1.25rem;
}

.form-row.two {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
    margin-bottom: 0.35rem;
    display: block;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #fdfdff;
    font-size: 1rem;
    color: var(--text);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(41, 78, 145, 0.18);
}

button,
input[type="submit"] {
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 0.85rem 1.6rem;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease;
}

button:hover,
input[type="submit"]:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.secondary-button {
    background: var(--white);
    color: var(--primary);
    border: 1px solid var(--primary);
}

.secondary-button:hover {
    background: var(--primary);
    color: var(--white);
}

.flash {
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    font-weight: 500;
}

.flash-success {
    background: rgba(42, 157, 143, 0.15);
    color: var(--success);
    border: 1px solid rgba(42, 157, 143, 0.3);
}

.flash-error {
    background: rgba(230, 57, 70, 0.12);
    color: var(--danger);
    border: 1px solid rgba(230, 57, 70, 0.3);
}

.listings-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.listing-card {
    background: var(--white);
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.listing-card img {
    width: 100%;
    height: 210px;
    object-fit: cover;
}

.listing-body {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.listing-body h3 {
    margin: 0 0 0.6rem;
    font-size: 1.2rem;
    color: var(--primary-dark);
}

.listing-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.9rem;
}

.listing-meta span {
    background: rgba(41, 78, 145, 0.08);
    color: var(--primary-dark);
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.listing-body p {
    color: var(--text-light);
    margin: 0 0 0.9rem;
    flex: 1;
}

.listing-footer {
    border-top: 1px solid var(--border);
    padding: 1rem 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.badge {
    display: inline-block;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    background: rgba(41, 78, 145, 0.12);
    color: var(--primary-dark);
}

.badge.success {
    background: rgba(42, 157, 143, 0.2);
    color: var(--success);
}

.badge.warning {
    background: rgba(243, 167, 18, 0.2);
    color: #bc7904;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
}

th,
td {
    padding: 0.85rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: rgba(41, 78, 145, 0.05);
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.table-actions {
    display: flex;
    gap: 0.75rem;
}

footer {
    background: var(--primary-dark);
    color: rgba(255, 255, 255, 0.85);
    padding: 2rem 1.5rem;
}

footer .footer-inner {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

footer p {
    margin: 0.3rem 0;
}

.footer-brand {
    font-weight: 600;
    font-size: 1.2rem;
    margin-bottom: 0.6rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.85);
    display: block;
    margin-bottom: 0.35rem;
}

.filters {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-bottom: 1.5rem;
}

.filters button {
    justify-self: start;
    margin-top: 0.3rem;
}

.dashboard-cards {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.dashboard-card {
    padding: 1.5rem;
    border-radius: var(--radius);
    background: var(--white);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.dashboard-card h3 {
    margin: 0 0 0.25rem;
    font-size: 1.1rem;
    color: var(--primary-dark);
}

.dashboard-card p {
    margin: 0;
    color: var(--text-light);
}

.responsive-table {
    overflow-x: auto;
}

@media (max-width: 768px) {
    .nav-container {
        flex-direction: column;
        align-items: flex-start;
    }

    .nav-links {
        flex-wrap: wrap;
    }

    .hero {
        padding: 2.4rem 1rem;
    }

    .card {
        padding: 1.5rem;
    }

    .listing-card img {
        height: 200px;
    }
}

@media (max-width: 540px) {
    .listing-footer {
        flex-direction: column;
        align-items: flex-start;
    }

    button,
    input[type="submit"] {
        width: 100%;
    }
}
