:root {
    --color-primary: #E3BAC6; /* Pastel Pink */
    --color-secondary: #B4D4EE; /* Pastel Blue */
    --color-accent1: #F4D7A1; /* Pastel Yellow/Gold */
    --color-accent2: #B2E0D2; /* Pastel Mint */

    --color-background-light: #FEFBF6; /* Very Light Beige - Default section BG */
    --color-background-offwhite: #FDF6F0; /* Light Beige/Off-white - Header, alt sections */
    --color-background-card: #FFFFFF; /* Card background */
    --color-background-dark: #333333; /* Dark Gray for Footer */
    
    --color-text-dark: #222222; /* Dark Gray for headings */
    --color-text-medium: #333333; /* Gray for body text */
    --color-text-light: #FFFFFF; /* White for text on dark backgrounds */
    
    --color-border-light: #EAE0D6; /* Light border for cards etc. */
    --color-border-medium: #D1C5B7; /* Medium border */

    --color-primary-rgb: 227, 186, 198; /* For box-shadow focus on inputs */

    --font-heading: 'Inter', sans-serif;
    --font-body: 'IBM Plex Sans', sans-serif;

    --border-radius-sm: 0.5rem; /* 8px */
    --border-radius-md: 1rem; /* 16px */
    --border-radius-lg: 1.5rem; /* 24px */

    --shadow-sm: 0 2px 4px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 10px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 20px rgba(0,0,0,0.12);

    --transition-speed: 0.4s;
    --transition-timing-elastic: cubic-bezier(0.68, -0.6, 0.32, 1.6); /* Bouncy */
    --transition-timing-smooth: ease-in-out;

    --header-height: 70px; /* Approximate header height for calculations */
}

/* GENERAL STYLES */
body {
    font-family: var(--font-body);
    color: var(--color-text-medium);
    background-color: var(--color-background-light);
    line-height: 1.7;
    overflow-x: hidden;
    font-size: 16px; /* Base font size */
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-text-dark);
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 1rem;
    line-height: 1.3;
}

h1 { font-size: 2.8rem; }
h2 { font-size: 2.2rem; } /* e.g., Section titles */
h3 { font-size: 1.75rem; }
h4 { font-size: 1.4rem; }
h5 { font-size: 1.2rem; } /* e.g., Card titles */
h6 { font-size: 1rem; }

p {
    margin-bottom: 1rem;
    font-size: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition-speed) var(--transition-timing-smooth);
}

a:hover {
    color: var(--color-secondary);
    text-decoration: none; /* Often preferred over underline for modern look */
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

section {
    padding: 4rem 0;
    overflow: hidden; 
    position: relative; /* For pseudo-elements or parallax layers */
}

.section-reveal { /* For ScrollReveal */
    visibility: hidden;
}

/* HEADER */
header.sticky-top {
    background-color: var(--color-background-offwhite) !important;
    box-shadow: var(--shadow-sm);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.navbar-brand {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--color-text-dark) !important;
    font-size: 1.6rem;
}

.navbar-nav .nav-link {
    font-family: var(--font-body);
    color: var(--color-text-medium) !important;
    padding: 0.5rem 1rem;
    transition: color var(--transition-speed) var(--transition-timing-smooth);
    position: relative;
    font-weight: 500;
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active { /* Assuming JS adds .active class */
    color: var(--color-primary) !important;
}

.navbar-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background-color: var(--color-primary);
    border-radius: 2px;
    transition: width var(--transition-speed) var(--transition-timing-elastic);
}

.navbar-nav .nav-link:hover::after,
.navbar-nav .nav-link.active::after {
    width: 60%;
}

.navbar-toggler {
    border: 1px solid var(--color-border-medium);
}
.navbar-toggler:focus {
    box-shadow: 0 0 0 0.2rem rgba(var(--color-primary-rgb), 0.25);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(34,34,34,0.9)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}


/* HERO SECTION */
.hero-section {
    color: var(--color-text-light);
    padding: 5rem 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    /* background-attachment: fixed; set in HTML */
}

.hero-section h1 {
    color: var(--color-text-light); /* Enforced by prompt */
    text-shadow: 2px 2px 8px rgba(0,0,0,0.6);
    font-size: 3.2rem;
}

.hero-section p.lead {
    color: var(--color-text-light); /* Enforced by prompt */
    text-shadow: 1px 1px 6px rgba(0,0,0,0.6);
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.25rem;
    line-height: 1.6;
}

/* BUTTONS (GLOBAL) */
.btn, button, input[type='submit'], input[type='button'] {
    font-family: var(--font-body);
    font-weight: bold;
    padding: 0.8rem 2rem; /* 12.8px 32px */
    border-radius: var(--border-radius-sm);
    transition: all var(--transition-speed) var(--transition-timing-elastic);
    border: 2px solid transparent;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-size: 0.9rem;
    box-shadow: var(--shadow-sm);
}

.btn:focus, button:focus, input[type='submit']:focus, input[type='button']:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(var(--color-primary-rgb), 0.4);
}

