/* SomaPro Custom Styles */

/* Sidebar Styles */
.sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    padding: 48px 0 0;
    box-shadow: inset -1px 0 0 rgba(0, 0, 0, .1);
    overflow-y: auto;
    overflow-x: hidden;
    height: 100vh;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.3) transparent;
}

.sidebar .position-sticky {
    position: relative;
    top: 0;
    padding-top: .5rem;
    padding-bottom: 1rem;
    min-height: calc(100vh - 48px);
}

.sidebar-sticky {
    position: relative;
    top: 0;
    height: calc(100vh - 48px);
    padding-top: .5rem;
    overflow-x: hidden;
    overflow-y: auto;
}

/* Sidebar Scrollbar Styling */

.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.5);
}

/* Chart Container Styles */
.chart-container {
    position: relative;
    height: 400px;
    margin-bottom: 2rem;
}

/* Improvement Cards */
.improvement-card {
    border-left: 4px solid #28a745;
}

.decline-card {
    border-left: 4px solid #dc3545;
}

.stable-card {
    border-left: 4px solid #ffc107;
}

/* Stat Cards */
.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 10px;
}

/* Subject Cards */
.subject-card {
    transition: transform 0.2s;
}

.subject-card:hover {
    transform: translateY(-2px);
}

/* Performance Cards */
.performance-card {
    transition: transform 0.2s;
}

.performance-card:hover {
    transform: translateY(-2px);
}

/* Rank Badge */
.rank-badge {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Custom Button Styles */
.btn-analytics {
    background: linear-gradient(45deg, #667eea, #764ba2);
    border: none;
    color: white;
}

.btn-analytics:hover {
    background: linear-gradient(45deg, #5a6fd8, #6a4190);
    color: white;
}

/* Grade Progress Bars */
.grade-progress {
    height: 8px;
    border-radius: 4px;
}

/* Notification Styles */
.notification-item {
    border-left: 3px solid #007bff;
    padding-left: 15px;
    margin-bottom: 10px;
}

/* Dashboard Cards */
.dashboard-card {
    border: none;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.2s, box-shadow 0.2s;
}

.dashboard-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* Table Styles */
.table-hover tbody tr:hover {
    background-color: rgba(0,123,255,0.1);
}

/* Form Styles */
.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Alert Styles */
.alert-custom {
    border-radius: 8px;
    border: none;
}

/* Loading Spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .sidebar {
        position: static;
        height: auto;
    }
    
    .chart-container {
        height: 300px;
    }
}

/* Landing Page Styles */
.hero-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.bg-gradient-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Feature cards hover effect */
.card:hover {
    transform: translateY(-5px);
    transition: transform 0.3s ease;
}

/* Custom button styles for landing page */
.btn-warning {
    background: linear-gradient(45deg, #ffc107, #ff8c00);
    border: none;
    font-weight: 600;
}

.btn-warning:hover {
    background: linear-gradient(45deg, #ff8c00, #ffc107);
    transform: translateY(-2px);
}

/* Testimonial cards */
.testimonial-card {
    border-left: 4px solid #ffc107;
}

/* Footer styles */
footer {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
}

/* Navigation styles */
.navbar-brand {
    font-size: 1.5rem;
}

/* Hero section animations */
.hero-section h1 {
    animation: fadeInUp 1s ease-out;
}

.hero-section p {
    animation: fadeInUp 1s ease-out 0.2s both;
}

.hero-section .btn {
    animation: fadeInUp 1s ease-out 0.4s both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Feature icons */
.feature-icon {
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 1rem;
}

/* Pricing Section Styles */
.pricing-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
}

.pricing-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
}

.pricing-card.popular {
    border-color: #28a745;
    transform: scale(1.05);
}

.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-10px);
}

.price-display {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
}

.pricing-feature {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f8f9fa;
}

.pricing-feature:last-child {
    border-bottom: none;
}

/* Contact Section Styles */
.contact-card {
    transition: transform 0.2s ease;
}

.contact-card:hover {
    transform: translateY(-5px);
}

/* Chatbot Styles - QuickSchools Inspired */
.chatbot-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.chatbot-toggle {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(0,188,212,0.3);
    transition: all 0.3s ease;
    position: relative;
}

.chatbot-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(0,188,212,0.4);
}

.chatbot-toggle i {
    color: white;
    font-size: 1.5rem;
}

.chatbot-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #ff4757;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

.chatbot-window {
    position: absolute;
    bottom: 80px;
    right: 0;
    width: 380px;
    height: 550px;
    background: #2c3e50;
    border-radius: 15px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
    display: none;
    flex-direction: column;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.3s ease;
}

.chatbot-window.show {
    display: flex;
    transform: translateY(0);
    opacity: 1;
}

.chatbot-header {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    color: white;
    padding: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chatbot-avatar {
    width: 50px;
    height: 50px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 5px;
}

.chatbot-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.chatbot-controls {
    display: flex;
    gap: 5px;
}

.chatbot-controls .btn {
    padding: 5px 8px;
    font-size: 0.8rem;
}

.chatbot-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #2c3e50;
}

.chatbot-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background: #2c3e50;
}

