<?php
if ($_SERVER['REQUEST_METHOD'] === 'POST') {

    // later DB insert pannalaam
    // for now demo flow

    header("Location: /rs_lab/institution/dashboard.php");
    exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>College Registration | RS Learning Lab</title>

    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;600;700&display=swap" rel="stylesheet">

    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Inter', sans-serif;
        }

        body {
            background: radial-gradient(circle at top, #0c1a2b, #050b14);
            color: #eaf2ff;
            min-height: 100vh;
        }

        header {
            text-align: center;
            padding: 35px 0;
        }

        header img {
            height: 42px;
            margin-bottom: 10px;
        }

        header h1 {
            font-size: 30px;
            font-weight: 800;
            letter-spacing: 1px;
            background: linear-gradient(135deg, #ffffff, #7fd4ff);
            -webkit-background-clip: text;
            -webkit-text-fill-color: transparent;
        }

        .container {
            max-width: 820px;
            margin: 40px auto 80px;
            padding: 0 20px;
        }

        .card {
            background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.01));
            border-radius: 24px;
            padding: 45px;
            border: 1px solid rgba(255,255,255,0.08);
            box-shadow: 0 25px 60px rgba(0,0,0,0.6);
        }

        .card h2 {
            font-size: 28px;
            margin-bottom: 10px;
        }

        .card p {
            font-size: 15px;
            color: #b8c6de;
            margin-bottom: 35px;
            line-height: 1.6;
        }

        .form-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 22px;
        }

        .form-group {
            display: flex;
            flex-direction: column;
        }

        .form-group.full {
            grid-column: 1 / -1;
        }

        label {
            font-size: 14px;
            margin-bottom: 6px;
            color: #c7d6ef;
        }

        input, textarea, select {
            background: rgba(255,255,255,0.06);
            border: 1px solid rgba(255,255,255,0.12);
            border-radius: 10px;
            padding: 12px 14px;
            color: #eaf2ff;
            font-size: 14px;
            outline: none;
        }

        input::placeholder, textarea::placeholder {
            color: #8fa4c4;
        }

        textarea {
            resize: vertical;
            min-height: 90px;
        }

        .actions {
            margin-top: 40px;
            display: flex;
            justify-content: space-between;
            align-items: center;
            flex-wrap: wrap;
            gap: 20px;
        }

        .btn-primary {
            background: linear-gradient(135deg, #1ec9ff, #1b9cff);
            color: #00121f;
            padding: 14px 34px;
            border-radius: 12px;
            font-weight: 600;
            text-decoration: none;
            border: none;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .btn-primary:hover {
            transform: translateY(-3px);
            box-shadow: 0 14px 35px rgba(30, 201, 255, 0.45);
        }

        .back-link {
            color: #7fd4ff;
            text-decoration: none;
            font-size: 14px;
        }

        footer {
            text-align: center;
            padding: 40px 0 25px;
            font-size: 13px;
            color: #8fa4c4;
        }

        @media (max-width: 700px) {
            .form-grid {
                grid-template-columns: 1fr;
            }
        }
    </style>
</head>

<body>

<header>
    <img src="assets/logo.png" alt="RS Learning Lab Logo">
    <h1>RS Learning Lab</h1>
</header>

<div class="container">
    <div class="card">
        <h2>College Registration</h2>
        <p>
            Register your college to implement learning style diagnostics,
            practice-based challenges, and applied learning certifications.
        </p>

        <form method="post">
            <div class="form-grid">

                <div class="form-group full">
                    <label>College Name</label>
                    <input type="text" placeholder="Eg: ABC Engineering College">
                </div>

                <div class="form-group">
                    <label>City</label>
                    <input type="text" placeholder="Eg: Coimbatore">
                </div>

                <div class="form-group">
                    <label>State</label>
                    <input type="text" placeholder="Eg: Tamil Nadu">
                </div>

                <div class="form-group">
                    <label>Department / Stream</label>
                    <input type="text" placeholder="Eg: Computer Science">
                </div>

                <div class="form-group">
                    <label>Contact Person Name</label>
                    <input type="text" placeholder="Eg: Dr. Kumar">
                </div>

                <div class="form-group">
                    <label>Designation</label>
                    <input type="text" placeholder="Eg: HOD / Placement Officer">
                </div>

                <div class="form-group">
                    <label>Email Address</label>
                    <input type="email" placeholder="Eg: college@email.com">
                </div>

                <div class="form-group">
                    <label>Contact Number</label>
                    <input type="text" placeholder="Eg: 9876543210">
                </div>

                <div class="form-group full">
                    <label>Message (Optional)</label>
                    <textarea placeholder="Tell us about your academic goals or expectations"></textarea>
                </div>

            </div>

            <div class="actions">
                <a href="index.php" class="back-link">← Back to Home</a>
                <button type="submit" class="btn-primary">
                    Submit College Registration
                </button>
            </div>
        </form>
    </div>
</div>

<footer>
    © RS Learning Lab — Learning Behaviour Platform
</footer>

</body>
</html>
