/* =========================================
   Google Workspace USIM — Main Stylesheet
   ========================================= */

/* --- CSS Variables --- */
:root {
    --google-blue: #4285F4;
    --google-red: #EA4335;
    --google-yellow: #FBBC05;
    --google-green: #34A853;
    --usim-gold: #C8A951;
    --usim-dark: #1A1A2E;
    --bg-primary: #F8F9FA;
    --bg-white: #FFFFFF;
    --text-primary: #202124;
    --text-secondary: #5F6368;
    --text-light: #FFFFFF;
    --shadow-soft: 0 2px 16px rgba(0,0,0,0.08);
    --shadow-card: 0 4px 24px rgba(0,0,0,0.06);
    --shadow-hover: 0 8px 40px rgba(0,0,0,0.12);
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-primary: 'Outfit', 'Inter', -apple-system, sans-serif;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

/* --- Header --- */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    transition: var(--transition);
}

.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* --- Header Actions --- */
.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.guide-link {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 12px;
    border-radius: 8px;
    transition: var(--transition);
}

.guide-link:hover {
    color: var(--google-blue);
    background: rgba(66, 133, 244, 0.05);
}

.guide-link svg {
    color: var(--google-blue);
}

/* --- Google Apps Button --- */
.google-apps-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: transparent;
    border: 1.5px solid rgba(0,0,0,0.1);
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 600;
    font-family: var(--font-primary);
    color: var(--text-primary);
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
}
.google-apps-btn:hover {
    background: #f1f3f4;
    border-color: rgba(0,0,0,0.18);
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

/* --- Google Apps Modal --- */
.gapps-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.gapps-overlay.gapps-show {
    opacity: 1;
    visibility: visible;
}
.gapps-modal {
    background: #fff;
    border-radius: 24px;
    width: 100%;
    max-width: 430px;
    max-height: 88vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 24px 64px rgba(0,0,0,0.25);
    transform: scale(0.95);
    transition: transform 0.3s ease;
    overflow: hidden;
}
.gapps-overlay.gapps-show .gapps-modal {
    transform: scale(1);
}
.gapps-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 20px;
    border-bottom: 1px solid #f0f0f0;
    flex-shrink: 0;
}
.gapps-header-left {
    display: flex;
    align-items: center;
    gap: 10px;
}
.gapps-header-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #3c4043;
}
.gapps-close-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    background: #f1f3f4;
    font-size: 1.1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #5f6368;
    transition: var(--transition);
}
.gapps-close-btn:hover {
    background: #e8eaed;
    color: #202124;
}
.gapps-body {
    padding: 16px;
    overflow-y: auto;
    flex: 1;
}
.gapps-notice {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #e8f0fe;
    border-left: 3px solid #4285F4;
    border-radius: 0 8px 8px 0;
    padding: 10px 12px;
    font-size: 0.82rem;
    color: #1a73e8;
    margin-bottom: 16px;
    line-height: 1.5;
}
.gapps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
}
.gapp-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 8px;
    border-radius: 12px;
    text-decoration: none;
    color: #3c4043;
    transition: background 0.2s ease;
    cursor: pointer;
}
.gapp-item:hover { background: #f1f3f4; }
.gapp-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 6px;
}
.gapp-icon img, .gapp-icon svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.gapp-item span {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
}
.gapps-footer {
    padding: 12px 20px;
    border-top: 1px solid #f0f0f0;
    text-align: center;
    flex-shrink: 0;
}
.gapps-footer-link {
    font-size: 0.85rem;
    color: #1a73e8;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 8px;
    display: inline-block;
    transition: background 0.2s;
}
.gapps-footer-link:hover { background: #e8f0fe; }

@media (max-width: 480px) {
    .google-apps-btn span { display: none; }
    .google-apps-btn { padding: 8px 10px; }
    .gapps-modal { border-radius: 16px; max-height: 93vh; }
    .gapps-grid { grid-template-columns: repeat(3, 1fr); }
}

.logo-group {
    display: flex;
    align-items: center;
    gap: 16px;
}

.logo-usim {
    height: 48px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.logo-divider {
    width: 2px;
    height: 32px;
    background: linear-gradient(to bottom, transparent, rgba(0,0,0,0.15), transparent);
    border-radius: 1px;
}

.logo-google {
    height: 36px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.logo-group:hover .logo-usim,
.logo-group:hover .logo-google {
    transform: scale(1.03);
}

/* --- Banner Slider --- */
.banner-section {
    position: relative;
    width: 100%;
    margin-top: 16px;
    padding: 0 24px;
}

.banner-wrap {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    height: 420px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--usim-dark);
    box-shadow: var(--shadow-card);
}

.banner-slider {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.banner-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

.banner-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(26, 26, 46, 0.3) 0%,
        rgba(26, 26, 46, 0.5) 50%,
        rgba(26, 26, 46, 0.8) 100%
    );
    pointer-events: none;
    z-index: 1;
}

.banner-content {
    position: absolute;
    bottom: 48px;
    left: 48px;
    z-index: 2;
    color: var(--text-light);
    animation: fadeInUp 0.8s ease;
}

.banner-icon-container {
    margin-bottom: 20px;
}

.banner-icon-container svg, 
.banner-icon-container img {
    height: 64px;
    width: auto;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}

.banner-content h1 {
    font-size: 2.4rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.banner-content p {
    font-size: 1.1rem;
    font-weight: 400;
    opacity: 0.9;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
}

/* Banner Navigation */
.banner-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 8px;
}

.banner-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.banner-dot.active {
    background: var(--text-light);
    transform: scale(1.2);
    box-shadow: 0 0 8px rgba(255,255,255,0.5);
}

.banner-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 3;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(8px);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    opacity: 0;
}

