/* Enhanced Sections CSS */

/* AI Essay Grader Demo */
.ai-showcase-enhanced {
    padding: 80px 0;
    background: var(--bg-light);
}

.ai-demo-container {
    max-width: 1200px;
    margin: 0 auto;
}

.essay-grader-demo {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.demo-screen {
    background: #1f2937;
}

.demo-header {
    background: #374151;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: white;
}

.demo-dot {
    width: 10px;
    height: 10px;
    background: #10b981;
    border-radius: 50%;
    animation: pulse 2s infinite;
}

.demo-title {
    font-weight: 600;
}

.demo-status {
    margin-left: auto;
    background: #10b981;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
}

.demo-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 600px;
}

.essay-panel {
    background: white;
    padding: 2rem;
    overflow-y: auto;
}

.essay-panel h4 {
    color: var(--text);
    margin-bottom: 1.5rem;
}

.essay-text {
    line-height: 1.8;
    color: var(--text);
}

.essay-text p {
    margin-bottom: 1rem;
}

.highlight-sentence {
    background: linear-gradient(to right, transparent 0%, #fef3c7 10%, #fef3c7 90%, transparent 100%);
    animation: highlightSweep 3s ease infinite;
    animation-delay: 0s;
}

.highlight-point {
    background: linear-gradient(to right, transparent 0%, #dbeafe 10%, #dbeafe 90%, transparent 100%);
    animation: highlightSweep 3s ease infinite;
    animation-delay: 0.5s;
}

.highlight-evidence {
    background: linear-gradient(to right, transparent 0%, #fce7f3 10%, #fce7f3 90%, transparent 100%);
    animation: highlightSweep 3s ease infinite;
    animation-delay: 1s;
}

.highlight-conclusion {
    background: linear-gradient(to right, transparent 0%, #dcfce7 10%, #dcfce7 90%, transparent 100%);
    animation: highlightSweep 3s ease infinite;
    animation-delay: 1.5s;
}

@keyframes highlightSweep {
    0%, 100% {
        background-position: -200% 0;
    }
    50% {
        background-position: 200% 0;
    }
}

.grading-panel {
    background: #f9fafb;
    padding: 2rem;
    border-left: 1px solid var(--border-light);
}

.grading-panel h4 {
    color: var(--text);
    margin-bottom: 1.5rem;
}

.grade-result {
    text-align: center;
    margin-bottom: 2rem;
}

.grade-circle-animated {
    width: 120px;
    height: 120px;
    margin: 0 auto;
    position: relative;
}

.grade-circle-animated svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.grade-bg {
    fill: none;
    stroke: #e5e7eb;
    stroke-width: 4;
}

.grade-progress {
    fill: none;
    stroke: #10b981;
    stroke-width: 4;
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    animation: fillGrade 2s ease forwards;
    animation-delay: 0.5s;
}

@keyframes fillGrade {
    to {
        stroke-dashoffset: 70;
    }
}

.grade-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2rem;
    font-weight: 700;
    color: var(--text);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    animation-delay: 2s;
}

.feedback-items {
    margin-bottom: 2rem;
}

.feedback-item {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    opacity: 0;
    animation: slideInRight 0.5s ease forwards;
}

.feedback-item[data-delay="1"] { animation-delay: 2.5s; }
.feedback-item[data-delay="2"] { animation-delay: 2.8s; }
.feedback-item[data-delay="3"] { animation-delay: 3.1s; }
.feedback-item[data-delay="4"] { animation-delay: 3.4s; }

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

.feedback-icon {
    font-size: 1.5rem;
}

.feedback-content h5 {
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
    color: var(--text);
}

.feedback-content p {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.score-bar {
    height: 4px;
    background: #e5e7eb;
    border-radius: 2px;
    overflow: hidden;
}

.score-fill {
    height: 100%;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    animation: fillBar 1s ease forwards;
    animation-delay: 3.5s;
}

@keyframes fillBar {
    to {
        transform: scaleX(1);
    }
}

.ai-suggestions-panel {
    background: white;
    padding: 1rem;
    border-radius: var(--radius);
    opacity: 0;
    animation: fadeIn 0.5s ease forwards;
    animation-delay: 4s;
}

.ai-suggestions-panel h5 {
    color: var(--text);
    margin-bottom: 0.75rem;
}

.ai-suggestions-panel ul {
    list-style: none;
    padding: 0;
}

.ai-suggestions-panel li {
    padding: 0.5rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
    padding-left: 1.5rem;
    position: relative;
}

.ai-suggestions-panel li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--accent);
}

.replay-demo {
    width: 100%;
    margin-top: 1rem;
}

/* Enhanced Implementation Timeline */
.implementation-enhanced {
    padding: 80px 0;
    background: white;
}

.timeline-enhanced {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
}

.timeline-progress {
    position: absolute;
    top: 80px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-light);
    z-index: 1;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(to right, #10b981, #3b82f6);
    width: 0;
    animation: progressGrow 4s ease forwards;
}

@keyframes progressGrow {
    to {
        width: 100%;
    }
}

.timeline-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.timeline-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.5s ease forwards;
}

.timeline-card.week-1 { animation-delay: 0.5s; }
.timeline-card.week-2 { animation-delay: 0.8s; }
.timeline-card.week-3 { animation-delay: 1.1s; }
.timeline-card.week-4 { animation-delay: 1.4s; }

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

.card-number {
    background: var(--primary);
    color: white;
    padding: 1rem;
    font-size: 2rem;
    font-weight: 700;
    text-align: center;
}

.card-content {
    padding: 1.5rem;
}

.card-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.card-content p {
    color: var(--text-light);
    margin-bottom: 1rem;
}

.card-tasks {
    margin-top: 1rem;
}

.task-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    color: var(--text-light);
    font-size: 0.9rem;
}

