/* Cool Dropdown Menu Styles */
.main-nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 1.5rem;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.nav-link.active {
    background-color: rgba(255, 255, 255, 0.2);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropbtn {
    cursor: pointer;
    background: none;
    border: none;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dropbtn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.dropdown-content {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: white;
    min-width: 200px;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
    border-radius: 5px;
    z-index: 1001;
    animation: dropdownFade 0.3s ease;
}

@keyframes dropdownFade {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.dropdown-content a {
    color: #333;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
    transition: background-color 0.3s ease;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-content a:last-child {
    border-bottom: none;
}

.dropdown-content a:hover {
    background-color: #0077b6;
    color: white;
}

.language-dropdown {
    min-width: 150px;
}

.language-dropdown a {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Logo Section */
.logo-section {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.site-logo {
    height: 50px;
    width: 50px;
    object-fit: contain;
}

.header-text h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: bold;
}

.header-text p {
    margin: 0;
    opacity: 0.9;
    font-size: 0.9rem;
}

/* Fixed Layout Styles */
body {
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    overflow-x: hidden; /* Prevent horizontal scrolling */
}

.fixed-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(135deg, #0077b6 0%, #03045e 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 1000;
}

.header-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.scrollable-content {
    position: fixed;
    top: 80px;
    bottom: 60px;
    left: 0;
    width: 100%;
    overflow-y: auto;
    background-color: #f8f9fa;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
}

.content-wrapper {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.fixed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    /* Match the header's translucent style: */
    background: linear-gradient(135deg, rgba(0, 119, 182, 0.7) 0%, rgba(3, 4, 94, 0.7) 100%);
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
    color: white;
    padding: 1rem 0;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.hero-header {
    position: relative;
    height: 100px;
    /* Glass effect background */
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hero-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('images/header5.png') center/cover no-repeat;
    opacity: 0.7; /* Image transparency */
    z-index: 1;
    pointer-events: none; /* Allows clicks to pass through */
}

.header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* Very translucent overlay: */
    background: linear-gradient(135deg, rgba(0, 119, 182, 0.6) 0%, rgba(3, 4, 94, 0.6) 100%);
}

.header-content {
    position: relative;
    z-index: 2;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin: 2rem 0;
    padding: 30px 0; /* ← Add this line for top/bottom spacing */
}

.div1 {
    width: 100%;
    margin: 20px;
    padding-top: 20px; /* ← Add this for the title spacing */
}

/* ==================== */
/* MOBILE RESPONSIVENESS */
/* ==================== */

/* Mobile menu toggle (hamburger icon) */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background: white;
    border-radius: 5px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Mobile Navigation */
@media screen and (max-width: 768px) {
    /* Prevent zoom on input focus */
    input, select, textarea {
        font-size: 16px !important;
    }
    
    /* Header adjustments */
    .fixed-header {
        padding: 0.5rem 0;
    }
    
    .header-content {
        flex-wrap: wrap;
    }
    
    .hero-header {
        height: auto;
        min-height: 80px;
    }
    
    /* Mobile menu toggle */
    .menu-toggle {
        display: flex;
        position: absolute;
        top: 25px;
        right: 20px;
    }
    
    /* Navigation menu for mobile */
    .main-nav {
        position: fixed;
        top: 80px;
        left: 0;
        width: 100%;
        background: linear-gradient(135deg, #0077b6 0%, #03045e 100%);
        flex-direction: column;
        padding: 1rem 0;
        transform: translateY(-100%);
        transition: transform 0.3s ease-in-out;
        z-index: 999;
        box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    }
    
    .main-nav.active {
        transform: translateY(0);
    }
    
    .nav-menu {
        flex-direction: column;
        width: 100%;
        gap: 0;
    }
    
    .nav-item {
        width: 100%;
        text-align: center;
    }
    
    .nav-link, .dropbtn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
        border-radius: 0;
    }
    
    /* Dropdown adjustments for mobile */
    .dropdown-content {
        position: static;
        width: 100%;
        box-shadow: none;
        display: none;
        animation: none;
    }
    
    .dropdown-content.show {
        display: block;
    }
    
    /* Logo adjustments */
    .logo-section {
        padding-left: 20px;
    }
    
    .site-logo {
        height: 40px;
        width: 40px;
    }
    
    .header-text h1 {
        font-size: 1.2rem;
    }
    
    .header-text p {
        font-size: 0.8rem;
    }
    
    /* Content adjustments */
    .scrollable-content {
        top: 80px;
        bottom: 60px;
    }
    
    .content-wrapper {
        padding: 15px;
    }
    
    /* Project grid adjustments */
    .projects-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin: 1rem 0;
    }
    
    .div1 {
        margin: 10px;
        padding-top: 10px;
    }
}

/* Small mobile devices */
@media screen and (max-width: 480px) {
    .header-text h1 {
        font-size: 1rem;
    }
    
    .header-text p {
        display: none; /* Hide subtitle on very small screens */
    }
    
    .site-logo {
        height: 35px;
        width: 35px;
    }
    
    .scrollable-content {
        top: 70px;
    }
    
    .hero-header {
        min-height: 70px;
    }
    
    .main-nav {
        top: 70px;
    }
}

/* Tablet devices */
@media screen and (min-width: 769px) and (max-width: 1024px) {
    .header-content {
        flex-wrap: nowrap;
    }
    
    .nav-menu {
        gap: 0.8rem;
    }
    
    .nav-link, .dropbtn {
        padding: 0.5rem 0.8rem;
        font-size: 0.9rem;
    }
    
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Prevent text size adjustment on orientation change */
html {
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

/* Improve touch targets for mobile */
.nav-link, .dropbtn, .project-card {
    min-height: 44px; /* Apple's recommended minimum touch target size */
}

/* Smooth transitions for all interactive elements */
.nav-link, .dropbtn, .project-card, .dropdown-content {
    transition: all 0.3s ease;
}