/* css/style.css */

/* General Reset */
@layer base {
    * {
        margin: 0;
        padding: 0;
        box-sizing: border-box;
    }
}

/* General Styles */
@layer components {
    .ecosystem img {
        flex-shrink: 0;
        min-width: 100%;
        min-height: 100%;
    }

    .ecosystem>div {
        flex-shrink: 0;
    }

    .ecosystem>div>div {
        max-width: 50%;
        flex: 0 0 50%;
    }

    .ecosystem img {
        object-position: right center;
    }
}

/* Navbar Styles */
#navbar {
    z-index: 10000;
    transition: background-color 0.3s ease;
    background-color: transparent;
}

#navbar.scrolled {
    background-color: #1f2937;
    /* Tailwind's bg-gray-800 */
}

/* Navigation Link Styles */
.nav-link {
    font-family: 'Montserrat', Arial, "Helvetica Neue", Helvetica, sans-serif;
    color: white;
    padding: 0.5rem 1rem;
    font-weight: 700;
    transition: color 0.3s, background 0.3s;
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: transparent;
    transition: background 0.3s;
}

.nav-link:hover::after {
    background: white;
}

.nav-link.dropdown-toggle svg {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
}

/* Hero Section Base Styles */
.hero {
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1rem;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1;
}

.hero .text-center {
    position: relative;
    z-index: 2;
}

.hero h1 {
    font-family: 'Exo 2', Montserrat, Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: 1px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    animation: electric 1.5s infinite alternate;
    color: white;
}

.hero p {
    font-family: 'Exo 2', Arial, "Helvetica Neue", Helvetica, sans-serif;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: 0.5px;
    color: #fff900;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.3);
    margin-top: 1.5rem;
    margin-bottom: 1rem;
}

/* Page-Specific Hero Styles */
.hero-index {
    height: 100vh;
    background-image: url('../img/background_01.png');
}

.hero-index h1 {
    font-size: 3.75rem;
    /* 60px, equivalent to text-6xl */
}

.hero-index p {
    font-size: 2.5rem;
    /* 40px */
}

.hero-about {
    height: 50vh;
    background-image: url('../img/background_01.png');
}

.hero-about h1 {
    font-size: 1.125rem;
    /* text-lg */
    font-weight: 600;
}

.hero-about p {
    font-size: 1.5rem;
    /* 24px */
}


.hero-contact {
    height: 50vh;
    background-image: url('../img/contact_bg.jpg');
}

.hero-contact h1 {
    font-size: 1.125rem;
    /* text-lg */
    font-weight: 600;
}

.hero-contact p {
    font-size: 1.5rem;
    /* 24px */
}

