/* =========================================
   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;
}

/* =========================================
   NAVIGATION BAR (DESKTOP & MOBILE)
========================================= */
nav {
    background: #003366;
    padding: 15px 30px;
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================
   HEADER LOGO FIX (Shrinks the huge logo)
========================================= */
header .logo {
    width: 120px;          /* Sets a neat width */
    height: 120px;         /* Sets height */
    object-fit: contain;   /* Prevents image stretching */
    margin-bottom: 15px;
    border-radius: 50%;    /* Makes circular logos look sharp */
}

/* =========================================
   NAVBAR FULL WIDTH & RESPONSIVE FIX
========================================= */
nav {
    background: #003366;
    width: 100%;                  /* ಪೂರ್ಣ ಅಗಲ ಪಡೆಯಲು */
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

/* ಸ್ಕೂಲ್ ಹೆಸರು ತಿಳಿ ಬಿಳಿ ಬಣ್ಣದಲ್ಲಿ ಸ್ಪಷ್ಟವಾಗಿ ಕಾಣಲು */
nav .logo {
    color: #ffffff !important;   
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
    white-space: nowrap;
}

/* ಹ್ಯಾಂಬರ್ಗರ್ (☰) ಬಟನ್ ಅಲೈನ್ಮೆಂಟ್ */
.menu-btn {
    display: none;
    background: none;
    border: none;
    color: #ffffff;
    font-size: 26px;
    cursor: pointer;
    padding: 0 5px;
}

/* ಡೆಸ್ಕ್‌ಟಾಪ್ ಮೆನು */
nav ul {
    display: flex;
    list-style: none;
    gap: 15px;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: bold;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: 0.3s;
}

nav ul li a:hover {
    background: #e63946;
}

/* =========================================
   MOBILE VIEW (max-width: 768px)
========================================= */
@media (max-width: 768px) {
    .menu-btn {
        display: block;          /* ಮೊಬೈಲ್‌ನಲ್ಲಿ ಬಟನ್ ತೋರಲು */
    }

    nav ul {
        display: none;          /* ಮೆನು ಲಿಂಕ್ ಅಡಗಿಸಲು */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #003366;
        flex-direction: column;
        text-align: center;
        padding: 15px 0;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    }

    nav ul li {
        padding: 10px 0;
    }

    /* JavaScript Toggle ಆದಾಗ ಮೆನು ಕಾಣಿಸಲು */
    nav ul.active {
        display: flex;
    }
}

/* 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;
}

/* =========================================
   MOBILE VIEW RESPONSIVE (max-width: 768px)
========================================= */
@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    section {
        width: 95%;
        padding: 40px 15px;
    }

    section h2 {
        font-size: 1.6rem;
    }

    /* Hamburger Button Display on Mobile */
    .menu-btn {
        display: block;
    }

    /* Hide Navigation Links by Default in Mobile */
    nav ul {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: #003366;
        flex-direction: column;
        text-align: center;
        padding: 15px 0;
        box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    }

    nav ul li {
        padding: 10px 0;
    }

    /* JS ಕ್ಲಿಕ್ ಮಾಡಿದಾಗ ಮೆನು ಕಾಣಿಸಿಕೊಳ್ಳಲು */
    nav ul.active {
        display: flex;
    }
}

/* ================= SLIDER ================= */
.slider {
    width: 100%;
    height: 500px;
    overflow: hidden;
}

.slider img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    transition: 1s;
}
/* Principal & Chairman Images Fix for Mobile */
.card img, 
section img {
    max-width: 100%;
    height: auto;
    object-fit: contain; /* ಇಮೇಜ್ ಜೂಮ್ ಅಥವಾ ಸ್ಟ್ರೆಚ್ ಆಗುವುದನ್ನು ತಡೆಯುತ್ತದೆ */
    border-radius: 10px;
}

