:root {
    --color-dark: #212529;
    --color-medium: #611232;
    --color-light: #f8f9fa;
    --color-acento: #9b2247;

    --color-primary-blue: #611232;
    --color-secondary-yellow: #a0a0a0;
    --color-tertiary-green: #9b2247;
    --color-accent-pink: #9b2247;
    --color-accent-red: #9b2247;
    --color-background-light: #f8f9fa;
    --color-text-dark: #212529;
    --color-text-light: #f8f9fa;
    --color-dark-overlay: rgba(0, 0, 0, 0.7);

    --font-main: 'Poppins', sans-serif;

    --shadow-soft: 0 5px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-strong: 0 20px 50px rgba(0, 0, 0, 0.15);
    --app-bar-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    line-height: 1.8;
    background-color: var(--color-light);
    color: var(--color-medium);
}

.container {
    width: 90%;
    max-width: 1300px;
    margin: auto;
}

a {
    text-decoration: none;
    color: inherit;
}


h1 { 
    font-size: 4.5em; 
    font-weight: 700; 
    color: var(--color-light); 
    line-height: 1.1; 
}
h2 { 
    font-size: 2.8em; 
    font-weight: 600; 
    color: var(--color-light);
    margin-bottom: 0.5em; 
}
h3 { 
    font-size: 1.5em; 
    font-weight: 600; 
    color: var(--color-dark); 
}

.section {
    padding: 7rem 0;
    overflow: hidden; 
}

.section-tag {
    display: inline-block;
    color: var(--color-acento);
    font-size: 0.9em;
    letter-spacing: 5px;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 400;
}

.cta-button {
    display: inline-block;
    padding: 15px 35px;
    background: var(--color-acento);
    color: var(--color-light);
    text-transform: uppercase;
    font-size: 0.9em;
    letter-spacing: 2px;
    border: 2px solid var(--color-acento);
    transition: background 0.3s, color 0.3s, transform 0.3s;
    margin-top: 30px;
}

.cta-button:hover {
    background: var(--color-medium); 
    border-color: var(--color-medium);
    transform: translateY(-3px);
}

.secondary-btn {
    background: transparent;
    color: var(--color-dark);
    border-color: var(--color-dark);
}

.secondary-btn:hover {
    background: var(--color-dark);
    color: var(--color-light);
}

.hero {
    background: url('DF.jpg') no-repeat center center/cover;
    height: 85vh; 
    position: relative;
    padding-top: 20px;
    box-shadow: none; 
    overflow: hidden; 
}

@media (max-width: 480px) {
    .hero {
        height: 65vh; 
    }
}

@media (max-width: 375px) {
    .hero {
        height: 80vh; 
    }
}

@media (max-width: 345px) {
    .hero {
        height: 60vh;
    }
}

@media (max-width: 992px) {
    .hero {
        max-height: 80vh; 
    
    }
}
.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 105%; 
    background: rgba(33, 37, 41, 0.85); 
    z-index: 1; 
    border-bottom-left-radius: 0; 
    border-bottom-right-radius: 0; 
    transform: none; 
}

.hero-index {
    background: url('DF.jpg') no-repeat center center/cover;
}

.hero-acerca {
    background: url('e1.jpeg') no-repeat center center/cover;
}

.hero-servicios {
    background: url('DA.jpg') no-repeat center center/cover;
}

@media (max-width: 992px) {
    .hero-acerca, 
    .hero-servicios {
        max-height: 40vh; 
    }
}

@media (max-width: 480px) {
    .hero-acerca, 
    .hero-servicios {
        height: 40vh; 
    }
}

@media (max-width: 375px) { 
    .hero-acerca, 
    .hero-servicios {
        height: 40vh; 
    }
}

@media (max-width: 345px) {
    .hero-acerca, 
    .hero-servicios {
        height: 40vh;
    }
}
.hero-container {
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    z-index: 2; 
}


.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.navbar .logo {
    font-size: 1.2em;
    font-weight: 700;
    color: var(--color-light);
    letter-spacing: 4px;
}

