/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
}

/* Header and Navigation */
header {
    position: fixed;
    width: 100%;
    background: white;
    padding: 0.5rem 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    z-index: 1000;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    height: 70px;
}

.nav-links a {
    text-decoration: none;
    color: #333;
    margin-left: 2rem;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a:not(.cta-button)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #828282;
    transition: width 0.3s ease;
}

.nav-links a:not(.cta-button):hover {
    color: #000;
}

.nav-links a:not(.cta-button):hover::after {
    width: 100%;
}

.cta-button {
    background: #000;
    color: white !important;
    padding: 0.5rem 1rem;
    border-radius: 4px;
}

.cta-button:hover {
    background: #474646;
    transform: translateY(-2px);
}

/* Hero Section */
.hero {
    height: 90vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.7)), url('../images/hero-bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: white;
    text-align: left;
    padding: 0 2rem;
    padding-top: 70px;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 2rem;
    width: 100%;
}

.hero h1 {
    font-size: 3rem;
    max-width: 800px;
    text-align: left;
    margin-left: 0;
    margin-top: 0;
    margin-bottom: 2rem;
    text-wrap: balance;
    line-height: 1.2;
    animation: fadeIn 1s ease-in;
}

/* About Section */
.about {
    padding: 4rem 2rem;
}

.about-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

.about-image {
    max-width: 80%;
}

.about-image img {
    width: 100%;
    height: auto;
    display: block;
}

.about-text {
    padding-top: 0;
}

.about-text h2 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.read-more {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.5rem 1rem;
    background: #000;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.read-more:hover {
    background: #333;
    transform: translateY(-2px);
}

/* Services Section */
.services {
    padding: 4rem 2rem;
    background: #f5f5f5;
}

.services h2 {
    text-align: center;
    margin-left: 0rem;
    margin-bottom: 2rem;
}

.services-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.services-grid > a,
.services-grid > div {
    display: flex;
    height: 100%;
}

.services-grid > a {
    /* Remove default link styling for grid children */
    text-decoration: none;
    color: inherit;
}

.service-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Create consistent icon space at the top of each card */
.service-card i,
.service-card .combined-icon,
.service-card .combined-icon-dist,
.service-card .combined-icon-arm {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    color: #000;
    display: block;
    height: 3rem; /* Fixed icon space height */
    transition: transform 0.3s ease;
    line-height: 1;
}

/* Position the combined icon containers more precisely */
.service-card .combined-icon,
.service-card .combined-icon-dist,
.service-card .combined-icon-arm {
    position: relative;
    width: 3rem; /* Match the width to height */
    margin-left: auto;
    margin-right: auto;
}

/* Remove any additional margins that might be causing issues */
.service-card h3 {
    margin-top: 0;
    margin-bottom: 1rem;
    text-align: center;
}

.service-card p {
    text-align: center;
}

.combined-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 1.5rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.combined-icon i.bi-truck {
    font-size: 3rem;
    color: #000;
}

.combined-icon i.bi-house {
    font-size: 1rem;
    color: #000;
    position: absolute;
    right: 1.3rem;      /* Move more to the left (increase from 0.5rem) */
    bottom: -2.2rem;     /* Move more to the top (increase from 0.5rem) */
}

/* Update hover animation */
.service-card:hover i {
    transform: scale(1.1);
}

