/**
 * JTC TMIS Teacher Portal - Public Pages Styles
 * Updated: 2026-02-11
 * 
 * PURPOSE:
 * - Modern, elegant styling for public-facing pages
 * - JTC brand colors (green #2b4f22, yellow #f2e638)
 * - Fully responsive design
 * - Hero sections, cards, forms, navigation
 */

/* ============================================
   PUBLIC NAVIGATION (Top Nav Bar)
   ============================================ */

.public-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-link {
    color: #2b4f22;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(43, 79, 34, 0.05);
    color: #1a3316;
}

.nav-link.active {
    background: rgba(43, 79, 34, 0.1);
    color: #1a3316;
    font-weight: 600;
}

.nav-link-button {
    background: #2b4f22;
    color: white !important;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(43, 79, 34, 0.2);
    transition: all 0.3s ease;
}

.nav-link-button:hover {
    background: #1a3316;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(43, 79, 34, 0.3);
}

.portal-access-btn {
    background: linear-gradient(135deg, #2b4f22 0%, #5a8f47 100%);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px rgba(242, 230, 56, 0.3); }
    50% { box-shadow: 0 0 30px rgba(242, 230, 56, 0.5); }
}

/* Mobile nav toggle */
.mobile-nav-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    color: #2b4f22;
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-nav-toggle {
        display: block;
    }
    
    .public-nav-links {
        position: fixed;
        top: 64px;
        right: -100%;
        width: 280px;
        height: calc(100vh - 64px);
        background: white;
        flex-direction: column;
        align-items: stretch;
        padding: 2rem;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
        z-index: 1000;
    }
    
    .public-nav-links.open {
        right: 0;
    }
    
    .nav-link, .nav-link-button {
        width: 100%;
        text-align: center;
    }
}

/* ============================================
   HERO SECTION
   ============================================ */

.hero-section {
    background: linear-gradient(135deg, #2b4f22 0%, #1a3316 100%);
    color: white;
    padding: 6rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><path d="M0 0 L50 50 L0 100 L100 100 L50 50 L100 0 Z" fill="rgba(255,255,255,0.02)"/></svg>');
    background-size: 100px 100px;
    opacity: 0.5;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.2;
    color: #ffffff;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.125rem;
    line-height: 1.8;
    margin-bottom: 3rem;
    opacity: 0.9;
}

.hero-cta {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.btn-hero-primary, .btn-hero-secondary {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
    font-weight: 600;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-hero-primary {
    background: #f2e638;
    color: #1a3316;
    box-shadow: 0 4px 15px rgba(242, 230, 56, 0.3);
}

.btn-hero-primary:hover {
    background: #d1c030;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(242, 230, 56, 0.4);
}

.btn-hero-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.btn-hero-secondary:hover {
    background: white;
    color: #2b4f22;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-hero-primary, .btn-hero-secondary {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
}

/* ============================================
   CONTENT SECTIONS
   ============================================ */

.content-section {
    padding: 5rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2b4f22;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: #666;
    max-width: 700px;
    margin: 0 auto;
}

.section-divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #2b4f22, #f2e638);
    margin: 2rem auto;
    border-radius: 2px;
}

/* ============================================
   FEATURE CARDS
   ============================================ */

.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.feature-card {
    background: white;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid rgba(43, 79, 34, 0.1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(43, 79, 34, 0.15);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #2b4f22, #5a8f47);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #2b4f22;
    margin-bottom: 1rem;
}

.feature-description {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
}

/* ============================================
   ACTION CARDS (Registration Options)
   ============================================ */

.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.action-card {
    background: white;
    border-radius: 16px;
    padding: 3rem 2rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    text-decoration: none;
    display: block;
    border: 2px solid transparent;
}

.action-card.primary {
    background: linear-gradient(135deg, #f2e638 0%, #f2b90f 100%);
    color: #1a3316;
}

.action-card.secondary {
    background: linear-gradient(135deg, #f2b90f 0%, #d1c030 100%);
    color: #1a3316;
}

.action-card.success {
    background: linear-gradient(135deg, #2b4f22 0%, #5a8f47 100%);
    color: white;
}

.action-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
}

.action-card-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.action-card-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.action-card-description {
    font-size: 1rem;
    line-height: 1.6;
    opacity: 0.95;
}

.action-card-cta {
    margin-top: 1.5rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* ============================================
   CONTACT SECTION
   ============================================ */

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-top: 3rem;
}

.contact-info {
    background: #f8f9fa;
    padding: 2.5rem;
    border-radius: 16px;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
}

.contact-item-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, #2b4f22, #5a8f47);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.contact-item-content h3 {
    font-size: 1.125rem;
    font-weight: 600;
    color: #2b4f22;
    margin-bottom: 0.5rem;
}

.contact-item-content p {
    color: #666;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   RESPONSIVE ADJUSTMENTS
   ============================================ */

@media (max-width: 992px) {
    .content-section {
        padding: 3rem 1.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
}

@media (max-width: 768px) {
    .feature-grid, .action-cards {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
}

/* ============================================
   HIDE SIDEBAR ON PUBLIC PAGES
   ============================================ */

body:not(.authenticated) .sidebar,
body:not(.authenticated) .breadcrumb-container {
    display: none !important;
}

body:not(.authenticated) .main-content {
    margin-left: 0 !important;
    width: 100% !important;
}

body:not(.authenticated) .content-wrapper {
    padding: 0 !important;
}
