@media (max-width: 992px) {
    .compliance-grid {
        gap: 35px;
    }

    .compliance-card {
        padding: 40px;
    }

    .compliance-icon {
        width: 130px;
        height: 130px;
    }

    .compliance-icon i {
        font-size: 28px;
    }

    .compliance-icon-img {
        width: 100%;
        height: 100%;
    }

    .card-top h4 {
        font-size: 1.25rem;
    }

    .card-label {
        font-size: 0.9rem;
    }

    .card-desc {
        font-size: 1rem;
    }

    .dc3-list li {
        font-size: 1rem;
    }
}

@media (max-width: 768px) {
    .compliance-section {
        padding: 80px 0;
    }

    .compliance-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "repse"
            "nom01"
            "nom22"
            "dc3";
        gap: 30px;
    }

    .compliance-header {
        margin-bottom: 30px;
    }

    .compliance-intro {
        font-size: 1rem;
    }

    .compliance-section .reveal,
    .compliance-section .reveal.active {
        opacity: 1;
        transform: none;
    }

    .compliance-card {
        padding: 35px;
    }

    .card-top {
        gap: 20px;
        margin-bottom: 25px;
    }

    .compliance-icon {
        width: 110px;
        height: 110px;
    }

    .compliance-icon i {
        font-size: 26px;
    }

    .compliance-icon-img {
        width: 100%;
        height: 100%;
    }

    .card-top h4 {
        font-size: 1.1rem;
    }

    .card-label {
        font-size: 0.88rem;
    }

    .card-desc {
        font-size: 0.98rem;
    }

    .dc3-list li {
        font-size: 0.98rem;
    }

    .repse-actions {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .repse-qr {
        width: 110px;
        height: 110px;
    }

    .repse-qr img {
        width: 100px;
        height: 100px;
    }
}

@media (max-width: 600px) {
    .compliance-section {
        padding: 60px 0;
    }

    .compliance-grid {
        gap: 25px;
    }

    .repse-qr {
        width: 102px;
        height: 102px;
    }

    .repse-qr img {
        width: 92px;
        height: 92px;
    }

    .compliance-card {
        padding: 25px;
    }

    .card-top {
        gap: 15px;
        margin-bottom: 20px;
    }

    .compliance-icon {
        width: 90px;
        height: 90px;
    }

    .compliance-icon i {
        font-size: 22px;
    }

    .compliance-icon-img {
        width: 100%;
        height: 100%;
    }

    .card-top h4 {
        font-size: 1.05rem;
    }

    .card-label {
        font-size: 0.85rem;
    }

    .card-desc,
    .dc3-list li {
        font-size: 0.9rem;
    }

    .repse-btn {
        padding: 10px 18px;
        font-size: 0.8rem;
    }

    .norm-tag {
        padding: 8px 14px;
        font-size: 0.75rem;
    }
}

