/*=============================================
  Africa Ultrasound - Modern Theme
=============================================*/

/*--- CSS Custom Properties ---*/
:root {
    --primary: #097EC7;
    --primary-dark: #075a94;
    --primary-light: #e8f4fc;
    --navy: #040452;
    --navy-dark: #02023B;
    --navy-medium: #0C0C7A;
    --teal: #06BBCC;
    --bg-light: #F0FBFC;
    --bg-white: #FFFFFF;
    --text-body: #52565b;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;
    --text-light: #ffffff;
    --border-light: #e9ecef;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.12);
    --shadow-xl: 0 12px 60px rgba(0,0,0,0.15);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-pill: 50px;
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --font-body: 'Heebo', sans-serif;
    --font-heading: 'Nunito', sans-serif;
}

/*--- Reset & Base ---*/
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-body);
    line-height: 1.7;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    background: var(--bg-white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.3;
    margin-bottom: 0.75rem;
}

h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 4vw, 2.5rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.8rem); }
h4 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); }
h5 { font-size: 1.15rem; }
h6 { font-size: 0.95rem; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-dark);
}

img {
    max-width: 100%;
    height: auto;
}

/*--- Utility Classes ---*/
.text-justify-ultrasound { text-align: justify !important; }
.fw-medium { font-weight: 600 !important; }
.fw-semi-bold { font-weight: 700 !important; }
.justify-text { text-align: justify !important; }
.justify-left { text-align: left !important; }

.section-label {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    background: var(--primary-light);
    padding: 6px 20px;
    border-radius: var(--radius-pill);
    margin-bottom: 1rem;
}

.section-title {
    position: relative;
    display: inline-block;
    text-transform: uppercase;
}

/*--- Spinner ---*/
#spinner {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-out, visibility 0s linear 0.6s;
    z-index: 99999;
}

#spinner.show {
    transition: opacity 0.6s ease-out, visibility 0s linear 0s;
    visibility: visible;
    opacity: 1;
}

/*--- Buttons ---*/
.btn {
    font-family: var(--font-heading);
    font-weight: 600;
    border: none;
    border-radius: var(--radius-pill);
    padding: 12px 32px;
    transition: var(--transition);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    text-decoration: none;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--primary);
    color: var(--text-light);
}

.btn-primary:hover {
    background: var(--primary-dark);
    color: var(--text-light);
}

.btn-outline-primary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline-primary:hover {
    background: var(--primary);
    color: var(--text-light);
}

.btn-light {
    background: var(--bg-white);
    color: var(--primary);
}

.btn-sm {
    padding: 8px 20px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 40px;
    font-size: 1.05rem;
}

.btn-square {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: var(--radius-sm) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-sm-square {
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: var(--radius-sm) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-lg-square {
    width: 52px;
    height: 52px;
    padding: 0;
    border-radius: var(--radius-sm) !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

/*--- Back to Chat Button ---*/
.back-to-chat {
    position: fixed;
    right: 30px;
    bottom: 30px;
    z-index: 99;
    width: 56px;
    height: 56px;
    border-radius: 50% !important;
    background: var(--primary);
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-lg);
    border: none;
    cursor: pointer;
    transition: var(--transition);
}

.back-to-chat:hover {
    background: var(--primary-dark);
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
    color: var(--text-light);
}

/*--- Page Header (Hero Sections) ---*/
.page-header {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 50vh;
    display: flex;
    align-items: center;
}

.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(4, 4, 82, 0.85), rgba(9, 126, 199, 0.7));
    z-index: 1;
}

.page-header .container {
    position: relative;
    z-index: 2;
}

.page-header h1 {
    color: var(--text-light);
    font-weight: 800;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}

.page-header .breadcrumb {
    background: transparent;
    padding: 0;
    margin: 0;
}

.page-header .breadcrumb-item a {
    color: rgba(255,255,255,0.8);
}

.page-header .breadcrumb-item a:hover {
    color: var(--text-light);
}

.page-header .breadcrumb-item.active {
    color: var(--text-light);
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
    color: rgba(255,255,255,0.5);
}

/*--- Image Prop (anti-download) ---*/
.img-prop {
    pointer-events: none;
}

/*--- Categories ---*/
.category img,
.course-item img {
    transition: var(--transition);
    border-radius: var(--radius-md);
}

.category a:hover img,
.course-item:hover img {
    transform: scale(1.05);
}

/*--- Service Items ---*/
.service-item {
    background: var(--bg-white);
    transition: var(--transition);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition);
}

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

