/* Local Raleway font files — self-hosted, no Google Fonts dependency.
   Both latin and latin-ext subsets are declared so Croatian characters
   đ/š/ž/ć/č use the same Raleway family as the rest of the text. */

@font-face {
    font-family: "Raleway";
    src: url("assets/fonts/raleway-latin-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Raleway";
    src: url("assets/fonts/raleway-latin-ext-400-normal.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Raleway";
    src: url("assets/fonts/raleway-latin-500-normal.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Raleway";
    src: url("assets/fonts/raleway-latin-ext-500-normal.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Raleway";
    src: url("assets/fonts/raleway-latin-600-normal.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Raleway";
    src: url("assets/fonts/raleway-latin-ext-600-normal.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: "Raleway";
    src: url("assets/fonts/raleway-latin-700-normal.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: "Raleway";
    src: url("assets/fonts/raleway-latin-ext-700-normal.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============================================
   BFMS Law Firm - Stylesheet
   Color Palette (derived from logo):
   - Primary: #1a1a1a (near-black)
   - Background: #fafafa / #f5f4f4 (off-white)
   - Neutral: #666565 (medium gray)
   - Accent: #2c2c2c (charcoal)
   - White: #ffffff
   ============================================ */

/* CSS Variables */
:root {
    --color-primary: #171717;
    --color-secondary: #2f2a26;
    --color-text: #1b1b1b;
    --color-text-muted: #645e59;
    --color-background: #f6f3ef;
    --color-background-alt: #efebe5;
    --color-white: #ffffff;
    --color-border: #e2ddd6;
    
    --font-primary: 'Raleway', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-sans: 'Raleway', -apple-system, BlinkMacSystemFont, sans-serif;
    
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    
    --transition: 0.3s ease;
    --max-width: 1200px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-text);
    background: linear-gradient(180deg, #f6f3ef 0%, #f9f7f4 100%);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    color: var(--color-text-muted);
}

/* Container */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* ============================================
   Navigation
   ============================================ */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: rgba(255, 252, 248, 0.82);
    border-bottom: 1px solid rgba(226, 221, 214, 0.8);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    transition: box-shadow var(--transition), background-color var(--transition);
}

.nav.scrolled {
    background-color: rgba(255, 252, 248, 0.94);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--spacing-sm) var(--spacing-md);
}

.nav-logo {
    display: flex;
    align-items: center;
    margin-right: var(--spacing-md);
}

.logo-img {
    height: 42px;
    width: auto;
    max-width: min(420px, 42vw);
    object-fit: contain;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: var(--spacing-md);
    margin-left: auto;
}

.nav-link {
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: var(--color-text);
    padding: var(--spacing-xs) 0;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: var(--color-primary);
    transition: width var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: var(--color-primary);
}

.language-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.lang-link {
    color: var(--color-text-muted);
    letter-spacing: 0.05em;
}

.lang-link.active,
.lang-link:hover {
    color: var(--color-primary);
}

/* Mobile Navigation Toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--spacing-xs);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background-color: var(--color-primary);
    transition: transform var(--transition), opacity var(--transition);
}

/* ============================================
   Hero Section
   ============================================ */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: stretch;
    justify-content: center;
    text-align: center;
    background:
        linear-gradient(180deg, rgba(246, 243, 239, 0.04) 0%, rgba(246, 243, 239, 0.06) 38%, rgba(246, 243, 239, 0.42) 72%, rgba(246, 243, 239, 0.9) 100%),
        url('assets/brand/hero-background.png') center center / cover no-repeat;
    padding: var(--spacing-xl) var(--spacing-md);
    padding-top: calc(var(--spacing-xl) + 60px);
}

.hero::after {
    content: '';
    position: absolute;
    inset: auto 0 0 0;
    height: 18%;
    background: linear-gradient(180deg, rgba(246, 243, 239, 0) 0%, rgba(246, 243, 239, 0.9) 100%);
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: var(--max-width);
    min-height: calc(100vh - 120px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-copy {
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    padding: 0;
    background: transparent;
    border: 0;
    border-radius: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    box-shadow: none;
}

.hero-brand-logo {
    display: block;
    width: min(520px, 78vw);
    max-width: 100%;
    height: auto;
    margin: 0 auto;
}

.hero-cta {
    display: inline-block;
    padding: 0.9rem 1.4rem;
    background-color: rgba(23, 23, 23, 0.96);
    color: var(--color-white);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    border: 1px solid rgba(23, 23, 23, 0.96);
    border-radius: 999px;
    transition: transform var(--transition), background-color var(--transition), color var(--transition), box-shadow var(--transition);
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.16);
}

.hero-cta:hover {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--color-primary);
    transform: translateY(-2px);
}

/* ============================================
   Sections
   ============================================ */
.section {
    padding: var(--spacing-xl) 0;
}

.section-alt {
    background: linear-gradient(180deg, rgba(239, 235, 229, 0.78) 0%, rgba(245, 241, 236, 0.92) 100%);
}

.section-title {
    font-family: var(--font-primary);
    font-size: clamp(1.9rem, 4vw, 2.6rem);
    font-weight: 600;
    letter-spacing: 0.01em;
    text-align: center;
    margin-bottom: var(--spacing-md);
    color: var(--color-primary);
}

.section-intro {
    max-width: 800px;
    margin: 0 auto var(--spacing-lg);
    text-align: center;
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-text-muted);
}

/* ============================================
   Team Section
   ============================================ */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: var(--spacing-md);
}

.team-member {
    border-radius: 22px;
    text-align: center;
    padding: var(--spacing-md);
    background-color: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition), box-shadow var(--transition);
}

.team-member:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.09);
}

.team-photo {
    width: 120px;
    height: 120px;
    margin: 0 auto var(--spacing-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.team-photo-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.team-name {
    font-family: var(--font-primary);
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--color-primary);
}

.team-title {
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--color-text-muted);
    margin-bottom: var(--spacing-sm);
}

.team-bio {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

/* ============================================
   Practice Areas Section
   ============================================ */
.practice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.practice-item {
    border-radius: 22px;
    padding: var(--spacing-md);
    background-color: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--color-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    transition: transform var(--transition), box-shadow var(--transition);
}

.practice-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.09);
}

