/* --- VARIABLES --- */
:root {
    /* Colores - Tomix Visuals Theme (Light/Teal) */
    --bg-primary: #e6e6e8;
    --bg-secondary: #FFFFFF;
    --bg-tertiary: #dcdcde;
    --accent: #52675f;
    --accent-glow: #b0b0a9;
    --accent-dark: #182526;
    --success: #10B981;
    --warning: #F59E0B;
    --text-primary: #0b0b0b;
    --text-secondary: #182526;
    --text-muted: #52675f;
    --border: #b0b0a9;
    --border-light: #d1d1cf;
    --glass: rgba(230, 230, 232, 0.7);
    --glass-border: rgba(176, 176, 169, 0.5);

    /* Gradients */
    --gradient-accent: linear-gradient(135deg, var(--accent) 0%, var(--accent-dark) 100%);
    --gradient-dark: linear-gradient(180deg, var(--bg-primary) 0%, var(--text-primary) 100%);
    --gradient-glow: radial-gradient(circle at center, rgba(82, 103, 95, 0.2) 0%, transparent 70%);

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;

    /* Typography */
    --font-primary: 'ModernSans', sans-serif;
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
    --font-size-2xl: 1.5rem;
    --font-size-3xl: 2rem;
    --font-size-4xl: 2.5rem;
    --font-size-5xl: 3.5rem;
    --font-size-6xl: 4.5rem;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(11, 11, 11, 0.1);
    --shadow-md: 0 4px 16px rgba(11, 11, 11, 0.15);
    --shadow-lg: 0 8px 32px rgba(11, 11, 11, 0.2);
    --shadow-glow: 0 0 40px rgba(82, 103, 95, 0.25);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 300ms ease;
    --transition-slow: 500ms ease;

    /* Z-index */
    --z-dropdown: 100;
    --z-sticky: 200;
    --z-fixed: 300;
    --z-modal: 400;
    --z-tooltip: 500;
}

/* --- RESET & BASE --- */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 100px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-primary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    overflow-x: hidden;
}

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

ul,
ol {
    list-style: none;
}

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

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input,
textarea,
select {
    font-family: inherit;
    font-size: inherit;
}

/* --- LAYOUT --- */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
    position: relative;
    /* Ensure relative positioning for child absolute elements */
}

.container-sm {
    max-width: 800px;
}

.container-lg {
    max-width: 1400px;
}

section {
    padding: var(--space-4xl) 0;
}

/* --- NAVIGATION --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(255, 255, 255, 0.85);
    /* Light theme background */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    /* Use border variable */
    padding: var(--space-md) 0;
    transition: all var(--transition-base);
}

.navbar.scrolled {
    padding: var(--space-sm) 0;
    background: rgba(255, 255, 255, 0.95);
    /* Light theme */
    box-shadow: var(--shadow-sm);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    width: 90%;
    /* Added to match container */
    margin: 0 auto;
    padding: 0 var(--space-md);
}


.nav-logo-img {
    width: 70px;
    transition: all 0.3s ease;
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
}

.nav-link {
    font-size: var(--font-size-sm);
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
    padding: var(--space-xs) 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width var(--transition-base);
}

.nav-link:hover,
.nav-link.active {
    color: var(--text-primary);
}

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

.nav-cta {
    margin-left: var(--space-lg);
}

/* Mobile Menu */
.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: all var(--transition-fast);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- TYPOGRAPHY --- */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 700;
}

.logo {
    font-family: Skeina;
    letter-spacing: 2px;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    color: var(--accent);
    margin-bottom: var(--space-lg);
}

.section-title {
    font-size: var(--font-size-4xl);
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* --- BUTTONS --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    padding: var(--space-md) var(--space-xl);
    font-size: var(--font-size-sm);
    font-weight: 600;
    border-radius: var(--radius-full);
    transition: all var(--transition-base);
    white-space: nowrap;
}

.btn-primary {
    background: var(--gradient-accent);
    color: white;
    box-shadow: 0 4px 20px rgba(0, 137, 123, 0.4);
    /* Teal shadow */
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 137, 123, 0.5);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 2px solid var(--border-light);
}

.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: rgba(0, 137, 123, 0.1);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    padding: var(--space-sm) var(--space-md);
}

.btn-ghost:hover {
    color: var(--text-primary);
    background: var(--glass);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
}

.btn-whatsapp:hover {
    background: #20BA5C;
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
}

.btn-lg {
    padding: var(--space-lg) var(--space-2xl);
    font-size: var(--font-size-base);
}

.btn-sm {
    padding: var(--space-sm) var(--space-lg);
    font-size: var(--font-size-xs);
}

.btn-icon {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 50%;
}

.btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* --- CARDS --- */
.card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    will-change: transform;
    transition: transform var(--transition-fast), box-shadow var(--transition-base);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    perspective: 1000px;
    transform-style: preserve-3d;
    /* Added subtle shadow */
}


.card:hover {
    border-color: var(--accent);

    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card-glass {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.card-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 137, 123, 0.1);
    border-radius: var(--radius-md);
    font-size: var(--font-size-2xl);
    color: var(--accent);
    margin-bottom: var(--space-lg);
}

.card-title {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-sm);
}

.card-text {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-lg);
}

.card-price {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    color: var(--accent);
    margin-bottom: var(--space-lg);
}

.card-price span {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: 400;
}

