/* ============================================
   KASTURI GROUP - PREMIUM GATEWAY
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    --gw-bg: #f8fafc;
    --gw-bg-gradient: linear-gradient(160deg, #f0f7ff 0%, #f8fafc 40%, #f0f7ff 100%);
    --gw-card-bg: #ffffff;
    --gw-card-border: rgba(37, 150, 190, 0.08);
    --gw-text-primary: #0f172a;
    --gw-text-secondary: #475569;
    --gw-text-muted: #94a3b8;

    /* Unified brand */
    --gw-accent: #2596be;
    --gw-accent-light: rgba(37, 150, 190, 0.08);
    --gw-accent-gradient: linear-gradient(135deg, #2596be, #3ab0d8);
}

/* ---- Body & Shell ---- */
.gateway-body {
    background: var(--gw-bg) !important;
    color: var(--gw-text-primary) !important;
    font-family: 'Inter', 'Outfit', sans-serif !important;
    min-height: 100vh;
}

.gateway-shell {
    min-height: 100vh;
    background: var(--gw-bg-gradient);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Subtle animated background blobs */
.gateway-shell::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37, 150, 190, 0.05) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatBlob1 20s ease-in-out infinite;
    z-index: 0;
}

.gateway-shell::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -15%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(37, 150, 190, 0.04) 0%, transparent 70%);
    border-radius: 50%;
    animation: floatBlob2 25s ease-in-out infinite;
    z-index: 0;
}

@keyframes floatBlob1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(-40px, 30px) scale(1.1); }
}

@keyframes floatBlob2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    50% { transform: translate(30px, -40px) scale(1.15); }
}

/* ---- Wrapper ---- */
.gateway-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 100px 24px 60px;
    position: relative;
    z-index: 2;
}

/* ---- Header Section ---- */
.gateway-header {
    text-align: center;
    margin-bottom: 48px;
}

.gateway-header h1 {
    font-family: 'Revue', 'Outfit', serif;
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    color: var(--gw-text-primary);
    margin-bottom: 16px;
    letter-spacing: -1px;
    line-height: 1.1;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.gateway-header p {
    font-size: 1.1rem;
    color: var(--gw-text-secondary);
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both 0.1s;
}

/* ---- Grid ---- */
.gateway-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    width: 100%;
    max-width: 1200px;
}

/* ---- Card ---- */
.gateway-card {
    position: relative;
    border-radius: 24px;
    background: var(--gw-card-bg);
    border: 1px solid var(--gw-card-border);
    overflow: hidden;
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 36px 24px 28px;
    transition: all 0.45s cubic-bezier(0.23, 1, 0.32, 1);
    animation: fadeInUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    border-top: 4px solid var(--gw-accent);
    isolation: isolate;
}

.gateway-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(180deg, rgba(255,255,255,0.08) 0%, rgba(255,255,255,0.9) 42%, rgba(255,255,255,0.98) 100%),
        var(--bg-image, none);
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    z-index: 0;
}

.gateway-card > * {
    position: relative;
    z-index: 1;
}

.gateway-card:nth-child(1) { animation-delay: 0.15s; }
.gateway-card:nth-child(2) { animation-delay: 0.25s; }
.gateway-card:nth-child(3) { animation-delay: 0.35s; }
.gateway-card:nth-child(4) { animation-delay: 0.45s; }

/* Hover */
.gateway-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 48px rgba(37, 150, 190, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
    border-color: rgba(37, 150, 190, 0.2);
}

/* ---- Centered Card Logo ---- */
.card-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.card-logo img {
    width: 100px;
    height: auto;
    object-fit: contain;
    transition: all 0.4s cubic-bezier(0.23, 1, 0.32, 1);
    mix-blend-mode: multiply; /* Helps blend white jpeg backgrounds into the page if any */
}

.card-secondary .card-logo img {
    width: 126px;
}

.gateway-card:hover .card-logo img {
    transform: scale(1.08);
}

/* ---- Card Content ---- */
.card-content {
    text-align: center;
    width: 100%;
}

.card-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    color: var(--gw-accent);
    margin-bottom: 8px;
    padding: 4px 12px;
    background: var(--gw-accent-light);
    border-radius: 20px;
}

.gateway-card h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--gw-text-primary);
    margin-bottom: 8px;
    letter-spacing: -0.3px;
    line-height: 1.2;
}

.card-academy h2,
.card-college h2,
.card-management h2 {
    color: #006837;
}