.practice-icon {
    width: 56px;
    height: 56px;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem;
    background: rgba(23, 23, 23, 0.06);
    border-radius: 18px;
}

.practice-icon svg {
    width: 100%;
    height: 100%;
}

.practice-title {
    font-family: var(--font-primary);
    font-size: 1.2rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--color-primary);
}

.practice-desc {
    font-size: 0.95rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

/* ============================================
   Contact Section
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-lg);
    align-items: start;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    padding: var(--spacing-md);
    background-color: rgba(255, 255, 255, 0.82);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.contact-item {
    display: flex;
    gap: var(--spacing-sm);
    align-items: flex-start;
}

.contact-icon {
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    color: var(--color-primary);
    margin-top: 2px;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
}

.contact-text h4 {
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: var(--spacing-xs);
    color: var(--color-primary);
}

.contact-text p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.contact-text a {
    color: var(--color-text-muted);
    border-bottom: 1px solid transparent;
    transition: border-color var(--transition);
}

.contact-text a:hover {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.phone-list {
    display: grid;
    gap: 0.35rem;
}

.phone-list span {
    display: block;
}


.contact-map {
    height: 350px;
    background-color: var(--color-background-alt);
    border: 1px solid var(--color-border);
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.contact-map iframe {
    display: block;
    width: 100%;
    height: 100%;
}

/* ============================================
   Footer
   ============================================ */
.footer {
    background: linear-gradient(180deg, #1a1a1a 0%, #111111 100%);
    color: var(--color-white);
    padding: var(--spacing-lg) 0;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
    gap: var(--spacing-md);
}

.footer-logo-img {
    height: 52px;
    max-width: min(560px, 90vw);
    width: auto;
    object-fit: contain;
}

.footer-text {
    font-size: 0.9rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.7);
}

/* ============================================
   Responsive Design
   ============================================ */
@media (max-width: 992px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
    
    .contact-map {
        height: 300px;
    }
}

@media (max-width: 768px) {
    .nav-logo {
        margin-right: var(--spacing-sm);
    }

    .logo-img {
        height: 34px;
        max-width: 58vw;
    }

    .nav-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background-color: var(--color-white);
        flex-direction: column;
        padding: var(--spacing-md);
        gap: 0;
        border-bottom: 1px solid var(--color-border);
        transform: translateY(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
    }
    
    .nav-menu.active {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-link {
        display: block;
        padding: var(--spacing-sm) 0;
        border-bottom: 1px solid var(--color-border);
    }
    
    .nav-link:last-child {
        border-bottom: none;
    }

    .language-switch {
        padding-top: var(--spacing-sm);
    }
    
    /* Hamburger animation */
    .nav-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
    
    .hero {
        padding-top: calc(var(--spacing-lg) + 60px);
        min-height: auto;
        padding-bottom: var(--spacing-lg);
    }
    
    .hero {
        min-height: 92vh;
        background-position: 54% center;
        padding-bottom: var(--spacing-lg);
    }

    .hero-content {
        min-height: calc(92vh - 110px);
        align-items: center;
    }

    .hero-copy {
        width: min(100%, 640px);
        padding: 0;
    }

    .hero-brand-logo {
        width: min(560px, 88vw);
    }

    .section {
        padding: var(--spacing-lg) 0;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .practice-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 3rem;
        --spacing-xl: 4rem;
    }
    

    .hero-logo-stage {
        width: min(432px, 100%);
    }

    .hero-name {
        font-size: clamp(1.5rem, 7vw, 2.2rem);
    }
    
    .hero-copy {
        gap: 1rem;
    }

    .hero-brand-logo {
        width: min(480px, 92vw);
    }

    .hero-cta {
        width: auto;
        justify-content: center;
    }
}


@media (max-width: 768px) {
    .logo-profile {
        gap: 0.5rem;
        padding: 0.45rem 0.6rem;
        font-size: 0.85rem;
    }

    .logo-profile-img {
        width: 34px;
        height: 34px;
    }

    .logo-profile-b,
    .logo-profile-m {
        left: 0;
        --profile-x: 0;
    }

    .logo-profile-f,
    .logo-profile-s {
        right: 0;
        --profile-x: 0;
    }
}

/* ============================================
   Utility Classes
   ============================================ */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Mobile hero background visibility fix */
@media (max-width: 768px) {
    .hero {
        min-height: 100svh;
        background-position: 32% center;
        background-size: cover;
    }

    .hero-content {
        min-height: calc(100svh - 110px);
    }

    .hero-brand-logo {
        width: min(390px, 76vw);
        max-height: 240px;
    }
}

@media (max-width: 480px) {
    .hero {
        background-position: 31% center;
    }

    .hero-brand-logo {
        width: min(320px, 74vw);
        max-height: 210px;
    }
}