/* --- GRIDS --- */
.grid {
    display: grid;
    gap: var(--space-xl);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.grid-auto {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

/* --- HERO --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-4xl) 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150%;
    height: 100%;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--glass);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    color: var(--accent);
    margin-bottom: var(--space-xl);
}

.hero-title {
    font-size: var(--font-size-5xl);
    font-weight: 700;
    margin-bottom: var(--space-lg);
    line-height: 1.1;
}

.hero-title span {
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-secondary);
    margin-bottom: var(--space-2xl);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-md);
    justify-content: center;
}

.hero-visual {
    position: absolute;
    bottom: -10%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    opacity: 0.1;
    pointer-events: none;
}

/* --- SERVICE CARDS --- */
.service-category {
    margin-bottom: var(--space-3xl);
}

.service-category-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-xl);
    padding-bottom: var(--space-md);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.service-category-title i {
    color: var(--accent);
}

.service-card {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.service-card .card-text {
    flex: 1;
}

.project-card {
    overflow: hidden;
    padding: 0;
    perspective: 1000px;
    transform-style: preserve-3d;
    will-change: transform;
}


.project-image {
    height: 200px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.project-image i {
    font-size: 4rem;
    color: var(--border-light);
    transition: all var(--transition-base);
}

.project-card:hover .project-image i {
    color: #e6e6e6;
    transform: scale(1.1);
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-base);
}

.project-card:hover .project-image img {
    transform: scale(1.05);
}

.project-content {
    padding: var(--space-xl);
}

.project-tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-bottom: var(--space-lg);
}

.tag {
    padding: var(--space-xs) var(--space-md);
    background: #52675f;
    color: #e6e6e6;
    font-size: var(--font-size-xs);
    border-radius: var(--radius-full);
}

/* --- TESTIMONIAL CARDS --- */
.testimonial-card {
    text-align: center;
}

.testimonial-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
    font-size: var(--font-size-2xl);
    color: var(--border-light);
    overflow: hidden;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.testimonial-text {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    font-style: italic;
    margin-bottom: var(--space-lg);
    line-height: 1.8;
}

.testimonial-name {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.testimonial-role {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

/* --- CASE STUDY CARDS --- */
.case-card {
    padding: var(--space-2xl);
}

.case-header {
    display: flex;
    align-items: flex-start;
    gap: var(--space-xl);
    margin-bottom: var(--space-xl);
}

.case-image {
    width: 200px;
    height: 150px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.case-image i {
    font-size: 3rem;
    color: var(--border-light);
}

.case-title {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-sm);
}

.case-sections {
    display: grid;
    gap: var(--space-lg);
}

.case-section h4 {
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.case-section p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* --- BLOG/NOTES CARDS --- */
.note-card {
    padding: 0;
    overflow: hidden;
}

.note-image {
    height: 160px;
    background: var(--bg-tertiary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.note-image i {
    font-size: 3rem;
    color: var(--border-light);
}

.note-content {
    padding: var(--space-xl);
}

.note-date {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.note-title {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-sm);
}

.note-excerpt {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    margin-bottom: var(--space-lg);
}

/* --- TIMELINE / PROCESS --- */
.timeline {
    position: relative;
    padding-left: var(--space-3xl);
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    position: relative;
    padding-bottom: var(--space-2xl);
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-icon {
    position: absolute;
    left: calc(-1 * var(--space-3xl) + 4px);
    width: 24px;
    height: 24px;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
}

.timeline-icon i {
    font-size: var(--font-size-xs);
    color: var(--accent);
}

.timeline-content {
    background: #182526;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all var(--transition-base);
}

.timeline-item:hover .timeline-content {
    border-color: var(--accent);
    transform: translateX(8px);
}

.timeline-title {
    margin-top: 16px;
    color: #e6e6e6;
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-sm);
}

.timeline-text {
    color: #e6e6e6;
    font-size: var(--font-size-sm);
}

/* --- ACCORDION / FAQ --- */
.accordion {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.accordion-item {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: all var(--transition-base);
}

.accordion-item.active {
    border-color: var(--accent);
}

.accordion-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.accordion-header:hover {
    background: var(--glass);
}

.accordion-title {
    font-size: var(--font-size-base);
    font-weight: 600;
}

.accordion-icon {
    font-size: var(--font-size-lg);
    color: var(--accent);
    transition: transform var(--transition-base);
}

.accordion-item.active .accordion-icon {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-base);
}

.accordion-item.active .accordion-content {
    max-height: 500px;
}

.accordion-body {
    padding: 0 var(--space-xl) var(--space-xl);
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.8;
}

/* --- CALCULATOR --- */
.calculator {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
}

.calculator-section {
    margin-bottom: var(--space-2xl);
}

.calculator-label {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.calculator-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.calc-option {
    background: var(--bg-tertiary);
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    cursor: pointer;
    transition: all var(--transition-base);
    text-align: center;
}

.calc-option:hover {
    border-color: var(--border-light);
}

.calc-option.selected {
    border-color: var(--accent);
    background: rgba(0, 137, 123, 0.1);
}

.calc-option-icon {
    font-size: var(--font-size-2xl);
    color: var(--accent);
    margin-bottom: var(--space-sm);
}

.calc-option-title {
    font-weight: 600;
    margin-bottom: var(--space-xs);
}

.calc-option-price {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.calculator-result {
    background: var(--bg-tertiary);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
}

.result-label {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
}

.result-price {
    font-size: var(--font-size-4xl);
    font-weight: 700;
    color: var(--accent);
    margin-bottom: var(--space-md);
}

.result-note {
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

/* --- FORMS --- */
.form-group {
    margin-bottom: var(--space-lg);
}

.form-label {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 500;
    margin-bottom: var(--space-sm);
    color: var(--text-secondary);
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: var(--font-size-base);
    transition: all var(--transition-fast);
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 137, 123, 0.2);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--text-muted);
}

.form-textarea {
    min-height: 150px;
    resize: vertical;
}

/* --- CONTACT GRID --- */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.contact-item {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 137, 123, 0.1);
    border-radius: var(--radius-md);
    color: var(--accent);
    font-size: var(--font-size-xl);
}

.contact-label {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    margin-bottom: var(--space-xs);
}

.contact-value {
    font-weight: 500;
}

.contact-form {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
}

/* --- FOOTER --- */
.footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    padding: var(--space-3xl) 0 var(--space-xl);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: var(--space-2xl);
    margin-bottom: var(--space-2xl);
}

.footer-brand {
    max-width: 300px;
}

.footer-brand-name {
    font-size: var(--font-size-xl);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.logo.negativo {
    color: var(--text-primary);
}

.footer-brand-text {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.8;
}

.footer-title,
.footer-title-negativo {
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-xl);
    color: var(--text-primary);
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-link {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    transition: color var(--transition-fast);
}

.footer-link:hover {
    color: var(--accent);
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.footer-social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    font-size: var(--font-size-lg);
    transition: all var(--transition-fast);
}

.footer-social-link:hover {
    background: var(--accent);
    color: white;
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: var(--space-xl);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-copyright {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

.footer-legal {
    display: flex;
    gap: var(--space-lg);
}

.footer-legal a {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.footer-legal a:hover {
    color: var(--accent);
}

/* --- UTILITIES --- */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-accent {
    color: var(--accent);
}

.text-muted {
    color: var(--text-muted);
}

.mt-auto {
    margin-top: auto;
}

.mb-0 {
    margin-bottom: 0;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@font-face {
    font-family: Skeina;
    src: url(/assets/fonts/Skeina.otf);
}

@font-face {
    font-family: ChampagneLimousines;
    src: url(/assets/fonts/ChampagneLimousines.ttf);
}

@font-face {
    font-family: ModernSans;
    src: url(/assets/fonts/ModernSans-Light.otf);
}

/* --- ANIMATIONS --- */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {

    0%,
    100% {
        opacity: 1;
    }

    50% {
        opacity: 0.5;
    }
}

.animate-pulse {
    animation: pulse 2s infinite;
}

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    .grid-4 {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    :root {
        --font-size-5xl: 2.5rem;
        --font-size-4xl: 2rem;
        --font-size-3xl: 1.5rem;
    }

    /* --- MOBILE MENU DRAWER --- */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: min(320px, 85vw);
        height: 100vh;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        background: rgba(24, 37, 38, 0.97);
        backdrop-filter: blur(24px);
        -webkit-backdrop-filter: blur(24px);
        border-left: 1px solid rgba(82, 103, 95, 0.3);
        padding: 100px var(--space-xl) var(--space-xl);
        box-shadow: -10px 0 40px rgba(0, 0, 0, 0.35);
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        z-index: 999;
        overflow-y: auto;
    }

    .nav-menu.active {
        right: 0;
    }

    /* Links grandes y visibles */
    .nav-menu .nav-link {
        font-size: 1.15rem;
        font-weight: 600;
        color: #e6e6e8;
        padding: var(--space-md) 0;
        border-bottom: 1px solid rgba(82, 103, 95, 0.25);
        display: block;
        width: 100%;
        letter-spacing: 0.02em;
        transition: color 0.2s ease, padding-left 0.2s ease;
    }

    .nav-menu .nav-link:hover,
    .nav-menu .nav-link.active {
        color: var(--accent);
        padding-left: var(--space-sm);
    }

    /* Quitar subrayado animado en mobile */
    .nav-menu .nav-link::after {
        display: none;
    }

    .nav-toggle {
        display: flex;
        z-index: 1001;
    }

    .nav-cta {
        margin-left: 0;
        margin-top: var(--space-xl);
        width: 100%;
    }

    .nav-cta .btn {
        width: 100%;
        justify-content: center;
        padding: var(--space-md) var(--space-xl);
        font-size: 1rem;
    }

    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-social {
        justify-content: center;
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
    }

    .case-header {
        flex-direction: column;
    }

    .case-image {
        width: 100%;
    }
}

@media (max-width: 480px) {
    section {
        padding: var(--space-2xl) 0;
    }

    .container {
        padding: 0 var(--space-md);
    }
}

/* ============================================
   RADIAL SERVICE MAP
   ============================================ */
.radial-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.radial-map-container {
    position: relative;
    width: 100%;
    height: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Center Pulse Hub */
/* Center Pulse Hub */
.radial-center {
    width: 250px;
    height: 250px;
    background: rgba(255, 255, 255, 0.9);
    /* Light theme */
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
    position: absolute;
    /* Changed from relative to absolute */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 50px rgba(0, 137, 123, 0.15);
}

.radial-center .center-content {
    text-align: center;
    color: var(--text-primary);
    pointer-events: none;
}

.radial-center i {
    font-size: 3rem;
    background: var(--gradient-accent);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--space-sm);
    animation: float 4s ease-in-out infinite;
}

.radial-center h2 {
    font-size: var(--font-size-2xl);
    margin-bottom: var(--space-xs);
}

.center-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 1px solid var(--accent);
    opacity: 0.3;
    /* Increased opacity */
    animation: ping 3s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ping {

    75%,
    100% {
        transform: translate(-50%, -50%) scale(1.5);
        opacity: 0;
    }
}

/* Category Bubbles */
.category-bubble {
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 5;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.category-bubble:hover,
.category-bubble.active {
    transform: translate(-50%, -50%) scale(1.15) !important;
    /* Scale up on hover/active */
    background: var(--glass);
    border-color: var(--accent);
    box-shadow: 0 0 30px var(--accent-glow);
    z-index: 20;
}

.category-bubble i {
    font-size: 2rem;
    margin-bottom: var(--space-xs);
    color: var(--text-secondary);
    transition: color 0.3s;
}

.category-bubble:hover i,
.category-bubble.active i {
    color: var(--accent);
}

.category-bubble span {
    font-size: var(--font-size-sm);
    font-weight: 600;
    color: var(--text-primary);
    max-width: 90%;
}

/* Service Sub-Bubbles */
.service-bubble {
    position: absolute;
    width: 110px;
    height: 110px;
    /* Bigger service bubbles */
    background: rgba(255, 255, 255, 0.9);
    /* Light theme */
    backdrop-filter: blur(10px);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--space-xs);
    font-size: var(--font-size-xs);
    opacity: 0;
    transform: scale(0);
    transition: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    z-index: 15;
    pointer-events: none;
    /* Initially disabled */
    color: var(--text-primary);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.service-bubble.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: ALL;
}

.service-bubble:hover {
    transform: scale(1.2) translateY(-5px);
    background: var(--accent);
    color: white;
    border-color: white;
    box-shadow: 0 10px 25px rgba(0, 137, 123, 0.5);
    z-index: 30;
}

/* Tooltip for Service Description */
.service-tooltip {
    position: absolute;
    bottom: -60px;
    /* Position below */
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.9);
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    font-size: var(--font-size-xs);
    width: 200px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
    border: 1px solid var(--border);
    z-index: 50;
}

.service-bubble:hover .service-tooltip {
    opacity: 1;
}

/* Mobile List View */
.mobile-services-list {
    display: none;
    margin-top: var(--space-xl);
}

@media (max-width: 768px) {
    .radial-map-container {
        display: none;
        /* Hide map on mobile */
    }

    .mobile-services-list {
        display: block;
    }

    .mobile-category {
        margin-bottom: var(--space-xl);
    }

    .mobile-category h3 {
        display: flex;
        align-items: center;
        gap: var(--space-sm);
        margin-bottom: var(--space-md);
        color: var(--accent);
        font-size: var(--font-size-xl);
    }

    .mobile-service-item {
        background: var(--bg-secondary);
        border: 1px solid var(--border);
        padding: var(--space-md);
        margin-bottom: var(--space-sm);
        border-radius: var(--radius-md);
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .mobile-service-info h4 {
        margin-bottom: 4px;
        font-size: var(--font-size-base);
    }

    .mobile-service-price {
        font-size: var(--font-size-sm);
        color: var(--accent);
        font-weight: 600;
    }
}

/* ============================================
   ADVANCED ANIMATIONS & EFFECTS
   ============================================ */

/* Keyframe Animations */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

@keyframes pulse-glow {

    0%,
    100% {
        box-shadow: 0 0 5px var(--accent), 0 0 10px transparent;
    }

    50% {
        box-shadow: 0 0 20px var(--accent), 0 0 40px rgba(0, 137, 123, 0.3);
    }
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

@keyframes rotate-border {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes bounce-subtle {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-5px);
    }
}

@keyframes scale-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.02);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes glowPulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 1;
    }
}

/* Animated Gradient Text */
.animated-gradient {
    background: linear-gradient(90deg, var(--accent), var(--accent-glow), #0288D1, var(--accent));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
}

/* Hero Title Animation */
.hero-title span {
    background: linear-gradient(90deg, var(--accent), var(--accent-glow), #52675f, var(--accent));
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
}

/* Floating Elements */
.float-animation {
    animation: float 3s ease-in-out infinite;
}

.hero-badge {
    animation: float 4s ease-in-out infinite;
}

/* Card 3D Hover Effects */
.card {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card:hover {
    transform: translateY(-8px) rotateX(2deg) rotateY(-2deg);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, transparent 40%, rgba(99, 102, 241, 0.1) 50%, transparent 60%);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.card:hover::before {
    opacity: 1;
    animation: shimmer 1.5s ease-in-out;
}

/* Icon Bounce on Card Hover */
.card:hover .card-icon {
    animation: bounce-subtle 0.6s ease;
}

.card:hover .card-icon i {
    transform: scale(1.1);
    transition: transform 0.3s ease;
}

/* Button Animations */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
    opacity: 0;
}

.btn-primary:hover::after {
    animation: shimmer 0.8s ease-out;
    opacity: 1;
}

.btn:active {
    transform: scale(0.97);
}

/* Section Badge Glow */
.section-badge {
    animation: pulse-glow 3s ease-in-out infinite;
    transition: all 0.3s ease;
}

.section-badge:hover {
    transform: scale(1.05);
}

/* Interactive Icons */
.card-icon {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
}

.card:hover .card-icon {
    background: var(--accent);
    transform: rotate(-5deg) scale(1.1);
}

.card:hover .card-icon i {
    color: white;
}

/* Service Category Title Underline Animation */
.service-category-title::after {
    content: '';
    display: block;
    width: 0;
    height: 3px;
    background: var(--gradient-accent);
    transition: width 0.5s ease;
    margin-top: var(--space-sm);
    border-radius: 2px;
}

.service-category-title:hover::after {
    width: 100px;
}

/* Project Card Image Zoom + Overlay */
.project-card .project-image::after {
    content: 'Ver Proyecto';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: var(--gradient-accent);
    color: white;
    padding: var(--space-sm) var(--space-lg);
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.project-card:hover .project-image::after {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.project-card .project-image::before {
    content: '';
    position: absolute;
    inset: 0;
    background: #52675f;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.project-card:hover .project-image::before {
    opacity: 1;
}

/* Timeline Animation */
.timeline-item {
    opacity: 1;
    animation: fadeInUp 0.6s ease-out backwards;
}

.timeline-item:nth-child(1) {
    animation-delay: 0.1s;
}

.timeline-item:nth-child(2) {
    animation-delay: 0.2s;
}

.timeline-item:nth-child(3) {
    animation-delay: 0.3s;
}

.timeline-item:nth-child(4) {
    animation-delay: 0.4s;
}

.timeline-item:nth-child(5) {
    animation-delay: 0.5s;
}

.timeline-item:nth-child(6) {
    animation-delay: 0.6s;
}

.timeline-item:nth-child(7) {
    animation-delay: 0.7s;
}

.timeline-item:nth-child(8) {
    animation-delay: 0.8s;
}

.timeline-icon {
    transition: all 0.3s ease;
}

.timeline-item:hover .timeline-icon {
    transform: scale(1.3);
    box-shadow: 0 0 20px var(--accent);
}

/* Accordion Smooth Animation */
.accordion-item {
    transition: all 0.3s ease;
}

.accordion-item:hover {
    transform: translateX(5px);
}

.accordion-item.active {
    background: rgba(0, 137, 123, 0.05);
    border-color: var(--accent);
}

/* Footer Social Icons Bounce */
.footer-social-link {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.footer-social-link:hover {
    transform: translateY(-5px) scale(1.2);
}

/* Tag Pills Animation */
.tag {
    transition: all 0.3s ease;
    cursor: default;
}

.tag:hover {
    transform: scale(1.1);
    background: var(--accent);
    color: white;
}

/* Nav Link Hover Glow */
.nav-link {
    transition: all 0.3s ease;
}

.nav-link:hover {
    text-shadow: 0 0 15px rgba(0, 137, 123, 0.5);
}

/* Testimonial Card Float */
.testimonial-card {
    transition: all 0.4s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px) scale(1.02);
}

.testimonial-card:hover .testimonial-avatar {
    box-shadow: 0 0 30px rgba(0, 137, 123, 0.4);
}

/* ============================================
   PRICE CALCULATOR STYLES
   ============================================ */

.price-calculator {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
}

.calculator-label {
    text-align: center;
    margin-bottom: var(--space-xl);
    font-size: var(--font-size-2xl);
    color: var(--accent);
}

.calc-section-title {
    font-size: var(--font-size-lg);
    margin-bottom: var(--space-md);
    border-bottom: 2px solid var(--border);
    padding-bottom: var(--space-sm);
    color: var(--text-primary);
}

.calculator-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: var(--space-md);
    margin-bottom: var(--space-xl);
}

.calc-option {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
}

.calc-option:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
}

.calc-option.selected {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
    box-shadow: var(--shadow-md);
    transform: scale(1.05);
}

.calc-option.selected .calc-option-icon,
.calc-option.selected .calc-option-title,
.calc-option.selected .calc-option-price {
    color: white;
}

.calc-option-icon {
    font-size: 2rem;
    margin-bottom: var(--space-sm);
    color: var(--accent);
    transition: color 0.3s;
}

.calc-option-title {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.calc-option-price {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.calc-row {
    margin-bottom: var(--space-xl);
    background: var(--bg-primary);
    padding: var(--space-md);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
}

.calc-row label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-sm);
    color: var(--text-primary);
}

.calc-row select,
.calc-row input[type="number"] {
    width: 100%;
    padding: var(--space-md);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: var(--font-size-base);
}

.complexity-info {
    margin-top: var(--space-md);
    font-size: 0.9rem;
    color: var(--text-muted);
    font-style: italic;
    border-left: 3px solid var(--accent);
    padding-left: var(--space-md);
}

.checkbox-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-md);
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
}

.checkbox-item:hover {
    border-color: var(--accent);
}

.checkbox-item.selected {
    border-color: var(--accent);
    background: rgba(0, 137, 123, 0.1);
}

.checkbox-item input {
    display: none;
}

.price-result {
    background: #52675f;
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    text-align: center;
    margin-top: var(--space-xl);
    box-shadow: var(--shadow-lg);
    color: white;
}

.price-result-value {
    font-size: 3rem;
    font-weight: 800;
    margin: var(--space-sm) 0;
}


/* Contact Card Glow */
.contact-method-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 137, 123, 0.2);
}

/* Form Input Focus Animation */
input:focus,
textarea:focus,
select:focus {
    animation: pulse-glow 1s ease-out;
}

/* Staggered Grid Animation */
.grid>*:nth-child(1) {
    animation: fadeInUp 0.5s ease 0.1s backwards;
}

.grid>*:nth-child(2) {
    animation: fadeInUp 0.5s ease 0.2s backwards;
}

.grid>*:nth-child(3) {
    animation: fadeInUp 0.5s ease 0.3s backwards;
}

.grid>*:nth-child(4) {
    animation: fadeInUp 0.5s ease 0.4s backwards;
}

.grid>*:nth-child(5) {
    animation: fadeInUp 0.5s ease 0.5s backwards;
}

.grid>*:nth-child(6) {
    animation: fadeInUp 0.5s ease 0.6s backwards;
}

/* Scroll Progress Indicator Background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-accent);
    transform-origin: left;
    transform: scaleX(0);
    z-index: 9999;
    transition: transform 0.1s ease;
}

/* Glassmorphism Shine Effect */
.card-glass::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.05) 50%,
            transparent 70%);
    animation: shimmer 3s ease-in-out infinite;
    pointer-events: none;
}

/* Price Result Glow */
.price-result {
    position: relative;
    overflow: hidden;
}

.price-result::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 2s ease-in-out infinite;
}

