/* Custom Styles for Služby pro rodinu */

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Navbar scroll effect */
#navbar.scrolled {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Active nav link */
.nav-link.active {
    color: #b60404 !important;
    background: #fdf0f0;
}

/* Hero section gradient - animated */
.hero-gradient {
    background: linear-gradient(135deg, #b60404 0%, #d40505 50%, #8a0303 100%);
    background-size: 200% 200%;
    animation: gradientShift 8s ease infinite;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* CMS content styling */
.cms-content h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: #1a1a2e;
}

.cms-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-top: 1.25rem;
    margin-bottom: 0.5rem;
    color: #1a1a2e;
}

.cms-content p {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.cms-content ul {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    list-style-type: disc;
}

.cms-content ol {
    margin-bottom: 1rem;
    padding-left: 1.5rem;
    list-style-type: decimal;
}

.cms-content hr {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
}

.cms-content li {
    margin-bottom: 0.25rem;
    line-height: 1.6;
}

.cms-content a {
    color: #b60404;
    text-decoration: underline;
}

.cms-content a:hover {
    color: #d40505;
}

.cms-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 1rem 0;
}

.cms-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1rem 0;
}

.cms-content table th,
.cms-content table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
}

.cms-content table th {
    background: #f9fafb;
    font-weight: 600;
}

/* Card hover effect - enhanced */
.card-hover {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
    border: 2px solid transparent !important;
    cursor: default;
}

.card-hover:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12) !important;
    border-color: #f3d1d1 !important;
}

a.card-hover {
    cursor: pointer;
}

/* Service card icon */
.service-icon {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #b60404, #d40505);
    color: white;
    font-size: 1.5rem;
    flex-shrink: 0;
}

/* Employee card */
.employee-photo {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid #fdf0f0;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.employee-photo:hover {
    transform: scale(1.05);
    border-color: #b60404;
}

/* Button gradient */
.btn-gradient {
    background: linear-gradient(135deg, #b60404, #d40505);
    color: white;
    transition: all 0.3s ease;
}

.btn-gradient:hover {
    background: linear-gradient(135deg, #d40505, #b60404);
    transform: translateY(-1px);
    box-shadow: 0 4px 15px rgba(182, 4, 4, 0.4);
}

/* News card image */
.news-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

/* Image lazy fade-in */
img[loading="lazy"] {
    opacity: 0;
    animation: imgFadeIn 0.5s ease forwards;
}

@keyframes imgFadeIn {
    to { opacity: 1; }
}

/* Form input focus effects */
.form-input-styled {
    transition: all 0.25s ease;
    border: 2px solid #e5e7eb;
}

.form-input-styled:focus {
    border-color: #b60404;
    box-shadow: 0 0 0 3px rgba(182, 4, 4, 0.1);
    outline: none;
}

.form-input-styled:hover:not(:focus) {
    border-color: #d1d5db;
}

/* Form label float effect */
.form-group-float {
    position: relative;
}

.form-group-float label {
    transition: color 0.25s ease;
}

.form-group-float:focus-within label {
    color: #b60404;
}

/* Mobile menu slide animation */
#mobileMenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s ease, opacity 0.25s ease;
    opacity: 0;
}

#mobileMenu.menu-open {
    max-height: 500px;
    opacity: 1;
}

/* Hamburger animation */
.hamburger-line {
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform-origin: center;
}

.menu-active .hamburger-line:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.menu-active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.menu-active .hamburger-line:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* Pagination for frontend */
.front-pagination a,
.front-pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    font-size: 0.875rem;
    transition: all 0.2s;
}

.front-pagination a {
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.front-pagination a:hover {
    background: #b60404;
    color: white;
    border-color: #b60404;
}

.front-pagination span.active {
    background: #b60404;
    color: white;
    border: 1px solid #b60404;
}

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

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Print styles */
@media print {
    nav, footer, .no-print { display: none !important; }
    main { padding: 0 !important; }
}