/* Add styles for the new combined distribution icon */
.combined-icon-dist {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 1.5rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.combined-icon-dist i.bi-truck-flatbed {
    font-size: 3rem;
    color: #000;
}

.combined-icon-dist i.bi-boxes {
    font-size: 1.5rem;
    color: #000;
    position: absolute;
    right: 1.2rem;
    bottom: -1.7rem;  /* Adjust this value to position the boxes on the truck bed */
}

/* Update hover animation */
.service-card:hover .combined-icon-dist i {
    transform: scale(1.1);
}

/* Add styles for the new combined armazenamento icon */
.combined-icon-arm {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    margin-bottom: 1.5rem;
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.combined-icon-arm i.bi-building {
    font-size: 3rem;
    color: #000;
}

.combined-icon-arm i.bi-grid-3x3 {
    font-size: 1.2rem;
    color: #000;
    position: absolute;
    right: 0.9rem;
    bottom: -2.75rem;
}

/* Update hover animation */
.service-card:hover .combined-icon-arm i {
    transform: scale(1.1);
}

/* CTA Section - Reduced Height */
.cta {
    background: #000;
    color: white;
    padding: 0.5rem; /* Reduced from likely 2rem or similar */
    text-align: center;
    height: 70px; /* Explicit height setting - adjust as needed */
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-content {
    line-height: 1.2; /* Slightly reduced line height */
}

.cta-content h2 {
    font-size: 1.5rem; /* Slightly smaller heading if needed */
    margin-bottom: 0.2rem; /* Reduced margin */
}

.phone-number {
    display: inline-block;
    color: white;
    text-decoration: none;
    font-size: 1.3rem; /* Keep phone number prominent */
    margin-top: 0; /* Remove any top margin */
}

/* Footer */
footer {
    background: white;
    padding: 2rem;
    border-top: 1px solid #828282;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: right;
    margin-left: auto;
    width: fit-content;
}

.footer-links a {
    color: #000;
    text-decoration: none;
    position: relative;
    padding: 2px 0;
    transition: color 0.3s ease;
    width: fit-content;
    display: inline-block;
    margin-left: auto;
}

.footer-links a:not(.area-cliente)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    right: auto;
    background-color: #828282;
    transition: width 0.3s ease;
}

.footer-links a:not(.area-cliente):hover::after {
    width: 100%;
}

.footer-links a:hover {
    color: #000;
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.contact-info i {
    margin-right: 0.5rem;
    font-size: 1rem;
}

.contact-info p {
    transition: transform 0.3s ease;
}

.contact-info p:hover {
    transform: translateX(5px);
}

/* Remove special button styling for footer area-cliente */
.footer-links .area-cliente {
    color: #000;             /* Match other footer links */
    padding: 2px 0;         /* Match other footer links padding */
    background: none;       /* Remove black background */
    margin-left: auto;      /* Keep right alignment */
    border-radius: 0;       /* Remove border radius */
}

/* Add underline effect like other footer links */
.footer-links .area-cliente::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background-color: #828282;
    transition: width 0.3s ease;
}

.footer-links .area-cliente:hover {
    color: #000;           /* Match other footer links hover */
    transform: none;       /* Remove transform effect */
}

.footer-links .area-cliente:hover::after {
    width: 100%;          /* Add underline effect on hover */
}

/* Add these logo-specific styles */
.logo a {
    display: block;  /* Makes the entire area clickable */
    text-decoration: none;
}

.logo img {
    max-height: 50px;
    width: auto;
    display: block;
}

/* Responsive Design */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    
    .about-container {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .footer-links {
        text-align: left;
        margin-left: 0;
    }

    .footer-links a {
        margin-left: 0;
        margin-right: auto;  /* Change from margin-left: auto */
    }
    
    .hero h1 {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    font-size: 2rem;
    cursor: pointer;
    border: none;
    background: none;
    z-index: 1001;
}

/* Mobile Navigation Styles */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        left: -100%;
        height: 100vh;
        width: 100%;
        background: white;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: left 0.3s ease;
        z-index: 1000;
    }

    .nav-links.active {
        left: 0;
    }

    .nav-links a {
        margin: 0;
        font-size: 1.2rem;
    }

    /* Adjust CTA button in mobile menu */
    .nav-links .cta-button {
        margin-top: 1rem;
    }
}

/* Optional: Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Empresa Page Styles */
.empresa-hero {
    height: 60vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.7)), url('../images/empresa-bg.png');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    color: white;
    padding-top: 70px;
}

.empresa-content {
    padding: 4rem 2rem;
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
}

.history-section,
.mission-section {
    margin-bottom: 4rem;
}