/* Reduce Motion for Accessibility */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================
   NEW FEATURES (SKILLS, CONTRACTS, REFERRALS)
   ============================================ */

/* --- SKILLS PROGRESS BARS --- */
.skills-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.skill-item {
    background: var(--bg-secondary);
    padding: var(--space-md) var(--space-lg);
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    transition: all var(--transition-base);
}

.skill-item:hover {
    border-color: var(--border-light);
    transform: translateX(5px);
}

.skill-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: var(--space-sm);
    font-weight: 600;
}

.skill-name i {
    margin-right: 10px;
    font-size: 1.2rem;
}

.skill-bar {
    width: 100%;
    height: 10px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-full);
    overflow: hidden;
    position: relative;
}

.skill-progress {
    height: 100%;
    border-radius: var(--radius-full);
    position: relative;
    width: 0;
    /* Animation handled by AOS or Keyframes */
    animation: fillBar 1.5s ease-out forwards;
    transform-origin: left;
}

@keyframes fillBar {
    from {
        width: 0;
    }
}

/* Overlay de fondo cuando el menú mobile está abierto */
@media (max-width: 768px) {
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 998;
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
        animation: fadeIn 0.3s ease;
    }

    .nav-overlay.active {
        display: block;
    }
}

/* --- WHATSAPP PULSE ANIMATION --- */
@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.btn-whatsapp.pulse {
    animation: pulse-green 2s infinite;
}