.task-dot {
    width: 6px;
    height: 6px;
    background: var(--accent);
    border-radius: 50%;
}

.card-visual {
    padding: 1rem;
    background: var(--bg-light);
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.week-animation {
    width: 60px;
    height: 60px;
    position: relative;
}

/* Week 1 - Discovery Animation */
.discovery-icon {
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary);
    border-radius: 50%;
    position: relative;
    animation: rotate 3s linear infinite;
}

.discovery-icon::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: var(--accent);
    border-radius: 50%;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Week 2 - Setup Animation */
.setup-icon {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4px;
}

.setup-icon::before,
.setup-icon::after {
    content: '';
    background: var(--primary);
    border-radius: 4px;
    animation: pulse 2s ease infinite;
}

/* Week 3 - Training Animation */
.training-icon {
    width: 100%;
    height: 100%;
    border: 3px solid var(--primary);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.training-icon::before {
    content: '📚';
    font-size: 1.5rem;
    animation: bounce 2s ease infinite;
}

/* Week 4 - Launch Animation */
.launch-icon {
    width: 100%;
    height: 100%;
    background: var(--primary);
    clip-path: polygon(50% 0%, 60% 40%, 100% 50%, 60% 60%, 50% 100%, 40% 60%, 0% 50%, 40% 40%);
    animation: rotate 4s linear infinite;
}

@keyframes rotate {
    to {
        transform: rotate(360deg);
    }
}

@keyframes bounce {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

/* Enhanced Security Section */
.security-enhanced {
    padding: 80px 0;
    background: var(--bg-light);
}

.security-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.security-card-animated {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
}

.security-card-animated:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.security-animation {
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
}

/* Lock Animation */
.lock-animation {
    width: 50px;
    height: 60px;
    position: relative;
}

.lock-body {
    width: 100%;
    height: 40px;
    background: var(--primary);
    border-radius: 4px;
    position: absolute;
    bottom: 0;
}

.lock-shackle {
    width: 30px;
    height: 30px;
    border: 4px solid var(--primary);
    border-bottom: none;
    border-radius: 15px 15px 0 0;
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    animation: lockClose 3s ease infinite;
}

.lock-keyhole {
    width: 8px;
    height: 12px;
    background: white;
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 4px 4px 6px 6px;
}

@keyframes lockClose {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-5px);
    }
}

/* Shield Animation */
.shield-animation {
    width: 50px;
    height: 60px;
    position: relative;
}

.shield-body {
    width: 100%;
    height: 100%;
    background: var(--primary);
    clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
    animation: shieldPulse 2s ease infinite;
}

.shield-check {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 1.5rem;
}

.shield-check::before {
    content: '✓';
}

@keyframes shieldPulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Uptime Animation */
.uptime-animation {
    position: relative;
}

.server-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.server {
    width: 60px;
    height: 12px;
    background: var(--primary);
    border-radius: 2px;
    position: relative;
}

.server::before {
    content: '';
    width: 4px;
    height: 4px;
    background: #10b981;
    border-radius: 50%;
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    animation: blink 1s ease infinite;
}

.server:nth-child(2)::before {
    animation-delay: 0.3s;
}

.server:nth-child(3)::before {
    animation-delay: 0.6s;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

.uptime-badge {
    position: absolute;
    top: -10px;
    right: -10px;
    background: #10b981;
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Access Control Animation */
.access-animation {
    position: relative;
}

.key-icon {
    width: 50px;
    height: 20px;
    background: var(--primary);
    border-radius: 10px;
    position: relative;
}

.key-icon::after {
    content: '';
    width: 20px;
    height: 6px;
    background: var(--primary);
    position: absolute;
    right: -15px;
    top: 50%;
    transform: translateY(-50%);
}

.access-waves {
    position: absolute;
    right: -40px;
    top: 50%;
    transform: translateY(-50%);
}

.access-waves span {
    display: block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--accent);
    border-radius: 50%;
    position: absolute;
    animation: wave 2s ease infinite;
}

.access-waves span:nth-child(2) {
    animation-delay: 0.3s;
}

.access-waves span:nth-child(3) {
    animation-delay: 0.6s;
}

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

/* Enhanced Why Choose Section */
.why-classcore-enhanced {
    padding: 80px 0;
    background: white;
}

.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.advantage-card {
    padding: 2rem;
    background: var(--bg-light);
    border-radius: var(--radius-lg);
    text-align: center;
    transition: var(--transition);
}

.advantage-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.advantage-animation {
    height: 80px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* AI Brain Animation */
.ai-brain {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    border-radius: 50%;
    position: relative;
    animation: pulse 2s ease infinite;
}

.ai-brain::before,
.ai-brain::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--accent);
    border-radius: 50%;
    animation: ripple 2s ease infinite;
}

