/*
  Theme: Consultoría - Dark Theme
  Design System: Corporativo con Eco-minimalismo
  Color Scheme: Яркая (Bright)
  Animation Style: Прокрутка-зависимые эффекты (Scroll-dependent effects)
*/

/* CSS Variables */
:root {
    --primary-color: #00A99D; /* Bright Teal - from cookie button example */
    --primary-color-darker: #00877A;
    --accent-color: #FF6B6B;   /* Bright Coral */
    --accent-color-darker: #D9534F;
    --secondary-color: #4ECDC4; /* Lighter Teal */

    --bg-color: #1A1D24; /* Very Dark Blue/Gray */
    --bg-color-variant: #23272F; /* Slightly Lighter Dark for sections */
    --card-bg-color: #2A2E37; /* Card Background */
    --footer-bg-color: #121418; /* Even Darker for Footer */

    --text-color: #E0E0E0;         /* Light Gray for body text */
    --text-color-secondary: #A0A2A8; /* Muted text */
    --heading-color: #FFFFFF;      /* White for headings */
    --text-color-dark: #222222;    /* For light backgrounds (not common in dark theme) */

    --border-color: #3E4450;
    --input-border-color: #4A4F5C;
    --input-bg-color: #23272F;
    --input-focus-border: var(--primary-color);

    --font-family-headings: 'Raleway', sans-serif;
    --font-family-base: 'Open Sans', sans-serif;

    --border-radius: 8px;
    --card-shadow: 0 5px 15px rgba(0, 0, 0, 0.25);
    --header-height: 80px;
    --transition-speed: 0.3s;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family-base);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

main {
    padding-top: var(--header-height); /* Account for fixed header */
}

/* Headings */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-family-headings);
    color: var(--heading-color);
    font-weight: 700;
    margin-bottom: 0.75em;
    line-height: 1.3;
}
h1 { font-size: 2.8em; text-shadow: 1px 1px 3px rgba(0,0,0,0.3); }
h2 { font-size: 2.2em; }
h3 { font-size: 1.6em; }
h4 { font-size: 1.3em; }

p {
    margin-bottom: 1em;
    color: var(--text-color-secondary);
}
p.lead, .section-intro { /* For more prominent paragraphs */
    font-size: 1.15em;
    color: var(--text-color);
    margin-bottom: 1.5em;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed) ease;
}
a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

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

/* Utility Classes */
.container {
    width: 90%;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 15px;
    padding-right: 15px;
}

.section-padding {
    padding-top: 80px;
    padding-bottom: 80px;
}

.bg-variant {
    background-color: var(--bg-color-variant);
}

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

.section-title {
    text-align: center;
    margin-bottom: 1em; /* Default: 0.75em from h2 + this */
    color: var(--heading-color);
    font-weight: 800;
}
.section-title::after { /* Subtle underline */
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 15px auto 0;
    border-radius: 2px;
}

.section-intro {
    text-align: center;
    max-width: 750px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 50px;
    color: var(--text-color);
}

/* Header */
.site-header {
    background-color: var(--bg-color); /* Slightly different from variant for depth */
    padding: 0 20px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 3px 12px rgba(0,0,0,0.35);
    height: var(--header-height);
    display: flex;
    align-items: center;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.logo {
    font-family: var(--font-family-headings);
    font-size: 1.8em;
    font-weight: 800;
    color: var(--primary-color);
    text-decoration: none;
}
.logo:hover {
    color: var(--secondary-color);
    text-decoration: none;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav li {
    margin-left: 30px;
}

.main-nav .nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95em;
    padding: 10px 0;
    position: relative;
}
.main-nav .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed) ease;
}
.main-nav .nav-link:hover,
.main-nav .nav-link.active {
    color: var(--primary-color);
}
.main-nav .nav-link:hover::after,
.main-nav .nav-link.active::after {
    width: 100%;
}

.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 2em;
    cursor: pointer;
    line-height: 1;
}

/* Hero Section */
.hero-section {
    position: relative;
    padding: 120px 0; /* Generous padding */
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--heading-color); /* Base color for text inside if not overridden */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    overflow: hidden; /* For any parallax effects on pseudo-elements */
}
.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.8));
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 850px;
}
.hero-title { /* Styles for H1 specifically in hero */
    color: #FFFFFF !important; /* Explicitly white, overrides general h1 */
    font-size: 3.2em; /* Larger for hero */
    margin-bottom: 0.5em;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.6);
}
.hero-subtitle { /* Styles for P specifically in hero */
    color: #FFFFFF !important; /* Explicitly white */
    font-size: 1.25em;
    margin-bottom: 1.5em;
    opacity: 0.9;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}

