/* Home Page CSS for IIMU */
/* Based on IITM layout with green and yellow color scheme */

:root {
    /* Primary Colors - Green & Yellow */
    --iimu-primary-green: #487235;
    --iimu-primary-yellow: #feec43;
    --iimu-dark-green: #212934;
    --iimu-light-green: #487235;
    --iimu-light-yellow: #feec43;
    --iimu-pale-green: #f2f2f2;
    --iimu-pale-yellow: #f2f2f2;

    /* Neutral Colors */
    --white: #ffffff;
    --black: #020202;
    --text-dark: #212934;
    --text-gray: #4d4d4d;
    --text-light-gray: #cbcbcb;
    --border-light: #f2f2f2;

    /* Background Colors */
    --bg-light: #f6f6f6;
    --bg-medium: #cbcbcb;
    --bg-dark: #cbcbcb;
    --table-header-bg: #878686;

    /* Shadows */
    --shadow-light: rgba(0, 0, 0, 0.1);
    --shadow-dark: rgba(0, 0, 0, 0.6);

    /* Font Sizes */
    --font-small: 0.8rem;
    --font-regular: 0.9rem;
    --font-medium: 1rem;
    --font-large: 1.5rem;
}

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    line-height: 1.72;
    color: var(--text-dark);
    text-align: justify;
    background-color: white;
    font-weight: 300;
    overflow-x: hidden;
}

#pseudoBody {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

h1,
h2,
h3,
h5,
h6 {
    font-family: 'Roboto Serif', serif;
    text-align: left;
    font-weight: 500;
}

h1 {
    color: var(--black);
}

h2 {
    color: var(--iimu-primary-green);
}

h3 {
    color: var(--iimu-primary-green);
}

h3 {
    color: var(--iimu-primary-green);
}

p {
    margin-bottom: 10px;
}

.container {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    box-sizing: border-box;
}

/* Section Divider */
.section-divider {
    height: 2px;
    background-color: var(--bg-dark);
    /* max-width: 1170px; */
    margin: 0;
    border: none;
}

/* ========== Hero Section ========== */
/* corrected plain CSS */
.hero {
    background: url('../images/IIMU-bg.jpg') bottom center/cover  no-repeat;
    max-height: 500px;
    padding: 10% 0;
    position: relative;
    /* required for ::before absolute placement */
    margin-top: var(--header-total-height);
    text-align: left;
    overflow: hidden;
    width: 100vw;
    max-width: none;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
    pointer-events: none;
}

.inner-hero {
    max-width: 1170px;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
}

/* ensure content is positioned above the overlay */
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 70%;
    padding: 40px;
    /* margin-left: 5%; */
    border-left: 5px solid var(--iimu-primary-yellow);
    color: var(--white);
}

.hero-content h1 {
    font-size: 2rem;
    line-height: 1.3;
    margin-bottom: 20px;
    font-weight: 500;
    /* text-shadow: 0 1px 3px rgba(0, 0, 0, 0.6); */
    color: var(--white);
}

.hero-content p {
    font-size: 1rem;
    opacity: 0.95;
    font-weight: 500;
    /* text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); */
}

/* ========== Feature Cards Section ========== */
.horizontal {
    position: relative;
    z-index: 2;
    background: transparent;
    padding: 0;
}

.feature-cards {
    position: relative;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 60px;
    padding-bottom: 60px;
    z-index: 1;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    position: relative;
    /* margin: 0 auto; */
    box-sizing: border-box;
}

.feature-card {
    background-color: white;
    padding: 30px;
    transition: all 0.3s ease;
    border: 1px solid var(--bg-medium);
}

.feature-card h3 {
    color: var(--iimu-primary-green);
    margin-bottom: 15px;
    font-size: var(--font-medium);
    font-weight: 500;
}

.feature-card p {
    color: var(--black);
    font-size: var(--font-small);
    line-height: 1.6;
}

