/* Frontline Aide - Enhanced Stylesheet
 * Modern, responsive design improvements
 */

/* Custom CSS Variables for consistent theming */
:root {
    --primary-green: #2D5A3D;
    --sage-green: #7A9B7E;
    --soft-gold: #E6C79C;
    --text-dark: #1F2937;
    --text-light: #6B7280;
    --bg-light: #F9FAFB;
    --border-light: #E5E7EB;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --border-radius: 0.5rem;
    --transition: all 0.3s ease;
}

/* Enhanced Typography */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

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

/* Enhanced Navigation */
nav {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-link {
    position: relative;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-green);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-green);
    transition: var(--transition);
}

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

/* Mobile Navigation Improvements */
@media (max-width: 768px) {
    .mobile-menu {
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        background: rgba(255, 255, 255, 0.95);
        border-top: 1px solid var(--border-light);
    }
    
    .mobile-menu a {
        padding: 1rem;
        border-bottom: 1px solid var(--border-light);
        transition: var(--transition);
    }
    
    .mobile-menu a:hover {
        background: var(--bg-light);
    }
}

/* Enhanced Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
    cursor: pointer;
    border: none;
    text-decoration: none;
    min-height: 44px; /* Touch target size */
}

.btn-primary {
    background: var(--primary-green);
    color: white;
}

.btn-primary:hover {
    background: #1F3D2A;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: var(--sage-green);
    color: white;
}

.btn-secondary:hover {
    background: #5A7A5D;
    transform: translateY(-1px);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-green);
    color: var(--primary-green);
}

.btn-outline:hover {
    background: var(--primary-green);
    color: white;
}

/* Enhanced Cards */
.card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-light);
}

/* Enhanced Forms */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border-light);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: var(--transition);
    background: white;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(45, 90, 61, 0.1);
}

.form-input.error,
.form-select.error,
.form-textarea.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-input.valid,
.form-select.valid,
.form-textarea.valid {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

.form-error {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

/* Mobile Form Improvements */
@media (max-width: 768px) {
    .form-input,
    .form-select,
    .form-textarea {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 1rem;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
}

/* Enhanced Hero Section */
.hero {
    position: relative;
    min-height: 70vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary-green) 0%, var(--sage-green) 100%);
    color: white;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    line-height: 1.1;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Mobile Hero Improvements */
@media (max-width: 768px) {
    .hero {
        min-height: 60vh;
        text-align: center;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.125rem;
    }
    
    .hero .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
}

/* Enhanced Service Cards */
.service-card {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    overflow: hidden;
    height: 100%;
}

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

.service-card .icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    font-size: 1.5rem;
    color: white;
}

.service-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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

/* Mobile Service Cards */
@media (max-width: 768px) {
    .service-card {
        margin-bottom: 2rem;
    }
    
    .service-card .icon {
        width: 48px;
        height: 48px;
        font-size: 1.25rem;
    }
}

/* Enhanced Testimonials */
.testimonial {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.testimonial:hover {
    box-shadow: var(--shadow-md);
}

.testimonial-content {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 1.5rem;
    position: relative;
}

.testimonial-content::before {
    content: '"';
    font-size: 3rem;
    color: var(--soft-gold);
    position: absolute;
    top: -1rem;
    left: -1rem;
    font-family: serif;
}

.testimonial-author {
    display: flex;
    align-items: center;
}

.testimonial-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--sage-green);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    margin-right: 1rem;
}

/* Enhanced Footer */
footer {
    background: var(--text-dark);
    color: white;
}

.footer-section h4 {
    color: var(--soft-gold);
    margin-bottom: 1rem;
    font-weight: 600;
}

.footer-section a {
    color: #9CA3AF;
    text-decoration: none;
    transition: var(--transition);
    display: block;
    padding: 0.25rem 0;
}

.footer-section a:hover {
    color: var(--soft-gold);
    transform: translateX(4px);
}

/* Mobile Footer */
@media (max-width: 768px) {
    .footer-section {
        margin-bottom: 2rem;
    }
    
    .footer-section h4 {
        margin-bottom: 0.5rem;
    }
}

/* Enhanced Admin Panel */
.admin-panel {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
    text-align: center;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-green);
}

.stat-label {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* Mobile Admin Panel */
@media (max-width: 768px) {
    .admin-stats {
        grid-template-columns: 1fr;
    }
}

/* Enhanced Scroll Animations */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Loading States */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(45, 90, 61, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-green);
    animation: spin 1s ease-in-out infinite;
}

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

/* Accessibility Improvements */
:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Print Styles */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero,
    .card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Dark Mode Support (if needed) */
@media (prefers-color-scheme: dark) {
    :root {
        --text-dark: #F9FAFB;
        --text-light: #D1D5DB;
        --bg-light: #111827;
        --border-light: #374151;
    }
    
    body {
        background: var(--bg-light);
        color: var(--text-dark);
    }
    
    .card,
    .service-card,
    .testimonial {
        background: #1F2937;
        border-color: var(--border-light);
    }
}

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

::-webkit-scrollbar-track {
    background: var(--bg-light);
}

::-webkit-scrollbar-thumb {
    background: var(--sage-green);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-green);
}