/* --- REFERRAL PROGRESS --- */
.referral-card {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin-bottom: var(--space-xl);
    overflow: hidden;
    position: relative;
}

.referral-steps {
    display: flex;
    justify-content: space-between;
    margin-top: var(--space-xl);
    position: relative;
    flex-wrap: wrap;
    gap: 1rem;
}

.referral-steps::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--border-light);
    z-index: 0;
}

.referral-step {
    position: relative;
    z-index: 1;
    text-align: center;
    flex: 1;
}

.step-circle {
    width: 50px;
    height: 50px;
    background: var(--bg-primary);
    border: 2px solid var(--accent);
    border-radius: 50%;
    margin: 0 auto var(--space-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent);
    transition: all 0.3s ease;
}

.referral-step:hover .step-circle {
    background: var(--accent);
    color: white;
    transform: scale(1.1);
}

.step-label {
    font-size: var(--font-size-xs);
    color: var(--text-muted);
}

.step-discount {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: #0b0b0b;
}

/* --- CONTRACTS SECTION --- */
.contracts-container {
    padding: var(--space-2xl) 0;
}

.timeline-nav {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.timeline-btn {
    padding: var(--space-sm) var(--space-lg);
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s;
}

.timeline-btn.active,
.timeline-btn:hover {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.contract-template {
    display: none;
    animation: fadeIn 0.5s ease;
}

.contract-template.active {
    display: block;
}

.template-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-2xl);
    position: relative;
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border);
    padding-bottom: var(--space-lg);
}

