/* Reset and Base Styles */
* {
    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.6;
    color: #333;
    background-color: #f8f9fa;
}

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

/* Header */
header {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    color: white;
    padding: 60px 0;
    text-align: center;
}

header h1 {
    font-size: 2.5rem;
    margin-bottom: 10px;
    font-weight: 700;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.95;
}

/* Hero Section */
.hero {
    background-color: white;
    padding: 80px 0;
    text-align: center;
}

.hero h2 {
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 20px;
}

.hero p {
    font-size: 1.1rem;
    color: #666;
    max-width: 800px;
    margin: 0 auto;
}

/* Services Section - With Flip Cards */
.services {
    padding: 30px 0 60px 0;
    background-color: #f8f9fa;
	position: relative;
	z-index: 1;
}

.services h2 {
    text-align: center;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

/* Decorative underline for Services heading */
.services h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    border-radius: 2px;
}

/* 5-column grid for service boxes */
.services-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 20px;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 20px;
    perspective: 1000px;
    align-items: start;
}

/* Flip Card Container - optimized for 5 boxes */
.service-card-flip {
    background: transparent;
    min-height: 280px;
    perspective: 1000px;
    cursor: pointer;
    transition: min-height 0.6s ease;
}

/* Make container taller when flipped */
.service-card-flip.flipped {
    min-height: 300px;
}

.service-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 280px;
    text-align: left;
    transition: transform 0.6s, min-height 0.6s ease;
    transform-style: preserve-3d;
}

/* Expand inner container when flipped */
.service-card-flip.flipped .service-card-inner {
    transform: rotateY(180deg);
    min-height: 300px;
}

.service-card-front,
.service-card-back {
    position: absolute;
    width: 100%;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.3s ease;
}

/* Front card - normal height */
.service-card-front {
    z-index: 2;
    transform: rotateY(0deg);
    min-height: 300px;
    height: auto;
}

/* Back card - taller to fit content */
.service-card-back {
    transform: rotateY(180deg);
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    min-height: 300px;
    height: auto;
    padding: 1.1rem;
}

.service-card-front h3,
.service-card-back h3 {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 600;
    flex-shrink: 0;
    line-height: 1.3;
}

.service-card-front p {
    color: #666;
    font-size: 1rem;
    flex-grow: 1;
    line-height: 1.4;
}

/* Back Card Styling - More space for content */
.service-card-back ul {
    list-style: none;
    padding: 0;
    margin: 0.6rem 0 0.8rem 0;
    flex-grow: 1;
}

.service-card-back li {
    color: #555;
    font-size: 0.9rem;
    padding: 0.2rem 0;
    padding-left: 1.3rem;
    position: relative;
    line-height: 1.2;
}

.service-card-back li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #3498db;
    font-weight: 700;
    font-size: 0.85rem;
}

/* Flip Hint */
.flip-hint {
    display: block;
    text-align: center;
    font-size: 0.9rem;
    color: #999;
    margin-top: auto;
    padding-top: 0.6rem;
    font-style: italic;
    flex-shrink: 0;
}

/* Hover Effect for Cards */
.service-card-flip:hover .service-card-front,
.service-card-flip:hover .service-card-back {
    border-color: #3498db;
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.2);
}

.service-card-flip:hover .service-card-front::before {
    transform: scaleX(1);
}


/* HOVER FLIP - Boxes flip on mouse hover */
.service-card-flip:hover .service-card-inner {
    transform: rotateY(180deg);
}

/* Ensure flipped card appears on top of everything */
.service-card-flip:hover {
    z-index: 1000;
    position: relative;
}

.service-card-flip:hover .service-card-front::before {
    transform: scaleX(1);
}
.service-card-front::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.4s ease;
}

/* About Accountant Section */
.about-accountant {
    background-color: white;
    padding: 30px 0;
}

.about-accountant h2 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 30px;
    text-align: center;
}

.about-content {
    max-width: 900px;
    margin: 0 auto;
}

.about-text {
    background: linear-gradient(135deg, rgba(52, 152, 219, 0.05) 0%, rgba(44, 62, 80, 0.05) 100%);
    padding: 40px;
    border-left: 5px solid #3498db;
    border-radius: 8px;
}

.intro-text {
    font-size: 1.15rem;
    color: #2c3e50;
    margin-bottom: 30px;
    font-weight: 500;
}

.experience-section,
.expertise-section {
    margin-bottom: 35px;
}

.about-text h3 {
    font-size: 1.4rem;
    color: #2c3e50;
    margin-bottom: 20px;
    margin-top: 10px;
}

.experience-list,
.expertise-list {
    list-style: none;
    padding-left: 0;
}

.experience-list li,
.expertise-list li {
    padding: 12px 0;
    padding-left: 30px;
    color: #555;
    position: relative;
    font-size: 1rem;
}