.logo-container-caic {
    display: flex;
    align-items: center;
}
.logo-container-caic .dif-logo {
    height: 30px; 
    margin-left: 10px;
    object-fit: contain;
}

.nav-links a {
    position: relative;
    margin-left: 30px;
    font-size: 0.95em;
    color: var(--color-light);
    text-transform: uppercase;
    transition: color 0.3s;
}

.nav-links a::after {
    content: ''; 
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0; 
    height: 2px;
    background-color: var(--color-acento);
    transition: width 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

.nav-links a:hover::after {
    width: 100%;
}

.hero-content {
    text-align: left;
    padding-bottom: 15vh; 
    max-width: 800px;
}

.tag-line-group {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.tag-line {
    color: var(--color-acento);
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.divider {
    width: 50px;
    height: 1px;
    background: var(--color-acento);
    margin-left: 15px;
}

.hero-subtext {
    font-size: 1.3em;
    font-weight: 300;
    color: rgba(255, 255, 255, 0.7);
    margin-top: 15px;
}

.philosophy-section {
    background-image: 
        repeating-linear-gradient(
            45deg,
            rgba(248, 249, 250, 0.65) 0%, 
            rgba(255, 255, 255, 0.9) 10%,
            transparent 1px,
            transparent 5px
        ),
        radial-gradient(var(--color-secondary-yellow) 1px, transparent 0),
        linear-gradient(135deg, var(--color-background-light) 0%, #d8dadc 100%);
    
    background-size: 
        10px 10px, 
        20px 20px, 
        100% 100%; 

    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1); 
}
.philosophy-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 100px;
    align-items: center;
}

.text-content {
    padding-right: 40px;
}

.visual-content {
    position: relative;
    width: 100%;
    height: 400px;
}

.geometric-shape {
    position: absolute;
    width: 100%;
    height: 100%;
    background: url('DE.jpg') no-repeat center center/cover; 
    clip-path: polygon(0 10%, 100% 0, 100% 90%, 0% 100%);
    opacity: 0.9;
    transform: rotate(-3deg);
    transition: transform 0.5s ease-in-out;
}

.philosophy-section:hover .geometric-shape {
    transform: rotate(0deg);
}

.projects-section {
    background: var(--color-dark);
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.849); 
}

.projects-section h2, .projects-section .section-tag {
    color: var(--color-light);
    text-align: center;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(2, 280px);
    gap: 20px;
    margin-top: 70px;
}

.project-large {
    grid-column: span 1;
    grid-row: span 2;
}

.project-tall {
    grid-row: span 2;
}

.project-card {
    position: relative;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-medium); 
    transition: transform 0.4s ease-out; 
}

.project-card:hover {
    transform: scale(1.02); 
    box-shadow: 0 15px 40px rgba(155, 34, 71, 0.5); 
}

.project-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform 0.4s ease;
}

