/* =========================================
   J.P.G INTERNATIONAL SCHOOL
   Professional CBSE School Website CSS
========================================= */

/* Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #f5f7fb;
}

/* Container */
.container {
    width: 90%;
    max-width: 1200px;
    margin: auto;
}

/* Top Navigation */
nav {
    background: #003366;
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
}

nav .container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
}

nav a {
    color: #fff;
    text-decoration: none;
    font-weight: bold;
    padding: 10px 15px;
    border-radius: 5px;
    transition: 0.3s;
}

nav a:hover {
    background: #e63946;
}

/* Header / Hero */
header {
    background: linear-gradient(rgba(0,51,102,0.7), rgba(0,51,102,0.7)),
                url("school.png") center/cover no-repeat;
    color: #fff;
    text-align: center;
    padding: 100px 20px;
}

header .logo {
    width: 120px;
    margin-bottom: 20px;
}

header h1 {
    font-size: 3rem;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2rem;
}

/* Sections */
section {
    padding: 60px 20px;
    background: #fff;
    margin: 20px auto;
    border-radius: 10px;
    width: 90%;
    max-width: 1200px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
}

section h2 {
    color: #003366;
    margin-bottom: 20px;
    text-align: center;
    font-size: 2rem;
}

section p {
    margin-bottom: 15px;
    text-align: justify;
}

/* Gallery */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
}

.gallery img {
    width: 100%;
    border-radius: 10px;
    transition: transform 0.3s;
}

.gallery img:hover {
    transform: scale(1.05);
}

/* Cards */
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.card {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    border-top: 5px solid #003366;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08);
    transition: 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: #003366;
    margin-bottom: 15px;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th {
    background: #003366;
    color: #fff;
    padding: 12px;
    text-align: left;
}

table td {
    padding: 12px;
    border: 1px solid #ddd;
}

table tr:nth-child(even) {
    background: #f9f9f9;
}

/* Buttons */
button,
.btn-view,
.applybtn {
    display: inline-block;
    background: #003366;
    color: #fff;
    padding: 12px 25px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    text-decoration: none;
    font-weight: bold;
    transition: 0.3s;
}

button:hover,
.btn-view:hover,
.applybtn:hover {
    background: #e63946;
}

/* Forms */
input,
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

textarea {
    min-height: 120px;
    resize: vertical;
}

/* Footer */
footer {
    background: #003366;
    color: #fff;
    text-align: center;
    padding: 20px;
    margin-top: 30px;
}

/* Top Button */
#topBtn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #e63946;
    color: #fff;
    border: none;
    padding: 12px 15px;
    border-radius: 50%;
    cursor: pointer;
    display: none;
}

/* Dark Mode Button */
#modeBtn {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: #003366;
    color: #fff;
    border: none;
    padding: 10px 12px;
    border-radius: 50%;
    cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    nav .container {
        flex-direction: column;
        align-items: center;
    }

    section {
        width: 95%;
        padding: 40px 15px;
    }

    section h2 {
        font-size: 1.6rem;
    }
}