/* Custom Styles for AMAL JAYA Website */

:root {
    --primary-color: #0d6efd;
    --secondary-color: #198754;
    --dark-color: #212529;
}

body {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    line-height: 1.7;
    letter-spacing: 0.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    padding-top: 76px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.3) 0%, rgba(118, 75, 162, 0.3) 50%, rgba(240, 147, 251, 0.3) 100%);
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    min-height: 100vh;
    position: relative;
}

/* Background image overlay - will be set dynamically via inline style */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
    opacity: 0.7;
    transition: opacity 0.3s ease, background-size 0.3s ease, background-position 0.3s ease;
    will-change: transform;
}

/* Responsive Background for Desktop (Computer) - Default */
@media (min-width: 1024px) {
    body::before {
        background-attachment: fixed;
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        opacity: 0.7;
        position: fixed;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    body {
        background-attachment: fixed;
        position: relative;
    }
}

/* Responsive Background for Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    body::before {
        background-attachment: scroll;
        background-size: cover;
        background-position: center center;
        background-repeat: no-repeat;
        opacity: 0.6;
        position: fixed;
        height: 100%;
        min-height: 100vh;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    body {
        background-attachment: scroll;
        position: relative;
    }
}

/* Responsive Background for Mobile (Handphone) */
@media (max-width: 767px) {
    body::before {
        background-attachment: scroll;
        background-size: cover;
        background-position: center top;
        background-repeat: no-repeat;
        opacity: 0.5;
        position: fixed;
        height: 100%;
        min-height: 100vh;
        width: 100%;
        left: 0;
        top: 0;
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
    }
    
    body {
        background-attachment: scroll;
        position: relative;
    }
}

/* Extra small devices (very small phones) */
@media (max-width: 480px) {
    body::before {
        background-size: cover;
        background-position: center center;
        opacity: 0.4;
    }
}

/* Navigation */
.navbar {
    background: rgba(13, 110, 253, 0.2) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #000000 !important;
}

.navbar-nav .nav-link {
    color: #000000 !important;
    font-weight: 500;
    letter-spacing: 0.01em;
    transition: all 0.3s ease;
}

.navbar-nav .nav-link:hover {
    color: #000000 !important;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
}

/* Hero Section */
.hero-section {
    background: rgba(102, 126, 234, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 500px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.1);
}

.hero-content {
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.3;
    color: #000000 !important;
    text-shadow: none;
}

.hero-content p {
    font-weight: 400;
    line-height: 1.8;
    letter-spacing: 0.01em;
    color: #000000 !important;
    text-shadow: none;
}

.hero-content .btn {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #000000;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: all 0.3s ease;
}

.hero-content .btn:hover {
    background: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

/* Section Titles */
.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    line-height: 1.3;
    color: #000000 !important;
    margin-bottom: 1rem;
    text-shadow: none;
}

.title-underline {
    width: 80px;
    height: 4px;
    background: rgba(255, 255, 255, 0.8);
    margin: 0 auto 2rem;
    border-radius: 2px;
}

/* Sections */
section {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    margin: 20px 0;
    padding: 40px 0 !important;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

section.bg-light {
    background: rgba(255, 255, 255, 0.08) !important;
}

section h3,
section h4 {
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.4;
    color: #000000 !important;
    text-shadow: none;
}

section p.text-muted {
    color: #000000 !important;
    opacity: 0.8;
    line-height: 1.8;
    letter-spacing: 0.01em;
}

/* Photo Cards */
.photo-card {
    transition: transform 0.3s ease;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 10px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.photo-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
}

.photo-card img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 10px;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.photo-card:hover img {
    opacity: 0.9;
    transform: scale(1.02);
}

.placeholder-photo {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 3rem;
    text-align: center;
    color: #000000 !important;
}

/* Product Cards */
.product-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 0;
}

.product-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 12px 40px 0 rgba(31, 38, 135, 0.5);
    background: rgba(255, 255, 255, 0.12);
}

