/* Custom CSS for Hamza Tesisat */

/* Fix touch scrolling on mobile devices */
html, body {
    width: 100%;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
}

body {
    touch-action: pan-y;
    -ms-touch-action: pan-y;
}

/* CSS variables */
:root {
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --dark-color: #212529;
    --light-color: #f8f9fa;
}

/* Image Optimization */
img {
    max-width: 100%;
    height: auto;
    display: block;
    transition: opacity 0.3s ease;
}

/* Lazy loading styles */
img.lazy {
    opacity: 0;
}

img.lazy.loaded {
    opacity: 1;
}

/* Prevent layout shifts during image loading */
.gallery-item img,
.service-image img,
.about-image img {
    aspect-ratio: 4/3;
    object-fit: cover;
    background-color: #f8f9fa;
    width: 100%;
    height: auto;
}

/* Logo optimization - No animations */
.navbar-brand img,
.logo-image {
    aspect-ratio: auto;
    object-fit: contain;
    opacity: 1 !important;
    transition: none !important;
    display: block !important;
    visibility: visible !important;
    animation: none !important;
    transform: none !important;
}

/* Prevent logo from disappearing */
.navbar-brand img[loading="eager"],
.logo-image {
    opacity: 1 !important;
    background-color: transparent !important;
    visibility: visible !important;
    display: block !important;
    animation: none !important;
    transform: none !important;
}

/* Mobile logo fixes - No animations */
@media (max-width: 768px) {
    .navbar-brand img,
    .logo-image {
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        height: 40px !important;
        width: auto !important;
        animation: none !important;
        transform: none !important;
        transition: none !important;
    }
    
    .navbar-brand {
        animation: none !important;
        transition: none !important;
    }
}

/* Desktop logo fixes - No animations */
@media (min-width: 769px) {
    .navbar-brand img,
    .logo-image {
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        animation: none !important;
        transform: none !important;
        transition: none !important;
    }
}

/* General Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    background-attachment: scroll;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Navigation */
.navbar {
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}

.navbar-brand {
    font-size: 1.5rem;
}

.nav-link {
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #fff !important;
}

/* Hero Section */
.hero-section {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background-attachment: scroll;
    background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('images/bg/seramik_bg.jpg');
}

/* Hero Section Typography */
.hero-title {
    font-size: 3.5rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.7);
    margin-bottom: 1.5rem;
}

.hero-subtitle {
    font-size: 1.25rem;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.7);
    margin-bottom: 2rem;
}

.hero-buttons {
    gap: 1rem;
}

.hero-btn {
    min-width: 180px;
    padding: 0.875rem 1.5rem;
    font-size: 1.1rem;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.hero-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.3);
}

/* Responsive background images */
@media (min-width: 601px) {
    .hero-section {
        background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('images/bg/seramik_bg.jpg');
        background-attachment: scroll;
    }
}

@media (min-width: 1200px) {
    .hero-section {
        background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('images/bg/seramik_bg.jpg');
        background-attachment: scroll;
    }
}

