/* Awards Page Styles */
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    background-color: #f5f5f5;
    overflow-x: hidden; /* Prevent horizontal scroll on body */
}

.page-wrapper {
    min-height: auto;
    background: linear-gradient(rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)), url('../images/cover.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    overflow: visible; /* Remove any overflow */
}

.content {
    position: relative;
    padding: 2rem;
    background-color: #ffffff;
    overflow: visible; /* Remove any overflow */
}
 
.container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    overflow: visible; /* Remove overflow hidden */
}

.excellence-banner {
    text-align: center;
    margin: 0 0 3rem 0;
    padding: 10px 20px;
    position: relative;
}

.excellence-banner p {
    font-size: 1.5rem;
    font-weight: 500;
    color: #000000;
    position: relative;
    display: inline-block;
    padding: 0 30px;
    margin: 0;
    font-style: italic;
}

.excellence-banner p::before,
.excellence-banner p::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 50px;
    height: 2px;
    background-color: var(--accent-primary);
}

.excellence-banner p::before {
    left: -30px;
}

.excellence-banner p::after {
    right: -30px;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    overflow: visible; /* Remove overflow hidden */
}

.section-title h1 {
    font-size: 2.5rem;
    color: #000000;
    margin: 0;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 1s ease forwards;
    display: inline-block;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.section-title h1 span {
    display: inline-block;
    animation: wavyText 2s ease-in-out infinite;
    animation-delay: calc(0.1s * var(--i));
    position: relative; /* Add this for better animation control */
}

@keyframes wavyText {
    0%, 100% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.subtitle {
    color: #444444;
    font-size: 1.2rem;
    transition: color 0.3s ease, transform 0.2s ease;
}

.subtitle:hover {
    color: #000000;
    transform: translateX(5px);
}

/* Certificate Section Styles */
.certificate-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #000000;
    position: relative;
    cursor: pointer;
    transition: color 0.3s ease;
}

/* Add the underline animation */
.certificate-info h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 3px;
    background-color: var(--accent-primary);
    transition: width 0.4s ease, background-color 0.3s ease;
}

.certificate-info h2:hover {
    color: #333333;
}

.certificate-info h2:hover::after {
    width: 270px;
    background-color: var(--accent-primary);
}

/* Alternative: If you want the animation to trigger when hovering over the entire certificate card */
.certificate-card:hover .certificate-info h2::after {
    width: 270px;
    background-color: var(--accent-primary);
}

.certification-section {
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
    overflow: visible;
}

.certification-section.reveal {
    opacity: 1;
    transform: translateY(0);
}

.certificate-card {
    display: flex;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: visible; /* Remove hidden overflow */
    transition: transform 0.3s ease;
    flex-wrap: wrap; /* Allow wrapping on smaller screens */
    width: 100%;
}

.certificate-card:hover {
    transform: translateY(-10px);
}

.certificate-image {
    flex: 0 0 40%;
    padding: 2rem;
    min-width: 300px; /* Minimum width before wrapping */
    overflow: visible; /* Remove hidden overflow */
}

.certificate-image img {
    width: 100%;
    height: auto;
    border-radius: 10px;
    transition: transform 0.3s ease;
    display: block; /* Remove any extra space */
    max-width: 100%; /* Ensure no overflow */
}

.certificate-image img:hover {
    transform: scale(1.05);
}

.certificate-info {
    flex: 1;
    padding: 2rem;
    min-width: 300px; /* Minimum width before wrapping */
    overflow: visible; /* Remove hidden overflow */
}

.certificate-info h2 {
    color: #000000;
    margin-bottom: 1.5rem;
    font-size: 2rem;
    transition: color 0.3s ease;
}

.certificate-info h2:hover {
    color: #333333;
}

.excellence-tagline {
    font-size: 1.2rem;
    color: #444444;
    margin-bottom: 1.5rem;
    font-style: italic;
    font-weight: 500;
    position: relative;
    padding-bottom: 15px;
    transition: color 0.3s ease, transform 0.3s ease;
}

.excellence-tagline:hover {
    color: #000000;
    transform: translateX(5px);
}

.excellence-tagline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 2px;
    background-color: var(--accent-primary);
    transition: width 0.4s ease;
}

.excellence-tagline:hover::after {
    width: 100%;
}

.quality-points {
    max-width: 100%; /* Ensure content doesn't overflow */
    overflow: visible; /* Remove any overflow */
}

.quality-points p {
    margin-bottom: 1rem;
    line-height: 1.6;
    color: #444444;
    white-space: normal; /* Allow text to wrap */
    word-wrap: break-word; /* Break long words if necessary */
    overflow-wrap: break-word;
    hyphens: auto;
    text-align: justify; /* Justify text for better readability */
    transition: color 0.3s ease, transform 0.2s ease;
    cursor: default;
}

.quality-points p:hover {
    color: #000000;
    transform: translateX(5px);
}

/* Awards Grid Styles */
.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
    overflow: visible; /* Remove hidden overflow */
}

.awards-grid.reveal {
    opacity: 1;
    transform: translateY(0);
}

.award-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    position: relative;
    overflow: visible; /* Remove hidden overflow */
    transition: all 0.3s ease;
}

.award-card:hover {
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
    transform: translateY(-10px);
}

.award-icon {
    font-size: 2.5rem;
    color: #444444;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
}

.award-icon i {
    transition: all 0.3s ease;
}

/* Trophy Icon - Gold Effect */
.award-card:nth-child(1):hover .award-icon i {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(108, 117, 125, 0.6),
                 0 0 20px rgba(108, 117, 125, 0.4),
                 0 0 30px rgba(108, 117, 125, 0.2);
    animation: iconPulse 1.5s infinite;
}