.product-card[style*="cursor: pointer"] {
    cursor: pointer !important;
}

.clickable-image {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.clickable-image:hover {
    opacity: 0.9;
    transform: scale(1.02);
}

.product-card .card-body {
    background: rgba(255, 255, 255, 0.05);
    color: #000000 !important;
    padding: 0.75rem;
}

.product-card .card-title {
    font-weight: 700;
    letter-spacing: 0.01em;
    line-height: 1.3;
    color: #000000 !important;
    text-shadow: none;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.product-card .card-text {
    color: #000000 !important;
    opacity: 0.8;
    line-height: 1.5;
    letter-spacing: 0.01em;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.product-card .text-primary {
    color: #000000 !important;
    font-weight: bold;
    text-shadow: none;
    font-size: 0.9rem;
    margin-bottom: 0;
}

.product-image {
    height: 180px;
    object-fit: cover;
}

.product-placeholder {
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #000000 !important;
}

.product-card .card-footer {
    background: rgba(255, 255, 255, 0.05) !important;
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    padding: 0.5rem;
}

.product-card .card-footer .btn {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem;
}

.carousel-control-prev,
.carousel-control-next {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.3);
    opacity: 0.8;
}

.carousel-control-prev-icon,
.carousel-control-next-icon {
    width: 12px;
    height: 12px;
}

.carousel-control-prev:hover,
.carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.5);
}

.carousel-control-prev {
    left: 10px;
}

.carousel-control-next {
    right: 10px;
}

/* Social Media Links */
.social-media-links {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.social-link {
    min-width: 150px;
    text-align: left;
    background: rgba(255, 255, 255, 0.2) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #000000 !important;
    transition: all 0.3s ease;
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    color: #000000 !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.social-link i {
    margin-right: 8px;
}

/* Map */
#map {
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
    border: 1px solid rgba(255, 255, 255, 0.18);
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    min-height: 400px;
    z-index: 1;
}

#map .leaflet-container {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 10px;
}

#map .leaflet-popup-content-wrapper {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 10px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

#map .leaflet-popup-content {
    margin: 15px;
    color: #000000;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

#map .leaflet-popup-content strong {
    font-weight: 700;
    color: #000000;
}

#map .leaflet-control-zoom {
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 5px;
}

#map .leaflet-control-zoom a {
    background: rgba(255, 255, 255, 0.9);
    color: #000000;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

#map .leaflet-control-zoom a:hover {
    background: rgba(255, 255, 255, 1);
}

/* Links */
a {
    color: #000000 !important;
    transition: all 0.3s ease;
}

a:hover {
    color: #000000 !important;
    opacity: 0.8;
}

/* Footer */
footer {
    background: rgba(33, 37, 41, 0.2) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.18);
    box-shadow: 0 -8px 32px 0 rgba(31, 38, 135, 0.37);
    color: #000000 !important;
}

footer a {
    color: #000000 !important;
}

footer a:hover {
    color: #000000 !important;
    opacity: 0.8;
}

/* Admin Styles */
.admin-sidebar {
    min-height: 100vh;
    background: rgba(52, 58, 64, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
    border-right: 1px solid rgba(255, 255, 255, 0.18);
}

.admin-sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 10px 20px;
    border-radius: 5px;
    margin: 5px 0;
    transition: all 0.3s ease;
}

