/* Dynamic Website Styles */

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

.modal-content {
    background-color: #ffffff;
    margin: 5% auto;
    padding: 30px;
    border: none;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close:hover,
.close:focus {
    color: #000;
}

/* Form Styles */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e1e1e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
    background-color: #fff;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

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

/* Star Rating */
.star-rating {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
    gap: 5px;
    margin: 10px 0;
}

.star-rating input {
    display: none;
}

.star-rating label {
    font-size: 24px;
    color: #ddd;
    cursor: pointer;
    transition: color 0.2s ease;
    margin: 0;
    padding: 0;
    width: auto;
}

.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #ffd700;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 5px;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #2980b9, #1f4e79);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 152, 219, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

.btn-success {
    background: linear-gradient(135deg, #27ae60, #229954);
    color: white;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.3);
}

.btn-success:hover {
    background: linear-gradient(135deg, #229954, #1e8449);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.4);
}

/* Dynamic Content Styles */
.service-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.service-card.featured {
    border-color: #f39c12;
    background: linear-gradient(135deg, #fff9e6, #fff);
}

.service-card.featured::before {
    content: "FEATURED";
    position: absolute;
    top: -10px;
    right: 20px;
    background: #f39c12;
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 12px;
    font-weight: 700;
}

.service-details {
    margin: 15px 0;
    padding: 15px 0;
    border-top: 1px solid #eee;
    border-bottom: 1px solid #eee;
}

.service-price {
    font-size: 18px;
    font-weight: 700;
    color: #27ae60;
    margin-bottom: 5px;
}

.service-time {
    font-size: 14px;
    color: #7f8c8d;
}

/* Testimonial Cards */
.testimonial-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    position: relative;
}

.testimonial-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.testimonial-rating {
    font-size: 20px;
    color: #ffd700;
    margin-bottom: 15px;
}

.testimonial-author {
    margin-top: 15px;
    font-size: 14px;
}

.testimonial-author strong {
    color: #2c3e50;
}

.testimonial-author small {
    color: #7f8c8d;
}

/* FAQ Styles */
.faq-item {
    background: white;
    border-radius: 8px;
    margin-bottom: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.faq-question {
    padding: 20px;
    cursor: pointer;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background 0.3s ease;
}

.faq-question:hover {
    background: #e9ecef;
}

.faq-question h3 {
    margin: 0;
    font-size: 16px;
    color: #2c3e50;
}

.faq-toggle {
    font-size: 24px;
    font-weight: bold;
    color: #3498db;
    transition: transform 0.3s ease;
}

.faq-answer {
    padding: 20px;
    display: none;
    background: white;
}

.faq-answer p {
    margin: 0;
    color: #555;
    line-height: 1.6;
}

/* Blog Cards */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.blog-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.blog-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.blog-content {
    padding: 25px;
}

.blog-content h3 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 18px;
}

.blog-content p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.blog-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: #7f8c8d;
    margin-bottom: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

/* Newsletter Signup */
.newsletter-signup {
    background: linear-gradient(135deg, #2c3e50, #34495e);
    color: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin-top: 30px;
}

.newsletter-signup h3 {
    margin: 0 0 10px 0;
    color: white;
}

.newsletter-signup p {
    margin: 0 0 20px 0;
    color: #bdc3c7;
}

.newsletter-input-group {
    display: flex;
    gap: 10px;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-input-group input {
    flex: 1;
    padding: 12px 15px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
}

.newsletter-input-group .btn {
    margin: 0;
    white-space: nowrap;
}

/* Message Notifications */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10001;
    padding: 15px 25px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    animation: messageSlideIn 0.3s ease-out;
}

.message.success {
    background: linear-gradient(135deg, #27ae60, #229954);
}

.message.error {
    background: linear-gradient(135deg, #e74c3c, #c0392b);
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateX(100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        margin: 10% auto;
        padding: 20px;
        width: 95%;
    }
    
    .newsletter-input-group {
        flex-direction: column;
    }
    
    .blog-grid {
        grid-template-columns: 1fr;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Enhanced Grid Layouts */
.service-grid,
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 30px;
}

.faq-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Loading States */
.loading {
    text-align: center;
    padding: 40px;
    color: #7f8c8d;
    font-style: italic;
}

.loading::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

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

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

.featured-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f39c12;
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
}

/* Dynamic Homepage Content Styles */

/* Testimonials Section */
.testimonials {
    padding: 80px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e3f2fd 100%);
    position: relative;
    overflow: hidden;
}

.testimonials::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

.testimonials .section-header {
    text-align: center;
    margin-bottom: 60px;
    position: relative;
    z-index: 2;
}

.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
    position: relative;
    z-index: 2;
}

.testimonial-card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: 1px solid rgba(59, 130, 246, 0.1);
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6, #1d4ed8);
}

.testimonial-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

.testimonial-rating {
    font-size: 20px;
    margin-bottom: 15px;
    text-align: center;
}

.testimonial-comment {
    font-style: italic;
    font-size: 16px;
    line-height: 1.6;
    margin: 0 0 20px 0;
    color: #374151;
    position: relative;
}

.testimonial-comment::before {
    content: '"';
    font-size: 60px;
    color: #3b82f6;
    position: absolute;
    top: -10px;
    left: -15px;
    font-family: serif;
    opacity: 0.3;
}

.testimonial-author {
    font-weight: 600;
    color: #1f2937;
    text-align: right;
    font-size: 14px;
}

.testimonial-cta {
    text-align: center;
    margin-top: 40px;
    position: relative;
    z-index: 2;
}

.testimonial-cta p {
    font-size: 16px;
    color: #6b7280;
}

.testimonial-cta a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.testimonial-cta a:hover {
    color: #1d4ed8;
    text-decoration: underline;
}

/* Enhanced Service Cards for Dynamic Content */
.service-card.featured-service {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    transform: scale(1.02);
    position: relative;
    overflow: hidden;
}

.service-card.featured-service::before {
    content: 'FEATURED';
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.service-card .service-price {
    font-weight: 600;
    color: #059669;
    margin-top: 15px;
    font-size: 16px;
}

.service-card.featured-service .service-price {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
    padding: 8px 15px;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.service-card .service-time {
    color: #6b7280;
    font-size: 14px;
    margin-top: 10px;
}

.service-card.featured-service .service-time {
    color: rgba(255, 255, 255, 0.9);
}

/* Loading Spinner Styles */
.loading-spinner {
    text-align: center;
    padding: 40px;
    color: #6b7280;
    font-size: 16px;
}

.loading-spinner::after {
    content: "";
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

.no-testimonials {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
    font-size: 16px;
    font-style: italic;
}

/* Responsive Design for New Sections */
@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .testimonial-card {
        padding: 20px;
    }
    
    .testimonial-comment {
        font-size: 15px;
    }
    
    .service-card.featured-service {
        transform: none;
    }
}

@media (max-width: 480px) {
    .testimonials {
        padding: 40px 0;
    }
    
    .testimonials .section-header {
        margin-bottom: 30px;
    }
}

/* Dynamic Contact Form Messages */
.form-success-message,
.form-error-message {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    animation: slideInMessage 0.3s ease-out;
}

.form-success-message {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 1px solid #34d399;
    color: #065f46;
}

.form-error-message {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border: 1px solid #f87171;
    color: #991b1b;
}

.success-icon,
.error-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.form-success-message p,
.form-error-message p {
    margin: 0;
    font-weight: 500;
}

@keyframes slideInMessage {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Service Portal Styles */
.service-portal-main {
    min-height: calc(100vh - 200px);
    padding-top: 80px;
}

.portal-hero {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 50%, #60a5fa 100%);
    color: white;
    text-align: center;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}

.portal-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="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="25" cy="25" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23ffffff" opacity="0.1"/><circle cx="50" cy="10" r="0.5" fill="%23ffffff" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.portal-hero h1 {
    font-size: 3rem;
    margin-bottom: 20px;
    position: relative;
    z-index: 2;
}

.portal-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    position: relative;
    z-index: 2;
}

.portal-tabs {
    padding: 80px 0;
    background: #f8fafc;
}

.tab-navigation {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
    gap: 20px;
}

.tab-button {
    background: white;
    border: 2px solid #e2e8f0;
    padding: 15px 30px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 16px;
}

.tab-button:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
}

.tab-button.active {
    background: #3b82f6;
    color: white;
    border-color: #3b82f6;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-in;
}

.tab-content.active {
    display: block;
}

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

.portal-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.1);
    max-width: 800px;
    margin: 0 auto;
}

.portal-card h2 {
    color: #1e293b;
    margin-bottom: 15px;
    font-size: 2rem;
    display: flex;
    align-items: center;
    gap: 15px;
}

.portal-form {
    margin-top: 30px;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e2e8f0;
}

.form-section:last-child {
    border-bottom: none;
}

.form-section h3 {
    color: #374151;
    margin-bottom: 20px;
    font-size: 1.3rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section h3::before {
    content: '';
    width: 4px;
    height: 20px;
    background: #3b82f6;
    border-radius: 2px;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #374151;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.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-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.portal-submit-btn {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 20px;
}

.portal-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(59, 130, 246, 0.3);
}

.portal-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* Tracking Results */
.tracking-results {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #e2e8f0;
}

.tracking-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.request-card {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 25px;
    transition: all 0.3s ease;
}

.request-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 5px 15px rgba(59, 130, 246, 0.1);
}

