:root {
    /* Colors - Senda Hogar Identity */
    --color-primary: #114a38;
    /* Deep Forest Green from Logo */
    --color-primary-dark: #0d382a;
    --color-secondary: #C5A065;
    /* Gold/Sand */
    --color-secondary-light: #d4b886;
    --color-accent: #E2E8F0;
    /* Soft Gray Blue for backgrounds */
    --color-text: #1a202c;
    --color-text-light: #5f6c80;
    --color-background: #ffffff;
    --color-surface: #F8F9FA;
    --color-white: #FFFFFF;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;
    --spacing-2xl: 10rem;

    /* Typography */
    --font-heading: 'Playfair Display',
        serif;
    --font-body: 'Inter',
        sans-serif;

    /* Shadows - Softer & Deeper */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05),
        0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.05),
        0 10px 10px -5px rgba(0, 0, 0, 0.02);
    --shadow-float: 0 25px 50px -12px rgba(17, 74, 56, 0.15);
    /* Tinted shadow */

    /* Transitions */
    --transition-fast: 0.15s ease-out;
    --transition-medium: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* Reset & Base */
html,
body {
    overflow-x: hidden;
    /* Prevent horizontal scroll from full-width elements */
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-primary);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

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

/* Layout */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
}

/* Navbar Styles (Bootstrap 5 Overrides) */
/* Navbar Styles (Bootstrap 5 Overrides) */
.navbar.main-header {
    background-color: transparent;
    box-shadow: none;
    /* Shadow moves to pseudo-element or distinct wrapper if needed, but keeping simple for now */
    padding: 1rem 0;
    transition: all 0.3s ease;
    z-index: 1030;
}

.navbar.main-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    z-index: -1;
}

.navbar-brand img {
    height: 50px;
    transition: all 0.3s ease;
}

.nav-link {
    font-weight: 500;
    color: var(--color-primary) !important;
    font-size: 1.05rem;
    padding: 0.5rem 1rem !important;
    position: relative;
    letter-spacing: 0.01em;
}

/* Hover Underline Effect (Desktop) */
@media (min-width: 992px) {
    .nav-link {
        position: relative;
    }

    .nav-link::before {
        content: '';
        position: absolute;
        width: 0;
        height: 2px;
        bottom: 0px;
        left: 50%;
        transform: translateX(-50%);
        background-color: var(--color-secondary);
        transition: width 0.3s ease;
    }

    .nav-link:hover::before,
    .nav-link.active::before,
    .nav-item.show .nav-link::before {
        width: 80%;
    }

    /* Desktop Hover Dropdown */
    .nav-item.dropdown:hover .dropdown-menu {
        display: block;
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
        margin-top: 0;
    }
}

/* Mobile Offcanvas Styles */
@media (max-width: 991px) {
    .offcanvas-body {
        padding: 1.5rem 0;
        /* Remove side padding for full-width items */
    }

    .navbar-nav {
        width: 100%;
    }

    .nav-item {
        width: 100%;
    }

    .nav-link {
        font-size: 1.25rem;
        padding: 1.2rem 1.5rem !important;
        /* Larger touch target */
        text-align: center;
        width: 100%;
        display: block;
        border-bottom: 1px solid rgba(0, 0, 0, 0.04);
        transition: all 0.2s ease;
        font-weight: 500;
        color: var(--color-primary) !important;
    }

    /* Highlight on active/press */
    .nav-link:active {
        background-color: var(--color-primary);
        color: white !important;
    }

    /* Specific highlight for when dropdown is open */
    .nav-item.show .nav-link {
        background-color: rgba(17, 74, 56, 0.04);
    }

    .dropdown-menu {
        border: none;
        box-shadow: none;
        padding: 0;
        margin: 0;
        background: rgba(0, 0, 0, 0.02);
        /* Subtle background for depth */
        text-align: center;
        width: 100%;
    }

    .dropdown-item {
        padding: 1rem 1.5rem;
        font-size: 1.1rem;
        text-align: center;
        border-bottom: 1px solid rgba(0, 0, 0, 0.02);
    }

    .dropdown-item:active {
        background-color: var(--color-secondary);
        color: white;
    }
}

/* Fix Dropdown Arrow Position */
.dropdown-toggle::after {
    margin-left: 0.5em;
    vertical-align: middle;
    border-top: 0.3em solid;
    border-right: 0.3em solid transparent;
    border-left: 0.3em solid transparent;
    color: var(--color-text-light);
    /* Softer arrow color */
}

/* Dropdown Menu Styles */
.dropdown-menu {
    border: none;
    border-top: 3px solid var(--color-secondary);
    border-radius: 0 0 8px 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    margin-top: 10px;
    /* Offset for animation */
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 992px) {
    .dropdown-menu {
        display: block;
        opacity: 0;
        visibility: hidden;
        transform: translateY(20px);
    }
}

.dropdown-item {
    padding: 0.7rem 1.5rem;
    color: var(--color-text);
    font-size: 0.95rem;
    transition: all 0.2s ease;
    position: relative;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(197, 160, 101, 0.08);
    /* Light Gold tint */
    color: var(--color-primary);
    padding-left: 1.8rem;
    /* Slide effect */
    font-weight: 500;
}

.dropdown-item.active,
.dropdown-item:active {
    background-color: var(--color-primary);
    color: white;
}

/* Mobile Toggler */
.navbar-toggler:focus {
    box-shadow: none;
    outline: 2px solid var(--color-secondary);
}

