/* Family Services LMS Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #1B5E20;
    --secondary-color: #2E7D32;
    --accent-color: #FFB300;
    --warning-color: #FF9800;
    --success-color: #4CAF50;
    --danger-color: #F44336;
    --dark-color: #263238;
    --light-color: #F5F5F5;
    --white-color: #FFFFFF;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 25px rgba(0, 0, 0, 0.15);
    --border-radius: 12px;
}

body {
    font-family: 'Cairo', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: var(--white-color);
}

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

.display-4, .display-5 {
    font-weight: 700;
}

/* Custom Bootstrap Colors */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    font-weight: 500;
    padding: 12px 24px;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

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

/* Navigation */
.navbar {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95) !important;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-logo {
    height: 45px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.footer-logo {
    height: 35px;
    width: auto;
    max-width: 120px;
    object-fit: contain;
}

.navbar-nav .nav-link {
    font-weight: 500;
    margin: 0 8px;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-section::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"><defs><radialGradient id="g" cx="50%" cy="50%"><stop offset="0%" stop-color="rgba(255,255,255,0.1)"/><stop offset="100%" stop-color="rgba(255,255,255,0)"/></radialGradient></defs><circle cx="200" cy="200" r="100" fill="url(%23g)"/><circle cx="800" cy="300" r="150" fill="url(%23g)"/><circle cx="300" cy="700" r="120" fill="url(%23g)"/></svg>');
    opacity: 0.3;
}

.hero-section .row {
    position: relative;
    z-index: 1;
}

.hero-section h1,
.hero-section p,
.hero-section .btn {
    position: relative;
    z-index: 2;
}

.hero-image {
    animation: float 6s ease-in-out infinite;
    max-height: 500px;
    width: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.text-white-75 {
    color: rgba(255, 255, 255, 0.75);
}

/* Feature Cards */
.feature-card {
    background: var(--white-color);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    border: none;
}

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

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: white;
    box-shadow: var(--shadow);
}

.feature-card h4 {
    color: var(--dark-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.feature-card p {
    color: #666;
    line-height: 1.7;
}

/* Service Cards */
.service-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: all 0.3s ease;
    height: 100%;
}

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

.service-image {
    height: 280px;
    overflow: hidden;
    width: 100%;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
}

.service-card:hover .service-image img {
    transform: scale(1.1);
}

.service-content {
    padding: 2rem;
    background: var(--white-color);
}

.service-content h4 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.service-content p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    padding: 0.5rem 0;
    color: #666;
    position: relative;
    padding-right: 1.5rem;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    right: 0;
    color: var(--success-color);
    font-weight: bold;
}

/* Statistics Section */
.stat-item {
    text-align: center;
    padding: 2rem 1rem;
}

.stat-item h2 {
    color: white;
    margin-bottom: 0.5rem;
    font-size: 3.5rem;
}

/* Contact Section */
.contact-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    padding: 2rem;
    box-shadow: var(--shadow-lg);
}

.contact-item {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
}

.contact-item i {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 1rem;
    flex-shrink: 0;
}

.contact-item h5 {
    margin-bottom: 0.25rem;
    color: var(--dark-color);
}

.contact-item p {
    margin: 0;
    color: #666;
}

.contact-form .form-control {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(27, 94, 32, 0.25);
}

/* Footer */
.footer {
    background: var(--dark-color) !important;
}

/* Dashboard Styles */
.sidebar {
    background: linear-gradient(180deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    min-height: 100vh;
    height: 100vh;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    z-index: 1000;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0;
}

.sidebar-logo {
    height: 50px;
    width: auto;
    max-width: 60px;
    object-fit: contain;
    background: white;
    padding: 5px;
    border-radius: 8px;
}

.sidebar-nav {
    padding: 1rem 0;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
}

.sidebar-nav::-webkit-scrollbar {
    width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    margin: 10px 0;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: padding-box;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.6);
    border: 2px solid transparent;
    background-clip: padding-box;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    background: none;
}

.sidebar-nav .nav-link:hover,
.sidebar-nav .nav-link.active {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-right: 3px solid var(--accent-color);
}

.sidebar-nav .nav-link i {
    margin-left: 1rem;
    width: 20px;
}

.main-content {
    margin-right: 280px;
    padding: 2rem;
    min-height: 100vh;
    background: var(--light-color);
}

/* Cards */
.dashboard-card {
    background: var(--white-color);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    border: none;
    transition: all 0.3s ease;
    margin-bottom: 1.5rem;
}

.dashboard-card:hover {
    box-shadow: var(--shadow-lg);
}

.dashboard-card .card-body {
    padding: 2rem;
}

.card-header {
    background: transparent;
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem 2rem;
    font-weight: 600;
}

/* Statistics Cards on Dashboard */
.dashboard-card.bg-primary,
.dashboard-card.bg-success,
.dashboard-card.bg-info,
.dashboard-card.bg-warning,
.dashboard-card.bg-danger {
    padding: 1.5rem;
}

.dashboard-card.bg-primary .card-body,
.dashboard-card.bg-success .card-body,
.dashboard-card.bg-info .card-body,
.dashboard-card.bg-warning .card-body,
.dashboard-card.bg-danger .card-body {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 120px;
}

/* Tables */
.table {
    background: var(--white-color);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow);
}

.table th {
    background: var(--light-color);
    border: none;
    font-weight: 600;
    padding: 1rem;
}

.table td {
    border: none;
    padding: 1rem;
    vertical-align: middle;
}

.table tbody tr {
    transition: background-color 0.3s ease;
}

.table tbody tr:hover {
    background: rgba(27, 94, 32, 0.05);
}

/* Buttons */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 8px 16px;
    transition: all 0.3s ease;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

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

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

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

/* Forms */
.form-control, .form-select {
    border-radius: var(--border-radius);
    border: 2px solid #e9ecef;
    padding: 12px 16px;
    transition: all 0.3s ease;
}

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

/* Modals */
.modal-content {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--shadow-lg);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1.5rem;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

/* Alerts */
.alert {
    border-radius: var(--border-radius);
    border: none;
    padding: 1rem 1.5rem;
}

/* Badges */
.badge {
    border-radius: var(--border-radius);
    padding: 0.5rem 0.75rem;
    font-weight: 500;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(100%);
        width: 100%;
    }
    
    .sidebar.show {
        transform: translateX(0);
    }
    
    .main-content {
        margin-right: 0;
        padding: 1rem;
    }
    
    .hero-section {
        text-align: center;
        padding: 2rem 0;
    }
    
    .hero-section .row {
        flex-direction: column-reverse;
    }
    
    .feature-card, .service-card {
        margin-bottom: 2rem;
    }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

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

/* Utility Classes */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.mb-0 { margin-bottom: 0; }
.mt-2 { margin-top: 0.5rem; }
.p-0 { padding: 0; }
.w-100 { width: 100%; }
.h-100 { height: 100%; }

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

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

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

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}