.ai-brain::after {
    animation-delay: 0.5s;
}

@keyframes ripple {
    0% {
        transform: scale(1);
        opacity: 1;
    }
    100% {
        transform: scale(1.5);
        opacity: 0;
    }
}

/* Speed Meter Animation */
.speed-meter {
    width: 60px;
    height: 30px;
    border: 3px solid var(--primary);
    border-bottom: none;
    border-radius: 30px 30px 0 0;
    position: relative;
}

.speed-meter::before {
    content: '';
    width: 3px;
    height: 25px;
    background: var(--accent);
    position: absolute;
    bottom: 0;
    left: 50%;
    transform-origin: bottom;
    animation: speedNeedle 2s ease infinite;
}

@keyframes speedNeedle {
    0%, 100% {
        transform: rotate(-45deg);
    }
    50% {
        transform: rotate(45deg);
    }
}

/* Analytics Chart Animation */
.analytics-chart {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: flex-end;
    gap: 4px;
}

.analytics-chart::before,
.analytics-chart::after {
    content: '';
    flex: 1;
    background: var(--primary);
    animation: barGrow 2s ease infinite;
}

.analytics-chart::before {
    height: 30%;
    animation-delay: 0s;
}

.analytics-chart::after {
    height: 70%;
    animation-delay: 0.2s;
}

@keyframes barGrow {
    0%, 100% {
        transform: scaleY(1);
    }
    50% {
        transform: scaleY(1.3);
    }
}

/* Automation Gears Animation */
.automation-gears {
    width: 60px;
    height: 60px;
    position: relative;
}

.automation-gears::before,
.automation-gears::after {
    content: '';
    position: absolute;
    border: 3px solid var(--primary);
    border-radius: 50%;
}

.automation-gears::before {
    width: 35px;
    height: 35px;
    top: 0;
    left: 0;
    animation: rotate 3s linear infinite;
}

.automation-gears::after {
    width: 25px;
    height: 25px;
    bottom: 0;
    right: 0;
    animation: rotate 3s linear infinite reverse;
}

/* Enhanced Resources Section */
.resources-enhanced {
    padding: 80px 0;
    background: var(--bg-light);
}

.resources-grid-enhanced {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.resource-card-animated {
    background: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    transition: var(--transition);
}

.resource-card-animated:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.resource-animation {
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

/* Document Stack Animation */
.document-stack {
    position: relative;
    width: 50px;
    height: 60px;
}

.document {
    position: absolute;
    width: 100%;
    height: 100%;
    background: white;
    border: 2px solid var(--primary);
    border-radius: 4px;
    animation: stackFloat 3s ease infinite;
}

.document:nth-child(1) {
    transform: translate(0, 0);
    z-index: 3;
}

.document:nth-child(2) {
    transform: translate(5px, 5px);
    z-index: 2;
    animation-delay: 0.2s;
}

.document:nth-child(3) {
    transform: translate(10px, 10px);
    z-index: 1;
    animation-delay: 0.4s;
}

@keyframes stackFloat {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-5px);
    }
}

/* Blog Animation */
.blog-animation {
    width: 60px;
    height: 50px;
    border: 2px solid var(--primary);
    border-radius: 4px;
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.blog-line {
    height: 2px;
    background: var(--primary);
    animation: lineWrite 2s ease infinite;
}

.blog-line:nth-child(2) {
    width: 80%;
    animation-delay: 0.2s;
}

.blog-line:nth-child(3) {
    width: 60%;
    animation-delay: 0.4s;
}

@keyframes lineWrite {
    0% {
        transform: scaleX(0);
        transform-origin: left;
    }
    50% {
        transform: scaleX(1);
        transform-origin: left;
    }
    100% {
        transform: scaleX(1);
        transform-origin: left;
    }
}

/* Video Play Animation */
.video-play {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: pulse 2s ease infinite;
}

.play-button {
    width: 0;
    height: 0;
    border-left: 15px solid white;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    margin-left: 3px;
}

/* Responsive */
@media (max-width: 1024px) {
    .demo-content {
        grid-template-columns: 1fr;
    }
    
    .timeline-cards {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .timeline-cards {
        grid-template-columns: 1fr;
    }
    
    .advantages-grid,
    .security-grid-enhanced,
    .resources-grid-enhanced {
        grid-template-columns: 1fr;
    }
}