.template-content {
    background: var(--bg-primary);
    padding: var(--space-xl);
    border-radius: var(--radius-md);
    font-family: monospace;
    font-size: var(--font-size-sm);
    white-space: pre-wrap;
    color: var(--text-secondary);
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid var(--border-light);
}

.copy-btn {
    position: absolute;
    top: var(--space-xl);
    right: var(--space-xl);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- SKILLS SQUARE GRID --- */
.skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-2xl);
}

.skill-square {
    background: var(--bg-tertiary);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    aspect-ratio: 1;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s ease;
    z-index: 1;
}

.skill-square:hover {
    transform: translateY(-5px);
    border-color: var(--skill-color);
    box-shadow: 0 10px 30px -10px var(--skill-color);
}

.skill-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: var(--skill-percent);
    background: var(--skill-color);
    opacity: 0.15;
    z-index: -1;
    transition: height 1.5s cubic-bezier(0.19, 1, 0.22, 1);
    transform-origin: bottom;
}

.skill-square:hover .skill-fill {
    opacity: 0.25;
}

.skill-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
}

.skill-content i {
    font-size: 2.5rem;
    color: var(--skill-color);
    margin-bottom: var(--space-sm);
    transition: transform 0.3s;
}

.skill-square:hover .skill-content i {
    transform: scale(1.1) rotate(5deg);
}

