/*
Theme Name: VMKMet 2025
Theme URI: https://vmkmet.ru
Author: mrZ
Author URI: mailto:mrZ@mrZLab630.pw
Description: Custom WordPress theme for PFK "Volzhskaya Mednaya Kompaniya" (Volga Copper Company) corporate website. Modern, responsive design with focus on performance and usability.
Version: 2.5.2
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: vmkmet2025
Tags: corporate, business, responsive, custom-theme
*/

/**
 *
 * by mrZ
 * Email: mrZ@mrZLab630.pw
 * Date: 2025-10-15
 * Time: 16:30
 * About: Main stylesheet for VMKMet 2025 WordPress theme with project colors
 *
 */

/* ==========================================================================
   CSS Variables - Project Colors & Fonts
   ========================================================================== */

:root {
    /* Colors */
    --color-heading: #444444;
    --color-text: #444444;
    --color-background: #ffffff;
    --color-accent: #d58400;
    --color-footer-bg: #444444;
    --color-footer-text: #ffffff;
    --color-section-alt: #eae9ea;
    --color-border: #e0e0e0;

    /* Typography */
    --font-heading: 'Cormac Black', Arial, sans-serif;
    --font-subheading: 'Alethia-regular', Arial, sans-serif;
    --font-body: 'Tahoma', Arial, sans-serif;

    /* Spacing */
    --container-max-width: 1200px;
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 3rem;
    --spacing-xl: 4rem;

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */

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

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

/* ==========================================================================
   Typography
   ========================================================================== */

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

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.75rem;
}

h4 {
    font-size: 1.5rem;
}

h5 {
    font-size: 1.25rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: var(--spacing-sm);
    line-height: 1.8;
}

a {
    color: var(--color-accent);
    text-decoration: none;
    transition: all var(--transition-normal);
}

a:hover {
    color: var(--color-heading);
    text-decoration: underline;
}

a:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

.subheading,
.accent-text {
    font-family: var(--font-subheading);
}

/* ==========================================================================
   Layout
   ========================================================================== */

.container {
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-sm);
    width: 100%;
}

.site-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.site-content {
    flex: 1;
}

/* Section Backgrounds */
.section-alt {
    background-color: var(--color-section-alt);
}

/* ==========================================================================
   Header - Sticky Navigation
   ========================================================================== */

.site-header {
    background-color: var(--color-background);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all var(--transition-normal);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    width: 100%;
}

.site-header.scrolled {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) 0;
}

.site-branding {
    flex-shrink: 0;
}

.site-title {
    font-size: 1.5rem;
    margin: 0;
    font-family: var(--font-heading);
}

.site-title a {
    color: var(--color-heading);
}

.site-title a:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.site-description {
    display: none;
}

/* Custom Logo Support */
.custom-logo-link {
    display: inline-block;
}

.custom-logo {
    max-height: 60px;
    width: auto;
    display: block;
}

/* ==========================================================================
   Navigation
   ========================================================================== */

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    flex-direction: column;
    justify-content: space-around;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1001;
    position: relative;
}

.hamburger-line {
    width: 100%;
    height: 3px;
    background-color: var(--color-heading);
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger to X animation */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
}

.main-navigation {
    flex-grow: 1;
    display: flex;
    justify-content: center;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-md);
    margin: 0;
    padding: 0;
}

.main-navigation li {
    margin: 0;
}

.main-navigation a {
    color: var(--color-heading);
    font-size: 1rem;
    font-weight: 500;
    padding: var(--spacing-xs) var(--spacing-sm);
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.main-navigation a:hover,
.main-navigation a:focus,
.main-navigation .current_page_item > a,
.main-navigation .current-menu-item > a {
    color: var(--color-accent);
    /* background-color: rgba(213, 132, 0, 0.1); */
    text-decoration: none;
}

/* Header Contact (Phone) */
.header-contact {
    flex-shrink: 0;
}

.header-phone {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-heading);
    font-weight: 600;
    font-size: 1.1rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all var(--transition-fast);
}

.header-phone:hover {
    color: var(--color-accent);
    text-decoration: none;
    transform: translateY(-1px);
}

.header-phone .phone-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.header-phone .phone-number {
    white-space: nowrap;
}

/* ==========================================================================
   Content Area
   ========================================================================== */

.content-area {
    padding: var(--spacing-lg) 0;
}

article {
    margin-bottom: var(--spacing-lg);
}

.entry-header {
    margin-bottom: var(--spacing-md);
}

.entry-title {
    margin-bottom: var(--spacing-xs);
}

.entry-meta {
    color: #666;
    font-size: 0.875rem;
    margin-bottom: var(--spacing-sm);
}

.entry-meta span {
    margin-right: var(--spacing-sm);
}

.entry-content {
    line-height: 1.8;
}

.entry-content h2,
.entry-content h3,
.entry-content h4 {
    margin-top: var(--spacing-md);
}

