/*
 * GCT Bhakkar - Hero Section Styles
 * Hero and banner styling patterns
 */

/* ===== HERO BASE ===== */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: var(--navbar-height);
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 900px;
    padding: var(--space-8);
}

/* ===== HERO BACKGROUNDS ===== */

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-bg-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65) contrast(1.1);
}

/* Optimized gradient for text focus with natural background visibility */
.hero-bg-overlay {
    position: absolute;
    inset: 0;
    /* Stronger vignette for title focus */
    background: radial-gradient(circle at center, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.85) 90%);
    z-index: 1;
}

/* Optimized gradient for text focus with natural background visibility */
.hero-bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg,
            rgba(15, 23, 42, 0.2) 0%,
            rgba(15, 23, 42, 0.6) 50%,
            rgba(15, 23, 42, 0.9) 100%);
    z-index: 1;
}

/* ===== HERO TEXT ===== */

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    color: var(--color-text-primary);
    margin-bottom: var(--space-6);
    line-height: 1.1;
    letter-spacing: -0.02em;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.hero-title .highlight {
    color: var(--color-accent-gold);
    position: relative;
    display: inline-block;
}

.hero-title .accent {
    color: var(--color-accent-primary, #3b82f6);
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
    font-weight: 400;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* ===== HERO BUTTONS ===== */

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ===== HERO CAROUSEL ===== */

.hero-carousel {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-carousel .carousel-item {
    height: 100vh;
    overflow: hidden;
    /* Ensure zoom doesn't overflow */
}

.hero-carousel .carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.65);
    transform-origin: center center;
    transition: transform 6s ease-in-out;
    /* Fallback */
}

/* Ken Burns Effect on Active Slide */
.hero-carousel .carousel-item.active img {
    animation: kenBurns 8s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes kenBurns {
    0% {
        transform: scale(1);
    }

    100% {
        transform: scale(1.15);
    }
}

/* Progress Bar */
.hero-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: 20;
}

.hero-progress-bar {
    height: 100%;
    background: var(--color-accent-primary, #3b82f6);
    width: 0;
}

.hero-carousel .carousel-item.active .hero-progress-bar {
    animation: loader 5s linear forwards;
    /* Matches Bootstrap interval */
}

@keyframes loader {
    0% {
        width: 0;
    }

    100% {
        width: 100%;
    }
}

.hero-carousel .carousel-caption {
    top: 45%;
    transform: translateY(-50%);
    bottom: auto;
    z-index: 10;
    padding-bottom: 8rem;
    /* Space for hero cards */
}

/* Carousel Controls */
.hero-carousel .carousel-control-prev,
.hero-carousel .carousel-control-next {
    width: 3.5rem;
    height: 3.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    margin: 0 var(--space-4);
    opacity: 0.7;
    transition: all 0.3s ease;
}

.hero-carousel .carousel-control-prev:hover,
.hero-carousel .carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
    opacity: 1;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.hero-carousel .carousel-control-prev-icon,
.hero-carousel .carousel-control-next-icon {
    width: 1.25rem;
    height: 1.25rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* ===== PAGE HERO (Smaller) ===== */

.hero-page {
    min-height: 50vh;
    background: linear-gradient(135deg, var(--color-primary-dark), var(--color-secondary-dark));
}

.hero-page .hero-title {
    font-size: var(--text-5xl);
}

.hero-page .hero-subtitle {
    font-size: var(--text-lg);
}

/* ===== HERO BREADCRUMB ===== */

.hero-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
}

.breadcrumb-link {
    color: var(--color-text-muted);
    font-size: var(--text-sm);
    transition: color var(--transition-fast);
}

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

.breadcrumb-separator {
    color: var(--color-text-muted);
    font-size: var(--text-xs);
}

.breadcrumb-current {
    color: var(--color-accent-primary);
    font-size: var(--text-sm);
    color: var(--font-medium);
}

/* Carousel Caption - Move up to make room for cards */
.hero-carousel .carousel-caption {
    top: 38%;
    /* Moved up significantly */
    transform: translateY(-50%);
    bottom: auto;
    z-index: 10;
    padding-bottom: 0;
}

/* ===== HERO CARDS (Bottom floating - Enhanced) ===== */

.hero-cards {
    position: absolute;
    bottom: 15%;
    /* Elevated position */
    left: 0;
    right: 0;
    z-index: 30;
    padding: 0 var(--space-4);
}

.hero-cards-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    max-width: var(--container-xl);
    margin: 0 auto;
}

.hero-card {
    background: rgba(15, 23, 42, 0.6);
    /* Darker glass base */
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-xl);
    padding: var(--space-5);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* Hover Effect: Lift & lighter glass */
.hero-card:hover {
    transform: translateY(-8px);
    background: rgba(30, 41, 59, 0.8);
    border-color: var(--card-accent-color, var(--color-accent-primary));
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3),
        0 0 0 1px var(--card-accent-color, var(--color-accent-primary));
}