.skill-name {
    font-weight: 700;
    font-size: var(--font-size-lg);
}

.skill-percent-text {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
}

.txt-type {
    color: var(--accent);
    /* Usa tu color Teal */
    text-decoration: none;
    position: relative;
}

/* El cursor parpadeante */
.txt-type::after {
    content: '|';
    position: absolute;
    right: -10px;
    color: var(--text-primary);
    animation: blink-cursor 0.7s infinite;
    font-weight: 300;
}

/* Ocultar cursor al terminar si se desea (opcional) */
body.no-cursor .txt-type::after {
    display: none;
}

@keyframes blink-cursor {
    0% {
        opacity: 1;
    }

    50% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

/* ============================================
   DARK MODE SYSTEM
   ============================================ */

/* Redefinición de variables para Modo Oscuro */
body.dark-mode {
    --bg-primary: #0b0b0b; 
    --bg-secondary: #182526; /* Cambiado a un tono más oscuro y elegante */
    --bg-tertiary: #2e3d37;

    --text-primary: #e6e6e8; 
    --text-secondary: #b0b0a9; /* Mejor contraste */
    --text-muted: #52675f;

    --border: #2c3e3a;
    --border-light: #52675f;

    --glass: rgba(24, 37, 38, 0.8);
    --glass-border: rgba(82, 103, 95, 0.3);

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.6);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.7);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.8);
}

/* Ajustes específicos para elementos en modo oscuro */
body.dark-mode .nav-logo span {
    text-shadow: 0 0 10px rgba(0, 137, 123, 0.5);
}

body.dark-mode .timeline-content {
    background-color: #52675f;
}

body.dark-mode .navbar {
    background: #0b0b0b;
}

body.dark-mode .navbar.scrolled {
    background: #0b0b0b;
    opacity: 0.95;
}

/* Radial Map Dark Mode */
body.dark-mode .radial-center {
    background: rgba(30, 41, 59, 0.9);
    /* Slate 800 con transparencia */
    border-color: var(--border-light);
}

body.dark-mode .service-bubble {
    background: rgba(30, 41, 59, 0.9);
    /* Slate 800 con transparencia */
}

body.dark-mode .project-card .project-image::before {
    background: #e6e6e8;
    /* bg-primary oscuro */
}

/* Botón Flotante de Cambio de Tema */
.theme-toggle-btn {
    position: fixed;
    bottom: 30px;
    left: 30px;
    /* A la izquierda para no chocar con WhatsApp si agregas widget */
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--bg-secondary);
    border: 1px solid var(--border);
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 9999;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    align-items: center;
    justify-content: center;
}

.theme-toggle-btn:hover {
    transform: scale(1.1) rotate(15deg);
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: 0 0 20px rgba(0, 137, 123, 0.4);
}

/* Animación del icono */
.theme-toggle-btn i {
    transition: transform 0.5s ease;
}

body.dark-mode .theme-toggle-btn i {
    transform: rotate(360deg);
}