/* Global Button Styles */
.cta-button,
.button-secondary,
.button-tertiary,
button, /* Default button styling if not classed */
input[type="submit"],
input[type="button"] {
    display: inline-block;
    font-family: var(--font-family-headings);
    font-weight: 700;
    text-decoration: none;
    border-radius: var(--border-radius);
    padding: 14px 35px; /* Slightly larger padding */
    font-size: 1em;
    border: 2px solid transparent;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease, border-color var(--transition-speed) ease, transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    text-align: center;
    letter-spacing: 0.5px;
}

.cta-button {
    background-color: var(--primary-color);
    color: #FFFFFF;
    border-color: var(--primary-color);
    box-shadow: 0 4px 10px rgba(0, 169, 157, 0.3);
}
.cta-button:hover, .cta-button:focus {
    background-color: var(--primary-color-darker);
    border-color: var(--primary-color-darker);
    color: #FFFFFF;
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(0, 169, 157, 0.4);
    text-decoration: none;
}

.button-secondary {
    background-color: transparent;
    color: var(--accent-color);
    border-color: var(--accent-color);
}
.button-secondary:hover, .button-secondary:focus {
    background-color: var(--accent-color);
    color: #FFFFFF;
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(255, 107, 107, 0.3);
    text-decoration: none;
}

.button-tertiary { /* For 'Read More' links */
    background-color: transparent;
    color: var(--secondary-color);
    border: none;
    padding: 8px 0;
    font-weight: 600;
    position: relative;
    letter-spacing: 0;
}
.button-tertiary::after {
    content: ' →';
    font-family: var(--font-family-base); /* Ensure arrow matches text font */
}
.button-tertiary:hover, .button-tertiary:focus {
    color: var(--primary-color);
    text-decoration: underline;
    background-color: transparent; /* Ensure no bg color on hover for this type */
    box-shadow: none;
    transform: none;
}

/* Card Styles (Generic) */
.card {
    background-color: var(--card-bg-color);
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%; /* Make cards in a grid equal height */
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}
.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}

.card .card-image { /* Container for image */
    width: 100%;
    height: 220px; /* Fixed height as in HTML examples */
    overflow: hidden;
    position: relative; /* For potential overlays on image if needed */
}
.card .card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease-out; /* Smoother zoom */
}
.card:hover .card-image img {
    transform: scale(1.08);
}

.card-content {
    padding: 25px;
    flex-grow: 1; /* Allows content to expand, pushing actions to bottom if any */
    display: flex;
    flex-direction: column;
}
.card-content h3, .card-content h4 {
    color: var(--heading-color);
    margin-bottom: 0.5em;
}
.card-content p {
    color: var(--text-color-secondary);
    font-size: 0.95em;
    flex-grow: 1; /* Pushes actions down if card content varies */
}
.card-content .webinar-meta {
    font-size: 0.85em;
    color: var(--primary-color);
    margin-bottom: 10px;
    font-weight: 600;
}
.card-content .button-secondary, .card-content .button-tertiary {
    margin-top: auto; /* Pushes button to the bottom of card-content */
    align-self: flex-start; /* Aligns button to left if text-align is not center */
}
.card.text-center .card-content .button-secondary,
.card.text-center .card-content .button-tertiary {
    align-self: center;
}


/* Reasons Section */
.reasons-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.reason-card .card-content h3 {
    color: var(--secondary-color); /* Distinct title color for reasons */
}

/* Solutions Section */
.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.solution-item {
    background-color: var(--card-bg-color);
    padding: 35px 30px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    text-align: center;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}
.solution-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.35);
}
.solution-icon {
    font-size: 3.5em;
    color: var(--primary-color);
    margin-bottom: 20px;
    line-height: 1;
}
.solution-title {
    font-family: var(--font-family-headings);
    color: var(--heading-color);
    font-size: 1.5em;
    margin-bottom: 10px;
}
.solution-item p {
    font-size: 0.95em;
    color: var(--text-color-secondary);
}

/* Webinars Section & Case Studies Section (uses .card) */
.webinars-grid, .case-studies-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.case-study-card strong { /* Highlight challenge/solution/result */
    color: var(--text-color);
    font-weight: 600;
}

