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

/* Safari specific fixes */
*::-webkit-scrollbar {
    width: 8px;
}

*::-webkit-scrollbar-track {
    background: var(--light-background);
}

*::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

/* Fix for Safari input appearance */
input, textarea, select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

:root {
    --primary-color: #4169E1;
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --warning-color: #ffc107;
    --background-color: #ffffff;
    --text-color: #333333;
    --light-background: #f8f9fa;
    --border-color: #dee2e6;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
    --green-gradient: linear-gradient(135deg, #28a745, #20c997);
}

/* Dark theme variables */
@media (prefers-color-scheme: dark) {
    :root {
        --primary-color: #5A7FFF;
        --secondary-color: #8e9aaf;
        --success-color: #32cd32;
        --warning-color: #ffd700;
        --background-color: #000000;
        --text-color: #e0e0e0;
        --light-background: #1e1e1e;
        --border-color: #333333;
        --shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        --transition: all 0.3s ease;
        --green-gradient: linear-gradient(135deg, #32cd32, #20c997);
    }
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--background-color);
    transition: var(--transition);
}

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

/* Header and Navigation */
.header {
    background: var(--background-color);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    transition: all 0.3s ease;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 2px 30px rgba(0, 0, 0, 0.02);
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.1rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.05rem 2rem;
}

.nav-brand {
    display: flex;
    align-items: center;
}

.nav-brand a {
    text-decoration: none;
    color: inherit;
    display: flex;
    align-items: center;
    gap: 20px;
}

.nav-brand h1 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin: 0;
}

.logo {
    height: 50px;
    width: auto;
    max-width: 250px;
    object-fit: contain;
    transition: var(--transition);
}

/* Logo pentru tema deschisa (default) */
.logo.light-theme {
    content: url('../poze/acasa nou/YCE fundal alb.jpg');
}

/* Logo pentru tema intunecata */
@media (prefers-color-scheme: dark) {
    .logo.light-theme {
        content: url('../poze/acasa nou/YCE fundal negru.jpeg');
    }
}

.scrolled .logo {
    height: 35px;
}

.logo:hover {
    transform: scale(1.05);
}

.company-name {
    color: var(--primary-color);
    font-weight: bold;
    font-size: 1.6rem;
    letter-spacing: 1px;
    transition: var(--transition);
}

.scrolled .company-name {
    font-size: 1.4rem;
}

/* Header Animation Effects */
.logo.animate {
    animation: logoFloat 2s ease-in-out;
}

.company-name.animate .letter {
    display: inline-block;
    animation: letterDance 0.6s ease-in-out;
}

.company-name .letter {
    display: inline-block;
    transition: transform 0.3s ease;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-8px) rotate(-2deg);
    }
    50% {
        transform: translateY(-12px) rotate(2deg);
    }
    75% {
        transform: translateY(-6px) rotate(-1deg);
    }
}

@keyframes letterDance {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-10px) scale(1.1);
    }
    50% {
        transform: translateY(-15px) scale(1.2);
    }
    75% {
        transform: translateY(-8px) scale(1.05);
    }
}

/* Header Animation Effects */
.logo.animate {
    animation: logoFloat 2s ease-in-out;
}

.company-name.animate .letter {
    display: inline-block;
    animation: letterDance 0.6s ease-in-out;
}

.company-name .letter {
    display: inline-block;
    transition: transform 0.3s ease;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-8px) rotate(-2deg);
    }
    50% {
        transform: translateY(-12px) rotate(2deg);
    }
    75% {
        transform: translateY(-6px) rotate(-1deg);
    }
}

@keyframes letterDance {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    25% {
        transform: translateY(-10px) scale(1.1);
    }
    50% {
        transform: translateY(-15px) scale(1.2);
    }
    75% {
        transform: translateY(-8px) scale(1.05);
    }
}

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

.nav-menu li {
    position: relative;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
    padding: 0.4rem 0.8rem;
    border-radius: 5px;
    font-size: 0.9rem;
}

.nav-menu a:hover,
.nav-menu a.active {
    color: var(--primary-color);
    background: rgba(65, 105, 225, 0.1);
}

/* Dropdown Styles */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--background-color) !important;
    border-radius: 8px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border-color);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
    padding: 0.5rem 0;
    margin: 0;
    min-width: 160px;
    z-index: 1001;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-menu li {
    padding: 0;
}

