@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;600;700&family=Open+Sans:wght@300;400;600&display=swap');

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    overscroll-behavior: none;
    background: #002346;
    /* Фіксуємо висоту для стабільного navbar на iOS */
    height: 100%;
    position: relative;
}

/* Variables */
:root {
    --bg-dark-blue: #002346;
    --bg-light-blue: #1A5997;
    --dark-blue: #121E29;
    --accent-yellow: #FFD700;
    --accent-yellow-darker: #ffc107;
    --text-white: #f8f9fa;
    --text-gray: #a8b2d1;
    --border-radius: 6px;
    --transition: all 0.3s ease-in-out;
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: var(--text-gray);
    background: linear-gradient(135deg, rgba(10, 19, 26, 1) 0%, rgba(26, 52, 80, 1) 100%);
    min-height: 100vh;
    overflow-x: hidden;
    overscroll-behavior-y: none;
    /* iPhone safe area */
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
    /* Плавний скрол для iOS */
    -webkit-overflow-scrolling: touch;
    /* Фіксуємо позицію при скролі */
    position: relative;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-white);
}

h1 {
    font-size: 3rem;
}

h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

h3 {
    font-size: 1.75rem;
    margin-bottom: 0.75rem;
}

h4 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--accent-yellow);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--accent-yellow-darker);
}

/* Container */
.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 10px 24px;
    border-radius: var(--border-radius);
    font-weight: 400;
    font-family: 'Montserrat', sans-serif;
    text-align: center;
    transition: var(--transition);
    border: 2px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--accent-yellow);
    color: var(--bg-dark-blue);
    border-color: var(--accent-yellow);
}

.btn-primary:hover {
    background-color: var(--accent-yellow-darker);
    border-color: var(--accent-yellow-darker);
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    color: var(--bg-dark-blue);
}

.btn-secondary {
    background-color: transparent;
    color: var(--accent-yellow);
    border: 2px solid var(--accent-yellow);
}

.btn-secondary:hover {
    background-color: rgba(255, 215, 0, 0.1);
    transform: translateY(-3px);
}

/* Section */

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-header h2 {
    margin-bottom: 1rem;
    text-decoration: underline var(--bg-light-blue);
}

.section-header p {
    font-size: 1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    background: linear-gradient(135deg, rgba(10, 19, 26, 0.95) 0%, rgba(26, 52, 80, 0.95) 100%);
    backdrop-filter: blur(10px);
    z-index: 1000;
    transition: var(--transition);
    padding: 1rem 0;
    box-sizing: border-box;
    /* Фіксуємо позицію на iPhone та мобільних */
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform;
    /* Додаткова фіксація для iOS Safari */
    -webkit-perspective: 1000;
    perspective: 1000;
}

/* Лінія зверху navbar - продовження градієнту */
.navbar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        rgba(10, 19, 26, 0.95) 0%,
        rgba(26, 52, 80, 0.95) 50%,
        rgba(10, 19, 26, 0.95) 100%
    );
    opacity: 0.3;
}

/* Лінія знизу navbar - перехід до hero */
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.1) 50%,
        transparent 100%
    );
}

/* Прибираємо лінію знизу navbar на мобільних коли меню відкрите */
@media (max-width: 1024px) {
    body.menu-open .navbar::after {
        display: none;
    }
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-white);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo-img {
    height: 40px;
    width: auto;
}

