/* ========== RESPONSIVE DESIGN - MEDIA QUERIES ========== */

/* ========== TABLET & MEDIUM DEVICES (768px and below) ========== */
@media (max-width: 768px) {
    /* ===== NAVBAR STYLES ===== */
    .navbar-container {
        padding: 1rem 1.5rem;
    }

    .navbar-menu {
        /* Hide menu by default on mobile */
        display: none;
        position: absolute;
        top: 70px;
        left: 0;
        right: 0;
        background-color: #fff;
        flex-direction: column;
        gap: 0;
        align-items: stretch;
        width: 100%;
        box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
        border-top: 1px solid #eee;
        z-index: 999;
        animation: slideDown 0.3s ease-out;
    }

    /* Show menu when active */
    .navbar-menu.active {
        display: flex;
    }

    .navbar-link {
        display: block;
        padding: 1rem 1.5rem;
        color: #333;
        text-decoration: none;
        font-weight: 500;
        border-bottom: 1px solid #eee;
        transition: all 0.3s ease;
    }

    .navbar-link:last-child {
        border-bottom: none;
    }

    .navbar-link:hover {
        background-color: #f5f5f5;
        color: #667eea;
    }

    .navbar-link.active {
        background-color: #f0f0f0;
        color: #667eea;
    }

    /* Remove the underline animation for mobile */
    .navbar-link::after {
        display: none;
    }

    .navbar-toggle {
        display: flex;
        flex-direction: column;
        cursor: pointer;
        gap: 5px;
    }

    .navbar-toggle span {
        width: 25px;
        height: 3px;
        background-color: #333;
        transition: all 0.3s ease;
        border-radius: 2px;
    }

    /* Hamburger animation */
    .navbar-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .navbar-toggle.active span:nth-child(2) {
        opacity: 0;
        transform: translateX(-10px);
    }

    .navbar-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    /* ===== HERO SECTION ===== */
    .hero {
        padding: 3rem 1rem;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .hero-content p {
        font-size: 1rem;
    }

    /* ===== MAIN CONTENT SECTIONS ===== */
    .home-section,
    .about-section {
        padding: 3rem 1.5rem;
    }

    .home-block,
    .section-content,
    .founder-container,
    .project-profile-container,
    .contact-container {
        grid-template-columns: 1fr;
    }

    .home-block.reverse .home-image,
    .home-block.reverse .home-text {
        order: auto;
    }

    .home-image,
    .section-image,
    .founder-image {
        margin-top: 2rem;
        min-height: 300px;
    }

    .home-photo {
        max-height: 400px;
    }

    .founder-photo {
        max-height: 400px;
    }

    /* Project Profile Section */
    .project-image-container {
        height: 350px;
    }

    .project-info h2 {
        font-size: 1.5rem;
    }

    .full-width-photo {
        height: 350px;
    }

    .full-width-image {
        max-height: 350px;
        object-fit: contain;
    }

    .home-text h2,
    .section-text h2,
    .founder-text h2 {
        font-size: 1.8rem;
        margin-bottom: 1.5rem;
    }

    .home-text p,
    .section-text p {
        font-size: 0.95rem;
        line-height: 1.7;
    }

    /* ===== PROJECTS SECTION ===== */
    .projects-section {
        padding: 3rem 1.5rem;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .project-card {
        height: 250px;
    }

    .project-name {
        font-size: 1.3rem;
    }

    /* ===== PROJECT DETAIL PAGE ===== */
    .project-detail-section {
        padding: 2rem 1.5rem;
    }

    .project-title {
        font-size: 2rem;
        margin-bottom: 2rem;
    }

    .main-image-container {
        min-height: 300px;
        max-height: 500px;
    }

    .main-display-image {
        max-height: 500px;
    }

    .thumbnail-gallery {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 0.75rem;
    }

    .thumbnail {
        height: 120px;
    }

    /* ===== AWARD DETAIL PAGE ===== */
    .award-detail-image-wrapper {
        margin-bottom: 2rem;
    }

    .award-detail-main-image {
        min-height: 250px;
        max-height: 400px;
    }

    .award-detail-photo {
        max-height: 400px;
    }

    .award-detail-info {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .award-detail-card {
        padding: 1.5rem;
    }

    /* ===== AWARDS PAGE ===== */
    .awards-section {
        padding: 3rem 1.5rem;
    }

    .awards-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .award-image {
        height: 250px;
    }

    .award-content {
        padding: 1.5rem;
    }

    .award-card h3 {
        font-size: 1.3rem;
    }

    .award-description {
        font-size: 0.95rem;
    }

    .highlights-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .highlight-item {
        padding: 1.5rem;
    }

    /* ===== CONTACT SECTION ===== */
    .contact-section {
        padding: 3rem 1.5rem;
    }

    .contact-form {
        max-width: 100%;
    }

    .form-group {
        margin-bottom: 1.5rem;
    }

    .form-group input,
    .form-group textarea {
        font-size: 1rem;
        padding: 0.75rem;
    }

    /* ===== FOOTER ===== */
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }

    .footer-section:nth-child(1) {
        grid-column: 1 / -1;
    }

    /* ===== ANIMATIONS ===== */
    @keyframes slideDown {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* ===== IMAGE SLIDERS ===== */
    .image-nav-arrow {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }
}

/* ========== SMALL DEVICES (480px and below) ========== */
@media (max-width: 480px) {
    /* ===== NAVBAR STYLES ===== */
    .navbar-container {
        padding: 0.75rem 1rem;
    }

    .navbar-logo a {
        font-size: 1.2rem;
    }

    .navbar-logo img {
        height: 32px;
    }

    .navbar-menu {
        top: 60px;
    }

    .navbar-link {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }

    .navbar-toggle span {
        width: 22px;
        height: 2.5px;
        margin: 4px 0;
    }

    /* ===== HERO SECTION ===== */
    .hero {
        padding: 2rem 1rem;
        min-height: 100vh;
    }

    .hero-content {
        padding: 2rem 0;
    }

    .hero-content h1 {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }

    .hero-content p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .cta-button {
        padding: 0.6rem 1.5rem;
        font-size: 0.9rem;
    }

    /* ===== MAIN CONTENT SECTIONS ===== */
    .home-section,
    .about-section,
    .projects-section,
    .awards-section,
    .contact-section {
        padding: 2rem 1rem;
    }

    .home-text h2,
    .section-text h2,
    .founder-text h2,
    .section-title {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }

    .home-text p,
    .section-text p {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .home-image,
    .section-image,
    .founder-image {
        min-height: 250px;
        margin-top: 1.5rem;
    }

    .home-photo,
    .founder-photo {
        max-height: 300px;
    }

    /* Project Profile Section */
    .project-profile-section {
        padding: 1.5rem 1rem;
    }

    .project-image-container {
        height: 300px;
        margin-bottom: 1.5rem;
    }

    .project-info h2 {
        font-size: 1.3rem;
    }

    .project-info p {
        font-size: 0.9rem;
    }

    .full-width-photo {
        padding: 1rem;
        margin: 1.5rem 0;
        height: 280px;
    }

    .full-width-image {
        max-height: 280px;
        object-fit: contain;
    }

    /* ===== PROJECTS SECTION ===== */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .project-card {
        height: 280px;
    }

    .project-name {
        font-size: 1rem;
    }

    /* ===== PROJECT DETAIL PAGE ===== */
    .project-detail-section {
        padding: 1.5rem 1rem;
    }

    .project-title {
        font-size: 1.3rem;
        margin-bottom: 1.5rem;
    }

    .main-image-wrapper {
        gap: 0.5rem;
        margin-bottom: 1.5rem;
    }

    .main-image-container {
        min-height: 250px;
        max-height: 400px;
        border-radius: 6px;
    }

    .main-display-image {
        max-height: 400px;
    }

    .image-nav-arrow {
        width: 38px;
        height: 38px;
        font-size: 1.2rem;
    }

    .image-nav-arrow span {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .thumbnail-gallery {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
        gap: 0.5rem;
        margin-bottom: 2rem;
    }

    .thumbnail {
        height: 100px;
        border-radius: 4px;
    }

    /* ===== AWARD DETAIL PAGE ===== */
    .award-detail-image-wrapper {
        margin-bottom: 1.5rem;
    }

    .award-detail-main-image {
        min-height: 200px;
        max-height: 350px;
    }

    .award-detail-photo {
        max-height: 350px;
    }

    .award-detail-card {
        padding: 1.25rem;
    }

    .award-detail-card h2 {
        font-size: 1.2rem;
        margin-bottom: 1rem;
    }

    /* ===== AWARDS PAGE ===== */
    .awards-header h1 {
        font-size: 1.5rem;
    }

    .awards-header p {
        font-size: 1rem;
    }

    .award-image {
        height: 220px;
    }

    .award-content {
        padding: 1.25rem;
    }

    .award-card h3 {
        font-size: 1.1rem;
    }

    .award-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .award-description {
        font-size: 0.9rem;
        line-height: 1.6;
    }

    .award-details {
        font-size: 0.85rem;
    }

    .highlights-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .highlight-item {
        padding: 1.25rem;
    }

    .highlight-item h3 {
        font-size: 1.8rem;
    }

    .highlight-item p {
        font-size: 0.9rem;
    }

    /* ===== CONTACT SECTION ===== */
    .contact-form {
        max-width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .form-group {
        margin-bottom: 1.25rem;
    }

    .form-group input,
    .form-group textarea {
        width: 100%;
        padding: 0.65rem;
        font-size: 0.95rem;
    }

    .form-group label {
        font-size: 0.9rem;
    }

    .submit-button {
        width: 100%;
        padding: 0.8rem;
        font-size: 1rem;
    }

    /* ===== FOOTER ===== */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-section {
        text-align: center;
    }

    .footer-section h4 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

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

    .footer-section li {
        margin-bottom: 0.5rem;
    }

    .footer-section a {
        font-size: 0.9rem;
    }

    .footer-bottom {
        padding: 1.5rem 1rem;
        font-size: 0.85rem;
    }

    /* ===== UTILITY ADJUSTMENTS ===== */
    .mt-1 { margin-top: 0.75rem; }
    .mt-2 { margin-top: 1.5rem; }
    .mt-3 { margin-top: 2rem; }

    .mb-1 { margin-bottom: 0.75rem; }
    .mb-2 { margin-bottom: 1.5rem; }
    .mb-3 { margin-bottom: 2rem; }
}

/* ========== EXTRA SMALL DEVICES (320px and below) ========== */
@media (max-width: 320px) {
    .navbar-logo a {
        font-size: 1rem;
    }

    .hero-content h1 {
        font-size: 1.3rem;
    }

    .home-text h2,
    .section-text h2 {
        font-size: 1.3rem;
    }

    .home-photo,
    .founder-photo {
        max-height: 250px;
        min-height: 200px;
    }

    /* Project Profile Section */
    .project-image-container {
        height: 240px;
    }

    .project-info h2 {
        font-size: 1.1rem;
        margin-bottom: 1rem;
    }

    .project-info p {
        font-size: 0.85rem;
    }

    .full-width-photo {
        height: 220px;
    }

    .full-width-image {
        max-height: 220px;
        object-fit: contain;
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }

    .project-card {
        height: 240px;
    }

    .highlight-item h3 {
        font-size: 1.5rem;
    }

    .image-nav-arrow {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .main-image-wrapper {
        gap: 0.25rem;
    }
}

/* ========== ORIENTATION ADJUSTMENTS ========== */
@media (max-height: 600px) and (orientation: landscape) {
    .hero {
        min-height: auto;
        padding: 2rem 1rem;
    }

    .hero-content h1 {
        font-size: 1.5rem;
    }

    .navbar-menu {
        top: 55px;
    }
}

/* ========== TOUCH DEVICE ADJUSTMENTS ========== */
@media (hover: none) and (pointer: coarse) {
    .navbar-link,
    .project-card,
    .award-card,
    .image-nav-arrow,
    .cta-button {
        -webkit-tap-highlight-color: transparent;
    }

    .image-nav-arrow {
        active: scale(0.9);
    }
}

/* ========== HIGH RESOLUTION DISPLAYS ========== */
@media (min-width: 1200px) {
    .navbar-container {
        max-width: 1400px;
    }

    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .awards-grid {
        grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    }

    .highlights-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ========== PRINT STYLES ========== */
@media print {
    .navbar,
    .footer,
    .cta-button,
    .image-nav-arrow,
    .navbar-toggle {
        display: none !important;
    }

    .home-section,
    .about-section,
    .projects-section,
    .awards-section,
    .contact-section {
        page-break-inside: avoid;
    }
}
