/* ===== MODERN SERVICE SECTION ===== */
.service {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.service::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="dots" width="20" height="20" patternUnits="userSpaceOnUse"><circle cx="10" cy="10" r="1" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23dots)"/></svg>');
    pointer-events: none;
}

.service-header {
    position: relative;
    z-index: 2;
    margin-bottom: 4rem;
}

.service .heading {
    font-size: 3rem;
    color: #2c3e50;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.service .sub-heading {
    font-size: 1.3rem;
    color: #666;
    margin-bottom: 0;
    font-weight: 500;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}

.service-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 2;
}

.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    justify-items: center;
    align-items: stretch;
    width: 100%;
    margin-bottom: 3rem;
}

.service-card {
    background: #ffffff;
    padding: 0;
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    text-align: center;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    max-width: 350px;
    min-height: 400px;
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(43, 143, 65, 0.03) 0%, rgba(43, 143, 65, 0.08) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
}

.service-card:hover::before {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(43, 143, 65, 0.15);
    border-color: rgba(43, 143, 65, 0.2);
}

.icon-container {
    position: relative;
    z-index: 3;
    width: 90px;
    height: 90px;
    margin: 2.5rem auto 1.5rem;
    background: linear-gradient(135deg, #2b8f41 0%, #1e6b32 100%);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
    box-shadow: 0 8px 25px rgba(43, 143, 65, 0.3);
    flex-shrink: 0;
}

.service-card:hover .icon-container {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 35px rgba(43, 143, 65, 0.4);
}

.icon-container i {
    font-size: 2.2rem;
    color: #ffffff;
    transition: all 0.3s ease;
}

.service-card:hover .icon-container i {
    transform: scale(1.1);
}

.card-content {
    position: relative;
    z-index: 3;
    padding: 0 2rem 2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.service-card h3 {
    font-size: 1.5rem;
    color: #2c3e50;
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
    width: 100%;
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: #2b8f41;
}

.service-card p {
    font-size: 1rem;
    color: #666;
    line-height: 1.6;
    flex-grow: 1;
    text-align: center;
    width: 100%;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.service-card:hover p {
    color: #555;
}

/* Service Features */
.service-features {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 1rem;
}

.feature-tag {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    color: #2b8f41;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    border: 1px solid rgba(43, 143, 65, 0.2);
    transition: all 0.3s ease;
}

.service-card:hover .feature-tag {
    background: linear-gradient(135deg, #2b8f41 0%, #1e6b32 100%);
    color: #fff;
    transform: translateY(-2px);
}

/* Card Overlay */
.card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2b8f41 0%, #1e6b32 100%);
    color: #fff;
    padding: 1rem;
    transform: translateY(100%);
    transition: transform 0.3s ease;
    z-index: 4;
}

.service-card:hover .card-overlay {
    transform: translateY(0);
}

.service-action {
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.service-action::after {
    content: '→';
    transition: transform 0.3s ease;
}

.service-card:hover .service-action::after {
    transform: translateX(5px);
}

/* Form Popup */
.form-popup {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.form-popup.active {
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-container {
    background: #fff;
    padding: 2em;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    height: auto;
    max-height: none;
    overflow-y: auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    animation: fadeIn 0.3s ease-in-out;
    font-size: 1.5rem;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.form-container h2 {
    font-size: 2rem;
    color: var(--color);
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.form-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    margin-bottom: 10px;
}

.form-field label {
    margin-bottom: 5px;
    font-weight: bold;
}

.form-field input,
.form-field select,
.form-field textarea {
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 1rem;
}

.form-field input[type="file"] {
    padding: 3px;
}

.form-field button {
    margin-top: 10px;
    padding: 12px;
    border: none;
    border-radius: 5px;
    background-color: var(--color);
    color: white;
    font-size: 1.8rem;
    cursor: pointer;
}

.form-field button:hover {
    background-color: #218838;
}

/* Close Button */
.close {
    position: absolute;
    top: 10px;
    right: 10px;
    font-size: 24px;
    font-weight: bold;
    color: #333;
    cursor: pointer;
}

.close:hover {
    color: red;
}

/* Success Message */
.success-message {
    background-color: #d4edda;
    color: #155724;
    padding: 20px;
    margin-top: 20px;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    text-align: center;
}

/* Fade In Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -55%);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%);
    }
}

.error-message {
    display: none;
    color: red;
    font-size: 12px;
    margin-top: 5px;
}

/* ===== RESPONSIVE DESIGN ===== */

/* Large Desktop (1400px+) */
@media (min-width: 1400px) {
    .service-list {
        grid-template-columns: repeat(5, 1fr);
        gap: 2.5rem;
    }
    
    .service-card {
        max-width: 320px;
        min-height: 420px;
    }
    
    .icon-container {
        width: 100px;
        height: 100px;
        margin: 3rem auto 2rem;
    }
    
    .icon-container i {
        font-size: 2.5rem;
    }
    
    .service-card h3 {
        font-size: 1.6rem;
    }
    
    .service-card p {
        font-size: 1.1rem;
    }
}

/* Desktop (1200px - 1399px) */
@media (max-width: 1399px) and (min-width: 1200px) {
    .service-list {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    .service-card {
        max-width: 300px;
        min-height: 400px;
    }
    
    .icon-container {
        width: 90px;
        height: 90px;
        margin: 2.5rem auto 1.5rem;
    }
    
    .icon-container i {
        font-size: 2.2rem;
    }
    
    .service-card h3 {
        font-size: 1.5rem;
    }
    
    .service-card p {
        font-size: 1rem;
    }
}

/* Tablet Large (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
    .service-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }
    
    .service-card {
        max-width: 320px;
        min-height: 380px;
    }
    
    .icon-container {
        width: 80px;
        height: 80px;
        margin: 2rem auto 1.2rem;
    }
    
    .icon-container i {
        font-size: 2rem;
    }
    
    .service-card h3 {
        font-size: 1.4rem;
    }
    
    .service-card p {
        font-size: 0.95rem;
    }
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
    .service {
        padding: 60px 20px;
    }
    
    .service .heading {
        font-size: 2.5rem;
    }
    
    .service .sub-heading {
        font-size: 1.2rem;
    }
    
    .service-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .service-card {
        max-width: 350px;
        min-height: 360px;
    }
    
    .icon-container {
        width: 75px;
        height: 75px;
        margin: 2rem auto 1rem;
    }
    
    .icon-container i {
        font-size: 1.8rem;
    }
    
    .service-card h3 {
        font-size: 1.3rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
    }
    
    .card-content {
        padding: 0 1.5rem 1.5rem;
    }
}

/* Mobile Large (576px - 767px) */
@media (max-width: 767px) and (min-width: 576px) {
    .service {
        padding: 50px 15px;
    }
    
    .service .heading {
        font-size: 2.2rem;
    }
    
    .service .sub-heading {
        font-size: 1.1rem;
    }
    
    .service-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.2rem;
    }
    
    .service-card {
        max-width: 280px;
        min-height: 340px;
    }
    
    .icon-container {
        width: 70px;
        height: 70px;
        margin: 1.5rem auto 1rem;
    }
    
    .icon-container i {
        font-size: 1.6rem;
    }
    
    .service-card h3 {
        font-size: 1.2rem;
    }
    
    .service-card p {
        font-size: 0.85rem;
    }
    
    .card-content {
        padding: 0 1.2rem 1.2rem;
    }
    
    .feature-tag {
        font-size: 0.7rem;
        padding: 0.3rem 0.6rem;
    }
}

/* Mobile (480px - 575px) */
@media (max-width: 575px) and (min-width: 480px) {
    .service {
        padding: 40px 15px;
    }
    
    .service .heading {
        font-size: 2rem;
    }
    
    .service .sub-heading {
        font-size: 1rem;
    }
    
    .service-list {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        max-width: 350px;
        margin: 0 auto;
    }
    
    .service-card {
        max-width: 320px;
        min-height: 320px;
    }
    
    .icon-container {
        width: 65px;
        height: 65px;
        margin: 1.5rem auto 1rem;
    }
    
    .icon-container i {
        font-size: 1.5rem;
    }
    
    .service-card h3 {
        font-size: 1.1rem;
    }
    
    .service-card p {
        font-size: 0.8rem;
    }
    
    .card-content {
        padding: 0 1rem 1rem;
    }
    
    .feature-tag {
        font-size: 0.65rem;
        padding: 0.25rem 0.5rem;
    }
}

/* Mobile Small (360px - 479px) */
@media (max-width: 479px) and (min-width: 360px) {
    .service {
        padding: 30px 10px;
    }
    
    .service .heading {
        font-size: 1.8rem;
    }
    
    .service .sub-heading {
        font-size: 0.95rem;
    }
    
    .service-list {
        grid-template-columns: 1fr;
        gap: 1rem;
        max-width: 300px;
        margin: 0 auto;
    }
    
    .service-card {
        max-width: 280px;
        min-height: 300px;
    }
    
    .icon-container {
        width: 60px;
        height: 60px;
        margin: 1.2rem auto 0.8rem;
    }
    
    .icon-container i {
        font-size: 1.4rem;
    }
    
    .service-card h3 {
        font-size: 1rem;
    }
    
    .service-card p {
        font-size: 0.75rem;
    }
    
    .card-content {
        padding: 0 0.8rem 0.8rem;
    }
    
    .feature-tag {
        font-size: 0.6rem;
        padding: 0.2rem 0.4rem;
    }
}

/* Mobile Extra Small (< 360px) */
@media (max-width: 359px) {
    .service {
        padding: 25px 8px;
    }
    
    .service .heading {
        font-size: 1.6rem;
    }
    
    .service .sub-heading {
        font-size: 0.9rem;
    }
    
    .service-list {
        grid-template-columns: 1fr;
        gap: 0.8rem;
        max-width: 250px;
        margin: 0 auto;
    }
    
    .service-card {
        max-width: 240px;
        min-height: 280px;
    }
    
    .icon-container {
        width: 55px;
        height: 55px;
        margin: 1rem auto 0.6rem;
    }
    
    .icon-container i {
        font-size: 1.2rem;
    }
    
    .service-card h3 {
        font-size: 0.95rem;
    }
    
    .service-card p {
        font-size: 0.7rem;
    }
    
    .card-content {
        padding: 0 0.6rem 0.6rem;
    }
    
    .feature-tag {
        font-size: 0.55rem;
        padding: 0.15rem 0.3rem;
    }
}

/* ===== ACCESSIBILITY & ENHANCEMENTS ===== */

/* Focus states for accessibility */
.service-card:focus {
    outline: 3px solid #2b8f41;
    outline-offset: 3px;
}

.service-card:focus-visible {
    outline: 3px solid #2b8f41;
    outline-offset: 3px;
    transform: translateY(-5px);
}

/* Loading state for dynamic content */
.service-card.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Print styles */
@media print {
    .service-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
        min-height: auto;
        background: white !important;
        padding: 20px;
    }
    
    .service-card::before {
        display: none;
    }
    
    .icon-container {
        background: #f0f0f0 !important;
    }
    
    .icon-container i {
        color: #000 !important;
    }
    
    .service-list {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .service-card {
        border: 2px solid #000;
        background: #fff;
    }
    
    .service-card h3 {
        color: #000;
    }
    
    .service-card p {
        color: #333;
    }
    
    .icon-container {
        background: #000 !important;
    }
    
    .icon-container i {
        color: #fff !important;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .service-card,
    .service-card *,
    .service-card::before,
    .service-card::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .service-card:hover {
        transform: none;
    }
    
    .service-card:hover .icon-container {
        transform: none;
    }
}

/* Touch-friendly interactions */
@media (hover: none) and (pointer: coarse) {
    .service-card:hover {
        transform: none;
    }
    
    .service-card:active {
        transform: scale(0.98);
    }
    
    .service-card:hover .icon-container {
        transform: none;
    }
    
    .service-card:active .icon-container {
        transform: scale(0.95);
    }
}

/* Ultra-wide screen support */
@media (min-width: 1800px) {
    .service-list {
        max-width: 1600px;
        gap: 3rem;
    }
    
    .service-card {
        max-width: 350px;
        min-height: 450px;
    }
    
    .icon-container {
        width: 110px;
        height: 110px;
        margin: 3.5rem auto 2.5rem;
    }
    
    .icon-container i {
        font-size: 2.8rem;
    }
    
    .service-card h3 {
        font-size: 1.8rem;
    }
    
    .service-card p {
        font-size: 1.2rem;
    }
}