/* Mobile View (768px ಗಿಂತ ಕಡಿಮೆ ಇದ್ದಾಗ) */
@media (max-width: 768px) {
    .card img,
    .principal-img, 
    .chairman-img {
        width: 180px;         /* ಮೊಬೈಲ್‌ನಲ್ಲಿ ಸೂಕ್ತವಾದ ಅಗಲ */
        height: 180px;        /* ಸೂಕ್ತವಾದ ಎತ್ತರ */
        object-fit: cover;    /* ಫೋಟೋ ಸರಿಯಾಗಿ ಸೆಟ್ ಆಗಲು */
        display: block;
        margin: 0 auto 15px;  /* ಸೆಂಟರ್ ಮಾಡಲು */
        border-radius: 50%;   /* ರೌಂಡ್ ಶೇಪ್‌ಗಾಗಿ (ನಿಮಗೆ ಚೌಕ ಬೇಕಿದ್ದರೆ ಇದನ್ನು ತೆಗೆಯಬಹುದು) */
    }
}
/* =========================================
   MANDATORY PUBLIC DISCLOSURE & TABLES CSS
========================================= */

/* Section Outer Styling */
#Admission-From-Download,
#mandatory-public-disclosure,
#website-information {
    padding: 30px 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title h2,
#mandatory-public-disclosure h2,
#website-information h2 {
    color: #003366;
    text-align: center;
    margin-bottom: 25px;
    font-size: 24px;
    text-transform: uppercase;
    border-bottom: 3px solid #e63946;
    display: inline-block;
    padding-bottom: 5px;
}

.mpd-section {
    background: #ffffff;
    padding: 20px;
    margin-bottom: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
}

.mpd-section h3 {
    color: #003366;
    margin-bottom: 15px;
    font-size: 18px;
    border-left: 4px solid #003366;
    padding-left: 10px;
}

/* =========================================
   TABLE MOBILE RESPONSIVE FIX (KEY FIX)
========================================= */
.table-responsive {
    width: 100%;
    overflow-x: auto; /* ಮೊಬೈಲ್‌ನಲ್ಲಿ ಸ್ಕ್ರಾಲ್ ಆಗಲು ಸಹಾಯ ಮಾಡುತ್ತದೆ */
    -webkit-overflow-scrolling: touch;
    margin-top: 15px;
    margin-bottom: 15px;
}

/* Table Styling */
.mpd-table, 
#website-information table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px; /* ಮೊಬೈಲ್‌ನಲ್ಲಿ ಕಟ್ ಆಗದೆ ಸ್ಕ್ರಾಲ್ ಮಾಡಲು ಸಹಾಯ ಮಾಡುತ್ತದೆ */
    background-color: #fff;
}

.mpd-table th, 
.mpd-table td,
#website-information th,
#website-information td {
    border: 1px solid #dddddd;
    padding: 12px 15px;
    text-align: left;
    font-size: 14px;
    color: #333333;
}

.mpd-table th, 
#website-information th {
    background-color: #003366;
    color: #ffffff;
    font-weight: bold;
    text-transform: uppercase;
}

.mpd-table tr:nth-child(even),
#website-information tr:nth-child(even) {
    background-color: #f9f9f9;
}

.mpd-table tr:hover,
#website-information tr:hover {
    background-color: #f1f1f1;
}

/* =========================================
   BUTTONS STYLING (View PDF / Download)
========================================= */
.btn-view, 
#Admission-From-Download button {
    display: inline-block;
    background-color: #e63946;
    color: #ffffff !important;
    padding: 8px 16px;
    text-decoration: none;
    border-radius: 4px;
    font-weight: bold;
    font-size: 13px;
    border: none;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
}

.btn-view:hover, 
#Admission-From-Download button:hover {
    background-color: #c1121f;
}

/* Note Box Styling */
.note-box {
    background: #fff3cd;
    border-left: 5px solid #ffc107;
    padding: 15px;
    margin-top: 20px;
    font-size: 13px;
    color: #856404;
    border-radius: 4px;
    line-height: 1.5;
}

