/**
 * Stylesheet for Applications Page
 * Matches reference mockup media_1792784476224_9e7637b2.png pixel-perfect:
 * - Hero banner (One Elastic. Endless Possibilities. + Breadcrumbs)
 * - 5-column grid with tall rounded cards
 * - Slow, smooth hover expansion revealing full title and description
 * - Responsive breakpoints for tablets and mobile
 *
 * @package Krishna_Overseas
 */

.krishna-app-page-wrapper {
    width: 100%;
    background-color: #ffffff;
    font-family: var(--krishna-font-primary, 'Poppins', sans-serif);
    color: #22252a;
    line-height: 1.5;
    box-sizing: border-box;
}

/* ==========================================================================
   1. HERO BANNER SECTION
   ========================================================================== */
.krishna-app-hero {
    position: relative;
    width: 100%;
    min-height: 380px;
    height: 400px;
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center right;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
    padding-top: 80px; /* Clearance for floating header navbar */
}

.krishna-app-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(20, 16, 14, 0.94) 0%, rgba(20, 16, 14, 0.85) 42%, rgba(20, 16, 14, 0.25) 75%, rgba(20, 16, 14, 0) 100%);
    z-index: 1;
}

.krishna-app-hero-container {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: var(--krishna-container, 1320px);
    margin: 0 auto;
    padding: 0 25px;
    box-sizing: border-box;
}

.krishna-app-hero-content {
    max-width: 580px;
}

.krishna-app-hero-title {
    font-family: var(--krishna-font-heading, 'Poppins', sans-serif);
    font-size: 38px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.22;
    letter-spacing: -0.5px;
    margin: 0 0 16px 0;
}

.krishna-app-hero-title .hero-line {
    display: block;
}

/* Breadcrumbs */
.krishna-app-breadcrumbs {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.85);
}

.breadcrumb-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.85);
    text-decoration: none;
    transition: color 0.2s ease;
}

.breadcrumb-home:hover {
    color: var(--krishna-primary, #ef7f1a);
}

.breadcrumb-home svg {
    display: block;
    stroke: currentColor;
    opacity: 0.9;
}

.breadcrumb-sep {
    color: rgba(255, 255, 255, 0.5);
    font-size: 15px;
    line-height: 1;
}

.breadcrumb-current {
    color: #ffffff;
    font-weight: 600;
}

/* ==========================================================================
   2. APPLICATIONS GRID SECTION (5 COLUMNS)
   ========================================================================== */
.krishna-app-grid-section {
    position: relative;
    width: 100%;
    background-color: #ffffff;
    padding: 55px 0 85px;
    box-sizing: border-box;
}

.krishna-app-grid-container {
    max-width: 1320px;
    margin: 0 auto;
    padding: 0 24px;
    box-sizing: border-box;
}

.krishna-app-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
}

.krishna-app-card-wrap {
    width: 100%;
    box-sizing: border-box;
}

/* Card Container */
.krishna-app-card {
    position: relative;
    width: 100%;
    height: 350px;
    border-radius: 22px;
    overflow: hidden;
    border: 1.5px solid #dadce3;
    background-color: #a5a9b2;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    box-sizing: border-box;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
    cursor: pointer;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s ease;
}

.krishna-app-card:hover,
.krishna-app-card:focus {
    border-color: #cbd5e1;
    box-shadow: 0 14px 35px rgba(0, 0, 0, 0.1);
    outline: none;
}

/* Image Background Area */
.krishna-app-card-image-box {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: #a5a9b2;
}

.krishna-app-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    display: block;
    transition: transform 0.65s cubic-bezier(0.25, 1, 0.5, 1);
}

.krishna-app-card:hover .krishna-app-card-img,
.krishna-app-card:focus .krishna-app-card-img {
    transform: scale(1.06);
}

.krishna-app-card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, #b8bcc4 0%, #9ca1aa 100%);
}

/* Bottom White Info Box (Smooth Slow Hover Expansion) */
.krishna-app-card-info {
    position: relative;
    z-index: 2;
    width: 100%;
    background: #ffffff;
    border-radius: 18px 18px 0 0;
    padding: 16px 18px;
    box-sizing: border-box;
    box-shadow: 0 -4px 15px rgba(0, 0, 0, 0.03);
    transition: padding 0.55s cubic-bezier(0.25, 1, 0.5, 1);
}

.krishna-app-card:hover .krishna-app-card-info,
.krishna-app-card:focus .krishna-app-card-info {
    padding: 20px 18px 22px 18px;
}

/* Title in Resting vs Hover */
.krishna-app-title-wrap {
    position: relative;
}

.krishna-app-card-title {
    font-family: var(--krishna-font-primary, 'Poppins', sans-serif);
    font-size: 15px;
    font-weight: 700;
    color: #0b192c;
    line-height: 1.3;
    margin: 0;
    transition: color 0.3s ease;
}

.krishna-app-card-title.title-hover {
    display: none;
    font-size: 15.5px;
}

.krishna-app-card:hover .has-hover-title .title-resting,
.krishna-app-card:focus .has-hover-title .title-resting {
    display: none;
}

.krishna-app-card:hover .has-hover-title .title-hover,
.krishna-app-card:focus .has-hover-title .title-hover {
    display: block;
}

/* Description Text (Hidden by default, smooth slow reveal on hover) */
.krishna-app-card-desc {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    margin-top: 0;
    font-family: var(--krishna-font-secondary, 'Inter', sans-serif);
    font-size: 12px;
    color: #555e6d;
    line-height: 1.5;
    transition: max-height 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.45s ease, margin-top 0.45s ease;
}

.krishna-app-card-desc p {
    margin: 0;
}

.krishna-app-card:hover .krishna-app-card-desc,
.krishna-app-card:focus .krishna-app-card-desc {
    max-height: 140px;
    opacity: 1;
    margin-top: 8px;
}

.krishna-app-empty {
    grid-column: 1 / -1;
    text-align: center;
    color: #64748b;
    padding: 40px;
}

/* ==========================================================================
   RESPONSIVE BREAKPOINTS
   ========================================================================== */
@media (max-width: 1200px) {
    .krishna-app-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 18px;
    }
}

@media (max-width: 991px) {
    .krishna-app-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 16px;
    }

    .krishna-app-hero-title {
        font-size: 32px;
    }

    .krishna-app-hero {
        min-height: 330px;
        height: 340px;
        padding-top: 75px;
    }

    .krishna-app-grid-section {
        padding: 45px 0 65px;
    }
}

@media (max-width: 768px) {
    .krishna-app-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 16px;
    }

    .krishna-app-card {
        height: 320px;
    }
}

@media (max-width: 480px) {
    .krishna-app-hero {
        min-height: 280px;
        height: 290px;
        padding-top: 70px;
    }

    .krishna-app-hero-title {
        font-size: 26px;
    }

    .krishna-app-grid {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .krishna-app-card {
        height: 300px;
    }
}
