/* 
 * Raghav Institute of Medical Science - Official Stylesheet
 * Theme: Medical/Academic (Navy Blue, Green, White)
 * Approach: Responsive, Mobile-Friendly, Clean
 */

:root {
    /* Colors */
    --primary-color: #0a2558;
    /* Navy Blue - Trust */
    --primary-light: #1e3c72;
    --secondary-color: #00a859;
    /* Medical Green - Health */
    --secondary-hover: #008f4c;
    --text-dark: #333333;
    --text-light: #666666;
    --white: #ffffff;
    --light-bg: #f5f7fa;
    --border-color: #e0e0e0;
    --footer-bg: #051937;

    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;

    /* Spacing */
    --section-padding: 60px 0;
    --container-width: 1200px;

    /* Shadows */
    --card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --card-hover-shadow: 0 10px 20px rgba(0, 0, 0, 0.15);

    /* Transitions */
    --transition: all 0.3s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 20px;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    padding-bottom: 15px;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background-color: var(--secondary-color);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 50px;
    font-size: 1.1rem;
}

/* Layout Utilities */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.section {
    padding: var(--section-padding);
}

.btn {
    display: inline-block;
    padding: 12px 28px;
    background-color: var(--primary-color);
    color: var(--white);
    font-family: var(--font-heading);
    font-weight: 500;
    border-radius: 5px;
    border: 2px solid var(--primary-color);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}

.btn:hover {
    background-color: transparent;
    color: var(--primary-color);
}

.btn-secondary {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-secondary:hover {
    background-color: transparent;
    color: var(--secondary-color);
}

/* Header & Navigation */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 10px 0;
    font-size: 0.9rem;
}

.top-bar-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-info span {
    margin-right: 20px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h1 {
    font-size: 1.8rem;
    margin-bottom: 0;
    line-height: 1.2;
}

.logo span {
    font-size: 0.9rem;
    color: var(--text-light);
    font-weight: 400;
    display: block;
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    font-family: var(--font-heading);
    color: var(--primary-color);
    position: relative;
    padding-bottom: 5px;
}

.nav-links a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--secondary-color);
    transition: var(--transition);
}

.nav-links a:hover::after,
.nav-links a.active::after {
    width: 100%;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    background-color: var(--primary-color);
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(rgba(10, 37, 88, 0.8), rgba(10, 37, 88, 0.6)), url('../images/hero.jpg');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    align-items: center;
    text-align: center;
    color: var(--white);
    padding: 0 20px;
}

.hero-content {
    max-width: 800px;
}

.hero-content h1 {
    font-size: 3.5rem;
    color: var(--white);
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
}

.hero-btns {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* Highlights Section */
.highlights-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.highlight-card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: var(--transition);
    border-bottom: 4px solid transparent;
}

.highlight-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
    border-bottom-color: var(--secondary-color);
}

.highlight-icon {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.highlight-card h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

/* Card Grid Layout */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.course-card {
    background: var(--white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
}

.course-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--card-hover-shadow);
}

.course-img {
    height: 200px;
    overflow: hidden;
}

.course-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.course-card:hover .course-img img {
    transform: scale(1.05);
}

.course-info {
    padding: 20px;
}

.course-info h3 {
    margin-bottom: 10px;
    color: var(--primary-color);
}

.course-meta {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
    display: flex;
    gap: 15px;
}

.course-meta span i {
    color: var(--secondary-color);
    margin-right: 5px;
}

/* Intro Section */
.intro-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.intro-text {
    flex: 1;
}

.intro-image {
    flex: 1;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
}

/* Footer Styles */
footer {
    background-color: var(--footer-bg);
    color: var(--white);
    padding: 50px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h3 {
    color: var(--white);
    font-size: 1.2rem;
    margin-bottom: 20px;
    border-left: 3px solid var(--secondary-color);
    padding-left: 10px;
}

.footer-links li {
    margin-bottom: 10px;
}

.footer-links a {
    color: #cccccc;
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--secondary-color);
    padding-left: 5px;
}

.contact-info li {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    color: #cccccc;
}

.contact-info i {
    color: var(--secondary-color);
    margin-top: 5px;
}

.copyright {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    text-align: center;
    color: #999;
    font-size: 0.9rem;
}

/* Mobile Adjustments */
@media (max-width: 992px) {
    .container {
        padding: 0 20px;
    }

    .hero-content h1 {
        font-size: 3rem;
    }

    .section-title {
        font-size: 2.2rem;
    }
}

@media (max-width: 768px) {
    .navbar {
        position: relative;
    }

    .hamburger {
        display: block;
        z-index: 1001;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    .nav-links {
        position: fixed;
        left: -100%;
        top: 70px;
        /* Adjust based on header height */
        gap: 0;
        flex-direction: column;
        background-color: var(--white);
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
        padding: 20px 0;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links li {
        margin: 16px 0;
    }

    .top-bar-content {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .top-info span {
        display: block;
        margin-right: 0;
        margin-bottom: 5px;
    }

    .hero-content h1 {
        font-size: 2.2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    .hero {
        height: auto;
        padding: 80px 20px;
        background-attachment: scroll;
        /* Fixes background issue on some mobiles */
    }

    .intro-content {
        flex-direction: column;
        text-align: center;
    }

    .section-title {
        text-align: center !important;
        margin-left: 0 !important;
        font-size: 2rem;
    }

    .section-subtitle {
        font-size: 1rem;
    }

    .hero-btns {
        flex-direction: column;
        gap: 15px;
    }

    .btn {
        width: 100%;
        max-width: 300px;
        /* Prevent full width on larger tablets */
    }

    .highlights-grid,
    .grid-3,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-col {
        text-align: center;
    }

    .footer-col h3 {
        border-left: none;
        padding-left: 0;
        border-bottom: 2px solid var(--secondary-color);
        display: inline-block;
        padding-bottom: 5px;
    }

    .contact-info li {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .logo h1 {
        font-size: 1.4rem;
    }

    .logo span {
        font-size: 0.8rem;
    }

    .section-title {
        font-size: 1.8rem;
    }

    .highlight-card {
        padding: 20px;
    }
}