/* Responsive */
@media (max-width: 991px) {

    .logo {
        width: 160px;
    }

    /* Hero Section for screens below 991px */
    .hero-title {
        font-size: 2rem;
    }

   .hero-image {
        display: flex;
        justify-content: center; /* Căn giữa ảnh theo chiều ngang */
        align-items: center; /* Căn giữa ảnh theo chiều dọc */
        height: 100%; /* Đảm bảo phần chứa có chiều cao đầy đủ */
    }
    
    .hero-image img {
        width: 100%; /* Đảm bảo ảnh chiếm hết chiều rộng */
        height: auto; /* Giữ tỷ lệ của ảnh */
    }
}

@media (max-width: 767px) {

    .logo {
        width: 120px;
    }

    /* Hero Section for screens below 767px */
    .hero-title {
        font-size: 1.8rem;
    }

    /* Hero content padding for very small screens */
    .hero .container {
        padding: 0 10px;
    }

    /* Stack the hero elements for very small screens */
    .hero .row {
        flex-direction: column;
        align-items: center; /* Căn giữa các phần tử */
    }

    .hero-image {
        display: flex;
        justify-content: center; /* Căn giữa ảnh theo chiều ngang */
        align-items: center; /* Căn giữa ảnh theo chiều dọc */
        height: 100%; /* Đảm bảo phần chứa có chiều cao đầy đủ */
    }
    
    .hero-image img {
        width: 100%; /* Đảm bảo ảnh chiếm hết chiều rộng */
        height: auto; /* Giữ tỷ lệ của ảnh */
    }
    
}


/* Our Expertise Section Responsive */
@media (max-width: 1440px) {
    .our-expertise {
        width: 100%;
        height: auto;
    }

    .expertise-content {
        width: 100%;
        height: auto;
        padding-right: 30px;
    }
}

@media (max-width: 1200px) {
    .our-expertise {
        margin-top: 120px;
    }

    .expertise-title {
        font-size: 36px;
    }

    .expertise-description li {
        font-size: 18px;
    }

    .expertise-description li br {
        display: none;
    }

    .expertise-image {
        width: 100%;
        height: auto;
    }
}

@media (max-width: 991px) {
    .our-expertise {
        margin-top: 100px;
    }

    .expertise-content {
        padding-right: 0;
        margin-bottom: 40px;
        align-items: center;
        text-align: center;
    }

    .expertise-title {
        font-size: 32px;
        text-align: center;
        margin-bottom: 24px;
    }

    .expertise-description {
        width: 100%;
        text-align: center;
    }

    .expertise-description ul {
        padding: 0;
    }

    .expertise-description li {
        font-size: 16px;
        text-align: center;
        padding: 0 20px;
    }

    .btn.btn-primaryy {
        margin: 0 auto;
        display: inline-flex;
        justify-content: center;
    }

    .expertise-image {
        width: 100%;
        height: auto;
        max-width: 500px;
        margin: 0 auto;
    }

    .expertise-image img {
        width: 100%;
        height: auto;
        border-radius: 12px;
    }
}

@media (max-width: 768px) {
    .our-expertise {
        margin-top: 80px;
    }

    .expertise-title {
        font-size: 28px;
    }

    .expertise-description li {
        font-size: 15px;
        line-height: 1.6;
        padding: 0 15px;
    }

    .btn.btn-primaryy {
        padding: 12px 24px;
        font-size: 14px;
    }

    .expertise-image {
        max-width: 400px;
    }
}

@media (max-width: 576px) {
    .our-expertise {
        margin-top: 60px;
    }

    .expertise-content {
        margin-bottom: 30px;
    }

    .expertise-title {
        font-size: 24px;
        margin-bottom: 20px;
    }

    .expertise-description li {
        font-size: 14px;
        padding: 0 10px;
    }

    .btn.btn-primaryy {
        padding: 10px 20px;
        font-size: 13px;
    }

    .expertise-image {
        max-width: 100%;
        padding: 0 15px;
    }

    .expertise-image img {
        border-radius: 8px;
    }
}

/* Animation Effects */
@media (min-width: 992px) {
    .expertise-content {
        opacity: 0;
        transform: translateX(-30px);
        animation: slideInLeft 0.8s ease forwards;
    }

    .expertise-image {
        opacity: 0;
        transform: translateX(30px);
        animation: slideInRight 0.8s ease forwards;
    }

    @keyframes slideInLeft {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }

    @keyframes slideInRight {
        to {
            opacity: 1;
            transform: translateX(0);
        }
    }
}

