/* Habib Medical Hospital - Custom Styles */

:root {
    --primary-color: #0b5c75;
    --primary-dark: #07414f;
    --secondary-light: #89b5b1;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #ffc107;
    --warning-color: #f4c542;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
}

/* General Typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #0b5c75;
    
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--dark-color);
}

/* Accessibility - Skip Link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--dark-color);
    color: white;
    padding: 8px;
    text-decoration: none;
    z-index: 100;
}

.skip-link:focus {
    top: 0;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 0.5rem;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--primary-color) !important;
}

.navbar a {
    transition: color 0.3s ease;
}

.navbar a:hover {
    color: white !important;
    background-color: #ffc107;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    padding: 1rem 0;
    margin-bottom: 1rem;
}

.hero-section h1 {
    color: white;
    margin-bottom: 1rem;
}

.hero-section .lead {
    color: rgba(255,255,255,0.9);
    font-size: 1.25rem;
}

/* Cards */
.card {
    border: none;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 0.5rem;
}

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

.card-title {
    color: var(--primary-color);
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary,
.btn-danger {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: white;
}

.btn-primary:hover,
.btn-danger:hover,
.btn:hover {
    background-color: var(--primary-dark);

    border-color: #cc7f00;
    color: white;
    transform: translateY(-2px);
}
.form-control,
.form-select {
    border-radius: 0.5rem;
    border-color: #ddd;
    transition: border-color 0.3s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(255, 159, 0, 0.25);
}

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

/* Footer */
footer {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid #ddd;
}

footer h5 {
    color: white;
    font-weight: 700;
}

footer a {
    transition: color 0.3s ease;
    text-decoration: none;
}

footer a:hover {
    color: var(--danger-color) !important;
    background-color: var(--primary-color);
}

/* Header + Footer Logo Scaling */
.navbar-brand img {
    height: 70px !important;
    width: auto !important;
}

.footer-brand img {
    height: 60px !important;
    width: auto !important;
}

@media (min-width: 992px) {
    .navbar-brand img {
        height: 90px !important;
    }
    .footer-brand img {
        height: 80px !important;
    }
}

/* Main Content */
main {
    min-height: 60vh;
}

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

img.rounded {
    border-radius: 0.5rem;
}

/* Responsive Tables */
.table {
    font-size: 0.95rem;
}

.table th {
    background-color: var(--light-color);
    font-weight: 700;
    color: var(--dark-color);
    border: none;
}

/* Alerts */
.alert {
    border-radius: 0.5rem;
    border: none;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* Lists */
ul, ol {
    margin-bottom: 1rem;
}

li {
    margin-bottom: 0.5rem;
}

/* Breadcrumbs */
.breadcrumb {
    background-color: var(--light-color);
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Utility Classes */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.section-divider {
    border-top: 2px solid var(--primary-color);
    margin: 2rem 0;
}

/* Loading Animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding: 3rem 0;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .container {
        padding: 0 1rem;
        
    }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Focus Styles for Keyboard Navigation */
*:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: more) {
    body {
        color: #000;
    }

    .navbar {
        border: 1px solid #000;
    }

    .card {
        border: 1px solid #000;
    }
}

/* Enhanced Mobile Responsiveness */
@media (max-width: 576px) {
    /* Hero section buttons - full width and centered on mobile */
    .carousel-slide-content .d-flex.flex-column.flex-md-row {
        flex-direction: column !important;
        align-items: center !important;
    }

    .carousel-slide-content .d-flex.flex-column.flex-md-row > a {
        width: 100% !important;
        max-width: 280px !important;
    }

    /* Stats section - centered on mobile */
    .row.g-4.w-100 .col-12 {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    /* Hero therapy cards - single row on mobile */
    .carousel-slide-content .row.g-3 {
        flex-wrap: nowrap;
        overflow-x: auto;
    }

    .carousel-slide-content .row.g-3 .col-12 {
        flex: 0 0 calc(33.333333% - 0.5rem);
        min-width: calc(33.333333% - 0.5rem);
    }
}

/* Footer - Improved spacing and alignment */
footer .row {
    row-gap: 1.5rem;
}

footer .col-lg-4 {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

@media (min-width: 992px) {
    footer .row {
        column-gap: 2rem;
    }

    footer .col-lg-4 {
        padding: 0 1rem;
    }

    footer .col-lg-4:first-child {
        padding-left: 0;
    }

    footer .col-lg-4:last-child {
        padding-right: 0;
    }
}

/* Button styling for hero section */
.carousel-slide-content .btn-lg {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Team provider square photos: preserves aspect ratio without distortion */
.team-photo-wrap { position: relative; width: 100%; overflow: hidden; }
.team-photo-wrap::before { content: ""; display: block; padding-top: 100%; }
.team-photo { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; display: block; }

/* Small visual tweak: ensure card body spacing when image exists */
.card .team-photo-wrap { border-bottom-left-radius: 0.5rem; border-bottom-right-radius: 0.5rem; }

@media (max-width: 768px) {
    .carousel-slide-content .btn-lg {
        padding: 0.65rem 1.25rem;
        font-size: 0.9rem;
    }
}

/* Footer links hover effect */
.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    transition: color 0.3s ease, padding-left 0.3s ease;
    display: block;
    padding: 0.25rem 0;
}

.footer-links a:hover {
    color: white;
    padding-left: 0.5rem;
    background-color: transparent !important;
}

/* Consultation section buttons - centered on mobile */
@media (max-width: 576px) {
    .d-flex.flex-column.gap-3.justify-content-center > a {
        width: 100% !important;
        max-width: 280px !important;
    }
}

/* Hero Section Styling - Proper alignment and spacing */
[class$="-hero"] {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

[class$="-hero"] .container {
    width: 100%;
    max-width: 1140px;
    padding: 0 1rem;
}

[class$="-hero"] h1,
[class$="-hero"] h2 {
    line-height: 1.2;
    color: white;
    text-shadow: -3px -1px 4px #ffc107;
}

[class$="-hero"] p {
    color: rgba(255, 255, 255, 0.95);
}

/* Mobile Hero Sections */
@media (max-width: 768px) {
    [class$="-hero"] {
        min-height: 250px !important;
    }

    [class$="-hero"] h1,
    [class$="-hero"] h2 {
        font-size: 2rem !important;
        margin-bottom: 0.75rem !important;
    }

    [class$="-hero"] .lead {
        font-size: 0.95rem !important;
    }

    [class$="-hero"] p {
        margin-top: 0.5rem !important;
    }
}

/* Desktop Hero Sections */
@media (min-width: 769px) {
    [class$="-hero"] {
        min-height: 300px !important;
    }

    [class$="-hero"] h1,
    [class$="-hero"] h2 {
        font-size: 3rem !important;
        margin-bottom: 1rem !important;
    }

    [class$="-hero"] .lead {
        font-size: 1.1rem !important;
    }
}
