/* Modern UI Overrides for e-uslugiprawne.pl */
:root {
    --primary-red: #D32F2F;
    /* More vibrant red */
    --primary-red-dark: #B71C1C;
    --accent-gold: #FFC107;
    /* Warmer gold */
    --accent-gold-dark: #FFA000;
    --text-main: #333333;
    --text-muted: #666666;
    --bg-light: #F9FAFB;
    --white: #FFFFFF;
    --border-color: #E0E0E0;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --radius-sm: 4px;
    --radius-md: 8px;
    --radius-lg: 12px;
}

body {
    background-color: var(--bg-light);
    color: var(--text-main);
    font-family: 'Open Sans', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--text-main);
    margin-bottom: 1rem;
}

h1 {
    font-weight: 700;
    letter-spacing: -0.5px;
}

h2 {
    font-weight: 600;
    letter-spacing: -0.3px;
}

a {
    color: var(--primary-red);
    transition: color 0.2s;
}

a:hover {
    color: var(--primary-red-dark);
    text-decoration: none;
}

/* Container & Layout */
.wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    /* Add padding for smaller screens */
    width: auto;
    /* Allow fluidity below 1200px */
}

/* Header Improvements */
header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    padding-bottom: 10px;
}

header .wrapper .logo {
    margin-top: 15px;
    margin-bottom: 15px;
}

header .wrapper .menu li a {
    color: var(--text-main);
    font-weight: 600;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
}

header .wrapper .menu li a:hover {
    background-color: #f0f0f0;
    color: var(--primary-red);
}

header .wrapper .menu li.loginbutton {
    background-color: var(--primary-red);
    color: var(--white);
    padding: 8px 15px 8px 40px !important;
    /* Keep icon space */
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    transition: background-color 0.2s;
}

header .wrapper .menu li.loginbutton:hover {
    background-color: var(--primary-red-dark);
}

header .wrapper .menu li.loginbutton a {
    color: var(--white) !important;
}

header .wrapper .menu li.loginbutton a:hover {
    background-color: transparent;
}

/* Button Modernization */
.btn,
button {
    border-radius: var(--radius-sm);
    border: none;
    padding: 10px 20px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease-in-out;
    text-transform: uppercase;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.btn-primary,
button[type="submit"] {
    background-color: var(--primary-red);
    color: var(--white);
}

.btn-primary:hover,
button[type="submit"]:hover {
    background-color: var(--primary-red-dark);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.btn-default {
    background-color: var(--white);
    border: 1px solid var(--border-color);
    color: var(--text-main);
}

.btn-default:hover {
    background-color: #f5f5f5;
}

/* Form Elements */
input[type="text"],
input[type="email"],
input[type="password"],
textarea,
select,
.form-control {
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 14px;
    color: var(--text-main);
    background-color: var(--white);
    box-shadow: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    width: 100%;
    margin-bottom: 15px;
}

input:focus,
textarea:focus,
select:focus,
.form-control:focus {
    border-color: var(--primary-red);
    box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.1);
    /* Red Focus Ring */
    outline: none;
}

label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 13px;
    color: var(--text-main);
    display: block;
}

/* Cards & Boxes */
.box {
    background: var(--white);
    border: 1px solid var(--border-color) !important;
    /* Override white border */
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    padding: 20px !important;
    margin-bottom: 20px;
    height: auto !important;
    /* Allow dynamic height */
}

.box-header {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 15px;
    padding-top: 5px;
}

.box-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-main);
}

/* Alerts */
.alert {
    border-radius: var(--radius-sm);
    border: none;
    padding: 15px;
    font-weight: 500;
}

.alert-success {
    background-color: #E8F5E9;
    color: #2E7D32;
}

.alert-danger {
    background-color: #FFEBEE;
    color: #C62828;
}

.alert-info {
    background-color: #E3F2FD;
    color: #1565C0;
}

.alert-warning {
    background-color: #FFF8E1;
    color: #F57F17;
}

/* Concierge & Specialized Sections */
.naglowekopis {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 30px;
    box-shadow: var(--shadow-md);
}

.content-wrapper {
    background-color: transparent;
    /* Let body bg show */
    padding-top: 20px;
}

/* Footer */
footer {
    background-color: var(--white);
    border-top: 1px solid var(--border-color);
    padding-top: 40px;
    margin-top: 40px;
}

footer h3 {
    border-bottom: 2px solid var(--primary-red);
    /* Highlight border */
    display: inline-block;
    padding-bottom: 5px;
}

/* Responsive Fixes */
@media (max-width: 768px) {
    .wrapper {
        padding: 0 10px;
    }

    .box {
        padding: 15px !important;
    }

    h1 {
        font-size: 28px;
    }

    h2 {
        font-size: 24px;
    }

    .mobile-menu {
        color: var(--primary-red);
    }
}

/* LAWYER SEARCH CARD STYLES */
.lawyer-card {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 12px;
    padding: 25px 15px;
    text-align: center;
    transition: all 0.3s ease;
    margin-bottom: 30px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
}

.lawyer-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(124, 6, 5, 0.1);
    /* Subtle red tinted shadow */
    border-color: #f9f9f9;
}

.lawyer-card-img-container {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    position: relative;
    padding: 5px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.lawyer-card-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
}

.lawyer-card h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 15px 0 5px;
    line-height: 1.3;
}

.lawyer-card h3 a {
    color: #333;
    text-decoration: none;
    transition: color 0.2s;
}

.lawyer-card h3 a:hover {
    color: #7C0605;
}

.lawyer-card .specialization-label {
    color: #7C0605;
    font-size: 11px;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 10px;
    display: block;
}

.lawyer-card .specialization-list {
    font-size: 13px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
    min-height: 40px;
    /* Align buttons */
}

.lawyer-card .btn-profile {
    display: inline-block;
    padding: 10px 30px;
    border-radius: 50px;
    background: #fff;
    color: #333;
    border: 2px solid #eee;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    transition: all 0.3s;
    text-decoration: none;
    letter-spacing: 0.5px;
}

.lawyer-card .btn-profile:hover {
    background: #7C0605;
    color: #fff;
    border-color: #7C0605;
    box-shadow: 0 5px 15px rgba(124, 6, 5, 0.2);
}