/* ==========================================================================
   DMS Portfolio – Custom Styles
   All inline CSS from the static site consolidated here.
   ========================================================================== */

/* --- Smooth Scroll ----------------------------------------------------- */
html { scroll-behavior: smooth; }

/* --- Scroll offset for anchor links ------------------------------------ */
#director-board,
#management-team,
#team,
#contact { scroll-margin-top: 120px; }

.section-subtitle-large {
    font-size: 1.8rem !important;
}

/* Partners Swiper - increase gap between logos and pagination dots */
#clients.section .swiper {
    margin-bottom: 4rem;
}

#clients.section .swiper-pagination {
    display: none;
}

/* ==========================================================================
   STATS SECTION (Home About area)
   ========================================================================== */

.stats-section-wrapper {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    padding: 40px 20px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    max-width: 100%;
    width: 100%;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 25px 20px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: statFadeInUp 0.6s ease forwards;
    opacity: 0;
    text-align: center;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.15);
}

.stat-icon {
    color: var(--bs-primary, #1976d2);
    margin-bottom: 15px;
    display: flex;
    justify-content: center;
}

.stat-number {
    font-size: 36px;
    font-weight: bold;
    color: #1a1a1a;
    margin-bottom: 8px;
    line-height: 1;
}

.stat-label {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

@keyframes statFadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .stats-container { grid-template-columns: repeat(2, 1fr); gap: 12px; }
    .stat-card { padding: 20px 15px; }
    .stat-number { font-size: 28px; }
    .stat-label { font-size: 12px; }
}

@media (max-width: 576px) {
    .stats-container { grid-template-columns: 1fr; }
    .stat-number { font-size: 32px; }
    .stat-label { font-size: 14px; }
}

/* ==========================================================================
   TEAM SECTION
   ========================================================================== */

.team-photo {
    width: 200px !important;
    height: 200px !important;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid #ffffff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.professional-avatar {
    width: 200px !important;
    height: 200px !important;
    border-radius: 50%;
    border: 5px solid #ffffff;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}

.team-member-card {
    background: rgba(248, 249, 250, 0.8);
    border-radius: 15px;
    padding: 30px 20px;
    text-align: center;
    margin-bottom: 30px;
    transition: transform 0.3s ease;
}

.team-member-card:hover {
    transform: translateY(-10px);
}

/* ==========================================================================
   MANAGEMENT TEAM CARD
   ========================================================================== */

.management-card {
    background: #ffffff;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 123, 255, 0.15);
    transition: all 0.4s ease;
    border: 3px solid #007bff;
    position: relative;
    overflow: hidden;
}

.management-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #007bff, #0056b3);
}

.management-card:hover {
    transform: translateY(-15px);
    box-shadow: 0 15px 40px rgba(0, 123, 255, 0.25);
}

.management-photo {
    width: 100%;
    border-radius: 15px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.management-card:hover .management-photo {
    transform: scale(1.02);
}

.badge-management {
    position: absolute;
    top: 20px;
    right: 20px;
    background: #007bff;
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 4px 10px rgba(0, 123, 255, 0.3);
    z-index: 10;
}

/* ==========================================================================
   OFFICE CARDS
   ========================================================================== */

.office-card {
    border: none;
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    margin-bottom: 2rem;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.office-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.office-card .card-img-top {
    object-fit: cover;
    height: 180px;
}

.office-card .card-body {
    padding: 1.5rem;
}

.office-card h5 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: #007bff;
}

.office-card .contact-info i {
    width: 1.25rem;
    color: #6c757d;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.office-card .contact-info a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.office-card .contact-info a:hover {
    color: #007bff;
}

.office-location {
    padding: 0.75rem 0;
}

.office-name {
    font-weight: 600;
    color: #212529;
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.address-line {
    font-size: 0.9rem;
    line-height: 1.5;
    color: #495057;
    margin-bottom: 0.5rem;
}

.address-line i {
    vertical-align: top;
    margin-top: 0.125rem;
    color: #6c757d;
}

.contact-line {
    font-size: 0.9rem;
    color: #495057;
    margin-bottom: 0.25rem;
}

.contact-line i {
    vertical-align: middle;
    color: #6c757d;
}

.contact-line a {
    font-weight: 500;
    color: #007bff;
}

.contact-line a:hover {
    color: #0056b3;
    text-decoration: underline;
}

@media (min-width: 992px) {
    .office-card { margin-bottom: 0; }
}

@media (max-width: 576px) {
    .office-card .card-body { padding: 1rem; }
    .office-name { font-size: 0.9rem; }
    .address-line, .contact-line { font-size: 0.8rem; }
}

/* ==========================================================================
   CONTACT SECTION
   ========================================================================== */

.contact-detail {
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.contact-form {
    background: #f8f9fa;
    border-radius: 12px;
}

.contact-map {
    background: #f8f9fa;
    border-radius: 12px;
}

.contact-form .form-control {
    background: #ffffff;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.contact-form .form-control:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.15);
}

.contact-form textarea {
    resize: vertical;
    min-height: 150px;
}

.contact-detail .bg-light {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%) !important;
    border-radius: 12px !important;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.contact-detail .bg-light:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.alert { border-radius: 8px; border: none; }
.alert-success { background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%); color: #155724; }
.alert-danger  { background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%); color: #721c24; }

#sendMessageBtn:disabled { opacity: 0.7; cursor: not-allowed; }

@media (max-width: 768px) {
    .contact-detail .bg-light { margin-bottom: 1rem !important; }
    .contact-form input[type="text"],
    .contact-form input[type="email"],
    .contact-form textarea { font-size: 16px !important; }
}

@media (max-width: 480px) {
    .contact-detail { margin-left: 0.5rem !important; margin-right: 0.5rem !important; }
    .contact-form .btn { min-height: 48px !important; }
    .contact-form .form-control { min-height: 48px !important; }
}

/* ========================================================================== 
   SERVICE PAGE – Trusted By Crossfade (exact from static service.html)
   ========================================================================== */

.service-clients {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
}

.service-clients h6 {
    font-size: 0.875rem;
    color: #6c757d;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: 600;
}

.client-logos {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 90px;
    overflow: visible;
}

.client-item {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 140px;
    height: 80px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.1);
    opacity: 0;
    transform: scale(0.9);
}

/* 2 logos - 5s cycle (no waiting) */
.client-logos:has(.client-item:nth-child(2):last-child) .client-item {
    animation: crossfadeScale2 5s ease-in-out infinite;
}
.client-logos:has(.client-item:nth-child(2):last-child) .client-item:nth-child(1) {
    animation-delay: 0s;
}
.client-logos:has(.client-item:nth-child(2):last-child) .client-item:nth-child(2) {
    animation-delay: 2.5s;
}

/* 3 logos - 7.5s cycle (no waiting) */
.client-logos:has(.client-item:nth-child(3):last-child) .client-item {
    animation: crossfadeScale3 7.5s ease-in-out infinite;
}
.client-logos:has(.client-item:nth-child(3):last-child) .client-item:nth-child(1) {
    animation-delay: 0s;
}
.client-logos:has(.client-item:nth-child(3):last-child) .client-item:nth-child(2) {
    animation-delay: 2.5s;
}
.client-logos:has(.client-item:nth-child(3):last-child) .client-item:nth-child(3) {
    animation-delay: 5s;
}

/* 4 logos - 10s cycle (no waiting) */
.client-logos:has(.client-item:nth-child(4):last-child) .client-item {
    animation: crossfadeScale4 10s ease-in-out infinite;
}
.client-logos:has(.client-item:nth-child(4):last-child) .client-item:nth-child(1) {
    animation-delay: 0s;
}
.client-logos:has(.client-item:nth-child(4):last-child) .client-item:nth-child(2) {
    animation-delay: 2.5s;
}
.client-logos:has(.client-item:nth-child(4):last-child) .client-item:nth-child(3) {
    animation-delay: 5s;
}
.client-logos:has(.client-item:nth-child(4):last-child) .client-item:nth-child(4) {
    animation-delay: 7.5s;
}

/* Animation for 2 logos */
@keyframes crossfadeScale2 {
    0% {
        opacity: 0;
        transform: scale(0.9);
        z-index: 1;
    }
    10% {
        opacity: 1;
        transform: scale(1);
        z-index: 2;
    }
    40% {
        opacity: 1;
        transform: scale(1);
        z-index: 2;
    }
    50% {
        opacity: 0;
        transform: scale(0.9);
        z-index: 1;
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
        z-index: 1;
    }
}

/* Animation for 3 logos */
@keyframes crossfadeScale3 {
    0% {
        opacity: 0;
        transform: scale(0.9);
        z-index: 1;
    }
    6.67% {
        opacity: 1;
        transform: scale(1);
        z-index: 2;
    }
    26.67% {
        opacity: 1;
        transform: scale(1);
        z-index: 2;
    }
    33.33% {
        opacity: 0;
        transform: scale(0.9);
        z-index: 1;
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
        z-index: 1;
    }
}

/* Animation for 4 logos */
@keyframes crossfadeScale4 {
    0% {
        opacity: 0;
        transform: scale(0.9);
        z-index: 1;
    }
    5% {
        opacity: 1;
        transform: scale(1);
        z-index: 2;
    }
    20% {
        opacity: 1;
        transform: scale(1);
        z-index: 2;
    }
    25% {
        opacity: 0;
        transform: scale(0.9);
        z-index: 1;
    }
    100% {
        opacity: 0;
        transform: scale(0.9);
        z-index: 1;
    }
}

.client-item img {
    max-width: 110px;
    max-height: 60px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: grayscale(0%);
    transition: all 0.3s ease;
}

.client-item:hover {
    animation-play-state: paused;
    box-shadow: 0 6px 25px rgba(0,123,255,0.25);
    z-index: 10 !important;
}

.client-item:hover img {
    transform: scale(1.1);
}

.client-tooltip {
    position: absolute;
    bottom: -45px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.9);
    color: #ffffff;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 20;
    pointer-events: none;
}

.client-tooltip:before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid rgba(0,0,0,0.9);
}

.client-item:hover .client-tooltip {
    opacity: 1;
    visibility: visible;
    bottom: -50px;
}

@media (max-width: 768px) {
    .client-logos {
        height: 75px;
    }

    .client-item {
        width: 110px;
        height: 65px;
    }

    .client-item img {
        max-width: 90px;
        max-height: 50px;
    }

    .client-tooltip {
        font-size: 0.7rem;
        padding: 5px 10px;
    }
}

@media (max-width: 576px) {
    .client-logos {
        height: 65px;
    }

    .client-item {
        width: 95px;
        height: 55px;
    }

    .client-item img {
        max-width: 75px;
        max-height: 42px;
    }
}

/* ========================================================================== 
   CLIENTS PAGE – Page Header
   ========================================================================== */

.page-header-banner {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    padding: 4rem 0;
    color: white;
    text-align: center;
}

.page-header-banner h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.page-header-banner p {
    font-size: 1.1rem;
    opacity: 0.9;
    max-width: 600px;
    margin: 0 auto;
}

/* ==========================================================================
   ABOUT PAGE – Images layout
   ========================================================================== */

.about-images-wrapper {
    position: relative;
}

.about-images-wrapper .img-back {
    width: 75%;
    border-radius: 0.5rem;
    margin-bottom: 25%;
}

.about-images-wrapper .img-front {
    position: absolute;
    width: 75%;
    top: 25%;
    left: 25%;
    border-radius: 0.5rem;
}

/* ==========================================================================
   NAVBAR – Enhanced Spacing & Hover States
   ========================================================================== */

.navbar-nav .nav-item {
    margin: 0 1rem !important;
    padding: 0 0.5rem !important;
}

.navbar-nav .nav-link {
    padding: 0.75rem 1rem !important;
    margin: 0 !important;
    transition: all 0.3s ease !important;
}

.navbar-nav .nav-link.active,
.navbar-nav .nav-link:hover {
    background-color: rgba(0, 123, 255, 0.1) !important;
    border-radius: 8px !important;
    transform: translateY(-2px) !important;
}

.navbar-nav .dropdown .nav-link {
    display: flex !important;
    align-items: center !important;
}

@media (max-width: 991px) {
    .navbar-nav .nav-item {
        margin: 0 0.25rem !important;
        padding: 0 !important;
    }

    .navbar-nav .nav-link {
        padding: 1rem 1.5rem !important;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05) !important;
    }

    .navbar-nav .nav-link.active,
    .navbar-nav .nav-link:hover {
        background-color: rgba(0, 123, 255, 0.1) !important;
        border-radius: 0 !important;
        transform: none !important;
        border-left: 3px solid #007bff !important;
    }
}