@media (max-width: 768px) {
    .contact-section {
        background-attachment: scroll;
    }

    .marcas-optimas,
    .energy-flow-section {
        background-color: var(--bg-light);
        background-image: url('../img/fondorayo.jpeg');
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        background-blend-mode: multiply;
        background-attachment: scroll;
    }

    .marcas-optimas::before,
    .energy-flow-section::before {
        content: '';
        position: absolute;
        inset: 0;
        background: linear-gradient(135deg, rgba(10, 20, 38, 0.78), rgba(10, 20, 38, 0.58));
        pointer-events: none;
    }

    .marcas-wrapper,
    .energy-flow-section .container {
        position: relative;
        z-index: 2;
    }

    .energy-flow-section .scope-card {
        background: rgba(9, 18, 35, 0.82);
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

@media (max-width: 992px) {

    .two-column-grid,
    .services-grid {
        grid-template-columns: 1fr;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 50px;
        padding: 0 25px;
    }

    .contact-info-section {
        order: 2;
    }

    .contact-card-info {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .form-section {
        order: 1;
    }

    .form-container {
        padding: 40px;
    }

    .form-header {
        margin-bottom: 28px;
    }

    .form-title {
        font-size: 1.6rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .btn-submit {
        padding: 14px 32px;
        font-size: 0.93rem;
    }

    .image-content {
        order: 2;
    }

    .text-content {
        order: 1;
    }

    .image-content img {
        max-height: 350px;
        object-fit: cover;
    }

    #quienes-somos .image-content img,
    #quienes-somos .image-content::after {
        width: 78%;
    }

    .hero-content h1 { font-size: 2.8rem; }
    .hero-content h2 { font-size: 2rem; }
}

@media (max-width: 768px) {

    .header-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
        flex-wrap: wrap;
    }

    .logo {
        flex: 1;
        min-width: 0;
        gap: 3px;
    }

    .logo img {
        max-height: 38px;
    }

    .logo-tagline {
        display: block;
        font-size: 0.54rem;
        line-height: 1.2;
        letter-spacing: 0.45px;
        max-width: 150px;
        white-space: normal;
    }

    .menu-toggle {
        display: inline-flex;
        order: 3;
        margin-left: auto;
        position: relative;
        z-index: 1105;
        background: rgba(19, 29, 51, 0.8);
        border: 1.5px solid rgba(241, 196, 15, 0.78);
        box-shadow: 0 10px 18px rgba(0, 0, 0, 0.28);
    }

    .menu-toggle span {
        display: block;
        width: 22px;
        height: 3px;
        background: #f1c40f;
    }

    .site-nav {
        order: 4;
        width: 100%;
        flex: 0 0 100%;
        display: none;
        margin-top: 6px;
    }

    .site-nav.is-open {
        display: block;
    }

    .site-nav .nav-menu {
        display: flex;
        flex-direction: column;
        gap: 0;
        width: 100%;
        padding: 10px 0;
        background: linear-gradient(180deg, rgba(19, 29, 51, 0.99) 0%, rgba(26, 43, 76, 0.99) 100%);
        border: 1px solid rgba(241, 196, 15, 0.18);
        border-radius: 14px;
        box-shadow: 0 18px 36px rgba(0, 0, 0, 0.28);
        overflow: hidden;
    }

    .site-nav .nav-menu li {
        width: 100%;
    }

    .site-nav .nav-menu li a {
        display: block;
        width: 100%;
        padding: 14px 18px;
        font-size: 0.95rem;
    }

    .site-nav .nav-menu li a::after {
        display: none;
    }

    .site-nav .nav-menu li + li {
        border-top: 1px solid rgba(255, 255, 255, 0.08);
    }

    .mobile-nav-item {
        display: block;
    }

    header .btn {
        display: none;
    }

    .hero-content { text-align: center; }

    .hero-buttons { justify-content: center; }

    .section-title {
        font-size: 1.8rem;
        display: block;
        width: 100%;
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .text-content,
    #servicios .container,
    #quienes-somos .text-content {
        text-align: center;
    }

    .text-content .btn {
        margin-left: auto;
        margin-right: auto;
    }

    /* === CONTACT RESPONSIVE === */
    .contact-section {
        padding: 70px 0;
    }

    .contact-wrapper {
        grid-template-columns: 1fr;
        gap: 50px;
    }

    .contact-title {
        font-size: 1.5rem;
    }

    .contact-subtitle {
        font-size: 0.95rem;
    }

    .contact-card-info {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 34px;
    }

    .contact-card-info .contact-item {
        gap: 16px;
        min-height: auto;
    }

    .contact-card-info .contact-item-icon {
        width: 50px;
        height: 50px;
    }

    .contact-card-info .contact-item-icon i {
        font-size: 20px;
    }

    .contact-card-info .contact-item-content h4 {
        font-size: 1.05rem;
    }

    .contact-card-info .emergency-item .phone-link {
        font-size: 1.05rem;
    }

    .contact-card-info .contact-item-content p,
    .contact-card-info .contact-item-content a {
        font-size: 0.95rem;
    }

    .form-container {
        padding: 35px;
    }

    .form-header {
        margin-bottom: 28px;
        padding-bottom: 20px;
    }

    .form-title {
        font-size: 1.5rem;
    }

    .form-subtitle {
        font-size: 0.9rem;
    }

    .modern-form {
        gap: 20px;
    }

    .form-group label {
        font-size: 0.8rem;
    }

    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 12px 14px;
        font-size: 0.9rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .btn-submit {
        padding: 12px 24px;
        font-size: 0.9rem;
    }

    .service-card {
        padding: 16px;
    }

    .service-card .icon-box {
        height: 180px;
    }

    .image-content img {
        max-height: 300px;
    }

    #quienes-somos .image-content img,
    #quienes-somos .image-content::after {
        width: 88%;
    }

    .two-column-grid {
        gap: 30px;
    }
}

@media (max-width: 600px) {

    .logo-tagline {
        font-size: 0.5rem;
        max-width: 128px;
    }

    .section-title {
        text-align: center;
    }

    .contact-wrapper {
        padding: 0 20px;
        gap: 35px;
    }

    .contact-card-info {
        padding: 26px;
        gap: 12px;
    }

    .contact-title {
        font-size: 1.3rem;
    }

    .contact-subtitle {
        font-size: 0.9rem;
        margin-bottom: 12px;
    }

    .contact-card-info .contact-item {
        padding: 15px;
        gap: 14px;
    }

    .contact-card-info .contact-item-icon {
        width: 48px;
        height: 48px;
    }

    .contact-card-info .contact-item-icon i {
        font-size: 18px;
    }

    .contact-card-info .contact-item-content h4 {
        font-size: 0.95rem;
    }

    .contact-card-info .contact-item-content p,
    .contact-card-info .contact-item-content a {
        font-size: 0.85rem;
    }

    .contact-card-info .emergency-item .emergency-note {
        font-size: 0.78rem;
    }

    .contact-card-info .emergency-item .phone-link {
        font-size: 0.95rem;
    }

    .form-container {
        padding: 28px;
    }

    .form-header {
        margin-bottom: 24px;
        padding-bottom: 16px;
    }

    .form-title {
        font-size: 1.3rem;
    }

    .form-subtitle {
        font-size: 0.85rem;
    }

    .modern-form {
        gap: 16px;
    }

    .form-group label {
        font-size: 0.75rem;
    }

    .form-group select {
        padding: 11px 13px;
        font-size: 0.88rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .btn-submit {
        padding: 13px 28px;
        font-size: 0.88rem;
        gap: 8px;
    }

    .service-card {
        padding: 14px;
    }

    .service-card .icon-box {
        height: 165px;
        border-radius: 10px;
    }

    .btn-text {
        flex-direction: column;
    }

    .form-group input,
    .form-group textarea {
        padding: 12px 0;
        font-size: 0.9rem;
    }

    #mainContactForm .btn-yellow {
        padding: 10px 24px;
        font-size: 0.8rem;
        letter-spacing: 0.5px;
    }

    .image-content img {
        max-height: 280px;
    }

    #quienes-somos .image-content img,
    #quienes-somos .image-content::after {
        width: 92%;
    }

    .two-column-grid {
        gap: 25px;
    }

    section {
        padding: 60px 0;
    }
}

