/* ===================================
   SERVICE PAGES STYLES
   =================================== */

/* ── Service Hero ── */
.service-hero {
    position: relative;
    padding: var(--hero-padding-desktop);
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    overflow: hidden;
}

.service-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 50% 50%, rgba(99, 102, 241, 0.1) 0%, transparent 50%);
    pointer-events: none;
}

/* Hero variant backgrounds */
.research-hero    { background: linear-gradient(135deg, #1e3a8a 0%, #0f172a 100%); }
.programming-hero { background: linear-gradient(135deg, #065f46 0%, #0f172a 100%); }
.exams-hero       { background: linear-gradient(135deg, #9a3412 0%, #0f172a 100%); }

.service-hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    max-width: 1000px;
    margin: 0 auto;
}

.service-logo {
    width: 150px;
    height: 150px;
    margin: 0 auto 2rem;
    animation: fadeInDown 0.8s ease both;
}

.service-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

/* ── Group shared font-family on all headings ── */
.service-hero-title,
.details-content h2,
.tech-stack h3,
.tech-category h4,
.exam-types h3,
.exam-category h4,
.quality-guarantee h3,
.order-form-card h3,
.form-success h4 {
    font-family: var(--font-display);
}

.service-hero-title {
    font-size: clamp(2rem, 4.5vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.service-hero-description {
    font-size: 1.05rem;
    color: var(--gray-text);
    line-height: 1.6;
    max-width: 720px;
    margin: 0 auto;
    animation: fadeInUp 0.8s ease 0.4s both;
}

/* ── Service Details Section ── */
.service-details {
    padding: var(--section-padding-desktop);
    background: var(--dark-bg);
}

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

.details-content h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

/* ── Service Offerings ── */
.service-offerings {
    display: grid;
    gap: 1.25rem;
    margin-bottom: 3rem;
}

.offering-item {
    display: flex;
    gap: 1rem;
    padding: 1.5rem;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    transition: var(--transition-base);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.offering-item:hover {
    border-color: rgba(99, 102, 241, 0.55);
    transform: translateX(8px);
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.15);
    background: rgba(99, 102, 241, 0.04);
}

.offering-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
    line-height: 1;
}

.offering-content h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.offering-content p {
    color: var(--gray-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── Tech Stack (Programming Page) ── */
.tech-stack {
    margin-bottom: 3rem;
}

.tech-stack h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.tech-categories {
    display: grid;
    gap: 1.5rem;
}

.tech-category h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #a5b4fc;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.tech-tag {
    padding: 0.5rem 1rem;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 20px;
    color: #a5b4fc;
    font-size: 0.9rem;
    font-weight: 500;
    transition: var(--transition-base);
    cursor: default;
}

.tech-tag:hover {
    background: rgba(99, 102, 241, 0.22);
    border-color: rgba(99, 102, 241, 0.6);
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

/* ── Exam Types (Exams Page) ── */
.exam-types {
    margin-bottom: 3rem;
}

.exam-types h3 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

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

.exam-category {
    padding: 1.5rem;
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 12px;
    transition: var(--transition-base);
}

/* FIX: exam-category had no hover state */
.exam-category:hover {
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.12);
}

.exam-category h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;
    color: #a5b4fc;
}

.exam-category ul {
    list-style: none;
}

.exam-category li {
    padding: 0.5rem 0;
    color: var(--gray-text);
    border-bottom: 1px solid var(--dark-border);
    font-size: 0.9rem;
}

.exam-category li:last-child {
    border-bottom: none;
}

/* ── Quality Guarantee ── */
/* FIX: border shorthand conflict — use border + override left separately */
.quality-guarantee {
    padding: 2rem;
    background: var(--dark-card);
    border-radius: 15px;
    border: 1px solid var(--dark-border);
    border-left: 4px solid #6366f1;
    transition: var(--transition-base);
}

.quality-guarantee:hover {
    border-color: rgba(99, 102, 241, 0.4);
    border-left-color: #6366f1;
    box-shadow: 0 8px 24px rgba(99, 102, 241, 0.1);
}

.quality-guarantee h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.quality-guarantee ul {
    list-style: none;
}

.quality-guarantee li {
    padding: 0.75rem 0;
    color: var(--gray-text);
    font-size: 1rem;
    line-height: 1.6;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.quality-guarantee li:last-child {
    border-bottom: none;
}

/* ── Order Form Container ── */
/* FIX: added z-index so sticky doesn't bleed under nav */
.order-form-container {
    position: sticky;
    top: 100px;
    z-index: 10;
}

.order-form-card {
    background: var(--dark-card);
    border: 1px solid var(--dark-border);
    border-radius: 20px;
    padding: 2rem;
    box-shadow: var(--shadow-xl);
}

.order-form-card h3 {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
}

.form-subtitle {
    color: var(--gray-text);
    margin-bottom: 2rem;
    font-size: 0.95rem;
}

/* ── Form Styles ── */
.order-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--light-text);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.875rem 1rem;
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: 10px;
    color: var(--light-text);
    font-family: var(--font-primary);
    font-size: 1rem;
    transition: var(--transition-base);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #0066FF;
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.08);
}

.form-group input.field-invalid,
.form-group select.field-invalid,
.form-group textarea.field-invalid {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

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

/* ── File Upload Area ── */
.file-upload-area {
    position: relative;
}

.upload-placeholder {
    padding: 2rem;
    border: 2px dashed var(--dark-border);
    border-radius: 10px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition-base);
}

.upload-placeholder:hover,
.upload-placeholder.drag-over {
    border-color: #6366f1;
    background: rgba(99, 102, 241, 0.07);
    transform: scale(1.01);
}

.upload-placeholder svg {
    color: var(--gray-text);
    margin-bottom: 1rem;
}

.upload-placeholder p {
    color: var(--light-text);
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.upload-placeholder span {
    color: var(--gray-text);
    font-size: 0.85rem;
}

.uploaded-files {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.uploaded-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: 8px;
    transition: var(--transition-fast);
}

.uploaded-file:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.file-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.file-icon { color: #6366f1; }

.file-name {
    color: var(--light-text);
    font-size: 0.9rem;
    word-break: break-all;
}

.file-size {
    color: var(--gray-text);
    font-size: 0.8rem;
}

/* FIX: remove-file now has richer hover feedback */
.remove-file {
    background: none;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-file:hover {
    color: #fff;
    background: #ef4444;
    transform: scale(1.1);
}

/* ── Buttons ── */
.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
}

/* ── Form Divider ── */
.form-divider {
    position: relative;
    text-align: center;
    margin: 1.5rem 0;
}

.form-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--dark-border);
}

.form-divider span {
    position: relative;
    background: var(--dark-card);
    padding: 0 1rem;
    color: var(--gray-text);
    font-size: 0.9rem;
}

/* ── Contact Email ── */
.contact-email {
    text-align: center;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--dark-border);
}

.contact-email p {
    color: var(--gray-text);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.contact-email a {
    color: #6366f1;
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition-fast);
}

.contact-email a:hover {
    color: #818cf8;
    text-decoration: underline;
}

/* ── Success / Error Messages ── */
.form-success {
    padding: 1.5rem;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 12px;
    color: #10b981;
    text-align: center;
    margin-bottom: 1rem;
    animation: fadeInDown 0.5s ease both;
}

.form-success h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.form-error {
    padding: 1.5rem;
    background: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 12px;
    color: #ef4444;
    text-align: center;
    margin-bottom: 1rem;
    animation: fadeInDown 0.5s ease both;
}

/* ── Loading State ── */
/* FIX: replaced margin offset hack with transform centering */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.75;
}

.btn-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* ===================================
   RESPONSIVE DESIGN
   =================================== */
@media (max-width: 968px) {
    .details-grid {
        grid-template-columns: 1fr;
    }

    .order-form-container {
        position: static;
        z-index: auto;
    }

    .tech-categories {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .service-hero {
        padding: var(--hero-padding-mobile);
    }

    .service-logo {
        width: 110px;
        height: 110px;
    }

    .service-hero-title {
        font-size: 1.85rem;
    }

    .service-hero-description {
        font-size: 0.95rem;
    }

    .service-details {
        padding: 2.5rem 0;
    }

    .details-content h2 {
        font-size: 1.5rem;
        margin-bottom: 1.25rem;
    }

    .exam-categories {
        grid-template-columns: 1fr;
    }

    .service-offerings {
        gap: 1rem;
    }

    .offering-item {
        padding: 1.15rem;
        gap: 0.85rem;
    }
    
    .offering-item:hover {
        transform: none;
    }

    .offering-icon {
        font-size: 2.1rem;
    }

    .offering-content h3 {
        font-size: 1.15rem;
    }

    .offering-content p {
        font-size: 0.9rem;
    }

    /* Details grid already collapses at 968px but ensure padding is fine */
    .details-grid {
        gap: 2rem;
    }

    /* Order form card — compact on tablet */
    .order-form-card {
        padding: 1.75rem;
    }

    .order-form-card h3 {
        font-size: 1.4rem;
    }

    .form-subtitle {
        font-size: 0.88rem;
        margin-bottom: 1.25rem;
    }

    /* Tech stack headings — smaller */
    .tech-stack h3,
    .exam-types h3,
    .quality-guarantee h3 {
        font-size: 1.25rem;
    }

    /* Form group label — slightly smaller */
    .form-group label { font-size: 0.88rem; }
}

@media (max-width: 480px) {
    .order-form-card {
        padding: 1.25rem;
    }

    .order-form-card h3 {
        font-size: 1.25rem;
    }

    .form-subtitle {
        font-size: 0.82rem;
        margin-bottom: 1rem;
    }

    .tech-tags {
        gap: 0.5rem;
    }

    .tech-tag {
        font-size: 0.82rem;
        padding: 0.35rem 0.75rem;
    }

    .service-offerings {
        gap: 0.75rem;
    }

    .quality-guarantee {
        padding: 1.25rem;
    }

    .quality-guarantee li {
        font-size: 0.9rem;
        padding: 0.5rem 0;
    }

    .exam-category {
        padding: 1.15rem;
    }

    .exam-category h4 {
        font-size: 1rem;
        margin-bottom: 0.75rem;
    }

    .exam-category li {
        font-size: 0.85rem;
        padding: 0.4rem 0;
    }

    /* Service logo — smallest screens */
    .service-logo {
        width: 88px;
        height: 88px;
        margin-bottom: 1.25rem;
    }

    /* Service hero title floor */
    .service-hero-title {
        font-size: 1.6rem !important;
    }

    /* Service hero description — slightly smaller */
    .service-hero-description {
        font-size: 0.88rem;
    }

    /* Exam categories — explicit single col */
    .exam-categories {
        grid-template-columns: 1fr !important;
    }

    /* Offering item — tight padding */
    .offering-item {
        padding: 0.85rem;
        gap: 0.75rem;
    }
    .offering-icon { font-size: 1.75rem; }
    .offering-content h3 { font-size: 1.05rem; margin-bottom: 0.3rem; }
    .offering-content p { font-size: 0.82rem; line-height: 1.45; }

    /* Upload placeholder — tight */
    .upload-placeholder {
        padding: 1.25rem;
    }

    /* Form success/error messages */
    .form-success,
    .form-error {
        padding: 1.1rem;
    }

    /* Form group label — slightly smaller */
    .form-group label {
        font-size: 0.8rem;
    }

    /* Form input fields & button compact style for small mobile */
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.7rem 0.85rem;
        font-size: 0.9rem;
        border-radius: 8px;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.92rem;
        border-radius: 10px;
    }
}