/* ТеплоЭнергоСтрой - Modern Corporate Styles */
:root {
    --primary: #0066cc;
    --primary-dark: #004c99;
    --primary-light: #3399ff;
    --secondary: #2c3e50;
    --accent: #00aaff;
    --success: #28a745;
    --warning: #ffc107;
    --danger: #dc3545;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --white: #ffffff;
    --gradient-primary: linear-gradient(135deg, #0066cc 0%, #00aaff 100%);
    --gradient-dark: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    --shadow-sm: 0 2px 10px rgba(0,0,0,0.08);
    --shadow-md: 0 5px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.16);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.7;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(50px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
header {
    background: var(--white);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 1000;
    backdrop-filter: blur(10px);
    animation: fadeIn 0.5s ease-out;
}

.header-top {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 12px 0;
    font-size: 14px;
}

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

.header-contacts a {
    color: var(--white);
    text-decoration: none;
    margin-left: 20px;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.header-contacts a:hover {
    color: var(--accent);
    transform: translateY(-2px);
}

.header-main {
    padding: 20px 0;
    background: rgba(255, 255, 255, 0.95);
}

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

.logo {
    animation: slideInRight 0.6s ease-out;
}

.logo h1 {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -1px;
}

.logo p {
    color: var(--gray);
    font-size: 13px;
    font-weight: 500;
    margin-top: 2px;
}

nav ul {
    list-style: none;
    display: flex;
    gap: 40px;
}

nav a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    font-size: 15px;
    transition: var(--transition);
    padding: 10px 0;
    position: relative;
}

nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

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

/* Hero Section */
.hero {
    background: var(--gradient-primary);
    color: var(--white);
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg width="100" height="100" xmlns="http://www.w3.org/2000/svg"><defs><pattern id="grid" width="100" height="100" patternUnits="userSpaceOnUse"><path d="M 100 0 L 0 0 0 100" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="1"/></pattern></defs><rect width="100%" height="100%" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero .container {
    position: relative;
    z-index: 1;
    text-align: center;
}

.hero h1 {
    font-size: 56px;
    margin-bottom: 24px;
    font-weight: 800;
    line-height: 1.2;
    animation: fadeInUp 0.8s ease-out;
    text-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.hero p {
    font-size: 22px;
    margin-bottom: 40px;
    opacity: 0.95;
    animation: fadeInUp 1s ease-out;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.btn {
    display: inline-block;
    padding: 16px 40px;
    background: var(--white);
    color: var(--primary);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 700;
    font-size: 16px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    position: relative;
    overflow: hidden;
    animation: fadeInUp 1.2s ease-out;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(0, 102, 204, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.3);
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
}

.btn-secondary {
    background: var(--gradient-dark);
    color: var(--white);
}

.btn-success {
    background: var(--success);
    color: var(--white);
}

/* Services Section */
.services {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--light) 0%, var(--white) 100%);
    position: relative;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
    animation: fadeIn 0.8s ease-out;
}

.section-title h2 {
    font-size: 42px;
    color: var(--secondary);
    margin-bottom: 16px;
    font-weight: 800;
    position: relative;
    display: inline-block;
}

.section-title h2::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--gradient-primary);
    border-radius: 2px;
}

.section-title p {
    color: var(--gray);
    font-size: 18px;
    margin-top: 20px;
}

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

.service-card {
    background: var(--white);
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    text-align: center;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(0, 102, 204, 0.1);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0;
    transition: all 0.5s ease;
    z-index: 0;
}

.service-card:hover::before {
    left: 0;
    opacity: 0.05;
}

.service-card:hover {
    transform: translateY(-15px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.service-card .icon {
    font-size: 60px;
    margin-bottom: 24px;
    display: inline-block;
    animation: float 3s ease-in-out infinite;
    filter: drop-shadow(0 5px 15px rgba(0, 102, 204, 0.3));
}

.service-card h3 {
    font-size: 24px;
    margin-bottom: 16px;
    color: var(--secondary);
    font-weight: 700;
    position: relative;
    z-index: 1;
}

.service-card p {
    color: var(--gray);
    margin-bottom: 24px;
    line-height: 1.7;
    position: relative;
    z-index: 1;
}

.service-card .btn {
    padding: 12px 30px;
    font-size: 14px;
    position: relative;
    z-index: 1;
}

/* Reviews Section */
.reviews {
    padding: 100px 0;
    background: var(--white);
}

.reviews-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 35px;
}

.review-card {
    background: var(--white);
    padding: 35px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    border-left: 5px solid var(--primary);
    transition: var(--transition);
    position: relative;
}

.review-card::before {
    content: '"';
    position: absolute;
    top: 20px;
    right: 30px;
    font-size: 80px;
    color: rgba(0, 102, 204, 0.1);
    font-family: Georgia, serif;
    line-height: 1;
}

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

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 20px;
}

.review-author h4 {
    color: var(--secondary);
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 5px;
}

.review-author p {
    color: var(--gray);
    font-size: 14px;
}

.stars {
    color: #ffc107;
    font-size: 20px;
    display: flex;
    gap: 3px;
}

.review-content {
    color: var(--dark);
    line-height: 1.8;
    font-size: 15px;
}

/* Contact Form */
.contact-section {
    padding: 100px 0;
    background: linear-gradient(180deg, var(--white) 0%, var(--light) 100%);
}

.contact-form {
    background: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--secondary);
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    font-size: 16px;
    transition: var(--transition);
    font-family: inherit;
    background: var(--white);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
    transform: translateY(-2px);
}

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

