@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');

*{
    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    scroll-behavior: smooth;
    /* Prevent horizontal scrolling on all screen sizes */
    box-sizing: border-box;
}

html, body {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
}

.banner{
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: scroll;
    /* Optimized for iOS and mobile devices */
}

.navbar{
    width: 100%;
    margin: auto;
    padding: 8px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.25) 0%, rgba(255, 255, 255, 0.25) 100%, transparent 100%);
    backdrop-filter: blur(15%);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    z-index: 100;
    pointer-events: auto;
    flex-wrap: wrap;
    gap: 10px;
}

.logo{
    margin: 10px 0;
    margin-left: 15px;
    /* Use fluid width for better mobile scaling */
    width: clamp(150px, 20vw, 225px);
    cursor: pointer;
    transition: 0.3s;
    pointer-events: auto;
    z-index: 102;
    flex-shrink: 0;
}

.logo:hover{
    transform: scale(1.05);
}

/* Mobile-first: Hide navbar menu on small screens, show on tablets+ */
.navbar ul{
    display: none;
    width: 100%;
    flex-direction: column;
    gap: 10px;
    list-style: none;
    order: 3;
}

.navbar ul li{
    list-style: none;
    display: block;
    margin: 5px 0;
    pointer-events: auto;
    position: relative;
    z-index: 101;
    width: 100%;
}

.navbar ul li a{
    text-decoration: none;
    color: white;
    text-transform: uppercase;
    pointer-events: auto;
    position: relative;
    z-index: 102;
    display: block;
    text-shadow: 
        1px 1px 1px rgba(0, 0, 0, 0.6),
        -1px -1px 1px rgba(0, 0, 0, 0.2),
        1px -1px 1px rgba(0, 0, 0, 0.2),
        -1px 1px 1px rgba(0, 0, 0, 0.2);
    font-weight: 600;
    /* Fluid font size for responsive text */
    font-size: clamp(0.75rem, 2vw, 1rem);
    padding: 10px 0;
}

.navbar ul li::after{
    content: "";
    height: 3px;
    width: 0;
    background: #0689ce;
    position: absolute;
    left: 0;
    bottom: -10px;
    transition: 0.5s;
}

.navbar ul li:hover::after{
    width: 100%;
}

/* Show navbar menu on tablets and up */
@media (min-width: 600px) {
    .navbar {
        flex-wrap: nowrap;
    }
    
    .navbar ul {
        display: flex !important;
        width: auto;
        flex-direction: row;
        order: 2;
    }
    
    .navbar ul li {
        display: inline-block;
        margin: 10px 15px;
        width: auto;
    }
}

.content{
    width: 100%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    color: white;
    padding: 20px;
}

.content h1{
    /* Fluid typography: scale from 32px on mobile to 70px on desktop */
    font-size: clamp(32px, 8vw, 70px);
    line-height: 1.3;
}

.content p{
    margin: 20px auto;
    font-weight: 100;
    line-height: 1.6;
    /* Fluid font size for responsive paragraphs */
    font-size: clamp(16px, 4vw, 20px);
    width: 90%;
    max-width: 90%;
}