.request-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e2e8f0;
}

.request-id {
    font-size: 18px;
    color: #1e293b;
}

.request-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-submitted { background: #dbeafe; color: #1e40af; }
.status-quoted { background: #fef3c7; color: #92400e; }
.status-approved { background: #d1fae5; color: #065f46; }
.status-in-progress { background: #e0e7ff; color: #3730a3; }
.status-testing { background: #fde68a; color: #92400e; }
.status-completed { background: #dcfce7; color: #166534; }
.status-ready-pickup { background: #ddd6fe; color: #5b21b6; }
.status-delivered { background: #f0fdf4; color: #15803d; }
.status-cancelled { background: #fee2e2; color: #991b1b; }

.request-details {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.detail-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.detail-item {
    color: #374151;
}

.detail-item strong {
    color: #1e293b;
}

.quote-info {
    background: #f0f9ff;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid #0ea5e9;
}

.approved {
    color: #059669;
    font-weight: 600;
}

.pending {
    color: #d97706;
    font-weight: 600;
}

.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #6b7280;
}

.no-results-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-results h3 {
    color: #374151;
    margin-bottom: 15px;
}

.no-results a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 600;
}

.no-results a:hover {
    text-decoration: underline;
}

/* Service Request Success Message */
.service-request-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border: 2px solid #10b981;
    padding: 30px;
    border-radius: 15px;
}

.service-request-success h4 {
    color: #065f46;
    margin: 0 0 10px 0;
    font-size: 1.3rem;
}

.service-request-success p {
    color: #047857;
    margin: 5px 0;
}

/* Responsive Design for Portal */
@media (max-width: 768px) {
    .portal-hero h1 {
        font-size: 2.5rem;
    }
    
    .portal-card {
        padding: 30px 20px;
        margin: 0 15px;
    }
    
    .tab-navigation {
        flex-direction: column;
        align-items: center;
    }
    
    .tab-button {
        width: 200px;
        text-align: center;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .request-header {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }
    
    .detail-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
}

@media (max-width: 480px) {
    .portal-hero {
        padding: 40px 0;
    }
    
    .portal-hero h1 {
        font-size: 2rem;
    }
    
    .portal-tabs {
        padding: 40px 0;
    }
}