.card-secondary h2 {
    color: #2596be;
}

.gateway-card p {
    font-size: 0.85rem;
    color: var(--gw-text-secondary);
    margin-bottom: 16px;
    line-height: 1.55;
}

.enter-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-weight: 700;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: var(--gw-accent);
    transition: all 0.35s ease;
}

.gateway-card:hover .enter-btn {
    transform: translateX(4px);
}

.enter-btn i {
    transition: transform 0.3s ease;
}

.gateway-card:hover .enter-btn i {
    transform: translateX(4px);
}

/* ---- Logo (Light theme) ---- */
.gateway-body header {
    padding: 32px 0;
    width: 100%;
    position: relative;
    z-index: 5;
}

.gateway-body .logo-symbol {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2596be, #3ab0d8) !important;
    border: none;
    border-radius: 14px;
    color: #fff;
    font-size: 22px;
    box-shadow: 0 4px 12px rgba(37, 150, 190, 0.25);
}

.gateway-body .brand-name {
    color: var(--gw-text-primary) !important;
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.gateway-body .brand-tagline {
    color: var(--gw-text-muted) !important;
    letter-spacing: 2px;
    font-size: 11px;
    font-weight: 600;
}

/* ---- Footer (Light) ---- */
.gateway-body footer {
    background: #ffffff !important;
    border-top: 1px solid rgba(0, 0, 0, 0.06) !important;
    backdrop-filter: none !important;
}

.gateway-body footer p {
    color: var(--gw-text-muted) !important;
}

.gateway-body footer a {
    color: var(--gw-text-muted) !important;
}

.gateway-body footer a:hover {
    color: var(--gw-accent) !important;
}

/* ---- Animation ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================
   RESPONSIVE - TABLET (2×2 grid)
   ============================================ */
@media (max-width: 1200px) {
    .gateway-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
        padding: 0 24px;
    }
}

/* ============================================
   RESPONSIVE - MOBILE (2×2 grid, compact)
   ============================================ */
@media (max-width: 768px) {
    .gateway-wrapper {
        padding: 80px 16px 40px;
    }

    .gateway-header {
        margin-bottom: 32px;
    }

    .gateway-header h1 {
        font-size: 1.75rem;
        letter-spacing: -1px;
    }

    .gateway-header p {
        font-size: 0.95rem;
    }

    .gateway-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
        padding: 0 4px;
    }

    .gateway-card {
        border-radius: 18px;
        padding: 24px 16px 20px;
    }

    .card-logo img {
        width: 64px;
        height: 64px;
    }

    .card-secondary .card-logo img {
        width: 82px;
        height: auto;
    }

    .card-logo {
        margin-bottom: 14px;
    }

    .card-badge {
        font-size: 9px;
        letter-spacing: 1.5px;
        padding: 3px 10px;
        margin-bottom: 6px;
    }

    .gateway-card h2 {
        font-size: 1rem;
        margin-bottom: 6px;
    }

    .gateway-card p {
        font-size: 0.72rem;
        margin-bottom: 10px;
        line-height: 1.4;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .enter-btn {
        font-size: 11px;
        letter-spacing: 1px;
        gap: 6px;
    }

    .gateway-body header {
        padding: 20px 0;
    }

    .gateway-body .logo-symbol {
        width: 40px;
        height: 40px;
        font-size: 18px;
        border-radius: 12px;
    }

    .gateway-body .brand-name {
        font-size: 22px;
    }

    .gateway-body .brand-tagline {
        font-size: 9px;
        letter-spacing: 1.5px;
    }
}

/* ============================================
   RESPONSIVE - Very small phones
   ============================================ */
@media (max-width: 380px) {
    .gateway-grid {
        gap: 10px;
        padding: 0 2px;
    }

    .gateway-card {
        padding: 20px 12px 16px;
        border-radius: 16px;
    }

    .card-logo img {
        width: 54px;
        height: 54px;
    }

    .card-secondary .card-logo img {
        width: 70px;
        height: auto;
    }

    .gateway-card h2 {
        font-size: 0.9rem;
    }

    .gateway-card p {
        font-size: 0.68rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .enter-btn {
        font-size: 10px;
    }
}

/* ---- Active/Touch States for Mobile ---- */
@media (hover: none) {
    .gateway-card:active {
        transform: scale(0.97);
    }

    .enter-btn {
        opacity: 1 !important;
        transform: none !important;
    }

    .card-content {
        transform: none !important;
    }
}