.entry-content ul,
.entry-content ol {
    margin-left: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.entry-content li {
    margin-bottom: var(--spacing-xs);
}

.entry-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: var(--spacing-md) 0;
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.button,
.btn,
.wp-block-button__link,
input[type="submit"],
button[type="submit"] {
    display: inline-block;
    padding: 0.75rem 2rem;
    background-color: var(--color-accent);
    color: var(--color-background);
    font-family: var(--font-body);
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all var(--transition-normal);
}

.button:hover,
.btn:hover,
.wp-block-button__link:hover,
input[type="submit"]:hover,
button[type="submit"]:hover {
    background-color: var(--color-heading);
    color: var(--color-background);
    text-decoration: none;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(213, 132, 0, 0.3);
}

.button:active,
.btn:active,
.wp-block-button__link:active,
input[type="submit"]:active,
button[type="submit"]:active {
    transform: translateY(0);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: var(--color-footer-bg);
    color: var(--color-footer-text);
    padding: var(--spacing-lg) 0;
    margin-top: var(--spacing-xl);
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--spacing-md);
}

.footer-logo {
    flex-shrink: 0;
}

.footer-logo img {
    max-height: 40px;
    width: auto;
}

.site-info {
    color: var(--color-footer-text);
    font-size: 0.875rem;
}

.site-info a {
    color: var(--color-footer-text);
}

.site-info a:hover {
    color: var(--color-accent);
}

.footer-navigation ul {
    list-style: none;
    display: flex;
    gap: var(--spacing-md);
    margin: 0;
    padding: 0;
}

.footer-navigation a {
    color: var(--color-footer-text);
    font-size: 0.875rem;
}

.footer-navigation a:hover {
    color: var(--color-accent);
    text-decoration: none;
}

.footer-legal {
    font-size: 0.75rem;
}

.footer-legal a {
    color: var(--color-footer-text);
    text-decoration: underline;
}

/* ==========================================================================
   Pagination
   ========================================================================== */

.pagination,
.nav-links {
    display: flex;
    justify-content: center;
    gap: var(--spacing-xs);
    margin-top: var(--spacing-md);
}

.page-numbers,
.nav-links a {
    display: inline-block;
    padding: var(--spacing-xs) var(--spacing-sm);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    color: var(--color-heading);
    transition: all var(--transition-fast);
}

.page-numbers:hover,
.page-numbers.current,
.nav-links a:hover {
    color: var(--color-background);
    border-color: var(--color-accent);
    text-decoration: none;
}

/* ==========================================================================
   Responsive Design
   ========================================================================== */

@media screen and (max-width: 900px) {
    /* Show mobile menu toggle button */
    .mobile-menu-toggle {
        display: flex;
        order: 2;
    }

    /* Hide navigation by default on mobile */
    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 100%;
        height: 100vh;
        background-color: var(--color-background);
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding-top: 80px;
    }

    /* Show navigation when menu is open */
    .main-navigation.menu-open {
        left: 0;
    }

    /* Mobile menu overlay */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 999;
    }

    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }

    /* Mobile navigation styles */
    .main-navigation ul {
         width: 100%;
        flex-direction: column;
        gap: 0;
        padding: 1rem;
        margin: 0;
    }

    .main-navigation li {
        border-bottom: 1px solid var(--color-border);
    }

    .main-navigation a {
        display: block;
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 1rem;
        border-radius: 0;
    }

    .main-navigation a:hover,
    .main-navigation a:focus,
    .main-navigation .current_page_item > a,
    .main-navigation .current-menu-item > a {
        background-color: rgba(213, 132, 0, 0.1);
    }

    /* Header layout adjustments */
    .header-inner {
        display: grid;
        grid-template-columns: 1fr auto auto;
        gap: var(--spacing-sm);
        align-items: center;
    }

    .site-branding {
        order: 1;
    }

    .header-contact {
        order: 3;
    }
}

@media screen and (max-width: 768px) {
    html {
        font-size: 14px;
    }

    :root {
        --spacing-md: 1.5rem;
        --spacing-lg: 2rem;
        --spacing-xl: 2.5rem;
    }

    .site-header {
        padding: var(--spacing-xs) 0;
    }

    .header-inner {
        padding: var(--spacing-xs) 0;
    }

    .custom-logo {
        max-height: 50px;
    }

    .site-title {
        font-size: 1.2rem;
    }

    .header-phone {
        font-size: 0.9rem;
        padding: 0.4rem 0.8rem;
    }

    .header-phone .phone-icon {
        font-size: 1rem;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-navigation ul {
        flex-direction: column;
        gap: var(--spacing-sm);
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    h3 {
        font-size: 1.5rem;
    }
}

@media screen and (max-width: 480px) {
    .custom-logo {
        max-height: 40px;
    }

    .site-title {
        font-size: 1rem;
    }

    .header-phone .phone-number {
        display: none;
    }

    .header-phone .phone-icon {
        font-size: 1.5rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.5rem;
    }
}

/* ==========================================================================
   Utility Classes
   ========================================================================== */

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

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

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

.no-margin {
    margin: 0;
}

.no-padding {
    padding: 0;
}

/* Clearfix */
.clearfix::after {
    content: "";
    display: table;
    clear: both;
}