/* Media Query para móviles (ajustar posición) */
@media (max-width: 768px) {
    .theme-toggle-btn {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ============================================
   CUSTOM STYLES FOR SERVICE PREVIEW CARDS (MODIFICADO)
   ============================================ */

.service-preview-card {
    padding-left: 0;
    padding-right: 0;
    /* Añadimos flexbox para un mejor control del contenido */
    display: flex;
    flex-direction: column;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-preview-card .card-icon {
    width: calc(100% - 50px);
    /* CAMBIO: Aumentamos la altura del fondo del ícono en 15px */
    height: 115px;
    /* CAMBIO: Aumentamos la altura del fondo del ícono en 20px más */
    height: 135px;
    border-radius: var(--radius-lg);
    margin-left: auto;
    margin-right: auto;
    /* CAMBIO: Reducimos el margen inferior del ícono */
    margin-bottom: var(--space-lg);
}

.service-preview-card .card-icon i {
    font-size: 2.5rem;
}

.service-preview-content {
    /* CAMBIO: Ajustamos el padding para que el botón tenga 15px de margen a los costados */
    padding: 0 15px var(--space-lg);
    /* CAMBIO: Ajustamos el padding para que el botón tenga 15px de margen a los costados y 20px abajo */
    padding: 0 15px 20px;
    /* Añadimos flexbox para alinear el botón al final */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* Permite que este contenedor crezca y ocupe el espacio */
}

/* NUEVA REGLA: Hacemos que el texto ocupe el espacio disponible */
.service-preview-content .card-text {
    flex-grow: 1;
    /* CAMBIO: Reducimos el margen inferior para acercar el botón */
    margin-bottom: var(--space-lg);
}

/* NUEVA REGLA: Ajustamos el botón para que no sea tan ancho */
.service-preview-content .btn {
    /* CAMBIO: Hacemos que el botón ocupe todo el ancho disponible */
    width: 100%;
    /* CAMBIO: Reducimos el padding vertical para hacer el botón más bajo */
    padding-top: var(--space-sm);
    padding-bottom: var(--space-sm);
}

/* Anula la animación de inclinación y crecimiento en las tarjetas de servicio */
.service-preview-card:hover .card-icon {
    transform: none;
    /* Elimina la inclinación y el escalado */
    background: var(--accent);
    /* Restaura el cambio de color de fondo */
}

.service-preview-card:hover .card-icon i {
    color: white;
    /* Restaura el cambio de color del ícono */
}

/* ============================================
   ABOUT REWORK
   ============================================ */

/* --- 1. SECCIÓN SOBRE NOSOTROS (Layout Imagen + Texto) --- */
.about-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.about-image-container {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: visible;
    /* Permitir que la tarjeta flote fuera */
}

.about-main-img {
    width: 100%;
    height: 500px;
    object-fit: cover;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
}

.about-floating-card {
    position: absolute;
    bottom: -40px;
    right: 70px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-glow) 100%);
    color: white;
    padding: 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    /* max-width: 300px; */
    width: 410px;
    height: 160px;
    z-index: 2;
}

.about-floating-card h3 {
    font-size: 2.6rem;
    margin-bottom: 0;
    line-height: 1.2;
}

.check-list li {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-lg);
    align-items: flex-start;
}

.check-list i {
    color: var(--accent);
    font-size: 1.2rem;
    margin-top: 4px;
    flex-shrink: 0;
}

/* =======================================================
   PROFILE CARDS
   ======================================================= */

/* Contenedor Grid para las tarjetas (Reemplaza al flex container anterior) */
.team-grid {
    display: grid;
    /* Por defecto en celulares (pantallas pequeñas): 1 sola columna */
    grid-template-columns: repeat(1, 1fr);
    gap: 30px;
    padding: 20px 0;
    justify-items: center;
}

@media (min-width: 768px) {
    .team-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Para Computadoras (pantallas grandes): 4 columnas alineadas */
@media (min-width: 1024px) {
    .team-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 20px; /* Reducimos un poco el gap en PC para que las 4 entren cómodamente */
    }
}

/* LA TARJETA PRINCIPAL */
.perfil-tarjeta {
  width: 100%; /* CORRECCIÓN: Para que sea responsivo */
  max-width: 320px; /* Evita que la tarjeta se haga gigante en pantallas grandes */
  background: #182526;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.3);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.1);
  border: 1px solid rgba(255, 255, 255, 0.05);
}
.perfil-tarjeta:hover {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(110, 69, 224, 0.2);
  border-color: rgba(110, 69, 224, 0.3);
}

.tarjeta-header {
  height: 180px;
  position: relative;
  overflow: hidden;
}

.tarjeta-header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s;
}

.perfil-tarjeta:hover .tarjeta-header img {
  transform: scale(1.05);
}

.tarjeta-header::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 40%;
  background: linear-gradient(transparent, var(--card-bg));
}

.tarjeta-body {
  padding: 1.5rem;
  text-align: center;
  position: relative;
}

.avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 3px solid var(--card-bg);
  object-fit: cover;
  position: absolute;
  top: -60px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  transition: all 0.3s;
}

.perfil-tarjeta:hover .avatar {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--card-bg), 0 0 20px rgba(110, 69, 224, 0.5);
}

.role {
  color: #e6e6e6;
  font-weight: 500;
  font-size: 0.9rem;
  margin-bottom: 1.2rem;
  display: inline-block;
  position: relative;
}

.role::after {
  content: "";
  position: absolute;
  bottom: -6px;
  left: 50%;
  transform: translateX(-50%);
  width: 30px;
  height: 2px;
  background: var(--accent);
  transition: width 0.3s;
}

.perfil-tarjeta:hover .role::after {
  width: 50px;
}

.bio {
  color: #e6e6e6;
  font-size: 0.9rem;
  line-height: 1.5;
  margin-bottom: 1.5rem;
  min-height: 60px;
}

.skills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

.skill {
  background: #52675f;
  color: #e6e6e6;
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.75rem;
  font-weight: 500;
  transition: all 0.3s;
}

.perfil-tarjeta:hover .skill {
  background: rgba(110, 69, 224, 0.2);
}

.redes-sociales {
  display: flex;
  justify-content: center;
  gap: 1rem;
}

.red-social {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  background: #52675f;
  transition: all 0.3s;
  text-decoration: none;
}

.red-social:hover {
  color: white;
  background: var(--accent);
  transform: translateY(-3px);
}

.perfil-tarjeta::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="100%" height="100%"><filter id="noise"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="1" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23noise)" opacity="0.05"/></svg>');
  pointer-events: none;
  z-index: 3;
  mix-blend-mode: overlay;
}

/* ============================================
   3D CIRCULAR GALLERY (FROM SCRATCH)
   ============================================ */

.circular-gallery-main {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: background-color var(--transition-base);
}

.circular-gallery-section {
    position: relative;
    height: 100vh;
    /* No longer depends on 500vh */
    height: 100dvh;
    overflow: hidden;
}

.gallery-sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: radial-gradient(circle at center, rgba(0, 137, 123, 0.15) 0%, var(--bg-primary) 80%);
}

.gallery-title-layer {
    position: absolute;
    top: 20px;
    /* Movido al tope absoluto */
    text-align: center;
    z-index: 10;
    pointer-events: none;
}

.gallery-title-layer h1 {
    font-size: clamp(2rem, 6vw, 4rem);
    /* Tamaño reducido */
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    transition: color var(--transition-base);
}

.gallery-title-layer p {
    color: var(--accent);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-size: 0.8rem;
    /* Un poco más chico también */
}