.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='%23114a38' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Slider */
.hero-slider {
    position: relative;
    height: 90vh;
    /* Increased height */
    overflow: hidden;
    background-color: var(--color-primary);
    width: 100vw;
    margin-left: calc(-50vw + 50%);
    /* Break out of any container */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    background-size: cover;
    background-position: center 20%;
    /* Shift image down slightly to show heads */
}

.slide.active {
    opacity: 1;
}

/* Navigation Blocks */
.nav-block {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    min-height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--color-white);
    box-shadow: var(--shadow-md);
    transition: var(--transition-medium);
    background-size: cover;
    background-position: center;
}

.nav-block:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.nav-block-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.8));
    /* Stronger gradient for text */
    z-index: 1;
    transition: var(--transition-medium);
}

.nav-block:hover .nav-block-overlay {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.9));
}

.nav-block-content {
    position: relative;
    z-index: 2;
    padding: 3rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8);
    /* Add text shadow for legibility */
}

.nav-block-content h3 {
    color: var(--color-white);
    /* Ensure heading is white */
}

.nav-block-content p {
    color: var(--color-white);
    /* Ensure text is white */
    opacity: 1;
    /* Remove transparency */
}

.nav-block-vender {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), linear-gradient(45deg, #ff9a9e 0%, #fad0c4 99%, #fad0c4 100%);
}

.nav-block-comprar {
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), linear-gradient(120deg, #a1c4fd 0%, #c2e9fb 100%);
}

.slide-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--color-white);
    background: rgba(0, 0, 0, 0.3);
    /* Overlay */
    padding: var(--spacing-md);
}

.slide-content h2 {
    font-size: 3.5rem;
    margin-bottom: var(--spacing-sm);
    color: var(--color-white);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    margin-left: auto;
    margin-right: auto;
}

.slide-content p {
    font-size: 1.5rem;
    max-width: 800px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    margin-left: auto;
    margin-right: auto;
}

/* Sections */
.section {
    padding: var(--spacing-xl) 0;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-lg);
    display: block;
    margin-left: auto;
    margin-right: auto;
    max-width: fit-content;
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title::after {
    content: '';
    display: block;
    width: 60px;
    height: 3px;
    background-color: var(--color-secondary);
    margin: var(--spacing-xs) auto 0;
}

/* Footer */
.main-footer {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-lg) 0 var(--spacing-md);
}

/* Old footer content rule removed because it is now defined at the bottom with specific overrides */

.footer-column h3 {
    color: var(--color-secondary);
    margin-bottom: var(--spacing-md);
    font-size: 1.2rem;
}

.footer-column a {
    display: block;
    margin-bottom: var(--spacing-xs);
    opacity: 0.8;
}

.footer-column a:hover {
    opacity: 1;
    color: var(--color-secondary);
}

.copyright {
    text-align: center;
    padding-top: var(--spacing-md);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.9rem;
    opacity: 0.6;
}

/* Page Headers */
.page-header {
    background-color: var(--color-primary);
    color: var(--color-white);
    padding: var(--spacing-xl) 0;
    text-align: center;
}

.page-header h1 {
    color: var(--color-white);
    font-size: 3rem;
}

/* Utilities */
.btn {
    display: inline-block;
    padding: 0.8rem 2.2rem;
    background: linear-gradient(135deg, var(--color-secondary), #b58e4e);
    color: var(--color-white) !important;
    border-radius: 50px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    box-shadow: 0 4px 15px rgba(197, 160, 101, 0.2);
    text-transform: uppercase;
    font-size: 0.85rem;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 12px 25px rgba(197, 160, 101, 0.4);
}

.btn::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: 0.5s;
    z-index: -1;
}

.btn:hover::after {
    left: 100%;
}

/* Outline Buttons */
.btn-outline-primary {
    border: 2px solid var(--color-secondary) !important;
    background: transparent !important;
    color: var(--color-secondary) !important;
    padding: 0.6rem 1.8rem;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.btn-outline-primary:hover {
    background: linear-gradient(135deg, var(--color-secondary), #b58e4e) !important;
    color: white !important;
    box-shadow: 0 8px 20px rgba(197, 160, 101, 0.3);
    transform: translateY(-3px);
}

/* Services Grid - Refined */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    margin-top: var(--spacing-md);
}

.service-card {
    background: var(--color-white);
    padding: 3rem 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition-medium);
    border: 1px solid rgba(0, 0, 0, 0.03);
    text-align: left;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--color-secondary);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-float);
}

.service-card:hover::before {
    transform: scaleX(1);
}

.service-card h3 {
    color: var(--color-primary);
    margin-bottom: var(--spacing-sm);
    font-size: 1.3rem;
}

.service-card p {
    color: var(--color-text-light);
}

/* Bootstrap Accordion Overrides */
.accordion-button:not(.collapsed) {
    color: var(--color-primary);
    background-color: rgba(197, 160, 101, 0.1);
    /* Light Gold tint */
    box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .125);
    font-weight: 600;
    /* Increased font weight */
    font-size: 1.1rem;
    /* Slightly larger text */
}

.accordion-button.collapsed {
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--color-text);
}

.accordion-button:focus {
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 0.25rem rgba(197, 160, 101, 0.25);
    /* Gold focus ring */
}

.accordion-button::after {
    background-size: 1.25rem;
    transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed)::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23114a38'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
    /* Dark Green arrow */
}

/* Footer Fixes */
.footer-content {
    display: grid;
    /* Force 4 columns on desktop, wrap on smaller */
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}

/* Icon Gradient Override */
.text-primary {
    color: var(--color-primary) !important;
    /* Fallback */
    background: linear-gradient(135deg, var(--color-primary), var(--color-secondary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}