/* =========================================
   MOBILE VIEW ADJUSTMENTS (max-width: 768px)
========================================= */
@media (max-width: 768px) {
    #Admission-From-Download,
    #mandatory-public-disclosure,
    #website-information {
        padding: 15px 10px;
    }

    .mpd-section {
        padding: 12px;
    }

    .section-title h2,
    #mandatory-public-disclosure h2,
    #website-information h2 {
        font-size: 18px;
    }

    .mpd-section h3 {
        font-size: 15px;
    }

    .mpd-table th, 
    .mpd-table td,
    #website-information th,
    #website-information td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .btn-view {
        padding: 6px 10px;
        font-size: 11px;
    }
}
/* ERP Login Button Design */
.portal-login-btn {
    background-color: #ffc107; /* ಹಳದಿ ಬಣ್ಣದ ಬಟನ್ */
    color: #003366 !important; /* ಡಾರ್ಕ್ ಬ್ಲೂ ಅಕ್ಷರಗಳು */
    padding: 6px 14px !important;
    border-radius: 20px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.portal-login-btn:hover {
    background-color: #e0a800; /* ಮೌಸ್ ತಂದಾಗ ಬಣ್ಣ ಬದಲಾವಣೆ */
}

/* =========================================
   Animated 3D School Background
   - Layered SVG/shape floats with subtle parallax
   - Use the class `animated-3d-bg` on body or a container
========================================= */
.animated-3d-bg {
    position: relative;
    overflow: hidden;
    perspective: 1000px;
    background: linear-gradient(180deg,#e6f0ff 0%, #f5f7fb 50%);
}
.animated-3d-bg::before,
.animated-3d-bg::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    transform: translateX(-50%);
    width: 160%;
    height: 420px;
    pointer-events: none;
    background-repeat: no-repeat;
    background-position: center top;
    will-change: transform, filter, opacity;
}

/* distant soft clouds layer */
.animated-3d-bg::before {
    background-image: radial-gradient(rgba(255,255,255,0.9) 10%, rgba(255,255,255,0.6) 30%, transparent 60%),
                      radial-gradient(rgba(255,255,255,0.85) 8%, rgba(255,255,255,0.5) 28%, transparent 55%);
    opacity: 0.95;
    top: -40px;
    filter: blur(14px) saturate(1.05);
    animation: cloudDrift 28s linear infinite;
    transform-origin: 50% 50% translateZ(-200px);
}

/* foreground school silhouette */
.animated-3d-bg::after {
    height: 380px;
    bottom: auto;
    top: 40px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 400"><defs><linearGradient id="g" x1="0" x2="0" y1="0" y2="1"><stop offset="0" stop-color="%23f8fafc"/><stop offset="1" stop-color="%23e6eefb"/></linearGradient></defs><g fill="none"><rect width="1200" height="400" fill="url(%23g)"/></g><g transform="translate(60,60)" fill="%23003366"><rect x="220" y="120" width="280" height="160" rx="6"/><rect x="260" y="40" width="200" height="100" rx="6" fill="%23214752"/><rect x="100" y="160" width="80" height="120" rx="4"/><rect x="540" y="160" width="80" height="120" rx="4"/><rect x="420" y="140" width="40" height="40" rx="4"/><rect x="320" y="140" width="40" height="40" rx="4"/></g></svg>');
    background-size: contain;
    background-position: center bottom;
    opacity: 0.95;
    transform-origin: 50% 50% translateZ(0);
    animation: schoolSway 12s ease-in-out infinite;
}

/* small floating elements (trees, birds) */
.animated-3d-bg .float-layer {
    position: absolute;
    bottom: 8%;
    left: 6%;
    width: 220px;
    height: 140px;
    pointer-events: none;
    transform-style: preserve-3d;
    will-change: transform, opacity;
}
.animated-3d-bg .float-layer img { width: 100%; height: auto; display:block; }
.animated-3d-bg .float-layer.birds { left: auto; right: 6%; bottom: 60%; width: 160px; opacity: .85; animation: floatUp 10s linear infinite; }
.animated-3d-bg .float-layer.tree { left: 8%; bottom: 6%; width: 140px; opacity: .95; animation: floatY 14s ease-in-out infinite; }

@keyframes cloudDrift {
    0% { transform: translateX(-10%) translateY(0) scale(1) }
    50% { transform: translateX(10%) translateY(6px) scale(1.02) }
    100% { transform: translateX(-10%) translateY(0) scale(1) }
}

@keyframes schoolSway {
    0% { transform: translateY(0) rotateX(0deg) }
    50% { transform: translateY(6px) rotateX(1deg) }
    100% { transform: translateY(0) rotateX(0deg) }
}

@keyframes floatY {
    0% { transform: translateY(0) }
    50% { transform: translateY(-8px) }
    100% { transform: translateY(0) }
}

@keyframes floatUp {
    0% { transform: translateY(0) translateX(0) }
    50% { transform: translateY(-12px) translateX(-8px) }
    100% { transform: translateY(0) translateX(0) }
}

/* make sure content sits above background */
.animated-3d-bg > .container, .animated-3d-bg header, .animated-3d-bg section {
    position: relative; z-index: 5;
}