/* Star Icon - Blue Effect */
.award-card:nth-child(2):hover .award-icon i {
    color: #007bff;
    text-shadow: 0 0 10px rgba(0, 123, 255, 0.6),
                 0 0 20px rgba(0, 123, 255, 0.4),
                 0 0 30px rgba(0, 123, 255, 0.2);
    animation: iconPulse 1.5s infinite;
}

/* Leaf Icon - Green Effect */
.award-card:nth-child(3):hover .award-icon i {
    color: #28a745;
    text-shadow: 0 0 10px rgba(40, 167, 69, 0.6),
                 0 0 20px rgba(40, 167, 69, 0.4),
                 0 0 30px rgba(40, 167, 69, 0.2);
    animation: iconPulse 1.5s infinite;
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.award-card h3 {
    color: #000000;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    transition: color 0.3s ease;
}

.award-card h3:hover {
    color: #333333;
}

.award-card p {
    color: #444444;
    font-size: 1rem;
    transition: color 0.3s ease, transform 0.2s ease;
    cursor: default;
}

.award-card p:hover {
    color: #000000;
    transform: translateY(-2px);
}

.award-hover {
    position: absolute;
    bottom: -50px;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.8);
    padding: 1rem;
    color: white;
    transition: bottom 0.3s ease;
    overflow: visible; /* Remove hidden overflow */
}

.award-card:hover .award-hover {
    bottom: 0;
}

.learn-more {
    cursor: pointer;
    font-weight: 500;
    color: var(--accent-primary);
    transition: color 0.3s ease;
}

.learn-more:hover {
    color: #ffffff;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
    overflow: visible; /* Remove hidden overflow */
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Add extra spacing */
.awards-container {
    width: 100%;
    padding: 1rem 0;
    overflow: visible; /* Remove hidden overflow */
}

/* Responsive Design */
@media (max-width: 992px) {
    .certificate-card {
        flex-direction: column;
        overflow: visible;
    }
    
    .certificate-image,
    .certificate-info {
        flex: 0 0 100%;
        overflow: visible;
    }
    
    .content {
        padding: 1rem;
    }
    
    .container {
        padding: 0 15px;
    }
}

@media (max-width: 768px) {
    .section-title h1 {
        font-size: 2rem;
    }
    
    .awards-grid {
        grid-template-columns: 1fr;
    }
    
    .page-wrapper {
        overflow: visible;
    }
    
    body {
        overflow-x: hidden;
    }
    
    .excellence-banner p {
        font-size: 1.2rem;
        padding: 0 15px;
    }
    
    .excellence-banner p::before,
    .excellence-banner p::after {
        width: 30px;
    }
    
    .excellence-banner p::before {
        left: -20px;
    }
    
    .excellence-banner p::after {
        right: -20px;
    }
}

@media (max-width: 480px) {
  .section-title h1 {
    font-size: 1.3rem !important;
    word-break: break-word;
    padding: 0 2px;
  }
}

/* Test style to verify CSS loading */
.awards-grid .award-card {
    background: white;
    padding: 2.5rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    border: 2px solid #f0f0f0;
}

/* Updated Award Icon Styles with more specific selectors */
.awards-grid .award-card .award-icon {
    font-size: 2.5rem;
    color: #444444;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
    position: relative;
    display: inline-block;
}

.awards-grid .award-card .award-icon i {
    transition: all 0.3s ease;
}

/* Trophy Icon - Gold Effect */
.awards-grid .award-card:nth-child(1):hover .award-icon i {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(108, 117, 125, 0.6),
                 0 0 20px rgba(108, 117, 125, 0.4),
                 0 0 30px rgba(108, 117, 125, 0.2);
    animation: iconPulse 1.5s infinite;
}

/* Star Icon - Blue Effect */
.awards-grid .award-card:nth-child(2):hover .award-icon i {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(108, 117, 125, 0.6),
                 0 0 20px rgba(108, 117, 125, 0.4),
                 0 0 30px rgba(108, 117, 125, 0.2);
    animation: iconPulse 1.5s infinite;
}

/* Leaf Icon - Green Effect */
.awards-grid .award-card:nth-child(3):hover .award-icon i {
    color: var(--accent-primary);
    text-shadow: 0 0 10px rgba(108, 117, 125, 0.6),
                 0 0 20px rgba(108, 117, 125, 0.4),
                 0 0 30px rgba(108, 117, 125, 0.2);
    animation: iconPulse 1.5s infinite;
}

@keyframes iconPulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

/* Ensure default cursor for award cards and contents */
.award-card, .award-card *, .award-icon, .certificate-info p, .certificate-info div, .quality-points {
    cursor: default !important;
}

/* Additional hover effects */
.certificate-image {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.certificate-image:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.15);
}

/* --- Mobile Fix: Center Certificate Section on Awards Page --- */
@media (max-width: 768px) {
  .certification-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0 2px;
  }
  .certificate-card {
    width: 96vw !important;
    padding: 22px !important;
    box-sizing: border-box !important;
    flex-direction: column !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .certificate-image,
  .certificate-info {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .certificate-image img {
    max-width: 100% !important;
    margin-bottom: 12px !important;
    display: block;
    margin-left: auto;
    margin-right: auto;
  }
  .certificate-info {
    text-align: center;
    padding: 4px 2px !important;
    align-items: center !important;
    justify-content: center !important;
  }
  .quality-points {
    padding: 0 2px !important;
    font-size: 0.95em;
    word-break: break-word;
    text-align: center;
  }
}