/* Mobile background fix */
@media (max-width: 600px) {
    .hero-section {
        background-attachment: scroll;
        background-image: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('images/bg/seramik_bg.jpg');
    }
    
    body {
        background-attachment: scroll;
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
    
    html {
        overflow-x: hidden;
        -webkit-overflow-scrolling: touch;
    }
}

.hero-overlay {
    background: transparent;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
}

.hero-section h1 {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

.hero-section .lead {
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

/* Service Cards */
.service-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

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

.service-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    color: white;
    font-size: 2rem;
}

.service-card h4 {
    color: var(--dark-color);
    margin-bottom: 1rem;
    text-align: center;
}

.service-card p {
    color: var(--secondary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.service-card ul li {
    margin-bottom: 0.5rem;
    color: var(--secondary-color);
}

/* About Section */
.about-image {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.about-image img {
    transition: transform 0.3s ease;
}

.about-image:hover img {
    transform: scale(1.05);
}

.achievement-item {
    text-align: center;
    padding: 1rem;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.achievement-item:hover {
    transform: translateY(-3px);
}

.achievement-item h4 {
    font-size: 2rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.achievement-item p {
    color: var(--secondary-color);
    font-weight: 500;
}

/* Gallery */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    transition: transform 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.05);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: transform 0.3s ease;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
}

/* Mobile gallery fixes */
@media (max-width: 768px) {
    .gallery-item img {
        opacity: 1 !important;
        visibility: visible !important;
        display: block !important;
        height: 200px !important;
        box-shadow: none !important;
    }
    
    .gallery-item {
        box-shadow: none !important;
    }
}

/* Service image fixes */
.service-image img {
    transition: transform 0.3s ease;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    box-shadow: none !important;
}

.service-image:hover img {
    transform: scale(1.05);
}

/* About image fixes */
.about-image img {
    transition: transform 0.3s ease;
    opacity: 1 !important;
    display: block !important;
    visibility: visible !important;
    box-shadow: none !important;
}

.about-image:hover img {
    transform: scale(1.05);
}

/* Contact Section */
.contact-info {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 0.5rem 0;
}

.contact-item i {
    font-size: 1.2rem;
    width: 30px;
}

.contact-form {
    background: #fff;
    padding: 2rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.form-control {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 0.75rem 1rem;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* WhatsApp Float Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.whatsapp-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    background: var(--success-color);
    color: white;
    border-radius: 50%;
    text-decoration: none;
    font-size: 1.5rem;
    box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
}

.whatsapp-btn:hover {
    background: #157347;
    color: white;
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(25, 135, 84, 0.4);
}

@keyframes pulse {
    0% {
        box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
    }
    50% {
        box-shadow: 0 4px 25px rgba(25, 135, 84, 0.5);
    }
    100% {
        box-shadow: 0 4px 15px rgba(25, 135, 84, 0.3);
    }
}

/* Buttons */
.btn {
    border-radius: 10px;
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Footer */
footer {
    margin-top: 0;
}

/* Mobile Responsive Design */
@media (max-width: 768px) {
    /* Hero Section Mobile */
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
        margin-bottom: 1rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    
    .hero-btn {
        min-width: 200px;
        width: 100%;
        max-width: 280px;
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
    }
    
    /* Navigation Mobile */
    .navbar-brand {
        font-size: 1.25rem;
    }
    
    .navbar-nav {
        text-align: center;
        padding-top: 1rem;
    }
    
    .nav-link {
        padding: 0.75rem 1rem;
        font-size: 1.1rem;
    }
    
    /* Service Cards Mobile */
    .service-card {
        margin-bottom: 1.5rem;
        padding: 1.5rem;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
        font-size: 1.75rem;
    }
    
    .service-card h4 {
        font-size: 1.25rem;
    }
    
    /* Gallery Mobile */
    .gallery-item img {
        height: 200px;
    }
    
    /* About Section Mobile */
    .achievement-item h4 {
        font-size: 1.5rem;
    }
    
    .achievement-item {
        padding: 0.75rem;
        margin-bottom: 1rem;
    }
    
    /* Contact Mobile */
    .contact-info {
        padding: 1.5rem;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
        margin-bottom: 1rem;
    }
    
    .contact-item i {
        margin-bottom: 0.5rem;
        margin-right: 0;
    }
    
    /* WhatsApp Float Mobile */
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
    }
    
    .whatsapp-btn {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    /* Section Headings Mobile */
    .display-5 {
        font-size: 2.25rem;
    }
    
    /* Video Section Mobile */
    .video-card {
        margin-bottom: 1.5rem;
    }
    
    .youtube-thumbnail img {
        height: 200px;
    }
    
    .youtube-container {
        height: 250px;
    }
}

@media (max-width: 576px) {
    /* Extra Small Mobile */
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.25rem;
    }
    
    .hero-btn {
        min-width: 180px;
        padding: 0.625rem 1rem;
        font-size: 0.95rem;
    }
    
    .display-5 {
        font-size: 1.75rem;
    }
    
    .service-card {
        padding: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .service-card h4 {
        font-size: 1.1rem;
    }
    
    .service-card p {
        font-size: 0.9rem;
    }
    
    .contact-info,
    .contact-form {
        padding: 1.25rem;
    }
    
    .gallery-item img {
        height: 180px;
    }
    
    .achievement-item h4 {
        font-size: 1.25rem;
    }
    
    .achievement-item p {
        font-size: 0.9rem;
    }
    
    .youtube-thumbnail img {
        height: 180px;
    }
    
    .youtube-container {
        height: 200px;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .video-info h5 {
        font-size: 1.1rem;
    }
    
    .video-info p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    /* Very Small Mobile */
    .hero-title {
        font-size: 1.75rem;
    }
    
    .hero-subtitle {
        font-size: 0.95rem;
    }
    
    .hero-btn {
        min-width: 160px;
        padding: 0.5rem 0.875rem;
        font-size: 0.9rem;
    }
    
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    .service-card {
        padding: 1rem;
    }
    
    .contact-info {
        padding: 1rem;
    }
    
    .gallery-item img {
        height: 160px;
    }
    
    .achievement-item {
        padding: 0.5rem;
    }
    
    .achievement-item h4 {
        font-size: 1.1rem;
    }
    
    .achievement-item p {
        font-size: 0.8rem;
    }
}

/* Smooth Scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading Animation */
.loading {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.loading.loaded {
    opacity: 1;
    transform: translateY(0);
}

/* Services Page Styles */
.service-detail {
    padding: 2rem 0;
}

.service-icon-large {
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 2rem;
    color: white;
    font-size: 2.5rem;
}

.service-features {
    list-style: none;
    padding: 0;
}

.service-features li {
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.service-image {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.service-image img {
    transition: transform 0.3s ease;
}

.service-image:hover img {
    transform: scale(1.05);
}

/* Pricing Cards */
.pricing-card {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid transparent;
    height: 100%;
}

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

.pricing-card.featured {
    border-color: var(--primary-color);
    transform: scale(1.05);
}

.pricing-header {
    margin-bottom: 2rem;
}

.price {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    margin: 1rem 0;
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin-bottom: 2rem;
}

.pricing-features li {
    margin-bottom: 0.75rem;
    color: var(--secondary-color);
}

/* Feature Cards */
.feature-card {
    background: #fff;
    border-radius: 15px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    color: white;
    font-size: 1.5rem;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, var(--primary-color), #0056b3);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #0056b3;
}

/* Video Section Styles */
.video-card {
    background: #fff;
    border-radius: 15px;
    padding: 1.5rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e9ecef;
    height: 100%;
}

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

.video-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 1;
}

.video-thumbnail:hover {
    transform: scale(1.02);
}

.video-thumbnail video {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    transition: filter 0.3s ease;
}

.video-thumbnail:hover video {
    filter: brightness(0.8);
}

.play-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 80px;
    height: 80px;
    background: rgba(13, 110, 253, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    opacity: 0.8;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(13, 110, 253, 0.3);
    z-index: 10;
    cursor: pointer;
    pointer-events: auto;
}

.play-button:hover {
    background: rgba(13, 110, 253, 1);
    box-shadow: 0 6px 20px rgba(13, 110, 253, 0.4);
}

.play-button i {
    margin-left: 4px; /* Slight adjustment for play icon centering */
}

.video-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 2rem;
    z-index: 10;
}

/* YouTube Thumbnail Styles */
.youtube-thumbnail {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    cursor: pointer;
    transition: transform 0.3s ease;
    z-index: 1;
}

.youtube-thumbnail:hover {
    transform: scale(1.02);
}

.youtube-thumbnail img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    border-radius: 15px;
    transition: filter 0.3s ease;
}

.youtube-thumbnail:hover img {
    filter: brightness(0.8);
}

.youtube-play {
    background: rgba(255, 0, 0, 0.9) !important;
    box-shadow: 0 4px 15px rgba(255, 0, 0, 0.3) !important;
}

.youtube-play:hover {
    background: rgba(255, 0, 0, 1) !important;
    box-shadow: 0 6px 20px rgba(255, 0, 0, 0.4) !important;
}

/* YouTube Modal Styles */
.youtube-container {
    position: relative;
    width: 100%;
    height: 400px;
    background: #000;
}

.youtube-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border-radius: 0 0 15px 15px;
}

.video-info h5 {
    color: var(--primary-color);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.video-info p {
    color: var(--secondary-color);
    margin-bottom: 0;
    font-size: 0.95rem;
}

/* Video Modal Styles */
#videoModal .modal-content {
    border-radius: 15px;
    overflow: hidden;
    border: none;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

#videoModal .modal-header {
    background: var(--primary-color);
    color: white;
    border-bottom: none;
    padding: 1rem 1.5rem;
}

#videoModal .modal-title {
    font-weight: 600;
    margin: 0;
}

#videoModal .btn-close {
    filter: invert(1);
    opacity: 0.8;
}

#videoModal .btn-close:hover {
    opacity: 1;
}

#modalVideo {
    width: 100%;
    height: auto;
    max-height: 70vh;
    background: #000;
}

/* Mobile Video Styles */
@media (max-width: 768px) {
    .video-thumbnail video {
        height: 200px;
    }
    
    .play-button {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .video-card {
        padding: 1rem;
        margin-bottom: 1.5rem;
    }
    
    #modalVideo {
        max-height: 50vh;
    }
    
    .youtube-container {
        height: 250px;
    }
    
    .youtube-thumbnail img {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .video-thumbnail video {
        height: 180px;
    }
    
    .play-button {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .video-info h5 {
        font-size: 1.1rem;
    }
    
    .video-info p {
        font-size: 0.9rem;
    }
    
    .youtube-container {
        height: 200px;
    }
    
    .youtube-thumbnail img {
        height: 180px;
    }
} 