/* Reset and Base Styles */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Performance optimizations */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Improve font loading performance */
@font-display: swap;

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Source Sans Pro', sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    font-weight: 300;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Cookie Banner */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #1a1a1a;
    color: white;
    padding: 20px;
    z-index: 1000;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.cookie-banner.show {
    transform: translateY(0);
}

.cookie-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    gap: 20px;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
}

.btn-accept, .btn-decline {
    padding: 10px 20px;
    border: 2px solid white;
    background: transparent;
    color: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.btn-accept:hover {
    background: white;
    color: #1a1a1a;
}

.btn-decline:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e5e5e5;
    z-index: 999;
    transition: all 0.3s ease;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
}

.logo-img {
    width: 40px;
    height: 40px;
}

.nav {
    display: flex;
    gap: 30px;
}

.nav-link {
    font-weight: 400;
    position: relative;
    padding: 5px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: #1a1a1a;
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

.nav-link.active {
    font-weight: 600;
}

.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.mobile-menu-toggle span {
    width: 25px;
    height: 3px;
    background: #1a1a1a;
    transition: all 0.3s ease;
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-image {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.hero-bg {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%) contrast(1.2);
}

.hero-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    color: white;
    max-width: 600px;
}

.hero-title {
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

.hero-subtitle {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    font-weight: 300;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
}

.cta-button {
    display: inline-block;
    padding: 15px 30px;
    background: white;
    color: #1a1a1a;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s ease;
    border: 2px solid white;
}

.cta-button:hover {
    background: transparent;
    color: white;
}

/* Section Styles */
section {
    padding: 80px 0;
}

.section-header {
    text-align: center;
    margin-bottom: 60px;
}

.section-title {
    margin-bottom: 20px;
}

.section-line {
    width: 60px;
    height: 3px;
    background: #1a1a1a;
    margin: 0 auto;
}

/* About Section */
.about {
    background: #f8f8f8;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.features-list {
    list-style: none;
    margin-top: 30px;
}

.features-list li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.features-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    font-weight: bold;
}

.about-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    filter: grayscale(100%);
    transition: filter 0.3s ease;
}

.about-img:hover {
    filter: grayscale(0%);
}

/* Services Section */
.services {
    padding: 80px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    align-items: start;
}

.service-card {
    background: white;
    border: 1px solid #e5e5e5;
    transition: all 0.3s ease;
    overflow: hidden;
    border-radius: 8px;
    height: auto;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-image {
    height: 250px;
    overflow: hidden;
}

.service-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: all 0.3s ease;
    background: #f0f0f0;
}

.service-image img[alt="Henkilöverotus"]::before {
    content: "📊";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 3rem;
    color: #ccc;
}

