/* Custom styles for Law Firm website */

/* General styles */
body {
    font-family: 'Inter', 'Roboto', sans-serif;
    letter-spacing: -0.01em;
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    letter-spacing: -0.03em;
}

.btn {
    border-radius: 8px;
    padding: 0.6rem 1.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.card {
    border: none;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s ease-in-out;
}

.card:hover {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.card-header {
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    border-top: none;
    padding: 1.25rem 1.5rem;
}

/* Hero section */
.hero-section {
    padding: 8rem 0;
    background-size: cover;
    background-position: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, rgba(0, 0, 0, 0.7) 0%, rgba(0, 0, 0, 0.5) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    animation: fadeInUp 1s ease-out;
}

/* Service cards */
.service-card {
    transition: all 0.3s ease-in-out;
    height: 100%;
    border-radius: 16px;
    border: none;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: relative;
}

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

.service-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    transition: width 0.4s ease;
}

.service-card:hover::after {
    width: 100%;
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--bs-primary);
    background: rgba(var(--bs-primary-rgb), 0.1);
    width: 70px;
    height: 70px;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
    color: var(--bs-white);
    background: var(--bs-primary);
}

/* Team member cards */
.team-card {
    transition: all 0.3s ease-in-out;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.07);
    position: relative;
}

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

.team-card .card-img-top {
    height: 280px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.team-card:hover .card-img-top {
    transform: scale(1.05);
}

.team-social {
    position: absolute;
    bottom: -40px;
    left: 0;
    right: 0;
    display: flex;
    justify-content: center;
    transition: all 0.3s ease;
    opacity: 0;
}

.team-card:hover .team-social {
    bottom: 20px;
    opacity: 1;
}

.team-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    margin: 0 5px;
    border-radius: 50%;
    background-color: var(--bs-white);
    color: var(--bs-primary);
    font-size: 1rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.team-social a:hover {
    background-color: var(--bs-primary);
    color: var(--bs-white);
    transform: translateY(-3px);
}

/* Case study cards */
.case-study-card {
    transition: all 0.3s ease-in-out;
    height: 100%;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: none;
}

.case-study-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.case-study-card .card-img-top {
    height: 220px;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.case-study-card:hover .card-img-top {
    transform: scale(1.05);
}

.case-study-card .card-body {
    position: relative;
    z-index: 2;
}

.case-study-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 220px;
    background: linear-gradient(0deg, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0) 60%);
    z-index: 1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.case-study-card:hover::before {
    opacity: 1;
}

.case-study-card .badge {
    position: absolute;
    top: 20px;
    right: 20px;
    z-index: 3;
    padding: 8px 15px;
    font-weight: 600;
    border-radius: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transform: translateY(-10px);
    opacity: 0;
    transition: all 0.3s ease;
}

.case-study-card:hover .badge {
    transform: translateY(0);
    opacity: 1;
}

/* Footer */
.footer {
    background-color: var(--bs-dark);
    color: var(--bs-light);
    padding: 5rem 0 3rem;
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-info) 100%);
}

.footer h5 {
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 40px;
    height: 3px;
    background: var(--bs-primary);
}

.footer .list-unstyled li {
    margin-bottom: 0.8rem;
    position: relative;
    padding-left: 0;
    transition: all 0.3s ease;
}

.footer .list-unstyled li:hover {
    padding-left: 10px;
}

.footer a {
    color: var(--bs-light);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.footer a:hover {
    color: var(--bs-info);
}

.footer a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--bs-info);
    transition: width 0.3s ease;
}

.footer a:hover::after {
    width: 100%;
}

.social-icons {
    display: flex;
    gap: 15px;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.social-icons a:hover {
    background-color: var(--bs-primary);
    transform: translateY(-3px);
}

/* Admin dashboard */
.dashboard-stat {
    padding: 2rem 1.5rem;
    border-radius: 1rem;
    text-align: center;
    transition: all 0.3s ease;
    background: rgba(var(--bs-dark-rgb), 0.03);
    border: 1px solid rgba(var(--bs-dark-rgb), 0.05);
    position: relative;
    overflow: hidden;
}

.dashboard-stat:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.dashboard-stat i {
    font-size: 2.5rem;
    margin-bottom: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
    transition: all 0.3s ease;
}

.dashboard-stat:hover i {
    transform: scale(1.1);
    background: var(--bs-primary);
    color: var(--bs-white);
}

.dashboard-stat .display-4 {
    font-weight: 700;
    margin-bottom: 0.5rem;
    background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.dashboard-stat .btn {
    position: relative;
    z-index: 2;
    margin-top: 1rem;
}

/* Custom form styling */
.form-control {
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(var(--bs-dark-rgb), 0.1);
}

.form-control:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15);
    transform: translateY(-2px);
}

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

.form-select {
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border: 1px solid rgba(var(--bs-dark-rgb), 0.1);
}

.form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.25rem rgba(var(--bs-primary-rgb), 0.15);
}

/* Breadcrumbs */
.breadcrumb {
    padding: 1rem 0;
    border-radius: 0.5rem;
    background-color: transparent;
}

.breadcrumb-item + .breadcrumb-item::before {
    content: '›';
    font-size: 1.2rem;
    line-height: 1;
    color: var(--bs-primary);
}