.custom-btn { /* Apply this class to buttons for specific project styling */
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-text-dark);
}

.custom-btn:hover {
    background-color: var(--color-secondary);
    border-color: var(--color-secondary);
    color: var(--color-text-dark);
    transform: translateY(-4px) scale(1.03);
    box-shadow: var(--shadow-md);
}

/* FORM INPUTS (GLOBAL) */
.form-control.custom-input,
.form-select.custom-input {
    font-family: var(--font-body);
    padding: 0.8rem 1.2rem;
    border-radius: var(--border-radius-sm);
    border: 1px solid var(--color-border-medium);
    transition: border-color var(--transition-speed) var(--transition-timing-smooth), box-shadow var(--transition-speed) var(--transition-timing-smooth);
    background-color: var(--color-background-card);
    color: var(--color-text-medium);
    font-size: 1rem;
}

.form-control.custom-input:focus,
.form-select.custom-input:focus {
    border-color: var(--color-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--color-primary-rgb), 0.35);
    outline: none;
}
.form-label {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    font-weight: 500; /* Slightly less bold than default Bootstrap */
    margin-bottom: 0.6rem;
    font-size: 0.95rem;
}

/* CARD STYLES (GLOBAL) */
.card {
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-md);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-speed) var(--transition-timing-elastic), box-shadow var(--transition-speed) var(--transition-timing-smooth);
    background-color: var(--color-background-card);
    display: flex;
    flex-direction: column;
    text-align: center; 
    overflow: hidden; /* Important for border-radius on images */
    height: 100%; /* For cards in a row to have same height if using Bootstrap .h-100 */
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

.card .card-image { /* Wrapper for image */
    width: 100%;
    /* Fixed height for image containers should be set per card type if required by design */
    /* e.g., #portfolioCarousel .card .card-image { height: 300px; } */
    overflow: hidden;
    position: relative; 
    display: flex; 
    align-items: center;
    justify-content: center;
    background-color: #f0f0f0; /* Placeholder bg for images */
}

.card .card-image img {
    width: 100%;
    height: 100%; /* Requires .card-image to have a defined height */
    object-fit: cover; 
    display: block; 
}

.card .card-body, .card .card-content {
    padding: 1.5rem;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    text-align: center;
}
.card .card-body > *:last-child:not(.card-title):not(.card-text) { /* Push last element (e.g. button) to bottom */
    margin-top: auto; 
    align-self: center; /* Center button */
}

.card .card-title {
    font-family: var(--font-heading);
    color: var(--color-text-dark);
    margin-bottom: 0.75rem;
    font-size: 1.3rem;
}

.card .card-text {
    font-family: var(--font-body);
    color: var(--color-text-medium);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    flex-grow: 1; 
}

/* SECTION SPECIFIC STYLES */

/* Our Process Section */
#nuestro-proceso .p-4 { /* The bordered box */
    transition: transform var(--transition-speed) var(--transition-timing-elastic), box-shadow var(--transition-speed) var(--transition-timing-smooth);
    background-color: var(--color-background-card);
    border-radius: var(--border-radius-md) !important; /* Ensure override */
}
#nuestro-proceso .p-4:hover {
    transform: translateY(-6px) scale(1.03);
    box-shadow: var(--shadow-md);
}
#nuestro-proceso .progress {
    border-radius: var(--border-radius-sm);
    background-color: #e9ecef;
    height: 0.75rem;
}
#nuestro-proceso .progress-bar {
    border-radius: var(--border-radius-sm);
    transition: width 1s var(--transition-timing-elastic); 
}

/* Innovation Section */
#innovacion img {
    border-radius: var(--border-radius-md);
}

/* Portfolio & Success Stories Carousel */
.carousel-control-prev-icon,
.carousel-control-next-icon {
    background-color: rgba(0,0,0,0.4); /* Darker controls */
    border-radius: 50%;
    padding: 1.2rem; /* Increase clickable area */
    background-size: 50% 50%; /* Adjust icon size within */
}
.carousel-indicators [data-bs-target] {
    background-color: var(--color-secondary);
    opacity: 0.6;
    height: 4px;
    width: 30px;
    border-radius: 2px;
    margin: 0 5px;
    transition: opacity var(--transition-speed) var(--transition-timing-smooth), background-color var(--transition-speed) var(--transition-timing-smooth);
}
.carousel-indicators .active {
    background-color: var(--color-primary);
    opacity: 1;
}