.experience-list li:before,
.expertise-list li:before {
    content: "▸";
    color: #3498db;
    position: absolute;
    left: 0;
    font-weight: bold;
}

.closing-text {
    font-size: 1.1rem;
    color: #2c3e50;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #e0e0e0;
}

/* ========== About Benefits Section - HIGHLIGHTED WITH BOXES ========== */
.about {
    background-color: #f8f9fa;
    padding: 30px 0;
    position: relative;
    z-index: 0;
}

.about h2 {
    text-align: center;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 50px;
    position: relative;
    display: inline-block;
    left: 50%;
    transform: translateX(-50%);
}

/* Decorative underline for "Чому обирають нас" heading */
.about h2::after {
    content: '';
    position: absolute;
    bottom: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, #3498db, #2c3e50);
    border-radius: 2px;
}

.benefits {
    list-style: none;
    max-width: 900px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    padding: 0 20px;
}

.benefits li {
    font-size: 1.05rem;
    padding: 25px 20px;
    color: #333;
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    border: 2px solid #e0e0e0;
    border-left: 4px solid #3498db;
    transition: all 0.3s ease;
    position: relative;
}

.benefits li::before {
    content: '✓';
    position: absolute;
    left: 12px;
    top: 12px;
    color: #3498db;
    font-weight: 700;
    font-size: 1.3rem;
}

.benefits li {
    padding-left: 45px;
}

/* Hover effect for benefit boxes */
.benefits li:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.2);
    border-color: #3498db;
    border-left-color: #2c3e50;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
}

/* ========== Contact Section ========== */
.contact {
    padding: 30px 0;
    background-color: white;
}

.contact h2 {
    text-align: center;
    font-size: 2rem;
    color: #2c3e50;
    margin-bottom: 15px;
}

.contact-intro {
    text-align: center;
    color: #666;
    margin-bottom: 50px;
    font-size: 1.1rem;
}

form {
    max-width: 600px;
    margin: 0 auto;
    background: #f8f9fa;
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

label {
    display: block;
    margin-bottom: 8px;
    color: #2c3e50;
    font-weight: 600;
}

input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: #3498db;
}

textarea {
    resize: vertical;
}

.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #3498db 0%, #2c3e50 100%);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.4);
}

.contact-info {
    text-align: center;
    margin-top: 40px;
    font-size: 1.1rem;
}

.contact-info a {
    color: #3498db;
    text-decoration: none;
}

.contact-info a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    background-color: #2c3e50;
    color: white;
    text-align: center;
    padding: 30px 0;
    margin-top: 0;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .benefits {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 2rem;
    }

    .hero h2 {
        font-size: 1.5rem;
    }

    .services h2,
    .about h2,
    .about-accountant h2,
    .contact h2 {
        font-size: 1.7rem;
    }
	
	.services {
        padding: 15px 0 15px 0;
    }

    form {
        padding: 30px 20px;
    }

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

    .about-text {
        padding: 30px 20px;
    }

    .about-text h3 {
        font-size: 1.2rem;
    }

    .experience-list li,
    .expertise-list li {
        font-size: 0.95rem;
    }
	
	.service-card-back ul {
        margin: 0.5rem 0 0.8rem 0;
    }

    .service-card-flip {
        min-height: 280px;
        transition: min-height 0.6s ease;
    }

    .service-card-flip.flipped {
        min-height: 420px;
    }

    .service-card-front {
        min-height: 280px;
        height: auto;
    }

    .service-card-back {
        min-height: 420px;
        height: auto;
    }

    .service-card-inner {
        min-height: 280px;
    }

    .service-card-flip.flipped .service-card-inner {
        min-height: 420px;
    }

    .service-card-back li {
        font-size: 0.85rem;
        padding: 0.35rem 0;
        padding-left: 1.8rem;
        line-height: 1.4;
    }

    .service-card-back li::before {
        font-size: 0.85rem;
        left: 0.2rem;
    }

    .benefits {
        grid-template-columns: 1fr;
    }

    .benefits li {
        font-size: 1rem;
        padding: 20px 20px 20px 45px;
    }
}



/* ========== CONTENT PROTECTION STYLES ========== */

/* Disable text selection */
body {
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

/* Re-enable selection for form inputs */
input,
textarea,
select {
    -webkit-user-select: text !important;
    -moz-user-select: text !important;
    -ms-user-select: text !important;
    user-select: text !important;
}

/* Prevent right-click context menu (CSS approach) */
* {
    -webkit-touch-callout: none;
}

/* Prevent drag and drop */
img {
    -webkit-user-drag: none;
    -moz-user-drag: none;
    -o-user-drag: none;
    user-drag: none;
    pointer-events: none;
}