.gallery-scene {
    position: relative;
    width: 100%;
    height: 100%;
    perspective: 2000px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 50px;
    /* Empuja el pivot hacia abajo */
}

.gallery-pivot {
    position: relative;
    width: 260px;
    height: 360px;
    transform-style: preserve-3d;
    will-change: transform;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gallery-card {
    position: absolute;
    width: 260px;
    height: 360px;
    transition: opacity 0.6s ease;
}

.gallery-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    border-radius: 24px;
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-lg);
    background-color: var(--bg-secondary);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275),
        border-color var(--transition-base),
        background-color var(--transition-base);
}

.gallery-card:hover .gallery-card-inner {
    transform: scale(1.1);
    border-color: var(--accent);
    box-shadow: var(--shadow-glow);
}

.gallery-card-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-card-inner::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 40%;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.6), transparent);
}

body.dark-mode .gallery-card-inner::after {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

.scroll-instruction {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.scroll-instruction .mouse {
    width: 22px;
    height: 38px;
    border: 2px solid var(--border);
    border-radius: 20px;
    position: relative;
}

.scroll-instruction .mouse::after {
    content: '';
    width: 4px;
    height: 8px;
    background: var(--accent);
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    top: 6px;
    border-radius: 2px;
    animation: mouse-scroll 1.5s infinite;
}

@keyframes mouse-scroll {
    0% {
        transform: translate(-50%, 0);
        opacity: 0;
    }

    30% {
        opacity: 1;
    }

    100% {
        transform: translate(-50%, 15px);
        opacity: 0;
    }
}

.scroll-instruction span {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
}

@media (max-width: 768px) {
    .gallery-pivot {
        width: 180px;
        height: 250px;
    }

    .gallery-card {
        width: 180px;
        height: 250px;
    }
}

/* Theme Toggle Button Style */
.theme-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-base);
    margin-left: var(--space-md);
}

.theme-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    background-color: var(--glass);
}

/* --- GALLERY MODAL --- */
.gallery-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.gallery-modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 1000px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-light);
    border-radius: 32px;
    overflow: hidden;
    transform: scale(0.8) translateY(40px);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    z-index: 10001;
}

.gallery-modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
}

.modal-close:hover {
    background: var(--accent);
    transform: rotate(90deg);
}

.modal-body {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 500px;
}

.modal-image-container {
    height: 100%;
    background: #000;
}

.modal-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modal-info {
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.modal-info h2 {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.modal-info p {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

/* ============================================
   FILTROS DE PROYECTOS (PORTFOLIO TABS)
   ============================================ */
.filter-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-sm);
    margin-top: var(--space-xl);
    margin-bottom: var(--space-2xl);
}

.filter-btn {
    padding: var(--space-sm) var(--space-lg);
    background: transparent;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    font-weight: 600;
    font-size: var(--font-size-sm);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: translateY(-2px);
}

.filter-btn.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
    box-shadow: 0 4px 15px rgba(0, 137, 123, 0.4);
}

/* Transición suave al filtrar */
.project-card {
    transition: transform 0.4s ease, opacity 0.4s ease;
}

/* ============================================
   MODERN MASONRY GALLERY (REDISEÑO GALERÍA)
   ============================================ */
.modern-gallery {
    columns: 3 300px; /* Crea columnas estilo Pinterest */
    column-gap: var(--space-md);
    padding: var(--space-md) 0 var(--space-4xl) 0;
}

.gallery-item {
    break-inside: avoid; /* Evita que la imagen se corte entre columnas */
    margin-bottom: var(--space-md);
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.gallery-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.gallery-item-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.4) 50%, transparent 100%);
    opacity: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: var(--space-xl);
    transition: opacity 0.4s ease;
}

.gallery-item:hover {
    box-shadow: var(--shadow-lg);
    z-index: 2;
}

.gallery-item:hover img {
    transform: scale(1.08);
}

.gallery-item:hover .gallery-item-overlay {
    opacity: 1;
}

.gallery-item-category {
    color: var(--accent);
    font-size: var(--font-size-xs);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 700;
    margin-bottom: 5px;
    transform: translateY(20px);
    transition: transform 0.4s ease 0.1s;
}

.gallery-item-title {
    color: #ffffff;
    font-size: var(--font-size-xl);
    font-weight: 700;
    line-height: 1.2;
    transform: translateY(20px);
    transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-item-category,
.gallery-item:hover .gallery-item-title {
    transform: translateY(0);
}

/* Modal Mejorado para imágenes */
#gallery-modal .modal-image-container img {
    border-radius: 12px 0 0 12px;
}


/* Agregamos el alto aproximado del navbar (90px) al padding superior para empujarlo hacia abajo */
.hero {
    padding-top: calc(var(--space-4xl) + 90px) !important; 
}

/* Ajustes para Tablets */
@media (max-width: 768px) {
    .hero {
        padding-top: calc(var(--space-3xl) + 80px) !important;
    }
}

/* Ajustes para Celulares */
@media (max-width: 480px) {
    /* Forzamos el padding en celulares porque la etiqueta 'section' lo reducía demasiado */
    section.hero {
        padding-top: calc(var(--space-2xl) + 90px) !important;
    }
}

@media (max-width: 768px) {
    .modern-gallery {
        columns: 2 150px;
    }
    .gallery-item-overlay {
        padding: var(--space-md);
    }
    .gallery-item-title {
        font-size: var(--font-size-base);
    }
}

@media (max-width: 768px) {
    .modal-body {
        grid-template-columns: 1fr;
    }

    .modal-image-container {
        height: 300px;
    }

    .modal-info {
        padding: 30px;
    }

    .modal-info h2 {
        font-size: 1.8rem;
    }
}

/* Responsive layout for Nosotros section */
@media (max-width: 768px) {
    .about-split-layout {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .about-main-img {
        height: 300px;
    }

    .about-floating-card {
        position: relative;
        width: 100%;
        right: 0;
        bottom: 0;
        margin-top: var(--space-md);
        height: auto;
        padding: 1.5rem;
    }

    .about-floating-card h3 {
        font-size: 1.8rem;
    }
}
