/* One Life at a Time Platform Styles */
/* Recovery and Career Services Management System */

:root {
    --primary-color: #2c5aa0;
    --secondary-color: #f39c12;
    --success-color: #27ae60;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #ecf0f1;
    --dark-color: #2c3e50;
    --text-color: #34495e;
    --border-color: #bdc3c7;
    --shadow: 0 2px 10px rgba(0,0,0,0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

.display-4 {
    font-weight: 700;
    line-height: 1.2;
}

.lead {
    font-size: 1.1rem;
    font-weight: 400;
}

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
}

.navbar-brand {
    font-weight: 700;
    color: var(--primary-color) !important;
}

.nav-link {
    font-weight: 500;
    color: var(--text-color) !important;
    transition: var(--transition);
}

.nav-link:hover {
    color: var(--primary-color) !important;
}

/* Dropdown Styles */
.dropdown-menu {
    border: none;
    box-shadow: 0 8px 16px rgba(0,0,0,0.1);
    border-radius: 8px;
    margin-top: 0.5rem;
}

.dropdown-item {
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
}

.dropdown-item:hover {
    background-color: var(--light-color);
    color: var(--primary-color);
}

.dropdown-divider {
    margin: 0.5rem 0;
}

/* Mobile Dropdown Enhancements */
@media (max-width: 991.98px) {
    .dropdown-menu {
        border: none;
        box-shadow: none;
        background-color: rgba(0,0,0,0.05);
        margin-top: 0;
        border-radius: 0;
        display: none !important;
        visibility: hidden !important;
    }
    
    .dropdown-menu.show {
        display: block !important;
        visibility: visible !important;
    }
    
    .dropdown-item {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(0,0,0,0.05);
    }
    
    .dropdown-item:last-child {
        border-bottom: none;
    }
    
    .dropdown-toggle::after {
        transition: transform 0.3s ease;
    }
    
    .dropdown-toggle[aria-expanded="true"]::after {
        transform: rotate(180deg);
    }
    
    /* Ensure dropdowns are properly positioned on mobile */
    .navbar-nav .dropdown {
        position: static;
    }
    
    .navbar-nav .dropdown-menu {
        position: static;
        float: none;
        width: 100%;
        margin-top: 0;
    }
    
    /* Force hide dropdowns by default on mobile */
    .navbar-nav .dropdown-menu:not(.show) {
        display: none !important;
        visibility: hidden !important;
    }
    
    /* Override Bootstrap's default dropdown behavior on mobile */
    .navbar-nav .dropdown-menu {
        display: none !important;
        visibility: hidden !important;
    }
    
    .navbar-nav .dropdown-menu.show {
        display: block !important;
        visibility: visible !important;
    }
    
    /* Additional aggressive overrides */
    .dropdown-menu[style*="display: block"] {
        display: block !important;
        visibility: visible !important;
    }
    
    .dropdown-menu[style*="display: none"] {
        display: none !important;
        visibility: hidden !important;
    }
}

/* Hero Section */
.hero-section {
    position: relative;
    background: linear-gradient(135deg, var(--primary-color) 0%, #1a4a8a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><defs><radialGradient id="a" cx="50%" cy="50%"><stop offset="0%" stop-color="%23ffffff" stop-opacity="0.1"/><stop offset="100%" stop-color="%23ffffff" stop-opacity="0"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23a)"/><circle cx="800" cy="300" r="150" fill="url(%23a)"/><circle cx="400" cy="700" r="120" fill="url(%23a)"/></svg>');
    background-size: cover;
    opacity: 0.3;
}

.hero-section .container {
    position: relative;
    z-index: 2;
}

/* Daily Code Display */
.daily-code-display {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1rem;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
}

.code-text {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    letter-spacing: 0.2em;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

/* Cards */
.card {
    border: none;
    border-radius: var(--border-radius);
    transition: var(--transition);
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.card-body {
    padding: 2rem;
}

/* Icon Circles */
.icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
    box-shadow: var(--shadow);
}

/* Avatar Circles */
.avatar-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    overflow: hidden;
    border: 3px solid var(--light-color);
}

.avatar-circle img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: var(--transition);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #1a4a8a);
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1a4a8a, var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(44, 90, 160, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, var(--warning-color), #e67e22);
    border: none;
    color: white;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e67e22, var(--warning-color));
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(243, 156, 18, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), #229954);
    border: none;
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954, var(--success-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.btn-outline-primary {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline-primary:hover {
    background: var(--primary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.btn-outline-light {
    border: 2px solid white;
    color: white;
}

.btn-outline-light:hover {
    background: white;
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* Progress Rings */
.progress-ring {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
}

.progress-ring svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.progress-ring circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
}

.progress-ring .bg {
    stroke: var(--light-color);
}

.progress-ring .progress {
    stroke: var(--primary-color);
    stroke-dasharray: 283;
    stroke-dashoffset: 283;
    transition: stroke-dashoffset 0.5s ease;
}

.progress-ring .text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    font-weight: 700;
    color: var(--primary-color);
}

/* Recovery Clock */
.recovery-clock {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--shadow);
}

.recovery-clock .days {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.recovery-clock .label {
    font-size: 1.1rem;
    opacity: 0.9;
}

/* Dashboard Cards */
.dashboard-card {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.dashboard-card .icon {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    color: white;
}

.dashboard-card .number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.dashboard-card .label {
    color: var(--text-color);
    font-weight: 500;
}

/* Check-in Form */
.check-in-form {
    background: white;
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow);
}

.check-in-form .form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: var(--transition);
}

.check-in-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

/* Budget Charts */
.budget-chart {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1.5rem;
}

.budget-chart .chart-container {
    position: relative;
    height: 300px;
}

/* Success Stories */
.success-story {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    height: 100%;
}

.success-story:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.success-story .quote {
    font-style: italic;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin: 1rem 0;
}

/* Meditation Library */
.meditation-item {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
    cursor: pointer;
}

.meditation-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

.meditation-item .duration {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

/* Journal Entry */
.journal-entry {
    background: white;
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
    margin-bottom: 1rem;
    border-left: 4px solid var(--primary-color);
}

.journal-entry .mood {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.journal-entry .mood.happy { background: #d4edda; color: #155724; }
.journal-entry .mood.sad { background: #f8d7da; color: #721c24; }
.journal-entry .mood.angry { background: #f8d7da; color: #721c24; }
.journal-entry .mood.anxious { background: #fff3cd; color: #856404; }
.journal-entry .mood.calm { background: #d1ecf1; color: #0c5460; }
.journal-entry .mood.excited { background: #d4edda; color: #155724; }
.journal-entry .mood.neutral { background: #e2e3e5; color: #383d41; }

/* Footer */
footer {
    background: var(--dark-color);
    color: white;
}

footer a {
    color: #bdc3c7;
    text-decoration: none;
    transition: var(--transition);
}

footer a:hover {
    color: white;
}

.social-links a {
    display: inline-block;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.1);
    border-radius: 50%;
    text-align: center;
    line-height: 40px;
    transition: var(--transition);
}

.social-links a:hover {
    background: var(--primary-color);
    transform: translateY(-2px);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 80vh;
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .code-text {
        font-size: 1.5rem;
    }
    
    .dashboard-card {
        margin-bottom: 1rem;
    }
    
    .progress-ring {
        width: 100px;
        height: 100px;
    }
    
    .recovery-clock .days {
        font-size: 2rem;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 1.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.9rem;
    }
    
    .icon-circle {
        width: 60px;
        height: 60px;
    }
    
    .icon-circle i {
        font-size: 1.5rem;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Loading Spinner */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--light-color);
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Alert Styles */
.alert {
    border: none;
    border-radius: var(--border-radius);
    padding: 1rem 1.5rem;
}

.alert-success {
    background: linear-gradient(135deg, var(--success-color), #229954);
    color: white;
}

.alert-warning {
    background: linear-gradient(135deg, var(--warning-color), #e67e22);
    color: white;
}

.alert-danger {
    background: linear-gradient(135deg, var(--danger-color), #c0392b);
    color: white;
}

.alert-info {
    background: linear-gradient(135deg, var(--primary-color), #1a4a8a);
    color: white;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    font-weight: 600;
    color: var(--dark-color);
    margin-bottom: 0.5rem;
}

.form-control {
    border: 2px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 0.75rem 1rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 90, 160, 0.25);
}

/* Table Styles */
.table {
    background: white;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table thead th {
    background: var(--primary-color);
    color: white;
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table tbody td {
    padding: 1rem;
    border-bottom: 1px solid var(--light-color);
}

.table tbody tr:hover {
    background: rgba(44, 90, 160, 0.05);
}

/* Badge Styles */
.badge {
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
}

.badge-primary {
    background: var(--primary-color);
}

.badge-success {
    background: var(--success-color);
}

.badge-warning {
    background: var(--warning-color);
}

.badge-danger {
    background: var(--danger-color);
}

/* Utility Classes */
.text-primary { color: var(--primary-color) !important; }
.text-secondary { color: var(--secondary-color) !important; }
.text-success { color: var(--success-color) !important; }
.text-warning { color: var(--warning-color) !important; }
.text-danger { color: var(--danger-color) !important; }

.bg-primary { background-color: var(--primary-color) !important; }
.bg-secondary { background-color: var(--secondary-color) !important; }
.bg-success { background-color: var(--success-color) !important; }
.bg-warning { background-color: var(--warning-color) !important; }
.bg-danger { background-color: var(--danger-color) !important; }

.shadow-sm { box-shadow: var(--shadow) !important; }
.rounded { border-radius: var(--border-radius) !important; }
.transition { transition: var(--transition) !important; } 