/* =========================================
   ROZVODOVYPRAVNIK.SK - DESIGN SYSTEM 2025
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800&family=Inter:wght@300;400;500;600&display=swap');

:root {
    /* Color Palette */
    --bg-base: #1e2028;
    /* Deep midnight blue-grey */
    --surface: #262a35;
    /* Card surface */
    --surface-glass: rgba(38, 42, 53, 0.7);
    /* Translucent surface */

    --brand-gold: #dfa96b;
    /* Primary accent */
    --brand-gold-glow: rgba(223, 169, 107, 0.4);
    --brand-red: #e14050;
    /* Secondary accent / Danger */

    --text-main: #f8f9fa;
    /* Pure text */
    --text-muted: #a1a6b4;
    /* Muted/Secondary text */
    --border-color: rgba(255, 255, 255, 0.08);

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', system-ui, -apple-system, sans-serif;

    /* Transitions */
    --transition-smooth: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);

    /* Layout */
    --nav-height: 80px;
    --tabbar-height: 70px;
}

/* =========================================
   BASE STYLES
   ========================================= */
body {
    background-color: var(--bg-base);
    color: var(--text-main);
    font-family: var(--font-body);
    font-weight: 300;
    line-height: 1.6;
    padding-top: var(--nav-height);
    /* Space for fixed desktop nav */
    overflow-x: hidden;
}

/* On mobile, pad the bottom for the tab bar instead of the top */
@media (max-width: 767.98px) {
    body {
        padding-top: 60px;
        /* smaller top padding */
        padding-bottom: calc(var(--tabbar-height) + 20px);
    }
}

h1,
h2,
h3,
h4,
h5,
h6,
.display-1,
.display-2,
.display-3,
.display-4,
.display-5,
.display-6 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

a {
    color: var(--brand-gold);
    text-decoration: none;
    transition: var(--transition-smooth);
}

a:hover {
    color: var(--brand-red);
}

.text-brand {
    color: var(--brand-gold) !important;
}

.text-muted {
    color: var(--text-muted) !important;
}

.bg-dark {
    background-color: var(--surface) !important;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-brand {
    background: linear-gradient(135deg, var(--brand-gold), #cd9558);
    color: #111;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    font-family: var(--font-heading);
    padding: 12px 28px;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px var(--brand-gold-glow);
    position: relative;
    overflow: hidden;
}

.btn-brand:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px var(--brand-gold-glow);
    color: #000;
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
/* Desktop Navbar */
.navbar {
    background: transparent !important;
    transition: var(--transition-smooth);
    padding: 1.5rem 0 !important;
    backdrop-filter: blur(0px);
}

.navbar.scrolled {
    background: var(--surface-glass) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    padding: 1rem 0 !important;
    border-bottom: 1px solid var(--border-color);
}

.navbar-brand {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    letter-spacing: -0.5px;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1.05rem;
    color: var(--text-main) !important;
    position: relative;
    padding: 0.5rem 1rem !important;
    transition: var(--transition-smooth);
}

.nav-link:hover,
.nav-link.active {
    color: var(--brand-gold) !important;
}

/* Active Indicator */
@media (min-width: 768px) {
    .nav-link::after {
        content: '';
        position: absolute;
        bottom: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 0;
        height: 2px;
        background-color: var(--brand-gold);
        transition: var(--transition-smooth);
        border-radius: 2px;
    }

    .nav-link.active::after,
    .nav-link:hover::after {
        width: 80%;
    }
}

/* =========================================
   MOBILE BOTTOM TAB BAR (App-like)
   ========================================= */
.bottom-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--tabbar-height);
    background: var(--surface-glass);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid var(--border-color);
    z-index: 1030;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    padding-bottom: env(safe-area-inset-bottom);
    /* iOS safe area */
}

.tab-bar-nav {
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    text-decoration: none;
    transition: var(--transition-smooth);
    padding: 0.5rem 0;
}

.tab-item i {
    font-size: 1.3rem;
    margin-bottom: 3px;
    transition: transform 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.tab-item span {
    font-size: 0.65rem;
    font-weight: 500;
    font-family: var(--font-heading);
}

.tab-item.active {
    color: var(--brand-gold);
}

.tab-item.active i {
    transform: translateY(-2px) scale(1.1);
}

.tab-item:active {
    color: var(--brand-red);
}

@media (max-width: 767.98px) {
    .desktop-nav-items {
        display: none !important;
    }

    .bottom-tab-bar {
        display: block;
    }

    .navbar.fixed-top {
        background: var(--bg-base) !important;
        border-bottom: 1px solid var(--border-color);
        padding: 0.75rem 0 !important;
    }
}

/* =========================================
   HERO HEADERS
   ========================================= */
header.hero-section {
    background-image: linear-gradient(to bottom, rgba(30, 32, 40, 0.4), var(--bg-base)), url('../rozvodovypravnik.webp');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

header.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(0, 0, 0, 0) 0%, rgba(30, 32, 40, 0.8) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 2;
}

/* Modifier for subpages */
header.hero-subpage {
    padding-top: 6rem !important;
    padding-bottom: 4rem !important;
    background-image: linear-gradient(to bottom, rgba(30, 32, 40, 0.7), var(--bg-base)), url('../rozvodovypravnik.webp');
}

/* =========================================
   CARDS & CONTAINERS (Glassmorphism)
   ========================================= */
.card,
.glass-card {
    background: var(--surface);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    color: var(--text-main);
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card-lg {
    min-height: 340px;
    display: flex;
    flex-direction: column;
}

.card-lg:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4);
    border-color: rgba(223, 169, 107, 0.3);
}