.nav-logo-text {
    display: inline;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.nav-logo span {
    color: var(--accent-yellow);
}

.nav-menu {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-item {
    margin: 0 0.7rem;
}

.nav-link {
    color: var(--text-white);
    font-weight: 400;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    padding-bottom: 5px;
}

.nav-link:hover {
    color: var(--accent-yellow);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.nav-phone {
    color: var(--text-white);
    font-weight: 400;
    font-size: 0.9rem;
}

.nav-phone i {
    color: var(--bg-light-blue);
    margin-right: 0.5rem;
}

.nav-toggle {
    display: none;
    cursor: pointer;
    padding: 4px;
}

.bar {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px auto;
    transition: all 0.3s ease-in-out;
    background-color: var(--text-white);
    border-radius: 2px;
}

/* Анімація бургер-меню в хрестик */
.nav-toggle.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.nav-toggle.active .bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Hero Section */
.hero {
    position: relative;
    height: 100vh;
    padding: 7vh 0px; /* Increased vertical padding */
    padding-top: 120px; /* Top padding for navbar */
    box-sizing: border-box;
}

.hero::before {
    content: '';
    position: absolute;
    top: 55%;
    left: 20%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background-image: url('../images/logo/logo-small-white.svg');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0.02;
    z-index: 0;
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    width: 100%;
    height: calc(100vh - 120px);
    position: relative;
    z-index: 1;
}

.hero-content {
    max-width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 0;
    margin-left: 4rem;
}

.hero-image {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    height: 100%;
    padding: 0;
    margin: 0;
    position: relative;
}

.hero-image::before {
    content: '';
    position: absolute;
    bottom: 15%;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 60%;
    background: radial-gradient(ellipse, rgba(255, 255, 255, 0.6) 0%, rgba(255, 255, 255, 0.3) 40%, transparent 60%);
    filter: blur(100px);
    z-index: -1;
}

.hero-image img {
    width: 100%;
    height: auto;
    max-width: 800px;
    max-height: 80vh;
    object-fit: contain;
    object-position: bottom;
    border-radius: var(--border-radius);
    display: block;
    margin: 0;
    padding: 0;
    position: relative;
    z-index: 1;
}

.hero-title {
    font-size: 3rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.hero-title span {
    text-decoration: var(--bg-light-blue) underline;
}

.hero-description {
    font-size: 1rem;
    margin-bottom: 2.5rem;
    max-width: 550px;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
}

/* Services Section */
.services {
    background-color: var(--dark-blue);
    padding: 7vh 0px; /* Increased vertical padding */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);

}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--dark-blue);
    padding: 2.5rem 2rem;
    border-radius: var(--border-radius);
    text-align: center;
    transition: var(--transition);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

/* Removed earlier hover rule for service-card to avoid conflict with unified hover below */

.service-icon {
    margin: 0 auto 1.5rem;
}

.service-icon i {
    font-size: 2.5rem;
    color: var(--accent-yellow);
}

.service-card h3 {
    margin-bottom: 1rem;
}

/* Products Section */
/* Uses services-grid styling */

/* Appointment Section */
#appointment {
    padding: 7vh 0px; /* Increased vertical padding */
}

.appointment-form-container {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-light-blue);
    padding: 3rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-lg);
}

.appointment-form .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.appointment-form .form-group {
    display: flex;
    flex-direction: column;
}

.appointment-form label {
    color: var(--text-white);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.appointment-form input,
.appointment-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--text-gray);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background-color: var(--bg-dark-blue);
    color: var(--text-white);
    transition: var(--transition);
}

.appointment-form input:focus,
.appointment-form select:focus {
    outline: none;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.appointment-form .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 1.125rem;
    margin-top: 1rem;
}

/* About Section */
#about {
    background-color: var(--dark-blue);
    padding: 7vh 0px; /* Increased vertical padding */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    margin-top: 3rem;
}

.about-text h3 {
    color: var(--accent-yellow);
    margin-bottom: 1.5rem;
    font-size: 1.75rem;
}

.about-text p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

.about-features {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.5rem;
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center; /* vertically center icon and text */
    gap: 1rem;
    padding: 1.5rem;
    background: var(--dark-blue);
    border-radius: var(--border-radius);
    border: 1px solid rgba(255, 215, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    /* Equal width visual alignment */
    min-height: 100%;
}

.feature-item:hover {
    border-color: var(--accent-yellow);
    transform: translateY(-12px); /* Match service card lift */
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    box-shadow: 0 18px 30px -6px rgba(0,0,0,0.35), 0 8px 14px -8px rgba(0,0,0,0.25);
}

.feature-item i {
    font-size: 1.5rem;
    color: var(--accent-yellow);
    margin-top: 0.2rem;
    flex-shrink: 0;
}

.feature-item h4 {
    color: var(--text-white);
    margin-bottom: 0.75rem; /* Unified title -> text spacing */
    font-size: 1.1rem;
}

/* Constrain text width inside feature items for consistent block width perception */
.feature-item h4 {
    max-width: 180px; /* Keep heading compact */
    text-align: left;
}

.feature-item p {
    max-width: none; /* Stretch paragraph across remaining space */
    flex: 1;
    text-align: left;
}

/* Allow the longest (experience) line to wrap in a balanced way on larger screens */
@media (min-width: 900px) {
    .feature-item h4 {
        max-width: 200px; /* Slightly wider heading on large screens */
    }
    .feature-item p {
        max-width: none;
    }
}

.feature-item p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.about-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--accent-yellow);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.about-image {
    position: relative;
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    height: 100%;
    min-height: 500px;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        135deg,
        rgba(0, 35, 70, 0.85) 0%,
        rgba(26, 89, 151, 0.85) 100%
    );
    display: flex;
    align-items: flex-end;
    opacity: 0;
    transition: var(--transition);
}

