/* Air Link Rural Broadband Theme for Dashboard */

/* Color Palette - Light Mode */
:root {
    --primary-color: #e95924;        /* Orange accent color */
    --primary-hover: #d14818;        /* Darker orange for hover */
    --secondary-color: #4d4e4e;      /* Dark gray */
    --text-color: #4d4e4e;           /* Body text */
    --light-bg: #f2f2f2;             /* Light gray background */
    --white: #ffffff;
    --link-color: #e95924;
    --link-hover: #737173;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow: rgba(0, 0, 0, 0.1);
}

/* Dark Mode Colors */
[data-theme="dark"] {
    --primary-color: #ff6b35;        /* Brighter orange for dark mode */
    --primary-hover: #ff8555;
    --secondary-color: #2a2a2a;      /* Dark background */
    --text-color: #e0e0e0;           /* Light text */
    --light-bg: #1a1a1a;             /* Very dark background */
    --white: #2a2a2a;                /* Dark surface */
    --link-color: #ff6b35;
    --link-hover: #ff8555;
    --card-bg: #2a2a2a;
    --border-color: #3a3a3a;
    --shadow: rgba(0, 0, 0, 0.3);
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', 'Arial', sans-serif;
    font-weight: 400;
    color: var(--text-color);
    background-color: var(--light-bg);
    line-height: 1.6;
    font-size: 16px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Lato', sans-serif;
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
    font-weight: 900;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

a {
    color: var(--link-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--link-hover);
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    background-color: var(--card-bg);
    box-shadow: 0 2px 5px var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}

.header-top {
    background-color: var(--card-bg);
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    font-size: 1.5rem;
    font-weight: 900;
    color: var(--primary-color);
    font-family: 'Poppins', sans-serif;
}

.logo img {
    max-height: 60px;
    width: auto;
}

/* Navigation */
nav {
    background-color: var(--card-bg);
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    padding: 15px 0;
}

nav ul li a {
    color: var(--primary-color);
    font-weight: 500;
    padding: 10px 15px;
    transition: color 0.3s ease;
}

nav ul li a:hover {
    color: var(--text-color);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    font-weight: 700;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.btn:hover {
    background-color: var(--primary-hover);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(233, 89, 36, 0.3);
}

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

.btn-secondary:hover {
    background-color: var(--link-hover);
}

/* Dark mode: Make secondary buttons more visible */
[data-theme="dark"] .btn-secondary {
    background-color: #3a3a3a;
    border: 1px solid #4a4a4a;
}

[data-theme="dark"] .btn-secondary:hover {
    background-color: #4a4a4a;
    border-color: #5a5a5a;
}

/* Microsoft Sign-in Button */
.btn-microsoft {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 12px 24px;
    background-color: #ffffff;
    color: #5e5e5e;
    border: 1px solid #8c8c8c;
    border-radius: 2px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-microsoft:hover {
    background-color: #f3f3f3;
    border-color: #8c8c8c;
    color: #5e5e5e;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.btn-microsoft svg {
    flex-shrink: 0;
}

/* Main Content */
main {
    background-color: var(--light-bg);
    padding: 40px 0;
    min-height: calc(100vh - 400px);
}

.content-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, rgba(233, 89, 36, 0.9), rgba(77, 78, 78, 0.8)),
                url('/images/hero-bg.jpg') center/cover;
    color: var(--white);
    padding: 80px 0;
    text-align: center;
}

.hero h1 {
    color: var(--white);
    margin-bottom: 20px;
    font-size: 3rem;
}

.hero p {
    font-size: 1.25rem;
    margin-bottom: 30px;
}

/* Cards/Callouts */
.card {
    background-color: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 2px 10px var(--shadow);
    padding: 30px;
    margin-bottom: 30px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid var(--border-color);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 20px rgba(233, 89, 36, 0.2);
}

.card h3 {
    color: var(--text-color);
    margin-bottom: 15px;
}

.card-icon {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
}

/* Grid Layout */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--secondary-color), #2a2b2b);
    color: #e0e0e0;
    padding: 50px 0 20px;
    margin-top: 60px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 30px;
}

.footer-section h3 {
    color: #ffffff;
    margin-bottom: 20px;
}

.footer-section p {
    color: #e0e0e0;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #e0e0e0;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 14px;
    color: #e0e0e0;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    background-color: var(--card-bg);
    color: var(--text-color);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(233, 89, 36, 0.1);
}

/* Tables */
table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    background-color: var(--card-bg);
    border: 1px solid var(--border-color);
}

table th,
table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

table th {
    background-color: var(--secondary-color);
    color: var(--white);
    font-weight: 700;
}

[data-theme="dark"] table th {
    background-color: #1a1a1a;
    color: var(--text-color);
}

table tr:hover {
    background-color: rgba(233, 89, 36, 0.05);
}

[data-theme="dark"] table tr:hover {
    background-color: rgba(255, 107, 53, 0.1);
}

/* Alert Messages */
.alert {
    padding: 15px 20px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.mt-1 { margin-top: 10px; }
.mt-2 { margin-top: 20px; }
.mt-3 { margin-top: 30px; }
.mt-4 { margin-top: 40px; }

.mb-1 { margin-bottom: 10px; }
.mb-2 { margin-bottom: 20px; }
.mb-3 { margin-bottom: 30px; }
.mb-4 { margin-bottom: 40px; }

.p-1 { padding: 10px; }
.p-2 { padding: 20px; }
.p-3 { padding: 30px; }
.p-4 { padding: 40px; }

/* Responsive Design */
@media (max-width: 992px) {
    .grid-3,
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }
    
    nav ul {
        flex-direction: column;
        gap: 10px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .grid,
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .header-content {
        flex-direction: column;
        gap: 20px;
    }
    
    nav ul {
        padding: 10px 0;
    }
    
    h1 {
        font-size: 1.75rem;
    }
    
    .hero {
        padding: 50px 0;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
}

/* Animation Classes */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.6s ease-out;
}

/* Loading Spinner */
.spinner {
    border: 3px solid rgba(233, 89, 36, 0.2);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Dark Mode Toggle */
.theme-toggle {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: var(--primary-color);
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px var(--shadow);
    transition: all 0.3s ease;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.theme-toggle:hover {
    background-color: var(--primary-hover);
    transform: scale(1.1);
}

.theme-toggle svg {
    width: 28px;
    height: 28px;
}
