/* Custom CSS for Plinglish Website */

/* Global Styles */

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--bs-body-color);
}

/* Typography */
.display-4 {
    font-weight: 700;
}

.lead {
    font-size: 1.5rem;
    font-weight: 400;
}

/* Header paragraph styling - only apply to header paragraph, not all mb-0 elements */
.banner-content .mb-0 {
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.6;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

/* Site logo in navbar */
.site-logo {
    height: 36px;
    width: auto;
    display: block;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: rgba(255, 255, 255, 0.8) !important;
}

/* Language Flag Buttons */
.language-switcher {
    z-index: 1030;
}

.language-flag {
    display: inline-block;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    background: rgba(255, 255, 255, 0.15);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.language-flag:hover {
    background: rgba(255, 255, 255, 0.25);
    transform: scale(1.15);
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.language-flag.active {
    border-color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.3);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.flag-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Hero Section */
.banner-container {
    position: relative;
    background-size: cover; /* stretch to full width within margins */
    background-position: center center; /* center of the page */
    background-repeat: no-repeat; /* show image only once */
    margin-left: 1rem;
    margin-right: 1rem;
    min-height: 320px;
}

/* faint the image via scrim, keep text fully opaque */
.banner-scrim {
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.80); /* 20% image visibility */
}

.banner-content {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    padding: 3rem 0; /* vertical breathing room while staying within image */
}
.hero-section {
    background: none;
    min-height: 80vh;
    display: flex;
    align-items: center;
}

.hero-image {
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

/* Cards */
.card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 15px;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15) !important;
}

.service-card {
    border-left: 4px solid var(--bs-primary);
}

/* Feature Icons */
.feature-icon, .service-icon, .value-icon {
    transition: transform 0.3s ease;
}

.card:hover .feature-icon,
.card:hover .service-icon,
.card:hover .value-icon {
    transform: scale(1.1);
}

/* Stats Cards */
.stat-card {
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

/* Team Cards */
.team-card {
    transition: transform 0.3s ease;
}

.team-card:hover {
    transform: translateY(-5px);
}

.avatar-placeholder {
    transition: transform 0.3s ease;
}

.team-card:hover .avatar-placeholder {
    transform: scale(1.05);
}

/* Contact Section */
.contact-item {
    transition: transform 0.3s ease;
}

.contact-item:hover {
    transform: translateX(10px);
}

.contact-icon {
    transition: transform 0.3s ease;
}

.contact-item:hover .contact-icon {
    transform: scale(1.1);
}

/* Buttons */
.btn {
    border-radius: 25px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1rem;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Process Steps */
.process-number {
    transition: transform 0.3s ease;
}

.process-step:hover .process-number {
    transform: scale(1.1);
}

/* Form Styles */
.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--bs-primary);
    box-shadow: 0 0 0 0.2rem rgba(var(--bs-primary-rgb), 0.25);
}

/* Accordion */
.accordion-button {
    border-radius: 10px;
    font-weight: 500;
}

.accordion-button:not(.collapsed) {
    background-color: var(--bs-primary);
    color: white;
}

/* Footer */
footer {
    background: var(--bs-primary) !important;
}

/* Section text content - ensure it can expand to fit all content */
.section-text-content {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
    min-height: 1em;
    overflow: visible !important;
    max-width: none !important;
    width: auto !important;
}

/* Ensure no text truncation in sections */
.section-text-content * {
    overflow: visible !important;
    max-width: none !important;
}

/* Remove any Bootstrap column constraints that might truncate text */
.col-md-9 .section-text-content,
.col-md-6 .section-text-content,
.col-md-4 .section-text-content {
    width: 100% !important;
    max-width: none !important;
    overflow: visible !important;
}

/* Force all text containers to show full content */
.card-body {
    overflow: visible !important;
}

.card {
    overflow: visible !important;
}

/* Ensure no text is hidden by any container */
.section-text-content,
.section-text-content *,
.card-body,
.card {
    text-overflow: unset !important;
    white-space: normal !important;
    overflow: visible !important;
    max-height: none !important;
    height: auto !important;
}

/* Ensure cards can expand to fit content */
.card {
    height: auto !important;
    min-height: fit-content;
}

.card-body {
    height: auto !important;
    min-height: fit-content;
}

/* Remove any height constraints from multi-column cards */
.h-100 {
    height: auto !important;
}

.social-links a {
    transition: transform 0.3s ease, color 0.3s ease;
}

.social-links a:hover {
    transform: translateY(-3px);
    color: var(--bs-primary) !important;
}

/* Map Container */
.map-container {
    border-radius: 15px;
    overflow: hidden;
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-section {
        min-height: 60vh;
        text-align: center;
        padding: 2rem 0;
    }
    
    .display-4 {
        font-size: 2.5rem;
    }
    
    .btn-lg {
        padding: 10px 25px;
        font-size: 0.9rem;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    /* Mobile navigation improvements */
    .navbar-nav {
        text-align: center;
        padding: 1rem 0;
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Mobile language flags */
    .language-switcher {
        margin-right: 0.5rem !important;
    }
    
    .language-flag {
        padding: 8px;
        margin: 0 3px;
    }
    
    .flag-icon {
        width: 36px;
        height: 27px;
    }
    
    /* Mobile form improvements */
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 12px 15px;
    }
    
    /* Mobile button improvements */
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
    }
    
    .btn + .btn {
        margin-left: 0;
    }
    
    /* Mobile card improvements */
    .card {
        margin-bottom: 1.5rem;
    }
    
    /* Mobile contact form */
    .contact-item {
        margin-bottom: 2rem;
    }
    
    /* Mobile stats */
    .stat-card {
        margin-bottom: 1rem;
    }
    
    /* Mobile team cards */
    .team-card {
        margin-bottom: 2rem;
    }
    
    /* Mobile process steps */
    .process-step {
        margin-bottom: 2rem;
    }
    
    /* Mobile FAQ */
    .accordion-button {
        font-size: 0.9rem;
        padding: 1rem;
    }
    
    /* Mobile footer */
    footer .social-links {
        text-align: center;
        margin-top: 1rem;
    }
    
    footer .social-links a {
        margin: 0 0.5rem;
    }
}

@media (max-width: 576px) {
    .hero-section {
        min-height: 50vh;
        padding: 1.5rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
        line-height: 1.2;
    }
    
    .lead {
        font-size: 1.3rem;
    }
    
    /* Mobile header paragraph */
    .banner-content .mb-0 {
        font-size: 1.3rem;
    }
    
    .btn-lg {
        padding: 8px 20px;
        font-size: 0.85rem;
    }
    
    /* Extra small mobile improvements */
    .container {
        padding-left: 15px;
        padding-right: 15px;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    /* Mobile hero buttons */
    .hero-section .btn {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
    }
    
    /* Mobile navigation brand */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    /* Mobile header adjustments */
    .brand-logo {
        height: 50px !important;
        width: auto;
    }
    
    .navbar {
        padding: 0.15rem 0 !important;
        min-height: auto !important;
    }
    
    .navbar-brand {
        font-size: 0.8rem !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Make site name text larger on mobile but keep it visible */
    .site-name {
        display: inline !important;
    }
    
    .brand-title {
        font-size: 2.5rem !important;
        line-height: 0.9 !important;
    }
    
    .brand-sub {
        font-size: 1.1rem !important;
        line-height: 0.8 !important;
    }
    
    /* Make navbar container more compact */
    .navbar .container {
        padding: 0 10px !important;
    }
    
    /* Reduce navbar height */
    .navbar-expand-lg {
        min-height: 40px !important;
    }
    
    /* Adjust hamburger menu for mobile */
    .navbar-toggler {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.875rem !important;
        border: none !important;
    }
    
    /* Reduce spacing around navbar elements */
    .navbar .d-flex {
        gap: 0.25rem !important;
    }
    
    /* Mobile language switcher adjustments */
    .language-switcher {
        margin-right: 0.25rem !important;
    }
    
    .language-flag {
        padding: 6px;
    }
    
    .flag-icon {
        width: 32px;
        height: 24px;
    }
    
    /* Mobile form spacing */
    .form-label {
        margin-bottom: 0.5rem;
        font-weight: 500;
    }
    
    /* Mobile contact info */
    .contact-info h3 {
        font-size: 1.5rem;
        margin-bottom: 1.5rem;
    }
    
    /* Mobile map container */
    .map-container {
        height: 300px !important;
    }
    
    /* Mobile accordion */
    .accordion-item {
        margin-bottom: 0.5rem;
    }
    
    /* Mobile stats */
    .stat-item h2 {
        font-size: 2.5rem;
    }
    
    /* Mobile team avatars */
    .avatar-placeholder {
        width: 80px !important;
        height: 80px !important;
    }
    
    .avatar-placeholder i {
        font-size: 2rem !important;
    }
}

/* Tablet specific improvements */
@media (min-width: 577px) and (max-width: 991px) {
    .hero-section {
        min-height: 70vh;
    }
    
    .display-4 {
        font-size: 3rem;
    }
    
    .btn-lg {
        padding: 12px 25px;
    }
    
    /* Tablet navigation */
    .navbar-nav .nav-link {
        padding: 0.5rem 1rem;
    }
    
    /* Tablet cards */
    .card-body {
        padding: 2rem;
    }
    
    /* Tablet contact form */
    .contact-item {
        margin-bottom: 1.5rem;
    }
}

/* Touch device improvements */
@media (hover: none) and (pointer: coarse) {
    /* Larger touch targets */
    .btn {
        min-height: 44px;
        padding: 12px 20px;
    }
    
    .nav-link {
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .form-control, .form-select {
        min-height: 44px;
    }
    
    /* Touch-friendly language flags */
    .language-flag {
        min-width: 50px;
        min-height: 50px;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 10px;
    }
    
    .flag-icon {
        width: 40px;
        height: 30px;
    }
    
    /* Disable hover effects on touch devices */
    .card:hover {
        transform: none;
    }
    
    .btn:hover {
        transform: none;
    }
    
    .contact-item:hover {
        transform: none;
    }
    
    .team-card:hover {
        transform: none;
    }
    
    .stat-card:hover {
        transform: none;
    }
    
    .process-step:hover .process-number {
        transform: none;
    }
    
    .feature-icon, .service-icon, .value-icon {
        transition: none;
    }
    
    .card:hover .feature-icon,
    .card:hover .service-icon,
    .card:hover .value-icon {
        transform: none;
    }
    
    .contact-item:hover .contact-icon {
        transform: none;
    }
    
    .team-card:hover .avatar-placeholder {
        transform: none;
    }
    
    .social-links a:hover {
        transform: none;
    }
    
    .language-flag:hover {
        transform: none;
    }
}

/* Additional mobile improvements */
@media (max-width: 480px) {
    /* Extra small mobile devices */
    .hero-section {
        padding: 1rem 0;
    }
    
    .display-4 {
        font-size: 1.75rem;
    }
    
    .h3 {
        font-size: 1.25rem;
    }
    
    .lead {
        font-size: 1.2rem;
    }
    
    /* Extra small mobile header paragraph */
    .banner-content .mb-0 {
        font-size: 1.2rem;
    }
    
    .btn-lg {
        padding: 10px 16px;
        font-size: 0.8rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
    
    .navbar-brand {
        font-size: 1.1rem;
    }
    
    /* Extra small mobile header adjustments */
    .brand-logo {
        height: 45px !important;
    }
    
    .navbar {
        padding: 0.1rem 0 !important;
        min-height: 35px !important;
    }
    
    .navbar-brand {
        font-size: 0.7rem !important;
        padding: 0 !important;
        margin: 0 !important;
    }
    
    /* Force navbar to be very compact */
    .navbar-expand-lg {
        min-height: 35px !important;
    }
    
    /* Reduce container padding */
    .navbar .container {
        padding: 0 8px !important;
    }
    
    /* Make hamburger menu even smaller */
    .navbar-toggler {
        padding: 0.15rem 0.4rem !important;
        font-size: 0.75rem !important;
    }
    
    /* Minimal spacing */
    .navbar .d-flex {
        gap: 0.15rem !important;
    }
    
    /* Keep site name visible on extra small mobile */
    .site-name {
        display: inline !important;
    }
    
    .brand-title {
        font-size: 2.2rem !important;
        line-height: 0.8 !important;
    }
    
    .brand-sub {
        font-size: 1rem !important;
        line-height: 0.7 !important;
    }
    
    /* Improve mobile form spacing */
    .form-label {
        font-size: 0.9rem;
    }
    
    .form-control, .form-select {
        font-size: 16px;
        padding: 10px 12px;
    }
    
    /* Mobile contact info */
    .contact-info h3 {
        font-size: 1.25rem;
    }
    
    .contact-item h5 {
        font-size: 1rem;
    }
    
    .contact-item p {
        font-size: 0.9rem;
    }
    
    /* Mobile stats */
    .stat-item h2 {
        font-size: 2rem;
    }
    
    .stat-item p {
        font-size: 0.9rem;
    }
    
    /* Mobile team cards */
    .team-card h4 {
        font-size: 1.1rem;
    }
    
    .team-card p {
        font-size: 0.9rem;
    }
    
    /* Mobile FAQ */
    .accordion-button {
        font-size: 0.85rem;
        padding: 0.75rem;
    }
    
    .accordion-body {
        font-size: 0.9rem;
        padding: 0.75rem;
    }
    
    /* Mobile footer */
    footer h5 {
        font-size: 1.1rem;
    }
    
    footer p {
        font-size: 0.9rem;
    }
}

/* Landscape mobile improvements */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        min-height: 40vh;
        padding: 1rem 0;
    }
    
    .display-4 {
        font-size: 2rem;
    }
    
    .lead {
        font-size: 1.1rem;
    }
    
    /* Landscape mobile header paragraph */
    .banner-content .mb-0 {
        font-size: 1.1rem;
    }
    
    .btn-lg {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 1s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in-left {
    animation: slideInLeft 0.8s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-50px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.8s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(50px); }
    to { opacity: 1; transform: translateX(0); }
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--bs-primary);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--bs-primary);
}

/* Print Styles */
@media print {
    .navbar, .footer, .btn {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .card {
        border: 1px solid #ccc;
        box-shadow: none;
    }
}

/* Active Navigation Highlighting */
.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border-radius: 8px;
    padding: 8px 16px;
    margin: 2px 4px;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link.active:hover {
    background-color: rgba(255, 255, 255, 0.3) !important;
    transform: translateY(-1px);
}

.navbar-nav .nav-link.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 3px;
    background-color: #fff;
    border-radius: 2px;
}

/* Language Button Flashing Animation for New Visitors */
@keyframes languageButtonFlash {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
        background: rgba(255, 255, 255, 0.3);
    }
}

.language-flag.flash-animation {
    animation: languageButtonFlash 1.5s ease-in-out 3;
    animation-delay: 1s; /* Start after 1 second */
}

.language-flag.flash-animation:hover {
    animation-play-state: paused;
}

/* Enhanced visibility for new visitors */
.language-flag.flash-animation {
    border: 2px solid rgba(255, 255, 255, 0.8) !important;
    background: rgba(255, 255, 255, 0.25) !important;
}

/* Add a subtle pulse effect during the flash */
.language-flag.flash-animation::after {
    content: '';
    position: absolute;
    top: -4px;
    left: -4px;
    right: -4px;
    bottom: -4px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    animation: pulse 2s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% {
        opacity: 0.6;
        transform: scale(1);
    }
    50% {
        opacity: 0.2;
        transform: scale(1.1);
    }
}

/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    animation: slideUp 0.5s ease-out;
    font-size: 0.9rem;
}

.cookie-content {
    padding: 16px 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cookie-text {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cookie-title {
    font-weight: 600;
    color: var(--bs-primary);
    font-size: 1rem;
}

.cookie-message {
    color: #6c757d;
    line-height: 1.4;
}

.cookie-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.cookie-actions .btn {
    padding: 6px 16px;
    font-size: 0.85rem;
    border-radius: 6px;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(100%);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Mobile responsive cookie banner */
@media (max-width: 576px) {
    .cookie-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: none;
    }
    
    .cookie-content {
        padding: 14px 16px;
    }
    
    .cookie-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    .cookie-actions .btn {
        width: 100%;
        padding: 8px 16px;
    }
}