/* Icon Wrapper */
.hero-card-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-lg);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--card-accent-color);
    transition: all 0.3s ease;
}

.hero-card:hover .hero-card-icon-wrapper {
    background: var(--card-accent-color);
    color: white;
    transform: scale(1.1) rotate(-5deg);
}

.hero-card-content {
    flex: 1;
}

.hero-card-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 700;
    color: var(--card-accent-color);
    margin-bottom: 0.25rem;
}

.hero-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: white;
    margin: 0;
    line-height: 1.2;
}

.hero-card-text {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    margin: 0.25rem 0 0 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== RESPONSIVE ===== */

/* --- Tablet Landscape & Small Desktop (992px - 1200px) --- */
@media (max-width: 1200px) {
    .hero-cards-container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 800px;
        gap: var(--space-3);
    }

    .hero-cards {
        bottom: 8%;
    }

    .hero-carousel .carousel-caption {
        top: 30%;
    }

    .hero-card {
        padding: var(--space-4);
    }

    .hero-card-title {
        font-size: 1rem;
    }
}

/* --- Tablet Portrait (768px - 991px) --- */
@media (max-width: 991px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-cards {
        bottom: 5%;
        padding: 0 var(--space-3);
    }

    .hero-cards-container {
        grid-template-columns: repeat(2, 1fr);
        max-width: 600px;
        gap: 0.75rem;
    }

    .hero-card {
        padding: 0.75rem;
        gap: 0.75rem;
    }

    .hero-card-icon-wrapper {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }

    .hero-card-title {
        font-size: 0.95rem;
    }

    .hero-card-text {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }

    .hero-card-label {
        font-size: 0.65rem;
    }

    .hero-carousel .carousel-caption {
        top: 28%;
    }
}