#portfolioCarousel .card .card-image {
    height: 300px; /* Specific height for portfolio images */
}

#successStoriesCarousel .testimonial-card {
    background-color: var(--color-background-offwhite);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-lg);
    padding: 2.5rem;
    box-shadow: var(--shadow-md);
    max-width: 750px;
}
#successStoriesCarousel .testimonial-card img.rounded-circle {
    border: 5px solid var(--color-primary);
    width: 120px;
    height: 120px;
    object-fit: cover;
}
#successStoriesCarousel .carousel-control-prev,
#successStoriesCarousel .carousel-control-next {
    width: 8%; /* Adjust for better reach */
}

/* Projects Section */
#proyectos .card .card-image {
    height: 250px; /* Match HTML height attribute for consistency */
}
#proyectos .card .card-image img.card-img-top {
    border-top-left-radius: calc(var(--border-radius-md) - 1px);
    border-top-right-radius: calc(var(--border-radius-md) - 1px);
    /* width/height/object-fit covered by global .card .card-image img */
}

/* Media & Awards Section */
#medios img {
    filter: grayscale(60%);
    opacity: 0.75;
    transition: all var(--transition-speed) var(--transition-timing-smooth);
    max-height: 55px;
    width: auto;
    margin: 0 auto 1rem auto;
}
#medios img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}
#reconocimientos .card .card-image img { /* For award icons */
    max-width: 70px;
    height: 70px;
    object-fit: contain;
    margin: 1rem auto 0.5rem auto; /* Center it */
}

/* Partners Section */
#partnersCarousel .carousel-item img {
    max-height: 70px;
    width: auto;
    margin: 0 auto;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all var(--transition-speed) var(--transition-timing-smooth);
}
#partnersCarousel .carousel-item img:hover {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.1);
}


/* External Resources Section */
#recursos-externos .list-group-item.custom-list-item {
    background-color: var(--color-background-card);
    border: 1px solid var(--color-border-light);
    border-radius: var(--border-radius-sm);
    margin-bottom: 0.75rem;
    padding: 1rem 1.25rem;
    transition: transform var(--transition-speed) var(--transition-timing-elastic), box-shadow var(--transition-speed) var(--transition-timing-smooth), border-left-color var(--transition-speed) var(--transition-timing-smooth);
    border-left: 4px solid transparent; /* Prepare for hover effect */
}
#recursos-externos .list-group-item.custom-list-item:hover {
    transform: translateX(6px);
    box-shadow: var(--shadow-md);
    border-left-color: var(--color-primary);
}
#recursos-externos .list-group-item h5 {
    color: var(--color-primary);
    font-size: 1.1rem;
}
#recursos-externos .list-group-item p {
    font-size: 0.9rem;
    color: var(--color-text-medium);
}
#recursos-externos .list-group-item small.text-muted {
    color: var(--color-accent1) !important;
    font-weight: 500;
    font-size: 0.85rem;
}

/* Contact Section */
#contacto .card { /* The form card */
    background-color: rgba(255, 255, 255, 0.98); 
    /* backdrop-filter: blur(3px); /* Subtle glassmorphism if desired */
    border: 1px solid var(--color-border-light);
    box-shadow: var(--shadow-lg);
}
#contacto p a { /* Email link */
    color: var(--color-primary);
    font-weight: 500;
}
#contacto p a:hover {
    color: var(--color-secondary);
}

/* FOOTER */
footer {
    background-color: var(--color-background-dark);
    color: #cccccc; /* Lighter gray for footer text */
    padding: 3.5rem 0 2rem;
}

footer h5 {
    font-family: var(--font-heading);
    color: var(--color-text-light);
    margin-bottom: 1.2rem;
    font-size: 1.3rem;
}

footer p, footer ul li a {
    color: #b0b0b0; 
    font-size: 0.95rem;
    font-family: var(--font-body);
}

footer ul {
    list-style: none;
    padding-left: 0;
}

footer ul li {
    margin-bottom: 0.6rem;
}

footer ul li a {
    text-decoration: none;
    transition: color var(--transition-speed) var(--transition-timing-smooth), padding-left var(--transition-speed) var(--transition-timing-elastic);
}

