/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2563eb;
    --primary-hover: #1d4ed8;
    --secondary-color: #64748b;
    --text-color: #1e293b;
    --text-light: #64748b;
    --bg-color: #ffffff;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.4;
    color: var(--text-color);
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 10px;
    margin: 0;
}

.container {
    max-width: 900px;
    margin: 0 auto;
    background: var(--bg-color);
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Header */
header {
    position: relative;
    background: transparent;
    color: #1e293b;
    padding: 8px 20px;
    overflow: hidden;
}

.header-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0.6;
    z-index: 0;
    display: none;
    transition: opacity 0.3s ease;
}

.header-background.loaded {
    display: block;
}

/* Overlay to ensure text readability (optional - removed blue overlay) */
.header-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.1); /* Very light white overlay for subtle effect */
    z-index: -1;
}

.header-images-left,
.header-images-right {
    position: absolute;
    top: 0;
    height: 100%;
    width: auto;
    z-index: 1;
    display: flex;
    align-items: center;
    pointer-events: none;
}

.header-images-left {
    left: 0;
}

.header-images-right {
    right: 0;
}

.header-decoration-image {
    max-height: 100%;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.3;
    display: none;
}

.header-decoration-image.loaded {
    display: block;
}

.header-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    z-index: 2;
    width: 100%;
}

.logo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    text-align: center;
}

.header-contact {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 4px;
    width: 100%;
}

.header-contact-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(255, 255, 255, 0.4);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.header-contact-item:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: translateY(-1px);
}

.header-contact .contact-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.header-contact-link {
    color: #1e293b;
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.header-contact-link:hover {
    color: #0f172a;
    text-decoration: underline;
}

.logo-container {
    position: relative;
    flex-shrink: 0;
}

.logo-image {
    max-width: 120px;
    max-height: 120px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: none;
}

.logo-image.loaded {
    display: block;
}

.logo-fallback {
    width: 120px;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    border: 2px solid rgba(30, 41, 59, 0.2);
}

.logo-fallback.hidden {
    display: none;
}

.logo-placeholder {
    font-size: 2.2rem;
    font-weight: 700;
    color: #1e293b;
    text-align: center;
}

.logo-section .slogan {
    font-size: 0.9rem;
    margin: 0;
    margin-top: 2px;
    opacity: 0.9;
    font-weight: 400;
    font-style: italic;
    color: #334155;
    text-align: center;
    white-space: nowrap;
}

/* Main Content */
main {
    flex: 1;
    padding: 15px 20px;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 0;
}

.welcome-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-color);
    margin-bottom: 10px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-message {
    font-size: 1rem;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.5;
}

/* QR Section */
.qr-section {
    margin-top: 0;
}

.qr-section-title {
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-color);
    margin-bottom: 5px;
}

.qr-section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.qr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.qr-card {
    background: var(--bg-light);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid var(--border-color);
}

.qr-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-color);
}

.qr-image-container {
    position: relative;
    width: 150px;
    height: 150px;
    margin: 0 auto 12px;
    background: white;
    border-radius: 8px;
    padding: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow);
}

.qr-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: none;
}

.qr-image.loaded {
    display: block;
}

.qr-fallback {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: var(--text-light);
    font-size: 0.75rem;
    text-align: center;
    padding: 10px;
}

.qr-fallback.hidden {
    display: none;
}

.fallback-text {
    font-size: 0.65rem;
    margin-top: 5px;
    color: var(--secondary-color);
}

.qr-label {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.qr-link {
    display: inline-block;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 6px 16px;
    border: 2px solid var(--primary-color);
    border-radius: 6px;
    transition: all 0.3s ease;
}

.qr-link:hover {
    background: var(--primary-color);
    color: white;
    transform: scale(1.05);
}

.qr-link:active {
    transform: scale(0.98);
}

/* Advertisements Section */
.advertisements-section {
    margin-top: 0;
    padding: 0;
    margin-bottom: 30px;
    background: transparent;
    border-radius: 0;
    border: none;
}

.service-portal-section,
.contact-section {
    margin-top: 0;
    padding: 15px 10px;
    background: var(--bg-light);
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.section-title {
    font-size: 1.3rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-color);
    margin-bottom: 15px;
}

.advertisements-container {
    position: relative;
    min-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: white;
    border-radius: 0;
    padding: 0;
    overflow: visible;
    width: 100%;
}

.ad-placeholder {
    text-align: center;
    color: var(--text-light);
    padding: 10px;
}

.ad-placeholder p {
    margin: 3px 0;
    font-size: 0.8rem;
}

.placeholder-text {
    font-size: 0.7rem !important;
    color: var(--secondary-color) !important;
}

.ad-slideshow {
    display: none;
    width: 100%;
    max-width: 100%;
}

.ad-slideshow.active {
    display: block;
}

.ad-slideshow img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0;
    display: block;
    margin: 0;
}

