/* Custom CSS for ПрАТ "Енерго" Corporate Website */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

/* Color Variables */
:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --success-color: #27ae60;
    --info-color: #17a2b8;
    --warning-color: #f39c12;
    --danger-color: #e74c3c;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --shadow-light: 0 2px 4px rgba(0,0,0,0.1);
    --shadow-medium: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-strong: 0 8px 25px rgba(0,0,0,0.15);
}

/* Header Styles */
.header-section {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2980b9 100%);
    color: white;
    box-shadow: var(--shadow-medium);
}

.company-name {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: white;
}

.company-full-name {
    font-size: 1.1rem;
    opacity: 0.9;
    margin-bottom: 0.25rem;
}

.company-code {
    font-size: 0.95rem;
    opacity: 0.8;
    margin-bottom: 0;
}

.contact-quick p {
    color: white;
    opacity: 0.9;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 2rem 0;
}

/* Tabs Styles */
.tabs-wrapper {
    margin-bottom: 2rem;
}

.custom-tabs {
    border: none;
    background: white;
    border-radius: 12px;
    box-shadow: var(--shadow-light);
    padding: 0.5rem;
    overflow-x: auto;
    white-space: nowrap;
}

.custom-tabs .nav-item {
    margin-bottom: 0;
}

.custom-tabs .nav-link {
    border: none;
    border-radius: 8px;
    padding: 1rem 1.5rem;
    color: var(--secondary-color);
    font-weight: 500;
    transition: all 0.3s ease;
    margin: 0 0.25rem;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.custom-tabs .nav-link:hover {
    background-color: #e3f2fd;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.custom-tabs .nav-link.active {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2980b9 100%);
    color: white;
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
}

.custom-tabs .nav-link i {
    font-size: 1.1rem;
}

/* Content Cards */
.content-card {
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
}

.section-title {
    font-size: 1.75rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border-color);
    display: flex;
    align-items: center;
}

.section-subtitle {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

/* Company Details Table */
.info-table-wrapper {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-light);
}

.company-details-table {
    margin-bottom: 0;
    background: white;
}

.company-details-table th,
.company-details-table td {
    padding: 1rem;
    border: none;
    border-bottom: 1px solid var(--border-color);
}

.detail-label {
    background-color: #f8f9fa;
    font-weight: 600;
    color: var(--secondary-color);
    width: 35%;
    border-right: 1px solid var(--border-color);
}

.detail-value {
    color: var(--dark-color);
}

.highlight-code {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2980b9 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-weight: 600;
}

/* Contact Links */
.phone-link,
.email-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}

.phone-link:hover,
.email-link:hover {
    color: #2980b9;
    text-decoration: underline;
}

/* Address Card */
.address-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    height: fit-content;
}

.address-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

.address-details p {
    margin-bottom: 0.5rem;
    color: var(--dark-color);
}

/* Business Info Card */
.business-info-card {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}

.activity-grid {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.activity-item {
    display: flex;
    align-items: center;
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    min-width: 200px;
    flex: 1;
}

.activity-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-right: 0.75rem;
}

.activity-item span {
    font-weight: 500;
    color: var(--secondary-color);
}

/* Shareholders Quick Access */
.shareholders-quick-access .alert {
    border: none;
    border-radius: 8px;
    box-shadow: var(--shadow-light);
}

/* Sidebar Info */
.sidebar-info .info-card {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.25rem;
    border: 1px solid var(--border-color);
}

.info-card-title {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
}

.legal-list {
    list-style: none;
    padding: 0;
}

.legal-list li {
    padding: 0.25rem 0;
    color: var(--dark-color);
    border-bottom: 1px solid #e9ecef;
}

.legal-list li:last-child {
    border-bottom: none;
}

.legal-list li::before {
    content: "•";
    color: var(--primary-color);
    margin-right: 0.5rem;
}

/* Empty State */
.document-placeholder {
    text-align: center;
    padding: 3rem 1rem;
}

.empty-state {
    color: #6c757d;
}

.empty-icon {
    font-size: 3rem;
    opacity: 0.5;
    margin-bottom: 1rem;
}

.empty-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.empty-description {
    font-size: 0.95rem;
    opacity: 0.8;
}

/* Documents List Styles */
.documents-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.document-item {
    display: flex;
    align-items: center;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow-light);
    transition: all 0.3s ease;
}

.document-item:hover {
    box-shadow: var(--shadow-medium);
    transform: translateY(-2px);
    border-color: var(--primary-color);
}

.document-icon {
    margin-right: 1.5rem;
    flex-shrink: 0;
}

