/* ========================================
   PORTAL LANDING PAGE STYLES
   Kemenag Kabupaten Natuna
   ======================================== */

/* --- Base & Layout --- */
.portal-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #0a3d1e 0%, #145a32 30%, #1a7a45 60%, #0d6e3a 100%);
    background-attachment: fixed;
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
    position: relative;
}

.portal-page::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        radial-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    background-position: 0 0, 20px 20px;
    pointer-events: none;
    z-index: 0;
}

/* --- Header Section --- */
.portal-header {
    position: relative;
    z-index: 2;
    padding: 2rem 0 1rem;
}

.portal-clock {
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    padding: 12px 24px;
    display: inline-block;
    color: #fff;
    min-width: 200px;
}

.portal-clock .clock-time {
    font-size: 2rem;
    font-weight: 800;
    letter-spacing: 1px;
    line-height: 1;
}

.portal-clock .clock-date {
    font-size: 0.8rem;
    opacity: 0.85;
    margin-top: 2px;
    font-weight: 400;
}

.portal-badges {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.portal-badges img {
    height: 60px;
    filter: brightness(1) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.15));
    transition: transform 0.3s ease;
}

.portal-badges img:hover {
    transform: scale(1.1);
}

/* --- Welcome Section --- */
.portal-welcome {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 2.5rem 0 1.5rem;
}

.portal-logo {
    width: 100px;
    height: 100px;
    margin-bottom: 1.5rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.25));
    animation: portalFloat 3s ease-in-out infinite;
}

@keyframes portalFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.portal-welcome h1 {
    color: #4fd1a5;
    font-weight: 700;
    font-size: clamp(1.6rem, 4vw, 2.4rem);
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
}

.portal-welcome p {
    color: rgba(255, 255, 255, 0.85);
    font-size: clamp(0.9rem, 2vw, 1.1rem);
    font-weight: 400;
    max-width: 600px;
    margin: 0 auto;
}

/* --- Menu Grid --- */
.portal-menu-section {
    position: relative;
    z-index: 2;
    padding: 1.5rem 0 4rem;
}

.portal-menu-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 960px;
    margin: 0 auto;
}

/* --- Menu Card --- */
.portal-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 18px;
    padding: 2rem 1.5rem;
    text-align: center;
    text-decoration: none;
    color: #333;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
    border: 2px solid transparent;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #1a7a45, #4fd1a5);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s ease;
}

.portal-card:hover {
    transform: translateY(-8px);
    border-color: rgba(26, 122, 69, 0.25);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
    color: #333;
    text-decoration: none;
}

.portal-card:hover::before {
    transform: scaleX(1);
}

.portal-card-icon {
    width: 64px;
    height: 64px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.8rem;
    transition: all 0.35s ease;
}

.portal-card:hover .portal-card-icon {
    transform: scale(1.1) rotate(-5deg);
}

/* Icon color variants */
.icon-website {
    background: linear-gradient(135deg, #e8f5e9, #c8e6c9);
    color: #2e7d32;
}

.icon-ptsp {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
}

.icon-madrasah {
    background: linear-gradient(135deg, #fff3e0, #ffe0b2);
    color: #e65100;
}

.icon-ppid {
    background: linear-gradient(135deg, #fce4ec, #f8bbd0);
    color: #c62828;
}

.icon-inovasi {
    background: linear-gradient(135deg, #f3e5f5, #e1bee7);
    color: #6a1b9a;
}

.icon-medsos {
    background: linear-gradient(135deg, #e0f7fa, #b2ebf2);
    color: #00838f;
}

.icon-aduan {
    background: linear-gradient(135deg, #fff8e1, #ffecb3);
    color: #f57f17;
}

.icon-skm {
    background: linear-gradient(135deg, #e8eaf6, #c5cae9);
    color: #283593;
}

.icon-bukutamu {
    background: linear-gradient(135deg, #e0f2f1, #b2dfdb);
    color: #00695c;
}

.icon-kua {
    background: linear-gradient(135deg, #f1f8e9, #dcedc8);
    color: #558b2f;
}

.portal-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.4rem;
    color: #1a3c2e;
}

.portal-card p {
    font-size: 0.78rem;
    color: #6b7c74;
    margin: 0;
    line-height: 1.4;
}

/* --- Footer --- */
.portal-footer {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 1.5rem 0 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.portal-footer p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.78rem;
    margin: 0;
}

.portal-footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s;
}

.portal-footer a:hover {
    color: #4fd1a5;
}

/* --- Responsive --- */
@media (max-width: 991px) {
    .portal-menu-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

@media (max-width: 767px) {
    .portal-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    .portal-card {
        padding: 1.5rem 1rem;
        border-radius: 14px;
    }

    .portal-card-icon {
        width: 52px;
        height: 52px;
        font-size: 1.5rem;
        border-radius: 14px;
    }

    .portal-card h3 {
        font-size: 0.9rem;
    }

    .portal-card p {
        font-size: 0.72rem;
    }

    .portal-header {
        padding: 1.5rem 0 0.5rem;
    }

    .portal-welcome {
        padding: 1.5rem 0 1rem;
    }

    .portal-badges {
        justify-content: center;
        margin-top: 1rem;
    }

    .portal-clock .clock-time {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .portal-menu-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .portal-card {
        padding: 1.2rem 0.8rem;
    }
}

/* --- Decorative elements --- */
.portal-decor-circle {
    position: fixed;
    border-radius: 50%;
    background: rgba(79, 209, 165, 0.06);
    pointer-events: none;
    z-index: 0;
}

.portal-decor-circle.c1 {
    width: 400px;
    height: 400px;
    top: -100px;
    right: -100px;
}

.portal-decor-circle.c2 {
    width: 300px;
    height: 300px;
    bottom: -80px;
    left: -80px;
}

.portal-decor-circle.c3 {
    width: 200px;
    height: 200px;
    top: 50%;
    left: 60%;
}

/* --- Portal Modal items --- */
.portal-modal-item {
    transition: all 0.25s ease;
}

.portal-modal-item:hover {
    background-color: #ffffff !important;
    border-color: #198754 !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}