@media screen and (max-width: 992px) {
    .hectareas-content {
        max-width: 100%;
        width: auto;
    }

    .about-text {
        order: 2;
    }
}

@media (max-width: 768px) {
    .about-text p {
        font-size: 0.8rem;
    }

    .contact-info-card,
    .contact-form-card {
        width: 100%;
        min-height: 300px;
        /* Increased minimum height for mobile */
        padding: 10px;
        /* Adjusted padding for mobile */
        margin: 10px;
        /* Added margin for mobile */
    }
}

/* Styles for both tablet and mobile */
@media screen and (max-width: 1024px) {
    .mobile-only {
        display: block;
    }

    .desktop-menu {
        display: none;
    }

    .main-header {
        position: relative;
    }

    /* Hide desktop footer on mobile */
    @media screen and (max-width: 768px) {
        .footer-desktop {
            display: none !important;
        }

        .footer-content {
            display: none !important;
        }
    }

    /* Ensure mobile footer is displayed */
    @media screen and (max-width: 768px) {
        .footer-mobile {
            display: block !important;
        }
    }

    .mobile-menu-bar {
        background-color: white;
        height: 60px;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0 10px;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 1000;
        box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
        transition: background-color 0.3s ease;
    }

    .mobile-menu-bar.active {
        background-color: #36563d;
    }

    .mobile-logo {
        height: 40px;
        display: flex;
        align-items: center;
    }

    .mobile-logo img {
        height: 100%;
        width: auto;
    }

    .menu-toggle {
        background: none;
        border: none;
        cursor: pointer;
        padding: 0;
    }

    .menu-toggle span {
        display: block;
        width: 30px;
        height: 3px;
        background-color: #36563d;
        margin: 6px 0;
        transition: 0.4s;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }

    .mobile-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: #36563d;
        z-index: 999;
        padding: 20px;
        overflow-y: auto;
        overflow-x: hidden;
    }

    .mobile-menu.active {
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
    }

    .mobile-menu ul {
        list-style-type: none;
        padding: 0;
        width: 100%;
        display: flex;
        flex-direction: column;
    }

    .mobile-menu li {
        margin-bottom: 15px;
        text-align: left;
    }

    .mobile-menu a {
        color: rgb(255, 254, 254);
        text-decoration: none;
        font-size: 18px;
        display: block;
        padding: 10px 0;
        white-space: normal;
        word-wrap: break-word;
        transition: all 0.3s ease;
    }

    .mobile-menu a:hover {
        transform: translateX(10px);
        color: #e0e0e0;
    }

    .mobile-menu li:nth-child(3) a {
        line-height: 1.5;
    }

    body.menu-open {
        overflow: hidden;
    }

    .mobile-menu li:nth-child(1) {
        order: 1;
    }

    .mobile-menu li:nth-child(2) {
        order: 2;
    }

    .mobile-menu li:nth-child(3) {
        order: 3;
    }

    .mobile-menu li:nth-child(4) {
        order: 4;
    }

    .mobile-menu li:nth-child(5) {
        order: 5;
    }

    .mobile-menu li a {
        position: relative;
        overflow: hidden;
    }

    .hectareas-content .fade-in-text {
        line-height: 1.3;
        text-align: left;
        padding-left: 1px;
        margin-left: -90px;
        margin-right: -80px;
    }
/* 
    .container,
    .row,
    [class^="col-"] {
        width: 100%;
        max-width: 100%;
        padding-left: 5px;
        padding-right: 5px;
        box-sizing: border-box;
    } */

    .about-image {
        max-height: 220px;
        /* Further reduced from 260px */
        overflow: hidden;
    }

    .about-image img {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* Reduced top and bottom margin for about section text */
    .about-text {
        margin-top: 4556660px;
        margin-bottom: 10px;
        font-size: 0.1rem;
        /* Reduced text size */
    }
}

