/* ===== RESET & BASE STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1e40af;
    --secondary: #7c3aed;
    --accent: #f59e0b;
    --success: #10b981;
    --danger: #ef4444;
    --dark: #1f2937;
    --light: #f3f4f6;
    --white: #ffffff;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px rgba(0,0,0,0.15);
    
    --transition: all 0.3s ease;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    background: var(--light);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ===== PHASE 1: PWA & MOBILE FEATURES ===== */

/* PWA Install Prompt */
.install-prompt {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    z-index: 9999;
    animation: slideUp 0.3s ease;
}

.install-content {
    display: flex;
    align-items: center;
    padding: 16px;
    gap: 12px;
}

.install-content i {
    font-size: 24px;
    color: var(--primary);
}

.install-content div {
    flex: 1;
}

.install-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    font-weight: 600;
}

.install-content p {
    margin: 0;
    font-size: 12px;
    color: #666;
}

/* Notification Center */
.notification-bell {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
}

.bell-icon {
    width: 48px;
    height: 48px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.notification-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--danger);
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

.notification-center {
    position: absolute;
    top: 60px;
    right: 0;
    width: 300px;
    max-width: 90vw;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    max-height: 400px;
    overflow: hidden;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.notification-center.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.notification-header {
    padding: 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-list {
    max-height: 300px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    display: flex;
    gap: 12px;
    align-items: flex-start;
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item i {
    color: var(--primary);
    margin-top: 2px;
}

.no-notifications {
    padding: 24px;
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* Quick Action FAB */
.quick-action-fab {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 9998;
}

.fab-main {
    width: 56px;
    height: 56px;
    background: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.fab-main:hover {
    transform: scale(1.1);
}

.fab-main.active {
    transform: rotate(45deg);
}

.fab-menu {
    position: absolute;
    bottom: 70px;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: var(--transition);
}

.fab-menu.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.fab-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: white;
    border-radius: 28px;
    color: var(--dark);
    text-decoration: none;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    white-space: nowrap;
}

.fab-item:hover {
    transform: translateX(-4px);
    box-shadow: var(--shadow-lg);
}

/* Offline Indicator */
.offline-indicator {
    position: fixed;
    top: 80px;
    left: 20px;
    right: 20px;
    background: #f97316;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    text-align: center;
    font-size: 14px;
    z-index: 9997;
    animation: slideDown 0.3s ease;
}

/* Pull to Refresh */
.pull-refresh-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: var(--primary);
    color: white;
    padding: 12px;
    text-align: center;
    font-size: 14px;
    z-index: 9996;
}

/* Toast Notifications */
.toast {
    position: fixed;
    bottom: 100px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: 8px;
    padding: 12px 16px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 9995;
    animation: slideUp 0.3s ease;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-error {
    border-left: 4px solid var(--danger);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

.toast button {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #666;
    margin-left: auto;
}

/* Enhanced Mobile Cards */
.event-card, .announcement-card, .project-card {
    background: white;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid #e5e7eb;
}

.event-card:hover, .announcement-card:hover, .project-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.event-card {
    display: flex;
    gap: 16px;
}

.event-date {
    flex-shrink: 0;
    width: 60px;
    text-align: center;
    background: var(--primary);
    color: white;
    border-radius: 8px;
    padding: 12px 8px;
}

.event-date .day {
    display: block;
    font-size: 24px;
    font-weight: 700;
    line-height: 1;
}

.event-date .month {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-top: 4px;
}

.event-content {
    flex: 1;
}

.event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    margin: 12px 0;
    font-size: 14px;
    color: #666;
}

.event-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

/* Loading States */
.loading, .loading-skeleton {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
}

.empty-state, .error-state {
    padding: 40px 20px;
    text-align: center;
    color: #666;
    background: white;
    border-radius: 12px;
    margin-bottom: 16px;
}

.error-state {
    color: var(--danger);
}

/* Animations */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Mobile Optimizations */
@media (max-width: 768px) {
    .container {
        padding: 0 16px;
    }
    
    .notification-center {
        width: calc(100vw - 40px);
        right: -20px;
    }
    
    .event-card {
        flex-direction: column;
        text-align: center;
    }
    
    .event-date {
        align-self: center;
    }
    
    .event-meta {
        justify-content: center;
    }
    
    .fab-item span {
        display: none;
    }
    
    .fab-item {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        padding: 0;
        justify-content: center;
    }
}

/* ===== NAVIGATION ===== */
.navbar {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-md);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 15px;
    color: var(--white);
    text-decoration: none;
}

.nav-logo img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: white;
    padding: 5px;
}

.nav-logo-text h1 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0;
}

.nav-logo-text p {
    font-size: 0.75rem;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition);
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.nav-link:hover {
    background: rgba(255,255,255,0.1);
}

.nav-btn {
    background: var(--accent);
    padding: 0.6rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
}

.nav-btn:hover {
    background: #d97706;
    transform: translateY(-2px);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
    transition: var(--transition);
}

/* ===== HERO SECTION ===== */
.hero {
    background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
    color: var(--white);
    padding: 150px 20px 100px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::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 1200 120"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" opacity=".25"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" opacity=".5"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,248.8-84.81V0Z"/></svg>') no-repeat bottom;
    background-size: cover;
    opacity: 0.1;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
    margin: 0 auto;
}

.hero-logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px;
    border-radius: 50%;
    background: white;
    padding: 10px;
    box-shadow: var(--shadow-xl);
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    animation: fadeInUp 0.8s ease;
}