.service-item:hover::before {
    transform: scaleX(1);
}

.service-item * {
    transition: var(--transition);
}

/*--- Team ---*/
.team-item {
    background: var(--bg-white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-light);
}

.team-item:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
}

.team-item img {
    transition: var(--transition);
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
}

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

.team-item .product {
    padding: 1.25rem;
    text-align: center;
}

.team-item .product h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.team-item .product p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.team-item .icon {
    padding: 0.5rem 0;
    margin-bottom: 0.5rem;
}

.team-item .icon a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary-light);
    color: var(--primary);
    margin: 0 4px;
    transition: var(--transition);
}

.team-item .icon a:hover {
    background: var(--primary);
    color: var(--text-light);
    transform: translateY(-2px);
}

.description {
    display: none;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-body);
    padding: 0.5rem 0;
    text-align: justify;
}

.view-more {
    display: block;
    margin: 0.75rem auto 0;
    padding: 8px 24px !important;
    font-size: 0.85rem !important;
    border-radius: var(--radius-pill) !important;
}

/*--- Dialog (Team Bio Modal) ---*/
.dialog {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 999;
    backdrop-filter: blur(4px);
}

.dialog-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: white;
    padding: 2rem;
    text-align: center;
    overflow-y: auto;
    max-width: 600px;
    max-height: 80%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.close {
    position: absolute;
    top: 12px;
    right: 16px;
    font-size: 28px;
    font-weight: bold;
    background-color: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    line-height: 1;
    transition: var(--transition);
}

.close:hover {
    color: var(--text-dark);
}

/*--- Testimonial ---*/
.testimonial-carousel::before {
    position: absolute;
    content: "";
    top: 0;
    left: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to right, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

.testimonial-carousel::after {
    position: absolute;
    content: "";
    top: 0;
    right: 0;
    height: 100%;
    width: 0;
    background: linear-gradient(to left, rgba(255, 255, 255, 1) 0%, rgba(255, 255, 255, 0) 100%);
    z-index: 1;
}

@media (min-width: 768px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 150px;
    }
}

@media (min-width: 992px) {
    .testimonial-carousel::before,
    .testimonial-carousel::after {
        width: 200px;
    }
}

.testimonial-carousel .owl-item .testimonial-text,
.testimonial-carousel .owl-item.center .testimonial-text * {
    transition: var(--transition);
}

.testimonial-carousel .owl-item.center .testimonial-text {
    background: var(--primary) !important;
    border-radius: var(--radius-md);
}

.testimonial-carousel .owl-item.center .testimonial-text * {
    color: #FFFFFF !important;
}

.testimonial-carousel .owl-dots {
    margin-top: 24px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 10px;
}

.testimonial-carousel .owl-dot {
    position: relative;
    display: inline-block;
    width: 12px;
    height: 12px;
    border: 2px solid #CCCCCC;
    border-radius: 50%;
    transition: var(--transition);
    cursor: pointer;
}

.testimonial-carousel .owl-dot.active {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.2);
}

.testimonial-item {
    padding: 0 10px;
}

.testimonial-item img {
    border-radius: 50%;
    border: 3px solid var(--primary-light);
    object-fit: cover;
}

.testimonial-item h5 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.testimonial-item p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.testimonial-text {
    background: var(--bg-light);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
}

.testimonial-text p {
    font-size: 0.95rem;
    line-height: 1.7;
    font-style: italic;
    color: var(--text-body);
}

/*--- Footer ---*/
.footer {
    background: var(--navy-dark);
    color: rgba(255, 255, 255, 0.7);
}

.footer h5 {
    color: var(--text-light);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    position: relative;
    padding-bottom: 12px;
}

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

.footer p {
    font-size: 0.9rem;
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.footer a {
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition);
}

.footer a:hover {
    color: var(--primary);
    padding-left: 4px;
}

.footer ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer ul li {
    padding: 4px 0;
}

.footer ul li a {
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.footer ul li a::before {
    content: '\f105';
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 0.75rem;
    opacity: 0;
    transform: translateX(-8px);
    transition: var(--transition);
}

.footer ul li a:hover::before {
    opacity: 1;
    transform: translateX(0);
}

.footer .bottom_border {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 2rem;
    margin-bottom: 1.5rem;
}

.footer .footer-bottom {
    padding: 1rem 0;
    text-align: center;
    font-size: 0.85rem;
}

.footer .footer-bottom-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.footer .footer-bottom-links a {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    transition: var(--transition);
}

.footer .footer-bottom-links a:hover {
    color: var(--primary);
}

.footer .social-icons {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 1.25rem;
}

.footer .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.9rem;
    transition: var(--transition);
}

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

