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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

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

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    margin-bottom: 1rem;
}

h1 {
    font-size: clamp(2rem, 5vw, 3.5rem);
}

h2 {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
}

h3 {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
}

p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
    }
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    line-height: 1;
}

.btn-primary {
    background: linear-gradient(135deg, #2563eb 0%, #3b82f6 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: transparent;
    color: #2563eb;
    border: 2px solid #2563eb;
}

.btn-secondary:hover {
    background: #2563eb;
    color: white;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: #374151;
    border: 2px solid #d1d5db;
}

.btn-outline:hover {
    background: #374151;
    color: white;
    border-color: #374151;
}

.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.nav-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2563eb;
    text-decoration: none;
}

.nav-menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    margin-left: 2rem;
}

.nav-link {
    color: #374151;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    color: #2563eb;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background: #2563eb;
    transition: width 0.3s ease;
}

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

/* Mobile Menu */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.bar {
    width: 25px;
    height: 3px;
    background: #374151;
    margin: 3px 0;
    transition: 0.3s;
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }

    .nav-menu.active {
        left: 0;
    }

    .nav-item {
        margin: 1rem 0;
    }

    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }

    .hamburger.active .bar:nth-child(1) {
        transform: translateY(9px) rotate(45deg);
    }

    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-9px) rotate(-45deg);
    }
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    padding: 8rem 1rem 6rem;
    overflow: hidden;
    position: relative;
}

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

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    text-align: center;
}