/* Additional styles for mobile only */
@media screen and (max-width: 768px) {
    body {
        overflow-x: hidden;
    }

    .mobile-menu a {
        font-size: 16px;
    }

    /* .main-header {
        height: 35vh;
        min-height: 200px;
    } */

    .hero-image {
        height: 100%;
        width: 100%;
        object-fit: cover;
        object-position: center;
    }

    .hero-text {
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 95%;
        text-align: center;
        z-index: 2;
    }

    .hero-text p {
        line-height: 1.3;
        /* Reduced from 1.4 */
        margin: 8px;
        /* Reduced from 10px */
        color: white;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
        background-color: rgba(0, 0, 0, 0);
        padding: 8px;
        /* Reduced from 10px */
        border-radius: 5px;
    }

    .mobile-menu-bar.active {
        background-color: #ffffff;
    }

    .menu-toggle {
        display: block;
    }

    .mobile-menu {
        padding: 8px;
        /* Reduced from 10px */
    }

    /* Reduce height of hectareas image for mobile */
    #hectareas .about-image {
        max-height: 180px;
        /* Further reduced from 200px */
    }

    .hectareas-section {
        height: 40vh;
        /* Reduced from 65vh to 40vh for mobile */
    }

    .hectareas-background {
        height: 100%;
        /* Ensure the background image covers the full height */
    }

    .hectareas-content {
        padding: 15px;
    }

    .hectareas-content p {
        font-size: 1rem;
        /* Slightly reduce font size if needed */
        line-height: 1.6;
        /* Adjust line height for better readability */
    }

    .contact-form {
        padding: 15px;
    }

    .contact-form h2 {
        font-size: 1.2rem;
        /* Smaller heading */
        margin-bottom: 0.8rem;
        /* Reduced margin */
    }

    .contact-form input,
    .contact-form textarea {
        padding: 0.4rem;
        /* Smaller input padding */
        margin-bottom: 0.5rem;
        /* Reduced space between inputs */
        font-size: 0.9rem;
        /* Slightly smaller font */
    }

    .contact-form textarea {
        height: 60px;
        /* Shorter textarea */
    }

    .contact-form button {
        padding: 0.4rem 1rem;
        /* Slightly smaller button */
        font-size: 0.9rem;
        /* Smaller button text */
        margin-top: 0.5rem;
        /* Reduced top margin */
    }

    @media screen and (min-width: 769px) {
        .footer-content {
            flex-direction: row;
            justify-content: space-between;
        }

        .footer-info {
            width: auto;
            margin-left: 20px;
        }
    }

    .footer-info img[src*="Vector_line_footer.svg"] {
        display: none;
        /* Hide the Vector line footer for mobile */
    }

    .footer-social {
        display: flex;
        justify-content: center;
        gap: 15px;
    }

    .footer-social img {
        height: 24px;
        /* Adjust as needed */
        width: auto;
    }
}

/* Mobile styles */
@media screen and (max-width: 768px) {

    /* Ensure no drop shadow is applied to any images */
    img {
        /* ... existing styles ... */
        opacity: 0;
        transition: opacity 1s ease-in-out;
        box-shadow: none;
        /* Remove drop shadow */
    }

    img.visible {
        opacity: 1;
    }

    /* Add slide-in effect to text */
    .fade-in-text {
        /* ... existing styles ... */
        transform: translateY(20px);
        transition: opacity 2s ease-in-out, transform 2s ease-in-out;
    }

    .fade-in-text.visible {
        opacity: 1;
        transform: translateY(0);
    }

    /* Add animation to buttons */
    .contact-form button {
        /* ... existing styles ... */
        transition: background-color 0.3s ease, transform 0.3s ease;
    }

    .contact-form button:hover {
        /* ... existing styles ... */
        transform: translateY(-2px);
        /* Add a slight lift effect */
    }

    /* Adjust main container */
    main {
        display: flex;
        flex-direction: column;
    }

    /* Reorder sections */
    #nosotros {
        order: 1;
    }

    #sostenibilidad {
        order: 2;
    }

    #hectareas {
        order: 3;
    }

    #location {
        order: 4;
    }

    /* Adjust layout within sections */
    .about-content {
        flex-direction: column-reverse;
    }

    .about-text,
    .about-image {
        width: 100%;
    }

    /* Further reduced top and bottom margin for about section text on mobile */
    .about-text {
        margin-top: 1px;
        margin-bottom: 1px;
        font-size: 0.8rem;
        /* Reduced text size for mobile, but still readable */
    }

    .hectareas-content {
        padding: 15px;
        /* Reduced from 20px */
    }

    .location-content {
        flex-direction: column;
    }

    .map-container,
    .info-container {
        width: 100%;
    }

    /* Adjust font sizes */
    .hero-text p {
        font-size: 20px;
        /* Further reduced from 22px */
    }

    /* Add more specific styles as needed */
}

@media screen and (max-width: 768px) {
    .footer-desktop {
        display: none;
        /* Hide the desktop footer on mobile */
    }
}

@media screen and (max-width: 768px) {
    .footer-desktop {
        display: none;
        /* Hide the desktop footer on mobile */
    }
}