.document-icon i {
    font-size: 2.5rem;
}

.document-details {
    flex-grow: 1;
    margin-right: 1rem;
}

.document-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--secondary-color);
    margin-bottom: 0.5rem;
}

.document-description {
    color: #6c757d;
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.document-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.document-actions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .document-actions {
        flex-direction: row;
    }
}

/* Information Categories Styles */
.info-category-card {
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-light);
    border: 1px solid var(--border-color);
    overflow: hidden;
    transition: all 0.4s ease;
    height: 100%;
    position: relative;
}

.info-category-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 35px rgba(0,0,0,0.15);
    border-color: transparent;
}

.info-category-card:hover .category-header {
    transform: scale(1.02);
}

.category-header {
    padding: 1.5rem 1.25rem;
    border-radius: 16px 16px 0 0;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 100px;
}

.category-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.6s ease;
}

.info-category-card:hover .category-header::before {
    left: 100%;
}

.category-header.bg-primary {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 50%, #1f638a 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.category-header.bg-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 50%, #d35400 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.category-header.bg-secondary {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 50%, #34495e 100%);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.2);
}

.category-header h5 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
    line-height: 1.3;
}

.category-header i {
    font-size: 1.3rem;
    margin-right: 0.75rem;
    opacity: 0.9;
}

.category-body {
    padding: 1.5rem 1.25rem;
    background: #fdfdfd;
}

.category-body ul {
    margin: 0;
    list-style: none;
}

.category-body li {
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f3f4;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.category-body li:last-child {
    border-bottom: none;
}

.category-body li:hover {
    background: #f8f9fb;
    padding-left: 0.5rem;
    border-radius: 6px;
}

.category-body li a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    width: 100%;
    font-weight: 500;
    transition: all 0.3s ease;
}

.category-body li a:hover {
    color: var(--primary-color);
}

.category-body li i {
    font-size: 0.9rem;
    width: 20px;
    opacity: 0.7;
    transition: all 0.3s ease;
}

.category-body li:hover i {
    opacity: 1;
    transform: scale(1.1);
}

/* Responsive improvements for categories */
@media (max-width: 768px) {
    .info-category-card {
        margin-bottom: 1.5rem;
    }
    
    .category-header {
        min-height: 80px;
        padding: 1.25rem 1rem;
    }
    
    .category-header h5 {
        font-size: 1rem;
    }
    
    .category-body {
        padding: 1.25rem 1rem;
    }
}

/* Animation for category cards on load */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.info-category-card {
    animation: slideInUp 0.6s ease forwards;
}

.regulatory-info .row .col-md-4:nth-child(1) .info-category-card { animation-delay: 0.1s; }
.regulatory-info .row .col-md-4:nth-child(2) .info-category-card { animation-delay: 0.2s; }
.regulatory-info .row .col-md-4:nth-child(3) .info-category-card { animation-delay: 0.3s; }

/* Better spacing for regulatory info section */
.regulatory-info {
    margin-bottom: 2.5rem;
}

.regulatory-info .row {
    margin: 0 -0.75rem;
}

.regulatory-info .col-md-4 {
    padding: 0 0.75rem;
    margin-bottom: 1.5rem;
}

/* Footer Styles */
.footer-section {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #1a252f 50%, #0f1419 100%);
    color: #ecf0f1;
    margin-top: auto;
    padding: 3rem 0 1.5rem;
    position: relative;
    overflow: hidden;
}

.footer-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--warning-color), var(--primary-color));
}

.footer-section::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(52, 152, 219, 0.03) 0%, transparent 70%);
    pointer-events: none;
}

.footer-info {
    position: relative;
    z-index: 2;
}

.footer-info h6 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
}

.footer-info h6::before {
    content: '';
    width: 4px;
    height: 25px;
    background: linear-gradient(135deg, var(--primary-color), var(--warning-color));
    border-radius: 2px;
    margin-right: 0.75rem;
}

.footer-info p {
    margin-bottom: 0.75rem;
    opacity: 0.9;
    font-size: 0.95rem;
    line-height: 1.6;
    display: flex;
    align-items: flex-start;
    transition: all 0.3s ease;
}

.footer-info p:hover {
    opacity: 1;
    transform: translateX(5px);
}

.footer-info p i {
    margin-right: 0.75rem;
    color: var(--primary-color);
    font-size: 1rem;
    width: 18px;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.footer-info a {
    color: #ecf0f1;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

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

.footer-links {
    position: relative;
    z-index: 2;
}

.footer-links h6 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    color: white;
    display: flex;
    align-items: center;
}

.footer-links h6::before {
    content: '';
    width: 4px;
    height: 25px;
    background: linear-gradient(135deg, var(--warning-color), var(--danger-color));
    border-radius: 2px;
    margin-right: 0.75rem;
}

.footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
    transform: translateX(0);
    transition: all 0.3s ease;
}