/* ========== Video Section ========== */
.video-section {
    background: white;
    padding: 60px 0;
    color: var(--black);
    position: relative;
    z-index: 0;
}

.video-container {
    min-width: 380px;
    margin-top: 30px;
    margin-left: 0;
    flex-shrink: 0;
}

.video-container iframe {
    width: 100%;
    aspect-ratio: 16/9;
    border: none;
}

.video-description {
    margin: 30px 0;
    padding: 0;
    font-size: var(--font-regular);
    line-height: 1.8;
    color: var(--iimu-dark-green);
}

/* ========== Programs Section ========== */
.programs-section {
    padding: 20px 0;
    margin: 30px auto;
    background: white;
    position: relative;
    overflow: hidden;
}

.programs-details {
    background: var(--white);
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.programs-details h3,
.info-block h3 {
    font-size: 1.4rem;
    color: var(--iimu-primary-green);
    margin-bottom: 25px;
    font-weight: 500;
    position: relative;
}

.programs-details p {
    font-size: 1.05rem;
    line-height: 1.8;
    color: var(--text-gray);
    text-align: justify;
}

.programs-details ul {
    list-style: disc;
    padding-left: 20px;
}

.programs-details ul li {
    padding: 10px 0;
    background: white;
    transition: all 0.3s ease;
    position: relative;
}

.programs-details ul li strong {
    color: var(--iimu-dark-green);
    font-size: 1.1rem;
}

.programs-details ul li em {
    display: block;
    margin-top: 8px;
    color: var(--text-gray);
    font-size: 0.95rem;
    font-style: italic;
    padding-left: 0;
}

/* ========== Info Section ========== */
.info-section {
    padding: 20px 0;
    margin: 30px 0;
    background: white;
    position: relative;
    overflow: hidden;
}

.info-grid {
    box-sizing: border-box;
}

.info-block h2 {
    font-size: 1.6rem;
    color: var(--iimu-primary-green);
    margin-bottom: 20px;
    font-weight: 500;
    position: relative;
    padding-bottom: 12px;
}

/* Clean program structure table styling */

.clean-structure-table {
    margin-top: 25px;
    overflow-x: auto;
}

.clean-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--white);
    overflow: hidden;
    text-align: left;
    border: 1px solid var(--text-light-gray);
}

.clean-table thead {
    background: var(--bg-light);
    color: var(--black);
}

.clean-table th {
    padding: 14px 12px;
    text-align: left;
    font-size: 0.95rem;
    letter-spacing: 0.5px;
    border: 1px solid var(--text-light-gray);
}

.clean-table tbody tr {
    border-bottom: 1px solid var(--text-light-gray);
}

.clean-table tbody tr:nth-child(even) {
    background: var(--bg-light);
}

.clean-table tbody tr:nth-child(odd) {
    background: var(--white);
}

.clean-table td {
    padding: 14px 12px;
    color: var(--text-dark);
    vertical-align: top;
    font-size: 0.95rem;
    line-height: 1.5;
    border: 1px solid var(--text-light-gray);
}

/* Year column center alignment */
.clean-table td:first-child {
    /* text-align: center; */
    font-weight: 500;
    /* color: var(--iimu-primary-green); */
    width: 5rem;
}

/* Mobile friendly */
@media(max-width: 700px) {

    .clean-table th,
    .clean-table td {
        font-size: 0.85rem;
        padding: 10px;
    }
}

/* ========== Testimonial Section ========== */
.testimonial-section {
    padding: 20px 0;
    margin: 30px auto;
    position: relative;
    overflow: hidden;
}

.testimonial-section h1 {
    text-align: center;
    color: var(--iimu-primary-green);
    font-size: 1.8rem;
    font-weight: 500;
    /* margin-bottom: 40px; */
}