.dropdown-menu a {
    display: block;
    padding: 0.75rem 1.5rem;
    color: var(--text-color);
    font-weight: 400;
    border-radius: 0;
    transition: all 0.2s ease;
    background: transparent;
}

.dropdown-menu a:hover,
.dropdown-menu a.active {
    background: var(--light-background);
    color: var(--primary-color);
}

.social-icons {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.social-icons a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    text-decoration: none;
    font-size: 1rem;
    transition: var(--transition);
}

.social-icons a:hover {
    transform: translateY(-2px) scale(1.05);
}

.social-icon {
    width: 25px;
    height: 25px;
    object-fit: contain;
    transition: var(--transition);
}

.social-icons a:hover .social-icon {
    transform: scale(1.1);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
    width: 30px;
    height: 25px;
    justify-content: space-between;
}

.nav-toggle span {
    width: 100%;
    height: 3px;
    background: var(--text-color);
    transition: all 0.3s ease;
}

/* Hero Sections */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    min-height: 35vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 0 60px;
    position: relative;
}

.page-hero {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    padding: 60px 0 15px;
    text-align: center;
    min-height: 18vh;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
}

/* Ensure home page hero has exact same dimensions */
#home.hero,
#home .hero {
    min-height: 35vh;
    padding: 100px 0 60px;
}

.green-hero {
    background: var(--green-gradient);
}

.hero-content h1,
.page-hero h1 {
    font-size: 2.3rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
    line-height: 1.1;
}

/* Smaller text for other pages */
.page-hero h1 {
    font-size: 2rem;
    margin-bottom: 0.6rem;
}

/* Specific styling for home page hero to accommodate longer text */
#home .hero-content h1 {
    font-size: 2.3rem;
    line-height: 1.1;
}