/* Dark Mode Support */


/* Loading State */
.expertise-image.loading {
    position: relative;
}

.expertise-image.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, 
        rgba(255,255,255,0.1) 25%, 
        rgba(255,255,255,0.2) 50%, 
        rgba(255,255,255,0.1) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 12px;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* iPad & Tablet Responsive (768px - 991px) */
@media (max-width: 991px) {
    .green-transition .section-description{
        margin-bottom: 30px;
    }

    .expertise-item {
        margin-top: 50px;
    }

    .expertise-item .row {
        flex-direction: column;
    }

    .company-logo {
        max-width: 200px;
        margin: 0 auto 20px;
    }

    .visit-site {
        margin: 0 auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .expertise-item:nth-child(3) .row {
        flex-direction: column-reverse;
    }
}

/* Mobile Responsive (< 768px) */
@media (max-width: 768px) {

    .section-title {
        font-size: 28px;
    }

    .expertise-item {
        margin-top: 40px;
    }

    .visit-site {
        padding: 10px 20px;
        font-size: 14px;
    }
}
/* Default styles cho orbital system */
.orbital-circles {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 700px;
    height: 700px;
    border: 2.5px solid #0588F0;
    border-radius: 50%;
    animation: rotateOrbit 20s linear infinite;
}

/* Thêm các chấm màu bay theo quỹ đạo */
.orbital-particles {
    position: absolute;
    width: 100%;
    height: 100%;
}

.particle {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

/* Tạo 8 particles với các màu và vị trí khác nhau */
.particle-1 {
    background: #0588F0;
    top: 10%;
    left: 50%;
    animation: moveParticle1 15s linear infinite;
}

.particle-2 {
    background: #1AA371;
    top: 50%;
    right: 10%;
    animation: moveParticle2 18s linear infinite;
}

.particle-3 {
    background: #FF853E;
    bottom: 10%;
    left: 50%;
    animation: moveParticle3 20s linear infinite;
}

.particle-4 {
    background: #EAB64C;
    top: 50%;
    left: 10%;
    animation: moveParticle4 17s linear infinite;
}

/* Animation cho orbit chính */
@keyframes rotateOrbit {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Animations cho các particles */
@keyframes moveParticle1 {
    0% {
        transform: rotate(0deg) translateX(350px) rotate(0deg);
    }
    100% {
        transform: rotate(360deg) translateX(350px) rotate(-360deg);
    }
}

@keyframes moveParticle2 {
    0% {
        transform: rotate(90deg) translateX(350px) rotate(-90deg);
    }
    100% {
        transform: rotate(450deg) translateX(350px) rotate(-450deg);
    }
}

@keyframes moveParticle3 {
    0% {
        transform: rotate(180deg) translateX(350px) rotate(-180deg);
    }
    100% {
        transform: rotate(540deg) translateX(350px) rotate(-540deg);
    }
}

@keyframes moveParticle4 {
    0% {
        transform: rotate(270deg) translateX(350px) rotate(-270deg);
    }
    100% {
        transform: rotate(630deg) translateX(350px) rotate(-630deg);
    }
}

/* Responsive scaling */
@media (max-width: 1440px) {
    .orbital-circles {
        width: 600px;
        height: 600px;
    }
    
    .particle {
        width: 8px;
        height: 8px;
    }
}

@media (max-width: 1200px) {
    .orbital-circles {
        width: 500px;
        height: 500px;
    }
    
    .particle {
        width: 7px;
        height: 7px;
    }
}

@media (max-width: 991px) {
    .orbital-circles {
        width: 400px;
        height: 400px;
    }
    
    .particle {
        width: 6px;
        height: 6px;
    }
}

@media (max-width: 768px) {
    .orbital-circles {
        width: 300px;
        height: 300px;
        display: none;
    }
    
    .particle {
        width: 5px;
        height: 5px;
    }
}

@media (max-width: 576px) {
    .orbital-circles {
        width: 250px;
        height: 250px;
    }
    
    .particle {
        width: 4px;
        height: 4px;
    }
}

/* Thêm hiệu ứng glow cho particles */
.particle {
    box-shadow: 0 0 10px currentColor;
    transition: all 0.3s ease;
}

/* Thêm trail effect */
.particle::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: inherit;
    filter: blur(2px);
    opacity: 0.6;
}
/* Small Mobile (< 576px) */
@media (max-width: 576px) {

    .section-title {
        font-size: 24px;
    }

    .expertise-item {
        margin-top: 30px;
    }

    .company-logo {
        max-width: 160px;
        margin-bottom: 15px;
    }

    .visit-site {
        padding: 8px 16px;
        font-size: 13px;
    }
}

/* Loading state for images */
.tech-diagram.loading,
.tech-model.loading {
    position: relative;
}

.tech-diagram.loading::before,
.tech-model.loading::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}
/* Contact Form Responsive */
@media (max-width: 1200px) {

    .contact-form {
        max-width: 800px;
        margin: 0 auto;
    }
}

@media (max-width: 1024px) {

    .contact-title {
        font-size: 40px;
        margin-bottom: 20px;
    }

    .contact-description {
        font-size: 20px;
        margin-bottom: 30px;
    }

    .contact-form .form-control {
        height: 50px;
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 10px;
        border: 2px solid #E2E8F0;
        transition: all 0.3s ease;
    }

    .contact-form .form-control:focus {
        border-color: #1AA371;
        box-shadow: 0 0 0 3px rgba(26, 163, 113, 0.1);
    }

    .contact-form .btn-primary {
        height: 50px;
        font-size: 16px;
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    .contact-form .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(26, 163, 113, 0.2);
    }
}

@media (max-width: 768px) {

    .contact-title {
        font-size: 36px;
    }

    .contact-description {
        font-size: 18px;
        padding: 0 20px;
    }

    .contact-form .form-control,
    .contact-form .btn-primary {
        width: 100%;
        height: 48px;
    }

    .orbital-circles .inner-circle{
        width: 150px;
        height: 150px;
    }

    .orbital-circles .middle-circle{
        width: 200px;
        height: 200px;
    }
}

@media (max-width: 576px) {

    .contact-title {
        font-size: 28px;
    }

    .contact-description {
        font-size: 16px;
        padding: 0 10px;
    }

    .contact-form {
        padding: 0 10px;
    }

    .contact-form .form-control {
        font-size: 14px;
        height: 45px;
        padding: 10px 16px;
    }

    .contact-form .btn-primary {
        height: 45px;
        font-size: 14px;
    }
}

/* Hover Effects và Animations */
@media (hover: hover) {
    .contact-form .form-control:hover {
        border-color: #E2E8F0;
    }

    .contact-form .btn-primary:hover {
        background-color: #158a5f;
    }
}

/* Dark Mode Support */


/* Loading State */
.contact-form .btn-primary.loading {
    position: relative;
    pointer-events: none;
}

.contact-form .btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


/* Responsive */
@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
        align-items: center;
        gap: 10px;
    }

    .footer-left {
        align-items: center;
    }

    .footer-links a {
        font-size: 14px;
    }
}