.testimonial-container {
    display: flex;
    align-items: center;
    gap: 40px;
    background: var(--white);
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.testimonial-container:last-child {
    margin-bottom: 0;
}

.testimonial-image {
    flex: 0 0 232px;
    position: relative;
}

.testimonial-image img {
    width: 232px;
    height: 309.33px;
    object-fit: cover;
    border: 4px solid white;
    transition: all 0.3s ease;
}

.testimonial-content {
    flex: 1;
    position: relative;
    z-index: 1;
    padding: 20px;
}

.testimonial-text {
    color: var(--text-gray);
    line-height: 1.9;
    font-size: 1.05rem;
    margin-bottom: 20px;
    text-align: justify;
    font-style: italic;
    position: relative;
}

.testimonial-content p:last-child {
    font-style: normal;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* ========== Program Details Section ========== */
.program-details {
    background: white;
    margin: 0 auto;
    padding: 0 20px;
    box-sizing: border-box;
    /* padding: 80px 0; */
}

.program-details-grid {
    display: flex;
    flex-direction: column;
    margin: 0 auto;
    box-sizing: border-box;
}

.details-block {
    background: var(--white);
    margin: 30px auto;
    padding: 20px 0;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.details-block h3 {
    font-size: 1.4rem;
    color: var(--iimu-primary-green);
    margin-bottom: 25px;
    font-weight: 500;
    position: relative;
    padding-bottom: 12px;
}

.details-block p {
    color: var(--text-gray);
    line-height: 1.8;
    /* margin-bottom: 15px; */
    font-size: 1rem;
    text-align: justify;
}

.details-block p:last-child {
    margin-bottom: 0;
}

.details-block ul {
    list-style: disc;
    margin-bottom: 15px;
    color: var(--text-gray);
    line-height: 1.8;
    padding-left: 40px;
}

.details-block ul li {
    padding: 8px 0;
    position: relative;
}

.details-block ul li strong {
    color: var(--iimu-dark-green);
    font-weight: 500;
}

.details-block p em {
    display: block;
    color: var(--iimu-light-green);
    font-style: italic;
    margin-bottom: 12px;
    font-size: 1.05rem;
    font-weight: 500;
}

/* Link Styling */
.eligibility-link {
    color: var(--iimu-primary-green);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.eligibility-link:hover {
    color: var(--iimu-primary-yellow);
    text-decoration: underline;
}

.academics-info {
    width: 100%;
    margin: 40px 0;
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.academics-info span {
    display: block;
    line-height: 1.5;
    color: var(--text-dark);
    font-size: 1rem;
}

/* ===============================================
   Navigation Section
   =============================================== */
.navigation-section {
    background: white;
    padding: 60px 5%;
}

.navigation-info {
    margin: 0 auto;
    display: flex;
    justify-content: right;
    align-items: center;
    gap: 20px;
}

.navigation-info span {
    display: none;
}

.navigation-button {
    display: inline-block;
    padding: 12px 24px;
    background: var(--iimu-primary-green);
    color: var(--white);
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.navigation-button:hover {
    background: var(--iimu-primary-yellow);
    color: var(--text-dark);
}

/* ========== Features Section ========== */
.features-section {
    background: white;
    padding: 40px 5%;
}

.features-block {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
}

.feature {
    flex: 1 1 0;
    max-width: 30%;
    margin: 0 1.5%;
    box-sizing: border-box;
    text-align: center;
}

.feature-icon {
    font-size: 38px;
    margin-bottom: 10px;
    color: var(--iimu-primary-green);
}

.feature-title {
    color: var(--iimu-primary-green);
    font-size: var(--font-medium);
    font-weight: 500;
    margin-bottom: 12px;
}

.feature-desc {
    font-size: var(--font-small);
    line-height: 1.4;
    color: var(--text-gray);
}

/* ========== Why Section ========== */
.why-section {
    background: white;
    padding: 50px 0;
    text-align: center;
}

.why-title {
    color: var(--iimu-primary-green);
    font-size: var(--font-large);
    font-weight: 500;
    margin-bottom: 18px;
}

.why-desc {
    color: var(--text-gray);
    font-size: var(--font-regular);
    max-width: 800px;
    margin: 0 auto;
    line-height: 1.6;
}

/* ========== Responsive Design ========== */
@media (max-width: 1024px) {
    .card-grid {
        grid-template-columns: repeat(2, 1fr);
        padding: 0 8%;
    }

    .features-section {
        padding: 40px 10%;
    }

    .program-details-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {

    /* Fix navbar width */
    .navbar {
        width: 100%;
    }

    .nav-container {
        width: 100%;
        max-width: 100%;
        padding: 0 15px;
    }

    .container {
        width: 100%;
        max-width: 100%;
        padding: 0 3%;
    }

    .hero {
        max-height: 600px;
        padding: 150px 0;
        margin-top: var(--header-total-height, 195px);
    }

    .hero-content {
        margin-left: 3%;
        max-width: 100%;
        padding: 30px;
    }

    .card-grid {
        grid-template-columns: 1fr;
        padding: 0 5%;
    }

    .programs-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .features-section {
        padding: 40px 5%;
    }

    .features-block {
        flex-direction: column;
    }

    .feature {
        max-width: 100%;
        margin-bottom: 35px;
    }

    .testimonial-container {
        flex-direction: column;
        gap: 20px;
        /* padding: 40px; */
    }

    .video-section > div {
        flex-direction: column !important;
        align-items: stretch !important;
    }

    .video-container {
        margin-left: 0;
        min-width: 100%;
        width: 100%;
    }

    .video-description {
        max-width: 100%;
        margin: 20px 0;
        padding: 0;
    }
}

@media (max-width: 550px) {
    h1 {
        font-size: 1.6rem;
    }

    h3 {
        font-size: 1.2rem;
    }
    
    .card-grid {
        padding: 0 3%;
    }

    .hero-content {
        padding: 30px;
        margin-left: 2%;
    }

    .hero-content h1 {
        font-size: 1.6rem;
    }

    .academics-info {
        width: 90%;
    }

    .why-title {
        font-size: 1.3rem;
    }

    .clean-table {
        font-size: 0.75rem;
    }

    .clean-table th,
    .clean-table td {
        font-size: 0.75rem;
        padding: 8px 5px;
    }

    .testimonial-container {
        padding: 20px;
        gap: 15px;
    }

    .testimonial-content h3 {
        font-size: 1rem;
    }

    .testimonial-content p {
        font-size: 0.85rem;
    }

    .feature-cards {
        padding-top: 40px;
        padding-bottom: 40px;
    }
}

/* Extra small devices (phones in portrait mode) */
@media (max-width: 480px) {

    /* Ensure full width navbar */
    .navbar,
    .nav-container,
    .container {
        width: 100%;
        max-width: 100%;
        padding-left: 2%;
        padding-right: 2%;
    }

    .hero {
        max-height: 500px;
        padding: 100px 0;
        margin-top: var(--header-total-height, 195px);
    }

    .hero-content {
        padding: 20px;
        margin-left: 1%;
    }

    .hero-content h1 {
        font-size: 1.2rem;
        line-height: 1.4;
    }

    .hero-content p {
        font-size: 0.85rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .hero-button {
        width: 100%;
        padding: 12px 20px;
        font-size: 0.9rem;
    }

    .card-grid {
        padding: 0 3%;
        gap: 15px;
    }

    .feature-cards {
        padding-top: 30px;
        padding-bottom: 30px;
    }

    .feature-card {
        padding: 20px;
    }

    .programs-grid {
        gap: 30px;
    }

    .program-item h3 {
        font-size: 1.1rem;
    }

    .features-section {
        padding: 30px 3%;
    }

    .feature-icon {
        font-size: 32px;
    }

    .feature-title {
        font-size: 0.95rem;
    }

    .feature-desc {
        font-size: 0.8rem;
    }

    .why-title {
        font-size: 1.2rem;
    }

    .why-desc {
        font-size: 0.85rem;
    }
}