.project-info {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    background: linear-gradient(to top, var(--color-dark) 0%, rgba(33, 37, 41, 0.7) 50%, transparent 100%);
    color: var(--color-light);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.project-card:hover .project-info-alt {
    opacity: 1;
    transform: translateY(0);
}

.project-info-alt {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    background: linear-gradient(to bottom, var(--color-acento) 0%, rgba(33, 37, 41, 0.8) 100%);
    color: var(--color-light);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.4s, transform 0.4s;
    z-index: 2;
    border-radius: 0 0 12px 12px;
}
.project-info-alt h3 {
    color: var(--color-light);
    font-size: 1.3em;
    margin-bottom: 10px;
    text-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.project-info-alt p {
    color: #f8f9fa;
    font-size: 1em;
    text-align: center;
    margin-bottom: 10px;
}

.project-card:hover .project-info {
    transform: translateY(0); 
}

.project-info h3 {
    color: var(--color-light);
    margin-bottom: 5px;
}

.project-info p {
    font-size: 0.9em;
    color: rgba(255, 255, 255, 0.8);
}

.view-more {
    margin-top: 50px;
    text-align: center;
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    min-height: 180px;
    width: 100%;
}

.view-more .cta-button {
    padding: 16px 38px;
    font-size: 1em;
    letter-spacing: 2px;
    box-shadow: 0 8px 30px rgba(155, 34, 71, 0.4);
    border-radius: 8px;
    background: linear-gradient(90deg, var(--color-acento) 60%, var(--color-medium) 100%);
    color: #fff;
    font-weight: 600;
    border: none;
    text-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.view-more .cta-button:hover {
    box-shadow: 0 12px 40px rgba(155, 34, 71, 0.6);
    background: linear-gradient(90deg, var(--color-medium) 0%, var(--color-acento) 100%);
    color: #fff;
    transform: scale(1.05);
}
@media (max-width: 768px) {
    .view-more {
        justify-content: center;
        min-height: 100px;
    }
    .view-more .cta-button {
        padding: 10px 18px;
        font-size: 0.5em;
        letter-spacing: 1px;
    }
}

.contact-section {
    background-image: 
        repeating-linear-gradient(
            45deg,
            rgba(248, 249, 250, 0.65) 0%, 
            rgba(255, 255, 255, 0.9) 10%,
            transparent 1px,
            transparent 5px
        ),
        radial-gradient(var(--color-secondary-yellow) 1px, transparent 0),
        linear-gradient(135deg, var(--color-background-light) 0%, #d8dadc 100%);
    
    background-size: 
        10px 10px, 
        20px 20px, 
        100% 100%; 

    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.1); 
    text-align: center;
}

.contact-section h2 {
    margin-bottom: 20px;
}

.contact-links {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 40px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.contact-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px 20px;
    border: 1px solid var(--color-medium);
    transition: border-color 0.3s, background 0.3s, transform 0.3s, color 0.3s;
    color: var(--color-dark);
}

.contact-link:hover {
    border-color: var(--color-acento);
    background: var(--color-acento);
    color: var(--color-light);
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.contact-link .label {
    display: block;
    font-size: 0.8em;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 300;
}

.contact-link .value {
    display: block;
    font-size: 1.15em;
    font-weight: 600;
}

.map-embed-container {
    margin: 40px auto 0;
    max-width: 800px;
    border: 5px solid var(--color-medium);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.map-embed-container iframe {
    display: block;
}

footer {
    background: var(--color-dark);
    color: #666;
    text-align: center;
    padding: 2rem 0;
    font-size: 0.8em;
    border-top: 5px solid var(--color-acento);
}

.footer-design {
    color: #888;
    margin-left: 10px;
    font-style: italic;
}

@keyframes softGlow {
    0% {
        background-position: -50% 0;
        opacity: 0.95;
    }
    50% {
        background-position: 50% 0;
        opacity: 1;
    }
    100% {
        background-position: 150% 0;
        opacity: 0.95;
    }
}

.top-bar {
    background-image: 
        linear-gradient(
            90deg, 
            rgba(255, 255, 255, 0) 0%, 
            rgba(255, 255, 255, 0.05) 50%, 
            rgba(255, 255, 255, 0) 100% 
        ),
        linear-gradient(
            90deg, 
            var(--color-dark) 0%,
            var(--color-acento) 50%,
            var(--color-dark) 100%
        );

    background-size: 200% 100%, 100% 100%; 
    
    animation: softGlow 8s infinite ease-in-out; 

    color: var(--color-light); 
    text-align: center;
    padding: 8px 0;
    font-size: 0.9em;
    font-weight: 600;
    letter-spacing: 1px;
    
    position: sticky; 
    top: 0;
    z-index: 100; 
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3); 
}

.hamburger-menu {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    position: relative;
    z-index: 350; 
}

.hamburger-menu span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--color-light); 
    margin: 5px 0;
    transition: all 0.3s ease;
}

.hamburger-menu.is-active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-menu.is-active span:nth-child(2) {
    opacity: 0;
}
.hamburger-menu.is-active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

.nav-links {
    transition: transform 0.3s ease-out;
}

.nav-links-mobile {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--color-dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 360; 
    transform: translateX(100%);
}

.nav-links-mobile.is-active {
    transform: translateX(0); 
}

.nav-links-mobile a {
    color: var(--color-light);
    font-size: 1.4em; 
    margin: 14px 0;
    padding: 10px 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    width: 86%;
    text-align: center;
}

@media (max-width: 1000px) {
    .philosophy-grid {
        grid-template-columns: 1fr;
        gap: 50px;
    }
    
    .text-content {
        padding-right: 0;
    }

    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 250px);
        gap: 20px;
    }
    
    .project-large, .project-tall {
        grid-column: span 1;
        grid-row: span 1;
    }
}


