/*
Theme Name: GrupoSaru Theme
Author: Gemini
Description: Custom theme for GrupoSaru tailored for Elementor.
Version: 1.0.0
Text Domain: gruposaru
*/

:root {
    --primary-color: #011F41;
    --secondary-color: #f1f1f1;
    --text-color: #333;
}

body {
    font-family: "Arial", sans-serif;
    color: var(--text-color);
    margin: 0;
    padding: 0;
}

/* Footer Styles */
.site-footer {
    background-color: var(--primary-color);
    color: var(--secondary-color);
    padding: 40px 0;
}

.site-footer .container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.footer-logo img {
    max-width: 150px;
    height: auto;
}

.footer-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow-x: hidden;
    display: flex;
    gap: 20px;
}

/* Prevent Margin Collapse on Main Content usually caused by H1 or Elementor Sections */
.site-main::before {
    content: '';
    display: table;
}

html,
body {
    margin-top: 0 !important;
    overflow-x: hidden;
    width: 100%;
}

/* Header Styles */
.transparent-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background-color: transparent;
    padding: 20px 0;
}

/* Adjust for Admin Bar - Only if HTML margin is disabled */
body.admin-bar .transparent-header {
    top: 32px;
}

@media screen and (max-width: 782px) {
    body.admin-bar .transparent-header {
        top: 46px;
    }
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1130px;
    margin: 0 auto;
    padding: 0 20px;
}

.site-branding .custom-logo-link img {
    max-height: 80px;
    /* Adjust as needed */
    width: auto;
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 0px;
}

.main-navigation a {
    color: #fff;
    /* White text for transparent background */
    text-decoration: none;
    font-weight: 600;
    /* text-transform: uppercase; Removed to allow natural case */
    font-size: 14px;
    padding: 5px 15px;
    /* Added padding for hover effect */
    border-radius: 50px;
    /* Pill shape */
    transition: background-color 0.3s ease;
    /* Smooth transition */
}

.main-navigation a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    /* Transparent white background */
    color: #fff;
    /* Ensure text remains white */
}

.footer-navigation a {
    color: #fff;
    text-decoration: none;
    font-weight: 500;
}

.footer-navigation a:hover {
    text-decoration: underline;
}

.site-info {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 20px;
    font-size: 14px;
    opacity: 0.8;
}

/* -------------------------------------------
   Responsive Design
------------------------------------------- */

/* Hamburger Button */
.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
    /* Above mobile menu overlay */
    padding: 10px;
}

.menu-toggle .bar {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    /* White bars for transparent header */
    margin: 5px 0;
    transition: 0.3s;
}

.menu-toggle.active .bar:nth-child(1) {
    transform: rotate(-45deg) translate(-5px, 6px);
}

.menu-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active .bar:nth-child(3) {
    transform: rotate(45deg) translate(-5px, -6px);
}

/* Mobile Menu Media Query */
@media screen and (max-width: 768px) {

    .vector_2::after,
    .vector_1::after {
        display: none;
    }

    .menu-toggle {
        display: block;
    }

    .main-navigation {
        display: none; /* Completely removed from layout — no horizontal scroll space reserved */
        position: fixed;
        top: 0;
        right: 0;
        width: 80%;
        height: 100vh;
        background-color: var(--primary-color);
        padding-top: 80px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.5);
        animation: gs-nav-slide-out 0.3s ease forwards;
    }

    .main-navigation.toggled {
        display: block;
        animation: gs-nav-slide-in 0.3s ease forwards;
    }

    @keyframes gs-nav-slide-in {
        from { transform: translateX(100%); }
        to   { transform: translateX(0); }
    }

    @keyframes gs-nav-slide-out {
        from { transform: translateX(0); }
        to   { transform: translateX(100%); }
    }

    .main-navigation ul {
        flex-direction: column;
        gap: 0;
    }

    .main-navigation li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .main-navigation a {
        display: block;
        padding: 15px 20px;
        font-size: 16px;
    }

    /* Footer Responsive */
    .footer-content {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }

    .footer-navigation ul {
        justify-content: center;
        flex-wrap: wrap;
    }
}