.about-image:hover .image-overlay {
    opacity: 1;
}

.overlay-content {
    padding: 2rem;
    color: var(--text-white);
}

.overlay-content h4 {
    color: var(--accent-yellow);
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.overlay-content p {
    margin: 0;
    line-height: 1.5;
    font-size: 0.95rem;
}

/* Appointment Section */
#appointment {
    padding: 5vh 0px;
}

/* Contact Section */
.contact {
    padding: 7vh 0px; /* Increased vertical padding */
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
    align-items: stretch;
}

.contact-form-container {
    background-color: var(--bg-light-blue);
    padding: 3rem;
    border-radius: var(--border-radius);
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.contact-form .form-group {
    display: flex;
    flex-direction: column;
}

.contact-form .full-width {
    grid-column: 1 / -1;
}

.contact-form label {
    color: var(--text-white);
    margin-bottom: 0.5rem;
    font-weight: 400;
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--text-gray);
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    background-color: var(--bg-dark-blue);
    color: var(--text-white);
    transition: var(--transition);
    font-family: 'Montserrat', sans-serif;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-yellow);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.2);
}

.contact-form .btn-primary {
    grid-column: 1 / -1;
    padding: 15px;
    font-size: 1.125rem;
    margin-top: 1rem;
}

.map-container {
    border-radius: var(--border-radius);
    overflow: hidden;
    min-height: 400px;
    box-shadow: var(--shadow-lg);
    line-height: 0;
}