.hero h2 {
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    opacity: 0.95;
    animation: fadeInUp 1s ease;
}

.hero p {
    font-size: 1.1rem;
    opacity: 0.9;
    margin: 30px 0;
    line-height: 1.8;
    animation: fadeInUp 1.2s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 40px;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--accent);
    color: var(--dark);
}

.btn-primary:hover {
    background: #d97706;
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
}

/* ===== SECTIONS ===== */
section {
    padding: 80px 20px;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 1rem;
}

.section-header p {
    font-size: 1.1rem;
    color: #6b7280;
    max-width: 600px;
    margin: 0 auto;
}

/* ===== ABOUT SECTION ===== */
.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    color: #4b5563;
    line-height: 1.8;
}

.about-features {
    display: grid;
    gap: 20px;
}

.feature-item {
    display: flex;
    align-items: start;
    gap: 15px;
    padding: 20px;
    background: var(--white);
    border-radius: 15px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.feature-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    width: 50px;
    height: 50px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.feature-content h4 {
    color: var(--dark);
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
}

.feature-content p {
    color: #6b7280;
    font-size: 0.95rem;
}

/* ===== CARDS GRID ===== */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
}

.card-content {
    padding: 25px;
}

.card-badge {
    display: inline-block;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 15px;
}

.badge-robotics { background: #dbeafe; color: var(--primary); }
.badge-coding { background: #fef3c7; color: var(--accent); }
.badge-workshop { background: #d1fae5; color: var(--success); }
.badge-competition { background: #fee2e2; color: var(--danger); }

.card-title {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 10px;
}

.card-description {
    color: #6b7280;
    margin-bottom: 20px;
    line-height: 1.6;
}

.card-meta {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    color: #6b7280;
}

.card-meta i {
    color: var(--primary);
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.card-btn {
    background: var(--primary);
    color: var(--white);
    padding: 10px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition);
}

.card-btn:hover {
    background: var(--secondary);
    transform: scale(1.05);
}

/* ===== ANNOUNCEMENTS ===== */
.announcements-list {
    max-width: 800px;
    margin: 0 auto;
}

.announcement-item {
    background: var(--white);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 20px;
    border-left: 5px solid var(--primary);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.announcement-item:hover {
    transform: translateX(10px);
    box-shadow: var(--shadow-md);
}

.announcement-header {
    display: flex;
    justify-content: space-between;
    align-items: start;
    margin-bottom: 15px;
}

.announcement-title {
    font-size: 1.3rem;
    color: var(--dark);
    font-weight: 600;
}

.priority-badge {
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.75rem;
    font-weight: 600;
}

.priority-high { background: #fee2e2; color: var(--danger); }
.priority-medium { background: #fef3c7; color: var(--accent); }
.priority-low { background: #dbeafe; color: var(--primary); }

.announcement-content {
    color: #4b5563;
    line-height: 1.8;
    margin-bottom: 15px;
}

.announcement-date {
    font-size: 0.85rem;
    color: #9ca3af;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--dark);
    color: var(--white);
    padding: 60px 20px 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.footer-section p,
.footer-section li {
    color: #9ca3af;
    line-height: 1.8;
}

.footer-section ul {
    list-style: none;
}

.footer-section a {
    color: #9ca3af;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section a:hover {
    color: var(--accent);
}

.social-links {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-3px);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 30px;
    text-align: center;
    color: #9ca3af;
}

/* ===== FORM STYLES ===== */
.form-group {
    margin-bottom: 25px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--dark);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    font-size: 1rem;
    transition: var(--transition);
    font-family: inherit;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30, 64, 175, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
}

.alert {
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid var(--success);
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid var(--danger);
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid var(--primary);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: var(--primary);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        padding: 20px 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero h2 {
        font-size: 1.3rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== LOADING ANIMATION ===== */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(0,0,0,0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}