footer ul li a:hover {
    color: var(--color-primary);
    padding-left: 7px;
    text-decoration: none;
}

footer hr {
    border-color: rgba(255,255,255,0.15);
    margin-top: 2.5rem;
    margin-bottom: 1.8rem;
}
footer #currentYear {
    font-weight: 500;
}

/* SPECIFIC PAGE STYLES */

/* For success.html page - assumes <body class="success-page-body"> */
body.success-page-body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--color-background-light);
}
/* The <main> tag on success.html should have this class */
.success-page-main-content {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    width: 100%;
}
/* The wrapper div inside <main> on success.html */
.success-content-wrapper {
    background-color: var(--color-background-card); /* Use card background for consistency */
    padding: 2.5rem;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    max-width: 600px;
    text-align: center;
}
.success-content-wrapper .icon-success { /* If using an icon */
    font-size: 4.5rem;
    color: var(--color-accent2);
    margin-bottom: 1.5rem;
}
.success-content-wrapper h1 {
    color: var(--color-accent2); /* Pastel Mint for success heading */
    font-size: 2.5rem;
}
.success-content-wrapper p {
    font-size: 1.1rem;
    color: var(--color-text-medium);
}
.success-content-wrapper .btn {
    margin-top: 1.5rem;
}


/* For privacy.html & terms.html - assumes <main class="static-page-content container"> */
.static-page-content { 
    padding-top: calc(var(--header-height) + 2rem) !important; /* Header height + desired top padding */
    padding-bottom: 3rem !important;
    min-height: calc(100vh - var(--header-height) - 150px); /* Viewport - header - approx footer height */
}

.static-page-content h2 { /* Main title of the static page */
    margin-bottom: 2rem;
    padding-bottom: 0.75rem;
    border-bottom: 3px solid var(--color-primary);
    display: inline-block;
}

.static-page-content h3 { /* Subheadings within the static page */
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    color: var(--color-secondary);
    font-size: 1.5rem;
}

.static-page-content p,
.static-page-content ul,
.static-page-content li {
    margin-bottom: 1rem;
    color: var(--color-text-medium);
    line-height: 1.8;
}
.static-page-content ul {
    padding-left: 25px;
}
.static-page-content ul li {
    margin-bottom: 0.5rem;
}

/* COOKIE POPUP (styles are mostly inline in HTML, this is for minor global tweaks) */
#cookiePopup {
    font-family: var(--font-body);
    font-size: 0.95rem;
}
#cookiePopup #acceptCookie {
    font-family: var(--font-body);
    font-weight: bold;
    font-size: 0.9rem;
    padding: 0.6rem 1.2rem;
    text-transform: uppercase;
}

/* "READ MORE" LINK STYLE */
.read-more-link {
    display: inline-block;
    font-family: var(--font-body);
    font-weight: bold;
    color: var(--color-primary);
    text-decoration: none;
    padding: 0.3rem 0;
    position: relative;
    font-size: 0.95rem;
    transition: color var(--transition-speed) var(--transition-timing-smooth);
}
.read-more-link::after {
    content: '→'; /* Arrow icon */
    margin-left: 0.5em;
    transition: transform var(--transition-speed) var(--transition-timing-elastic);
    display: inline-block;
}
.read-more-link:hover {
    color: var(--color-secondary);
}
.read-more-link:hover::after {
    transform: translateX(6px);
}

/* RESPONSIVE TYPOGRAPHY ADJUSTMENTS */
@media (max-width: 991px) { /* Medium devices (tablets, less than 992px) */
    h1 { font-size: 2.5rem; }
    .hero-section h1 { font-size: 2.8rem; }
    .hero-section p.lead { font-size: 1.15rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.6rem; }
}

@media (max-width: 767px) { /* Small devices (landscape phones, less than 768px) */
    h1 { font-size: 2.2rem; }
    .hero-section h1 { font-size: 2.4rem; }
    .hero-section p.lead { font-size: 1.05rem; }
    h2 { font-size: 1.8rem; }
    h3 { font-size: 1.45rem; }
    section { padding: 3rem 0; }
    .btn, button, input[type='submit'], input[type='button'] {
        padding: 0.7rem 1.5rem;
        font-size: 0.85rem;
    }
}

@media (max-width: 575px) { /* Extra small devices (portrait phones, less than 576px) */
    .navbar-brand { font-size: 1.4rem; }
}

/* Parallax Background Utility (if not handled by JS library extensively) */
.parallax-bg-simple {
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
}
.navbar-toggler{
    display: none;
}