/* Seycsa Electrical Systems - Modern Corporate Theme */

:root {
    /* Color Palette - Default (Light) */
    --primary: #1e73be;
    --primary-hover: #165c9e;

    /* Semantic Colors */
    --bg-body: #ffffff;
    /* Main background - White */
    --bg-surface: #f7f8f9;
    /* Cards/Sections - Light Gray */
    --bg-contrast: #222222e8;
    /* Dark Footer/Header backgrounds */

    --text-primary: #222222;
    --text-secondary: #575760;
    --text-inverse: #ffffff;

    --border: #e0e0e0;

    /* Legacy/Compat Variables mapped to Semantic */
    --accent: var(--primary);
    --accent-hover: var(--primary-hover);
    --accent-text: #274686;

    --base: var(--bg-surface);
    --base-2: var(--bg-surface);
    --base-3: var(--bg-body);

    --contrast: var(--text-primary);
    --contrast-2: var(--text-secondary);
    --contrast-3: #b2b2be;

    /* Spacing & Layout */
    --container-width: 1200px;
    --header-height: 80px;
    --radius: 8px;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
}

/* Dark Theme Overrides */
[data-theme="dark"] {
    --bg-body: #1a1a1a;
    --bg-surface: #262626;
    --bg-contrast: #0f0f0f;

    --text-primary: #f0f0f0;
    --text-secondary: #b0b0b0;
    --text-inverse: #ffffff;
    /* Keep white for heavy contrast areas */

    --border: #333333;

    /* Re-map Legacy for Dark Mode */
    --base: var(--bg-surface);
    --base-2: var(--bg-surface);
    --base-3: var(--bg-body);

    --contrast: var(--text-primary);
    --contrast-2: var(--text-secondary);
    --accent-text: #ffffff;

    /* Adjust Shadows for Dark Mode to be visible if needed or subtler */
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -1px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4), 0 4px 6px -2px rgba(0, 0, 0, 0.3);
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--base-3);
    color: var(--contrast);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s ease;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* Utility Classes */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 20px;
}

.text-accent {
    color: var(--accent-text);
}

.text-contrast {
    color: var(--contrast);
}

.text-contrast-2 {
    color: var(--contrast-2);
}

.bg-base {
    background-color: var(--base);
}

.bg-base-2 {
    background-color: var(--base-2);
}

.bg-contrast {
    background-color: var(--contrast);
    color: var(--base-3);
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: var(--radius);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.3s ease;
    text-align: center;
}

.btn-primary {
    background-color: var(--accent);
    color: white;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.btn-outline {
    border: 2px solid var(--accent);
    color: var(--accent);
    background: transparent;
}

.btn-outline:hover {
    background-color: var(--accent);
    color: white;
}

.section {
    padding: 80px 0;
    position: relative;
    /* Context for particles */
}

/* Particle Effect Styles */
.particle-bg {
    position: relative;
    overflow: hidden;
    /* Ensure particles don't spill */
}

.particle-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    /* Let clicks pass through */
}

.section>.container {
    position: relative;
    z-index: 2;
    /* Content above particles */
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--contrast);
}

/* Gradient Backgrounds */
.bg-gradient-dark {
    background: linear-gradient(135deg, #000000, var(--primary-hover));
    color: white;
}

.page-header {
    background: linear-gradient(135deg, #000000, var(--primary-hover));
    color: white;
    padding: 60px 0;
    text-align: center;
}

.page-header .section-title {
    color: white;
}

.section-subtitle {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Header & Navigation */
.site-header {
    height: var(--header-height);
    background-color: var(--base-3);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
}

.site-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--contrast);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-menu {
    display: flex;
    gap: 30px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--contrast-2);
    position: relative;
    padding: 5px 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--accent);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

/* Footer */
.site-footer {
    background-color: var(--base-2);
    color: var(--base-3);
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-title {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: var(--primary);
}

.footer-link {
    color: var(--primary);
    margin-bottom: 10px;
    display: block;
}

.footer-link:hover {
    color: var(--primary-hover);
}

.footer-bottom {
    border-top: 1px solid var(--contrast-2);
    padding-top: 20px;
    text-align: center;
    color: var(--primary);
    font-size: 0.9rem;
}

/* Card Grid Styles */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--base-3);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.card img {
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.card:hover img {
    transform: scale(1.05);
}

.card-content {
    padding: 25px;
}

.card-title {
    font-size: 1.25rem;
    margin-bottom: 15px;
    color: var(--contrast);
}

.card-text {
    color: var(--contrast-2);
    margin-bottom: 20px;
}

/* Hero Section */
.hero {
    position: relative;
    /* Removed static background image in favor of video, but keep a fallback color */
    background-color: var(--contrast);
    color: white;
    /* Ensure content is vertically centered */
    display: flex;
    align-items: center;
    min-height: 85vh;
    overflow: hidden;
    padding: 150px 0;
    text-align: center;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 0;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #000000, var(--primary-hover));
    opacity: 0.85;
    /* Adjust transparency as requested ("apenas el video") */
    z-index: 1;
}

.hero-title {
    font-size: 3.5rem;
    margin-bottom: 20px;
    line-height: 1.2;
}

.hero-text {
    font-size: 1.25rem;
    max-width: 700px;
    margin: 0 auto 30px;
    color: var(--base);
}

/* Dropdown Menu */
.nav-item {
    position: relative;
    padding: 15px 0;
    /* Increase touch area/hover safety */
}

.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--base-3);
    min-width: 220px;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s ease;
    z-index: 1100;
}

.nav-item:hover>.dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown .dropdown {
    top: 0;
    left: 100%;
    margin-left: 10px;
    /* Offset for nested */
}

.dropdown-link {
    display: block;
    padding: 10px 20px;
    color: var(--contrast-2);
    font-size: 0.95rem;
    transition: all 0.2s;
}

.dropdown-link:hover {
    background-color: var(--base-2);
    color: var(--accent);
    padding-left: 25px;
}

/* Mobile Nav Toggle */
.menu-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-menu {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--base-3);
        padding: 20px;
        box-shadow: var(--shadow);
    }

    .nav-menu.active {
        display: flex;
    }

    .hero-title {
        font-size: 2.5rem;
    }
}