/* Custom CSS for Agentic AI Learning Website */

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1a202c;
    background-color: #f7fafc;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Navigation Styles */
.nav-link {
    position: relative;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-nav-link {
    display: block;
    padding: 8px 0;
    transition: color 0.3s ease;
}

/* Hero Section Enhancements */
#home {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
}

#home::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

#home .container {
    position: relative;
    z-index: 1;
}

/* Card Hover Effects */
.bg-white.rounded-lg.shadow-lg {
    transition: all 0.3s ease;
}

.bg-white.rounded-lg.shadow-lg:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* Concept Details Toggle */
.concept-details {
    transition: all 0.3s ease;
    max-height: 0;
    overflow: hidden;
}

.concept-details:not(.hidden) {
    max-height: 200px;
    margin-top: 1rem;
}

/* Interactive Examples */
#agent-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(8, 1fr);
    gap: 2px;
    background: #e5e7eb;
    padding: 8px;
    border-radius: 8px;
}

.grid-cell {
    aspect-ratio: 1;
    border-radius: 4px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.grid-cell.empty {
    background: #f9fafb;
}

.grid-cell.obstacle {
    background: #ef4444;
}

.grid-cell.goal {
    background: #10b981;
}

.grid-cell.agent {
    background: #3b82f6;
    animation: pulse 2s infinite;
}

.grid-cell.path {
    background: #fbbf24;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Code Syntax Highlighting */
pre code {
    font-family: 'Fira Code', 'Monaco', 'Menlo', monospace;
    font-size: 0.9rem;
    line-height: 1.5;
}

/* Resource Content Animation */
#resource-content {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

#resource-content:not(.hidden) {
    opacity: 1;
    transform: translateY(0);
}

/* Button Enhancements */
button {
    transition: all 0.3s ease;
    cursor: pointer;
}

button:hover {
    transform: translateY(-1px);
}

button:active {
    transform: translateY(0);
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    #home h1 {
        font-size: 2.5rem;
    }
    
    .grid-cols-10 {
        grid-template-columns: repeat(5, 1fr);
    }
    
    #agent-grid {
        grid-template-columns: repeat(5, 1fr);
        grid-template-rows: repeat(6, 1fr);
    }
    
    .flex-col.sm\:flex-row {
        flex-direction: column;
    }
    
    .sm\:flex-row > button {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

@media (max-width: 640px) {
    #home h1 {
        font-size: 2rem;
    }
    
    #home p {
        font-size: 1rem;
    }
    
    .bg-white.rounded-lg.shadow-lg {
        margin-bottom: 1rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

.slide-in-left {
    animation: slideInLeft 0.6s ease-out;
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Loading States */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Decision Steps Styling */
#decision-steps {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    font-family: 'Monaco', 'Menlo', monospace;
}

.decision-step {
    padding: 8px 12px;
    margin: 4px 0;
    border-radius: 6px;
    background: #e0f2fe;
    border-left: 4px solid #0288d1;
    animation: slideInLeft 0.3s ease-out;
}

.decision-step.success {
    background: #e8f5e8;
    border-left-color: #4caf50;
}

.decision-step.warning {
    background: #fff3e0;
    border-left-color: #ff9800;
}

.decision-step.error {
    background: #ffebee;
    border-left-color: #f44336;
}

/* Tool Tags */
.flex.flex-wrap.gap-2 > span {
    font-size: 0.75rem;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
}

/* Focus States for Accessibility */
button:focus,
a:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Print Styles */
@media print {
    nav,
    footer,
    button,
    .bg-gradient-to-br {
        display: none;
    }
    
    body {
        background: white;
        color: black;
    }
    
    .container {
        max-width: none;
    }
}