.hero-content p,
.page-hero p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Smaller paragraph for other pages */
.page-hero p {
    font-size: 1rem;
    margin-bottom: 0.8rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

/* Sections */
section {
    padding: 80px 0;
}

.intro {
    background: var(--light-background);
}

.intro h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.intro-content {
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.intro-content > p {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
}

.intro-text {
    font-size: 1.2rem;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

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

.feature {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
}

.feature h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

/* Services */
.services-detailed {
    padding: 80px 0;
    background: var(--light-background);
}

.services-detailed h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

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

.service-card {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
    border: 1px solid #333;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
    border-color: #007bff;
}

.service-card.featured::before {
    content: 'POPULAR';
    position: absolute;
    top: 15px;
    left: 50%;
    transform: translateX(-50%);
    background: #007bff;
    color: white;
    padding: 8px 20px;
    font-size: 0.75rem;
    font-weight: bold;
    border-radius: 20px;
    letter-spacing: 1px;
    z-index: 2;
}

.service-icon {
    font-size: 3rem;
    margin: 2rem 0 1rem 0;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.service-icon span {
    display: inline-block;
    transition: transform 0.3s ease;
}

.service-card:hover .service-icon span {
    transform: scale(1.1);
}

/* Specific icon colors */
.service-card:nth-child(1) .service-icon {
    filter: hue-rotate(30deg) brightness(1.2) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.service-card:nth-child(2) .service-icon {
    filter: hue-rotate(60deg) brightness(1.3) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.service-card:nth-child(3) .service-icon {
    filter: hue-rotate(120deg) saturate(2) brightness(1.3) contrast(1.2) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.service-card h3 {
    color: #007bff;
    margin-bottom: 1rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.service-card p {
    color: #e0e0e0;
    margin-bottom: 1.5rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.service-features {
    list-style: none;
    text-align: left;
    margin: 1.5rem 0;
    padding: 0;
}

.service-features li {
    color: #b0b0b0;
    padding: 0.5rem 0;
    border-bottom: 1px solid #333;
    position: relative;
    padding-left: 0;
    font-size: 0.9rem;
}

.service-features li:last-child {
    border-bottom: none;
}

.service-card .btn {
    background: #007bff;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    text-decoration: none;
    display: inline-block;
    margin-top: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid #007bff;
}

.service-card .btn:hover {
    background: transparent;
    color: #007bff;
    transform: translateY(-2px);
}



.service-features {
    list-style: none;
    text-align: left;
    margin: 1rem 0;
}

.service-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.service-features li:last-child {
    border-bottom: none;
}

/* Why Choose Us Section */
.why-choose-us {
    padding: 80px 0;
    background: var(--light-background);
}

.why-choose-us h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.why-choose-us .benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.why-choose-us .benefit {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.why-choose-us .benefit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.why-choose-us .benefit:hover::before {
    left: 100%;
}

.why-choose-us .benefit:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.why-choose-us .benefit h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.why-choose-us .benefit p {
    color: var(--text-color);
    line-height: 1.6;
}

/* Portfolio */
.portfolio-filter {
    background: var(--background-color);
    padding: 2rem 0;
}

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

.filter-btn {
    background: var(--primary-color) !important;
    color: white !important;
    border: 2px solid var(--primary-color) !important;
    padding: 10px 20px;
    border-radius: 25px;
    cursor: pointer;
    transition: var(--transition);
}

.filter-btn.active,
.filter-btn:hover {
    background: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
    opacity: 0.9;
}

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

.portfolio-item {
    background: var(--background-color);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
}

.portfolio-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.1), transparent);
    transition: left 0.5s ease;
    z-index: 1;
}

.portfolio-item:hover::before {
    left: 100%;
}

.portfolio-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.portfolio-placeholder {
    height: 200px;
    background: var(--light-background);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.portfolio-placeholder p {
    font-size: 1rem;
    margin-top: 1rem;
    color: var(--secondary-color);
}

.portfolio-content {
    padding: 1.5rem;
}

.portfolio-content h3 {
    color: var(--text-color);
    margin-bottom: 0.5rem;
}

.portfolio-details {
    display: flex;
    justify-content: space-between;
    margin-top: 1rem;
    font-size: 0.9rem;
}

.portfolio-category {
    background: var(--primary-color);
    color: white;
    padding: 3px 10px;
    border-radius: 15px;
}

.portfolio-year {
    color: var(--secondary-color);
}

/* Stats */
.portfolio-stats {
    background: var(--light-background);
    text-align: center;
}

.portfolio-stats h2 {
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

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

.stat-item {
    padding: 2rem;
}

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

.stat-label {
    font-size: 1.1rem;
    color: var(--secondary-color);
}

/* Contact */
.contact-main {
    padding: 80px 0;
}

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

.contact-info-section h2 {
    margin-bottom: 2rem;
    color: var(--text-color);
}

.contact-methods {
    margin-bottom: 3rem;
}

.contact-method {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--light-background);
    border-radius: 10px;
}

.contact-icon {
    font-size: 2rem;
    min-width: 3rem;
}

.contact-details h3 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.contact-details a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
}

.contact-details a:hover {
    color: var(--primary-color);
}

.emergency-contact {
    background: #fff3cd;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid var(--warning-color);
}

.emergency-contact h3 {
    color: var(--warning-color);
    margin-bottom: 1rem;
}

/* Forms */
.contact-form-section h2 {
    margin-bottom: 2rem;
    color: var(--text-color);
}

.contact-form.enhanced {
    background: var(--background-color);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

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

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--text-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

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

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin: 0;
}

.contact-guarantee {
    margin-top: 2rem;
    padding: 1.5rem;
    background: var(--light-background);
    border-radius: 10px;
}

.contact-guarantee ul {
    list-style: none;
    margin-top: 1rem;
}

.contact-guarantee li {
    padding: 0.25rem 0;
}

/* Green Energy Specific */
.green-benefits {
    background: var(--light-background);
}

.green-benefits h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

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

.benefit-card {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
}

.benefit-card:hover {
    transform: translateY(-3px);
}

.benefit-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.benefit-card h3 {
    color: var(--success-color);
    margin-bottom: 1rem;
}

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

.solution-card {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: var(--shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.solution-card:hover {
    transform: translateY(-5px);
}

.solution-header {
    background: var(--success-color);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.solution-price {
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 0.5rem;
}

.solution-content {
    padding: 2rem;
    flex-grow: 1;
}

.solution-features {
    list-style: none;
    margin: 1.5rem 0;
}

.solution-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
}

.solution-features li:last-child {
    border-bottom: none;
}

/* Calculator */
.energy-calculator {
    background: var(--light-background);
}

.energy-calculator h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

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

.calculator-form {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
}

.calculator-results {
    background: var(--success-color);
    color: white;
    padding: 2rem;
    border-radius: 10px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.result-item:last-of-type {
    border-bottom: none;
}

.result-value {
    font-weight: bold;
}

/* Process Steps */
.green-process h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

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

.process-step {
    text-align: center;
    padding: 2rem;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.process-step h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
}

/* Map */
.location-map {
    background: var(--light-background);
}

.location-map h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.map-placeholder {
    background: white;
    padding: 3rem;
    border-radius: 10px;
    box-shadow: var(--shadow);
    text-align: center;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

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

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.btn-back-home {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 10px 20px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.btn-back-home:hover {
    background: white;
    color: var(--text-color);
    transform: translateY(-2px);
}

/* Main sections on homepage */
.main-sections {
    background: var(--background-color);
    padding: 100px 0;
}

.main-sections h2 {
    text-align: center;
    font-size: 3rem;
    margin-bottom: 1rem;
    color: var(--text-color);
}

.sections-intro {
    text-align: center;
    font-size: 1.2rem;
    color: var(--secondary-color);
    margin-bottom: 4rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.sections-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr 1fr !important;
    gap: 2rem;
    margin-top: 3rem;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    justify-items: center;
    align-items: start;
}

.section-card {
    background: var(--background-color);
    padding: 2.5rem 2rem;
    border-radius: 15px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    width: 100%;
    max-width: 350px;
    box-shadow: var(--shadow);
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.section-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 123, 255, 0.1), transparent);
    transition: left 0.5s ease;
}

.section-card:hover::before {
    left: 100%;
}

.section-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: var(--primary-color);
}

.section-icon {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    display: block;
}

.section-card h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.section-card p {
    color: var(--text-color);
    line-height: 1.6;
    margin-bottom: 2rem;
    font-size: 1rem;
}

.section-card .btn {
    margin-top: auto;
}

/* Why us section */
.why-us {
    background: var(--light-background);
    padding: 100px 0;
}

.why-us h2 {
    text-align: center;
    font-size: 2.8rem;
    margin-bottom: 4rem;
    color: var(--text-color);
}

.reasons-grid {
    display: -webkit-flex; /* Safari */
    display: flex;
    -webkit-justify-content: space-around; /* Safari */
    justify-content: space-around;
    -webkit-align-items: flex-start; /* Safari */
    align-items: flex-start;
    gap: 0; /* Remove gap for precise control */
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    -webkit-box-sizing: border-box; /* Safari */
    box-sizing: border-box;
    padding: 0 2rem;
}

.reason {
    text-align: center;
    padding: 2rem 1rem;
    position: relative;
    -webkit-box-sizing: border-box; /* Safari */
    box-sizing: border-box;
    -webkit-flex: 1; /* Safari */
    flex: 1;
    max-width: 300px;
    /* Ensure proper rendering on Safari */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Desktop layout - force horizontal on large screens */
@media screen and (min-width: 1025px) {
    .reasons-grid {
        display: -webkit-flex !important; /* Safari */
        display: flex !important;
        -webkit-flex-direction: row !important; /* Safari */
        flex-direction: row !important;
        -webkit-justify-content: space-around !important; /* Safari */
        justify-content: space-around !important;
        -webkit-align-items: flex-start !important; /* Safari */
        align-items: flex-start !important;
    }
    
    .reason {
        -webkit-flex: 1 !important; /* Safari */
        flex: 1 !important;
        max-width: 300px !important;
    }
}

.reason-number {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: bold;
    margin: 0 auto 1.5rem;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

.reason h3 {
    color: var(--text-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.reason p {
    color: var(--secondary-color);
    line-height: 1.6;
}

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

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

.animate-in {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Header and Navigation */
.header {
    background: var(--background-color);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
}

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

.nav-brand h1 {
    color: var(--primary-color);
    font-size: 1.8rem;
}

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

.nav-menu a {
    text-decoration: none;
    color: var(--text-color);
    font-weight: 500;
    transition: var(--transition);
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    cursor: pointer;
}

.nav-toggle span {
    width: 25px;
    height: 3px;
    background: var(--text-color);
    margin: 3px 0;
    transition: var(--transition);
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    color: white;
    min-height: 35vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 100px 0 60px;
}

.hero-content h1 {
    font-size: 2.8rem;
    margin-bottom: 0.8rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
    transform: translateY(-2px);
}

/* Sections */
section {
    padding: 80px 0;
}

.about {
    background: var(--light-background);
}

.about h2,
.services h2,
.contact h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-color);
}

.about-content {
    text-align: center;
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}



/* Contact */
.contact {
    background: var(--light-background);
}

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

.contact-info {
    font-size: 1.1rem;
}

.contact-info p {
    margin-bottom: 1rem;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-form input,
.contact-form textarea {
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: var(--transition);
}

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

/* Footer */
.footer {
    background: var(--text-color);
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Back to Top Button */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: var(--primary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.back-to-top:active {
    transform: scale(0.95);
}

/* Dark theme specific styles */
@media (prefers-color-scheme: dark) {
    /* Card and section backgrounds */
    .card, .service-card, .achievement-card, .info-card {
        background-color: var(--light-background) !important;
        border: 1px solid var(--border-color);
    }
    
    /* Feature cards for better visibility in dark theme */
    .feature {
        background-color: var(--light-background) !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Section cards (Servicii, Portofoliu, Contact) for better visibility in dark theme */
    .section-card {
        background-color: var(--light-background) !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Portfolio items for better visibility in dark theme */
    .portfolio-item {
        background-color: var(--light-background) !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Service cards and benefit cards for better visibility in dark theme */
    .service-card, .benefit {
        background-color: var(--light-background) !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Contact guarantee box for better visibility in dark theme */
    .contact-guarantee {
        background-color: var(--light-background) !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Contact form section and map placeholder styling for dark theme */
    .contact-form-section {
        background-color: var(--background-color) !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    .map-placeholder {
        background-color: var(--light-background) !important;
        border: 1px solid var(--border-color) !important;
        box-shadow: 0 4px 15px rgba(255, 255, 255, 0.1) !important;
    }
    
    /* Contact form enhanced styling for dark theme */
    .contact-form.enhanced {
        background: var(--background-color) !important;
        border: none !important;
        box-shadow: none !important;
    }
    
    /* Hero sections gradients for dark theme */
    .hero {
        background: linear-gradient(135deg, var(--primary-color), #3A5FCD) !important;
        min-height: 35vh !important;
        padding: 100px 0 60px !important;
    }
    
    .page-hero {
        background: linear-gradient(135deg, var(--primary-color), #3A5FCD) !important;
        min-height: 35vh !important;
        padding: 100px 0 60px !important;
    }
    
    /* Input fields and forms */
    input, textarea, select {
        background-color: var(--light-background) !important;
        color: var(--text-color) !important;
        border: 1px solid var(--border-color) !important;
    }
    
    input::placeholder, textarea::placeholder {
        color: #888 !important;
    }
    
    /* Table styling */
    table {
        background-color: var(--light-background) !important;
    }
    
    th, td {
        border-color: var(--border-color) !important;
    }
    
    /* Mobile menu */
    .nav-menu {
        background-color: var(--background-color) !important;
    }
    
    .nav-menu a:hover,
    .nav-menu a.active {
        background-color: var(--light-background) !important;
    }
    
    /* Navigation links hover and active states for dark theme */
    .nav-menu a:hover,
    .nav-menu a.active {
        color: var(--primary-color) !important;
        background: rgba(90, 127, 255, 0.15) !important;
    }
    
    /* Header scrolled state for dark theme */
    .header.scrolled {
        background: rgba(0, 0, 0, 0.9) !important;
        backdrop-filter: blur(25px);
        -webkit-backdrop-filter: blur(25px);
        box-shadow: 0 2px 30px rgba(255, 255, 255, 0.05) !important;
    }
    
    /* Sections with light backgrounds */
    .intro, .services, .about, .contact-info, .authorization-content {
        background-color: var(--background-color) !important;
    }
    
    /* Services page specific dark theme background */
    .services-detailed {
        background-color: #000000 !important;
    }
    
    /* Why choose us section dark theme background */
    .why-choose-us {
        background-color: #000000 !important;
    }
    
    /* Why us section on home page dark theme background */
    .why-us {
        background-color: #000000 !important;
    }
    
    /* Main sections on home page dark theme background */
    .main-sections {
        background-color: #000000 !important;
    }
    
    /* Contact main section background for dark theme */
    .contact-main {
        background-color: var(--background-color) !important;
    }
    
    /* Location map section background for dark theme */
    .location-map {
        background-color: var(--background-color) !important;
    }
    
    /* Footer styling for dark theme */
    .footer {
        background: #000000 !important;
    }
    
    .footer p, .footer-content p, .footer * {
        color: #4a4a4a !important;
    }
}

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}