/* Fallback styling for broken images */
.service-image img.service-fallback {
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.service-card:hover .service-image img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.service-card h3 {
    padding: 30px 30px 15px;
    margin: 0;
    flex-shrink: 0;
}

.service-card p {
    padding: 0 30px 30px;
    font-size: 1rem;
    margin: 0;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

/* FAQ Section */
.faq {
    background: #f8f8f8;
}

.faq-content {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: white;
    margin-bottom: 20px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px 30px;
    cursor: pointer;
    background: white;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #f8f8f8;
}

.faq-question h3 {
    margin: 0;
    font-size: 1.2rem;
    color: #1a1a1a;
}

.faq-toggle {
    font-size: 1.5rem;
    font-weight: bold;
    color: #666;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 30px;
    max-height: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 200px;
    padding: 0 30px 25px;
}

.faq-answer p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

/* Tax Calendar Section */
.tax-calendar {
    background: white;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.calendar-quarter {
    background: #f8f8f8;
    padding: 30px;
    border-left: 4px solid #1a1a1a;
}

.calendar-quarter h3 {
    color: #1a1a1a;
    margin-bottom: 25px;
    font-size: 1.3rem;
}

.calendar-events {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.calendar-event {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.calendar-event:hover {
    transform: translateX(5px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.event-date {
    font-weight: bold;
    color: #1a1a1a;
    font-size: 1.1rem;
    min-width: 50px;
}

.event-title {
    color: #666;
    font-size: 0.95rem;
}

.calendar-note {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 20px;
    text-align: center;
}

.calendar-note p {
    margin: 0;
    color: #856404;
}

/* Resources Section */
.resources {
    background: #f8f8f8;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.resource-category h3 {
    color: #1a1a1a;
    margin-bottom: 25px;
    font-size: 1.4rem;
}

.resource-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.resource-link {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

.resource-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-color: #1a1a1a;
}

.resource-icon {
    font-size: 2rem;
    min-width: 50px;
    text-align: center;
}

.resource-info h4 {
    margin: 0 0 5px 0;
    color: #1a1a1a;
    font-size: 1.1rem;
}

.resource-info p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* Team Section */
.team {
    background: white;
}

.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
}

.team-member {
    background: #f8f8f8;
    border-radius: 10px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.team-member:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.member-photo {
    height: 250px;
    overflow: hidden;
}

.member-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: grayscale(100%);
    transition: all 0.3s ease;
}

.team-member:hover .member-photo img {
    filter: grayscale(0%);
    transform: scale(1.05);
}

.member-info {
    padding: 30px;
}

.member-info h3 {
    color: #1a1a1a;
    margin-bottom: 5px;
}

.member-title {
    color: #666;
    font-weight: 600;
    margin-bottom: 15px;
    font-size: 1rem;
}

.member-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 20px;
    font-size: 0.95rem;
}

.member-credentials {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.member-credentials span {
    background: #1a1a1a;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* Testimonials Section */
.testimonials {
    background: #1a1a1a;
    color: white;
}

.testimonials .section-title {
    color: white;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 30px;
    transition: all 0.3s ease;
}

.testimonial-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.quote-mark {
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1;
    margin-bottom: 15px;
    font-family: 'Playfair Display', serif;
}

.testimonial-content p {
    color: #ccc;
    line-height: 1.6;
    margin-bottom: 25px;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.author-info h4 {
    color: white;
    margin: 0 0 5px 0;
    font-size: 1.1rem;
}

.author-info p {
    color: #888;
    margin: 0;
    font-size: 0.9rem;
}

.rating {
    font-size: 1.2rem;
}

/* Contact Section */
.contact {
    background: #1a1a1a;
    color: white;
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.contact h2 {
    color: white;
    margin-bottom: 40px;
}

.contact-details {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.contact-item h4 {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600;
    margin-bottom: 10px;
    color: #ccc;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.contact-item p {
    font-size: 1.1rem;
}

/* Contact Form */
.contact-form {
    background: rgba(255, 255, 255, 0.05);
    padding: 40px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.contact-form h3 {
    margin-bottom: 30px;
    color: white;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #ccc;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: white;
    background: rgba(255, 255, 255, 0.15);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-top: 3px;
}

.checkbox-group label {
    margin-bottom: 0;
    font-size: 0.95rem;
}

.checkbox-group a {
    color: white;
    text-decoration: underline;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: white;
    color: #1a1a1a;
    border: none;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: #f0f0f0;
}

/* Footer */
.footer {
    background: #0f0f0f;
    color: white;
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 20px;
}

.footer-logo {
    width: 40px;
    height: 40px;
    filter: brightness(0) invert(1);
}

.footer-description {
    color: #ccc;
    line-height: 1.6;
}

.footer-links h4,
.footer-legal h4 {
    font-family: 'Source Sans Pro', sans-serif;
    font-weight: 600;
    margin-bottom: 20px;
    color: white;
}

.footer-links ul,
.footer-legal ul {
    list-style: none;
}

.footer-links li,
.footer-legal li {
    margin-bottom: 10px;
}

.footer-links a,
.footer-legal a {
    color: #ccc;
    transition: color 0.3s ease;
}

.footer-links a:hover,
.footer-legal a:hover {
    color: white;
}

.footer-bottom {
    border-top: 1px solid #333;
    padding-top: 30px;
    text-align: center;
    color: #888;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }
    
    .nav {
        display: none;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .hero-content {
        text-align: center;
        padding: 0 20px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .service-card h3 {
        padding: 20px 20px 10px;
        font-size: 1.3rem;
    }
    
    .service-card p {
        padding: 0 20px 20px;
        font-size: 0.95rem;
    }
    
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
    }
    
    section {
        padding: 60px 0;
    }
    
    .calendar-grid {
        grid-template-columns: 1fr;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .team-grid {
        grid-template-columns: 1fr;
    }
    
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .contact-form {
        padding: 30px 20px;
    }
    
    .hero {
        height: 80vh;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .service-card h3 {
        padding: 20px 20px 10px;
    }
    
    .service-card p {
        padding: 0 20px 20px;
    }
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-0 {
    margin-bottom: 0;
}

.mt-0 {
    margin-top: 0;
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* Print Styles */
@media print {
    .header,
    .cookie-banner {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero {
        height: auto;
        padding: 40px 0;
    }
    
    .hero-bg {
        display: none;
    }
    
    .hero-content {
        color: #1a1a1a;
    }
}