.values-section {
    margin-bottom: 4rem;
    background: #f5f5f5;
    padding: 4rem 2rem;
    margin: -4rem -2rem 4rem -2rem;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.value-card {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    transition: transform 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px);
}

.value-card i {
    font-size: 2.5rem;
    color: #000;
    margin-bottom: 1rem;
}

.value-card h3 {
    margin-bottom: 1rem;
}

/* Active nav link state */
.nav-links a.active {
    color: #000;
}

.nav-links a.active::after {
    width: 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .empresa-hero h1 {
        font-size: 2rem;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
}

/* Empresa Page Styles */
.empresa-page {
    padding-top: 90px;  /* Keep this for header space */
}

.content-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4rem 2rem;  /* Match the padding from main page sections */
}

.quem-somos, .tecnologia, .zonas-servico {
    margin-bottom: 4rem;  /* Match spacing between sections on main page */
}

.quem-somos h2, .tecnologia h2, .zonas-servico h2 {
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
}

.quem-somos p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

/* Technology section */
.tech-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
    margin-top: 2rem;  /* Add consistent spacing after heading */
}

.tech-text ul {
    list-style: none;
    margin: 1rem 0;
}

.tech-text ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1rem;
}

.tech-text ul li::before {
    content: "•";
    position: absolute;
    left: 0;
}

.tech-image img {
    width: 100%;
    height: auto;
    /* Remove or comment out this line */
    /* border-radius: 8px; */
}

/* Service zones */
.zonas-grid {
    display: grid;
    grid-template-columns: auto auto;
    gap: 0;
    justify-content: flex-start;
}

.zona-column ul {
    list-style: none;
    margin-right: 10rem;  /* Increase from 0.5rem to 2rem for more space between columns */
}

.zona-column ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1rem;
    white-space: nowrap;
}

.zona-column ul li::before {
    content: "•";
    position: absolute;
    left: 0;
}

/* Add mobile styles */
@media (max-width: 768px) {
    .zonas-grid {
        grid-template-columns: 1fr;
    }

    .zona-column ul {
        margin-right: 0;  /* Remove spacing on mobile */
    }

    .zona-column ul li {
        white-space: normal;
    }
}

/* Update empresa page layout */
.empresa-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    margin-bottom: 4rem;
}

.text-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;  /* Reduce from 4rem to 2rem for less space between sections */
}

.van-image {
    position: sticky;
    top: 100px;  /* Account for header height plus some padding */
    height: fit-content;
}

.van-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Mobile responsiveness for empresa page */
@media (max-width: 768px) {
    .empresa-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .van-image {
        position: static;
        order: -1;
        max-width: 80%;  /* Match the about-image size */
        margin: 0;  /* Left-aligned */
        margin-bottom: 2rem;
    }

    .van-image img {
        width: 100%;
    }
}

/* Remove or update the 480px breakpoint since we want to match about-image behavior */
@media (max-width: 480px) {
    .van-image {
        max-width: 80%;  /* Keep consistent with larger mobile view */
    }
}

/* Update technology list styling */
.tecnologia ul {
    list-style: none;
    margin: 1rem 0;
    padding-left: 1.5rem;  /* Add left padding to align with text */
}

.tecnologia ul li {
    margin-bottom: 0.5rem;
    position: relative;
}

.tecnologia ul li::before {
    content: "•";
    position: absolute;
    left: -1.5rem;  /* Position bullet point relative to the padding */
}

/* Contactos Page Styles */
.contactos-page {
    padding-top: 90px;
}