/* --- Mobile Landscape / Large Mobile (576px - 767px) --- */
@media (max-width: 767px) {

    /* Hero becomes a block container — no flex centering */
    .hero {
        min-height: auto;
        display: block;
        padding-top: 0;
    }

    .hero-content {
        padding-top: 6rem;
    }

    /* CRITICAL: Make carousel flow naturally instead of absolute */
    .hero-carousel {
        position: relative;
        inset: auto;
        z-index: 1;
    }

    /* Carousel slides get a fixed height */
    .hero-carousel .carousel-item {
        height: 75vh;
        min-height: 400px;
    }

    .hero-carousel .carousel-item img {
        height: 100%;
        width: 100%;
        object-fit: cover;
    }

    /* Lighten the background overlay — let image show through */
    .hero-bg-overlay {
        background: linear-gradient(to bottom,
                rgba(0, 0, 0, 0.15) 0%,
                rgba(0, 0, 0, 0.25) 40%,
                rgba(0, 0, 0, 0.45) 75%,
                rgba(0, 0, 0, 0.65) 100%) !important;
    }

    /* Caption stays centered in the slide */
    .hero-carousel .carousel-caption {
        top: 45%;
        transform: translateY(-50%);
        padding-bottom: 0;
        left: 5%;
        right: 5%;
        width: 90%;
    }

    /* Stronger text-shadow for readability */
    .hero-title {
        font-size: 2.25rem;
        margin-bottom: var(--space-3);
        text-shadow: 0 2px 12px rgba(0, 0, 0, 0.7),
            0 4px 24px rgba(0, 0, 0, 0.5);
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: var(--space-4);
        padding: 0 1rem;
        text-shadow: 0 2px 10px rgba(0, 0, 0, 0.6);
    }

    /* Stack buttons */
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.6rem;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 240px;
        font-size: 0.85rem;
        padding: 0.55rem 1.25rem;
    }

    /* Hero Cards — flow below carousel with subtle bg */
    .hero-cards {
        position: relative;
        bottom: auto;
        left: auto;
        right: auto;
        width: 100%;
        padding: 1rem;
        z-index: 10;
        background: linear-gradient(to bottom,
                rgba(15, 23, 42, 0.95) 0%,
                rgba(15, 23, 42, 1) 100%);
        margin-top: -2rem;
    }

    .hero-cards-container {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 0.6rem;
        max-width: 100%;
        padding: 0;
    }

    .hero-card {
        padding: 0.75rem;
        gap: 0.6rem;
        border-radius: var(--radius-lg);
        min-width: auto;
        background: rgba(30, 41, 59, 0.8);
    }

    .hero-card-icon-wrapper {
        width: 36px;
        height: 36px;
        min-width: 36px;
        font-size: 1rem;
        border-radius: var(--radius-md);
    }

    .hero-card-label {
        font-size: 0.6rem;
        margin-bottom: 0.1rem;
    }

    .hero-card-title {
        font-size: 0.85rem;
    }

    .hero-card-text {
        display: none;
    }

    /* Smaller carousel controls on mobile */
    .hero-carousel .carousel-control-prev,
    .hero-carousel .carousel-control-next {
        width: 2.5rem;
        height: 2.5rem;
        opacity: 0.6;
    }

    /* Adjust page hero for mobile */
    .hero-page {
        min-height: 40vh;
    }

    .hero-page .hero-title {
        font-size: 2rem;
    }
}

/* --- Small Mobile (< 480px) --- */
@media (max-width: 480px) {
    .hero-title {
        font-size: 1.85rem;
    }

    .hero-subtitle {
        font-size: 0.85rem;
    }

    .hero-carousel .carousel-item {
        height: 65vh;
        min-height: 350px;
    }

    .hero-cards {
        padding: 0.75rem;
    }

    .hero-cards-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
    }

    .hero-card {
        padding: 0.6rem;
        gap: 0.5rem;
    }

    .hero-card-icon-wrapper {
        width: 30px;
        height: 30px;
        min-width: 30px;
        font-size: 0.85rem;
    }

    .hero-card-label {
        font-size: 0.55rem;
    }

    .hero-card-title {
        font-size: 0.78rem;
    }

    .hero-page .hero-title {
        font-size: 1.75rem;
    }
}

/* --- Extra Small Mobile (< 360px) --- */
@media (max-width: 359px) {
    .hero-title {
        font-size: 1.6rem;
    }

    .hero-subtitle {
        font-size: 0.8rem;
    }

    .hero-carousel .carousel-item {
        height: 55vh;
        min-height: 300px;
    }

    .hero-cards-container {
        grid-template-columns: 1fr;
        gap: 0.4rem;
    }

    .hero-card {
        padding: 0.55rem 0.7rem;
    }

    .hero-card-icon-wrapper {
        width: 28px;
        height: 28px;
        min-width: 28px;
        font-size: 0.8rem;
    }

    .hero-card-title {
        font-size: 0.75rem;
    }

    .hero-card-label {
        font-size: 0.5rem;
    }
}


.hero-page .hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.hero-page .hero-bg-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.7);
}

.hero-page .hero-bg-gradient {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0.4) 0%,
            rgba(0, 0, 0, 0.55) 50%,
            rgba(0, 0, 0, 0.75) 100%);
    z-index: 1;
}

.hero-page .hero-content {
    position: relative;
    z-index: 2;
    padding: 3rem 1.5rem;
}

.hero-page .hero-title {
    color: #ffffff;
    text-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.hero-page .hero-subtitle {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

/* ===== RESPONSIVE ===== */