/* Variables */
:root {
    --primary-color: #007bff; /* Blue */
    --accent-color: #ff6600; /* Orange/Red */
    --text-dark: #333;
    --text-light: #fff;
    --background-light: #f9f9f9;
    --success-color: #28a745;
    --error-color: #dc3545;
    --warning-color: #ffc107;
    --border-color: #ccc;
    --shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 4px 15px rgba(0, 0, 0, 0.3);
}

/* Base Styles */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--background-light);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Screen Reader Only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Header & Navigation */
header {
    background-color: var(--primary-color);
    color: var(--text-light);
    padding: 15px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow);
}

.logo {
    font-size: 1.2em;
    font-weight: 700;
}

.call-now {
    background-color: var(--accent-color);
    color: var(--text-light);
    padding: 8px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.2s;
}

.call-now:hover,
.call-now:focus {
    background-color: #e65c00;
    transform: translateY(-2px);
    outline: 2px solid var(--text-light);
    outline-offset: 2px;
}

/* Main Content */
main {
    flex: 1;
}

/* Hero Section */
#hero {
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.9) 0%, rgba(255, 102, 0, 0.9) 100%),
                url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 600"><defs><pattern id="tyrePattern" x="0" y="0" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="40" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="2"/></pattern></defs><rect fill="url(%23tyrePattern)" width="1200" height="600"/></svg>') 
                no-repeat center center/cover;
    color: var(--text-light);
    text-align: center;
    padding: 80px 5%;
    min-height: 500px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

#hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255, 102, 0, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

#hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(0, 123, 255, 0.2) 0%, transparent 70%);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 800px;
}

.tyre-icon-large {
    width: 120px;
    height: 120px;
    margin: 0 auto 20px;
    animation: rotate 20s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.tyre-icon-large svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
}

#hero h1 {
    font-size: 2.8em;
    margin-bottom: 15px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    font-weight: 700;
}

.slogan {
    font-size: 1.5em;
    font-weight: 400;
    margin-bottom: 10px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    line-height: 1.4;
}

.time {
    font-size: 1.6em;
    font-weight: 700;
    color: var(--text-light);
    background: rgba(255, 102, 0, 0.9);
    padding: 10px 20px;
    border-radius: 25px;
    display: inline-block;
    margin: 20px 0;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.hero-badges {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
    margin: 25px 0;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 0.9em;
    font-weight: 600;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Featured Service Section */
#featured-service {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 60px 5%;
}

.featured-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.featured-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.tyre-animation {
    width: 100%;
    max-width: 400px;
    position: relative;
}

.tyre-svg {
    width: 100%;
    height: auto;
    animation: tyreRotate 15s linear infinite;
    filter: drop-shadow(0 8px 16px rgba(0, 0, 0, 0.2));
}

@keyframes tyreRotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.puncture-dot {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.2); }
}

.featured-content h2 {
    font-size: 2.5em;
    color: var(--primary-color);
    margin-bottom: 15px;
    line-height: 1.2;
}

.featured-subtitle {
    font-size: 1.3em;
    color: var(--accent-color);
    font-weight: 600;
    margin-bottom: 30px;
}

.featured-benefits {
    display: grid;
    gap: 20px;
}

.benefit-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
}

.benefit-item:hover {
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.benefit-icon {
    font-size: 2em;
    flex-shrink: 0;
}

.benefit-item strong {
    display: block;
    color: var(--primary-color);
    font-size: 1.1em;
    margin-bottom: 5px;
}

.benefit-item p {
    color: #666;
    margin: 0;
    font-size: 0.95em;
}

.cta-whatsapp {
    display: inline-flex;
    align-items: center;
    background-color: #25D366; /* WhatsApp Green */
    color: var(--text-light);
    padding: 12px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 700;
    transition: background-color 0.3s, transform 0.2s;
}

.cta-whatsapp img {
    width: 25px;
    height: 25px;
    margin-right: 10px;
}

.cta-whatsapp:hover,
.cta-whatsapp:focus {
    background-color: #1FAF59;
    transform: translateY(-2px);
    outline: 2px solid var(--text-light);
    outline-offset: 2px;
}

/* Services Section */
#services, #contact, #reviews {
    padding: 40px 5%;
    text-align: center;
}

