/* ========= GLOBAL ========= */
* { box-sizing: border-box; }
body { font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; overflow-x: hidden; }
img { max-width: 100%; height: auto; }
.section-heading { position: relative; display: inline-block; padding-bottom: 12px; font-size: 2rem; margin-bottom: 2.5rem !important; }
.section-heading::after { content:''; position:absolute; bottom:0; left:50%; transform:translateX(-50%); width:60px; height:3px; background:#461ef7; }
@media (max-width: 768px) {
  .section-heading { font-size: 1.5rem; }
  section { padding-top: 3rem !important; padding-bottom: 3rem !important; }
}
@media (max-width: 576px) {
  .section-heading { font-size: 1.25rem; }
  .navbar-brand { font-size: 0.95rem !important; }
  h4 { font-size: 1.05rem; }
  h5 { font-size: 0.95rem; }
  h6 { font-size: 0.9rem; }
  blockquote { font-size: 0.95rem; padding-left: 15px; }
  .card-body { padding: 0.75rem; }
}

/* ========= CAROUSEL ========= */
.hero-carousel { height: 100vh; min-height: 500px; position: relative; }
.carousel-item { height: 100%; min-height: 500px; position: relative; }
.carousel-item img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.carousel-caption { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 2; bottom: auto; }
.carousel-caption h1 { font-size: 3.5rem; font-weight: 700; text-shadow: 2px 2px 4px rgba(0,0,0,0.9); color: #fff; }
.carousel-caption p { font-size: 1.25rem; text-shadow: 1px 1px 2px rgba(0,0,0,0.9); color: #fff; }
.carousel-control-prev, .carousel-control-next { opacity: 0.85; width: 8%; transition: opacity 0.3s; }
.carousel-control-prev:hover, .carousel-control-next:hover { opacity: 1; }
.carousel-control-prev-icon, .carousel-control-next-icon { width: 3.5rem; height: 3.5rem; background-size: 3.5rem 3.5rem; filter: drop-shadow(0 0 6px rgba(0,0,0,0.7)); }
@media (max-width: 768px) {
  .hero-carousel { height: 60vh; min-height: 400px; }
  .carousel-item { min-height: 400px; }
  .carousel-item img { position: absolute; inset: 0; }
  .carousel-caption h1 { font-size: 1.8rem; }
  .carousel-caption p { font-size: 0.95rem; }
  .carousel-caption { width: 85%; left: 50%; }
  .carousel-control-prev, .carousel-control-next { width: 10%; opacity: 0.8; }
  .carousel-control-prev-icon, .carousel-control-next-icon { width: 2.4rem; height: 2.4rem; background-size: 2.4rem 2.4rem; }
}
@media (max-width: 576px) {
  .hero-carousel { height: 50vh; min-height: 320px; }
  .carousel-item { min-height: 320px; }
  .carousel-caption { width: 88%; }
  .carousel-item img { position: absolute; inset: 0; }
  .carousel-caption h1 { font-size: 1.3rem; line-height: 1.2; }
  .carousel-caption p { font-size: 0.8rem; line-height: 1.3; }
  .carousel-caption { top: 40%; }
  .carousel-control-prev, .carousel-control-next { width: 12%; opacity: 0.75; }
  .carousel-control-prev-icon, .carousel-control-next-icon { width: 2rem; height: 2rem; background-size: 2rem 2rem; }
}

/* ========= PRINCIPAL ========= */
.principal-img { max-width: 220px; aspect-ratio: 1/1; object-fit: cover; border: 5px solid #fff; }
blockquote { border-left: 4px solid #0d6efd; padding-left: 20px; font-size: 1.1rem; color: #333; font-style: italic; }

/* ========= AWARDS ========= */
.award-card { transition: transform 0.3s, box-shadow 0.3s; border: none; overflow: hidden; }
.award-card:hover { transform: translateY(-5px); box-shadow: 0 10px 30px rgba(0,0,0,0.15); }
.award-img-wrapper { aspect-ratio: 16/10; overflow: hidden; }
.award-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }

/* ========= GALLERY ========= */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1rem; }
.news-grid-item { aspect-ratio: 4/3; overflow: hidden; border-radius: 4px; border: 1px solid #e9ecef; transition: transform 0.2s ease, box-shadow 0.2s ease; }
.news-grid-item:hover { transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.08); }
.news-grid-item img { width: 100%; height: 100%; object-fit: cover; cursor: pointer; transition: opacity 0.2s ease; }
.news-grid-item:hover img { opacity: 0.85; }
@media (max-width: 576px) {
  .news-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.75rem; }
  .news-grid-item { aspect-ratio: 1/1; }
}

/* ========= MANAGEMENT ========= */
.management-card { border: none; transition: transform 0.3s, box-shadow 0.3s; overflow: hidden; }
.management-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.12); }
.management-img-wrapper { aspect-ratio: 16/10; overflow: hidden; }
.management-img-wrapper img { width: 100%; height: 100%; object-fit: cover; }
.notice-board { background: #fff; }

/* ========= NOTICES ========= */
.notice-item { padding: 15px 0; }
.notice-item:last-child { border-bottom: none !important; }
@media (max-width: 576px) {
  .notice-item .d-flex { flex-wrap: wrap; gap: 8px; }
  .notice-item .badge { align-self: flex-start; }
}

/* ========= CORE VALUES ========= */
.value-card { border: none; transition: transform 0.3s, box-shadow 0.3s; }
.value-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.value-icon { font-size: 2.5rem; color: #0d6efd; }

/* ========= ALUMNI ========= */
.alumni-card { border: none; transition: transform 0.3s, box-shadow 0.3s; }
.alumni-card:hover { transform: translateY(-5px); box-shadow: 0 8px 25px rgba(0,0,0,0.1); }
.alumni-img { max-width: 120px; aspect-ratio: 1/1; object-fit: cover; border-radius: 50%; }

/* ========= CONTACT ========= */
.contact-info-box { background: #fff; border-radius: 10px; }
.map-wrapper { position: relative; width: 100%; aspect-ratio: 16/10; overflow: hidden; border-radius: 10px; }
.map-wrapper iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; max-width: 100% !important; border: 0; }
.map-wrapper > div { position: relative; width: 100%; height: 100%; }
.map-wrapper > div > div { position: relative; width: 100%; }
.map-placeholder { border-radius: 10px; min-height: 400px; display: flex; align-items: center; justify-content: center; }
@media (max-width: 992px) {
  .map-wrapper { aspect-ratio: 4/3; }
  .map-placeholder { min-height: 300px; }
}
@media (max-width: 576px) {
  .map-wrapper { aspect-ratio: 4/3; }
  .map-placeholder { min-height: 220px; }
  .contact-info-box { margin-bottom: 1.5rem; }
}

/* ========= FOOTER ========= */
.site-footer { background: #1a1a2e; color: #ccc; padding: 50px 0 25px; margin-top: 50px; }
.site-footer h5 { color: #fff; font-weight: 600; margin-bottom: 20px; font-size: 1.1rem; }
.site-footer p { color: #aaa; margin-bottom: 10px; }
.site-footer a { color: #aaa; text-decoration: none; transition: color 0.3s; }
.site-footer a:hover { color: #fff; }
.site-footer .list-unstyled li { margin-bottom: 8px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 35px; }
.footer-bottom { border-top: 1px solid #333; margin-top: 30px; padding-top: 20px; text-align: center; font-size: 14px; color: #888; }
.footer-bottom p { margin-bottom: 0; }
@media (max-width: 768px) {
  .site-footer { padding: 35px 0 20px; }
  .footer-grid { grid-template-columns: 1fr; gap: 25px; }
}
@media (max-width: 576px) {
  .site-footer { padding: 25px 0 15px; }
  .footer-grid { gap: 20px; }
}

/* ========= DONATION ========= */
.donation-qr { max-width: 280px; width: 100%; height: auto; border: 2px solid #ddd; border-radius: 8px; }

/* ========= WHATSAPP FLOAT ========= */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    color: #fff;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    z-index: 99999 !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    padding: 0;
    animation: floatIdle 3s ease-in-out infinite;
}
.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: #fff;
    pointer-events: none;
}
.whatsapp-float:hover {
    transform: scale(1.1);
    animation-play-state: paused;
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}
@keyframes floatIdle {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}
@keyframes floatBounce {
    0% { transform: translateY(0); }
    30% { transform: translateY(-18px); }
    60% { transform: translateY(-6px); }
    100% { transform: translateY(0); }
}
.whatsapp-float.bouncing {
    animation: floatBounce 0.7s ease-in-out;
}
@media (max-width: 576px) {
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    .whatsapp-float svg {
        width: 26px;
        height: 26px;
    }
}

/* ========= MOBILE SAFETY OVERRIDES ========= */
@media (max-width: 576px) {
  .container { padding-left: 1rem; padding-right: 1rem; }
  .card { margin-bottom: 1rem; }
  .row { margin-left: -0.5rem; margin-right: -0.5rem; }
  .row > [class*='col-'] { padding-left: 0.5rem; padding-right: 0.5rem; }
  .g-3 { gap: 0.75rem !important; }
  .g-4 { gap: 1rem !important; }
  .py-5 { padding-top: 2rem !important; padding-bottom: 2rem !important; }
  .mb-5 { margin-bottom: 2rem !important; }
  .p-4 { padding: 1rem !important; }
  .p-5 { padding: 1.25rem !important; }
}

@media (max-width: 400px) {
  .section-heading { font-size: 1.1rem !important; }
  h4 { font-size: 1rem !important; }
  .carousel-caption h1 { font-size: 1.1rem !important; }
  .carousel-caption p { font-size: 0.75rem !important; }
}