@media (max-width: 768px) {
    .section {
        padding: 4rem 0;
        margin-bottom: 30px;
    }
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 220px);
        gap: 15px;
    }

    .hamburger-menu {
        display: block;
        position: fixed;
        top: 10px;
        right: 14px;
        width: 44px;
        height: 44px;
        padding: 8px;
        border-radius: 6px;
        background: rgba(0,0,0,0.04);
        z-index: 420; 
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .navbar .nav-links {
        display: none; 
    }
    .app-bar-nav {
        display: none;
    }
    .app-hamburger {
        display: block;
        position: absolute;
        right: 12px;
        top: 10px;
        width: 40px;
        height: 40px;
        padding: 6px;
        z-index: 430;
        background: transparent;
        border: none;
        align-items: center;
        justify-content: center;
    }

    .app-bar {
        height: var(--app-bar-height);
    }

    h1 { font-size: 3.5em; }
    h2 { font-size: 2.2em; }
    
    .hero-content {
        padding-bottom: 10vh;
    }
    
    .contact-links {
        grid-template-columns: 1fr; 
    }
}

@media (max-width: 480px) {
    h1 { 
        font-size: 2.2em; 
    }
    h2 { 
        font-size: 1.5em; 
    }
    h3 {
        font-size: 1.1em;
    }
    p {
        font-size: 0.9em;
        line-height: 1.6;
    }
    .hero-subtext {
        font-size: 0.95em;
    }
    .cta-button {
        padding: 12px 25px;
        font-size: 0.85em;
    }
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 300px);
        gap: 15px;
    }
    .project-large,
    .project-tall {
        grid-column: span 1;
        grid-row: span 1;
    }
    .project-info-alt h3 {
        font-size: 0.95em;
        margin-bottom: 6px;
    }
    .project-info-alt p {
        font-size: 0.75em;
        line-height: 1.3;
        margin-bottom: 6px;
    }
    .project-info-alt {
        padding: 12px;
    }
    .modal-content {
        padding: 20px;
        width: 95%;
    }
    .modal-content h2 {
        font-size: 1.4em;
    }
    .modal-content p {
        font-size: 0.9em;
        line-height: 1.5;
    }
    .modal-details h3 {
        font-size: 1.1em;
    }
    .modal-details ul {
        font-size: 0.9em;
    }
    .modal-image-container {
        max-height: 300px;
    }
}

.app-bar {
    position: fixed;
    left: 0;
    right: 0;
    top: 0;
    transform: translateY(-110%);
    background: linear-gradient(90deg, rgba(33,37,41,0.96), rgba(155,34,71,0.95));
    color: var(--color-light);
    z-index: 200;
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
}
.app-bar.is-visible {
    transform: translateY(0);
}
.app-bar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 0;
}
.app-bar-nav a {
    color: var(--color-light);
    margin-left: 20px;
    text-transform: uppercase;
    font-size: 0.9em;
}

.marquee {
    overflow: hidden;
}
.marquee p {
    display: inline-block;
    white-space: nowrap;
    padding-left: 100%;
    animation: marquee 12s linear infinite;
}
@keyframes marquee {
    from { transform: translateX(0%); }
    to { transform: translateX(-100%); }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s ease, transform 0.7s ease;
    will-change: opacity, transform;
}
.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.hidden {
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    height: 0;
    overflow: hidden;
    transition: opacity 0.25s ease, transform 0.25s ease, height 0.25s ease;
}

.has-appbar {
    padding-top: var(--app-bar-height) !important;
}
.span2h3 {
    display: block;
    width: 100%;
    font-size: 2.8em;
    font-weight: 600;
    color: var(--color-dark); 
    margin-bottom: 0.5em;
    margin-top: 0.5em;
    line-height: 1.1;
    text-align: left;
}