h2 {
    font-size: 2em;
    color: var(--primary-color);
    margin-bottom: 30px;
}

.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.service-item {
    background-color: var(--text-light);
    padding: 25px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    position: relative;
}

.service-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

.service-item:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.service-item.featured-service-item {
    background: linear-gradient(135deg, #fff 0%, #fff5f0 100%);
    border: 3px solid var(--accent-color);
    box-shadow: 0 6px 16px rgba(255, 102, 0, 0.2);
    transform: scale(1.05);
}

.service-item.featured-service-item:hover {
    transform: scale(1.08) translateY(-5px);
    box-shadow: 0 8px 20px rgba(255, 102, 0, 0.3);
}

.service-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--accent-color);
    color: white;
    padding: 5px 15px;
    border-radius: 15px;
    font-size: 0.75em;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(255, 102, 0, 0.4);
}

.service-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 15px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.service-icon.tyre-icon {
    animation: tyreBounce 2s ease-in-out infinite;
}

@keyframes tyreBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
}

.service-icon.tyre-icon svg {
    width: 100%;
    height: 100%;
    filter: drop-shadow(0 4px 8px rgba(255, 102, 0, 0.3));
}

.icon-large {
    font-size: 3em;
}

.service-item h3 {
    color: var(--accent-color);
    margin-bottom: 10px;
    font-size: 1.3em;
}

.service-description {
    color: #555;
    line-height: 1.6;
    margin-bottom: 15px;
}

.service-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 2px solid #f0f0f0;
}

.service-highlights span {
    background: var(--primary-color);
    color: white;
    padding: 5px 12px;
    border-radius: 15px;
    font-size: 0.85em;
    font-weight: 600;
}

/* Reviews Section */
#reviews {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.reviews-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    max-width: 1200px;
    margin: 0 auto 30px;
}

.review-card {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s, box-shadow 0.3s;
    text-align: left;
}

.review-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
}

.review-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    gap: 15px;
}

.reviewer-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.reviewer-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-color) 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.2em;
    flex-shrink: 0;
}

.reviewer-details {
    flex: 1;
}

.reviewer-name {
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 3px;
    font-size: 1em;
}

.reviewer-location {
    font-size: 0.85em;
    color: #666;
}

.review-rating {
    flex-shrink: 0;
}

.stars {
    color: #ffc107;
    font-size: 1.2em;
    letter-spacing: 2px;
}

.review-content {
    margin-bottom: 15px;
    line-height: 1.6;
    color: #555;
}

.review-content p {
    margin: 0;
    font-style: italic;
}

.review-content p::before {
    content: '"';
    font-size: 1.5em;
    color: var(--accent-color);
    line-height: 0;
    margin-right: 5px;
}

.review-content p::after {
    content: '"';
    font-size: 1.5em;
    color: var(--accent-color);
    line-height: 0;
    margin-left: 5px;
}

.review-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #e9ecef;
    font-size: 0.85em;
}

.review-service {
    color: var(--accent-color);
    font-weight: 600;
}

.review-date {
    color: #999;
}

.reviews-cta {
    margin-top: 30px;
    padding: 20px;
    background: var(--primary-color);
    color: white;
    border-radius: 10px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.reviews-cta p {
    margin: 0;
    font-size: 1.1em;
}

.reviews-cta a {
    color: #ffd700;
    font-weight: 700;
    text-decoration: underline;
    transition: color 0.3s;
}

.reviews-cta a:hover {
    color: white;
}

/* Contact Form Section */
#contact {
    background-color: var(--primary-color);
    color: var(--text-light);
}

#contact h2 {
    color: var(--text-light);
}

#contact p {
    margin-bottom: 20px;
}

