:root {
    /* Club Colors - Red */
    --color-primary: #d32f2f;
    --color-primary-dark: #b71c1c;
    --color-secondary: #ffc107;
    --color-dark: #212529;
    --color-light: #f8f9fa;
    --color-white: #ffffff;
    --color-border: #dee2e6;
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-light);
    color: var(--color-dark);
    line-height: 1.6;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

header {
    background-color: var(--color-white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

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

.logo {
    display: flex;
    align-items: center;
}

.logo img {
    max-height: 50px;
    width: auto;
}

.logo span {
    font-size: 0.8rem;
    color: #777;
    letter-spacing: 1px;
}

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

.nav-links a {
    font-weight: 500;
    transition: color 0.2s;
}

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

/* Footer */
footer {
    background-color: var(--color-dark);
    color: var(--color-white);
    padding: 2rem 0;
    margin-top: auto;
    text-align: center;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.6rem 1.2rem;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.2s;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

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

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

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

.btn-danger {
    background-color: #dc3545;
    color: white;
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="tel"],
textarea,
select {
    width: 100%;
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    background: #fff;
    /* Ensure white background */
}

/* Components */
.card {
    background: var(--color-white);
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.5rem;
}

.header-hero {
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)), url('../images/uvodni-foto.jpg');
    background-size: cover;
    background-position: center;
    color: white;
    text-align: center;
    padding: 6rem 1rem;
    margin-bottom: 3rem;
}

.section-title {
    margin-bottom: 1.5rem;
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.alert {
    padding: 1rem;
    border-radius: 4px;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
}

/* Responsive Utilities */
/* Make images responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Wrapper for tables to allow scrolling on small screens */
table {
    width: 100%;
    border-collapse: collapse;
}

/* Responsive Breakpoints */
@media (max-width: 1024px) {
    nav {
        height: 70px;
    }

    #menu-toggle {
        display: block !important;
        cursor: pointer;
    }

    .nav-links {
        display: none;
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: auto;
        flex-direction: column;
        background-color: var(--color-white);
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #dee2e6;
        padding: 0;
        margin: 0;
        z-index: 999;
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links a {
        display: block;
        padding: 1.2rem 2rem;
        border-bottom: 1px solid #f8f9fa;
        text-align: left;
        width: 100%;
        color: var(--color-dark);
        font-size: 1.1rem;
    }

    .nav-links a:hover {
        background-color: #f8f9fa;
        color: var(--color-primary);
    }

    .nav-links a:last-child {
        border-bottom: none;
    }

    .nav-links .btn-primary {
        margin: 1rem 2rem;
        text-align: center;
        display: block;
        width: auto;
        color: white !important;
    }
}

/* Mobile Layout Fixes (Under 768px matches most phones) */
@media (max-width: 768px) {

    /* Stack generic grid containers */
    div[style*="display: grid"],
    div[style*="grid-template-columns"] {
        display: block !important;
        /* Force stack */
        grid-template-columns: 1fr !important;
    }

    /* Add space between stacked items */
    div[style*="display: grid"]>div,
    div[style*="grid-template-columns"]>div {
        margin-bottom: 1.5rem;
    }

    /* Specific overrides for containers that should overlap or behave differently */

    .header-hero {
        padding: 3rem 1rem;
    }

    h1 {
        font-size: 1.8rem !important;
    }

    p {
        font-size: 1rem !important;
    }

    .container {
        padding: 0 1rem;
    }

    .card {
        padding: 1rem;
    }

    /* Registration form grid fix */
    form div[style*="grid-template-columns"] {
        display: block !important;
    }

    form .form-group {
        margin-bottom: 1rem;
    }

    /* Make buttons full width on small screens */
    .btn {
        width: 100%;
        text-align: center;
        margin-bottom: 0.5rem;
    }
}