/* Footer */
footer {
    background: var(--gradient-dark);
    color: var(--white);
    padding: 70px 0 30px;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: var(--gradient-primary);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 50px;
    margin-bottom: 40px;
}

.footer-section h3 {
    margin-bottom: 25px;
    color: var(--accent);
    font-size: 20px;
    font-weight: 700;
}

.footer-section ul {
    list-style: none;
}

.footer-section li {
    margin-bottom: 12px;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-section a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: rgba(255, 255, 255, 0.7);
}

/* Alert Messages */
.alert {
    padding: 18px 24px;
    margin-bottom: 25px;
    border-radius: 12px;
    font-weight: 500;
    animation: fadeIn 0.5s ease-out;
    border-left: 4px solid;
}

.alert-success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border-color: #28a745;
}

.alert-error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border-color: #dc3545;
}

.alert-info {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border-color: #17a2b8;
}

/* Stats/Features Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    margin: 50px 0;
}

.stat-card {
    background: var(--white);
    padding: 35px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
}

.stat-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.stat-card h3 {
    font-size: 48px;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
    font-weight: 800;
}

.stat-card p {
    color: var(--gray);
    font-size: 16px;
    font-weight: 600;
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 992px) {
    .hero h1 { font-size: 42px; }
    .section-title h2 { font-size: 36px; }
}

@media (max-width: 768px) {
    .header-top .container {
        flex-direction: column;
        gap: 10px;
    }

    .header-contacts a {
        margin: 0 10px;
    }

    .header-main .container {
        flex-direction: column;
        gap: 20px;
    }

    nav ul {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }

    .hero {
        padding: 80px 0;
    }

    .hero h1 {
        font-size: 36px;
    }

    .hero p {
        font-size: 18px;
    }

    .services-grid,
    .reviews-grid {
        grid-template-columns: 1fr;
    }

    .section-title h2 {
        font-size: 32px;
    }
}

/* Admin Styles */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
}

.admin-sidebar {
    width: 280px;
    background: var(--gradient-dark);
    color: var(--white);
    padding: 30px 20px;
    box-shadow: var(--shadow-lg);
}

.admin-sidebar h2 {
    color: var(--accent);
    margin-bottom: 40px;
    font-size: 22px;
}

.admin-sidebar ul {
    list-style: none;
}

.admin-sidebar li {
    margin-bottom: 8px;
}

.admin-sidebar a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 12px 16px;
    display: block;
    border-radius: 10px;
    transition: var(--transition);
    font-weight: 500;
}

.admin-sidebar a:hover,
.admin-sidebar a.active {
    background: rgba(0, 170, 255, 0.2);
    color: var(--white);
    transform: translateX(5px);
}

.admin-content {
    flex: 1;
    padding: 40px;
}

.admin-header {
    background: var(--white);
    padding: 30px;
    margin-bottom: 40px;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
}

.admin-header h1 {
    color: var(--secondary);
    font-size: 32px;
}

table {
    width: 100%;
    background: var(--white);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

table thead {
    background: var(--gradient-primary);
    color: var(--white);
}

table th,
table td {
    padding: 18px 20px;
    text-align: left;
}

table tbody tr {
    border-bottom: 1px solid #f0f0f0;
    transition: var(--transition);
}

table tbody tr:hover {
    background: var(--light);
    transform: scale(1.01);
}

.badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: var(--white);
}

.badge-warning {
    background: linear-gradient(135deg, #ffc107 0%, #ff9800 100%);
    color: var(--dark);
}

.badge-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: var(--white);
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }

/* Scroll to top button */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    z-index: 999;
}

.scroll-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 50px rgba(0, 102, 204, 0.4);
}

.scroll-to-top.visible {
    display: flex;
    animation: fadeIn 0.3s ease-out;
}