.message {
    margin-bottom: 15px;
    display: flex;
}

.user-message {
    justify-content: flex-end;
}

.bot-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 18px;
    position: relative;
}

.user-message .message-content {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    color: white;
    border-bottom-right-radius: 5px;
}

.bot-message .message-content {
    background: #34495e;
    color: #ecf0f1;
    border: 1px solid #4a5f7a;
    border-bottom-left-radius: 5px;
}

.message-content p {
    margin: 0;
    line-height: 1.4;
    white-space: pre-line;
}

.message-content small {
    display: block;
    margin-top: 5px;
    opacity: 0.7;
}

.live-support-intro {
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 10px;
}

.support-icon {
    width: 30px;
    height: 30px;
    background: rgba(255,255,255,0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.support-icon i {
    color: white;
    font-size: 1rem;
}

.chatbot-quick-actions {
    padding: 15px;
    background: #34495e;
    border-top: 1px solid #4a5f7a;
}

.quick-actions-header {
    margin-bottom: 10px;
    text-align: center;
}

.quick-actions-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.quick-action {
    font-size: 0.75rem;
    padding: 8px 12px;
    border-radius: 20px;
    transition: all 0.2s ease;
    background: rgba(0,188,212,0.1);
    border: 1px solid rgba(0,188,212,0.3);
    color: #00bcd4;
}

.quick-action:hover {
    transform: translateY(-2px);
    background: rgba(0,188,212,0.2);
    border-color: #00bcd4;
    color: white;
}

.chatbot-input {
    padding: 15px;
    background: #34495e;
    border-top: 1px solid #4a5f7a;
}

.chatbot-input .input-group {
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.chatbot-input .form-control {
    border: none;
    padding: 12px 15px;
    font-size: 0.9rem;
    background: #2c3e50;
    color: #ecf0f1;
}

.chatbot-input .form-control:focus {
    box-shadow: none;
    border: none;
    background: #2c3e50;
    color: #ecf0f1;
}

.chatbot-input .form-control::placeholder {
    color: #7f8c8d;
}

.chatbot-input .btn {
    border: none;
    padding: 12px 15px;
    background: linear-gradient(135deg, #00bcd4 0%, #0097a7 100%);
}

.chatbot-input .btn:hover {
    background: linear-gradient(135deg, #0097a7 0%, #00796b 100%);
}

/* Logo visibility enhancements */
.navbar-brand {
    width: 100% !important;
    max-width: 200px !important;
    justify-content: center !important;
}

/* Dashboard navbar logo (smaller) */
.navbar-dark .navbar-brand img {
    height: 80px !important;
    width: auto !important;
    max-width: none !important;
    object-fit: contain !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) !important;
    transition: all 0.3s ease !important;
    display: block !important;
}

/* Landing page navbar logo (larger) */
.navbar-light .navbar-brand img {
    height: 100px !important;
    width: auto !important;
    max-width: none !important;
    object-fit: contain !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) !important;
    transition: all 0.3s ease !important;
    display: block !important;
}

/* Landing page navbar - spacing between logo and menu */
.navbar-light .navbar-nav {
    margin-left: 2rem !important;
}

/* General navbar logo styling */
.navbar-brand img {
    width: auto !important;
    max-width: none !important;
    object-fit: contain !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3)) !important;
    transition: all 0.3s ease !important;
    display: block !important;
}

.navbar-brand img:hover {
    transform: scale(1.05) !important;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4)) !important;
}

/* Ensure logo is visible in all contexts */
img[alt*="SomaPro Logo"] {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Hero Logo Styling */
.hero-logo-container {
    text-align: center !important;
    margin-bottom: 2rem !important;
    margin-top: -4rem !important;
    padding-top: 2rem !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    width: 100% !important;
    position: relative !important;
}

.hero-logo {
    height: 280px !important;
    width: auto !important;
    max-width: 100% !important;
    object-fit: contain !important;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.3)) !important;
    transition: all 0.3s ease !important;
    animation: logoFloat 3s ease-in-out infinite !important;
    display: block !important;
    margin: 0 auto !important;
    position: relative !important;
}