/* Small Desktop and Large Tablets (992px to 1199px) */
@media screen and (max-width: 1199px) {
    .hero-title {
        font-size: 36px;
    }

    /* Collaborative Advantage */
    .collaborative-advantage {
        width: 100%;
    }

    .advantage-card {
        width: 100%;
        margin-bottom: 20px;
    }

    .advantage-card.height-2,
    .advantage-card.height-3 {
        margin-left: 0;
    }
}

/* Tablets (768px to 991px) */
@media screen and (max-width: 991px) {
    .navbar-toggler {
        display: block;
    }

    .navbar-collapse {
        position: fixed;
        top: 0;
        right: -100%;
        width: 300px;
        height: 100vh;
        background: white;
        transition: 0.3s;
        padding: 20px;
    }

    .navbar-collapse.show {
        right: 0;
    }

    .navbar-nav {
        flex-direction: column;
    }

    .nav-item {
        margin: 10px 0;
    }

    /* Hero Section */
    .hero {
        margin-top: 100px;
    }

    .hero-image {
        text-align: center;
    }

    .section-title {
        font-size: 32px !important;
        text-align: center !important;
        margin-bottom: 20px !important;
    }

    .collaborative-advantage .section-description {
        text-align: center;
        margin-bottom: 40px;
    }

    .advantage-card {
        height: auto !important;
    }
}

