/* 
   AMECO Website Responsive Styles
   Media queries and responsive adjustments for the AMECO website
*/

/* Large Screens (1200px and up) */
@media screen and (min-width: 1200px) {
    .container {
        max-width: 1140px;
    }
}

/* Medium Screens (992px to 1199px) */
@media screen and (max-width: 1199px) {
    .container {
        max-width: 960px;
    }
    
    h1 {
        font-size: 2.8rem;
    }
    
    h2 {
        font-size: 2.2rem;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .services-grid,
    .figures-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .service-card:last-child {
        grid-column: span 3;
        max-width: 400px;
        margin: 0 auto;
    }
    
    .footer-grid {
        grid-template-columns: 1.5fr 1fr 1fr 1fr;
        gap: 30px;
    }
}

/* Small Screens (768px to 991px) */
@media screen and (max-width: 991px) {
    .container {
        max-width: 720px;
    }
    
    h1 {
        font-size: 2.5rem;
    }
    
    h2 {
        font-size: 2rem;
    }
    
    h3 {
        font-size: 1.6rem;
    }
    
    .hero-content h1 {
        font-size: 2.8rem;
    }
    
    .hero-content p {
        font-size: 1.1rem;
    }
    
    .presentation-content,
    .esg-content,
    .mauritania-content,
    .about-content,
    .service-detail-content,
    .expertise-content,
    .approach-content,
    .careers-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .presentation-image,
    .esg-image,
    .mauritania-map,
    .about-image,
    .service-detail-image,
    .expertise-image,
    .approach-image,
    .careers-image {
        order: -1;
    }
    
    .services-grid,
    .figures-grid,
    .expertise-grid,
    .values-grid,
    .team-grid,
    .projects-grid,
    .news-grid,
    .resources-grid,
    .case-studies-grid,
    .contact-info-grid,
    .careers-values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .service-card:last-child {
        grid-column: span 2;
    }
    
    .esg-values {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
    
    .footer-about {
        grid-column: span 2;
    }
    
    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-legal {
        margin-top: 15px;
    }
    
    .footer-legal a {
        margin: 0 10px;
    }
    
    .features-list {
        grid-template-columns: 1fr;
    }
    
    .approach-pillars {
        grid-template-columns: 1fr;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    .form-group.full-width {
        grid-column: span 1;
    }
    
    .form-submit {
        grid-column: span 1;
    }
    
    .news-insights-tabs {
        flex-wrap: wrap;
    }
    
    .tab-button {
        margin-bottom: 10px;
    }
}

/* Extra Small Screens (576px to 767px) */
@media screen and (max-width: 767px) {
    .container {
        max-width: 540px;
    }
    
    h1 {
        font-size: 2.2rem;
    }
    
    h2 {
        font-size: 1.8rem;
    }
    
    h3 {
        font-size: 1.4rem;
    }
    
    .hero {
        padding: 150px 0 100px;
    }
    
    .hero-content h1 {
        font-size: 2.3rem;
    }
    
    .hero-content p {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .btn {
        width: 100%;
    }
    
    .presentation-buttons {
        flex-direction: column;
        gap: 15px;
    }
    
    .services-grid,
    .figures-grid,
    .expertise-grid,
    .values-grid,
    .team-grid,
    .projects-grid,
    .news-grid,
    .resources-grid,
    .case-studies-grid,
    .contact-info-grid,
    .careers-values-grid {
        grid-template-columns: 1fr;
    }
    
    .service-card:last-child {
        grid-column: span 1;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-about {
        grid-column: span 1;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form input {
        border-radius: var(--border-radius);
        margin-bottom: 10px;
    }
    
    .newsletter-form button {
        border-radius: var(--border-radius);
        width: 100%;
        padding: 12px;
    }
    
    .page-banner {
        padding: 120px 0 60px;
    }
    
    .job-meta {
        flex-direction: column;
        gap: 10px;
    }
    
    .job-card {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .job-apply {
        margin-top: 20px;
        width: 100%;
        text-align: center;
    }
    
    /* Expertise page specific adjustments for mobile */
    .expertise-overview .expertise-content {
        display: flex;
        flex-direction: column;
    }
    
    .expertise-overview .expertise-text {
        width: 100%;
        order: 1;
    }
    
    .expertise-overview .expertise-image {
        width: 100%;
        order: 2;
        margin-top: 30px;
    }
    
    .expertise-approach .approach-content {
        display: flex;
        flex-direction: column;
    }
    
    .expertise-approach .approach-text {
        width: 100%;
        order: 2;
    }
    
    .expertise-approach .approach-image {
        width: 100%;
        order: 1;
        margin-bottom: 30px;
    }
    
    /* Ensure text uses full width on mobile */
    .expertise-overview .expertise-text p,
    .expertise-approach .approach-text p,
    .expertise-areas .expertise-card p {
        width: 100%;
        box-sizing: border-box;
    }
    
    /* Fix for expertise areas section on mobile */
    .expertise-areas .expertise-card {
        padding: 25px;
        width: 100%;
        box-sizing: border-box;
    }
}

/* Mobile Screens (Up to 575px) */
@media screen and (max-width: 575px) {
    .container {
        width: 100%;
        padding: 0 15px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    h2 {
        font-size: 1.6rem;
    }
    
    h3 {
        font-size: 1.3rem;
    }
    
    .section {
        padding: 60px 0;
    }
    
    .hero {
        padding: 120px 0 80px;
    }
    
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .section-title p {
        font-size: 1rem;
    }
    
    .chatbot {
        width: 300px;
        height: 450px;
        bottom: 20px;
        right: 20px;
    }
}

/* Header and Navigation Responsive Styles */
@media screen and (max-width: 991px) {
    .mobile-menu-toggle {
        display: block;
        font-size: 1.5rem;
        color: var(--dark-color);
        cursor: pointer;
    }
    
    .main-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 280px;
        height: calc(100vh - 80px);
        background-color: white;
        flex-direction: column;
        align-items: flex-start;
        padding: 20px;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 1000;
    }
    
    .main-menu.active {
        left: 0;
    }
    
    .main-menu li {
        width: 100%;
        margin: 0;
        border-bottom: 1px solid var(--border-color);
    }
    
    .main-menu li a {
        padding: 12px 0;
    }
    
    .dropdown {
        position: static;
        width: 100%;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        padding: 0;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }
    
    .dropdown.active {
        max-height: 500px;
    }
    
    .dropdown li a {
        padding-left: 20px;
    }
    
    .has-dropdown {
        position: relative;
    }
    
    .dropdown-toggle {
        position: absolute;
        right: 0;
        top: 12px;
        font-size: 1.2rem;
        cursor: pointer;
        transition: transform 0.3s ease;
    }
    
    .dropdown-toggle.active {
        transform: rotate(180deg);
    }
}

/* Fix for mobile menu on very small screens */
@media screen and (max-width: 360px) {
    .main-menu {
        width: 250px;
    }
    
    .logo img {
        height: 40px;
    }
    
    header .container {
        padding: 10px;
    }
}