/* ==========================================================================
   HOME – OUR CLIENTS GRID (tile size matching static index.html)
   ========================================================================== */

.simple-client-grid {
    margin: 0 auto;
    max-width: 1400px;
}

.client-card {
    background: #ffffff;
    border-radius: 15px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.4s ease;
    height: 100%;
    border: 2px solid transparent;
    min-height: 220px; /* approx 216px from static layout */
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.client-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 35px rgba(0,123,255,0.2);
    border-color: #007bff;
}

.client-logo-container {
    width: 140px;
    height: 90px;
    margin: 0 auto 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    border-radius: 12px;
    transition: all 0.3s ease;
    padding: 10px;
}

.client-card:hover .client-logo-container {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.05) 0%, rgba(0, 123, 255, 0.1) 100%);
    transform: scale(1.05);
}

.client-logo-img {
    max-width: 120px;
    max-height: 75px;
    width: 100%;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: grayscale(10%);
}

.client-card:hover .client-logo-img {
    filter: grayscale(0%) brightness(1.05);
    transform: scale(1.08);
}

.client-info h6 {
    font-size: 1rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    transition: color 0.3s ease;
    line-height: 1.4;
}

.client-card:hover .client-info h6 {
    color: #007bff;
}

/* Services section button width override */
.services-section .more-details-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 10px 22px;
    min-width: 0;
    align-self: center;
}