.content button, .content-button{
    /* Fluid button font size */
    font-size: clamp(12px, 2.8vw, 15px);
    width: auto;
    max-width: fit-content;
    padding: 10px 20px;
    text-align: center;
    margin: 20px 10px;
    border-radius: 25px;
    font-weight: bold;
    border: 2px solid #0689ce;
    background: transparent;
    color: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.content span, .content-button span{
    background: #2479b8;
    width: 0;
    height: 100%;
    border-radius: 25px;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: -1;
    transition: 0.5s;
}

button:hover span{
    width: 100%;
}

.content button:hover, .content-button:hover{
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(6, 137, 206, 0.3);
}

::-webkit-scrollbar{
    width: 8px;    
}

::-webkit-scrollbar-thumb{
    background: #0689ce;
    border-radius: 15px;
}

body{
    overflow: overlay;
}

.up{
    background: #0689ce;
    position: fixed;
    bottom: 25px;
    right: 20px;
    z-index: 999;
    padding: 10px;
    height: clamp(50px, 8vw, 80px);
    width: clamp(50px, 8vw, 80px);
    border-radius: 100%;
    text-align: center;
    cursor: pointer;
    visibility: hidden;
    opacity: 0;
    transition: .5s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.up.active{
    visibility: visible;
    opacity: 1;
}

.up i{
    color: #ffffff;
    /* Responsive icon size for the up arrow */
    font-size: clamp(24px, 5vw, 50px);
}

.rd{
    color: #0689ce;
    transition: .5s;
    cursor: pointer;
}

.rd:hover{
    transform: translateX(3%);
}

.last{
    position: relative;
    background-image: url('source/bk.jpg?v=1');
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    width: 100%;
    /* Responsive height: scale from 300px on mobile to 500px on desktop */
    height: clamp(300px, 50vh, 500px);
}

/* Show background image only on desktop (768px and up) */
@media (min-width: 768px) {
    .last {
        background-image: url('source/bk.jpg?v=1');
    }
}

.last div{
    width: 100%;
    height: 100%;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    text-align: center;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.last div h1{
    /* Fluid heading: scale from 24px on mobile to 35px on desktop */
    font-size: clamp(24px, 6vw, 35px);
    margin-bottom: 20px;
}

.last div button{
    /* Fluid button font size */
    font-size: clamp(16px, 4vw, 25px);
    width: auto;
    max-width: 200px;
    padding: 15px 30px;
    text-align: center;
    margin: 20px 10px;
    border-radius: 25px;
    font-weight: bold;
    border: 2px solid #0689ce;
    background: transparent;
    color: inherit;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.last div button span{
    background: #2479b8;
    width: 0;
    height: 100%;
    border-radius: 25px;
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: -1;
    transition: 0.5s;
}

.last div button:hover span{
    width: 100%;
}

.last div button:hover{
    transform: scale(1.05);
    box-shadow: 0 8px 20px rgba(6, 137, 206, 0.3);
}

.ftr-m{
    color: #ffffff;
    padding: 16px;
    background: #009cdb;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.ftr-t{
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 0 16px 0;
    border-bottom: 2px solid #ffffff;
    margin: 0 0 16px 0;
    gap: 16px;
}

.ftr-t .content-button{
    margin-left: auto;
    margin-right: 0;
}

.ftr-t img{
    display: none;
}

.ftr-t ul{
    list-style-type: none;
    display: flex;
    gap: 0px;
    align-items: center;
    flex-wrap: wrap;
    justify-content: center;
}

.ftr-t ul li a{
    display: block;
    color: #ffffff;
    text-align: center;
    text-decoration: none;
}

.ftr-t ul li a i{
    /* Fluid icon size: 90% of original - scale from 27px on mobile to 40.5px on desktop */
    font-size: clamp(27px, 7.2vw, 40.5px);
    margin: 6.3px 22.5px 0 0;
}

.ftr-t ul li a i:hover{
    color: #ffffff;
}

.ftr-d{
    display: flex;
    flex-wrap: wrap;
    justify-content: space-evenly;
    padding: 0 0 16px 0;
    border-bottom: 2px solid #ffffff;
    gap: 16px;
}

.ftr-d div{
    width: 100%;
    min-width: 250px;
    flex: 1;
    min-width: 200px;
}

.ftr-d div h3{
    margin: 0 0 10px 0;
    font-size: clamp(16px, 4vw, 20px);
}

.ftr-d div ul{
    margin: 0 0 0 25px;
    line-height: 30px;
    font-size: clamp(12px, 3vw, 16px);
}

.ftr-d div a{
    text-decoration: none;
    color: #ffffff;
}

.ftr-d div a:hover{
    color: #0689ce;
}

.ftr-b{
    position: relative;
    padding: 12px 16px;
    width: 100%;
    text-align: center;
}

.ftr-b h2{
    position: static;
    color: #ffffff;
    cursor: default;
    font-size: clamp(18px, 4vw, 22px);
    margin: 0 0 5px 0;
    transition: none;
}

.ftr-b h2:hover{
    left: auto;
    color: #ffffff;
}

.ftr-b p{
    font-size: clamp(12px, 3vw, 16px);
}

.philosophy-section {
    animation: fadeIn 0.8s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.philosophy-section > div > div:nth-child(2) > div {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.philosophy-section > div > div:nth-child(2) > div:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(6, 137, 206, 0.2) !important;
}

/* ========== MOBILE-FIRST RESPONSIVE MEDIA QUERIES ========== */

/* Mobile devices (320px - 599px) - Styles above handle these */

/* Tablets and small devices (600px - 767px) - Touch devices excluded */
@media (min-width: 600px) and (hover: hover) {
    .banner {
        background-attachment: fixed;
    }
    
    .content h1 {
        line-height: 1.3;
    }
    
    .ftr-d div {
        width: auto;
        min-width: 250px;
        flex: 0 1 calc(50% - 15px);
    }
    
    .ftr-t {
        gap: 10px;
    }
}

/* Tablets and medium devices (768px - 991px) */
@media (min-width: 768px) {
    .ftr-m {
        padding: 30px 30px 0 30px;
    }
    
    .ftr-t ul li a i {
        margin: 7px 25px 0 0;
    }
    
    .ftr-d {
        padding: 0 0 20px 0;
    }
    
    .ftr-d div {
        flex: 0 1 calc(33.333% - 20px);
    }
}

/* Large devices (992px - 1199px) - Touch devices excluded */
@media (min-width: 992px) and (hover: hover) {
    .banner {
        background-attachment: fixed;
    }
    
    .ftr-t ul li a i {
        margin: 7px 25px 0 0;
    }
}

/* Extra large devices (1200px and up) - Touch devices excluded */
@media (min-width: 1200px) and (hover: hover) {
    .banner {
        background-attachment: fixed;
    }
    
    .ftr-m {
        padding: 30px 30px 0 30px;
    }
}

/* Mobile Navigation Styles */
.nav-desktop {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-mobile {
    display: none;
    list-style: none;
    width: 100%;
    background: rgba(0, 0, 0, 0.95);
    padding: 15px 0;
    position: absolute;
    top: 60px;
    left: 0;
    z-index: 99;
}

.nav-mobile li {
    width: 100%;
    text-align: left;
    padding: 12px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.nav-mobile li a {
    color: #ffffff;
    text-decoration: none;
    font-size: clamp(14px, 3vw, 16px);
    font-weight: 500;
    transition: 0.3s;
    display: block;
}

.nav-mobile li a:hover {
    color: #0689ce;
}

.mobile-menu-toggle {
    display: none;
    cursor: pointer;
    z-index: 101;
}

/* Mobile devices (up to 768px) */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: block !important;
        padding: 10px 15px;
    }
    
    .nav-mobile.active {
        display: block !important;
    }
}

/* iOS Safari & Touch Devices Optimization */
@media (hover: none) and (pointer: coarse) {
    /* Disable background-attachment for all touch devices */
    .banner {
        background-attachment: scroll !important;
    }
    
    /* Improve touch target sizes */
    button, a, input[type="button"], input[type="submit"] {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Fix font size zoom on input focus in iOS Safari */
    input, textarea, select {
        font-size: 16px;
    }
    
    /* Prevent text selection tap delay */
    -webkit-touch-callout: none;
    
    /* Smooth scrolling for iOS */
    -webkit-overflow-scrolling: touch;
}

/* High DPI devices (Retina) optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .banner {
        background-size: cover;
        background-position: center;
    }
}