/**
 * Page Headers - Consolidated header and title styles
 * Used across all pages for consistent header appearance
 */

/* Main Fixed Header - Mobile First */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 60px;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #01235d;
    color: white;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    box-sizing: border-box;
    border-bottom: 1px solid white
}

.header-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Logo */
.logo {
    font-size: 1.5rem;
    padding: 0.5rem 1rem;
    border-radius: 6px;
}

.logo:hover {
    background-color: #2c5aa09b;
    border: 1px solid #709fe49b;
}

/* Header Logo/Brand Image (in top navigation bar) */
.header .header-image {
    width: auto;
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
}

/* Login Button */
.login-btn {
    position: static;
    right: 2rem;
    top: 50%;
    transform: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.2s;
}

.login-btn:hover {
    background-color: #2c5aa09b;
    border: 1px solid #709fe49b;
    color: white;
}

/* Page Title Section */
.main-title {
    position: relative;
    overflow: hidden;
    padding: 2rem 0 1rem;
    margin-bottom: 1rem;
    color: white;
    background: transparent;
}

/* Title Overlay (gradient overlay for readability) */
.title-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 26, 77, 0.85) 0%,
        rgba(0, 26, 77, 0.75) 10%,
        rgba(0, 41, 102, 0.65) 25%,
        rgba(0, 41, 102, 0.5) 40%,
        rgba(0, 60, 130, 0.35) 60%,
        rgba(0, 60, 130, 0.2) 75%,
        rgba(0, 60, 130, 0.1) 90%,
        transparent 100%
    );
    pointer-events: none;
    z-index: 1;
}

.title-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 3rem;
    justify-content: center;
    padding: 0 2rem;
}

.title-text {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.title-text h1 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.title-text p {
    font-size: 1.2rem;
    max-width: 600px;
    margin: 0 auto;
    opacity: 0.9;
}

.title-image {
    flex-shrink: 0;
    max-width: 520px;
    height: 280px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.title-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

.title-image-placeholder {
    flex-shrink: 0;
    width: 45%;
    max-width: 520px;
    height: 280px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
}

.croatia-map {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

/* Edit Button (for admin content editing) */
.edit-btn {
    top: 12px;
    right: 12px;
    border: none;
    background: #facc15;
    color: #111;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-title {
        padding: 1.5rem 0 1rem;
    }

    .title-content {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .title-text {
        width: 100%;
    }

    .title-text h1 {
        font-size: 1.8rem;
        text-align: center;
        margin-bottom: 1rem;
    }

    .title-text p {
        font-size: 1rem;
        text-align: center;
        margin-bottom: 1rem;
    }

    .title-image {
        width: 100%;
        max-width: 100%;
        height: 200px;
        margin: 0 auto;
    }

    .title-image-placeholder {
        width: 100%;
        max-width: 100%;
        height: 200px;
        margin: 0 auto;
    }
}

/* Page-Specific Header (used on detail pages like suites, houses, etc.) */
.page-header {
    position: relative;
    padding: 2rem 0 1rem;
    margin-bottom: -2rem;
    overflow: hidden;
    color: white;
    height: auto;
    background: transparent;
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        to bottom,
        rgba(0, 26, 77, 0.85) 0%,
        rgba(0, 26, 77, 0.75) 10%,
        rgba(0, 41, 102, 0.65) 25%,
        rgba(0, 41, 102, 0.5) 40%,
        rgba(0, 60, 130, 0.35) 60%,
        rgba(0, 60, 130, 0.2) 75%,
        rgba(0, 60, 130, 0.1) 90%,
        transparent 100%
    );
    z-index: 1;
    pointer-events: none;
}

.header-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 3rem;
    justify-content: center;
    padding: 0 2rem;
}

.header-text {
    flex: 1;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.header-content .breadcrumb {
    position: absolute;
    top: 0;
    left: 2rem;
    text-align: left;
    z-index: 10;
    font-size: 0.875rem;
}

.header-text h1,
.header-text p {
    text-align: center;
}

.header-text p {
    text-align: justify;
    text-align-last: center;
}

.breadcrumb a {
    color:rgba(78, 167, 255, 0.75);
}

/* Page Header Image (for detail pages) */
.page-header .header-image {
    flex-shrink: 0;
    width: auto;
    height: auto;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.9);
    background: white;
}

.page-header .header-image img {
    width: auto;
    height: auto;
    object-fit: cover;
    object-position: center;
    display: block;
}

.header-placeholder {
    background: linear-gradient(135deg, #0ea5e9 0%, #06b6d4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: white;
    font-size: 2rem;
    font-weight: 600;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .main-title h1 {
        font-size: 1.8rem;
        text-align: center;
        margin-bottom: 1rem;
    }

    .main-title p {
        font-size: 1rem;
        text-align: center;
        margin-bottom: 2rem;
    }

    .page-header {
        padding: 1.5rem 0 1rem;
    }

    .header-content {
        flex-direction: column;
        gap: 1.5rem;
        padding: 0 1rem;
    }

    .page-header .header-image {
        width: auto;
        max-width: 100%;
        height: 200px;
        margin: 0 auto;
    }

    .page-header .header-text {
        flex: 1;
        text-align: center;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        margin-top: 1.7rem;
    }

    .header-content .breadcrumb {
        position: absolute;
        top: 0;
        left: 1rem;
        text-align: left;
        font-size: 0.875rem;
        z-index: 10;
    }

    .header-text h1,
    .header-text p {
        text-align: center;
    }

    .header-text p {
        text-align: justify;
        text-align-last: center;
    }
}

/* Desktop Styles */
@media (min-width: 1280px) {
    .header {
        height: 70px;
        padding: 0 3rem;
    }

    body {
        padding-top: 70px;
    }

    .main-title h1 {
        font-size: 3rem;
    }
}