/* Media query for mobile devices */
@media screen and (max-width: 768px) {
    .footer-desktop {
        display: none;
        /* Hide desktop footer on mobile */
    }

    .footer-mobile {
        display: block;
        /* Show mobile footer on mobile */
    }

    /* ... rest of your mobile footer styles ... */
}

/* Mobile footer styles */
@media screen and (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        /* Stack elements vertically */
        padding: 20px 15px;
        /* Adjust padding for mobile */
        background-image: none;
        /* Remove SVG background */
        align-items: flex-start;
        /* Align items to the start */
    }

    .footer-menu-info {
        display: flex;
        justify-content: space-between;
        width: 100%;
        margin-bottom: 20px;
        flex-wrap: wrap;
        /* Allow wrapping if needed */
    }

    .footer-links,
    .footer-info {
        width: 48%;
        /* Approximately half the width each */
    }

    .footer-links {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        /* Align links to the left */
        gap: 10px;
    }

    .footer-links a {
        font-size: 14px;
        /* Adjust font size for readability */
    }

    .footer-info {
        font-size: 12px;
        /* Adjust font size for readability */
        line-height: 1.4;
        text-align: left;
        /* Align text to the left */
    }

    .footer-info p {
        margin: 5px 0;
        word-wrap: break-word;
        /* Prevent text overflow */
    }

    .footer-social {
        width: 100%;
        display: flex;
        justify-content: center;
        /* Center social icons */
        gap: 15px;
        margin-top: 20px;
    }

    .footer-social img {
        height: 20px;
        /* Adjust icon size for mobile */
    }
}