/* Gradient Button */
.gradient-button {
    background: linear-gradient(90deg, #FFD700, #FF4500);
    font-family: 'Exo 2', Arial, "Helvetica Neue", Helvetica, sans-serif;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    transition: background 0.3s;
    display: inline-flex;
    align-items: center;
    font-size: 1.125rem;
}

.gradient-button i {
    margin-left: 0.5rem;
}

.gradient-button:hover {
    background: linear-gradient(90deg, #FF4500, #FFD700);
}

/* Desktop Menu */
.desktop-menu {
    display: none;
}

/* Desktop Dropdown Styles */
.group {
    position: relative;
}

.absolute {
    position: absolute;
    z-index: 10001;
    top: calc(100% + 0.5rem);
    left: 50%;
    transform: translateX(-50%);
    display: none;
    min-width: 200px;
    background-color: #1f2937;
    padding: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.group:hover .absolute {
    display: block;
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.absolute:hover {
    display: block;
    opacity: 1;
}

.absolute a {
    color: #ffffff !important;
    display: block;
    padding: 0.5rem 1rem;
    transition: background-color 0.3s ease;
    border-radius: 2px;
}

.absolute a:hover {
    background-color: #4b5563;
}

/* Mobile Menu Styles */
.mobile-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #1f2937;
    padding: 1rem;
    z-index: 9999;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.mobile-menu.active {
    display: flex;
}

.mobile-menu .nav-link {
    padding: 0.75rem 1rem;
    width: 100%;
    text-align: left;
    border-bottom: 1px solid #374151;
    color: #ffffff !important;
}

.mobile-menu .nav-link:last-child {
    border-bottom: none;
}

.mobile-menu .nav-link:hover {
    background-color: #374151;
}

/* Mobile Dropdown Styles */
.mobile-dropdown {
    display: none;
    background-color: #374151;
    margin-left: 1rem;
    margin-top: 0.5rem;
    border-radius: 4px;
    overflow: hidden;
}

.mobile-dropdown.active {
    display: block;
}

.mobile-dropdown a {
    color: #ffffff !important;
    display: block;
    padding: 0.75rem 1rem;
    font-weight: 500;
    border-bottom: 1px solid #4b5563;
    transition: background-color 0.3s ease;
}

.mobile-dropdown a:last-child {
    border-bottom: none;
}

.mobile-dropdown a:hover {
    background-color: #4b5563;
}

/* Mobile Toggle */
.mobile-toggle {
    display: block;
}



/* Footer Styles */
footer {
    background-color: #333;
    padding: 20px 0;
}

footer a {
    color: #FFD700;
    transition: color 0.3s;
    text-decoration: none;
}

footer a:hover {
    color: #FF4500;
}

/* Responsive Styles */
@media (min-width: 768px) {
    .desktop-menu {
        display: flex !important;
    }

    .mobile-toggle {
        display: none !important;
    }

    .mobile-menu {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .desktop-menu {
        display: none !important;
    }

    .mobile-toggle {
        display: block !important;
    }

    .hero h1 {
        font-size: 2.5rem;
        line-height: 1.3;
    }

    .hero p {
        font-size: 1.75rem;
        margin-top: 1rem;
    }

    .gradient-button {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 1.875rem;
    }

    .hero p {
        font-size: 1.25rem;
    }

    .gradient-button {
        padding: 0.5rem 0.75rem;
        font-size: 0.875rem;
    }
}

/* Animation for Hero */
@keyframes electric {
    0% {
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5), 0 0 10px rgba(255, 255, 255, 0.3);
    }

    100% {
        text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5), 0 0 20px rgba(255, 255, 255, 0.5);
    } 
}








/* Latest News Section */
/* Latest News Section */
.latest-news {
    padding: 4rem 0;
}

.news-carousel {
    position: relative;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.news-carousel .swiper-slide {
    display: flex;
    justify-content: center;
    align-items: center;
}

.news-carousel .swiper-slide>div {
    min-height: 384px;
    /* Allow growth */
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.news-carousel .swiper-button-prev,
.news-carousel .swiper-button-next {
    color: #fff;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.news-carousel .swiper-button-prev::after,
.news-carousel .swiper-button-next::after {
    font-size: 20px;
}

.news-carousel .swiper-pagination-bullet {
    background: #fff;
    opacity: 0.5;
}

.news-carousel .swiper-pagination-bullet-active {
    background: #f59e0b;
    /* Matches amber-400 */
    opacity: 1;
}

.news-carousel .news-text {
    padding: 0.25rem 0.5rem;
    /* Matches px-2 py-1 */
    border-radius: 0.25rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    
    color: #ffffff;
    overflow: hidden;
    display: block;
    font-size: 0.875rem;
    /* Matches text-sm */
}

.news-carousel .gradient-button {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.news-carousel .gradient-button i {
    margin-left: 0.5rem;
    font-size: 0.875rem;
}

.news-carousel .gradient-button-outlined {
    background: transparent;
    border: 2px solid #FFD700;
    font-family: 'Exo 2', Arial, "Helvetica Neue", Helvetica, sans-serif;
    color: #ffffff;
    padding: 0.25rem 0.75rem;
    /* Matches py-1 px-3 */
    border-radius: 8px;
    font-size: 0.875rem;
    display: inline-flex;
    align-items: center;
    transition: background 0.3s, border-color 0.3s, color 0.3s;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    visibility: visible;
    opacity: 1;
}

.news-carousel .gradient-button-outlined i {
    margin-left: 0.5rem;
    font-size: 0.75rem;
}

.news-carousel .gradient-button-outlined:hover {
    background: linear-gradient(90deg, #FFD700, #FF4500);
    border-color: transparent;
    color: #ffffff;
}

/* Loader and Carousel Content Styles */
#news-loader {
    display: none;
    min-height: 384px;
    /* Matches min-h-96 */
    align-items: center;
    justify-content: center;
}

#news-carousel-content {
    transition: opacity 0.3s ease-in-out;
}

#news-carousel-content.hidden {
    display: none;
    opacity: 0;
}

.news-carousel img {
    max-width: 400px;
    width: 100%;
    height: 225px;
    /* Matches 400x225px */
    object-fit: cover;
}

/* Loader Styles */
.loader {
    border-top-color: #3498db;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .latest-news h2 {
        font-size: 2.5rem;
    }

    .news-carousel .swiper-slide .min-h-96 {
        min-height: 70vw;
    }

    .news-carousel .swiper-slide h5 {
        font-size: 0.875rem;
    }

    .news-carousel .swiper-slide p {
        font-size: 0.75rem;
    }

    .news-carousel .swiper-slide>div {
        min-height: 70vw;
    }

    #news-loader {
        min-height: 70vw;
    }

    .news-carousel .news-text {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .news-carousel .gradient-button-outlined {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}























/* css/style.css */

/* Tabs Styling */
.tab-button {
    position: relative;
    transition: color 0.3s ease, border-color 0.3s ease;
}

.tab-button.active {
    color: #000;
    border-bottom: 3px solid #FFD700;
    /* Matches your gradient-button color */
}

.tab-button:hover,
.tab-button:focus {
    color: #000;
}

.tab-button:focus {
    outline: 2px solid #FFD700;
    outline-offset: 2px;
}

.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
}

/* Mobile-First Responsive Styles */
@media (max-width: 767px) {
    .products .tab-button {
        flex: 1 1 100%;
        text-align: center;
        padding: 0.75rem;
        font-size: 1rem;
    }

    .products .tab-content img {
        max-height: 300px;
        /* Prevent images from becoming too large on mobile */
    }

    .products .tab-content h3 {
        font-size: 1.75rem;
    }

    .products .tab-content ul {
        font-size: 0.9rem;
    }

    .products .gradient-button {
        padding: 0.5rem 1rem;
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .products .tab-button {
        padding: 0.75rem 1.5rem;
        font-size: 1.125rem;
    }

    .products .tab-content img {
        max-height: 400px;
    }
}

/* Ensure images are responsive */
.tab-content img {
    max-width: 100%;
    height: auto;
    object-fit: cover;
}

.tab-panel {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.tab-panel.active {
    opacity: 1;
}




/* css/style.css (add at the end) */

/* News Hero Section */
.hero-news {
    height: 50vh;
    background-image: url('../img/electric_mobilty_news.jpg');
    /* Replace with your image */
}

.hero-news h1 {
    font-size: 1.125rem;
    /* text-lg */
    font-weight: 600;
}

.hero-news p {
    font-size: 1.5rem;
    /* 24px */
}

/* News List and Detail Styles */
.news-list article,
.news-detail article,
.related-news article {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.news-list article:hover,
.related-news article:hover {
    transform: translateY(-4px);
}

.news-detail .prose {
    font-family: 'Montserrat', Arial, sans-serif;
    color: #374151;
    /* gray-700 */
}

.news-detail .prose p {
    margin-bottom: 1rem;
}

.news-detail .prose a {
    color: #FFD700;
    text-decoration: underline;
}

.news-detail .prose a:hover {
    color: #FF4500;
}

/* Mobile-First Responsive Styles */
@media (max-width: 767px) {

    .news-list h2,
    .news-detail h2 {
        font-size: 2.5rem;
    }

    .news-list article img,
    .related-news article img {
        height: 160px;
        /* Smaller images on mobile */
    }

    .news-list article h3,
    .related-news article h4 {
        font-size: 1.25rem;
    }

    .news-list article p,
    .news-detail .prose p {
        font-size: 0.9rem;
    }
}

@media (min-width: 768px) {
    .news-list article img {
        height: 192px;
    }

    .related-news article img {
        height: 128px;
    }
}