/* Sustainability Section */
.sustainability-content {
    display: flex;
    align-items: flex-start; /* Align top for potentially different content heights */
    gap: 50px;
    margin-top: 40px;
}
.sustainability-text {
    flex: 1.2; /* Give text slightly more space */
}
.sustainability-visual {
    flex: 0.8;
    text-align: center;
}
.sustainability-visual img {
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    margin-bottom: 25px;
}
.switch-container {
    display: flex;
    align-items: center;
    justify-content: center; /* Center the switch below image */
    margin-top: 15px;
    flex-direction: column;
}
.switch-label {
    margin-bottom: 8px; /* Label above switch */
    color: var(--text-color);
    font-size: 0.95em;
}
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #4A4F5C;
    transition: var(--transition-speed);
}
.slider:before {
    position: absolute;
    content: "";
    height: 20px; width: 20px;
    left: 3px; bottom: 3px;
    background-color: white;
    transition: var(--transition-speed);
}
input:checked + .slider { background-color: var(--primary-color); }
input:focus + .slider { box-shadow: 0 0 1px var(--primary-color); }
input:checked + .slider:before { transform: translateX(24px); }
.slider.round { border-radius: 26px; }
.slider.round:before { border-radius: 50%; }

.switch-description {
    font-size: 0.9em;
    color: var(--text-color-secondary);
    margin-top: 15px;
    max-width: 400px;
    line-height: 1.5;
}

/* Partners Section */
.partners-logo-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 50px; /* Increased gap */
    margin-top: 50px;
}
.partner-logo img {
    max-height: 55px; /* Adjusted size */
    width: auto;
    filter: grayscale(80%) opacity(0.65); /* More subtle effect */
    transition: filter var(--transition-speed) ease, transform var(--transition-speed) ease;
}
.partner-logo img:hover {
    filter: grayscale(0%) opacity(1);
    transform: scale(1.1);
}

/* External Resources Section */
.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-top: 40px;
}
.resource-card .card-content h4 a {
    color: var(--secondary-color);
    font-size: 1.2em;
}
.resource-card .card-content h4 a:hover {
    color: var(--primary-color);
}

/* Contact Section */
.contact-form {
    max-width: 700px;
    margin: 40px auto 0;
    background-color: var(--card-bg-color);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
}
.form-group {
    margin-bottom: 25px;
}
.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 600;
    font-size: 0.95em;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--input-border-color);
    background-color: var(--input-bg-color);
    color: var(--text-color);
    border-radius: var(--border-radius);
    font-family: var(--font-family-base);
    font-size: 1em;
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
}
.form-group input[type="text"]:focus,
.form-group input[type="email"]:focus,
.form-group input[type="tel"]:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--input-focus-border);
    box-shadow: 0 0 0 2px rgba(0, 169, 157, 0.2);
}
.form-group textarea {
    min-height: 120px;
    resize: vertical;
}
.contact-form button[type="submit"] { /* Using .cta-button class in HTML is preferred */
    width: 100%;
    padding: 15px; /* Consistent with other CTA */
}
@media (min-width: 768px) {
    .contact-form button[type="submit"] {
        width: auto;
        min-width: 200px;
    }
}

/* Footer */
.site-footer {
    background-color: var(--footer-bg-color);
    color: var(--text-color-secondary);
    padding: 60px 0 0; /* Padding at top, bottom part has its own */
    font-size: 0.95em;
}
.footer-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding-bottom: 40px;
}
.footer-column h4 {
    color: var(--heading-color);
    font-size: 1.2em;
    margin-bottom: 20px;
    position: relative;
}
.footer-column h4::after { /* Underline for footer titles */
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background-color: var(--primary-color);
    margin-top: 8px;
}
.footer-column ul {
    list-style: none;
}
.footer-column ul li {
    margin-bottom: 10px;
}
.footer-column ul li a {
    color: var(--text-color-secondary);
    transition: color var(--transition-speed) ease, padding-left var(--transition-speed) ease;
}
.footer-column ul li a:hover {
    color: var(--primary-color);
    padding-left: 5px; /* Slight indent on hover */
    text-decoration: none;
}
.social-links { /* Text-based social links */
    list-style: none;
    padding: 0;
    margin-top: 5px; /* Reduced from 10px */
}
.social-links li {
    margin-bottom: 8px;
}
.social-links li a {
    color: var(--text-color-secondary);
    font-weight: 600;
}
.social-links li a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 25px 0;
    text-align: center;
    font-size: 0.9em;
}

/* Special Page Styles */
/* For privacy.html, terms.html - assumes main content is wrapped in a section or div */
.page-specific-content-padding { /* Add this class to the main content section of these pages */
    padding-top: 40px; /* Extra top padding */
    padding-bottom: 60px;
}