.banner-section:hover .banner-arrow {
    opacity: 1;
}

.banner-arrow:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-50%) scale(1.1);
}

.banner-arrow-left {
    left: 16px;
}

.banner-arrow-right {
    right: 16px;
}

/* --- Text Ticker (Top Announcement Bar) --- */
.ticker-section {
    background: var(--usim-dark);
    color: rgba(255, 255, 255, 0.9);
    position: relative;
    z-index: 101; /* Keep it above sticky header */
}

.ticker-wrap {
    width: 100%;
    overflow: hidden;
    padding: 8px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.ticker {
    display: inline-flex;
    white-space: nowrap;
    animation: ticker-scroll 30s linear infinite;
    align-items: center;
}

.ticker span {
    display: inline-flex;
    align-items: center;
    padding: 0 40px;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.4px;
}

.ticker-link {
    color: var(--google-yellow);
    transition: var(--transition);
}

.ticker-link:hover {
    color: var(--bg-white);
    text-decoration: underline;
}

@keyframes ticker-scroll {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* --- Cards Section --- */
.cards-section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 48px 24px 64px;
}

.cards-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.info-card {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    padding: 32px 28px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
}

.info-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    transition: var(--transition);
}

.info-card:nth-child(1)::before { background: var(--google-blue); }
.info-card:nth-child(2)::before { background: var(--google-green); }
.info-card:nth-child(3)::before { background: var(--google-red); }
.info-card:nth-child(4)::before { background: var(--google-yellow); }

.info-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-hover);
    border-color: transparent;
}

.info-card-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 1.5rem;
}

.info-card h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    letter-spacing: -0.3px;
}

.info-card p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.7;
    flex-grow: 1;
    margin-bottom: 24px;
}

.card-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border-radius: var(--radius-xl);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font-primary);
    color: white;
    border: none;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    letter-spacing: 0.2px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.card-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.2);
    filter: brightness(1.08);
}

.card-button:active {
    transform: translateY(0);
}

.card-button svg {
    width: 16px;
    height: 16px;
    transition: var(--transition);
}

.card-button:hover svg {
    transform: translateX(3px);
}

/* --- Footer --- */
.footer {
    background: linear-gradient(135deg, #1A1A2E 0%, #16213E 100%);
    color: rgba(255, 255, 255, 0.8);
    padding: 0;
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 24px 24px;
}

.footer-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-wrap: wrap;
    gap: 16px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.footer-logo {
    height: 32px;
    width: auto;
    filter: brightness(0) invert(1);
    opacity: 0.8;
}

.footer-brand-text {
    font-size: 1rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
}

.footer-links {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.6);
    transition: var(--transition);
    position: relative;
}

.footer-links a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--google-blue);
    transition: var(--transition);
}

.footer-links a:hover {
    color: rgba(255, 255, 255, 0.95);
}

.footer-links a:hover::after {
    width: 100%;
}

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.footer-bottom p {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
}

.admin-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.25);
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.admin-link:hover {
    color: rgba(255, 255, 255, 0.7);
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

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

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

.card-animate {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.card-animate:nth-child(1) { animation-delay: 0.1s; }
.card-animate:nth-child(2) { animation-delay: 0.2s; }
.card-animate:nth-child(3) { animation-delay: 0.3s; }
.card-animate:nth-child(4) { animation-delay: 0.4s; }

/* --- Responsive --- */
@media (max-width: 768px) {
    .header-inner {
        padding: 10px 16px;
    }
    
    .logo-usim {
        height: 36px;
    }

    .logo-google {
        height: 28px;
    }

    .logo-group {
        gap: 10px;
    }

    .banner-section {
        padding: 0 16px;
    }

    .banner-wrap {
        height: 280px;
        border-radius: var(--radius-md);
    }

    .banner-content {
        bottom: 24px;
        left: 20px;
        right: 20px;
    }

    .banner-icon-container {
        margin-bottom: 12px;
    }

    .banner-icon-container svg, 
    .banner-icon-container img {
        height: 48px;
    }

    .banner-content h1 {
        font-size: 1.4rem;
        margin-bottom: 4px;
    }

    .banner-content p {
        font-size: 0.9rem;
    }

    .cards-section {
        padding: 32px 16px 48px;
    }

    .cards-container {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .info-card {
        padding: 24px 20px;
    }

    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        gap: 16px;
    }

    .ticker span {
        font-size: 0.85rem;
        padding: 0 40px;
    }
}

@media (max-width: 480px) {
    .banner-section {
        padding: 0 12px;
    }

    .banner-wrap {
        height: 200px;
        border-radius: var(--radius-sm);
    }

    .banner-icon-container {
        margin-bottom: 8px;
    }

    .banner-icon-container svg, 
    .banner-icon-container img {
        height: 40px;
    }

    .banner-content h1 {
        font-size: 1.15rem;
    }

    .banner-arrow {
        width: 36px;
        height: 36px;
    }
}
