/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-red: #C81924;
    --secondary-red: #EF233C;
    --dark-navy: #141414;
    --darker-navy: #000000;
    --light-gray: #F9FAFB;
    --medium-gray: #5F6368;
    --white: #FFFFFF;
    --black: #000000;
    --red-gradient: linear-gradient(135deg, #A9111B 0%, #EF233C 100%);
    --dark-gradient: linear-gradient(135deg, #000000 0%, #1A1A1A 100%);
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark-navy);
    background-color: var(--white);
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

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

/* Header Styles */
.header {
    background: var(--white);
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-width: 0;
    flex: 1 1 auto;
}

.logo-image {
    height: 96px;
    max-width: 190px;
    width: auto;
    object-fit: contain;
    flex-shrink: 0;
}

.logo-text {
    min-width: 0;
}

.logo-text span {
    font-size: 1.05rem;
    color: var(--medium-gray);
    font-weight: 500;
    white-space: nowrap;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--dark-navy);
    font-weight: 500;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    position: relative;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--primary-red);
}

.header-contact {
    display: flex;
    align-items: center;
}

.contact-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--light-gray);
    border-radius: 8px;
}

.contact-info i {
    color: var(--primary-red);
    font-size: 1.2rem;
}

.contact-label {
    display: block;
    font-size: 0.8rem;
    color: var(--medium-gray);
}

.contact-number {
    display: block;
    font-weight: 600;
    color: var(--dark-navy);
}

.mobile-menu-toggle {
    display: none;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid var(--dark-navy);
    border-radius: 12px;
    background: var(--white);
    cursor: pointer;
    position: relative;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin-left: auto;
    z-index: 1100;
    color: var(--dark-navy);
    font-size: 28px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
}

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

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    /* External image URL removed for security - download image locally and update path */
    /* background: url('hero-background.jpg') no-repeat center center; */
    background: var(--dark-gradient);
    background-size: cover;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.92) 0%, rgba(20, 20, 20, 0.96) 100%);
}

.hero-content {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.hero-subtitle {
    color: var(--secondary-red);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title .hero-company {
    display: block;
    margin: 0.2em 0 0.25em;
}

.hero-title .highlight {
    color: var(--secondary-red);
    font-size: 0.56em;
    line-height: 1.25;
    display: block;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: rgba(255, 255, 255, 0.9);
}

.btn-primary {
    background: var(--red-gradient);
    color: var(--white);
    border: none;
    padding: 1rem 2rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 1px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #B91C1C 0%, #DC2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(220, 38, 38, 0.3);
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: center;
}

.electrician-image {
    width: min(440px, 100%);
    height: 520px;
    object-fit: cover;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(220, 38, 38, 0.3);
    border: 3px solid var(--secondary-red);
}

/* Store Section */
.store {
    background: var(--white);
    padding: 6rem 0;
}

.store-content {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 4rem;
    align-items: start;
    margin-top: 2rem;
}

.store-info h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-navy);
    margin-bottom: 1rem;
}

.store-info p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--medium-gray);
    margin-bottom: 2rem;
}

.store-features {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: var(--light-gray);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.feature-item:hover {
    background: var(--primary-red);
    color: var(--white);
    transform: translateY(-2px);
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--primary-red);
    transition: color 0.3s ease;
}

.feature-item:hover i {
    color: var(--white);
}

.feature-item span {
    font-weight: 500;
}

.store-hours {
    background: var(--light-gray);
    padding: 2rem;
    border-radius: 8px;
    height: fit-content;
    border-top: 4px solid var(--primary-red);
}

.store-hours h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--dark-navy);
    margin-bottom: 1.5rem;
}

.hours-list {
    margin-bottom: 2rem;
}

.hours-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.hours-item:last-child {
    border-bottom: none;
}

.hours-item span:first-child {
    font-weight: 500;
    color: var(--dark-navy);
}

.hours-item span:last-child {
    font-weight: 600;
    color: var(--primary-red);
}

.store-contact p {
    margin-bottom: 0.5rem;
    color: var(--medium-gray);
}

.store-contact strong {
    color: var(--dark-navy);
}

/* History Section */
.history {
    background: var(--light-gray);
    padding: 6rem 0;
}

.history-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.history-text .section-header {
    text-align: left;
    margin-bottom: 2rem;
}

.history-text .section-subtitle {
    color: var(--primary-red);
}

.history-text .section-title {
    color: var(--dark-navy);
    font-size: 2.5rem;
}

.history-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--medium-gray);
    margin-bottom: 1.5rem;
}

.history-stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.25rem;
}

/* Services Section */
.services {
    background: var(--darker-navy);
    color: var(--white);
    padding: 6rem 0;
    position: relative;
    overflow: hidden;
}

.services-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(200, 25, 36, 0.95), rgba(0, 0, 0, 0.2)), url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1000 1000"><polygon fill="%23FFFFFF" fill-opacity="0.08" points="0,0 1000,200 1000,0"/></svg>') no-repeat;
    background-size: cover;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
    position: relative;
    z-index: 2;
}

.section-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
    position: relative;
    z-index: 2;
}