.card-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    background: rgba(223, 169, 107, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    transition: var(--transition-smooth);
}

.card-lg:hover .card-icon-wrapper {
    background: var(--brand-gold);
    transform: scale(1.05) rotate(5deg);
}

.card-lg:hover .card-icon-wrapper i {
    color: #111 !important;
}

/* =========================================
   FORMS & FLOATING LABELS
   ========================================= */
.form-floating>.form-control,
.form-floating>.form-select {
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    border-radius: 12px;
}

.form-floating>.form-control:focus {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: var(--brand-gold);
    box-shadow: 0 0 0 4px rgba(223, 169, 107, 0.1);
    color: var(--text-main);
}

.form-floating>label {
    color: var(--text-muted);
}

.form-floating>.form-control:focus~label,
.form-floating>.form-control:not(:placeholder-shown)~label,
.form-floating>.form-select~label {
    color: var(--brand-gold);
    opacity: 1;
    background-color: transparent !important;
}

/* Fix for white background on floating labels */
.form-floating>.form-control:focus~label::after,
.form-floating>.form-control:not(:placeholder-shown)~label::after,
.form-floating>.form-select~label::after {
    background-color: transparent !important;
}

.form-check-input {
    background-color: rgba(0, 0, 0, 0.3);
    border-color: var(--border-color);
}

.form-check-input:checked {
    background-color: var(--brand-gold);
    border-color: var(--brand-gold);
}

/* =========================================
   ACCORDIONS
   ========================================= */
.accordion-item {
    background: transparent;
    border: none;
    margin-bottom: 1rem;
}

.accordion-button {
    background: var(--surface);
    color: var(--text-main);
    border-radius: 14px !important;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: var(--transition-smooth);
}

.accordion-button:not(.collapsed) {
    background: var(--surface);
    color: var(--brand-gold);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border-color: rgba(223, 169, 107, 0.2);
    border-bottom-left-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
}

.accordion-button:focus {
    box-shadow: none;
}

.accordion-button::after {
    filter: invert(1) brightness(0.6);
}

.accordion-button:not(.collapsed)::after {
    filter: invert(1) brightness(1) sepia(1) hue-rotate(-20deg) saturate(300%);
}

.accordion-body {
    background: rgba(38, 42, 53, 0.5);
    border: 1px solid rgba(223, 169, 107, 0.2);
    border-top: none;
    border-bottom-left-radius: 14px;
    border-bottom-right-radius: 14px;
    padding: 1.5rem;
}

.accordion-header i {
    color: var(--brand-gold);
    margin-right: 1rem;
    font-size: 1.2rem;
    transition: var(--transition-smooth);
}

/* =========================================
   TIMELINE (Rozvod)
   ========================================= */
.timeline-modern {
    position: relative;
    padding-left: 2.5rem;
}

.timeline-modern::before {
    content: '';
    position: absolute;
    top: 10px;
    bottom: 20px;
    left: 20px;
    width: 2px;
    background: linear-gradient(to bottom, var(--brand-gold), rgba(223, 169, 107, 0.1));
}

.timeline-item {
    position: relative;
    margin-bottom: 2.5rem;
}

.timeline-indicator {
    position: absolute;
    left: -2.5rem;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--surface);
    border: 2px solid var(--brand-gold);
    color: var(--brand-gold);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-family: var(--font-heading);
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.3);
    z-index: 2;
}

/* =========================================
   ANIMATIONS (Scroll Reveal)
   ========================================= */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   COOKIE CONSENT CUSTOMIZATION
   ========================================= */
:root {
    --cc-bg: #2a2e39;
    --cc-text: var(--text-main);
    --cc-btn-primary-bg: var(--brand-gold);
    --cc-btn-primary-text: #111;
    --cc-btn-primary-hover-bg: #cd9558;
    --cc-btn-primary-hover-text: #000;
    --cc-btn-secondary-bg: #414859;
    --cc-btn-secondary-text: #ffffff;
    --cc-btn-secondary-hover-bg: #525b70;
    --cc-toggle-bg-on: var(--brand-gold);
    --cc-toggle-bg-readonly: #555;
    --cc-font-family: var(--font-body);
}

#cc-main .cm__title,
#cc-main .pm__title,
#cc-main .cm__desc,
#cc-main .cm__btn.cm__btn--secondary,
#cc-main .pm__btn.pm__btn--secondary {
    color: #ffffff !important;
    border: none !important;
}