/*
Theme Name: Digital Innovations Modern
Theme URI: https://digitalinnovations.cl
Author: Digital Innovations
Description: A custom, high-performance theme built for speed and aesthetics. V2 with Interactive Tech Stack.
Version: 1.2.0
Text Domain: di-modern
*/

:root {
    --primary: #4f46e5;
    /* Indigo 600 */
    --primary-dark: #4338ca;
    /* Indigo 700 */
    --secondary: #0ea5e9;
    /* Sky 500 */
    --accent: #8b5cf6;
    /* Violet 500 */
    --dark: #0f172a;
    /* Slate 900 */
    --light: #f8fafc;
    /* Slate 50 */
    --gray: #64748b;
    /* Slate 500 */
    --white: #ffffff;

    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 30px -5px rgba(0, 0, 0, 0.1);

    --container: 1200px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--dark);
    line-height: 1.7;
    background-color: var(--white);
    overflow-x: hidden;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

/* Utilities */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 20px;
}

/* Fix for Anchor Scrolling hidden by fixed header */
section[id] {
    scroll-margin-top: 100px;
}

.btn {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.6);
    color: white;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
    box-shadow: none;
    margin-left: 15px;
}

.btn-secondary:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.2);
}

/* Header */
.site-header {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 15px 0;
}

.header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo a {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-decoration: none;
}

.main-nav ul {
    display: flex;
    gap: 30px;
    margin: 0;
    padding: 0;
}

.main-nav a {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.main-nav a:hover {
    color: var(--primary);
}

/* Hero Section */
.hero {
    padding: 180px 0 120px;
    background: linear-gradient(135deg, #fdfbfb 0%, #ebedee 100%);
    background: radial-gradient(circle at top right, #e0e7ff 0%, #ffffff 40%);
    text-align: center;
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, #1e293b, #334155);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -2px;
}

.hero p {
    font-size: 1.25rem;
    color: var(--gray);
    max-width: 600px;
    margin: 0 auto 40px;
}

/* Sections General */
.section {
    padding: 100px 0;
}

.bg-light {
    background: var(--light);
}

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

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--dark);
}

.section-subtitle {
    color: var(--primary);
    text-transform: uppercase;
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
    display: block;
}

/* Services Cards */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 60px;
}

.service-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

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

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--primary);
    opacity: 0;
    transition: 0.3s;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.service-card p {
    color: var(--gray);
    font-size: 1.05rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.service-card ul {
    font-size: 0.95rem;
    color: var(--gray);
    text-align: left;
    list-style: none;
    /* Removed defaults to use custom */
    padding-left: 0;
}

.service-card li {
    margin-bottom: 10px;
    display: flex;
    align-items: flex-start;
}

.service-card li::before {
    content: '→';
    color: var(--primary);
    margin-right: 10px;
    font-weight: bold;
}

/* Philosophy & Leadership */
.philosophy-wrap {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.phil-content p {
    margin-bottom: 20px;
    color: var(--gray);
    font-size: 1.1rem;
}

.phil-image img {
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.leadership-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.leader-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border-top: 4px solid var(--accent);
}

.leader-card h4 {
    margin-bottom: 5px;
    color: var(--dark);
}

.leader-card span {
    font-size: 0.85rem;
    color: var(--primary);
    font-weight: 600;
    text-transform: uppercase;
}

.leader-card p {
    font-size: 0.95rem;
    margin-top: 10px;
    color: var(--gray);
}

/* TECH STACK TABS */
.tech-tabs-nav {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}

.tech-tab-btn {
    padding: 12px 25px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 30px;
    cursor: pointer;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--gray);
    transition: all 0.2s;
}

.tech-tab-btn:hover {
    background: #f1f5f9;
    color: var(--primary);
}

.tech-tab-btn.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.tech-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tech-panel.active {
    display: block;
}

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

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

.stack-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 20px;
}

.stack-item {
    background: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid #f1f5f9;
    font-weight: 600;
    font-size: 1rem;
    color: var(--dark);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 120px;
    transition: 0.3s;
}

.stack-item:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: var(--shadow-md);
    color: var(--primary);
}

.priority-high {
    border-bottom: 3px solid #10b981;
}

.priority-medium {
    border-bottom: 3px solid #f59e0b;
}

.priority-low {
    border-bottom: 3px solid #cbd5e1;
}


/* CLIENTS SUCCESS REWORKED */
.success-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.success-item {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--secondary);
}

.success-item h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.success-item p {
    font-size: 1rem;
    color: var(--gray);
    margin: 0;
}

/* Contact */
.contact-section {
    background: linear-gradient(135deg, var(--primary) 0%, #7c3aed 100%);
    color: white;
}

.contact-section .section-title,
.contact-section p {
    color: white;
}

.contact-form {
    max-width: 600px;
    margin: 50px auto 0;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.contact-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.9rem;
    font-weight: 500;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.2);
    color: white;
    font-family: inherit;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

/* Improved Contact Button Contrast */
.contact-form button {
    width: 100%;
    background: #ffffff;
    /* Pure white */
    color: var(--primary);
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    font-size: 1.1rem;
    transition: 0.3s;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.contact-form button:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Footer */
footer {
    background: var(--dark);
    color: #94a3b8;
    padding: 60px 0 20px;
    text-align: center;
}

footer h3 {
    color: white;
}

footer .copyright {
    margin-top: 40px;
    font-size: 0.9rem;
    border-top: 1px solid #1e293b;
    padding-top: 20px;
}

/* ... (previous styles) ... */

/* GUTENBERG BLOCKS COMPATIBILITY */

/* Alignments */
.wp-block-group.alignfull {
    margin-left: calc(-50vw + 50%);
    margin-right: calc(-50vw + 50%);
    max-width: 100vw;
    width: 100vw;
}

.wp-block-group.container {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--container);
}

/* Hero Group */
.wp-block-group.hero {
    padding: 180px 20px 120px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Columns / Grid Replacements */
.wp-block-columns.services-grid,
.wp-block-columns.success-grid,
.wp-block-columns.leadership-grid {
    gap: 30px;
    margin-top: 60px;
}

/* Force grid-like behavior on columns if needed, or rely on flex */
@media (min-width: 782px) {
    .wp-block-columns {
        flex-wrap: nowrap;
    }
}

.wp-block-column.service-card {
    margin-bottom: 0 !important;
    /* Reset WP margins */
    flex-basis: 0;
    flex-grow: 1;
}

/* Typography in Blocks */
.wp-block-heading {
    margin-bottom: 1rem;
}

.wp-block-paragraph {
    margin-bottom: 1.5rem;
}

/* Buttons */
.wp-block-buttons {
    gap: 15px;
    justify-content: center;
}

.wp-block-button__link {
    display: inline-block;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white !important;
    font-weight: 600;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    border: none;
}

.wp-block-button__link:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.6);
}

.is-style-outline .wp-block-button__link {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary) !important;
    box-shadow: none;
}

.is-style-outline .wp-block-button__link:hover {
    background: var(--primary);
    color: white !important;
}

/* Editor Specifics */
.editor-styles-wrapper {
    font-family: var(--font-body);
}