.service-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.service-card:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-5px);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.service-card p {
    line-height: 1.6;
    opacity: 0.9;
}

.stat-item {
    text-align: center;
    padding: 1.5rem;
    background: var(--light-gray);
    border-radius: 8px;
    border-left: 4px solid var(--primary-red);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-red);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--medium-gray);
    font-weight: 500;
}

/* Contact Section */
.contact {
    background: var(--light-gray);
    padding: 6rem 0;
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}

.contact .contact-info {
    display: block;
    padding: 0;
    background: transparent;
    border-radius: 0;
    min-width: 0;
}

.contact-info h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--dark-navy);
    margin-bottom: 2rem;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    min-width: 0;
}

.contact-item div {
    min-width: 0;
}

.contact-item i {
    width: 40px;
    height: 40px;
    background: var(--primary-red);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-item strong {
    color: var(--dark-navy);
    display: block;
    margin-bottom: 0.2rem;
}

.contact-item p {
    color: var(--medium-gray);
    overflow-wrap: anywhere;
}

.contact-form {
    background: var(--white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    min-width: 0;
}

.contact-form h3 {
    font-size: 1.8rem;
    font-weight: 600;
    color: var(--dark-navy);
    margin-bottom: 1.5rem;
    overflow-wrap: anywhere;
}

.form-intro {
    color: var(--medium-gray);
    margin: -0.75rem 0 1.5rem;
}

.contact-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #E9ECEF;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: border-color 0.3s ease;
    margin-bottom: 1rem;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--primary-red);
}

/* Footer */
.footer {
    background: var(--darker-navy);
    color: var(--white);
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    margin-bottom: 2rem;
    min-width: 0;
}

.footer-logo .logo-text h3 {
    color: var(--white);
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

.footer-logo .logo-text span {
    color: rgba(255, 255, 255, 0.7);
}

.footer-main-logo {
    width: 280px;
    max-width: 100%;
    height: auto;
    background: var(--white);
    padding: 8px 12px;
    border-radius: 4px;
}

.footer-membership {
    margin-top: 1.5rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.elektria-logo {
    width: 280px;
    max-width: 100%;
    height: auto;
    background: var(--white);
    padding: 8px 10px;
    border-radius: 4px;
}

.footer-membership p {
    color: rgba(255, 255, 255, 0.82);
    font-weight: 500;
}

.footer-membership-harvia p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.5;
}

.footer-membership-strongest {
    margin-top: 1rem;
}

.suomen-vahvimmat-logo {
    width: 360px;
    max-width: 100%;
    height: auto;
    display: block;
}

.footer-links {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    min-width: 0;
}

.footer-section {
    min-width: 0;
}

.footer-section h4 {
    color: var(--secondary-red);
    font-size: 1.1rem;
    margin-bottom: 1rem;
}

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

.footer-section li {
    margin-bottom: 0.5rem;
    color: rgba(255, 255, 255, 0.8);
    overflow-wrap: anywhere;
}

.footer-section-contact li {
    overflow-wrap: normal;
    word-break: normal;
    white-space: nowrap;
}

.footer-section a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: var(--secondary-red);
}

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

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }

    .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    
    .store-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .history-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-links {
        grid-template-columns: 1fr;
    }

    .footer-section:first-child {
        display: none;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .header-content {
        position: relative;
        gap: 10px;
        justify-content: space-between;
        padding-right: 64px;
        overflow: visible;
    }

    .logo {
        flex: 0 1 auto;
    }

    .logo-text {
        display: none;
    }
    
    .nav {
        display: none;
    }
    
    .header-contact {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
        visibility: visible;
        opacity: 1;
        position: fixed;
        top: 12px;
        right: 12px;
        left: auto;
        transform: none;
        margin: 0;
        width: 48px;
        height: 48px;
        border: 2px solid var(--primary-red);
        color: var(--primary-red);
        background: var(--white);
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
        z-index: 20001 !important;
    }
    
    .hero {
        padding: 120px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .electrician-image {
        width: 100%;
        max-width: 360px;
        height: 420px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .store-features {
        grid-template-columns: 1fr;
    }
    
    .history-stats {
        grid-template-columns: 1fr;
    }
    
    .contact-form .form-row {
        grid-template-columns: 1fr;
    }
    
    .stat-item {
        padding: 1rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .electrician-image {
        height: 340px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
}

@media (max-width: 540px) {
    .header-content {
        position: relative;
        gap: 8px;
    }

    .logo {
        max-width: calc(100% - 64px);
    }

    .logo-image {
        height: 64px;
        max-width: 130px;
    }

    .footer-main-logo {
        width: 260px;
        max-width: 100%;
        height: auto;
    }

    .elektria-logo {
        width: 260px;
    }

    .footer-membership-strongest .suomen-vahvimmat-logo {
        width: 300px;
    }

    .footer-membership {
        align-items: flex-start;
        flex-direction: column;
    }

    .mobile-menu-toggle {
        right: 12px;
        left: auto;
        width: 44px;
        height: 44px;
        font-size: 26px;
    }

    .footer-section-contact li {
        white-space: normal;
    }
}