/* Mobile footer styles */
@media screen and (max-width: 768px) {
    .footer-mobile {
        display: block;
        background-color: #c1531b;
        /* Change this to your desired color */
        color: white;
        padding: 20px 15px;
    }

    .footer-mobile-logo {
        margin-bottom: 20px;
        text-align: center;
        margin-top: 10px;
    }

    .footer-mobile-logo img {
        height: 40px;
        width: auto;
    }

    .footer-mobile-content {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-mobile-links {
        display: flex;
        flex-direction: column;
        gap: 8px;
        text-align: left;
        margin-bottom: 15px;
    }

    .footer-mobile-links a {
        color: white;
        text-decoration: none;
        font-size: 13px;
    }

    .footer-mobile-info {
        font-size: 11px;
        line-height: 1.4;
        text-align: left;
        margin-bottom: 15px;
    }

    .footer-mobile-info p {
        margin: 0 0 8px 0;
    }

    .footer-mobile-social {
        display: flex;
        justify-content: center;
        gap: 10px;
        margin-top: 15px;
    }

    .footer-mobile-social img {
        height: 22px;
        width: auto;
    }
}

/* Tablet styles */
@media (max-width: 1024px) {
    .timeline-item {
        flex-direction: column;
        /* Stack items vertically */
        align-items: center;
        /* Center align items */
        justify-content: center;
        /* Center content vertically */
        margin: 20px 0;
        /* Consistent vertical margins */
        text-align: center;
        /* Center text within the item */
    }

    .timeline-item img[alt="time_line_10"] {
        order: 1;
        /* Ensure the image appears first */
        width: 100%;
        /* Make images responsive */
        height: auto;
        /* Maintain aspect ratio */
        margin-bottom: 15px;
        /* Space between image and text */
    }

    .timeline-text-3 {
        order: 2;
        /* Ensure the text appears after the image */
        padding: 0 20px;
        /* Add some padding for text */
        max-width: 800px;
        /* Limit text width for better readability */
    }

    /* Ensure the first and fifth items have a consistent order */
    .timeline-item:first-of-type,
    .timeline-item:nth-of-type(5) {
        flex-direction: column;
        /* Stack items vertically */
    }

    .timeline-item:nth-of-type(2),
    .timeline-item:nth-of-type(4),
    .nosotros img[alt="Rectangle 1"] {
        display: none;
        /* Hide specific items for this version */
    }
}

/* Mobile styles */
@media (max-width: 768px) {
    .timeline-item {
        flex-direction: column;
        /* Stack items vertically */
        margin: 20px 20px;
        /* Adjust margins for mobile */
    }

    .timeline-item img {
        width: 100%;
        /* Make images responsive */
        height: auto;
        /* Maintain aspect ratio */
        margin: 0 0 20px 0;
        /* Adjust margins for mobile */
    }

    .timeline-text {
        padding-right: 0;
        margin-right: 0;
        text-align: center;
        /* Center text for mobile */
    }

    .timeline-text-3 {
        padding-right: 0;
        margin-right: 0;
        text-align: center;
        /* Center text for mobile */
    }

    .titulo-nosotros {
        font-size: 28px;
        /* Adjust font size for mobile */
        margin-bottom: 50px;
        /* Adjust margin for mobile */
    }

    .nosotros img[alt="Rectangle 1"] {
        margin-top: 50px;
        /* Adjust margin top for mobile */
        width: 100%;
        /* Make the image take 100% of the width */
        height: auto;
        /* Maintain aspect ratio */
    }
}

@media (max-width: 1024px) {
    .timeline-item {
        display: flex;
        flex-direction: column;
        /* Stack items vertically with image first, then text */
        align-items: center;
        /* Center align items for a balanced look */
        margin: 20px 0;
        /* Consistent vertical margins */
        text-align: center;
        /* Center text within the item */
    }

    .timeline-item img {
        width: 90%;
        /* Slightly reduce width for better spacing */
        height: auto;
        /* Maintain aspect ratio */
        margin-bottom: 15px;
        /* Space between image and text */
        border-radius: 10px;
        /* Optional: add rounded corners */
    }

    .timeline-text,
    .timeline-text-3 {
        padding: 0 20px;
        /* Add some padding for text */
        max-width: 800px;
        /* Limit text width for better readability */
    }

    .timeline-item:nth-of-type(2),
    .timeline-item:nth-of-type(4),
    .nosotros img[alt="Rectangle 1"] {
        /* Hide rectangle SVG */
        display: none;
        /* Hide specific items for this version */
    }
}

@media (min-width: 1025px) {
    .nosotros img[alt="Rectangle 1"] {
        display: block;
        /* Ensure rectangle SVG is visible on desktop */
    }
}

@media (max-width: 1024px) {
    .white-line-nosotros {
        border: 1px solid white;
        /* Remove default border */
        border-top: 2px solid white;
        /* Add a white line */
        margin: 20px 0;
        /* Add some vertical spacing */
        width: 100%;
        /* Ensure the line spans the full width */
    }
}

@media (min-width: 1025px) {
    .white-line-nosotros {
        display: block;
        /* Show the white line on desktop */
    }
}

/* Show the line on mobile and tablet devices */
@media (max-width: 1024px) {
    .white-line-nosotros {
        display: block;
        /* Make the line visible */
        border: none;
        /* Remove default border */
        border-top: 2px solid white;
        /* Add a white line */
        margin: 20px 0;
        /* Add some vertical spacing */
    }
}

/* Mobile-specific styles */
@media (max-width: 767px) {
    p {
        text-align: left;
        /* Align text to the center */
    }

    .timeline-text-3 {
        margin-top: 10px;
        margin-bottom: 3px;
        padding-bottom: 10px;
        padding-left: 10px;
        margin-left: 10px;
    }

    .titulo-nosotros {
        margin-top: 10px;
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .white-line-nosotros {
        display: block;
        /* Ensure the line is visible */
        border: none;
        /* Remove default border */
        border-top: 2px solid white;
        /* Add a white line */
        margin: 20px 0;
        /* Add some vertical spacing */
    }

    .responsive-image {
        height: 100px;
        /* Set a specific height for images on mobile */
        object-fit: cover;
        /* Ensure the image covers the set height */
        width: 100%;
        /* Ensure images are responsive */
    }
}

@media (max-width: 1024px) {

    /* Tablet and mobile styles for filosofia section */
    .filosofia-container {
        flex-direction: column;
        /* Stack items vertically */
        align-items: center;
        /* Adjust padding for mobile and tablet */
        text-align: center;
        /* Center align the text */
    }

    .filosofia-container h2 {
        order: -1;
        /* Ensure the title appears first */
        margin-bottom: 20px;
        /* Add some space below the title */
        padding-left: 0;
        /* Move the text a little to the right */
        padding-bottom: 0;
        /* Add padding bottom to the title */
        text-align: center;
        /* Center align the title */
        opacity: 1;
        /* Ensure the text is visible */
        animation: none;
        /* Remove animation for mobile */
    }

    .filosofia-container p {
        max-width: 100%;
        order: 0;
        /* Ensure the text appears after the title */
        margin-bottom: 20px;
        /* Add some space below the text */
        padding-left: 30px;
        /* Move the text a little to the right */
        padding-right: 30px;
        /* Add some padding to the right */
        text-align: center;
        /* Center align the text */
        opacity: 1;
        /* Ensure the text is visible */
        animation: none;
        /* Remove animation for mobile */
    }

    .linea-filosofia {
        display: none;
        /* Hide the line for mobile and tablet */
    }
}

@media (max-width: 767px) {
    .enfoque-container img {
        content: url("../images/sostenibilidad-enfoque.jpg");
        /* Change the image for mobile version */
        width: 700%;
        /* Increase the width to make the image even bigger */
        height: auto;
        /* Maintain aspect ratio */
        margin-bottom: 1px;
        display: block;
        text-align: center;
        /* Center the image */
    }
}

@media (max-width: 1024px) {
        .hero-text {
                top: 60%;
                transform: translate(-50%, -60%);
            }
                        .hero-text p{
                            margin: 0 auto;
                        }

    /* Tablet and mobile styles for enfoque section */
    .enfoque-container {
        display: flex;
        flex-direction: column;
        /* Stack items vertically */
        align-items: center;
        /* Center align items */
        padding: 60px 35px;
        /* Adjust padding for mobile and tablet */
        text-align: center;
        /* Center align the text */
    }

    .enfoque-container img {
        order: -1;
        width: 120%;
        /* Increase width to allow more width for mobile version */
        height: 100%;
        /* Maintain aspect ratio */
        margin-bottom: 0;
        display: block;
        text-align: center;
        /* Center the image */
    }

    .enfoque-container p {
        order: 0;
        /* Ensure the text appears after the image */
        margin-bottom: 20px;
        /* Add some space below the text */
        padding-left: 1px;
        /* Move more to the left */
        padding-right: 30px;
        /* Adjust padding to better fit the center */
        text-align: center;
        /* Center align the text */
        margin-left: -10px;
        /* Move more to the left */
        margin-right: auto;
        /* Center the text horizontally */
        opacity: 1;
        /* Ensure the text is visible */
        animation: none;
        /* Remove animation for mobile */
    }

    .enfoque-text h2 {
        text-align: center;
        margin-left: 0px;
        margin-right: 0px;
        padding-left: 0px;
        padding-right: 70px;
        opacity: 1;
        /* Ensure the text is visible */
        animation: none;
        /* Remove animation for mobile */
    }
}

@media (max-width: 1024px) {

    /* Tablet and mobile styles for practica section */
    .practica-cards {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        /* Center the cards */
        gap: 20px;
        padding-left: 40px;
        /* Move the cards more to the right */
        padding-right: 20px;
        margin-left: 0px;
        /* Add left margin to make 2 rows */
        margin-right: 0px;
        /* Add right margin to make 2 rows */
        margin-bottom: 0px;
        /* Add margin to separate rows */
    }
}

@media (max-width: 767px) {

    /* Mobile-specific styles */
    .filosofia-container h2,
    .enfoque-container h2,
    .practica-cards h2,
    .filosofia-container p,
    .enfoque-container p,
    .practica-cards p {
        text-align: left;
        /* Align text to the left */
    }
}

@media (max-width: 1024px) {
    .news-section {
        height: auto;
        /* Adjust height for tablet version */
    }

    .news-container {
        display: flex;
        flex-wrap: wrap;
        /* Allow wrapping for two columns */
        justify-content: space-between;
        /* Distribute space between the cards */
    }

    .news-card {
        flex: 0 0 35%;
        /* Make the cards smaller for tablet version */
        margin: 0.25%;
        /* Reduced margin to decrease gap between rows */
    }
}

@media (max-width: 768px) {
    .news-section {
        height: auto;
        /* Adjust height for mobile version */
    }

    .news-container {
        flex-direction: column;
        /* Arrange in one column */
        align-items: center;
        /* Center align the cards */
    }

    .news-card {
        width: 80%;
        /* Make the cards thinner for mobile version */
    }
}

@media (max-width: 768px) {
    .news-content {
        padding: 20px;
    }

    .news-title {
        font-size: 2rem;
    }

    .news-article {
        font-size: 1rem;
    }

    .news-article img {
        max-height: 180px;
    }

    .news-card {
        width: 200px;
    }

    .news-card .news-image {
        height: 120px;
    }
}

@media (max-width: 768px) {
    .news-content {
        padding: 20px;
    }

    .news-title {
        font-size: 2rem;
    }

    .news-article {
        font-size: 1rem;
    }

    .news-article img {
        max-height: 180px;
    }

    .news-card {
        width: 200px;
        /* Same width as in noticia.html for mobile */
    }

    .news-card .news-image {
        height: 120px;
        /* Same height as in noticia.html for mobile */
    }
}