#rescueForm {
    max-width: 500px;
    margin: 0 auto;
    background-color: var(--text-light);
    padding: 30px;
    border-radius: 10px;
    box-shadow: var(--shadow-lg);
}

#rescueForm input[type="text"],
#rescueForm input[type="tel"],
#rescueForm select,
#rescueForm textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 2px solid var(--border-color);
    border-radius: 5px;
    font-size: 1em;
    font-family: inherit;
    transition: border-color 0.3s, box-shadow 0.3s;
}

#rescueForm input:focus,
#rescueForm select:focus,
#rescueForm textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.1);
}

#rescueForm input.valid,
#rescueForm select.valid,
#rescueForm textarea.valid {
    border-color: var(--success-color);
}

#rescueForm input.invalid,
#rescueForm select.invalid,
#rescueForm textarea.invalid {
    border-color: var(--error-color);
}

#rescueForm button {
    background-color: var(--accent-color);
    color: var(--text-light);
    border: none;
    padding: 15px 25px;
    border-radius: 5px;
    font-size: 1.1em;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.3s, transform 0.2s;
    position: relative;
    min-height: 50px;
}

#rescueForm button:hover:not(:disabled) {
    background-color: #e65c00;
    transform: translateY(-2px);
}

#rescueForm button:focus {
    outline: 3px solid var(--text-light);
    outline-offset: 2px;
}

#rescueForm button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#rescueForm button.loading {
    pointer-events: none;
}

.btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--text-light);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

#formMessage {
    margin-top: 15px;
    font-weight: 700;
    padding: 10px;
    border-radius: 5px;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-hidden {
    display: none;
}

/* Footer */
footer {
    background-color: var(--text-dark);
    color: #ccc;
    text-align: center;
    padding: 20px 5%;
    font-size: 0.9em;
    margin-top: auto;
}

footer a {
    color: var(--accent-color);
    text-decoration: none;
    transition: color 0.3s;
}

footer a:hover,
footer a:focus {
    color: #ff8533;
    text-decoration: underline;
    outline: none;
}

footer nav {
    margin: 10px 0;
}

/* Media Queries */
@media (min-width: 768px) {
    #hero h1 {
        font-size: 3.5em;
    }

    .slogan {
        font-size: 1.8em;
    }

    .service-list {
        grid-template-columns: repeat(2, 1fr);
    }

    .service-item.featured-service-item {
        grid-column: 1 / -1;
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (min-width: 1024px) {
    .service-list {
        grid-template-columns: repeat(4, 1fr);
    }

    .service-item.featured-service-item {
        grid-column: auto;
    }
}

@media (max-width: 767px) {
    #hero {
        padding: 60px 5%;
        min-height: 400px;
    }

    #hero h1 {
        font-size: 2em;
    }

    .slogan {
        font-size: 1.2em;
    }

    .time {
        font-size: 1.2em;
        padding: 8px 16px;
    }

    .tyre-icon-large {
        width: 80px;
        height: 80px;
    }

    .hero-badges {
        flex-direction: column;
        align-items: center;
    }

    .badge {
        font-size: 0.8em;
    }

    .featured-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .featured-content h2 {
        font-size: 2em;
    }

    .tyre-animation {
        max-width: 300px;
    }

    .service-list {
        grid-template-columns: 1fr;
    }

    .service-item.featured-service-item {
        transform: scale(1);
    }

    .service-item.featured-service-item:hover {
        transform: translateY(-5px);
    }

    header {
        flex-direction: column;
        gap: 10px;
    }

    .logo {
        font-size: 1em;
    }
}

/* Print Styles */
@media print {
    header,
    footer,
    #contact,
    .cta-whatsapp,
    .call-now {
        display: none;
    }

    body {
        background: white;
        color: black;
    }

    #hero {
        background: white;
        color: black;
        padding: 20px;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    :root {
        --border-color: #000;
    }

    #rescueForm input,
    #rescueForm select,
    #rescueForm textarea {
        border-width: 3px;
    }
}