.breadcrumb-item.active {
    font-weight: 600;
    color: var(--bs-dark);
}

/* Page headers */
.page-header {
    padding: 4rem 0;
    margin-bottom: 3rem;
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-dark) 100%);
    color: var(--bs-light);
    position: relative;
    overflow: hidden;
}

.page-header::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, rgba(255,255,255,0) 70%);
    border-radius: 50%;
    z-index: 1;
}

/* Navigation Styling */
.navbar {
    padding: 1rem 0;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.navbar-nav .nav-link {
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    position: relative;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--bs-primary);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    opacity: 0;
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 20px;
    opacity: 1;
}

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

.dropdown-menu {
    border: none;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 1rem;
}

.dropdown-item {
    padding: 0.5rem 1rem;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-item:hover, 
.dropdown-item:focus {
    background-color: rgba(var(--bs-primary-rgb), 0.1);
    color: var(--bs-primary);
}

/* Custom table styling for admin tables */
.admin-table {
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

.admin-table th {
    border-top: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.85rem;
    letter-spacing: 0.03em;
    padding: 1rem;
    background-color: rgba(var(--bs-dark-rgb), 0.03);
}

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

.admin-table tbody tr {
    transition: all 0.2s ease;
}

.admin-table tbody tr:hover {
    background-color: rgba(var(--bs-primary-rgb), 0.03);
}

/* Custom badge styling */
.badge {
    padding: 0.5em 0.8em;
    font-weight: 600;
    letter-spacing: 0.03em;
    border-radius: 6px;
}

.badge-featured {
    background: linear-gradient(135deg, var(--bs-warning) 0%, #ff9500 100%);
    color: var(--bs-dark);
    box-shadow: 0 3px 6px rgba(255, 193, 7, 0.2);
}

/* Chat Widget */
.chat-widget-container {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: 1000;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.1));
}

.chat-widget-button {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50px;
    padding: 16px 28px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    border: none;
}

.chat-widget-button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.15);
    padding-right: 32px;
}

.chat-widget-button i {
    font-size: 1.3rem;
    margin-right: 10px;
    animation: pulse 2s infinite;
}

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

.chat-label {
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.3s ease;
}

/* Chat Messages */
.message {
    max-width: 85%;
    margin-bottom: 20px;
    animation: fadeIn 0.5s ease-out;
}

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

.message-client {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.message-content {
    padding: 14px 18px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    line-height: 1.5;
}

.message-client .message-content {
    background-color: rgba(var(--bs-light-rgb), 0.8);
    color: var(--bs-dark);
    border-radius: 20px 20px 0 20px;
    border-left: 1px solid rgba(0, 0, 0, 0.05);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.message-staff .message-content {
    background: linear-gradient(135deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    color: white;
    border-radius: 20px 20px 20px 0;
}

.message-meta {
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--bs-secondary);
    display: flex;
    align-items: center;
}

.message-meta::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--bs-success);
    margin-right: 5px;
    display: inline-block;
}

.message-client .message-meta {
    text-align: right;
    justify-content: flex-end;
}

.message-client .message-meta::before {
    order: 2;
    margin-right: 0;
    margin-left: 5px;
}

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Animation classes */
.animate-fade-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-right {
    animation: fadeInRight 0.8s ease-out forwards;
}

.animate-fade-left {
    animation: fadeInLeft 0.8s ease-out forwards;
}

.animate-scale {
    animation: scaleIn 0.8s ease-out forwards;
}

/* Animation delays */
.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

.delay-500 {
    animation-delay: 0.5s;
}

/* Hover effect utilities */
.hover-lift {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hover-scale {
    transition: transform 0.3s ease;
}

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

/* Gradient text utility */
.gradient-text {
    background: linear-gradient(90deg, var(--bs-primary) 0%, var(--bs-info) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .service-card, .team-card, .case-study-card {
        margin-bottom: 2rem;
    }
    
    .hero-section {
        padding: 5rem 0;
    }
    
    .page-header {
        padding: 3rem 0;
    }
    
    .dashboard-stat {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 0;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .service-icon {
        font-size: 2rem;
        width: 60px;
        height: 60px;
    }
    
    .team-card .card-img-top {
        height: 240px;
    }
    
    .footer {
        padding: 3rem 0 2rem;
    }
    
    .chat-widget-container {
        bottom: 20px;
        right: 20px;
    }
    
    .chat-widget-button {
        padding: 12px;
        border-radius: 50%;
        width: 60px;
        height: 60px;
    }
    
    .chat-label {
        display: none;
    }
    
    .chat-widget-button i {
        margin-right: 0;
        font-size: 1.5rem;
    }
    
    .message {
        max-width: 95%;
    }
}

@media (max-width: 576px) {
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.5rem;
    }
    
    .team-card .card-img-top {
        height: 200px;
    }
    
    .case-study-card .card-img-top {
        height: 180px;
    }
    
    .page-header {
        padding: 2.5rem 0;
    }
    
    .page-header h1 {
        font-size: 1.8rem;
    }
    
    .dashboard-stat i {
        width: 60px;
        height: 60px;
        font-size: 1.8rem;
    }
    
    .chat-widget-button {
        width: 50px;
        height: 50px;
    }
    
    .chat-widget-button i {
        font-size: 1.3rem;
    }
}
