/* Custom CSS for Nisan Urayaz Dietitian Website */

/* ========================================
   GENERAL IMPROVEMENTS
   ======================================== */

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

/* Better focus states */
*:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading animations */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

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

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

/* ========================================
   FRONTEND IMPROVEMENTS
   ======================================== */

/* Hero Section Improvements */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.9) 0%, rgba(118, 75, 162, 0.9) 100%);
    z-index: 1;
}

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

/* Button Improvements */
.btn {
    transition: all 0.3s ease;
    border-radius: 8px;
    font-weight: 500;
    text-transform: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
}

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

.btn-primary:hover {
    background: linear-gradient(135deg, #5a6fd8 0%, #6a4190 100%);
}

/* Card Improvements */
.service-item, .portfolio-item, .blog-item {
    transition: all 0.3s ease;
    border: 1px solid rgba(0,0,0,0.05);
}

.service-item:hover, .portfolio-item:hover, .blog-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* Section Spacing */
.section-title {
    margin-bottom: 4rem;
}

.section-title h2 {
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 2px;
}

/* Form Improvements */
.form-control {
    border-radius: 8px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
    padding: 12px 16px;
}

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

/* ========================================
   ADMIN PANEL IMPROVEMENTS
   ======================================== */

/* Toastr Notifications */
.toastr {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    min-width: 300px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    animation: slideInRight 0.3s ease;
}

.toastr-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.toastr-error {
    background: linear-gradient(135deg, #dc3545 0%, #fd7e14 100%);
}

.toastr-warning {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
}

.toastr-info {
    background: linear-gradient(135deg, #17a2b8 0%, #6f42c1 100%);
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* DataTables Improvements */
.dataTables_wrapper {
    padding: 20px 0;
}

.dataTables_length,
.dataTables_filter {
    margin-bottom: 20px;
}

.dataTables_length select,
.dataTables_filter input {
    border-radius: 6px;
    border: 1px solid #ddd;
    padding: 8px 12px;
}

.dataTables_info {
    color: #666;
    font-size: 0.9rem;
}

.dataTables_paginate .paginate_button {
    border-radius: 6px !important;
    margin: 0 2px !important;
    border: 1px solid #ddd !important;
    padding: 8px 12px !important;
}

.dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border-color: #667eea !important;
}

/* Form Validation Improvements */
.is-invalid {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.is-valid {
    border-color: #28a745 !important;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25) !important;
}

.invalid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #dc3545;
}

.valid-feedback {
    display: block;
    width: 100%;
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: #28a745;
}

/* Modal Improvements */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
}

.modal-header {
    border-bottom: 1px solid #e9ecef;
    border-radius: 12px 12px 0 0;
}

.modal-footer {
    border-top: 1px solid #e9ecef;
    border-radius: 0 0 12px 12px;
}

/* Alert Improvements */
.alert {
    border-radius: 8px;
    border: none;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.alert-success {
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(32, 201, 151, 0.1) 100%);
    color: #155724;
    border-left: 4px solid #28a745;
}

.alert-danger {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.1) 0%, rgba(253, 126, 20, 0.1) 100%);
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.alert-warning {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.1) 0%, rgba(253, 126, 20, 0.1) 100%);
    color: #856404;
    border-left: 4px solid #ffc107;
}

.alert-info {
    background: linear-gradient(135deg, rgba(23, 162, 184, 0.1) 0%, rgba(111, 66, 193, 0.1) 100%);
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

/* ========================================
   RESPONSIVE IMPROVEMENTS
   ======================================== */

@media (max-width: 768px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
    
    .service-item, .portfolio-item, .blog-item {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
    }
    
    .toastr {
        right: 10px;
        left: 10px;
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding: 60px 0;
    }
    
    .services-section, .portfolio-section, .blog-section, .about-section {
        padding: 60px 0;
    }
    
    .section-title {
        margin-bottom: 2rem;
    }
    
    .form-control {
        padding: 10px 12px;
    }
}

/* ========================================
   ANIMATION IMPROVEMENTS
   ======================================== */

/* Fade in animation */
.fade-in {
    animation: fadeIn 0.6s ease-in;
}

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

/* Slide up animation */
.slide-up {
    animation: slideUp 0.6s ease-out;
}

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

/* Pulse animation for loading */
.pulse {
    animation: pulse 2s infinite;
}

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

/* ========================================
   UTILITY CLASSES
   ======================================== */

.text-gradient {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

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

.shadow-soft {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.shadow-medium {
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
}

.shadow-strong {
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.border-radius-lg {
    border-radius: 12px;
}

.border-radius-xl {
    border-radius: 16px;
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {
    .btn, .sidebar, .top-navbar, .toastr {
        display: none !important;
    }
    
    .main-content {
        margin-left: 0 !important;
    }
    
    .card {
        box-shadow: none !important;
        border: 1px solid #ddd !important;
    }
}