/* ===== Rainbow Color Palette ===== */
:root {
    --red: #ff8a80;
    --orange: #ffb74d;
    --yellow: #fff176;
    --green: #81c784;
    --blue: #64b5f6;
    --purple: #ba68c8;
    --dark: #2e3440;
    --light: #f9fbfd;
    --white: #ffffff;
}

/* ===== Global Reset ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", "Segoe UI", sans-serif;
}

body {
    background: linear-gradient(180deg, #ffffff, #f3faff, #fff7f9);
    color: var(--dark);
    line-height: 1.7;
}

/* ===== Header & Navigation ===== */
header {
    background: linear-gradient(
        90deg,
        var(--red),
        var(--orange),
        var(--yellow),
        var(--green),
        var(--blue),
        var(--purple)
    );
    padding: 20px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav {
    max-width: 1150px;
    margin: auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
}

.logo {
    font-size: 26px;
    font-weight: 700;
    color: white;
}

/* Desktop nav */
.nav-links {
    list-style: none;
    display: flex;
    gap: 22px;
}

.nav-links li a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    position: relative;
}

.nav-links li a::after {
    content: "";
    position: absolute;
    width: 0%;
    height: 3px;
    left: 0;
    bottom: -6px;
    background: white;
    transition: 0.3s;
}

.nav-links li a:hover::after {
    width: 100%;
}


.nav-links li a.current {
    font-weight: 700;
    text-decoration: underline;
    color: #fff;  /* or another highlight color */
}


/* Hamburger */
.menu-toggle {
    display: none;
    font-size: 28px;
    color: white;
    cursor: pointer;
}

/* ===== Hero ===== */
.hero {
    padding: 120px 20px 90px;
    text-align: center;
    background: radial-gradient(circle at top, #ffffff, #f0f8ff);
}

.hero h1 {
    font-size: 44px;
    background: linear-gradient(
        90deg,
        var(--red),
        var(--orange),
        var(--green),
        var(--blue),
        var(--purple)
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.hero p {
    max-width: 720px;
    margin: auto;
    font-size: 19px;
    color: #555;
}

/* ===== Buttons ===== */
.btn {
    display: inline-block;
    margin-top: 30px;
    padding: 14px 34px;
    background: linear-gradient(90deg, var(--red), var(--orange), var(--yellow));
    color: var(--dark);
    border-radius: 35px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.2);
}

/* ===== Layout Container ===== */
.container {
    max-width: 1150px;
    margin: auto;
    padding: 70px 20px;
}


.container-wide {
    max-width: 1600px;
}

/* ===== Cards Grid (FIXED) ===== */
.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 30px;
    justify-items: center;
}


/* ===== Card ===== */
.card {
    display: flex;
    flex-direction: column;
    align-items: center;

    background: linear-gradient(180deg, #ffffff, #fdf6ff);
    padding: 35px;
    border-radius: 22px;
    text-align: center;

    box-shadow: 0 12px 30px rgba(0,0,0,0.08);
    transition: transform 0.3s, box-shadow 0.3s;

    border-top: 6px solid;
    border-image: linear-gradient(
        90deg,
        var(--red),
        var(--orange),
        var(--green),
        var(--blue)
    ) 1;

    width: 100%;
    max-width: 320px;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 40px rgba(0,0,0,0.15);
}

.card h3 {
    margin-bottom: 15px;
    font-size: 22px;
    background: linear-gradient(90deg, var(--purple), var(--blue));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.card p {
    color: #555;
}

/* ===== Forms ===== */
form {
    background: linear-gradient(180deg, #ffffff, #f4faff);
    padding: 35px;
    border-radius: 25px;
    max-width: 620px;
    margin: auto;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

form input,
form textarea {
    width: 100%;
    padding: 14px;
    margin-bottom: 16px;
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    font-size: 15px;
}

form input:focus,
form textarea:focus {
    outline: none;
    border-color: var(--blue);
}

form button {
    background: linear-gradient(90deg, var(--green), var(--blue), var(--purple));
    color: white;
    border: none;
    padding: 14px;
    width: 100%;
    border-radius: 30px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
}

/* ===== Footer ===== */
footer {
    background: linear-gradient(90deg, var(--purple), var(--blue), var(--green));
    color: white;
    text-align: center;
    padding: 28px;
    margin-top: 50px;
}

/* ===== Mobile Nav ===== */
@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background: linear-gradient(
            90deg,
            var(--red),
            var(--orange),
            var(--yellow),
            var(--green),
            var(--blue),
            var(--purple)
        );
    }

    .nav-links.active {
        display: flex;
    }

    .nav-links li {
        text-align: center;
        padding: 15px 0;
        border-bottom: 1px solid rgba(255,255,255,0.25);
    }

    nav {
        flex-direction: row;
    }
}


/* New Css code for the front pages */

/* Modal Overlay Background */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 9999;
    backdrop-filter: blur(8px);
}

/* Modal Main Container */
.modal-content {
    background: #ffffff;
    width: 90%;
    max-width: 800px;
    height: auto;
    max-height: 85vh; /* Limits height to 85% of screen */
    margin: 5vh auto;
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Important for the sticky header */
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}

/* Sticky Header (Title + X button) */
.modal-header {
    padding: 20px 40px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
}

.modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.close-view {
    font-size: 30px;
    cursor: pointer;
    color: #888;
    transition: 0.3s;
}

.close-view:hover {
    color: #000;
}

/* Scrollable Body */
.modal-body {
    padding: 40px;
    overflow-y: auto; /* This enables the scrollbar */
    line-height: 1.7;
    color: #444;
}

/* Formatting for long text inside modal */
.modal-body h3 {
    margin-top: 25px;
    color: #222;
}

.modal-body p {
    margin-bottom: 15px;
}

.modal-body ul {
    margin-bottom: 20px;
    padding-left: 20px;
}

.modal-body li {
    margin-bottom: 10px;
}

/* Responsive adjust for mobile */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 2vh auto;
    }
    .modal-body {
        padding: 20px;
    }
}