.admin-sidebar .nav-link:hover,
.admin-sidebar .nav-link.active {
    background: rgba(13, 110, 253, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: white;
}

.admin-content {
    padding: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* Forms */
.form-control {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #000000 !important;
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 400;
    letter-spacing: 0.01em;
}

.form-control::placeholder {
    color: rgba(0, 0, 0, 0.6) !important;
}

.form-control:focus {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
    color: #000000 !important;
}

.btn-primary {
    background: rgba(13, 110, 253, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #000000 !important;
}

.btn-primary:hover {
    background: rgba(13, 110, 253, 0.5);
    border-color: rgba(255, 255, 255, 0.5);
    color: #000000 !important;
}

.btn-success {
    background: rgba(25, 135, 84, 0.3) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    color: #000000 !important;
}

.btn-success:hover {
    background: rgba(25, 135, 84, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    color: #000000 !important;
}

.btn-outline-primary {
    border-color: rgba(255, 255, 255, 0.3);
    color: #000000 !important;
}

.btn-outline-primary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    color: #000000 !important;
}

/* Container adjustments */
.container {
    position: relative;
    z-index: 1;
}

/* Typography improvements for all text elements */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    letter-spacing: 0.02em;
    line-height: 1.3;
}

p {
    line-height: 1.7;
    letter-spacing: 0.01em;
}

a {
    font-weight: 500;
    letter-spacing: 0.01em;
}

button, .btn {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 600;
    letter-spacing: 0.01em;
}

/* Responsive */
@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
        letter-spacing: 0.02em;
    }
    
    .hero-section {
        min-height: 400px;
    }
    
    .product-image {
        height: 150px;
    }
    
    .product-placeholder {
        height: 150px;
    }
    
    .product-card .card-title {
        font-size: 0.9rem;
    }
    
    .product-card .card-text {
        font-size: 0.8rem;
    }
    
    .product-card .text-primary {
        font-size: 0.85rem;
    }
    
    section {
        margin: 10px 0;
        padding: 20px 0 !important;
        border-radius: 10px;
    }
    
    body {
        line-height: 1.6;
    }
}

/* Extra small devices */
@media (max-width: 576px) {
    .product-image {
        height: 120px;
    }
    
    .product-placeholder {
        height: 120px;
    }
    
    .product-card .card-body {
        padding: 0.5rem;
    }
    
    .product-card .card-title {
        font-size: 0.85rem;
    }
    
    .product-card .card-text {
        font-size: 0.75rem;
        -webkit-line-clamp: 1;
        line-clamp: 1;
    }
    
    .product-card .text-primary {
        font-size: 0.8rem;
    }
    
    .product-card .card-footer .btn {
        font-size: 0.75rem;
        padding: 0.3rem 0.5rem;
    }
}

/* Medium devices */
@media (min-width: 768px) and (max-width: 991px) {
    .product-image {
        height: 160px;
    }
    
    .product-placeholder {
        height: 160px;
    }
}

/* Large devices */
@media (min-width: 992px) and (max-width: 1199px) {
    .product-image {
        height: 170px;
    }
    
    .product-placeholder {
        height: 170px;
    }
}

/* Extra large devices */
@media (min-width: 1200px) {
    .product-image {
        height: 180px;
    }
    
    .product-placeholder {
        height: 180px;
    }
}

/* Smooth Scroll */
html {
    scroll-behavior: smooth;
}

/* Loading Spinner */
.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* Modal Styles */
.modal-content {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 15px;
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

.modal-header {
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    color: #000000;
}

.modal-title {
    color: #000000 !important;
    font-weight: 700;
}

.modal-body {
    color: #000000;
}

.modal-footer {
    border-top: 1px solid rgba(0, 0, 0, 0.1);
}

#photoLightboxModal .modal-content {
    background: rgba(0, 0, 0, 0.95);
}

#photoLightboxModal .carousel-control-prev,
#photoLightboxModal .carousel-control-next {
    background: rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#photoLightboxModal .carousel-control-prev:hover,
#photoLightboxModal .carousel-control-next:hover {
    background: rgba(255, 255, 255, 0.5);
}

#productDetailCarousel .carousel-control-prev,
#productDetailCarousel .carousel-control-next {
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#productDetailCarousel .carousel-control-prev:hover,
#productDetailCarousel .carousel-control-next:hover {
    background: rgba(0, 0, 0, 0.5);
}