/* Contact Section (Footer) */
.footer {
    color: var(--text-gray);
    padding: 80px 0 30px; /* Increased vertical padding */
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-content {
    display: grid;
    grid-template-columns: 2fr 2fr 2.5fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-section h4 {
    color: var(--text-white);
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.footer-logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.footer-logo-img {
    height: 40px;
    width: auto;
}

.footer-logo-text {
    display: inline;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
}

.footer-logo span {
    color: var(--accent-yellow);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--bg-dark-blue);
    background-color: var(--accent-yellow);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent-yellow-darker);
    transform: translateY(-3px);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.75rem;
}

.footer-section ul a {
    color: var(--text-gray);
}

.footer-section ul a:hover {
    color: var(--accent-yellow);
    padding-left: 5px;
}

.contact-details p {
    display: flex;
    align-items: flex-start;
    margin-bottom: 0.75rem;
}

.contact-details i {
    color: var(--accent-yellow);
    margin-right: 0.75rem;
    margin-top: 3px;
    min-width: 20px;
    flex-shrink: 0;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

/* Swiper каруселі для послуг і товарів */
.services-swiper, .products-swiper {
    width: 100%;
    padding: 0 70px;
    overflow: visible;
}

.services-swiper .swiper-wrapper, .products-swiper .swiper-wrapper {
    padding: 20px 0;
}

.services-swiper .swiper-slide, .products-swiper .swiper-slide {
    height: auto;
    display: flex;
    align-items: stretch;
}

.service-card, .product-card {
    width: 100%;
    background: var(--dark-blue);
    border-radius: 0.75rem;
    box-shadow: 0 2px 16px rgba(0,0,0,0.2);
    padding: 2rem 1.5rem;
    text-align: center;
    color: #fff;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.product-card {
    background: transparent; /* Прибираємо фон */
    box-shadow: none; /* Прибираємо базову тінь */
    min-height: 380px; /* Мінімальна висота */
    padding: 0; /* Прибираємо падінги для товарів */
}

.service-card:hover, .product-card:hover {
    border-color: var(--accent-yellow);
    transform: translateY(-12px);
    box-shadow: 0 18px 30px -6px rgba(0,0,0,0.35), 0 8px 14px -8px rgba(0,0,0,0.25);
}

.product-card:hover {
    transform: translateY(-8px);
    box-shadow: none; /* Прибираємо тінь для товарів */
    z-index: 10;
}

.service-img, .product-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 0.5rem;
    margin-bottom: 1rem;
    flex-shrink: 0;
    display: block; /* Запобігаємо змінам висоти */
}

.service-icon {
    font-size: 3rem;
    color: var(--accent-yellow);
    margin-bottom: 1rem;
    flex-shrink: 0;
}

.service-card h3 {
    margin: 0 0 0.75rem 0; /* Unified title -> text spacing */
    font-size: 1.3rem;
    color: var(--accent-yellow);
    font-weight: 600;
    flex-shrink: 0;
    }

    .service-card h3 {
        margin-bottom: 0.75rem; /* Ensure unified spacing (duplicate earlier rule) */
}

.service-card p {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
    flex-grow: 1;
}

.card-button {
    background: var(--accent-yellow);
    color: var(--bg-dark-blue);
    border: none;
    border-radius: 0.5rem;
    padding: 0.7rem 1.2rem;
    font-size: 0.9rem;
    font-weight: 400;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    margin-top: auto;
    flex-shrink: 0;
    align-self: center;
}

.card-button:hover {
    background: var(--accent-yellow-darker);
    color: var(--bg-dark-blue);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

.product-card h4 {
    margin: 0 0 0.75rem 0; /* Unified title -> text spacing */
    font-size: 1.3rem;
    flex-shrink: 0;
    color: var(--accent-yellow);
    font-weight: 600;
}

.product-card p {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    line-height: 1.4;
    flex-grow: 1;
}

/* Swiper навігація */
.swiper-button-next, .swiper-button-prev {
    position: relative;
    width: 50px;
    height: 50px;
    margin-top: -25px;
    transition: all 0.3s ease;
}

.swiper-button-prev {
    top: 120px !important;
    left: 16px !important;
}

.swiper-button-next {
    top: 120px !important;
    right: 16px !important;
}

.swiper-button-next:after, .swiper-button-prev:after {
    font-size: 16px;
    color: var(--accent-yellow);
    font-weight: 900;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.swiper-button-next:hover, .swiper-button-prev:hover {
    transform: scale(1.1);
}

.swiper-button-next:hover:after, .swiper-button-prev:hover:after {
    color: var(--accent-yellow-darker);
}

.swiper-button-next:active, .swiper-button-prev:active {
    transform: scale(0.95);
}

.swiper-pagination {
    display: none !important;
}

.swiper-pagination-bullet {
    background: #1a2332;
    opacity: 0.5;
}

.swiper-pagination-bullet-active {
    background: var(--primary-color);
    opacity: 1;
}

.products {
    padding: 7vh 0px; /* Increased vertical padding */
}

/* Медіа-запити видалені - Swiper керує розмірами */

@media (max-width: 768px) {
    .hero-content {
        align-items: center;
    }

    .hero-content {
        min-height: 80vh;
    }

    .services-swiper, .products-swiper {
        padding: 2rem 50px;
    }
    
    .services-swiper .swiper-slide, .products-swiper .swiper-slide {
        display: flex;
        justify-content: center;
        align-items: stretch;
    }
    
    .swiper-button-next, .swiper-button-prev {
        width: 40px;
        height: 40px;
        margin-top: -20px;
    }
    
    .swiper-button-prev {
        left: -50px;
    }
    
    .swiper-button-next {
        right: -50px;
    }
    
    .swiper-button-next:after, .swiper-button-prev:after {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .services-swiper, .products-swiper {
        margin: 0 30px;
    }
    
    .services-swiper .swiper-slide, .products-swiper .swiper-slide {
        display: flex;
        justify-content: center;
        align-items: stretch;
    }
    
    .swiper-button-prev {
        left: -30px;
    }
    
    .swiper-button-next {
        right: -30px;
    }
    
    .swiper-button-next, .swiper-button-prev {
        width: 35px;
        height: 35px;
        margin-top: -17.5px;
    }
    .swiper-button-prev {
        left: 10px;
    }
    
    .swiper-button-next {
        right: 10px;
    }
}

@media (max-width: 600px) {
    /* Додаткова фіксація navbar на малих екранах */
    .navbar {
        position: fixed;
        top: 0;
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
        will-change: transform;
        /* Запобігаємо будь-якому зміщенню */
        backface-visibility: hidden;
        -webkit-backface-visibility: hidden;
    }

    .container {
        padding: 0 0.75rem;
    }

    /* Two-column products grid on small screens */
    .products-single .products-gallery-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 0.75rem;
    }
    .products-single .products-gallery-grid .gallery-item {
        aspect-ratio: 1 / 1; /* square thumbnails for compact layout */
    }
    
    .hero {
        min-height: auto;
        padding: 2.5rem 0; /* Slightly increased */
        padding-top: 100px;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        font-size: 0.9rem;
        margin-bottom: 1.5rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 0.9rem;
    }
    
    .service-card, .product-card {
        flex-basis: calc(90% - 10px);
        max-width: calc(90% - 10px);
    }
    
    .services-track-container, .products-track-container {
        padding: 0 10px;
    }
    
    .about-image {
        height: 200px;
        min-height: 200px;
    }
    
    .contact {
        padding: 3vh 0px 5vh;
    }

    .contact-form-container {
        padding: 1.5rem;
        padding-bottom: 2rem;
    }

    .contact-form {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-form button[type="submit"] {
        margin: 1.5rem auto 2rem;
        max-width: 300px;
        padding: 16px 24px;
        font-size: 1.1rem;
        box-shadow: 0 4px 12px rgba(255, 215, 0, 0.3);
    }

    .contact-form button[type="submit"]:active {
        transform: scale(0.98);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .map-container {
        min-height: 300px;
    }
}

/* Tablet Styles */
@media (max-width: 1024px) and (min-width: 769px) {
    .hero-content {
        align-items: center;
    }

    .hero-image {
        width: 40%;
    }

    .hero-container {
        gap: 3rem;
        justify-items: center
    }
    
    .hero-content {
        margin-left: 2rem;
    }
    
    .about-content {
        gap: 3rem;
    }
    
    .about-features {
        margin: 1.5rem 0;
    }
    
    .feature-item {
        padding: 1.25rem;
    }
    
    .contact-grid {
        gap: 2rem;
    }
}

/* iOS Safari фікси для navbar */
@supports (-webkit-touch-callout: none) {
    /* Тільки для iOS Safari */
    .navbar {
        position: -webkit-sticky;
        position: sticky;
        top: 0;
        /* Форсуємо GPU acceleration */
        -webkit-transform: translate3d(0, 0, 0);
        transform: translate3d(0, 0, 0);
    }

    /* Альтернативно залишаємо fixed, але з більш жорсткою фіксацією */
    @supports (position: fixed) {
        .navbar {
            position: fixed;
            -webkit-transform: translateZ(0);
            transform: translateZ(0);
        }
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .nav-container, .navbar {
        margin: 0 !important;
        width: 100% !important;
    }

    .nav-menu {
        position: fixed;
        top: calc(env(safe-area-inset-top) + 78px);
        left: 0;
        right: 0;
        background: var(--bg-dark-blue);
        width: 100vw;
        flex-direction: column;
        padding: 0;
        margin: 0;
        margin-top: -1px;
        box-shadow: var(--shadow-lg);
        z-index: 999;
        box-sizing: border-box;
        opacity: 0;
        visibility: hidden;
        transform: translateY(0);
        transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
        display: flex;
        border-top: none;
    }

    .nav-menu.active {
        opacity: 1;
        visibility: visible;
    }

    /* Попереджаємо зміщення при відкритті меню */
    body.menu-open {
        overflow: hidden;
    }

    .nav-item {
        margin: 0;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        opacity: 0;
        transform: translateX(-20px);
        transition: all 0.3s ease-in-out;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        min-height: 50px;
    }

    .nav-item:last-child {
        border-bottom: none;
    }

    .nav-menu.active .nav-item {
        opacity: 1;
        transform: translateX(0);
    }

    .nav-menu.active .nav-item:nth-child(1) { transition-delay: 0.1s; }
    .nav-menu.active .nav-item:nth-child(2) { transition-delay: 0.2s; }
    .nav-menu.active .nav-item:nth-child(3) { transition-delay: 0.3s; }
    .nav-menu.active .nav-item:nth-child(4) { transition-delay: 0.4s; }
    .nav-menu.active .nav-item:nth-child(5) { transition-delay: 0.5s; }
    .nav-menu.active .nav-item:nth-child(6) { transition-delay: 0.6s; }

    .nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        height: 100%;
        padding: 0.75rem 1.5rem;
        box-sizing: border-box;
        transition: all 0.3s ease;
        margin: 0;
        font-size: 0.95rem;
        text-align: center;
    }

    .nav-link:hover {
        background: rgba(255, 215, 0, 0.1);
        color: var(--accent-yellow);
    }

    .nav-toggle {
        display: block;
    }

    .nav-right {
        display: none; /* Hide phone and button in mobile view, they can be in the menu */
    }

    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
        height: auto;
        min-height: auto;
        padding: 2rem 0;
    }

    .hero-content {
        max-width: 100%;
    }

    /* Нормальний порядок елементів на планшетах */

    h1 {
        font-size: 3rem;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .container {
        padding: 0 1rem;
    }
    
    .hero {
        height: auto;
        min-height: 100vh;
        padding: 5vh 0px; /* Slightly increased */
        padding-top: 100px;
        display: flex;
        align-items: center;
    }
    
    .hero::before {
        display: none;
    }
    
    .hero-content {
        max-width: 100%;
        text-align: center;
        margin-left: 0;
        order: 1;
        background-image: url('../images/logo/doberman.png');
        background-size: contain;
        background-position: bottom center;
        background-repeat: no-repeat;
        border-radius: 15px;
        padding: 3rem 2rem;
        position: relative;
        overflow: hidden;
    }
    
    .hero-content::before {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.5);
        border-radius: 15px;
        z-index: 1;
    }
    
    .hero-title,
    .hero-description,
    .hero-buttons {
        position: relative;
        z-index: 2;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.2;
        color: white;
        text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
    }
    
    .hero-description {
        font-size: 0.95rem;
        margin-bottom: 2rem;
        color: white;
        text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.7);
    }

    .hero-buttons {
        justify-content: center;
        flex-direction: column;
        gap: 0.75rem;
    }
    
    .hero-image {
        display: none;
    }
    
    .btn {
        width: 100%;
        max-width: 280px;
        padding: 12px 20px;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .about-image {
        height: 250px;
        order: -1;
        margin-bottom: 2rem;
        min-height: 250px;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        margin-top: 1.5rem;
        padding-top: 1.5rem;
    }

    .stat-number {
        font-size: 2rem;
    }

    .feature-item {
        padding: 1rem;
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .feature-item h4,
    .feature-item p {
        text-align: center;
        max-width: 100%;
    }

    .feature-item i {
        margin-top: 0;
    }

    .appointment-form .form-row {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 0;
    }
    .appointment-form .form-group {
        margin-bottom: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-section {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .footer-section h4 {
        font-size: 1.05rem;
    }

    .contact-details p {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 0.25rem;
        line-height: 1.1;
    }

    .contact-details p br {
        display: block;
        content: "";
        margin-top: -0.8em;
    }

    .contact-details i {
        margin-right: 0;
        margin-top: 0;
        font-size: 1.5rem;
    }
}

/* Animations & Effects */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Gallery Section */
.gallery {
    background: var(--dark-blue);
    padding: 7vh 0; /* Increased vertical padding */
    border-top: 1px solid rgba(255,255,255,0.1);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* Simplified Products Section */
.products-single .single-product-block {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    gap: 2.5rem;
    align-items: center;
    /* removed card styling to look like native section */
    padding: 0; /* rely on container padding */
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
}
.products-single .product-media {
    display: flex;
    justify-content: center;
    align-items: center;
}
.products-single .product-media img {
    width: 100%;
    aspect-ratio: 1 / 1; /* square */
    height: auto;
    object-fit: cover;
    display: block;
    max-width: 480px; /* slight refinement */
    border-radius: 12px; /* subtle rounding only */
    border: none; /* remove decorative border */
}
/* Products Gallery */
.products-single .products-gallery {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 2.5rem;
    align-items: center; /* vertically center gallery grid and info block */
    margin-top: 1.5rem;
}
.products-single .products-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(180px,1fr));
    gap: 1rem;
}
.products-single .products-gallery-info {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.products-single .products-gallery-info h3 {
    margin: 0;
    font-size: 1.6rem;
    color: var(--accent-yellow);
}
.products-single .products-gallery-info p {
    margin: 0;
    line-height: 1.5;
}
@media (max-width: 992px) {
    .products-single .products-gallery {
        grid-template-columns: 1fr;
        align-items: start; /* on narrow screens natural flow */
    }
    .products-single .products-gallery-info {
        margin-top: .5rem;
    }

    .products-single .products-gallery-info h3,
    .products-single .products-gallery-info > p {
        text-align: center;
    }

    .products-single .product-contact-btn {
        display: block;
        margin: 1rem auto 0;
        max-width: 280px;
        text-align: center;
    }

    .products-single .product-highlights {
        text-align: left;
        max-width: 100%;
    }

    .products-single .product-highlights li {
        align-items: flex-start;
        gap: 0.75rem;
    }

    .products-single .product-highlights i {
        margin-top: 3px;
        min-width: 16px;
        flex-shrink: 0;
    }
}
@media (prefers-reduced-motion: reduce) {
    .products-single .product-gallery-item img,
    .products-single .product-gallery-item:hover img {
        transition: none;
        transform: none;
        filter: none;
    }
}
@media (max-width: 768px) {
    .products-single .single-product-block {
        grid-template-columns: 1fr;
    }
    .products-single .product-media {
        justify-content: center;
    }
    .products-single .product-media img {
        max-width: 100%;
    }
}
.products-single .product-info h3 {
    margin: 0 0 0.75rem;
    font-size: 1.6rem;
    color: var(--accent-yellow);
}
.products-single .product-info .product-icon {
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: linear-gradient(135deg, #17364d, #102536);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.9rem;
    box-shadow: 0 6px 16px -4px rgba(0,0,0,0.4);
    border: 1px solid rgba(255,255,255,0.08);
}
.products-single .product-info .product-icon i {
    font-size: 1.5rem;
    color: var(--accent-yellow);
}
.products-single .product-info p {
    margin: 0 0 1rem;
    line-height: 1.5;
}
.products-single .product-highlights {
    list-style: none;
    padding: 0;
    margin: 0 0 1.25rem;
    display: grid;
    gap: 0.5rem;
}
.products-single .product-highlights li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.95rem;
}
.products-single .product-highlights i {
    color: var(--accent-yellow);
    font-size: 0.9rem;
}
.products-single .product-contact-btn {
    display: inline-block;
    margin-top: 0.25rem;
}
@media (max-width: 900px) {
    .products-single .single-product-block {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }
    .products-single .product-media img {
        aspect-ratio: 16/9;
    }
}

.gallery-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    align-items: stretch;
}

/* Two-column gallery layout */
.gallery-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: start;
}

.gallery-left {
    position: sticky;
    top: calc(var(--navbar-height, 70px) + 1rem);
    align-self: start;
}

.gallery-left .video-item {
    aspect-ratio: 1 / 1;
    height: auto;
}

.gallery-right.images-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}

@media (max-width: 900px) {
    .gallery-layout {
        grid-template-columns: 1fr;
    }
    .gallery-left {
        position: relative;
        top: 0;
        margin-bottom: 1.25rem;
    }
    .gallery-right.images-grid {
        grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    }
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    border: 1px solid rgba(255,255,255,0.08);
    background: #0f2233;
    aspect-ratio: 4 / 3;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.35s cubic-bezier(.16,.8,.24,1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.gallery-item img, .gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Ensure gallery images are interactive for lightbox */
.gallery-right .gallery-item img {
    cursor: zoom-in;
}

.gallery-item video {
    background: linear-gradient(135deg, #0a131a 0%, #1a3450 50%, #002346 100%);
    position: relative;
    opacity: 0;
    transition: opacity 0.5s ease-in;
}

.gallery-item video::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(26, 89, 151, 0.3) 0%, rgba(0, 35, 70, 0.5) 100%);
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.gallery-item video[poster] {
    background: transparent;
}

.gallery-item video.loaded {
    opacity: 1;
}

.gallery-item:hover {
    transform: translateY(-12px) scale(1.03);
    box-shadow: 0 18px 32px -8px rgba(0,0,0,0.45), 0 8px 16px -8px rgba(0,0,0,0.3);
    border-color: var(--accent-yellow);
}

/* Video item: disable hover & transitions */
.gallery-item.video-item {
    transition: none !important;
}
.gallery-item.video-item:hover,
.gallery-item.video-item:focus-within {
    transform: none !important;
    box-shadow: none !important;
    border-color: rgba(255,255,255,0.08) !important;
}

/* Ensure video inside video-item is interactive and not covered by overlays */
.gallery-item.video-item video {
    pointer-events: auto;
    z-index: 2;
    position: relative;
    width: 100%;
    height: 100%;
    display: block;
}

/* Prevent overlay effect on video */
.gallery-item.video-item::after,
.gallery-item.video-item:hover::after {
    display: none !important;
}

.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(145deg, rgba(0,0,0,0.15), rgba(0,0,0,0));
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.gallery-item:hover::after {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .gallery-item {
        transition: none;
    }
    .gallery-item:hover {
        transform: none;
        box-shadow: none;
    }
}

/* Lightbox Styles */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease;
    z-index: 1000;
}
.lightbox.open {
    opacity: 1;
    visibility: visible;
}
.lightbox-image {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: var(--border-radius);
    box-shadow: 0 12px 32px -8px rgba(0,0,0,0.6);
    object-fit: contain;
}
.lightbox-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border: none;
    font-size: 2rem;
    line-height: 1;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
}
.lightbox-close:hover {
    background: rgba(255,255,255,0.25);
}
.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    font-size: 2.25rem;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
}
.lightbox-prev:hover, .lightbox-next:hover { background: rgba(255,255,255,0.28); }
.lightbox-prev { left: 2rem; }
.lightbox-next { right: 2rem; }
.lightbox-counter {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.85);
    font-size: 0.875rem;
    letter-spacing: 1px;
}
@media (max-width: 600px) {
    .lightbox-prev { left: 0.75rem; }
    .lightbox-next { right: 0.75rem; }
    .lightbox-close { top: 0.5rem; right: 0.5rem; }
}

/* Make lightbox video fill viewport on small screens */
@media (max-width: 900px) {
    .lightbox {
        padding: 0;
    }
    .lightbox.open .lightbox-video,
    .lightbox.open .lightbox-image {
        max-width: 100vw;
        max-height: 100vh;
        width: 100vw;
        height: 100vh;
        border-radius: 0;
    }
    .lightbox .lightbox-video {
        object-fit: contain;
    }
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
}

.scale-in {
    opacity: 0;
    transform: scale(0.8);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Спеціальні анімації для груп елементів */
.stagger-delay-1 {
    transition-delay: 0.1s;
}

.stagger-delay-2 {
    transition-delay: 0.2s;
}

.stagger-delay-3 {
    transition-delay: 0.3s;
}

.stagger-delay-4 {
    transition-delay: 0.4s;
}

/* Анімація для навігації */
.nav-item {
    opacity: 0;
    transform: translateY(-20px);
    transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.nav-item.animate {
    opacity: 1;
    transform: translateY(0);
}

.notification {
    position: fixed;
    bottom: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: var(--border-radius);
    color: var(--bg-dark-blue);
    font-size: 0.9rem;
    font-weight: 600;
    z-index: 1001;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
    box-shadow: var(--shadow-lg);
}

.notification.show {
    opacity: 1;
    transform: translateY(0);
}

.notification.success {
    background-color: var(--accent-yellow);
}

.notification.error {
    background-color: #e53e3e;
    color: var(--text-white);
}

/* Mobile notification positioning */
@media (max-width: 768px) {
    .notification {
        top: 50%;
        bottom: auto;
        left: 50%;
        right: auto;
        transform: translate(-50%, calc(-50% - 20px));
        max-width: calc(100% - 40px);
        width: auto;
        text-align: center;
        padding: 15px 20px;
    }

    .notification.show {
        transform: translate(-50%, -50%);
    }
}

/* Testimonials Section */
.testimonials {
    background: transparent; /* Match products section (inherit body gradient) */
    padding: 7vh 0; /* Consistent vertical rhythm */
}

.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* Single row of 4 on large screens */
    gap: 1.5rem;
    margin-top: 2rem;
    max-width: 100%;
    width: 100%;
    align-items: stretch;
}

.testimonial-card {
    background: var(--dark-blue);
    border: 1px solid rgba(255,255,255,0.08);
    padding: 1.75rem 1.5rem 1.5rem;
    border-radius: 14px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-height: 100%;
    box-shadow: 0 8px 20px -6px rgba(0,0,0,0.35);
    transition: transform 0.35s cubic-bezier(.16,.8,.24,1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.testimonial-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-yellow);
    box-shadow: 0 18px 34px -10px rgba(0,0,0,0.55), 0 10px 20px -12px rgba(0,0,0,0.35);
}

.testimonial-text {
    font-size: 0.95rem;
    line-height: 1.55;
    color: var(--text-gray);
    font-style: italic;
    position: relative;
    padding-left: 1.5rem;
}

.testimonial-text::before {
    content: '\201C';
    position: absolute;
    left: 0;
    top: -0.25rem;
    font-size: 2rem;
    color: var(--accent-yellow);
    line-height: 1;
}

.testimonial-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.testimonial-meta strong {
    color: var(--text-white);
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: .5px;
}

.testimonial-meta .meta-sub {
    font-size: 0.75rem;
    color: var(--accent-yellow);
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.9;
}

@media (max-width: 700px) {
    .testimonial-grid {
        grid-template-columns: 1fr; /* Stack on very small screens */
    }
}

@media (max-width: 1100px) and (min-width: 701px) {
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr); /* Two per row on medium screens */
    }
}

/* Avatar inside testimonial */
.testimonial-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent-yellow);
    box-shadow: 0 4px 10px -3px rgba(0,0,0,0.4);
    flex-shrink: 0;
}

.testimonial-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.testimonial-card {
    display: flex;
    flex-direction: column;
}

.testimonial-card .testimonial-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Image Loading Optimization */
img[loading="lazy"] {
    background: linear-gradient(135deg, rgba(26, 89, 151, 0.3) 0%, rgba(0, 35, 70, 0.5) 100%);
    transition: opacity 0.2s ease-in-out;
}

img[loading="lazy"]:not(.loaded) {
    opacity: 0;
}

img[loading="lazy"].loaded {
    opacity: 1;
}

/* Testimonial images load instantly without delay */
.testimonial-avatar img {
    opacity: 1 !important;
    transition: none !important;
}

.testimonial-avatar img:not(.loaded) {
    background: linear-gradient(135deg, rgba(26, 89, 151, 0.2) 0%, rgba(0, 35, 70, 0.3) 100%);
}

.testimonial-avatar img.loaded {
    background: none;
}