.hero-title {
    color: #1e293b;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

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

.hero-img {
    width: 100%;
    max-width: 800px;
    height: auto;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(37, 99, 235, 0.3);
    transition: transform 0.3s ease;
}

.hero-img:hover {
    transform: translateY(-5px);
}

@media (min-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr 1fr;
        text-align: left;
    }

    .hero-content {
        text-align: left;
    }

    .hero-subtitle {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-buttons {
        justify-content: flex-start;
    }
}

/* Section Styles */
section {
    padding: 5rem 0;
}

.section-title {
    text-align: center;
    color: #1e293b;
    margin-bottom: 1rem;
}

.section-subtitle {
    text-align: center;
    color: #64748b;
    font-size: 1.125rem;
    margin-bottom: 3rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* Services Section */
.services {
    background: #f8fafc;
}

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

.service-card {
    background: white;
    padding: 2.5rem 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    transition: all 0.3s ease;
    text-align: center;
    position: relative;
    border: 1px solid #e2e8f0;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.service-card.featured {
    border: 2px solid #3b82f6;
    transform: scale(1.05);
}

.service-card.featured:hover {
    transform: scale(1.05) translateY(-8px);
}

.service-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.service-card h3 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.service-card p {
    color: #64748b;
    margin-bottom: 1.5rem;
}

.service-price {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2563eb;
}

/* Maintenance Services List */
.maintenance-services-btn {
    margin-top: 1rem;
    width: 100%;
}

.maintenance-services-list {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out, padding 0.3s ease-out;
    margin-top: 0;
    background: #f8fafc;
    border-radius: 8px;
    text-align: left;
}

.maintenance-services-list.expanded {
    max-height: 800px;
    padding: 1.5rem;
    margin-top: 1rem;
    border: 1px solid #e2e8f0;
}

.services-category {
    margin-bottom: 1.5rem;
}

.services-category:last-of-type {
    margin-bottom: 1rem;
}

.services-category h4 {
    color: #1e293b;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

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

.services-category li {
    padding: 0.25rem 0;
    color: #64748b;
    font-size: 0.9rem;
    position: relative;
    padding-left: 1rem;
}

.services-category li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

.services-note {
    background: #e0f2fe;
    padding: 1rem;
    border-radius: 6px;
    border-left: 3px solid #0284c7;
}

.services-note p {
    margin: 0;
    font-size: 0.875rem;
    color: #0f172a;
}

.services-note p:first-child {
    margin-bottom: 0.5rem;
}

.services-note strong {
    color: #0284c7;
}

/* Projects Section */
.featured-projects {
    background: white;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.project-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid #e2e8f0;
}

.project-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.project-image {
    position: relative;
    overflow: hidden;
    height: 240px;
}

.project-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.project-card:hover .project-image img {
    transform: scale(1.1);
}

.project-content {
    padding: 1.5rem;
}

.project-content h3 {
    color: #1e293b;
    margin-bottom: 0.75rem;
}

.project-content p {
    color: #64748b;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.projects-cta {
    text-align: center;
}

/* Contact Section */
.contact {
    background: #f8fafc;
}

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

.contact-info h3 {
    color: #1e293b;
    margin-bottom: 2rem;
}

.contact-item {
    display: flex;
    align-items: flex-start;
    margin-bottom: 1.5rem;
}

.contact-icon {
    font-size: 1.5rem;
    margin-right: 1rem;
    margin-top: 0.25rem;
}

.contact-item strong {
    display: block;
    color: #1e293b;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.contact-item p {
    color: #64748b;
    margin: 0;
}

.social-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.social-link {
    display: flex;
    align-items: center;
    color: #64748b;
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.social-link:hover {
    color: #2563eb;
}

.social-icon {
    margin-right: 0.5rem;
    font-size: 1rem;
}

@media (min-width: 480px) {
    .social-links {
        flex-direction: row;
        gap: 1rem;
    }
}

.contact-form {
    background: white;
    padding: 2.5rem;
    border-radius: 16px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.error-message {
    color: #dc2626;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.form-group.error input,
.form-group.error select,
.form-group.error textarea {
    border-color: #dc2626;
}

.form-group.error .error-message {
    display: block;
}

@media (min-width: 768px) {
    .contact-content {
        grid-template-columns: 1fr 1fr;
    }
}

/* Footer */
.footer {
    background: #1e293b;
    color: #cbd5e1;
    padding: 3rem 0 1rem;
}

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

.footer-section h3,
.footer-section h4 {
    color: white;
    margin-bottom: 1rem;
}

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

.footer-section ul li {
    margin-bottom: 0.5rem;
}

.footer-section a {
    color: #cbd5e1;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-section a:hover {
    color: #3b82f6;
}

.footer-bottom {
    border-top: 1px solid #374151;
    padding-top: 1rem;
    text-align: center;
}

/* Portfolio Page Styles */
.portfolio-hero {
    background: linear-gradient(135deg, #1e293b 0%, #374151 100%);
    color: white;
    padding: 8rem 1rem 4rem;
    text-align: center;
}

.portfolio-hero h1 {
    margin-bottom: 1rem;
}

.portfolio-hero p {
    font-size: 1.125rem;
    opacity: 0.9;
}

.portfolio-filters {
    background: white;
    padding: 2rem 0;
    border-bottom: 1px solid #e2e8f0;
}

.filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.filter-btn {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: 2px solid #e2e8f0;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
    color: #64748b;
}

.filter-btn:hover,
.filter-btn.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

.portfolio {
    padding: 4rem 0;
    background: #f8fafc;
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 2rem;
}

.portfolio-item {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    opacity: 1;
    transform: scale(1);
}

.portfolio-item.hidden {
    opacity: 0;
    transform: scale(0.8);
    pointer-events: none;
}

.portfolio-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.portfolio-image {
    position: relative;
    height: 250px;
    overflow: hidden;
}

.portfolio-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.9), rgba(59, 130, 246, 0.9));
    color: white;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-item:hover .portfolio-image img {
    transform: scale(1.1);
}

.portfolio-overlay h3 {
    margin-bottom: 1rem;
}

.portfolio-overlay p {
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

.portfolio-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.portfolio-info {
    padding: 1.5rem;
}

.portfolio-info h3 {
    color: #1e293b;
    margin-bottom: 1rem;
}

.portfolio-info p {
    color: #64748b;
    margin-bottom: 1rem;
}

.portfolio-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tag {
    background: #e2e8f0;
    color: #64748b;
    padding: 0.25rem 0.75rem;
    border-radius: 15px;
    font-size: 0.875rem;
    font-weight: 500;
}

.portfolio-cta {
    background: #1e293b;
    color: white;
    text-align: center;
    padding: 4rem 0;
}

.portfolio-cta h2 {
    margin-bottom: 1rem;
}

.portfolio-cta p {
    font-size: 1.125rem;
    opacity: 0.9;
    margin-bottom: 2rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 16px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.close {
    position: absolute;
    right: 1rem;
    top: 1rem;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    color: #64748b;
    transition: color 0.3s ease;
}

.close:hover {
    color: #1e293b;
}

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

.animate-in {
    animation: fadeIn 0.6s ease-out;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid #e2e8f0;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 480px) {
    .hero {
        padding: 6rem 1rem 4rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .projects-grid,
    .portfolio-grid {
        grid-template-columns: 1fr;
    }
    
    .portfolio-buttons {
        flex-direction: column;
    }
    
    .filters {
        flex-direction: column;
        align-items: center;
    }
}

/* Print Styles */
@media print {
    .header,
    .hamburger,
    .modal,
    .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .hero,
    .services,
    .contact,
    .footer {
        background: white !important;
        color: black !important;
    }
}