.vector_1::after {
    content: "";
    position: absolute;
    width: 190px;
    height: 165px;
    border-left: none;
    top: -70px;
    right: 84%;
    z-index: 999999;
    background-image: url('assets/img/vector_1.png');
    background-repeat: no-repeat;
}

.vector_2::after {
    content: "";
    position: absolute;
    width: 190px;
    height: 165px;
    border-left: none;
    top: -27%;
    right: -20%;
    z-index: 999999;
    background-image: url('assets/img/vector_2.png');
    background-repeat: no-repeat;
}

/* -------------------------------------------
   Animations & Premium Effects
------------------------------------------- */

/* Header Scroll Transition */
.transparent-header {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.transparent-header.header-scrolled {
    background-color: rgba(1, 31, 65, 0.9); /* var(--primary-color) with opacity */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 10px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Ken Burns Effect for Hero Sections */
.gs-ken-burns {
    overflow: hidden;
    position: relative;
}

.gs-ken-burns .elementor-background-overlay,
.gs-ken-burns > .elementor-container,
.gs-ken-burns > .elementor-widget-wrap {
    z-index: 1;
}

.gs-ken-burns .elementor-background-image {
    animation: gsKenBurns 20s ease-in-out infinite alternate;
    transform-origin: center;
}

@keyframes gsKenBurns {
    0% { transform: scale(1); }
    100% { transform: scale(1.15); }
}

/* Custom AOS Overrides */
[data-aos] {
    pointer-events: none;
}

[data-aos].aos-animate {
    pointer-events: auto;
}

/* Saru Animate Helper */
.saru-animate {
    transition-property: transform, opacity;
}

/* Hide elements with saru-animate before AOS initializes to prevent flashing */
.saru-animate:not(.aos-init) {
    opacity: 0;
}

/* Ensure they are visible if JS fails or for accessibility */
.no-js .saru-animate {
    opacity: 1 !important;
}

/* Staggered Entrance Helpers */
.gs-stagger-1 { transition-delay: 0.1s; }
.gs-stagger-2 { transition-delay: 0.2s; }
.gs-stagger-3 { transition-delay: 0.3s; }
.gs-stagger-4 { transition-delay: 0.4s; }

/* Premium Hover Transitions */
.elementor-button, 
.gs-news-card, 
.gs-brand-card,
.gs-social-card {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) !important;
}

.elementor-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.15);
}

/* Image Hover Zoom Utility */
.gs-hover-zoom {
    overflow: hidden;
}

.gs-hover-zoom img {
    transition: transform 0.5s ease;
}

.gs-hover-zoom:hover img {
    transform: scale(1.1);
}

/* -------------------------------------------
   Single Post Page Styles
------------------------------------------- */

.gs-single-post {
    background-color: #f9f9f9;
}

/* Hero Section */
.gs-post-hero {
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: top;
    position: relative;
    display: flex;
    align-items: center;
    color: #ffffff;
    padding-top: 100px; /* Offset for header */
}

.gs-post-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(180deg, rgba(0, 15, 35, 0.85) 0%, rgba(0, 15, 35, 0.3) 40%, rgba(0, 15, 35, 0.85) 100%);
    z-index: 1;
}

.gs-post-hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
}

.gs-post-hero-content .container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px;
}

.gs-post-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-bottom: 20px;
}

.gs-post-category {
    padding: 5px 15px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.gs-post-date {
    font-size: 14px;
    font-weight: 500;
    opacity: 0.9;
}

.gs-post-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin: 0;
    text-shadow: 0 4px 15px rgba(0,0,0,0.5);
}

/* Body Content */
.gs-post-body {
    padding: 60px 0;
}

.gs-post-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
    box-shadow: none !important;
}

/* Ensure no other containers in the body have the blue shadow */
.gs-post-body, 
.gs-post-body > div,
.elementor-widget-container {
    box-shadow: none !important;
}

.gs-post-content-wrap {
    font-size: 1.15rem;
    line-height: 1.8;
    color: #2c3e50;
    font-family: "Montserrat", sans-serif;
    box-shadow: none !important;
    border: none !important;
}