/* Large Mobile (576px to 767px) */
@media screen and (max-width: 767px) {

    /* Navigation */
    .navbar-brand img {
        width: 150px;
    }

    /* Hero Section */
    .hero {
        padding: 60px 0;
    }

    .hero-title {
        font-size: 28px;
    }

    /* Collaborative Advantage */
    .collaborative-advantage {
        margin: 60px auto 0;
    }

    .collaborative-advantage .row .col-lg-4 {
        width: 100%;
    }

    .advantage-card {
        width: 100%;
        margin: 0 0 20px 0;
    }

    .advantage-card img {
        width: 40px;
        height: 40px;
    }
}

/* Small Mobile (Under 576px) */
@media screen and (max-width: 575px) {
    .tech-diagram, .tech-model{
        width: 100%;
        height: auto;
        margin-top: 20px;
    }
    .footer-links {
        flex-direction: column;
        width: 100%;
        gap: 10px;
        text-align: start;
    }
    .navbar-brand img {
        width: 120px;
    }

    /* Hero Section */
    .hero {
        padding: 40px 0;
    }

    .hero-title {
        font-size: 24px;
    }

    /* Collaborative Advantage */
    .collaborative-advantage {
        margin: 40px auto 0;
    }

    .advantage-card {
        padding: 15px;
    }
}

/* Device Orientation */
@media screen and (orientation: landscape) and (max-height: 576px) {
    .hero {
        padding: 20px 0;
    }

    .navbar-collapse {
        overflow-y: auto;
    }
}

/* Print Styles */
@media print {
    .navbar,
    .nav-right,
    .footer {
        display: none;
    }

    .hero {
        padding: 20px 0;
    }
}

@media (max-width: 1024px) {

    .contact-title {
        font-size: 40px;
        margin-bottom: 20px;
    }

    .contact-description {
        font-size: 20px;
        margin-bottom: 30px;
    }

    .contact-form .form-control {
        height: 50px;
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 10px;
        border: 2px solid #E2E8F0;
        transition: all 0.3s ease;
    }

    .contact-form .form-control:focus {
        border-color: #1AA371;
        box-shadow: 0 0 0 3px rgba(26, 163, 113, 0.1);
    }

    .contact-form .btn-primary {
        height: 50px;
        font-size: 16px;
        border-radius: 10px;
        transition: all 0.3s ease;
    }

    .contact-form .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(26, 163, 113, 0.2);
    }

    .diagram-item.green-hydrogen{
        right: 0;
        top: 15%;
    }

    .diagram-item.clean-energy{
        left: 40px;
        top: 60%;
    }

    .diagram-item.renewable-transition{
        top: 80%;
        right: 15px;
    }
}

@media (max-width: 768px) {

    .contact-title {
        font-size: 36px;
    }

    .contact-description {
        font-size: 18px;
        padding: 0 20px;
    }

    .contact-form {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 0 20px;
    }

    .contact-form .form-control,
    .contact-form .btn-primary {
        width: 100%;
        height: 48px;
    }
}

@media (max-width: 576px) {

    .contact-title {
        font-size: 28px;
    }

    .contact-description {
        font-size: 16px;
        padding: 0 10px;
    }

    .contact-form {
        padding: 0 10px;
    }

    .contact-form .form-control {
        font-size: 14px;
        height: 45px;
        padding: 10px 16px;
    }

    .contact-form .btn-primary {
        height: 45px;
        font-size: 14px;
    }
}

/* Hover Effects và Animations */
@media (hover: hover) {
    .contact-form .form-control:hover {
        border-color: #E2E8F0;
    }

    .contact-form .btn-primary:hover {
        background-color: #158a5f;
    }
}

/* Loading State */
.contact-form .btn-primary.loading {
    position: relative;
    pointer-events: none;
}

.contact-form .btn-primary.loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (max-width: 768px) {
    .advantage-card.height-1,
    .advantage-card.height-2,
    .advantage-card.height-3 {
        margin-bottom: 40px !important;
        width: 100%;
    }
}

@media (max-width: 576px) {
    .advantage-card.height-1,
    .advantage-card.height-2,
    .advantage-card.height-3 {
        margin-bottom: 30px !important;
    }
}