/* Legacy footer class overrides */
.col_white_amrc { color: #FFF; }
.pt2 { padding-top: 40px; margin-bottom: 20px; }
.mb10 { padding-bottom: 15px; }
.footer_ul_amrc li a,
.footer_ul2_amrc p {
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
}
.footer_ul2_amrc li i {
    color: var(--primary);
    margin-right: 8px;
}

/*--- Cookie Box ---*/
.cookie_box {
    position: fixed;
    left: 0;
    bottom: 0;
    width: 100%;
    max-width: 420px;
    padding: 1.5rem;
    background: var(--bg-white);
    text-align: center;
    box-shadow: var(--shadow-xl);
    border-radius: 0 var(--radius-lg) 0 0;
    z-index: 998;
    border-top: 3px solid var(--primary);
}

.cookie_box h3 {
    font-size: 1.25rem;
    margin: 0.75rem 0 0.5rem;
    color: var(--text-dark);
}

.cookie_box p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.cookie_box button {
    padding: 10px 32px;
    background: var(--primary);
    color: white;
    font-size: 0.95rem;
    font-weight: 600;
    border: 0;
    border-radius: var(--radius-pill);
    outline: 0;
    cursor: pointer;
    transition: var(--transition);
}

.cookie_box button:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.cookie_box button:focus {
    background: var(--primary-dark);
    box-shadow: 0 0 0 3px rgba(9, 126, 199, 0.3);
}

/*--- Mobile View Grid ---*/
.mobile-view-big {
    display: flex;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

/*--- Responsive Adjustments ---*/
@media (max-width: 992px) {
    .page-header {
        min-height: 40vh;
    }
}

@media (max-width: 768px) {
    .page-header {
        min-height: 35vh;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .section-label {
        font-size: 0.7rem;
        padding: 5px 16px;
    }
    
    .btn {
        padding: 10px 24px;
        font-size: 0.9rem;
    }
    
    .btn-lg {
        padding: 12px 32px;
        font-size: 0.95rem;
    }
    
    .back-to-chat {
        right: 20px;
        bottom: 20px;
        width: 50px;
        height: 50px;
        font-size: 0.75rem;
    }
    
    .mobile-view-big {
        grid-template-columns: 1fr;
    }
    
    .service-item {
        padding: 1.5rem 1.25rem;
    }
    
    .cookie_box {
        max-width: 100%;
        border-radius: 0;
    }
}

@media (max-width: 576px) {
    .page-header {
        min-height: 30vh;
    }
    
    .footer .social-icons {
        gap: 10px;
    }
    
    .footer .social-icons a {
        width: 36px;
        height: 36px;
        font-size: 0.8rem;
    }
}

/*--- Animations ---*/
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.animate-fadeInUp {
    animation: fadeInUp 0.6s ease-out forwards;
}

.animate-fadeIn {
    animation: fadeIn 0.6s ease-out forwards;
}

/*--- Modern Card Styles ---*/
.card-modern {
    background: var(--bg-white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}

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

/*--- Gradient Backgrounds ---*/
.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary), var(--navy));
}

.bg-gradient-navy {
    background: linear-gradient(135deg, var(--navy), var(--navy-dark));
}

/*--- Stats/Fact Cards ---*/
.fact-card {
    background: linear-gradient(135deg, var(--navy), var(--primary));
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    color: var(--text-light);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.fact-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

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

.fact-card p {
    color: rgba(255,255,255,0.9);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0;
    position: relative;
    z-index: 1;
}

/*--- Form Styles ---*/
.form-control {
    border-radius: var(--radius-sm);
    border: 2px solid var(--border-light);
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(9, 126, 199, 0.15);
}

.form-floating > .form-control {
    border-radius: var(--radius-sm);
}

/*--- Table Responsive ---*/
.table-responsive {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/*--- Video Player ---*/
video {
    width: 100%;
    max-width: 550px;
    height: auto;
    aspect-ratio: 16/10;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
}

@media (max-width: 768px) {
    video {
        max-width: 100%;
        aspect-ratio: 16/9;
    }
}

/*--- Justify Text ---*/
.text-justify {
    text-align: justify;
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-dark);
}

/*--- Selection Styling ---*/
::selection {
    background: var(--primary);
    color: var(--text-light);
}

/*--- Print Styles ---*/
@media print {
    .back-to-chat,
    .cookie_box,
    #spinner {
        display: none !important;
    }
}
