* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #000000;
    background: cornsilk;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    background: linear-gradient(280deg, #888888, #000000);
    background-size: 400% 400%;
    animation: AnimationName 16s ease infinite;

    color: white;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo h2 {
    font-size: 24px;
    margin-bottom: 5px;
}

.logo p {
    font-size: 12px;
    opacity: 0.9;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 30px;
}

.nav-menu a {
    color: white;
    text-decoration: none;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: #ffd700;
}

.admin-link {
    background: white;
    color: red !important;
    padding: 5px 12px;
    border-radius: 5px;
    font-weight: bold;
}

.mobile-menu-btn {
    display: none;
    font-size: 28px;
    background: none;
    border: none;
    color: white;
    cursor: pointer;
}

/* Hero Section */
.hero {
    
    
   
    background-image: linear-gradient(280deg, #daa52082, #80000082),url('images/background.jpg');
    background-size: 400% 400%;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
  
    animation: AnimationName 16s ease infinite;
    color: white;
    padding: 120px 0 80px;
    text-align: center;
    margin-top: 70px;
}

.hero-content h1 {
    font-size: 48px;
    margin-bottom: 15px;
}

.motto {
    font-size: 24px;
    font-style: italic;
    margin-bottom: 20px;
    font-weight: 300;
}

.description {
    font-size: 18px;
    max-width: 800px;
    margin: 0 auto 30px;
}

/* Teacher Count Section */
.teacher-count-section {
      background-image: linear-gradient(280deg, #daa520ba, #800000ba),url('images/bangle.jpeg');
    background-size: 400% 400%;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;

    animation: AnimationName 16s ease infinite;
    padding: 60px 0;
    color: white;
    text-align: center;
}

.teacher-counter {
    text-align: center;
}

.counter-number {
    font-size: 80px;
    font-weight: bold;
    margin-bottom: 10px;
    animation: countUp 2s ease-out;
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.counter-label {
    font-size: 28px;
    margin-bottom: 10px;
}

.counter-description {
    font-size: 16px;
    opacity: 0.9;
}

/* Staff Section - 4 Column Grid */
.staff-section {
    padding: 60px 0;
    background: #f8f9fa;
}

.section-title {
    text-align: center;
    font-size: 36px;
    margin-bottom: 15px;
    color: maroon;
}

.section-subtitle {
    text-align: center;
    font-size: 18px;
    color: #666;
    margin-bottom: 40px;
}

.leadership-grid {
    max-width: 1200px;
    margin: 0 auto;
}

/* Principal Card */
.principal-card {
    max-width: 350px;
    height: auto;
    margin: 0 auto 50px;
    border: 3px solid #ffd700;
}

/* Deputy and Assistant Sections */
.deputy-section, 
.assistant-section {
    margin-top: 50px;
    text-align: center;
}

.subsection-title {
    font-size: 28px;
    color: maroon;
    margin: 30px 0 25px;
    text-align: center;
    padding-bottom: 10px;
    border-bottom: 2px solid gold;
    display: inline-block;
    width: auto;
}

/* Staff Grid - 4 columns on desktop */
.staff-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 20px;
}

/* Staff Card Styling */
.staff-card {
    background: white;
    border-color: maroon;
    border-style:dashed;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.staff-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.staff-image {
    height: 100px;
    height: auto;
    overflow: hidden;
    background: white;
}

.staff-image img {
    width: 70%;
    height: auto;
    
    transition: transform 0.3s ease;
}

.staff-card:hover .staff-image img {
    transform: scale(1.05);
}

.staff-info {
    padding: 15px;
    background-color: cornsilk;
}

.staff-info h3, 
.staff-info h4 {
    color: black;
    margin-bottom: 5px;
    font-size: 18px;
}

.staff-title {
    color: #667eea;
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 13px;
}

.staff-qualification {
    color: #666;
    font-size: 12px;
    margin-bottom: 8px;
}

.staff-bio {
    font-size: 12px;
    color: #555;
    line-height: 1.4;
}

/* Principal card specific */
.principal-card .staff-info h3 {
    font-size: 22px;
}

.principal-card .staff-title {
    font-size: 16px;
}

.principal-card .staff-qualification {
    font-size: 14px;
}

.principal-card .staff-bio {
    font-size: 13px;
}

/* News Section */
.royal-today {
    background: cornsilk;
    padding: 60px 0;
}

.news-tabs {
    text-align: center;
    margin-bottom: 30px;
}

.tab-btn {
    background: white;
    border: none;
    padding: 10px 25px;
    margin: 0 10px;
    cursor: pointer;
    font-size: 16px;
    border-radius: 5px;
    transition: all 0.3s;
}

.tab-btn.active {
    background: royalblue;
    color: white;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.news-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
}

.news-card:hover {
    transform: translateY(-5px);
}

.news-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-category {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 3px;
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 10px;
}

.news-category.announcement {
    background: red;
    color: white;
}

.news-category.news {
    background: green;
    color: white;
}

.news-content h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: black;
}

.news-content p {
    
    color: maroon;
}

.read-more-btn {
    background: royalblue;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    margin: 10px 0;
    transition: all 0.3s;
    font-size: 14px;
    font-weight: 600;
}

.read-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.news-date {
    color: #999;
    font-size: 12px;
    margin-top: 10px;
}

/* Modal Dialog */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: white;
    margin: 10% auto;
    padding: 0;
    width: 90%;
    max-width: 700px;
    border-radius: 15px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: slideIn 0.3s ease;
    max-height: 80%;
    overflow-y: auto;
}

@keyframes slideIn {
    from {
        transform: translateY(-100px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    background: linear-gradient(135deg, #DAA520, maroon);
    color: white;
    padding: 25px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.modal-header h2 {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    flex: 1;
    padding-right: 20px;
}

.close-modal {
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
    line-height: 1;
    padding: 0 10px;
}

.close-modal:hover {
    color: #ffd700;
    transform: scale(1.1);
}

.modal-body {
    padding: 30px;
}

.modal-date {
    color: #667eea;
    font-weight: bold;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e0e0e0;
    font-size: 14px;
}

.modal-content-text {
    line-height: 1.8;
    font-size: 16px;
    color: #333;
    text-align: justify;
}

/* Scrollbar for modal */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 10px;
}

/* Cards Grid for Academics, Clubs, Sports */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.card {
    background: 
    linear-gradient(white, white) padding-box, 
    linear-gradient(280deg, maroon, #FFD700) border-box;
  

  background-size: 400% 400%;
  animation: AnimationName 16s ease infinite;
    color: black;
    border: 4px dashed transparent; 
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s;
    text-align: center;
}


.card p {
    color:black;
    font-style: italic;
}

.card img {
    width:100%;
    border-style: dashed;
    border-color: maroon;
    border: 25px;
    border-radius: 15px;

}

.card:hover {
    transform: translateY(-5px);
}

.card h3 {
    color: maroon;
    margin-bottom: 15px;
    font-size: 22px;
}

/* History Section */
.history {
   
     background-image: linear-gradient(280deg, #daa520ba, #800000ba),url('images/backgroundpic.png');
    background-size: 400% 400%;
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;

    animation: AnimationName 16s ease infinite;
color: white;
    padding: 60px 0;
}

@keyframes AnimationName {
    0%{background-position:0% 32%}
    50%{background-position:100% 69%}
    100%{background-position:0% 32%}
}
    

.history-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.history-content p {
    font-size: 18px;
    margin-bottom: 30px;
}

.history-content a {
    background-color: gold;
    color: black;
}
.history h2, p {
    color:white;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

.btn-primary {
    background: #ffd700;
    color: #1a3a5c;
    font-weight: bold;
}

.btn-secondary {
    background: #1a3a5c;
    color: white;
}

/* Footer */
.footer {
    background: linear-gradient(280deg, #888888, #000000);
    background-size: 400% 400%;
    animation: AnimationName 16s ease infinite;

    color: white;
    padding: 40px 0 20px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-bottom: 30px;
}

.footer-section h3 {
    margin-bottom: 15px;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 10px;
}

.footer-section a {
    color: #ccc;
    text-decoration: none;
}

.footer-section a:hover {
    color: #ffd700;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 2px solid #ffffff;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .staff-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }
    
    .nav-menu {
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background: maroon;
        flex-direction: column;
        padding: 20px;
        text-align: center;
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .hero-content h1 {
        font-size: 32px;
    }
    
    .motto {
        font-size: 18px;
    }
    
    .section-title {
        font-size: 28px;
    }
    
    .subsection-title {
        font-size: 22px;
    }
    
    .counter-number {
        font-size: 50px;
    }
    
    .counter-label {
        font-size: 20px;
    }
    
    /* Staff - 2 columns on mobile */
    .staff-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 15px;
    }
    
    .staff-image {
        height: 180px;
    }
    
    .staff-info h3, 
    .staff-info h4 {
        font-size: 16px;
    }
    
    .staff-title {
        font-size: 11px;
    }
    
    .staff-qualification {
        font-size: 10px;
    }
    
    .staff-bio {
        font-size: 10px;
    }
    
    .principal-card {
        max-width: 280px;
    }
    
    .principal-card .staff-info h3 {
        font-size: 18px;
    }
    
    .principal-card .staff-title {
        font-size: 13px;
    }
    
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .cards-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 15% auto;
    }
    
    .modal-header h2 {
        font-size: 18px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-content-text {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .staff-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }
    
    .staff-image {
        height: 150px;
    }
    
    .staff-info {
        padding: 10px;
    }
    
    .staff-info h3, 
    .staff-info h4 {
        font-size: 14px;
    }
    
    .staff-title {
        font-size: 10px;
    }
    
    .staff-qualification {
        font-size: 9px;
        margin-bottom: 3px;
    }
    
    .staff-bio {
        font-size: 9px;
        display: none;
    }
}