/* Young Driver Tracker - Main Styles */

/* ========================================
   CUSTOM CSS VARIABLES (BASED ON MOBILE APP)
   ======================================== */
:root {
    /* Primary colors from mobile app */
    --ydt-primary: #007AFF;           /* iOS Blue - main brand color */
    --ydt-primary-light: #66B3FF;     /* Lighter variant */
    --ydt-primary-dark: #0056CC;      /* Darker variant */
    
    /* Secondary colors */
    --ydt-secondary: #34C759;         /* iOS Green - success/safety */
    --ydt-success: #4CAF50;           /* Success states */
    --ydt-warning: #FF9500;           /* iOS Orange - warnings */
    --ydt-danger: #FF3B30;            /* iOS Red - danger/alerts */
    --ydt-info: #2196F3;              /* Information */
    
    /* Neutral colors */
    --ydt-dark: #1D1D1F;              /* Dark text */
    --ydt-light: #F5F5F7;             /* Light background */
    --ydt-gray: #666666;              /* Secondary text */
    --ydt-gray-light: #F8F9FA;        /* Light gray backgrounds */
    --ydt-gray-medium: #E9ECEF;       /* Medium gray borders */
    
    /* Gradients */
    --ydt-gradient-primary: linear-gradient(135deg, #007AFF 0%, #66B3FF 100%);
    --ydt-gradient-success: linear-gradient(135deg, #34C759 0%, #4CAF50 100%);
    --ydt-gradient-warning: linear-gradient(135deg, #FF9500 0%, #FF8C00 100%);
    --ydt-gradient-danger: linear-gradient(135deg, #FF3B30 0%, #DC143C 100%);
    
    /* Shadows */
    --ydt-shadow-sm: 0 2px 4px rgba(0, 122, 255, 0.1);
    --ydt-shadow-md: 0 4px 12px rgba(0, 122, 255, 0.15);
    --ydt-shadow-lg: 0 8px 25px rgba(0, 122, 255, 0.2);
    
    /* Border radius */
    --ydt-border-radius-sm: 8px;
    --ydt-border-radius-md: 12px;
    --ydt-border-radius-lg: 16px;
    
    /* Fonts */
    --ydt-font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* ========================================
   GLOBAL OVERRIDES
   ======================================== */
body {
    font-family: var(--ydt-font-family);
    line-height: 1.6;
    color: var(--ydt-dark);
    background-color: var(--ydt-light);
}

/* Bootstrap primary color overrides */
.btn-primary {
    background: var(--ydt-gradient-primary);
    border: none;
    border-radius: var(--ydt-border-radius-sm);
    box-shadow: var(--ydt-shadow-sm);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background: var(--ydt-primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--ydt-shadow-md);
}

.btn-success {
    background: var(--ydt-gradient-success);
    border: none;
}

.btn-warning {
    background: var(--ydt-gradient-warning);
    border: none;
    color: white;
}

.btn-danger {
    background: var(--ydt-gradient-danger);
    border: none;
}

.btn-outline-primary {
    color: var(--ydt-primary);
    border-color: var(--ydt-primary);
}

.btn-outline-primary:hover {
    background-color: var(--ydt-primary);
    border-color: var(--ydt-primary);
}

.text-primary {
    color: var(--ydt-primary) !important;
}

.bg-primary {
    background: var(--ydt-gradient-primary) !important;
}

/* ========================================
   NAVIGATION STYLES
   ======================================== */
.navbar {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--ydt-gray-medium);
    box-shadow: var(--ydt-shadow-sm);
}

.navbar-brand {
    font-weight: 700;
    color: var(--ydt-dark) !important;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.navbar-brand:hover {
    color: var(--ydt-primary) !important;
}

.navbar-brand img {
    border-radius: var(--ydt-border-radius-sm);
    box-shadow: var(--ydt-shadow-sm);
}

.nav-link {
    color: var(--ydt-dark) !important;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: var(--ydt-primary) !important;
}

.dropdown-menu {
    border: none;
    box-shadow: var(--ydt-shadow-md);
    border-radius: var(--ydt-border-radius-md);
}

.dropdown-item:hover {
    background-color: var(--ydt-primary);
    color: white;
}

/* ========================================
   HERO SECTION
   ======================================== */
.hero {
    background: var(--ydt-gradient-primary);
    color: white;
    padding: 6rem 0;
    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 1000 1000"><polygon fill="rgba(255,255,255,0.05)" points="0,1000 1000,0 1000,1000"/></svg>');
    background-size: cover;
}

.hero .container {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.hero img {
    border-radius: var(--ydt-border-radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.hero .lead {
    font-size: 1.25rem;
    opacity: 0.95;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ========================================
   CARDS
   ======================================== */
.card {
    border: none;
    border-radius: var(--ydt-border-radius-lg);
    box-shadow: var(--ydt-shadow-sm);
    transition: all 0.3s ease;
    overflow: hidden;
    height: 100%;
}

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

/* Features section specific styles */
.features-section {
    padding: 8rem 0;
}

.features-header {
    text-align: center;
    margin-bottom: 5rem;
    padding: 0 2rem;
}

.features-header h2 {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--ydt-dark);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.features-header p {
    font-size: 1.25rem;
    color: var(--ydt-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

.card-header {
    background: var(--ydt-gray-light);
    border-bottom: 1px solid var(--ydt-gray-medium);
    font-weight: 600;
    padding: 1.5rem;
}

.card-body {
    padding: 2rem;
}

/* Feature cards with specific colors */
.feature-card h3.text-primary {
    color: var(--ydt-primary) !important;
}

.feature-card h3.text-success {
    color: var(--ydt-secondary) !important;
}

.feature-card h3.text-warning {
    color: var(--ydt-warning) !important;
}

.feature-card h3.text-danger {
    color: var(--ydt-danger) !important;
}

.feature-card h3.text-info {
    color: var(--ydt-info) !important;
}

/* ========================================
   STATISTICS SECTION
   ======================================== */
.stats-section {
    background: var(--ydt-gradient-primary);
    color: white;
    padding: 4rem 0;
    position: relative;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(255,255,255,0.05) 25%, transparent 25%),
                linear-gradient(-45deg, rgba(255,255,255,0.05) 25%, transparent 25%),
                linear-gradient(45deg, transparent 75%, rgba(255,255,255,0.05) 75%),
                linear-gradient(-45deg, transparent 75%, rgba(255,255,255,0.05) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.stats-section .container {
    position: relative;
    z-index: 2;
}

.stat-value {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========================================
   CONTENT SECTIONS
   ======================================== */
.content-section {
    padding: 8rem 0;
}

.content-section.bg-light {
    background-color: var(--ydt-gray-light);
}

.content-header {
    text-align: center;
    margin-bottom: 5rem;
    padding: 0 2rem;
}

.content-header h2 {
    font-size: 2.75rem;
    font-weight: 700;
    color: var(--ydt-dark);
    margin-bottom: 2rem;
    line-height: 1.2;
}

.content-header p {
    font-size: 1.25rem;
    color: var(--ydt-gray);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Content badges */
.content-badge {
    padding: 0.5rem 1rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
    color: white;
}

.badge-news {
    background: var(--ydt-gradient-primary);
}

.badge-tips {
    background: var(--ydt-gradient-success);
}

.badge-updates {
    background: var(--ydt-gradient-warning);
}

/* ========================================
   STATUS INDICATORS
   ======================================== */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.25rem;
    border-radius: 25px;
    font-size: 0.875rem;
    font-weight: 600;
}

.status-healthy {
    background: rgba(52, 199, 89, 0.1);
    color: var(--ydt-secondary);
}

.status-error {
    background: rgba(255, 59, 48, 0.1);
    color: var(--ydt-danger);
}

.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ========================================
   FOOTER
   ======================================== */
.footer {
    background: var(--ydt-dark);
    color: white;
    padding: 4rem 0 2rem;
    margin-top: 4rem;
}

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

.footer h3 {
    color: var(--ydt-primary);
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.footer a:hover {
    color: var(--ydt-primary);
    transform: translateX(4px);
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer ul li {
    margin-bottom: 0.75rem;
}

.footer-bottom {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* ========================================
   FORM ELEMENTS
   ======================================== */
.form-control, .form-select {
    border-radius: var(--ydt-border-radius-sm);
    border: 2px solid var(--ydt-gray-medium);
    padding: 0.75rem 1rem;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--ydt-primary);
    box-shadow: 0 0 0 0.2rem rgba(0, 122, 255, 0.25);
}

.form-label {
    font-weight: 600;
    color: var(--ydt-dark);
    margin-bottom: 0.5rem;
}

/* ========================================
   UTILITIES
   ======================================== */
.btn-gap {
    gap: 1rem;
}

.text-gradient-primary {
    background: var(--ydt-gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .content-header h2,
    .features-header h2 {
        font-size: 2.25rem;
        margin-bottom: 1.5rem;
    }
    
    .content-header p,
    .features-header p {
        font-size: 1.125rem;
    }
    
    .stat-value {
        font-size: 2.5rem;
    }
    
    .hero .btn-gap {
        flex-direction: column;
        align-items: center;
    }
    
    .hero .btn-gap .btn {
        width: 200px;
    }
    
    .content-section,
    .features-section {
        padding: 6rem 0;
    }
    
    .content-header,
    .features-header {
        margin-bottom: 3rem;
    }
    
    .footer-content {
        gap: 2rem;
    }
}

@media (max-width: 576px) {
    .content-section,
    .features-section {
        padding: 4rem 0;
    }
    
    .hero {
        padding: 4rem 0;
    }
    
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .content-header h2,
    .features-header h2 {
        font-size: 2rem;
    }
    
    .content-header,
    .features-header {
        padding: 0 1rem;
        margin-bottom: 2.5rem;
    }
    
    .footer {
        padding: 3rem 0 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}