@media (max-width: 480px) {

    .image-content img {
        max-height: 250px;
    }

    .hero-content h1 {
        font-size: 2.05rem;
        line-height: 1.12;
    }

    .hero-content h2 {
        font-size: 1.45rem;
        margin: 14px 0 18px;
    }

    .hero-content p {
        font-size: 0.95rem;
        line-height: 1.62;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .hero-buttons .btn {
        width: 100%;
        text-align: center;
    }

    .section-title {
        font-size: 1.55rem;
        line-height: 1.25;
    }

    .services-grid {
        gap: 16px;
    }

    .service-card .icon-box {
        height: 150px;
    }

    .compliance-card {
        padding: 20px;
    }

    .contact-wrapper {
        padding: 0 14px;
        gap: 28px;
    }

    .contact-card-info {
        padding: 18px;
    }

    .form-container {
        padding: 20px;
    }

    .project-modal-content {
        margin: 5vh auto;
        padding: 12px 34px 14px;
    }

    .project-modal-close,
    .project-modal-nav {
        width: 32px;
        height: 32px;
    }

}

@media (max-width: 1200px) {
    .energy-diagram {
        grid-template-columns: repeat(4, 1fr);
        gap: 40px;
    }
}

@media (max-width: 992px) {
    .energy-flow-section {
        padding: 120px 0;
        min-height: 550px;
    }

    .energy-diagram {
        grid-template-columns: repeat(3, 1fr);
        gap: 35px;
    }

    .energy-node.is-active .energy-icon {
        width: 188px;
        height: 188px;
    }

    .energy-node.is-small .energy-icon {
        width: 80px;
        height: 80px;
    }

    .scope-list {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .energy-flow-section {
        padding: 100px 0;
        min-height: 500px;
    }

    .marcas-optimas,
    .energy-flow-section {
        background-size: cover;
        background-attachment: scroll;
    }

    .marcas-optimas {
        background-position: center;
    }

    .energy-flow-section {
        background-position: 80% center;
    }

    .energy-flow-section .energy-icon {
        width: 168px;
        height: 168px;
    }

    .energy-flow-section .energy-icon-img {
        width: 90%;
        height: 90%;
    }

    .energy-diagram {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .energy-mini-hint {
        margin-top: -24px;
        margin-bottom: 10px;
        font-size: 0.68rem;
    }

    .energy-diagram::before {
        display: none;
    }

    .energy-node.is-active .energy-icon {
        width: 196px;
        height: 196px;
    }

    .energy-node.is-small .energy-icon {
        width: 94px;
        height: 94px;
    }

    .energy-node.is-left,
    .energy-node.is-right {
        transform: none;
    }

    .energy-scope-stage {
        margin-top: 24px;
    }

    .scope-card {
        padding: 18px 16px;
    }

    .scope-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .scope-head h4 {
        font-size: 0.8rem;
    }

    .scope-list li {
        font-size: 0.81rem;
    }
}

@media (max-width: 600px) {
    .energy-flow-section {
        padding: 80px 0;
        min-height: 450px;
    }

    .energy-flow-section .energy-icon {
        width: 176px;
        height: 176px;
    }

    .energy-flow-section .energy-icon-img {
        width: 91%;
        height: 91%;
    }

    .marcas-optimas,
    .energy-flow-section {
        background-position: 80% center;
        background-size: auto 100%;
        background-attachment: fixed;
    }

    .energy-diagram {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .energy-mini-hint {
        margin-top: -16px;
        margin-bottom: 12px;
        font-size: 0.64rem;
        letter-spacing: 0.35px;
    }

    .energy-diagram.has-selection .energy-node {
        opacity: 1;
    }

    .energy-node.is-active .energy-icon {
        width: 204px;
        height: 204px;
    }

    .energy-node.is-small .energy-icon {
        width: 130px;
        height: 130px;
    }

    .energy-icon {
        margin-bottom: 10px;
    }

    .energy-node {
        max-width: 280px;
        margin: auto;
    }

    .energy-node h4,
    .energy-node p {
        min-height: auto;
        max-width: 100%;
    }

    .scope-badge {
        font-size: 0.67rem;
        padding: 6px 10px;
    }

    .scope-list li {
        font-size: 0.78rem;
        line-height: 1.5;
    }

    .energy-scope-stage.is-inline {
        margin-top: 6px;
        margin-bottom: 8px;
    }
}

@media (max-width: 480px) {
    .marcas-optimas,
    .energy-flow-section {
        background-attachment: scroll;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
    }
}

@media (max-width: 992px) {
    .footer-map-container {
        height: 320px;
        border-top: 3px solid var(--accent-yellow);
    }

    .footer-info-card {
        grid-template-columns: 1fr;
        gap: 28px;
        padding: 32px 36px;
        border-top: 2px solid var(--accent-yellow);
    }

    .footer-info-item:not(:last-child)::after {
        display: none;
    }

    .footer-content-overlay {
        bottom: 18px;
    }

    .footer-logo img {
        width: 85px;
        height: 85px;
    }
}

@media (max-width: 768px) {
    .footer-map-container {
        height: 300px;
        border-top: 3px solid var(--accent-yellow);
    }

    .footer-content-overlay {
        bottom: 14px;
        width: 94%;
    }

    .footer-info-card {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 28px 24px;
        border-top: 2px solid var(--accent-yellow);
    }

    .footer-info-item {
        gap: 14px;
    }

    .footer-info-item p {
        max-width: 100%;
    }

    .footer-info-item h4 {
        font-size: 0.95rem;
    }

    .footer-info-item p {
        font-size: 0.88rem;
    }

    .footer-logo {
        bottom: 14px;
        left: 14px;
        padding: 0;
    }

    .footer-logo img {
        width: 75px;
        height: 75px;
    }
}

@media (max-width: 600px) {
    .footer-map-container {
        height: 280px;
        border-top: 3px solid var(--accent-yellow);
    }

    .footer-content-overlay {
        bottom: 12px;
        width: 92%;
    }

    .footer-info-card {
        grid-template-columns: 1fr;
        gap: 20px;
        padding: 20px 18px;
        border-top: 2px solid var(--accent-yellow);
    }

    .footer-info-item {
        gap: 12px;
    }

    .footer-info-item p {
        max-width: 100%;
    }

    .footer-info-item i {
        font-size: 22px;
    }

    .footer-info-item h4 {
        font-size: 0.88rem;
    }

    .footer-info-item p {
        font-size: 0.82rem;
    }

    .footer-logo {
        bottom: 12px;
        left: 12px;
        padding: 0;
    }

    .footer-logo img {
        width: 65px;
        height: 65px;
    }
}

@media (max-width: 992px) {
    .nosotros-hero-bg {
        transform: scale(1.5);
    }

    .nosotros-hero-title {
        font-size: 2.5rem;
    }

    .about-intro {
        gap: 50px;
    }

    .about-icon {
        width: 180px;
        height: 130px;
    }

    .team-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }

    .team-card {
        padding: 35px 28px;
    }

    .mission-vision-grid {
        gap: 40px;
    }

    .values-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nosotros-hero {
        min-height: 50vh;
    }

    .nosotros-hero-bg {
        transform: scale(1.56);
    }

    .nosotros-hero-title {
        font-size: 2rem;
    }

    .nosotros-hero-subtitle {
        font-size: 1.1rem;
    }

    .about-section {
        padding: 60px 0;
    }

    .about-intro {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    .about-icon {
        width: 150px;
        height: 110px;
    }

    .about-text .section-title::after {
        left: 50%;
        transform: translateX(-50%);
    }

    .team-section {
        padding: 60px 0;
    }

    .team-intro {
        font-size: 1rem;
        margin-bottom: 40px;
    }

    .team-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }

    .team-card {
        padding: 30px 24px;
    }

    .team-icon {
        width: 80px;
        height: 80px;
    }

    .team-icon i {
        font-size: 36px;
    }

    .team-name {
        font-size: 1.15rem;
    }

    .team-position {
        font-size: 0.9rem;
    }

    .mission-vision-section {
        padding: 60px 0;
    }

    .mission-vision-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .mission-vision-card {
        padding: 40px 30px;
    }

    .mv-icon {
        width: 90px;
        height: 90px;
    }

    .mv-icon i {
        font-size: 40px;
    }

    .mission-vision-card h3 {
        font-size: 1.5rem;
    }

    .mission-vision-card p {
        font-size: 1rem;
    }

    .values-section {
        padding: 60px 0;
    }

    .center-title {
        margin-bottom: 50px;
    }

    .values-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .value-item {
        padding: 35px 24px;
    }

    .value-icon {
        width: 80px;
        height: 80px;
    }

    .value-icon i {
        font-size: 36px;
    }

    .value-item h4 {
        font-size: 1.25rem;
    }

    .value-item p {
        font-size: 0.95rem;
    }
}

@media (max-width: 992px) {
    .projects-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .project-modal-content {
        width: min(95vw, 860px);
    }
}

@media (max-width: 768px) {
    .projects-hero {
        padding: 130px 0 45px;
    }

    .projects-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .projects-gallery-section {
        padding: 20px 0 60px;
    }

    .project-modal-content {
        margin: 7vh auto;
        padding: 14px 46px 16px;
    }

    .project-modal-close,
    .project-modal-nav {
        width: 36px;
        height: 36px;
    }
}