/* Fix for empty list items or stray bullets */
.gs-post-content-wrap li:empty,
.gs-post-content-wrap li:blank,
.gs-post-content-wrap ul:empty,
.gs-post-content-wrap li:not(:has(text)):not(:has(*)) {
    display: none !important;
}

/* Prevent bullets from showing if the item is practically empty */
.gs-post-content-wrap li {
    list-style-position: outside;
}

/* Reset accidental italics if used for intro paragraphs */
.gs-post-content-wrap p:first-of-type em {
    font-style: normal;
}

.gs-post-content-wrap p {
    margin-bottom: 1.8em;
}

.gs-post-content-wrap h2, 
.gs-post-content-wrap h3 {
    color: #011E42;
    margin: 1.5em 0 0.8em;
    line-height: 1.3;
}

.gs-post-content-wrap h2 { font-size: 2.2rem; font-weight: 700; }
.gs-post-content-wrap h3 { font-size: 1.8rem; font-weight: 700; }

/* Fix for Gutenberg wp-block-list and Date Metadata */
.gs-post-content-wrap .wp-block-list {
    list-style: none;
    padding-left: 0;
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.gs-post-content-wrap .wp-block-list li {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 0;
    display: flex;
    align-items: center;
}

/* Specific styling for the date link if it's the first item */
.gs-post-content-wrap .wp-block-list li a[href*="dieselcargo.com"] {
    background: #f0f4f8;
    color: #011E42;
    padding: 4px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    pointer-events: none; /* Make it look like static text if desired, or keep it if it's a real link */
}

/* Hide empty list items in Gutenberg blocks */
.gs-post-content-wrap .wp-block-list li:empty,
.gs-post-content-wrap .wp-block-list li:blank {
    display: none !important;
}

.gs-post-content-wrap blockquote {
    border-left: 4px solid #EAA121;
    padding-left: 30px;
    margin: 40px 0;
    font-style: italic;
    color: #555;
    font-size: 1.3rem;
}

.gs-post-content-wrap img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 40px 0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Share Footer */
.gs-post-footer {
    border-top: 1px solid #eee;
    margin-top: 60px;
    padding-top: 30px;
}

.gs-post-share {
    display: flex;
    align-items: center;
    gap: 20px;
}

.gs-post-share span {
    font-weight: 700;
    color: #011E42;
}

.gs-share-links {
    display: flex;
    gap: 12px;
}

.gs-share-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #011E42;
    transition: all 0.3s ease;
}

.gs-share-links a:hover {
    background: #011E42;
    color: #fff;
    transform: translateY(-3px);
}

/* Related News */
.gs-related-news {
    background-color: #001E42;
    padding: 100px 20px;
    color: #fff;
}

.gs-container {
    max-width: 1200px;
    margin: 0 auto;
}

.gs-related-header {
    text-align: center;
    margin-bottom: 50px;
}

.gs-related-header h2 {
    font-size: 2rem;
    font-weight: 700;
    margin: 0;
}

/* News Grid & Card Styles (Global) */
.gs-news-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.gs-news-card {
    background-color: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.gs-news-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
}

.gs-news-card-img {
    height: 240px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.gs-news-tag {
    position: absolute;
    top: 20px;
    left: 20px;
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 50px;
}

.gs-news-card-content {
    padding: 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.gs-news-card-date {
    color: #001E42;
    font-size: 0.9rem;
    margin-bottom: 12px;
    font-weight: 600;
}

.gs-news-card-title {
    color: #001E42;
    font-size: 1.35rem;
    font-weight: 700;
    margin: 0 0 16px 0;
    line-height: 1.35;
}

.gs-news-card-link {
    color: #179C9E;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s;
    margin-top: auto;
}

.gs-news-card-link:hover {
    color: #0D6494;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .gs-post-title {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    .gs-post-hero {
        padding-top: 120px;
        min-height: 350px;
    }
    .gs-post-body {
        padding: 40px 0;
    }
    .gs-post-content-wrap {
        font-size: 1.05rem;
    }
}