/* Service Portal Section */
.service-portal-section {
    margin-top: 30px;
    padding: 20px;
    background: linear-gradient(135deg, var(--bg-light) 0%, white 100%);
    border-radius: 10px;
    border: 2px solid var(--border-color);
}

.service-portal-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 10px 0;
}

.service-portal-content {
    text-align: center;
    max-width: 500px;
    width: 100%;
}

.service-portal-icon {
    font-size: 3rem;
    margin-bottom: 10px;
}

.service-portal-label {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.service-portal-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 20px;
    line-height: 1.5;
}

.service-portal-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-hover) 100%);
    color: white;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    padding: 12px 30px;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow);
    border: 2px solid transparent;
}

.service-portal-button:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    background: linear-gradient(135deg, var(--primary-hover) 0%, var(--primary-color) 100%);
}

.service-portal-button:active {
    transform: translateY(0);
    box-shadow: var(--shadow);
}

/* Contact Section */
.contact-section {
    margin-top: 20px;
}

.contact-info {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    flex-wrap: wrap;
    padding: 10px 0;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
}

.contact-item:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.contact-icon {
    font-size: 1.3rem;
    flex-shrink: 0;
}

.contact-link {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    white-space: nowrap;
}

.contact-link:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

/* Footer */
footer {
    background: var(--bg-light);
    padding: 30px 20px 15px;
    color: var(--text-light);
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto 25px;
    text-align: left;
}

.footer-section {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 8px 0;
}

.footer-address-text {
    color: var(--text-light);
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.service-icons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-item {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 12px;
    text-align: left;
    width: 100%;
    padding: 12px 15px;
    background: white;
    border-radius: 8px;
    border: 2px solid var(--border-color);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
}

.service-item:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    background: var(--bg-light);
}

.service-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    min-width: 40px;
    background: white;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.service-item:hover .service-icon {
    border-color: var(--primary-color);
    background: var(--primary-color);
    color: white;
}

.service-label {
    font-size: 0.95rem;
    color: var(--text-color);
    font-weight: 500;
    white-space: nowrap;
}

.service-item:hover .service-label {
    color: var(--primary-color);
}

.service-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 6px;
}

.google-map-container {
    width: 100%;
    height: 200px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid var(--border-color);
    background: var(--bg-color);
}

.google-map-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    margin-top: 20px;
}

.footer-bottom p {
    margin: 4px 0;
}

footer a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

footer a:hover {
    color: var(--primary-hover);
    text-decoration: underline;
}

.footer-powered {
    font-size: 0.8rem;
    opacity: 0.9;
    margin-top: 6px !important;
}

/* WhatsApp Chatbot */
.whatsapp-chatbot {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 100;
}

.whatsapp-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    background: #25D366;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(37, 211, 102, 0.4);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.whatsapp-button:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(37, 211, 102, 0.6);
    background: #20BA5A;
}

.whatsapp-button:active {
    transform: scale(0.95);
}

.whatsapp-icon {
    width: 24px;
    height: 24px;
    fill: white;
}

.whatsapp-tooltip {
    position: absolute;
    bottom: 55px;
    right: 50%;
    transform: translateX(50%);
    background: #333;
    color: white;
    padding: 5px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
}

.whatsapp-button:hover .whatsapp-tooltip {
    opacity: 1;
}

/* WhatsApp pulse animation */
@keyframes whatsapp-pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

.whatsapp-button {
    animation: whatsapp-pulse 2s infinite;
}

