/* ============================================
   IRMS Public Pages - Complete Shared Styles
   Pages: Landing, Contact, Privacy, Terms
   ============================================ */

:root {
    --primary: #dc2626;
    --primary-dark: #b91c1c;
    --primary-light: #fef2f2;
    --white: #ffffff;
    --bg-light: #f7f8fa;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --text-light: #999999;
    --border: #e5e5e5;
    --success-bg: #f0fdf4;
    --success-text: #166534;
    --success-border: #bbf7d0;
    --error-bg: #fef2f2;
    --error-text: #991b1b;
    --error-border: #fecaca;
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Instrument Sans', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background: var(--bg-light);
    color: var(--text-dark);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ============================================
   Navigation - Shared across all pages
   ============================================ */
.top-nav {
    background: var(--white);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 10;
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.logo h1 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--primary);
    font-family: var(--font-heading);
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-gray);
    font-size: 0.9rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--primary);
}

.login-btn {
    background: var(--primary);
    color: var(--white) !important;
    padding: 0.5rem 1.25rem;
    border-radius: 6px;
    font-weight: 500;
}

.login-btn:hover {
    background: var(--primary-dark);
}

/* ============================================
   Main Content Container
   ============================================ */
.main-content {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
    width: 100%;
}

/* ============================================
   Landing Page Specific Styles
   ============================================ */
.landing-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Hero Section */
.hero {
    text-align: center;
    padding: 2rem 0;
}

.hero h1 {
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 1rem;
    font-family: var(--font-heading);
    line-height: 1.2;
}

.hero p {
    font-size: clamp(1rem, 4vw, 1.125rem);
    color: var(--text-gray);
    max-width: 600px;
    margin: 0 auto 2rem;
}

/* Features Grid */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin: 2rem 0;
}

.feature-item {
    padding: 1rem;
    background: var(--white);
    border-left: 3px solid var(--primary);
    display: flex;
    align-items: center;
    gap: 1rem;
}

.feature-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.feature-text p {
    font-size: 0.875rem;
    color: var(--text-gray);
    margin: 0;
}

/* CTA Section */
.cta-section {
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: var(--white);
    padding: 0.875rem 2rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
}

.cta-button:hover {
    background: var(--primary-dark);
}

/* ============================================
   Page Header (Contact, Privacy, Terms)
   ============================================ */
.page-header {
    text-align: center;
    margin-bottom: 2rem;
}

.page-header h1 {
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
    font-family: var(--font-heading);
}

.page-header p {
    color: var(--text-gray);
    font-size: 1rem;
}

/* ============================================
   Content Card (Privacy, Terms)
   ============================================ */
.content-card {
    background: var(--white);
    padding: 2rem;
    border-radius: 8px;
}

.content-card h1 {
    font-size: clamp(1.5rem, 5vw, 2rem);
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-family: var(--font-heading);
    border-bottom: 2px solid var(--primary);
    display: inline-block;
    padding-bottom: 0.5rem;
}

.content-card h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1.5rem 0 0.5rem;
    color: var(--primary-dark);
    font-family: var(--font-heading);
}