.span2h2 {
    display: block;
    width: 100%;
    font-size: 2.8em;
    font-weight: 600;
    color: var(--color-dark);
    text-align: left;
}

.span2h4 {
    display: block;
    width: 100%;
    font-size: 2.8em;
    font-weight: 600;
    color: white; 
    margin-bottom: 0.5em;
    margin-top: 0.5em;
    line-height: 1.1;
    text-align: center;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.is-active {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.modal-content {
    position: relative;
    background: var(--color-light);
    border-radius: 12px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    max-height: 80vh;
    overflow-y: auto;
    overflow-x: hidden;
}

.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--color-acento);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: var(--color-medium);
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    background: none;
    border: none;
    font-size: 52px;
    color: var(--color-dark);
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.3s, transform 0.3s;
}
@media (max-width: 768px) { 
    .modal-close {
        top: 10px;  
        right: 10px;
        font-size: 28px; 
        width: 35px; 
        height: 35px; 
    }

    .modal-content {
        padding: 45px 45px 30px 30px; 
    }
}

@media (max-width: 480px) { 
    .modal-close {
        top: 8px;
        right: 8px;
        font-size: 42px;
        width: 30px;
        height: 30px;
    }
    .modal-content {
        padding: 40px 40px 25px 25px;
    }
}

.modal-close:hover {
    color: var(--color-acento);
    transform: rotate(90deg);
}

.modal-image-container {
    max-height: 400px;
    overflow-y: auto;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f5f5;
}

.modal-image-container::-webkit-scrollbar {
    width: 6px;
}

.modal-image-container::-webkit-scrollbar-track {
    background: transparent;
}

.modal-image-container::-webkit-scrollbar-thumb {
    background: var(--color-acento);
    border-radius: 3px;
}

.modal-image-container::-webkit-scrollbar-thumb:hover {
    background: var(--color-medium);
}

.modal-content h2 {
    color: var(--color-dark);
    margin-bottom: 15px;
    font-size: 2em;
}

.modal-content p {
    color: var(--color-medium);
    line-height: 1.8;
    margin-bottom: 15px;
}

.modal-details {
    margin-top: 20px;
}

.modal-details h3 {
    color: var(--color-acento);
    margin-top: 20px;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.modal-details ul {
    list-style-position: inside;
    color: var(--color-medium);
}

.modal-details li {
    margin-bottom: 8px;
    line-height: 1.6;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(40px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.service-card {
    background: var(--color-light);
    border: 2px solid var(--color-acento);
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(155, 34, 71, 0.2);
    border-color: var(--color-medium);
}

.service-icon {
    font-size: 3em;
    color: var(--color-acento);
    margin-bottom: 15px;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.1);
}

.service-card h3 {
    color: var(--color-dark);
    margin-bottom: 15px;
    font-size: 1.4em;
}

.service-card p {
    color: var(--color-medium);
    margin-bottom: 20px;
    flex-grow: 1;
}

.service-btn {
    align-self: center;
}

.values-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-top: 50px;
}

.value-card {
    background: var(--color-light);
    border-left: 5px solid var(--color-acento);
    border-radius: 8px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s ease;
}

.value-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.value-icon {
    font-size: 2.5em;
    color: var(--color-acento);
    margin-bottom: 15px;
}

.value-card h3 {
    color: var(--color-dark);
    margin-bottom: 12px;
}

.value-card p {
    color: var(--color-medium);
    font-size: 0.95em;
    line-height: 1.6;
}

@media (max-width: 1000px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .values-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .values-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        padding: 25px;
        width: 95%;
    }
}

@media (max-width: 480px) {
    .modal-content {
        padding: 20px;
        max-height: 85vh;
    }
    
    .modal-content h2 {
        font-size: 1.6em;
    }
    
    .service-card {
        padding: 20px;
    }
    
    .value-card {
        padding: 20px;
    }
}

.span2h3 {
    display: block;
    width: 100%;
    font-size: 2.8em;
    font-weight: 600;
    color: var(--color-dark); 
    margin-bottom: 0.5em;
    text-align: center;
    margin-top: 0.5em;
    line-height: 1.1;
}