/* Mortgage Types Hero Section - Modern Redesign */
/* Used by: Residential, Investment, Remortgaging, and Specialist Mortgage Types pages */

/* Hero Section - Main Container with Background */
.mortgage-hero {
    position: relative;
    width: 100vw;
    min-height: 600px;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    overflow: hidden;
    background: linear-gradient(135deg, var(--color-primary-dark-blue) 0%, var(--color-primary-navy) 50%, var(--color-primary-dark-blue) 100%);
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    margin-top: -80px; /* Pull up to eliminate gap from header */
    padding: 0;
    isolation: isolate;
}

@media (max-width: 768px) {
    .mortgage-hero {
        margin-top: -70px; /* Mobile: 70px header */
    }
}

/* Background Image Container */
.mortgage-hero__bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
    transform: scale(1.05);
    transition: transform var(--transition-slow);
}

.mortgage-hero:hover .mortgage-hero__bg {
    transform: scale(1);
}

.mortgage-hero__bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    position: relative;
    z-index: 1;
    will-change: transform;
    animation: heroImageFadeIn 1s ease-out;
}

@keyframes heroImageFadeIn {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Modern Gradient Overlay for better text readability */
.mortgage-hero__bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        rgba(23, 23, 73, 0.85) 0%,
        rgba(39, 65, 133, 0.75) 50%,
        rgba(23, 23, 73, 0.9) 100%
    );
    z-index: 2;
    animation: overlayFadeIn 0.8s ease-out;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Decorative gradient accent */
.mortgage-hero__bg::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at 20% 50%,
        rgba(247, 168, 37, 0.15) 0%,
        transparent 50%
    );
    z-index: 3;
    pointer-events: none;
}

/* Content Container */
.mortgage-hero__content {
    position: relative;
    z-index: 20;
    padding: var(--spacing-xl) var(--spacing-sm);
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    color: var(--color-white);
    animation: contentSlideUp 0.8s ease-out 0.2s both;
}

@keyframes contentSlideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .mortgage-hero__content {
        padding: var(--spacing-xl) var(--spacing-lg);
    }
}

@media (min-width: 1024px) {
    .mortgage-hero__content {
        padding: var(--spacing-xl) var(--spacing-xl);
    }
}

/* Ensure all text in hero content is white and above overlay */
.mortgage-hero__content * {
    color: var(--color-white) !important;
    position: relative;
    z-index: 21;
}

/* Hero Title - Modern Typography */
.mortgage-hero__title {
    color: var(--color-white) !important;
    font-size: 2.5rem;
    font-weight: var(--font-weight-extrabold);
    margin-bottom: var(--spacing-md);
    line-height: 1.15;
    position: relative;
    z-index: 21;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
    animation: titleFadeIn 0.8s ease-out 0.3s both;
}

@keyframes titleFadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .mortgage-hero__title {
        font-size: 3.5rem;
        margin-bottom: var(--spacing-lg);
    }
}

@media (min-width: 1024px) {
    .mortgage-hero__title {
        font-size: 4rem;
        line-height: 1.1;
    }
}

@media (min-width: 1280px) {
    .mortgage-hero__title {
        font-size: 4.5rem;
    }
}

/* Hero Description - Enhanced Readability */
.mortgage-hero__desc {
    color: var(--color-white) !important;
    font-size: var(--font-size-lg);
    line-height: 1.7;
    opacity: 0.95;
    position: relative;
    z-index: 21;
    max-width: 700px;
    text-shadow: 0 1px 10px rgba(0, 0, 0, 0.2);
    animation: descFadeIn 0.8s ease-out 0.4s both;
}

@keyframes descFadeIn {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 0.95;
        transform: translateY(0);
    }
}

@media (min-width: 768px) {
    .mortgage-hero__desc {
        font-size: var(--font-size-xl);
        line-height: 1.75;
        max-width: 750px;
    }
}

@media (min-width: 1024px) {
    .mortgage-hero__desc {
        font-size: 1.375rem;
        max-width: 800px;
    }
}

/* Breadcrumb Styles - Modern Design */
.mortgage-hero__breadcrumb {
    margin-bottom: var(--spacing-lg);
    position: relative;
    z-index: 21;
    animation: breadcrumbFadeIn 0.8s ease-out 0.1s both;
}

@keyframes breadcrumbFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.mortgage-hero__breadcrumb .breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    list-style: none;
    padding: 0;
    margin: 0;
    color: var(--color-white) !important;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-medium);
    opacity: 0.9;
    position: relative;
    z-index: 21;
}

.mortgage-hero__breadcrumb .breadcrumb li {
    color: var(--color-white) !important;
    position: relative;
    z-index: 21;
    display: flex;
    align-items: center;
}

.mortgage-hero__breadcrumb .breadcrumb a {
    color: var(--color-white) !important;
    text-decoration: none;
    transition: all var(--transition-fast);
    font-weight: var(--font-weight-medium);
    position: relative;
    z-index: 21;
    padding: 0.25rem 0;
    border-bottom: 1px solid transparent;
}

.mortgage-hero__breadcrumb .breadcrumb a:hover {
    color: var(--color-accent-orange) !important;
    border-bottom-color: var(--color-accent-orange);
    transform: translateY(-1px);
}

.mortgage-hero__breadcrumb .breadcrumb span {
    color: rgba(255, 255, 255, 0.6) !important;
    position: relative;
    z-index: 21;
    margin: 0 0.25rem;
}

/* Override Tailwind text color classes in hero */
.mortgage-hero .text-white,
.mortgage-hero .text-gray-100 {
    color: var(--color-white) !important;
    position: relative;
    z-index: 21;
}

/* Responsive height adjustments */
@media (max-width: 767px) {
    .mortgage-hero {
        min-height: 500px;
        height: 500px;
        align-items: flex-end;
    }
    
    .mortgage-hero__content {
        padding: var(--spacing-lg) var(--spacing-sm);
    }
    
    .mortgage-hero__title {
        font-size: 2rem;
        margin-bottom: var(--spacing-md);
    }
    
    .mortgage-hero__desc {
        font-size: var(--font-size-base);
        line-height: 1.6;
    }
    
    .mortgage-hero__breadcrumb {
        margin-bottom: var(--spacing-md);
    }
}

@media (max-width: 480px) {
    .mortgage-hero {
        min-height: 450px;
        height: 450px;
    }
    
    .mortgage-hero__title {
        font-size: 1.75rem;
    }
    
    .mortgage-hero__desc {
        font-size: var(--font-size-sm);
    }
}

/* Smooth scroll behavior */
@media (prefers-reduced-motion: no-preference) {
    .mortgage-hero__bg img {
        transition: transform var(--transition-slow);
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .mortgage-hero__bg::after {
        background: rgba(0, 0, 0, 0.8);
    }
    
    .mortgage-hero__title,
    .mortgage-hero__desc {
        text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
    }
}

