/* CSS Variables */
:root {
    --primary-color: #0066cc;
    --secondary-color: #004499;
    --accent-color: #00a8ff;
    --text-dark: #2c3e50;
    --text-light: #7f8c8d;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --border-radius: 8px;
    --transition: all 0.3s ease;
}

/* Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px; /* Offset for fixed navbar */
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.3;
    margin-bottom: 1rem;
}

p {
    color: var(--text-light);
    line-height: 1.7;
}

/* Custom Bootstrap Overrides */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    padding: 12px 30px;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
    transform: translateY(-2px);
}

.btn-outline-light {
    border-width: 2px;
    padding: 12px 30px;
    font-weight: 500;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.btn-outline-light:hover {
    transform: translateY(-2px);
}

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

/* Navigation */
.navbar {
    transition: var(--transition);
    padding: 1rem 0;
}

.navbar-brand img {
    max-height: 50px;
    width: auto;
    transition: var(--transition);
}

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

/* Logo fallback styling */
.navbar-brand-text {
    font-weight: 700 !important;
    color: var(--primary-color) !important;
    font-size: 1.5rem !important;
    text-decoration: none !important;
}

.navbar-nav .nav-link {
    font-weight: 500;
    color: var(--text-dark) !important;
    margin: 0 15px;
    position: relative;
    transition: var(--transition);
}

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

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    background-color: var(--primary-color);
    transition: var(--transition);
    transform: translateX(-50%);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 100%;
}

/* Hero Section */
.hero-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
    padding-top: 80px; /* Account for fixed navbar */
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.2);
    z-index: 1;
}

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

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: 2.5rem;
    color: rgba(255, 255, 255, 0.9);
    animation: fadeInUp 1s ease 0.2s both;
}

.hero-buttons {
    animation: fadeInUp 1s ease 0.4s both;
}

.hero-image {
    animation: fadeInRight 1s ease 0.6s both;
    padding: 2rem;
}

.hero-image .hero-visual {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.1), rgba(0, 168, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.hero-image img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* Section Styles */
.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--text-light);
    margin-bottom: 3rem;
}

/* About Section */
.about-content h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
}

.about-image,
.research-image {
    padding: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.about-image img,
.research-image img {
    width: 100%;
    max-width: 450px;
    height: auto;
    border-radius: var(--border-radius);
    transition: var(--transition);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.about-image img:hover,
.research-image img:hover {
    transform: scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.15);
}

.vision-card,
.mission-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    transition: var(--transition);
}

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

.vision-card h4,
.mission-card h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

/* Services Section */
#services {
    background: linear-gradient(135deg, rgba(0, 102, 204, 0.05) 0%, rgba(0, 168, 255, 0.05) 100%);
}

.services-bg-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="medical-cross" x="0" y="0" width="50" height="50" patternUnits="userSpaceOnUse"><rect x="23" y="15" width="4" height="20" fill="%23e3f2fd" opacity="0.3"/><rect x="15" y="23" width="20" height="4" fill="%23e3f2fd" opacity="0.3"/></pattern></defs><rect width="100" height="100" fill="url(%23medical-cross)"/></svg>') repeat;
    opacity: 0.1;
}

.services-hero-image {
    margin-bottom: 3rem;
    display: flex;
    justify-content: center;
    align-items: center;
}

.services-hero-image img {
    max-width: 400px;
    width: 100%;
    height: auto;
    filter: drop-shadow(0 10px 20px rgba(0, 0, 0, 0.1));
    border-radius: var(--border-radius);
}

/* Service Cards */
.service-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border-top: 4px solid var(--primary-color);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 1.8rem;
}

.service-card h4 {
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.service-card p {
    margin-bottom: 1.5rem;
}

/* Therapeutic Cards */
.therapeutic-card {
    background: white;
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    height: 100%;
}

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

.therapeutic-icon {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

.therapeutic-card h5 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Feature Items */
.feature-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.feature-icon {
    flex-shrink: 0;
    margin-right: 1rem;
    margin-top: 0.25rem;
}

.feature-icon i {
    font-size: 1.5rem;
}

.feature-content h5 {
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

/* Contact Form */
.contact-form {
    background: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: var(--border-radius);
    backdrop-filter: blur(10px);
}

.contact-form .form-control {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    padding: 12px 20px;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    transition: var(--transition);
}

.contact-form .form-control:focus {
    background: white;
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.3);
}

/* Contact Section */
#contact {
    background: var(--primary-color);
    color: white;
}

#contact .section-title {
    color: white;
}

.contact-info {
    padding: 2rem 1.5rem;
    border-radius: var(--border-radius);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-info:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateY(-5px);
}

.contact-info i {
    color: white !important;
    margin-bottom: 1rem;
    filter: drop-shadow(0 2px 4px rgba(255, 255, 255, 0.3));
}

.contact-info h5 {
    margin-bottom: 1rem;
    color: white;
    font-weight: 600;
}

.contact-info p {
    color: white;
    opacity: 0.9;
    margin-bottom: 0;
    line-height: 1.6;
}

.contact-info a {
    text-decoration: none;
    transition: var(--transition);
    color: white;
    font-weight: 500;
}

.contact-info a:hover {
    opacity: 0.8;
    color: white;
    text-decoration: underline;
}

/* Footer */
footer {
    padding: 2rem 0;
}

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

footer a:hover {
    opacity: 0.8;
}

footer .small a {
    color: #ffffff !important;
    text-decoration: underline;
    opacity: 0.8;
}

footer .small a:hover {
    opacity: 1;
    color: var(--accent-color) !important;
}

/* Animations */
@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);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        padding-top: 100px; /* More padding for mobile navbar */
        min-height: calc(100vh - 60px); /* Adjust height for mobile */
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .hero-buttons .btn {
        display: block;
        width: 100%;
        margin-bottom: 1rem;
    }
    
    .hero-buttons .btn:last-child {
        margin-bottom: 0;
    }
    
    .hero-image {
        padding: 1rem;
        margin-top: 2rem;
    }
    
    .about-image img,
    .research-image img {
        max-width: 100%;
    }
    
    .services-hero-image img {
        max-width: 300px;
    }
    
    .service-card,
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .contact-info {
        padding: 2rem 1rem;
        margin-bottom: 2rem;
    }
    
    .contact-info i {
        font-size: 2.5rem !important;
    }
    
    .navbar-nav .nav-link {
        margin: 5px 0;
    }
}

@media (max-width: 576px) {
    .hero-section {
        padding-top: 90px; /* Adjusted for smaller mobile screens */
        min-height: calc(100vh - 40px);
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.75rem;
    }
    
    .service-card,
    .therapeutic-card {
        padding: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .contact-info {
        padding: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    .contact-info i {
        font-size: 2rem !important;
        margin-bottom: 0.8rem;
    }
    
    .contact-info h5 {
        font-size: 1.1rem;
        margin-bottom: 0.8rem;
    }
    
    .contact-info p {
        font-size: 0.9rem;
    }
}

/* Loading Animation */
.loading {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Scroll Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

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

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

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

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-color);
}

/* Certificate Container Styling */
.certificate-container {
    position: relative;
    display: inline-block;
    max-width: 100%;
    margin: 0 auto;
}

.certificate-container img {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    border: 2px solid #e9ecef;
}

.certificate-container img:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

@media (max-width: 768px) {
    .certificate-container {
        margin: 1rem 0;
    }
    
    .certificate-container img {
        max-width: 100%;
        height: auto;
    }
}