/* success.html specific styles */
body.success-page { /* Add class 'success-page' to body of success.html */
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}
.success-page-container {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}
.success-content {
    background-color: var(--card-bg-color);
    padding: 50px;
    border-radius: var(--border-radius);
    box-shadow: var(--card-shadow);
    max-width: 600px;
    width: 90%;
}
.success-content h1 {
    color: var(--primary-color);
    margin-bottom: 25px;
    font-size: 2.5em;
}
.success-content p {
    color: var(--text-color);
    font-size: 1.15em;
    margin-bottom: 35px;
}
.success-content .cta-button {
    min-width: 220px;
}

/* ScrollReveal initial states (can be customized in JS) */
[data-scrollreveal] {
    opacity: 0;
    transition: opacity 0.7s cubic-bezier(0.5, 0, 0, 1), transform 0.7s cubic-bezier(0.5, 0, 0, 1);
}
.section-title[data-scrollreveal], .section-intro[data-scrollreveal] {
    transform: translateY(20px);
}
.card[data-scrollreveal], .solution-item[data-scrollreveal], .partner-logo[data-scrollreveal] {
    transform: translateY(40px) scale(0.95);
}
.sustainability-text[data-scrollreveal] {
    transform: translateX(-40px);
}
.sustainability-visual[data-scrollreveal] {
    transform: translateX(40px);
}
.contact-form[data-scrollreveal] {
    transform: scale(0.9);
}


/* Cookie Popup (Button hover is the main addition here) */
#accept-cookies:hover {
    background-color: var(--primary-color-darker) !important; /* Ensure override if inline styles exist */
}


/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-title { font-size: 2.6em; }
    .hero-subtitle { font-size: 1.15em; }

    .sustainability-content {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    .sustainability-text, .sustainability-visual {
        flex: none; /* Reset flex */
        width: 100%;
        max-width: 550px; /* Limit width when stacked */
    }
    .sustainability-text { order: 2; } /* Optional: image first on mobile */
    .sustainability-visual { order: 1; }
}

@media (max-width: 768px) {
    html { font-size: 15px; }
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.9em; }
    .hero-title { font-size: 2em; }
    .hero-subtitle { font-size: 1em; }

    .site-header { padding: 0 15px; }
    .main-nav ul {
        display: none;
        flex-direction: column;
        position: absolute;
        top: var(--header-height);
        left: 0;
        width: 100%;
        background-color: var(--bg-color); /* Solid background */
        padding: 10px 0;
        box-shadow: 0 8px 15px rgba(0,0,0,0.3);
        border-top: 1px solid var(--border-color);
    }
    .main-nav ul.active { display: flex; }
    .main-nav li {
        margin-left: 0;
        width: 100%;
    }
    .main-nav .nav-link {
        display: block;
        padding: 15px 20px;
        width: 100%;
        text-align: left;
    }
    .main-nav .nav-link::after { display: none; }
    .main-nav .nav-link:hover,
    .main-nav .nav-link.active {
        background-color: var(--primary-color);
        color: #FFFFFF;
    }
    .menu-toggle { display: block; }

    .section-padding { padding-top: 60px; padding-bottom: 60px; }
    .section-intro { margin-bottom: 30px; font-size: 1.05em; }

    .reasons-grid,
    .webinars-grid,
    .case-studies-grid,
    .resources-grid,
    .solutions-grid {
        grid-template-columns: 1fr; /* Stack cards */
        gap: 25px;
    }
    .card .card-image { height: 200px; }


    .footer-container {
        grid-template-columns: 1fr; /* Stack footer columns */
        text-align: center;
    }
    .footer-column h4::after { margin-left: auto; margin-right: auto; }
    .footer-column ul { padding-left: 0; }
    .social-links { justify-content: center; }

    .contact-form { padding: 30px 25px; }
    .form-group input[type="text"],
    .form-group input[type="email"],
    .form-group input[type="tel"],
    .form-group textarea,
    .cta-button, .button-secondary { padding: 12px 25px; }
}

@media (max-width: 480px) {
    html { font-size: 14px; }
    .hero-title { font-size: 1.8em; }
    .hero-subtitle { font-size: 0.95em; }
    .container { width: 95%; }
    .contact-form { padding: 25px 20px; }
    .success-content { padding: 30px 20px; }
    .success-content h1 { font-size: 2em; }
    .success-content p { font-size: 1.05em; }
}