.content-card p {
    color: var(--text-gray);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.content-card ul {
    margin-left: 2rem;
    margin-bottom: 1rem;
}

.content-card li {
    margin-bottom: 0.5rem;
    color: var(--text-gray);
}

.content-card .last-updated {
    color: var(--text-light);
    font-size: 0.875rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.back-link {
    display: inline-block;
    margin-top: 2rem;
    color: var(--primary);
    text-decoration: none;
    font-size: 0.875rem;
}

.back-link:hover {
    text-decoration: underline;
}

.back-link i {
    margin-right: 0.5rem;
}

/* ============================================
   Contact Page Specific Styles
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.contact-info {
    background: var(--white);
    padding: 1.5rem;
    border-left: 3px solid var(--primary);
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: var(--primary-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.info-details h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.info-details p {
    color: var(--text-gray);
    font-size: 0.875rem;
    margin: 0;
}

.info-details a {
    color: var(--primary);
    text-decoration: none;
}

.contact-form {
    background: var(--white);
    padding: 1.5rem;
}

.contact-form h2 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

/* Form Styles */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.875rem;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.btn-submit {
    width: 100%;
    padding: 0.875rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-submit:hover {
    background: var(--primary-dark);
}

/* Alert Messages */
.alert {
    padding: 0.75rem;
    border-radius: 6px;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}

.field-error {
    color: var(--primary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

/* FAQ Section */
.faq-section {
    margin-top: 2rem;
}

.faq-section h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-family: var(--font-heading);
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.faq-item {
    background: var(--white);
    padding: 1rem;
}

.faq-item h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.faq-item h3 i {
    color: var(--primary);
    font-size: 0.75rem;
}

.faq-item p {
    color: var(--text-gray);
    font-size: 0.813rem;
    line-height: 1.5;
    margin-left: 1.5rem;
}

/* ============================================
   Footer - Shared across all pages
   ============================================ */
.site-footer {
    background: var(--white);
    border-top: 1px solid var(--border);
    padding: 1.5rem 1rem;
    text-align: center;
    margin-top: 2rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.footer-links a {
    color: var(--text-gray);
    text-decoration: none;
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.social-icons a {
    width: 36px;
    height: 36px;
    background: var(--bg-light);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-gray);
    text-decoration: none;
}

.social-icons a:hover {
    background: var(--primary);
    color: var(--white);
}

.copyright {
    font-size: 0.75rem;
    color: var(--text-light);
}

.copyright a {
    color: var(--primary);
    text-decoration: none;
}

/* ============================================
   Responsive Design - Media Queries
   ============================================ */
@media (min-width: 768px) {
    .main-content {
        padding: 3rem 2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .hero {
        padding: 3rem 0;
    }
    
    .contact-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 1rem;
    }
    
    .faq-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .nav-content {
        flex-direction: column;
        text-align: center;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .feature-item {
        padding: 0.875rem;
    }
    
    .cta-button {
        width: 100%;
        justify-content: center;
    }
    
    .content-card {
        padding: 1.5rem;
    }
}

/* ============================================
   Login Page Specific Styles - Completely Flat
   ============================================ */
body.login-page {
    margin: 0;
    font-family: var(--font-body);
    background: var(--bg-light);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 1rem;
}

.login-wrapper {
    width: 100%;
    max-width: 420px;
    background: var(--white);
    padding: 2.5rem 2rem;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header h2 {
    font-family: var(--font-heading);
    color: var(--primary-dark);
    margin-bottom: 0.5rem;
    font-weight: 600;
    font-size: 1.75rem;
}

.login-header p {
    color: var(--text-gray);
    font-size: 0.95rem;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    background: var(--white);
    font-size: 0.95rem;
    box-sizing: border-box;
    font-family: var(--font-body);
}

input:focus {
    outline: none;
    border-color: var(--primary);
}

.checkbox-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--primary);
}

.checkbox-container label {
    color: var(--text-gray);
    font-size: 0.9rem;
    cursor: pointer;
}

.btn {
    margin-top: 1.5rem;
    width: 100%;
    padding: 1rem;
    background: var(--primary);
    color: var(--white);
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: var(--font-heading);
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:hover:not(:disabled) {
    background: var(--primary-dark);
}

.btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.spinner {
    border: 2px solid rgba(255,255,255,0.3);
    border-top: 2px solid var(--white);
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 0.6s linear infinite;
    display: inline-block;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.error-msg {
    color: var(--error-text);
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
    padding: 0.5rem;
    background: var(--error-bg);
}

.error-msg:empty {
    display: none;
}

.form-foot {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.form-foot a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.form-foot a:hover {
    text-decoration: underline;
}

.form-foot br {
    margin: 0.5rem 0;
}

/* Alert styles */
.alert {
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
}

.alert-success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid var(--success-border);
}

.alert-error {
    background: var(--error-bg);
    color: var(--error-text);
    border: 1px solid var(--error-border);
}

.field-error {
    color: var(--primary);
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

@media (max-width: 600px) {
    .login-wrapper {
        padding: 2rem 1.5rem;
    }
    
    .login-header h2 {
        font-size: 1.5rem;
    }
}