.contactos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.contact-info-section h2 {
    margin-bottom: 2rem;
    font-size: 1.8rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.contact-item i {
    font-size: 1.5rem;
    color: #000;
}

.contact-text h3 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.contact-text p {
    line-height: 1.5;
}

.map-section {
    width: 100%;
    height: 100%;
    min-height: 450px;
}

.map-section iframe {
    border-radius: 8px;
}

/* Mobile Responsiveness for Contacts Page */
@media (max-width: 768px) {
    .contactos-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    /* Remove or comment out this part */
    /*.map-section {
        order: -1;
    }*/
}

/* Update Serviços Page Styles */
.servicos-page {
    padding-top: 90px;
}

.service-detail-wrapper {
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    padding: 4rem 0;
}

.service-detail-wrapper.grey-bg {
    background: #f5f5f5;
}

.service-detail {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.service-detail:nth-child(even) {
    direction: rtl;
}

.service-detail:nth-child(even) .service-text {
    direction: ltr;
}

.service-text h2 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
}

.service-text h3 {
    font-size: 1.2rem;
    margin: 2rem 0 1rem;
}

.service-text p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.service-text ul {
    list-style: none;
    margin-left: 1rem;
}

.service-text ul li {
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.service-text ul li::before {
    content: "•";
    position: absolute;
    left: 0;
}

.service-image img {
    width: 100%;
    height: auto;
    /* Remove or comment out this line */
    /* border-radius: 8px; */
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .service-detail {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .service-detail:nth-child(even) {
        direction: ltr;
    }

    .service-image {
        order: -1;
    }
}

/* Float Button Styles */
.float-phone {
    position: fixed;
    bottom: 40px;
    right: 40px;
    background-color: #000;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    text-align: center;
    font-size: 24px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    cursor: grab;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.float-phone:hover {
    transform: scale(1.1);
}

.float-phone i {
    transition: transform 0.3s ease;
}

.float-phone:hover i {
    transform: rotate(15deg);
}

.float-banner {
    position: fixed;
    bottom: 40px;
    right: 120px;
    background-color: #000;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 1.2rem;
    opacity: 0;
    visibility: hidden;
    transform: translateX(20px);
    transition: all 0.3s ease;
    white-space: nowrap;
    z-index: 999;
    cursor: grab;
}

/* Disable transition when we need to reposition instantly via JS */
.float-banner.no-anim {
    transition: none !important;
}

.float-banner.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.float-banner a {
    color: white;
    text-decoration: none;
}

.float-banner.dragging {
    cursor: grabbing;
}

/* Prevent text selection while dragging */
.menu-open-temp, .menu-open-temp * {
    user-select: none !important;
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .float-phone {
        bottom: 20px;
        right: 20px;
    }

    .float-banner {
        bottom: 20px;
        right: 90px;
    }
}

/* Service Table Styles */
.estafeta-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.service-table {
    width: 400px;
    margin: 2rem 0;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    border-radius: 8px;
    overflow: hidden;
}

.service-table thead {
    background: #000;
    color: white;
}

.service-table th {
    padding: 1rem;
    text-align: left;
    font-weight: 500;
    border: none;
}

.service-table th i {
    margin-right: 0.5rem;  /* Add space between icon and text */
    font-size: 1.1rem;     /* Slightly larger icons */
}

.service-table td {
    padding: 1rem;
    border-bottom: 1px solid #eee;
}

.service-table tr:last-child td {
    border-bottom: none;
}

.service-table tbody tr:nth-child(even) {
    background: #f5f5f5;
}

.service-table tbody tr:hover {
    background: #f0f0f0;
    transition: background-color 0.3s ease;
}

@media (max-width: 768px) {
    .service-table {
        width: 100%;
    }
}

/* Remove default link styles for phone and email links in contact info and contact text */
.contact-info a[href^="tel"],
.contact-info a[href^="mailto"],
.contact-text a[href^="tel"],
.contact-text a[href^="mailto"] {
    color: inherit !important;
    text-decoration: none !important;
    cursor: pointer;
}

.contact-info a[href^="tel"]:hover,
.contact-info a[href^="mailto"]:hover,
.contact-text a[href^="tel"]:hover,
.contact-text a[href^="mailto"]:hover {
    text-decoration: underline dotted;
    color: inherit !important;
}

.service-card-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

.service-card-link .service-card {
    cursor: pointer;
}
.float-phone.dragging {
    cursor: grabbing;
}
