/* ==========================================================================
   RULES FOR STUDENTS - FLAT MODERN GRID (CLEAN UI)
   ========================================================================== */

/* Banner Styles */
.inner-banner { background: linear-gradient(rgba(10, 37, 64, 0.8), rgba(10, 37, 64, 0.8)), url('images/slide-1.jpg') center/cover fixed; position: relative; padding: 180px 0 100px; text-align: center; color: #fff; overflow: hidden; }
.rules-banner { background: linear-gradient(rgba(10, 37, 64, 0.85), rgba(10, 37, 64, 0.85)), url(https://www.mmgs.edu.in/images/slide-1.jpg) center/cover fixed !important; }
.inner-banner .banner-content { position: relative; z-index: 2; animation: slideUpFade 0.8s ease; }
.inner-banner h1 { font-family: var(--font-head); font-size: 55px; font-weight: 800; margin-bottom: 15px; }
.breadcrumb { display: inline-flex; align-items: center; gap: 15px; background: rgba(255, 255, 255, 0.1); padding: 10px 25px; border-radius: 30px; backdrop-filter: blur(10px); font-weight: 600; }
.breadcrumb a { color: #fff; transition: 0.3s; }
.breadcrumb a:hover, .breadcrumb .current { color: var(--accent); }
.banner-shape { position: absolute; bottom: -1px; left: 0; width: 100%; height: 100px; z-index: 1; }
.banner-shape svg { width: 100%; height: 100%; }

@keyframes slideUpFade { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }


/* Main Section Light Background */
body { background-color: #f9fafb; } /* Very light modern gray */
.modern-rules-section { padding: 80px 0 100px; }

/* Intro */
.page-intro { max-width: 800px; margin: 0 auto; }
.page-intro h2 { font-size: 40px; font-family: var(--font-head); color: var(--primary); font-weight: 800; margin: 0; }
.page-intro h2 span { color: var(--accent); }
.ornate-divider { display: flex; align-items: center; justify-content: center; margin-top: 15px; gap: 15px; }
.ornate-divider::before, .ornate-divider::after { content: ''; width: 60px; height: 3px; background: linear-gradient(90deg, transparent, var(--accent)); border-radius: 5px; }
.ornate-divider::after { background: linear-gradient(270deg, transparent, var(--accent)); }
.ornate-divider i { font-size: 24px; color: var(--primary); }
.intro-desc { font-size: 16px; color: var(--text-light); line-height: 1.6; }

/* Flat Grid Container */
.flat-grid-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    max-width: 1200px;
    margin: 60px auto 0;
}

/* Flat Rule Card - Modern Upgraded */
.flat-rule-card {
    background-color: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 35px 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.04);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.flat-rule-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0;
    width: 100%; height: 4px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
    z-index: -1;
}
.flat-rule-card:hover {
    box-shadow: 0 15px 35px rgba(0,0,0,0.08);
    transform: translateY(-8px);
}
.flat-rule-card:hover::after {
    transform: scaleX(1);
}

/* Card Header */
.flat-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.flat-icon {
    width: 55px;
    height: 55px;
    background-color: #f0f9ff;
    color: var(--primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    transition: 0.3s;
}
.flat-rule-card:hover .flat-icon {
    background-color: var(--primary);
    color: #fff;
    transform: rotateY(180deg);
}

.flat-num {
    background-color: #f8fafc;
    color: var(--text-light);
    font-family: var(--font-head);
    font-size: 14px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 8px 15px;
    border-radius: 30px;
    border: 1px solid #e2e8f0;
}

/* Card Body */
.flat-card-body p {
    font-size: 15px;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 12px;
}
.flat-card-body p:last-child {
    margin-bottom: 0;
}

/* Specific Card Styles */
.border-danger {
    box-shadow: 0 4px 20px rgba(239,68,68,0.05);
}
.border-danger::after {
    background: #ef4444;
}
.text-danger {
    color: #ef4444 !important;
    background-color: #fef2f2 !important;
}
.bg-danger-light {
    background-color: #fef2f2 !important;
    color: #ef4444 !important;
    border-color: #fecaca;
}
.border-danger:hover .flat-icon {
    background-color: #ef4444 !important;
}

/* Remove centered-last as we have 9 items */

/* Responsive */
@media (max-width: 992px) {
    .flat-grid-container {
        grid-template-columns: repeat(2, 1fr);
    }
    .centered-last {
        grid-column: auto;
    }
}
@media (max-width: 768px) {
    .flat-grid-container {
        grid-template-columns: 1fr;
    }
    .page-intro h2 { font-size: 32px; }
}