.hero-logo:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 12px 24px rgba(0, 0, 0, 0.4));
}

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

/* Navbar Logo Styling */
.navbar-brand img {
    height: 60px !important;
    width: auto !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
}

.navbar-brand img:hover {
    transform: scale(1.05);
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.4));
}

.navbar-brand {
    font-size: 1.5rem !important;
    font-weight: bold !important;
}

/* Responsive hero logo */
@media (max-width: 768px) {
    .hero-logo {
        height: 150px; /* Adjusted for tablet */
    }
    
    .hero-logo-container {
        text-align: center;
        margin-bottom: 2rem;
        margin-top: -1rem;
    }
    
    .navbar-brand img {
        height: 50px !important;
    }
}

@media (max-width: 576px) {
    .hero-logo {
        height: 120px; /* Adjusted for mobile */
    }
    
    .hero-logo-container {
        margin-top: -0.5rem;
    }
    
    .navbar-brand img {
        height: 45px !important;
    }
}

/* Responsive chatbot */
@media (max-width: 768px) {
    .chatbot-window {
        width: 300px;
        height: 450px;
        right: -10px;
    }
    
    .chatbot-container {
        bottom: 15px;
        right: 15px;
    }
}

/* Hero Image Styles */
.hero-image-container {
    position: relative;
    width: 100%;
    height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15);
}

.hero-school-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.hero-school-image:hover {
    transform: scale(1.05);
}

.hero-image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
}

.floating-stats {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.stat-item {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    animation: floatUp 0.6s ease-out;
}

.stat-item:nth-child(1) {
    animation-delay: 0.2s;
}

.stat-item:nth-child(2) {
    animation-delay: 0.4s;
}

.stat-item:nth-child(3) {
    animation-delay: 0.6s;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
}

.stat-item i {
    color: #667eea;
    font-size: 1.2rem;
}

.stat-item span {
    font-weight: 600;
    color: #2c3e50;
    font-size: 0.9rem;
}

@keyframes floatUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments for landing page */
@media (max-width: 768px) {
    .hero-section {
        text-align: center;
    }
    
    .hero-section h1 {
        font-size: 2.5rem;
    }
    
    .hero-section .d-flex {
        flex-direction: column;
        gap: 1rem;
    }
    
    .pricing-card.popular {
        transform: none;
    }
    
    .pricing-card.popular:hover {
        transform: translateY(-10px);
    }
    
    .hero-image-container {
        height: 300px;
    }
    
    .floating-stats {
        gap: 10px;
    }
    
    .stat-item {
        padding: 8px 15px;
        font-size: 0.8rem;
    }
}

/* Print Styles */
@media print {
    .sidebar,
    .btn,
    .navbar {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
}

/* Mobile Responsive Improvements */
@media (max-width: 768px) {
    /* Better spacing on mobile */
    .container-fluid {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }
    
    /* Make cards more compact on mobile */
    .card {
        margin-bottom: 1rem;
    }
    
    /* Better button sizing on mobile */
    .btn-lg {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
    
    /* Table improvements */
    .table-responsive {
        border: none;
    }
    
    .table {
        font-size: 0.875rem;
    }
    
    /* Form improvements */
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Better spacing for form rows */
    .row.mb-3 {
        margin-bottom: 1rem !important;
    }
    
    /* Stack cards vertically on mobile */
    .col-lg-4, .col-lg-8 {
        margin-bottom: 1rem;
    }
    
    /* Better list group on mobile */
    .list-group-item {
        padding: 0.75rem;
    }
    
    /* Progress bars on mobile */
    .progress {
        height: 18px !important;
    }
    
    /* Better badge sizing */
    .badge {
        font-size: 0.75rem;
    }
}

@media (max-width: 576px) {
    /* Extra small devices */
    h2 {
        font-size: 1.5rem;
    }
    
    h5 {
        font-size: 1.1rem;
    }
    
    /* Compact badges */
    .badge {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    /* Smaller buttons */
    .btn-sm {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Better table cell padding */
    .table td, .table th {
        padding: 0.5rem 0.25rem;
    }
    
    /* Compact card headers */
    .card-header h5, .card-header h6 {
        font-size: 1rem;
    }
}