/* Responsive Design */
@media (max-width: 768px) {
    body {
        padding: 5px;
    }

    header {
        padding: 6px 15px;
    }
    
    .header-decoration-image {
        max-width: 120px;
        opacity: 0.2;
    }
    
    .header-content {
        gap: 10px;
        flex-direction: column;
    }
    
    .logo-section {
        order: 1;
    }
    
    .header-contact {
        order: 2;
        margin-top: 0;
    }
    
    .header-contact {
        gap: 8px;
        margin-top: 4px;
    }
    
    .header-contact-item {
        padding: 4px 10px;
    }
    
    .header-contact-link {
        font-size: 0.95rem;
    }
    
    .header-contact .contact-icon {
        font-size: 1.1rem;
    }
    
    .logo-image {
        max-width: 120px;
        max-height: 120px;
    }
    
    .logo-fallback {
        width: 120px;
        height: 120px;
    }
    
    .logo-placeholder {
        font-size: 2.2rem;
    }
    
    .logo-section .slogan {
        font-size: 0.85rem;
        margin-top: 6px;
    }

    main {
        padding: 15px 20px;
    }

    .welcome-title {
        font-size: 1.5rem;
    }

    .welcome-message {
        font-size: 0.9rem;
    }

    .qr-section-title {
        font-size: 1.1rem;
    }

    .qr-section-subtitle {
        font-size: 0.85rem;
        margin-bottom: 15px;
    }

    .qr-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .qr-image-container {
        width: 130px;
        height: 130px;
    }
    
    .advertisements-section {
        margin-top: 0;
        padding: 0;
        margin-bottom: 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
        text-align: center;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .google-map-container {
        height: 150px;
    }
    
    .service-icons {
        align-items: stretch;
    }
    
    .service-item {
        justify-content: center;
        text-align: center;
        width: 100%;
    }
    
    footer {
        padding: 20px 15px 12px;
    }
    
    .service-portal-section,
    .contact-section {
        margin-top: 0;
        padding: 12px 8px;
    }
    
    .section-title {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .service-portal-icon {
        font-size: 2.5rem;
    }
    
    .service-portal-label {
        font-size: 1.3rem;
    }
    
    .service-portal-description {
        font-size: 0.9rem;
    }
    
    .service-portal-button {
        font-size: 0.9rem;
        padding: 10px 25px;
    }
    
    .advertisements-container {
        min-height: 80px;
        padding: 0;
    }
    
    .ad-slideshow img {
        height: 150px;
        width: 100%;
        object-fit: cover;
    }
    
    .ad-placeholder {
        padding: 8px;
    }
    
    .ad-placeholder p {
        font-size: 0.75rem;
        margin: 2px 0;
    }
    
    .placeholder-text {
        font-size: 0.65rem !important;
    }
    
    .contact-info {
        gap: 15px;
        flex-direction: column;
    }
    
    .contact-item {
        width: 100%;
        justify-content: center;
        padding: 10px 15px;
    }
    
    .contact-link {
        font-size: 0.9rem;
    }

    footer {
        padding: 20px 15px 12px;
        font-size: 0.8rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .footer-section {
        text-align: center;
    }
    
    .google-map-container {
        height: 180px;
    }
    
    .service-icons {
        align-items: stretch;
    }
    
    .service-item {
        justify-content: center;
        text-align: center;
        width: 100%;
    }
    
    .whatsapp-button {
        width: 40px;
        height: 40px;
    }
    
    .whatsapp-icon {
        width: 22px;
        height: 22px;
    }
    
    .whatsapp-tooltip {
        font-size: 0.65rem;
        padding: 4px 6px;
        bottom: 50px;
    }
}

@media (max-width: 480px) {
    .header-decoration-image {
        max-width: 80px;
        opacity: 0.15;
    }
    
    .header-content {
        flex-direction: column;
        gap: 10px;
    }
    
    .logo-section {
        order: 1;
        gap: 6px;
    }
    
    .header-contact {
        order: 2;
        margin-top: 0;
    }
    
    .header-contact {
        flex-direction: column;
        gap: 6px;
        width: 100%;
    }
    
    .header-contact-item {
        width: 100%;
        justify-content: center;
        padding: 5px 12px;
    }
    
    .header-contact-link {
        font-size: 0.85rem;
    }
    
    .header-contact .contact-icon {
        font-size: 1rem;
    }
    
    .logo-image {
        max-width: 110px;
        max-height: 110px;
    }
    
    .logo-fallback {
        width: 110px;
        height: 110px;
    }
    
    .logo-placeholder {
        font-size: 2rem;
    }
    
    .logo-section .slogan {
        font-size: 0.8rem;
        margin-top: 5px;
    }

    .welcome-title {
        font-size: 1.3rem;
    }

    .qr-image-container {
        width: 120px;
        height: 120px;
    }
    
    .footer-content {
        gap: 15px;
        margin-bottom: 15px;
    }
    
    .footer-section-title {
        font-size: 1rem;
    }
    
    .google-map-container {
        height: 150px;
    }
    
    .service-icon {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
    }
}
