/* Modern Landing Page (index.xhtml) CSS */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;600;800&display=swap');

:root {
    --primary-color: #1a1a2e;
    --accent-color: #3f51b5;
    --card-bg: #fdfdfd;
    --text-main: #2c3e50;
    --text-muted: #7f8c8d;
    --accent-glow: rgba(63, 81, 181, 0.15);
    --shadow-soft: 0 12px 40px rgba(0, 0, 0, 0.05);
    --shadow-hover: 0 25px 60px rgba(63, 81, 181, 0.18);
    --transition-smooth: all 0.5s cubic-bezier(0.165, 0.84, 0.44, 1);
}

.index-modern-container {
    padding: 60px 40px;
    font-family: 'Outfit', sans-serif;
    background: #ffffff;
    min-height: 100vh;
}

/* Hero Section */
.hero-portal {
    text-align: center;
    margin-bottom: 40px; /* Reduced */
    animation: fadeInDown 0.8s ease-out;
}

.hero-portal img {
    max-width: 320px; /* Smaller logo */
    margin-bottom: 15px;
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.1));
}

.hero-portal h4 {
    font-size: 1.4rem; /* Smaller title font */
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: -0.5px;
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.2;
}

/* Portal Grid */
.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px; /* Reduced gap */
    max-width: 1300px;
    margin: 0 auto;
}

/* Portal Card */
.portal-card {
    text-decoration: none !important;
    background: var(--card-bg);
    border: 1px solid rgba(0,0,0,0.06);
    border-radius: 20px;
    padding: 25px 20px; /* Reduced packing */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: var(--transition-smooth);
    box-shadow: var(--shadow-soft);
    min-height: 190px;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
    animation: slideUpFade 0.7s ease-out both;
}

.portal-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--accent-color), transparent);
    transform: scaleX(0);
    transition: transform 0.6s ease;
}

.portal-card:hover {
    transform: translateY(-15px) scale(1.02);
    box-shadow: var(--shadow-hover);
    border-color: var(--accent-color);
    background: #ffffff;
}

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

/* Icon Styles */
.portal-icon-wrapper {
    width: 60px; /* Smaller */
    height: 60px;
    background: #f8faff;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px; /* Reduced */
    transition: all 0.5s ease;
    font-size: 1.6rem; /* Smaller font */
    color: var(--accent-color);
}

.portal-card:hover .portal-icon-wrapper {
    background: var(--accent-color);
    color: #fff;
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 10px 20px var(--accent-glow);
}

/* Label Styles */
.portal-label {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-main);
    line-height: 1.4;
    transition: color 0.3s ease;
}

.portal-card:hover .portal-label {
    color: var(--accent-color);
}

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

@keyframes slideUpFade {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 768px) {
    .portal-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
    .hero-portal h4 { font-size: 1.4rem; }
}

/* Fox Assistant Floating Button */
.fox-assistant-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #ff7e5f 0%, #feb47b 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: 0 4px 15px rgba(255, 126, 95, 0.4);
    cursor: pointer;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    outline: none !important;
}

.fox-assistant-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(255, 126, 95, 0.6);
}

.fox-assistant-btn:active {
    transform: scale(0.95);
}

.fox-assistant-btn.is-speaking {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%) !important;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.4) !important;
}

.fox-assistant-label {
    position: absolute;
    right: 75px;
    background: white;
    padding: 8px 15px;
    border-radius: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-size: 14px;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(10px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.fox-assistant-btn:hover .fox-assistant-label {
    opacity: 1;
    transform: translateX(0);
}

/* Speaking Animation (Pulse) */
.fox-assistant-btn.is-speaking::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 2px solid #2ecc71;
    animation: foxPulse 1.5s infinite;
}

@keyframes foxPulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(2); opacity: 0; }
}

.fox-assistant-btn.is-speaking i {
    animation: foxWiggle 0.5s infinite;
}

@keyframes foxWiggle {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(10deg); }
    75% { transform: rotate(-10deg); }
    100% { transform: rotate(0deg); }
}

/* Word Level Highlighting */
.word-reading-highlight {
    color: #e74c3c !important; 
    font-weight: 900 !important;
    text-shadow: 0 0 8px rgba(231, 76, 60, 0.5);
    transform: scale(1.05);
    display: inline-block;
    transition: all 0.2s ease;
}

.word-read {
    color: #c0392b !important; 
    font-weight: 600 !important;
}

.bg-terras {
    background: transparent !important;
}

.col-md-3 {
    width: 100% !important;
    padding: 0 !important;
}