.footer-links li:hover {
    transform: translateX(8px);
}

.footer-links a {
    color: #bdc3c7;
    text-decoration: none;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
    position: relative;
    padding: 0.5rem 0;
}

.footer-links a::before {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--warning-color));
    transition: width 0.3s ease;
}

.footer-links a:hover::before {
    width: 100%;
}

.footer-links a:hover {
    color: white;
    text-decoration: none;
}

.footer-links a i {
    margin-right: 0.75rem;
    color: var(--primary-color);
    font-size: 1rem;
    width: 18px;
    transition: all 0.3s ease;
}

.footer-links a:hover i {
    color: var(--warning-color);
    transform: scale(1.1);
}

/* Footer bottom section */
.footer-section hr {
    border: none;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    margin: 2rem 0 1.5rem;
}

.footer-section .row:last-child {
    position: relative;
    z-index: 2;
}

.footer-section .row:last-child p,
.footer-section .row:last-child small {
    opacity: 0.7;
    font-size: 0.9rem;
    transition: opacity 0.3s ease;
}

.footer-section .row:last-child:hover p,
.footer-section .row:last-child:hover small {
    opacity: 0.9;
}

/* Responsive footer improvements */
@media (max-width: 768px) {
    .footer-section {
        padding: 2rem 0 1rem;
        text-align: center;
    }
    
    .footer-info,
    .footer-links {
        margin-bottom: 2rem;
    }
    
    .footer-info h6,
    .footer-links h6 {
        justify-content: center;
    }
    
    .footer-info p,
    .footer-links a {
        justify-content: center;
    }
    
    .footer-links li:hover,
    .footer-info p:hover {
        transform: none;
    }
}

/* Add subtle animation */
@keyframes footerGlow {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 0.6; }
}

.footer-section::after {
    animation: footerGlow 4s ease-in-out infinite;
}

.footer-info .company-legal {
    font-weight: 600;
}

.footer-address {
    opacity: 0.8;
    font-size: 0.95rem;
}

.footer-contact-link {
    color: #ecf0f1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-contact-link:hover {
    color: var(--primary-color);
}

.footer-divider {
    border-color: #495057;
    opacity: 0.3;
}

.copyright {
    opacity: 0.7;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 991.98px) {
    .company-name {
        font-size: 2rem;
    }
    
    .custom-tabs {
        overflow-x: auto;
    }
    
    .custom-tabs .nav-link {
        font-size: 0.9rem;
        padding: 0.75rem 1rem;
    }
    
    .activity-grid {
        flex-direction: column;
    }
    
    .activity-item {
        min-width: auto;
    }
}

@media (max-width: 767.98px) {
    .company-name {
        font-size: 1.75rem;
    }
    
    .company-full-name {
        font-size: 1rem;
    }
    
    .content-card {
        padding: 1.5rem;
    }
    
    .section-title {
        font-size: 1.5rem;
        flex-direction: column;
        align-items: flex-start;
    }
    
    .section-title i {
        margin-bottom: 0.5rem;
    }
    
    .document-item {
        flex-direction: column;
        align-items: flex-start;
        text-align: center;
    }
    
    .document-icon {
        margin-right: 0;
        margin-bottom: 1rem;
        align-self: center;
    }
    
    .document-details {
        margin-right: 0;
        margin-bottom: 1rem;
    }
    
    .document-actions {
        align-self: stretch;
    }
    
    .footer-section .row > div {
        text-align: center !important;
        margin-bottom: 1rem;
    }
}

@media (max-width: 575.98px) {
    .custom-tabs .nav-link {
        font-size: 0.8rem;
        padding: 0.5rem 0.75rem;
    }
    
    .detail-label {
        width: 100%;
        border-right: none;
        border-bottom: none;
    }
    
    .company-details-table {
        font-size: 0.9rem;
    }
    
    .address-card,
    .business-info-card {
        margin-top: 1rem;
    }
}

/* Print Styles */
@media print {
    .custom-tabs,
    .footer-section {
        display: none;
    }
    
    .content-card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
    
    .main-content {
        padding: 0;
    }
    
    .tab-content .tab-pane {
        display: block !important;
        opacity: 1 !important;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus Styles */
.nav-link:focus,
.btn:focus,
a:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #0056b3;
        --secondary-color: #000;
        --border-color: #333;
    }
}