.client-info p {
    font-size: 0.875rem;
    color: #6c757d;
    margin: 0;
    transition: color 0.3s ease;
    line-height: 1.3;
}

.client-card:hover .client-info p {
    color: #495057;
}

@media (max-width: 992px) {
    .client-card {
        padding: 1.5rem 1.2rem;
        min-height: 200px;
    }

    .client-logo-container {
        width: 120px;
        height: 75px;
        margin-bottom: 1.2rem;
    }

    .client-logo-img {
        max-width: 100px;
        max-height: 65px;
    }

    .client-info h6 {
        font-size: 0.95rem;
    }

    .client-info p {
        font-size: 0.825rem;
    }
}

@media (max-width: 768px) {
    .client-card {
        padding: 1.3rem 1rem;
        min-height: 180px;
    }

    .client-logo-container {
        width: 100px;
        height: 65px;
        margin-bottom: 1rem;
    }

    .client-logo-img {
        max-width: 85px;
        max-height: 55px;
    }

    .client-info h6 {
        font-size: 0.9rem;
    }

    .client-info p {
        font-size: 0.8rem;
    }
}

@media (max-width: 576px) {
    .client-card {
        padding: 1rem 0.8rem;
        min-height: 160px;
    }

    .client-logo-container {
        width: 85px;
        height: 55px;
        margin-bottom: 0.8rem;
    }

    .client-logo-img {
        max-width: 70px;
        max-height: 45px;
    }

    .client-info h6 {
        font-size: 0.85rem;
    }

    .client-info p {
        font-size: 0.75rem;
    }
}

body.home .home-facts { 
    padding-top: 1rem !important; padding-bottom: 1rem !important;
 }
